1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r8424: bring in some more of heimdals m4 macros, and remove the hard-coding of several test

results
(This used to be commit b173c938b2)
This commit is contained in:
Andrew Tridgell 2005-07-13 12:35:21 +00:00 committed by Gerald (Jerry) Carter
parent 3c079cd58d
commit 833842f0aa
2 changed files with 62 additions and 8 deletions

View File

@ -36,15 +36,7 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg }
/* these should be done with configure tests */
#define KRB5
#define HAVE_INET_ATON
#define HAVE_LONG_LONG
#define HAVE_GETHOSTNAME
#define HAVE_SOCKLEN_T
#define HAVE_GETNAMEINFO
#define HAVE_STRUCT_WINSIZE
#define HAVE_STRUCT_SOCKADDR_STORAGE
#define HAVE_STRUCT_ADDRINFO
#define HAVE_GAI_STRERROR
#include <sys/types.h>
#include <stdarg.h>

View File

@ -61,6 +61,10 @@ AC_CHECK_FUNCS([ \
atexit \
cgetent \
inet_ntop \
inet_aton \
gethostname \
getnameinfo \
gai_strerror \
iruserok \
putenv \
rcmd \
@ -93,6 +97,64 @@ love_FIND_FUNC(bswap32, [#ifdef HAVE_SYS_BSWAP_H
#endif], 0)
dnl AC_HAVE_TYPE(TYPE,INCLUDES)
AC_DEFUN([AC_HAVE_TYPE], [
AC_REQUIRE([AC_HEADER_STDC])
cv=`echo "$1" | sed 'y%./+- %__p__%'`
AC_MSG_CHECKING(for $1)
AC_CACHE_VAL([ac_cv_type_$cv],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
$2]],
[[$1 foo;]])],
[eval "ac_cv_type_$cv=yes"],
[eval "ac_cv_type_$cv=no"]))dnl
ac_foo=`eval echo \\$ac_cv_type_$cv`
AC_MSG_RESULT($ac_foo)
if test "$ac_foo" = yes; then
ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
if false; then
AC_CHECK_TYPES($1)
fi
AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
fi
])
AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>])
AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>])
AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>])
AC_HAVE_TYPE([struct sockaddr_storage], [#include <sys/socket.h>])
AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
AC_HAVE_TYPE([struct ifaddrs], [#include <ifaddrs.h>])
AC_DEFUN([AC_KRB_STRUCT_WINSIZE], [
AC_MSG_CHECKING(for struct winsize)
AC_CACHE_VAL(ac_cv_struct_winsize, [
ac_cv_struct_winsize=no
for i in sys/termios.h sys/ioctl.h; do
AC_EGREP_HEADER(
struct[[ ]]*winsize,dnl
$i, ac_cv_struct_winsize=yes; break)dnl
done
])
if test "$ac_cv_struct_winsize" = "yes"; then
AC_DEFINE(HAVE_STRUCT_WINSIZE, 1, [define if struct winsize is declared in sys/termios.h])
fi
AC_MSG_RESULT($ac_cv_struct_winsize)
AC_EGREP_HEADER(ws_xpixel, termios.h,
AC_DEFINE(HAVE_WS_XPIXEL, 1, [define if struct winsize has ws_xpixel]))
AC_EGREP_HEADER(ws_ypixel, termios.h,
AC_DEFINE(HAVE_WS_YPIXEL, 1, [define if struct winsize has ws_ypixel]))
])
AC_KRB_STRUCT_WINSIZE
AC_CHECK_DECL(h_errno,
[AC_DEFINE(HAVE_DECL_H_ERRNO,1,whether h_errno is declared)], [], [
#ifdef HAVE_SYS_TYPES_H