diff options
author | Raja R Harinath <harinath@src.gnome.org> | 1998-08-02 22:23:15 +0000 |
---|---|---|
committer | Raja R Harinath <harinath@src.gnome.org> | 1998-08-02 22:23:15 +0000 |
commit | e8933c4d20b889ab6a4d96b070680cd13570e4b8 (patch) | |
tree | 43e7bd5f961ac78cd134aa560575e78cd0efb185 | |
parent | 29adbf48b22634002c6b0f5a848c84a6477370b1 (diff) | |
download | gnome-common-e8933c4d20b889ab6a4d96b070680cd13570e4b8.tar.gz |
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=317
-rw-r--r-- | macros/ChangeLog | 5 | ||||
-rw-r--r-- | macros/gnome.m4 | 38 |
2 files changed, 34 insertions, 9 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog index 9d7d4cd..ce85d51 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 aa6165f..9eac911 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],[ |