Fixed bug with "--disable-lttv-gui" flags.
authorWilliam Bourque <william@ewilbou.dyn.lmc.ericsson.se>
Thu, 17 Sep 2009 18:35:01 +0000 (14:35 -0400)
committerWilliam Bourque <william@ewilbou.dyn.lmc.ericsson.se>
Thu, 17 Sep 2009 18:35:01 +0000 (14:35 -0400)
configure.ac

index c232c2eb697321ecbaa5cd0785393c270ead9b64..fbc267bb7f1fc88b0a47dfa967f9fff698066a8f 100644 (file)
@@ -82,7 +82,7 @@ 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+=`for x in $SUBDIRS; do echo -n "-I$x "; done`
         else
                 AC_MSG_ERROR(Unable to find java include file in $JAVA_JDK)
         fi
@@ -111,24 +111,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.024535 seconds and 4 git commands to generate.