aboutsummaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@src.gnome.org>1998-08-03 06:23:15 +0800
committerRaja R Harinath <harinath@src.gnome.org>1998-08-03 06:23:15 +0800
commitd19286255db80ef8cc50e8480edd26dea81ea53a (patch)
tree84964695e32bf6b9aca1b7a1851ce5d76d3ece22 /macros
parent32fec7af94a94e364380899d8992c6cd4052a485 (diff)
downloadgsoc2013-evolution-d19286255db80ef8cc50e8480edd26dea81ea53a.tar.gz
gsoc2013-evolution-d19286255db80ef8cc50e8480edd26dea81ea53a.tar.zst
gsoc2013-evolution-d19286255db80ef8cc50e8480edd26dea81ea53a.zip
Use the `gnome-config' program if it exists.
* gnome.m4 (GNOME_CONFIG): Use the `gnome-config' program if it exists. With this, `make distcheck' on `gnome-core' inches forward slightly. svn path=/trunk/; revision=295
Diffstat (limited to 'macros')
-rw-r--r--macros/ChangeLog5
-rw-r--r--macros/gnome.m438
2 files changed, 34 insertions, 9 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog
index 9d7d4cdd1c..ce85d5136d 100644
--- a/macros/ChangeLog
+++ b/macros/ChangeLog
@@ -1,3 +1,8 @@
+1998-08-02 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gnome.m4 (GNOME_CONFIG): Use the `gnome-config' program if it
+ exists.
+
1998-08-01 Raja R Harinath <harinath@cs.umn.edu>
* Makefile.am (EXTRA_DIST): Remove `macros.dep'.
diff --git a/macros/gnome.m4 b/macros/gnome.m4
index aa6165fad4..9eac911ddd 100644
--- a/macros/gnome.m4
+++ b/macros/gnome.m4
@@ -13,21 +13,39 @@ AC_DEFUN([GNOME_INIT_HOOK],
AC_SUBST(GNOME_LIBDIR)
AC_SUBST(GNOME_INCLUDEDIR)
+ AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
+ if test "$GNOME_CONFIG" = "no"; then
+ no_gnome_config="yes"
+ else
+ AC_MSG_CHECKING(if $GNOME_CONFIG works)
+ if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
+ AC_MSG_RESULT(yes)
+ GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
+ GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
+ GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
+ GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnomeui`"
+ GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnomeui`"
+ else
+ AC_MSG_RESULT(no)
+ no_gnome_config="yes"
+ fi
+ fi
+
if test x$exec_prefix = xNONE; then
if test x$prefix = xNONE; then
- gnome_prefix=$ac_default_prefix/lib
+ gnome_prefix=$ac_default_prefix/lib
else
- gnome_prefix=$prefix/lib
+ gnome_prefix=$prefix/lib
fi
else
gnome_prefix=`eval echo \`echo $libdir\``
fi
-
+
AC_ARG_WITH(gnome-includes,
[ --with-gnome-includes Specify location of GNOME headers],[
CFLAGS="$CFLAGS -I$withval"
])
-
+
AC_ARG_WITH(gnome-libs,
[ --with-gnome-libs Specify location of GNOME libs],[
LDFLAGS="$LDFLAGS -L$withval"
@@ -46,18 +64,20 @@ AC_DEFUN([GNOME_INIT_HOOK],
fi
])
- AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
- if test -f $gnome_prefix/gnomeConf.sh; then
+ if test "$no_gnome_config" = "yes"; then
+ AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
+ if test -f $gnome_prefix/gnomeConf.sh; then
AC_MSG_RESULT(found)
echo "loading gnome configuration from $gnome_prefix/gnomeConf.sh"
. $gnome_prefix/gnomeConf.sh
$1
- else
+ else
AC_MSG_RESULT(not found)
if test x$2 = xfail; then
- AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
+ AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
fi
- fi
+ fi
+ fi
])
AC_DEFUN([GNOME_INIT],[