Browse Source

* configure.in: Add --with-glib12 option to confugure to force using glib 1.2.x.

Pavel Roskin 22 years ago
parent
commit
6536eb48f2
4 changed files with 25 additions and 4 deletions
  1. 5 0
      ChangeLog
  2. 7 1
      INSTALL
  3. 4 0
      NEWS
  4. 9 3
      configure.in

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2003-02-22  Pavel Roskin  <proski@gnu.org>
+
+	* configure.in: Add --with-glib12 option to confugure to force
+	using glib 1.2.x.
+
 2003-02-21  Andrew V. Samoilov  <sav@bcs.zp.ua>
 
 	* doc/ru/mc.1.in (Layout): Translate 'Xterm window title' option.

+ 7 - 1
INSTALL

@@ -84,6 +84,11 @@ incomplete, use `configure --help' to get the full list):
      Use this flag to disable gpm mouse support (e.g. if you want to
      use mouse only on X terminals).
 
+`--with-glib12'
+     Force using glib 1.2.x even if glib 2.0.x is present.  Use this
+     flag for testing or if you want to use the binary on systems that
+     don't have glib 2.0.x installed.
+
 `--with-mmap', `--without-mmap'
      Force using or not using the mmap function.  It is currently used
      in the internal viewer.  `--with-mmap' may be useful on some
@@ -299,7 +304,8 @@ get glib from
 
 ftp://ftp.gtk.org/pub/gtk/
 
-Note that only versions 1.2.x and 2.0.x are supported.
+Note that only versions 1.2.x and 2.0.x are supported.  Newer versions
+may work, but haven't been tested.
 
 Terminal database
 -----------------

+ 4 - 0
NEWS

@@ -1,3 +1,7 @@
+After version 4.6.0.
+
+Add --with-glib12 option to confugure to force using glib 1.2.x.
+
 Version 4.6.0.
 
 - Core functionality.

+ 9 - 3
configure.in

@@ -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