aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1998-08-17 07:23:41 +0800
committerMartin Baulig <martin@src.gnome.org>1998-08-17 07:23:41 +0800
commitc01b9850eb32da089b80886537995f039005d0a8 (patch)
tree5040726821dfcf2484e496e6077efc4a88ad92dd
parent8783a09884c10a726be71fcd83ace9ba27027543 (diff)
downloadgsoc2013-evolution-c01b9850eb32da089b80886537995f039005d0a8.tar
gsoc2013-evolution-c01b9850eb32da089b80886537995f039005d0a8.tar.gz
gsoc2013-evolution-c01b9850eb32da089b80886537995f039005d0a8.tar.bz2
gsoc2013-evolution-c01b9850eb32da089b80886537995f039005d0a8.tar.lz
gsoc2013-evolution-c01b9850eb32da089b80886537995f039005d0a8.tar.xz
gsoc2013-evolution-c01b9850eb32da089b80886537995f039005d0a8.tar.zst
gsoc2013-evolution-c01b9850eb32da089b80886537995f039005d0a8.zip
Completely rewrote this file. It uses now the `libgtop-config' script and
1998-08-17 Martin Baulig <martin@home-of-linux.org> * gnome-libgtop-check.m4: Completely rewrote this file. It uses now the `libgtop-config' script and also checks for correct libgtop version. svn path=/trunk/; revision=320
-rw-r--r--macros/ChangeLog6
-rw-r--r--macros/gnome-libgtop-check.m480
2 files changed, 43 insertions, 43 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog
index aa56f1fc8a..76770a0863 100644
--- a/macros/ChangeLog
+++ b/macros/ChangeLog
@@ -1,3 +1,9 @@
+1998-08-17 Martin Baulig <martin@home-of-linux.org>
+
+ * gnome-libgtop-check.m4: Completely rewrote this file. It
+ uses now the `libgtop-config' script and also checks for
+ correct libgtop version.
+
1998-08-06 Martin Baulig <martin@home-of-linux.org>
* gnome-libgtop-sysdeps.m4: Added `freebsd' directory.
diff --git a/macros/gnome-libgtop-check.m4 b/macros/gnome-libgtop-check.m4
index cc899e5eff..705a15c260 100644
--- a/macros/gnome-libgtop-check.m4
+++ b/macros/gnome-libgtop-check.m4
@@ -37,54 +37,48 @@ AC_DEFUN([GNOME_LIBGTOP_HOOK],
AC_SUBST(LIBGTOP_BINDIR)
AC_SUBST(LIBGTOP_SERVER)
- if test x$exec_prefix = xNONE; then
- if test x$prefix = xNONE; then
- libgtop_prefix=$ac_default_prefix/lib
- else
- libgtop_prefix=$prefix/lib
- fi
- else
- libgtop_prefix=`eval echo \`echo $libdir\``
- fi
-
- AC_ARG_WITH(libgtop-includes,
- [ --with-libgtop-includes Specify location of LIBGTOP headers],[
- CFLAGS="$CFLAGS -I$withval"
- ])
-
- AC_ARG_WITH(libgtop-libs,
- [ --with-libgtop-libs Specify location of LIBGTOP libs],[
- LDFLAGS="$LDFLAGS -L$withval"
- libgtop_prefix=$withval
- ])
-
+ dnl Get the cflags and libraries from the libgtop-config script
+ dnl
AC_ARG_WITH(libgtop,
- [ --with-libgtop Specify prefix for LIBGTOP files],[
- if test x$withval = xyes; then
- dnl Note that an empty true branch is not valid sh syntax.
- ifelse([$1], [], :, [$1])
- else
- LDFLAGS="$LDFLAGS -L$withval/lib"
- CFLAGS="$CFLAGS -I$withval/include"
- libgtop_prefix=$withval/lib
- fi
- ])
+ [ --with-libgtop=PFX Prefix where LIBGTOP is installed (optional)],
+ libgtop_config_prefix="$withval", libgtop_config_prefix="")
+ AC_ARG_WITH(libgtop-exec,
+ [ --with-libgtop-exec=PFX Exec prefix where LIBGTOP is installed (optional)],
+ libgtop_config_exec_prefix="$withval", libgtop_config_exec_prefix="")
- AC_MSG_CHECKING(for libgtopConf.sh file in $libgtop_prefix)
- if test -f $libgtop_prefix/libgtopConf.sh; then
- AC_MSG_RESULT(found)
- AC_DEFINE(HAVE_LIBGTOP)
- echo "loading libgtop configuration from $libgtop_prefix/libgtopConf.sh"
- . $libgtop_prefix/libgtopConf.sh
- $1
+ if test x$libgtop_config_exec_prefix != x ; then
+ libgtop_config_args="$libgtop_config_args --exec-prefix=$libgtop_config_exec_prefix"
+ if test x${LIBGTOP_CONFIG+set} != xset ; then
+ LIBGTOP_CONFIG=$libgtop_config_exec_prefix/bin/libgtop-config
+ fi
+ fi
+ if test x$libgtop_config_prefix != x ; then
+ libgtop_config_args="$libgtop_config_args --prefix=$libgtop_config_prefix"
+ if test x${LIBGTOP_CONFIG+set} != xset ; then
+ LIBGTOP_CONFIG=$libgtop_config_prefix/bin/libgtop-config
+ fi
+ fi
+
+ AC_PATH_PROG(LIBGTOP_CONFIG, libgtop-config, no)
+ min_libgtop_version=ifelse([$1], ,0.25,$1)
+ AC_MSG_CHECKING(for libgtop - version >= $min_libgtop_version)
+ no_libgtop=""
+ if test "$LIBGTOP_CONFIG" = "no" ; then
+ no_libgtop=yes
+ else
+ configfile=`$LIBGTOP_CONFIG --config`
+ libgtop_version=`$LIBGTOP_CONFIG --version | sed -e 's,pre.*,,'`
+ test $libgtop_version \< $min_libgtop_version && no_libgtop=yes
+ . $configfile
+ fi
+ if test x$no_libgtop = x ; then
+ AC_DEFINE(HAVE_LIBGTOP)
+ AC_MSG_RESULT(yes)
else
- AC_MSG_RESULT(not found)
- if test x$2 = xfail; then
- AC_MSG_ERROR(Could not find the libgtopConf.sh file that is generated by libgtop install)
- fi
+ AC_MSG_RESULT(no)
fi
- AM_CONDITIONAL(HAVE_LIBGTOP, test -f $libgtop_prefix/libgtopConf.sh)
+ AM_CONDITIONAL(HAVE_LIBGTOP, test x$no_libgtop != xyes)
])
AC_DEFUN([GNOME_INIT_LIBGTOP],[