diff options
author | Martin Baulig <martin@src.gnome.org> | 1998-05-22 08:23:48 +0800 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1998-05-22 08:23:48 +0800 |
commit | a9b80f8f1cc77aad397e6a0ae8b08764a9b0904e (patch) | |
tree | 7f68f95bf7e59c7c8bfaa5bec793991bb06bc68f | |
parent | d39a6ea089cf108d5f09ab7c49073394538198f4 (diff) | |
download | gsoc2013-evolution-a9b80f8f1cc77aad397e6a0ae8b08764a9b0904e.tar gsoc2013-evolution-a9b80f8f1cc77aad397e6a0ae8b08764a9b0904e.tar.gz gsoc2013-evolution-a9b80f8f1cc77aad397e6a0ae8b08764a9b0904e.tar.bz2 gsoc2013-evolution-a9b80f8f1cc77aad397e6a0ae8b08764a9b0904e.tar.lz gsoc2013-evolution-a9b80f8f1cc77aad397e6a0ae8b08764a9b0904e.tar.xz gsoc2013-evolution-a9b80f8f1cc77aad397e6a0ae8b08764a9b0904e.tar.zst gsoc2013-evolution-a9b80f8f1cc77aad397e6a0ae8b08764a9b0904e.zip |
New file. Checks whether libgtop is installed and reads its
* gnome-libgtop-check.m4 (GNOME_LIBGTOP_HOOK): New file.
Checks whether libgtop is installed and reads its `libgtopConf.sh'
file if it can be found. Defines HAVE_LIBGTOP on success and
provides HAVE_LIBGTOP automake conditional.
svn path=/trunk/; revision=224
-rw-r--r-- | macros/ChangeLog | 17 | ||||
-rw-r--r-- | macros/gnome-libgtop-check.m4 | 73 |
2 files changed, 90 insertions, 0 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog index c6aaa920da..fea1218bdd 100644 --- a/macros/ChangeLog +++ b/macros/ChangeLog @@ -1,3 +1,20 @@ +1998-05-22 Martin Baulig <martin@home-of-linux.org> + + * gnome-libgtop-check.m4 (GNOME_LIBGTOP_HOOK): New file. + Checks whether libgtop is installed and reads its `libgtopConf.sh' + file if it can be found. Defines HAVE_LIBGTOP on success and + provides HAVE_LIBGTOP automake conditional. + +1998-05-21 Martin Baulig <martin@home-of-linux.org> + + * gnome-libgtop-sysdeps.m4 (GNOME_LIBGTOP_SYSDEPS): New file. + (libgtop_sysdeps_dir): sysdeps directory libgtop uses. + (libgtop_use_machine_h): define HAVE_GLIBTOP_MACHINE_H if this + is `yes'. + (libgtop_need_server): we only need the libgtop server, when + this has a value of `yes'. Defines NEED_LIBGTOP and NEED_LIBGTOP + automake conditional. + 1998-05-19 Raja R Harinath <harinath@cs.umn.edu> * gnome-support.m4 (strerror): New check. diff --git a/macros/gnome-libgtop-check.m4 b/macros/gnome-libgtop-check.m4 new file mode 100644 index 0000000000..0a5ff19b1c --- /dev/null +++ b/macros/gnome-libgtop-check.m4 @@ -0,0 +1,73 @@ +dnl +dnl GNOME_LIBGTOP_HOOK (script-if-libgtop-enabled, failflag) +dnl +dnl if failflag is "fail" then GNOME_LIBGTOP_HOOK will abort if gtopConf.sh +dnl is not found. +dnl + +AC_DEFUN([GNOME_LIBGTOP_HOOK], +[ + AC_REQUIRE([GNOME_LIBGTOP_SYSDEPS]) + + AC_SUBST(LIBGTOP_LIBDIR) + AC_SUBST(LIBGTOP_INCLUDEDIR) + AC_SUBST(LIBGTOP_LIBS) + AC_SUBST(LIBGTOP_INCS) + AC_SUBST(LIBGTOP_GUILE_INCS) + AC_SUBST(LIBGTOP_GUILE_LIBS) + 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 + ]) + + 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 + ]) + + 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 + 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 + fi + + AM_CONDITIONAL(HAVE_LIBGTOP, test -f $libgtop_prefix/libgtopConf.sh) +]) + +AC_DEFUN([GNOME_INIT_LIBGTOP],[ + GNOME_LIBGTOP_HOOK([],) +]) |