replace AC_CHECK_DECLARATION with standard AC_CHECK_DECL(S)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14171 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,23 +0,0 @@
|
|||||||
dnl $Id$
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
dnl Check if we need the declaration of a variable
|
|
||||||
dnl
|
|
||||||
|
|
||||||
dnl AC_HAVE_DECLARATION(includes, variable)
|
|
||||||
AC_DEFUN([AC_CHECK_DECLARATION], [
|
|
||||||
AC_MSG_CHECKING([if $2 is properly declared])
|
|
||||||
AC_CACHE_VAL(ac_cv_var_$2_declaration, [
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[$1
|
|
||||||
extern struct { int foo; } $2;]],[[$2.foo = 1;]])],
|
|
||||||
[eval "ac_cv_var_$2_declaration=no"],
|
|
||||||
[eval "ac_cv_var_$2_declaration=yes"])])
|
|
||||||
|
|
||||||
define(foo, [HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION])
|
|
||||||
|
|
||||||
AC_MSG_RESULT($ac_cv_var_$2_declaration)
|
|
||||||
if eval "test \"\$ac_cv_var_$2_declaration\" = yes"; then
|
|
||||||
AC_DEFINE(foo, 1, [define if your system declares $2])
|
|
||||||
fi
|
|
||||||
undefine([foo])
|
|
||||||
])
|
|
@@ -19,7 +19,7 @@ AC_MSG_RESULT($ac_foo)
|
|||||||
if test "$ac_foo" = yes; then
|
if test "$ac_foo" = yes; then
|
||||||
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1,
|
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1,
|
||||||
[Define if you have the `]$1[' variable.])
|
[Define if you have the `]$1[' variable.])
|
||||||
m4_ifval([$2], AC_CHECK_DECLARATION([$2],[$1]))
|
m4_ifval([$2], AC_CHECK_DECL([$1],[],[],[$2]))
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@@ -611,24 +611,11 @@ rk_CHECK_VAR([__progname],
|
|||||||
#include <err.h>
|
#include <err.h>
|
||||||
#endif])
|
#endif])
|
||||||
|
|
||||||
AC_CHECK_DECLARATION([#include <stdlib.h>
|
AC_CHECK_DECLS([optarg, optind, opterr, optopt, environ],[],[][
|
||||||
|
#include <stdlib.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif], optarg)
|
#endif])
|
||||||
AC_CHECK_DECLARATION([#include <stdlib.h>
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif], optind)
|
|
||||||
AC_CHECK_DECLARATION([#include <stdlib.h>
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif], opterr)
|
|
||||||
AC_CHECK_DECLARATION([#include <stdlib.h>
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif], optopt)
|
|
||||||
|
|
||||||
AC_CHECK_DECLARATION([#include <stdlib.h>], environ)
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Check for fields in struct tm
|
dnl Check for fields in struct tm
|
||||||
|
Reference in New Issue
Block a user