Re: [PATCH] glib2.0 mini patch works with todays anoncvs



On Mon, 2002-09-16 at 20:39, Ali Akcaagac wrote:
> anyways applying the patch should work out of the box.

here an update to the patch,

this time it's a condition which checks for --enable-glib2 if it's set
then it defaults to glib2.0 if not (for those still using glib1.2.x
simply leave it out) it defaults to glib1.2.x.

this patch is checked up and down and shouldn't cause any problems.
please apply and give me feedback.

pavel what do you think ?

-- 
Name....: Ali Akcaagac
Status..: Student Of Computer & Economic Science
E-Mail..: mailto:ali akcaagac stud fh-wilhelmshaven de
WWW.....: http://www.fh-wilhelmshaven.de/~akcaagaa
diff -ruN mc-cvs/autogen.sh mc/autogen.sh
--- mc-cvs/autogen.sh	2002-09-16 12:13:53.000000000 +0200
+++ mc/autogen.sh	2002-09-16 21:44:46.000000000 +0200
@@ -4,8 +4,8 @@
 # Make it possible to specify path in the environment
 : ${AUTOCONF=autoconf}
 : ${AUTOHEADER=autoheader}
-: ${AUTOMAKE=automake}
-: ${ACLOCAL=aclocal}
+: ${AUTOMAKE=automake-1.6}
+: ${ACLOCAL=aclocal-1.6}
 : ${GETTEXTIZE=gettextize}
 : ${AUTOPOINT=autopoint}
 
diff -ruN mc-cvs/configure.in mc/configure.in
--- mc-cvs/configure.in	2002-09-16 12:13:53.000000000 +0200
+++ mc/configure.in	2002-09-16 21:44:51.000000000 +0200
@@ -19,21 +19,27 @@
 
 AC_PROG_CC_STDC
 
-
 dnl
-dnl Find glib 1.2.x.  This check should be kept close to the beginning,
-dnl as it tends to fail often.
+dnl Check if we want to support glib 2.x. If not then fall back to glib 1.2.x
+dnl This check should be kept close to the beginning, as it tends to fail.
 dnl
+AC_ARG_ENABLE(glib2, [  --enable-glib2           Support for Glib 2.x if available])
 
-dnl This temporary variable is a workaround for a bug in Autoconf-2.53
-glib_path=$PATH:/usr/local/bin
+if test "x$enable_glib2" = "xyes" ; then
+	PKG_CHECK_MODULES(GLIB, "glib-2.0")
+	AC_SUBST(GLIB_CFLAGS)
+	AC_SUBST(GLIB_LIBS)
+else
+	dnl This temporary variable is a workaround for a bug in Autoconf-2.53
+	glib_path=$PATH:/usr/local/bin
 
-dnl Klugde for FreeBSD, where glib-config is renamed to glib12-config.
-AC_PATH_PROGS([GLIB_CONFIG], [glib-config glib12-config],,[$glib_path])
+	dnl Klugde for FreeBSD, where glib-config is renamed to glib12-config.
+	AC_PATH_PROGS([GLIB_CONFIG], [glib-config glib12-config],,[$glib_path])
 
-AC_ARG_VAR([GLIB_CONFIG], [Path to glib-config])
-AM_PATH_GLIB(1.2.0,,[AC_MSG_ERROR([Test for GLIB failed.  MC requires GLIB.])])
-AC_SUBST(GLIB_LIBS)
+	AC_ARG_VAR([GLIB_CONFIG], [Path to glib-config])
+	AM_PATH_GLIB(1.2.0,,[AC_MSG_ERROR([Test for GLIB failed.  MC requires GLIB.])])
+	AC_SUBST(GLIB_LIBS)
+fi
 
 
 AC_HEADER_MAJOR


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]