summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-03-20 02:54:16 +0000
committerArturo Espinosa <unammx@src.gnome.org>1998-03-20 02:54:16 +0000
commit1058ed2bbb23ade6f0be5d2272ef880a1c602b9a (patch)
tree7b7f22667d7749933efcc846f67600d119ecb51f
parent37cc74ae13a3b8d9fe225d45b872829e6271a53c (diff)
downloadgnome-common-1058ed2bbb23ade6f0be5d2272ef880a1c602b9a.tar.gz
Weee! gmc uses the gnome.m4 macros now and detects properly gnome installation - mig
svn path=/trunk/; revision=153
-rw-r--r--macros/ChangeLog7
-rw-r--r--macros/gnome.m428
2 files changed, 30 insertions, 5 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog
index 598e046..d2e57f7 100644
--- a/macros/ChangeLog
+++ b/macros/ChangeLog
@@ -1,3 +1,10 @@
+1998-03-19 Miguel de Icaza <miguel@nuclecu.unam.mx>
+
+ * gnome.m4 (GNOME_INIT_HOOK): Provide a way to hook some code to
+ execute; Accept a probe mode.
+
+ (GNOME_INIT): Define in terms of GNOME_INIT_HOOK.
+
Thu Mar 19 00:17:46 1998 Tom Tromey <tromey@cygnus.com>
* gnome-support.m4: Cache results of check for
diff --git a/macros/gnome.m4 b/macros/gnome.m4
index 461e0b7..283745c 100644
--- a/macros/gnome.m4
+++ b/macros/gnome.m4
@@ -1,4 +1,11 @@
-AC_DEFUN([GNOME_INIT],
+dnl
+dnl GNOME_INIT_HOOK (script-if-gnome-enabled, failflag)
+dnl
+dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
+dnl is not found.
+dnl
+
+AC_DEFUN([GNOME_INIT_HOOK],
[
AC_SUBST(GNOME_LIBS)
AC_SUBST(GNOMEUI_LIBS)
@@ -29,9 +36,13 @@ AC_DEFUN([GNOME_INIT],
AC_ARG_WITH(gnome,
[ --with-gnome Specify prefix for GNOME files],[
- LDFLAGS="$LDFLAGS -L$withval/lib"
- CFLAGS="$CFLAGS -I$withval/include"
- gnome_prefix=$withval/lib
+ if test x$withval = xyes; then
+ $1
+ else
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ CFLAGS="$CFLAGS -I$withval/include"
+ gnome_prefix=$withval/lib
+ fi
])
AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
@@ -39,8 +50,15 @@ AC_DEFUN([GNOME_INIT],
AC_MSG_RESULT(found)
echo "loading gnome configuration from $gnome_prefix/gnomeConf.sh"
. $gnome_prefix/gnomeConf.sh
+ $1
else
AC_MSG_RESULT(not found)
- AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
+ if test x$2 = xfail; then
+ AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
+ fi
fi
])
+
+AC_DEFUN([GNOME_INIT],[
+ GNOME_INIT_HOOK([],fail)
+]) \ No newline at end of file