summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in67
1 files changed, 9 insertions, 58 deletions
diff --git a/configure.in b/configure.in
index baabd25814..d43a5d2cef 100644
--- a/configure.in
+++ b/configure.in
@@ -109,7 +109,6 @@ AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available
echo $enable_shm, enable_shm="yes")
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
, enable_ansi=no)
-AC_ARG_WITH(glib, [ --with-glib=DIR Use uninstalled copy of glib])
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
, enable_xim="yes")
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
@@ -285,68 +284,20 @@ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
CFLAGS="$gtk_save_CFLAGS"
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
-
-#
-# Find pkg-config
#
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test x$PKG_CONFIG = xno ; then
- AC_MSG_ERROR([*** pkg-config not found. See http://pkgconfig.sourceforge.net])
-fi
+# Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
+#
-if ! pkg-config --atleast-pkgconfig-version 0.5 ; then
- AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.])
-fi
+GLIB_PACKAGES="gobject-2.0 gmodule-2.0 gthread-2.0"
+GLIB_REQUIRED_VERSION=1.3.2
-if test x$with_glib = xyes ; then
+AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
AC_MSG_ERROR([
-*** Directory must be specified for --with-glib])
-fi
-
-if test x$with_glib = x ; then
+*** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of
+*** GLIB is always available from ftp://ftp.gtk.org/.]),
+ gobject gmodule gthread)
- # Look for separately installed glib
-
- GLIB_PACKAGES="gobject-2.0 gmodule-2.0 gthread-2.0"
- GLIB_REQUIRED_VERSION=1.3.2
-
- AC_MSG_CHECKING(GLib flags)
- if $PKG_CONFIG --atleast-version $GLIB_REQUIRED_VERSION glib-2.0 ; then
- GLIB_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES`
- GLIB_LIBS=`$PKG_CONFIG --libs $GLIB_PACKAGES`
- GLIB_DEPLIBS=$GLIB_LIBS
-
- AC_MSG_RESULT($GLIB_CFLAGS $GLIB_LIBS)
- else
- AC_MSG_ERROR([
-*** GLIB $GLIB_REQUIRED_VERSION or newer is required. The latest version of GLIB
-*** is always available from ftp://ftp.gtk.org/.
- ])
- fi
-
-else
- # Use uninstalled glib (assume they got the version right)
-
- if test -e glib-2.0.pc ; then
- :
- else
- AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
- fi
-
- # canonicalize relative paths
- case $with_glib in
- /*)
- glib_dir=$with_glib
- ;;
- *)
- glib_dir="\$(top_builddir)/$with_glib"
- ;;
- esac
-
- GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
- GLIB_LIBS="$glib_dir/libglib-1.3.la $glib_dir/gmodule/libgmodule-1.3.la"
- GLIB_DEPLIBS=
-fi
+GLIB_DEPLIBS=$GLIB_LIBS
CFLAGS="$CFLAGS $GLIB_CFLAGS"
AC_SUBST(GLIB_CFLAGS)