summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in220
1 files changed, 117 insertions, 103 deletions
diff --git a/configure.in b/configure.in
index 19a9813..2dd686d 100644
--- a/configure.in
+++ b/configure.in
@@ -56,114 +56,125 @@ if test x$with_gui != xno && test -z "$GUI"; then
dnl Check for iec61883 library
dnl ======================
PKG_CHECK_MODULES(IEC61883, libiec61883 >= 1.2)
+
+ dnl ======================
+ dnl Check for dv library
+ dnl ======================
+ PKG_CHECK_MODULES(DV, libdv >= 1.0)
else
AC_MSG_WARN([*** Building without GUI support!])
fi
-dnl ======================
-dnl Check for pthread library
-dnl ======================
-tmp_CXXFLAGS="$CXXFLAGS"
-tmp_CPPFLAGS="$CPPFLAGS"
-tmp_CFLAGS="$CFLAGS"
-tmp_LDFLAGS="$LDFLAGS"
-tmp_LIBS="$LIBS"
-CXXFLAGS=""
-CPPFLAGS=""
-CFLAGS=""
-LDFLAGS=""
-LIBS=""
-AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR([*** pthread headers not found!]))
-AC_CHECK_LIB(pthread, sem_init, , AC_MSG_ERROR([*** libpthread not found!]))
-PTHREAD_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
-PTHREAD_LIBS="$LDFLAGS $LIBS"
-CXXFLAGS="$tmp_CXXFLAGS"
-CPPFLAGS="$tmp_CPPFLAGS"
-CFLAGS="$tmp_CFLAGS"
-LDFLAGS="$tmp_LDFLAGS"
-LIBS="$tmp_LIBS"
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_LIBS)
-
-dnl ======================
-dnl Check for dv library
-dnl ======================
-PKG_CHECK_MODULES(DV, libdv >= 1.0)
-
-dnl ======================
-dnl Check for Jpeg library
-dnl ======================
-tmp_CXXFLAGS="$CXXFLAGS"
-tmp_CPPFLAGS="$CPPFLAGS"
-tmp_CFLAGS="$CFLAGS"
-tmp_LDFLAGS="$LDFLAGS"
-tmp_LIBS="$LIBS"
-CXXFLAGS=""
-CPPFLAGS=""
-CFLAGS=""
-LDFLAGS=""
-LIBS=""
-AC_CHECK_HEADER(jpeglib.h, , AC_MSG_ERROR([*** libJpeg not found!]))
-AC_CHECK_LIB(jpeg, jpeg_start_compress, , AC_MSG_ERROR([*** libJpeg not found!]))
-JPEG_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
-JPEG_LIBS="$LDFLAGS $LIBS"
-CXXFLAGS="$tmp_CXXFLAGS"
-CPPFLAGS="$tmp_CPPFLAGS"
-CFLAGS="$tmp_CFLAGS"
-LDFLAGS="$tmp_LDFLAGS"
-LIBS="$tmp_LIBS"
-AC_SUBST(JPEG_CFLAGS)
-AC_SUBST(JPEG_LIBS)
-
-dnl ======================
-dnl Check for Fame library
-dnl ======================
-tmp_CXXFLAGS="$CXXFLAGS"
-tmp_CPPFLAGS="$CPPFLAGS"
-tmp_CFLAGS="$CFLAGS"
-tmp_LDFLAGS="$LDFLAGS"
-tmp_LIBS="$LIBS"
-CXXFLAGS=""
-CPPFLAGS=""
-CFLAGS=""
-LDFLAGS=""
-LIBS=""
-AC_CHECK_HEADER(fame.h, , AC_MSG_ERROR([*** libFAME include files not found!]))
-AC_CHECK_LIB(fame, fame_init, , AC_MSG_ERROR([*** libFAME not found!]))
-FAME_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
-FAME_LIBS="$LDFLAGS $LIBS"
-CXXFLAGS="$tmp_CXXFLAGS"
-CPPFLAGS="$tmp_CPPFLAGS"
-CFLAGS="$tmp_CFLAGS"
-LDFLAGS="$tmp_LDFLAGS"
-LIBS="$tmp_LIBS"
-AC_SUBST(FAME_CFLAGS)
-AC_SUBST(FAME_LIBS)
+AC_ARG_WITH(server, [ --without-server build without server support])
+if test x$with_server != xno && test -z "$SERVER"; then
+ dnl ======================
+ dnl Check for pthread library
+ dnl ======================
+ tmp_CXXFLAGS="$CXXFLAGS"
+ tmp_CPPFLAGS="$CPPFLAGS"
+ tmp_CFLAGS="$CFLAGS"
+ tmp_LDFLAGS="$LDFLAGS"
+ tmp_LIBS="$LIBS"
+ CXXFLAGS=""
+ CPPFLAGS=""
+ CFLAGS=""
+ LDFLAGS=""
+ LIBS=""
+ AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR([*** pthread headers not found!]))
+ AC_CHECK_LIB(pthread, sem_init, , AC_MSG_ERROR([*** libpthread not found!]))
+ PTHREAD_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
+ PTHREAD_LIBS="$LDFLAGS $LIBS"
+ CXXFLAGS="$tmp_CXXFLAGS"
+ CPPFLAGS="$tmp_CPPFLAGS"
+ CFLAGS="$tmp_CFLAGS"
+ LDFLAGS="$tmp_LDFLAGS"
+ LIBS="$tmp_LIBS"
+ AC_SUBST(PTHREAD_CFLAGS)
+ AC_SUBST(PTHREAD_LIBS)
+
+ dnl ======================
+ dnl Check for dv library
+ dnl ======================
+ PKG_CHECK_MODULES(DV, libdv >= 1.0)
+
+ dnl ======================
+ dnl Check for Jpeg library
+ dnl ======================
+ tmp_CXXFLAGS="$CXXFLAGS"
+ tmp_CPPFLAGS="$CPPFLAGS"
+ tmp_CFLAGS="$CFLAGS"
+ tmp_LDFLAGS="$LDFLAGS"
+ tmp_LIBS="$LIBS"
+ CXXFLAGS=""
+ CPPFLAGS=""
+ CFLAGS=""
+ LDFLAGS=""
+ LIBS=""
+ AC_CHECK_HEADER(jpeglib.h, , AC_MSG_ERROR([*** libJpeg not found!]))
+ AC_CHECK_LIB(jpeg, jpeg_start_compress, , AC_MSG_ERROR([*** libJpeg not found!]))
+ JPEG_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
+ JPEG_LIBS="$LDFLAGS $LIBS"
+ CXXFLAGS="$tmp_CXXFLAGS"
+ CPPFLAGS="$tmp_CPPFLAGS"
+ CFLAGS="$tmp_CFLAGS"
+ LDFLAGS="$tmp_LDFLAGS"
+ LIBS="$tmp_LIBS"
+ AC_SUBST(JPEG_CFLAGS)
+ AC_SUBST(JPEG_LIBS)
+
+ dnl ======================
+ dnl Check for Fame library
+ dnl ======================
+ tmp_CXXFLAGS="$CXXFLAGS"
+ tmp_CPPFLAGS="$CPPFLAGS"
+ tmp_CFLAGS="$CFLAGS"
+ tmp_LDFLAGS="$LDFLAGS"
+ tmp_LIBS="$LIBS"
+ CXXFLAGS=""
+ CPPFLAGS=""
+ CFLAGS=""
+ LDFLAGS=""
+ LIBS=""
+ AC_CHECK_HEADER(fame.h, , AC_MSG_ERROR([*** libFAME include files not found!]))
+ AC_CHECK_LIB(fame, fame_init, , AC_MSG_ERROR([*** libFAME not found!]))
+ FAME_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
+ FAME_LIBS="$LDFLAGS $LIBS"
+ CXXFLAGS="$tmp_CXXFLAGS"
+ CPPFLAGS="$tmp_CPPFLAGS"
+ CFLAGS="$tmp_CFLAGS"
+ LDFLAGS="$tmp_LDFLAGS"
+ LIBS="$tmp_LIBS"
+ AC_SUBST(FAME_CFLAGS)
+ AC_SUBST(FAME_LIBS)
+
+ dnl ======================
+ dnl Check for Lame library
+ dnl ======================
+ tmp_CXXFLAGS="$CXXFLAGS"
+ tmp_CPPFLAGS="$CPPFLAGS"
+ tmp_CFLAGS="$CFLAGS"
+ tmp_LDFLAGS="$LDFLAGS"
+ tmp_LIBS="$LIBS"
+ CXXFLAGS=""
+ CPPFLAGS=""
+ CFLAGS=""
+ LDFLAGS=""
+ LIBS=""
+ AC_CHECK_HEADER(lame/lame.h, , AC_MSG_ERROR([*** libLAME (libmp3lame) include files not found!]))
+ AC_CHECK_LIB(mp3lame, lame_init, , AC_MSG_ERROR([*** libLAME (libmp3lame) not found!]))
+ LAME_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
+ LAME_LIBS="$LDFLAGS $LIBS"
+ CXXFLAGS="$tmp_CXXFLAGS"
+ CPPFLAGS="$tmp_CPPFLAGS"
+ CFLAGS="$tmp_CFLAGS"
+ LDFLAGS="$tmp_LDFLAGS"
+ LIBS="$tmp_LIBS"
+ AC_SUBST(LAME_CFLAGS)
+ AC_SUBST(LAME_LIBS)
+else
+ AC_MSG_WARN([*** Building without server support!])
+fi
-dnl ======================
-dnl Check for Lame library
-dnl ======================
-tmp_CXXFLAGS="$CXXFLAGS"
-tmp_CPPFLAGS="$CPPFLAGS"
-tmp_CFLAGS="$CFLAGS"
-tmp_LDFLAGS="$LDFLAGS"
-tmp_LIBS="$LIBS"
-CXXFLAGS=""
-CPPFLAGS=""
-CFLAGS=""
-LDFLAGS=""
-LIBS=""
-AC_CHECK_HEADER(lame/lame.h, , AC_MSG_ERROR([*** libLAME (libmp3lame) include files not found!]))
-AC_CHECK_LIB(mp3lame, lame_init, , AC_MSG_ERROR([*** libLAME (libmp3lame) not found!]))
-LAME_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
-LAME_LIBS="$LDFLAGS $LIBS"
-CXXFLAGS="$tmp_CXXFLAGS"
-CPPFLAGS="$tmp_CPPFLAGS"
-CFLAGS="$tmp_CFLAGS"
-LDFLAGS="$tmp_LDFLAGS"
-LIBS="$tmp_LIBS"
-AC_SUBST(LAME_CFLAGS)
-AC_SUBST(LAME_LIBS)
##################################
# Check if tests should be built.
@@ -181,6 +192,9 @@ AC_SUBST(CPPFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(LDFLAGS)
+AM_CONDITIONAL([WITH_GUI], [test "x$with_gui" = "xyes"])
+AM_CONDITIONAL([WITH_SERVER], [test "x$with_server" = "xyes"])
+
AC_OUTPUT(
Makefile
src/Makefile