aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-support.m4
diff options
context:
space:
mode:
authorTom Tromey <tromey@cygnus.com>1998-03-20 04:23:21 +0800
committerTom Tromey <tromey@src.gnome.org>1998-03-20 04:23:21 +0800
commit8fe52111b654694b74f9ddaf0041f7693445fbe0 (patch)
tree53269284ffe4261cfc3a5024c869af041e1cbef9 /macros/gnome-support.m4
parentdc8628becc1e9a03bc40dfcc7a06325d7be5cd55 (diff)
downloadgsoc2013-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
Diffstat (limited to 'macros/gnome-support.m4')
-rw-r--r--macros/gnome-support.m430
1 files changed, 23 insertions, 7 deletions
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,