Update GTK+ autoconf macros and regenerate configure
Use the macro versions from 2.24.29 and 3.18.8 (latest available in Debian for GTK+ 2 and 3 respectively) to fix the detection of pkg-config which was incorrect in the old gtk-2.0.m4. Closes #17027.
This commit is contained in:
@@ -24,19 +24,8 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run
|
||||
|
||||
no_gtk=""
|
||||
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
|
||||
if test x$PKG_CONFIG != xno ; then
|
||||
if pkg-config --atleast-pkgconfig-version 0.7 ; then
|
||||
:
|
||||
else
|
||||
echo "*** pkg-config too old; version 0.7 or better required."
|
||||
no_gtk=yes
|
||||
PKG_CONFIG=no
|
||||
fi
|
||||
else
|
||||
no_gtk=yes
|
||||
fi
|
||||
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
PKG_PROG_PKG_CONFIG([0.7])
|
||||
|
||||
min_gtk_version=ifelse([$1], ,2.0.0,$1)
|
||||
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
|
||||
@@ -85,7 +74,7 @@ main ()
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.gtktest");
|
||||
fclose (fopen ("conf.gtktest", "w"));
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_gtk_version");
|
||||
@@ -103,7 +92,7 @@ main ()
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf ("*** was found! If pkg-config was correct, then it is best\n");
|
||||
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
printf("*** required on your system.\n");
|
||||
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
|
||||
@@ -139,7 +128,7 @@ main ()
|
||||
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
|
||||
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** so that the correct libraries are found at run-time))\n");
|
||||
}
|
||||
}
|
||||
@@ -181,7 +170,7 @@ main ()
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occurred. This usually means GTK+ is incorrectly installed."])
|
||||
echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
|
@@ -6,20 +6,19 @@ dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified i
|
||||
dnl pass to pkg-config
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GTK_3_0],
|
||||
[dnl
|
||||
[m4_warn([obsolete], [AM_PATH_GTK_3_0 is deprecated, use PKG_CHECK_MODULES([GTK], [gtk+-3.0]) instead])
|
||||
dnl Get the cflags and libraries from pkg-config
|
||||
dnl
|
||||
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
|
||||
, enable_gtktest=yes)
|
||||
min_gtk_version=ifelse([$1], [], [3.0.0], [$1])
|
||||
|
||||
pkg_gtk_version=gtk+-3.0
|
||||
pkg_config_args=$pkg_gtk_version
|
||||
pkg_config_args="gtk+-3.0 >= $min_gtk_version"
|
||||
for module in . $4
|
||||
do
|
||||
case "$module" in
|
||||
gthread)
|
||||
pkg_gthread_version=gthread-2.0
|
||||
pkg_config_args="$pkg_config_args $pkg_gthread_version"
|
||||
pkg_config_args="$pkg_config_args gthread-2.0"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -40,7 +39,6 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run
|
||||
no_gtk=yes
|
||||
fi
|
||||
|
||||
min_gtk_version=ifelse([$1], ,3.0.0,$1)
|
||||
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
|
||||
|
||||
if test x$PKG_CONFIG != xno ; then
|
||||
@@ -49,7 +47,8 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run
|
||||
echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
|
||||
enable_gtktest=no
|
||||
fi
|
||||
if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_gtk_version ; then
|
||||
|
||||
if $PKG_CONFIG $pkg_config_args; then
|
||||
:
|
||||
else
|
||||
no_gtk=yes
|
||||
@@ -83,14 +82,11 @@ dnl
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
unsigned int major, minor, micro;
|
||||
|
||||
fclose (fopen ("conf.gtktest", "w"));
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_gtk_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
if (sscanf("$min_gtk_version", "%u.%u.%u", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gtk_version");
|
||||
exit(1);
|
||||
}
|
||||
@@ -129,9 +125,9 @@ main ()
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||
printf("\n*** An old version of GTK+ (%u.%u.%u) was found.\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||
printf("*** You need a version of GTK+ newer than %u.%u.%u. The latest version of\n",
|
||||
major, minor, micro);
|
||||
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||
printf("***\n");
|
||||
@@ -182,7 +178,7 @@ main ()
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occurred. This usually means GTK+ is incorrectly installed."])
|
||||
echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
@@ -200,13 +196,14 @@ dnl GTK_CHECK_BACKEND(BACKEND-NAME [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTI
|
||||
dnl Tests for BACKEND-NAME in the GTK targets list
|
||||
dnl
|
||||
AC_DEFUN([GTK_CHECK_BACKEND],
|
||||
[
|
||||
[m4_warn([obsolete], [GTK_CHECK_BACKEND is deprecated, use PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-3.0]) or similar instead])
|
||||
pkg_config_args=ifelse([$1],,gtk+-3.0, gtk+-$1-3.0)
|
||||
min_gtk_version=ifelse([$2],,3.0.0,$2)
|
||||
pkg_config_args="$pkg_config_args >= $min_gtk_version"
|
||||
|
||||
AC_PATH_PROG(PKG_CONFIG, [pkg-config], [AC_MSG_ERROR([No pkg-config found])])
|
||||
|
||||
if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_gtk_version ; then
|
||||
if $PKG_CONFIG $pkg_config_args ; then
|
||||
target_found=yes
|
||||
else
|
||||
target_found=no
|
||||
|
Reference in New Issue
Block a user