summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2006-12-19 06:48:25 +0000
committerJan Djärv <jan.h.d@swipnet.se>2006-12-19 06:48:25 +0000
commita8ba915c1517199d78562cd5a0c7e4a63792b7d0 (patch)
treec2d812ecadec5e1d3ff19265c406ebb38ede3429
parent709beef05779062dc7cab2ff3a84c0fb94ebf843 (diff)
downloademacs-a8ba915c1517199d78562cd5a0c7e4a63792b7d0.tar.gz
* configure.in: Check if Gtk+ compiles at all.
-rw-r--r--configure.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 93cac35a32c..0a910da67a4 100644
--- a/configure.in
+++ b/configure.in
@@ -2043,6 +2043,9 @@ fail;
fi
HAVE_GTK=no
+if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
+ USE_X_TOOLKIT=none
+fi
if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
AC_MSG_ERROR([Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}]);
@@ -2062,6 +2065,13 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$GTK_LIBS $LIBS"
+ dnl Try to compile a simple GTK program.
+ GTK_COMPILES=no
+ AC_CHECK_FUNCS(gtk_main, GTK_COMPILES=yes)
+ if test "${GTK_COMPILES}" != "yes"; then
+ AC_MSG_ERROR([Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?]);
+ fi
+
HAVE_GTK=yes
AC_DEFINE(HAVE_GTK, 1, [Define to 1 if using GTK.])
USE_X_TOOLKIT=none