diff options
| author | Paul Eggert | 2013-07-01 19:17:12 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-01 19:17:12 -0700 |
| commit | 5583dcb6c889512e891dc9c6e76acf3654eb4ebc (patch) | |
| tree | 824eb3245952e5a5a0b0495319b0c9e980911752 | |
| parent | c2418359b3e9f2eb7a72f4ea5245637190571cc8 (diff) | |
| download | emacs-5583dcb6c889512e891dc9c6e76acf3654eb4ebc.tar.gz emacs-5583dcb6c889512e891dc9c6e76acf3654eb4ebc.zip | |
* configure.ac (GTK_COMPILES): Check API a bit more carefully.
Also check that it links. Say whether it compiled and linked.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | configure.ac | 22 |
2 files changed, 26 insertions, 1 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-07-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * configure.ac (GTK_COMPILES): Check API a bit more carefully. | ||
| 4 | Also check that it links. Say whether it compiled and linked. | ||
| 5 | |||
| 1 | 2013-07-01 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-07-01 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Merge from gnulib, incorporating: | 8 | Merge from gnulib, incorporating: |
diff --git a/configure.ac b/configure.ac index 2a7fb209a59..b36c41691fd 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -2131,8 +2131,28 @@ if test x"$pkg_check_gtk" = xyes; then | |||
| 2131 | CFLAGS="$CFLAGS $GTK_CFLAGS" | 2131 | CFLAGS="$CFLAGS $GTK_CFLAGS" |
| 2132 | LIBS="$GTK_LIBS $LIBS" | 2132 | LIBS="$GTK_LIBS $LIBS" |
| 2133 | dnl Try to compile a simple GTK program. | 2133 | dnl Try to compile a simple GTK program. |
| 2134 | AC_MSG_CHECKING([whether GTK compiles]) | ||
| 2134 | GTK_COMPILES=no | 2135 | GTK_COMPILES=no |
| 2135 | AC_CHECK_FUNCS(gtk_main, GTK_COMPILES=yes) | 2136 | AC_LINK_IFELSE( |
| 2137 | [AC_LANG_PROGRAM( | ||
| 2138 | [[/* Check the Gtk and Glib APIs. */ | ||
| 2139 | #include <gtk/gtk.h> | ||
| 2140 | #include <glib-object.h> | ||
| 2141 | static void | ||
| 2142 | callback (GObject *go, GParamSpec *spec, gpointer user_data) | ||
| 2143 | {} | ||
| 2144 | ]], | ||
| 2145 | [[ | ||
| 2146 | GtkSettings *gs = 0; | ||
| 2147 | /* Use G_CALLBACK to make sure function pointers can be cast to void *; | ||
| 2148 | strict C prohibits this. Use gtk_main_iteration to test that the | ||
| 2149 | libraries are there. */ | ||
| 2150 | if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC, | ||
| 2151 | 0, 0, 0, G_CALLBACK (callback), 0)) | ||
| 2152 | gtk_main_iteration (); | ||
| 2153 | ]])], | ||
| 2154 | [GTK_COMPILES=yes]) | ||
| 2155 | AC_MSG_RESULT([$GTK_COMPILES]) | ||
| 2136 | if test "${GTK_COMPILES}" != "yes"; then | 2156 | if test "${GTK_COMPILES}" != "yes"; then |
| 2137 | GTK_OBJ= | 2157 | GTK_OBJ= |
| 2138 | if test "$USE_X_TOOLKIT" != "maybe"; then | 2158 | if test "$USE_X_TOOLKIT" != "maybe"; then |