|
@@ -25,10 +25,16 @@ dnl Keep this check close to the beginning, so that the users
|
|
|
dnl without any glib won't have their time wasted by other checks.
|
|
|
dnl
|
|
|
|
|
|
-PKG_CHECK_MODULES(GLIB, [glib-2.0], , [glib_found=no])
|
|
|
+AC_ARG_WITH(glib12,
|
|
|
+ [ --with-glib12 Force using glib 1.2.x [[no]]])
|
|
|
+
|
|
|
+glib_found=no
|
|
|
+if test "x$with_glib12" != "xyes"; then
|
|
|
+ PKG_CHECK_MODULES(GLIB, [glib-2.0], [glib_found=yes], [:])
|
|
|
+fi
|
|
|
|
|
|
dnl Fall back to glib-1.2, don't use pkgconfig to find it.
|
|
|
-if test "x$glib_found" = "xno" ; then
|
|
|
+if test "x$glib_found" != "xyes" ; then
|
|
|
dnl This temporary variable is a workaround for a bug in Autoconf-2.53
|
|
|
glib_path=$PATH:/usr/local/bin
|
|
|
|
|
@@ -36,7 +42,7 @@ if test "x$glib_found" = "xno" ; then
|
|
|
AC_PATH_PROGS([GLIB_CONFIG], [glib-config glib12-config],,[$glib_path])
|
|
|
|
|
|
AC_ARG_VAR([GLIB_CONFIG], [Path to glib-config (version 1.2.x only)])
|
|
|
- AM_PATH_GLIB(1.2.6,,[AC_MSG_ERROR([Test for glib failed.
|
|
|
+ AM_PATH_GLIB(1.2.6, , [AC_MSG_ERROR([Test for glib failed.
|
|
|
GNU Midnight Commander requires glib 1.2.6 or above.])])
|
|
|
fi
|
|
|
|