aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-support.m4
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@src.gnome.org>1998-05-20 08:10:46 +0800
committerRaja R Harinath <harinath@src.gnome.org>1998-05-20 08:10:46 +0800
commitca7b1dfcc5834b7f8c9d08efaf9be069a045c460 (patch)
treeba843ef869c272b7cfac9782a7869cfa4dc64d6c /macros/gnome-support.m4
parentfa6e14050cf0f7341c8bf40a26c2d07cbca0d052 (diff)
downloadgsoc2013-evolution-ca7b1dfcc5834b7f8c9d08efaf9be069a045c460.tar
gsoc2013-evolution-ca7b1dfcc5834b7f8c9d08efaf9be069a045c460.tar.gz
gsoc2013-evolution-ca7b1dfcc5834b7f8c9d08efaf9be069a045c460.tar.bz2
gsoc2013-evolution-ca7b1dfcc5834b7f8c9d08efaf9be069a045c460.tar.lz
gsoc2013-evolution-ca7b1dfcc5834b7f8c9d08efaf9be069a045c460.tar.xz
gsoc2013-evolution-ca7b1dfcc5834b7f8c9d08efaf9be069a045c460.tar.zst
gsoc2013-evolution-ca7b1dfcc5834b7f8c9d08efaf9be069a045c460.zip
New check. (sys_errlist): Check for this variable, needed for `strerror'.
* gnome-support.m4 (strerror): New check. (sys_errlist): Check for this variable, needed for `strerror'. (program_invocation_name, program_invocation_short_name): Change method used to check for these. svn path=/trunk/; revision=219
Diffstat (limited to 'macros/gnome-support.m4')
-rw-r--r--macros/gnome-support.m448
1 files changed, 33 insertions, 15 deletions
diff --git a/macros/gnome-support.m4 b/macros/gnome-support.m4
index afead5f833..1f6c93f7a2 100644
--- a/macros/gnome-support.m4
+++ b/macros/gnome-support.m4
@@ -38,28 +38,46 @@ AC_DEFUN([GNOME_SUPPORT_CHECKS],[
# for `scandir'
AC_HEADER_DIRENT
- 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_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_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
+
+ # copied from `configure.in' of `libiberty'
+ vars="program_invocation_short_name program_invocation_name sys_errlist"
+ for v in $vars; do
+ AC_MSG_CHECKING([for $v])
+ AC_CACHE_VAL(gnome_cv_var_$v,
+ [AC_TRY_LINK([int *p;], [extern int $v; p = &$v;],
+ [eval "gnome_cv_var_$v=yes"],
+ [eval "gnome_cv_var_$v=no"])])
+ if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($n)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ done
AC_CHECK_FUNCS(vsnprintf,,[
AC_CHECK_FUNCS(__vsnprintf,
LIBOBJS="$LIBOBJS easy-vsnprintf.o",
LIBOBJS="$LIBOBJS vsnprintf.o")])
- AC_REPLACE_FUNCS(scandir strtok_r strcasecmp strndup strnlen vasprintf)
+ AC_REPLACE_FUNCS(scandir strcasecmp strerror strndup strnlen)
+ AC_REPLACE_FUNCS(strtok_r vasprintf)
if test "$LIBOBJS" != ""; then
need_gnome_support=yes