configure.ac: cleanup
[lttv.git] / configure.ac
index c232c2eb697321ecbaa5cd0785393c270ead9b64..cbfb9bd83f2d791ca0476d9e03454be9f316db9c 100644 (file)
@@ -21,9 +21,8 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.57)
-AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
-#AC_WITH_LTDL  # not needed ?
-AM_INIT_AUTOMAKE(lttv,0.12.17-01072009)
+AC_INIT([lttv], [0.12.17-01072009], [ltt-dev@lists.casi.polymtl.ca])
+AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(config.h)
 AM_PROG_LIBTOOL
 
@@ -38,9 +37,9 @@ fi
 AM_CONDITIONAL(BUILD_LIB_ONLY, test "$with_liblttvtraceread_only" = "yes")
 
 
-# If requested, avoid building LLTv part
+# If requested, avoid building LTTV part
 AC_ARG_ENABLE(lttv-gui,
-[  --disable-lttv-gui      Do not build LTTv gui, only build textmode LTTv])
+[  --disable-lttv-gui      Do not build LTTV gui, only build textmode LTTV])
 
 if test -z "$enable_lttv_gui"; then
         enable_lttv_gui=${enable_lttv_gui_default-yes}
@@ -82,7 +81,9 @@ if test $JAVA_SDK; then
         if test -d $JAVA_SDK; then
                 AC_MSG_RESULT([using java include in $JAVA_SDK])
                 SUBDIRS=`find $JAVA_SDK/include -type d`
-                CPPFLAGS+=`for x in $SUBDIRS; do echo -n "-I$x "; done`
+               CFLAGS+=" "
+                CFLAGS+=`for x in $SUBDIRS; do echo -n "-I$x "; done`
+               CFLAGS+=" "
         else
                 AC_MSG_ERROR(Unable to find java include file in $JAVA_JDK)
         fi
@@ -111,24 +112,28 @@ AC_PROG_CC
 AM_PROG_CC_STDC
 AC_HEADER_STDC
 
+# If we want the gui, we need additionnal flags for GTK
 if test "$enable_lttv_gui" = "yes" ; then
         pkg_modules="gtk+-2.0 >= 2.0.0"
         PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
         PACKAGE_CFLAGS="-Wall -Wformat"
         AC_SUBST(PACKAGE_CFLAGS)
         AC_SUBST(PACKAGE_LIBS)
+# Else, we still have a dependency on gmodule
+# We will add flags for gmodule alone
+else
+        pkg_modules="gmodule-2.0 >= 2.0.0"
+        PKG_CHECK_MODULES(GMODULE, [$pkg_modules])
+        PACKAGE_CFLAGS="-Wall -Wformat"
+        AC_SUBST(PACKAGE_CFLAGS)
+        AC_SUBST(PACKAGE_LIBS)
 fi
 
 pkg_modules="gobject-2.0 >= 2.0.0"
 PKG_CHECK_MODULES(GOBJECT, [$pkg_modules])
 
-if test "$enable_lttv_gui" = "yes" ; then
-       LIBS="$LIBS $GTK_LIBS $GOBJECT_LIBS"
-       PACKAGE_CFLAGS="$GTK_CFLAGS $GOBJECT_CFLAGS -Wall -Wformat"
-else
-       LIBS="$LIBS $GOBJECT_LIBS"
-        PACKAGE_CFLAGS="$GOBJECT_CFLAGS -Wall -Wformat"
-fi
+LIBS="$LIBS $GTK_LIBS $GOBJECT_LIBS $GMODULE_LIBS"
+PACKAGE_CFLAGS="$GTK_CFLAGS $GOBJECT_CFLAGS $GMODULE_CFLAGS -Wall -Wformat"
 MODULE_CFLAGS="$PACKAGE_CFLAGS -fvisibility=hidden"
 MODULE_LDFLAGS="-module -avoid-version"
 AC_SUBST([PACKAGE_CFLAGS])
This page took 0.023834 seconds and 4 git commands to generate.