aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macros/ChangeLog4
-rw-r--r--macros/gnome-support.m430
2 files changed, 27 insertions, 7 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog
index b35b2a564b..598e046556 100644
--- a/macros/ChangeLog
+++ b/macros/ChangeLog
@@ -1,5 +1,9 @@
Thu Mar 19 00:17:46 1998 Tom Tromey <tromey@cygnus.com>
+ * gnome-support.m4: Cache results of check for
+ program_invocation_short_name, program_invocation_name. Check to
+ make sure argp functions are in a library.
+
* gnome-support.m4: Cache results of argp check.
Sun Mar 15 15:54:43 1998 Owen Taylor <owt1@cornell.edu>
diff --git a/macros/gnome-support.m4 b/macros/gnome-support.m4
index d309f6deaf..c2b28b458c 100644
--- a/macros/gnome-support.m4
+++ b/macros/gnome-support.m4
@@ -20,7 +20,14 @@ AC_DEFUN([GNOME_SUPPORT_CHECKS],[
extern char *foo2;
foo.argp_domain = foo2;],
gnome_cv_argp=yes,
- gnome_cv_argp=no)])
+ gnome_cv_argp=no)
+
+ # It is possible to have the argp headers installed but not have
+ # the code in the C library. At least, there have been reports of
+ # this happening. So we check for this case explicitly.
+ if test "$gnome_cv_argp" = yes; then
+ AC_CHECK_FUNC(argp_parse,,gnome_cv_argp=no)
+ fi])
if test "$gnome_cv_argp" = no; then
LIBOBJS="$LIBOBJS argp-ba.o argp-eexst.o argp-fmtstream.o argp-fs-xinl.o argp-help.o argp-parse.o argp-pv.o argp-pvh.o argp-xinl.o"
@@ -29,12 +36,21 @@ AC_DEFUN([GNOME_SUPPORT_CHECKS],[
# This header enables some optimizations inside argp.
AC_CHECK_HEADERS(linewrap.h)
- AC_TRY_LINK([#include <errno.h>],[
- char *foo = program_invocation_short_name], [
- AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME)])
- AC_TRY_LINK([#include <errno.h>],[
- char *foo = program_invocation_name], [
- AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME)])
+ AC_CACHE_CHECK([for program_invocation_short_name], gnome_cv_short_name, [
+ AC_TRY_LINK([#include <errno.h>],[
+ char *foo = program_invocation_short_name],
+ gnome_cv_short_name=yes, gnome_cv_short_name=no)])
+ if test "$gnome_cv_short_name" = yes; then
+ AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME)
+ fi
+
+ AC_CACHE_CHECK([for program_invocation_name], gnome_cv_invocation_name, [
+ AC_TRY_LINK([#include <errno.h>],[
+ char *foo = program_invocation_name],
+ gnome_cv_invocation_name=yes, gnome_cv_invocation_name=no)])
+ if test "$gnome_cv_invocation_name" = yes; then
+ AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME)
+ fi
AC_CHECK_FUNCS(vsnprintf,,[
AC_CHECK_FUNCS(__vsnprintf,