[hipl-commit] [trunk] Rev 4060: moved gtk detection into agent conditional

  • From: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 26 Mar 2010 14:58:32 +0200

Committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
Date: 26/03/2010 at 14:58:32
Revision: 4060
Revision-id: rene.hummen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  moved gtk detection into agent conditional
  
  Mircea reported that HIPL does not compile with default config on
  his machine that has no gtk headers installed. This should fix the
  issue and get the dependency in configure.ac straigt.

Modified:
  M  configure.ac

=== modified file 'configure.ac'
--- configure.ac        2010-03-16 15:18:14 +0000
+++ configure.ac        2010-03-26 12:57:06 +0000
@@ -116,19 +116,6 @@
 fi
 AM_CONDITIONAL(HIP_FIREWALL, test x"$ac_cv_use_firewall" = x"yes")
 
-# Try to automatically detect GTK if not disabled or enabled by user
-PKG_CHECK_MODULES(GTK,
-                  gtk+-2.0 >= 2.10.0,
-                  ac_cv_use_agent=yes,
-                  ac_cv_use_agent=no)
-if test x"$ac_cv_use_agent" = x"no"; then
-    PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8.0, ac_cv_use_agent=yes,
-                      ac_cv_use_agent=no)
-    if test x"$ac_cv_use_agent" = x"yes"; then
-        AC_MSG_WARN(You are missing >= GTK 2.10, it is VERY recommended)
-    fi
-fi
-
 AC_ARG_ENABLE(agent,
                AS_HELP_STRING([--enable-agent],
                               [HIP enable user agent (default is YES)]),
@@ -138,10 +125,27 @@
                [ac_cv_use_agent],
                [ac_cv_use_agent=yes])
 if test x"$ac_cv_use_agent" = x"yes"; then
-    AC_CHECK_LIB(sqlite3, sqlite3_open,,
-                 AC_MSG_ERROR(libsqlite3-dev not found))
-    AC_DEFINE(CONFIG_HIP_AGENT)
-    AH_TEMPLATE(CONFIG_HIP_AGENT, [Defined to 1 if agent is enabled.])
+    # Try to automatically detect GTK
+    PKG_CHECK_MODULES(GTK,
+                      [gtk+-2.0 >= 2.10.0],
+                      [ac_cv_use_agent=yes],
+                      [ac_cv_use_agent=no])
+    if test x"$ac_cv_use_agent" = x"no"; then
+        PKG_CHECK_MODULES(GTK,
+                          [gtk+-2.0 >= 2.8.0],
+                          [ac_cv_use_agent=yes],
+                          [ac_cv_use_agent=no])
+        if test x"$ac_cv_use_agent" = x"yes"; then
+            AC_MSG_WARN([You are missing >= GTK 2.10, it is VERY recommended])
+        fi
+    fi
+
+    if test x"$ac_cv_use_agent" = x"yes"; then
+        AC_CHECK_LIB(sqlite3, sqlite3_open,,
+                 [AC_MSG_ERROR(libsqlite3-dev not found)])
+        AC_DEFINE(CONFIG_HIP_AGENT)
+        AH_TEMPLATE(CONFIG_HIP_AGENT, [Defined to 1 if agent is enabled.])
+    fi
 fi
 AM_CONDITIONAL(HIP_AGENT, test x"$ac_cv_use_agent" = x"yes")

Other related posts:

  • » [hipl-commit] [trunk] Rev 4060: moved gtk detection into agent conditional - Rene Hummen