diff options
author | Tom Tromey <tromey@cygnus.com> | 1998-03-20 04:23:21 +0800 |
---|---|---|
committer | Tom Tromey <tromey@src.gnome.org> | 1998-03-20 04:23:21 +0800 |
commit | 8fe52111b654694b74f9ddaf0041f7693445fbe0 (patch) | |
tree | 53269284ffe4261cfc3a5024c869af041e1cbef9 | |
parent | dc8628becc1e9a03bc40dfcc7a06325d7be5cd55 (diff) | |
download | gsoc2013-evolution-8fe52111b654694b74f9ddaf0041f7693445fbe0.tar gsoc2013-evolution-8fe52111b654694b74f9ddaf0041f7693445fbe0.tar.gz gsoc2013-evolution-8fe52111b654694b74f9ddaf0041f7693445fbe0.tar.bz2 gsoc2013-evolution-8fe52111b654694b74f9ddaf0041f7693445fbe0.tar.lz gsoc2013-evolution-8fe52111b654694b74f9ddaf0041f7693445fbe0.tar.xz gsoc2013-evolution-8fe52111b654694b74f9ddaf0041f7693445fbe0.tar.zst gsoc2013-evolution-8fe52111b654694b74f9ddaf0041f7693445fbe0.zip |
Cache results of check for program_invocation_short_name,
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.
svn path=/trunk/; revision=70
-rw-r--r-- | macros/ChangeLog | 4 | ||||
-rw-r--r-- | macros/gnome-support.m4 | 30 |
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, |