From: Ken Raeburn Date: Fri, 13 May 2005 06:38:13 +0000 (+0000) Subject: * configure.in: Merged content from include/configure.in. Don't configure X-Git-Tag: ms-bug-test-20060525~255 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6c2ed716538c24fca22578f39b16eb4da499ddb1;p=krb5.git * configure.in: Merged content from include/configure.in. Don't configure include directory any more; build its makefiles and autoconf.h directly. Provide comment template when defining C macros. * include/configure.in: Deleted, content merged into ../configure.in. * include/Makefile.in (thisconfigdir, mydir): Updated for configure change. ($(srcdir)/krb5/autoconf.stmp): Use $(thisconfigdir) when locating configure.in and autom4te.cache. * include/kerberosIV/Makefile.in (thisconfigdir, mydir): Updated for configure change. * include/krb5/Makefile.in (thisconfigdir, mydir): Updated for configure change. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17217 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index a1f138fb2..65ef9c995 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,6 +6,11 @@ (KRB5_GETSOCKNAME_ARGS): Likewise. Only define the macros in one place. + * configure.in: Merged content from include/configure.in. Don't + configure include directory any more; build its makefiles and + autoconf.h directly. Provide comment template when defining C + macros. + 2005-04-19 Ken Raeburn * aclocal.m4 (fileexists, K5_TOPDIR): New macros. diff --git a/src/configure.in b/src/configure.in index 26c48d3f0..c2115bbcb 100644 --- a/src/configure.in +++ b/src/configure.in @@ -59,7 +59,7 @@ KRB5_AC_NEED_DAEMON KRB5_GETSOCKNAME_ARGS KRB5_GETPEERNAME_ARGS LIBUTIL= -AC_CHECK_LIB(util,main,[AC_DEFINE(HAVE_LIBUTIL) +AC_CHECK_LIB(util,main,[AC_DEFINE(HAVE_LIBUTIL,1,[Define if the util library is available]) LIBUTIL=-lutil ]) AC_SUBST(LIBUTIL) @@ -85,7 +85,7 @@ AC_ARG_WITH([vague-errors], AC_HELP_STRING([--with-vague-errors],[Do not @<:@do@:>@ send helpful errors to client]), , withval=no)dnl if test "$withval" = yes; then AC_MSG_RESULT(Supplying vague error messages to KDC clients) - AC_DEFINE(KRBCONF_VAGUE_ERRORS) + AC_DEFINE(KRBCONF_VAGUE_ERRORS,1,[Define if the KDC should return only vague error codes to clients]) fi dnl dnl --with-kdc-kdb-update makes the KDC update the database with last request @@ -95,7 +95,7 @@ AC_ARG_WITH([kdc-kdb-update], AC_HELP_STRING([--with-kdc-kdb-update],[Update the database @<:@don't update@:>@]), , withval=no)dnl if test "$withval" = yes; then AC_MSG_RESULT(Updating KDC database with each request) - AC_DEFINE(KRBCONF_KDC_MODIFIES_KDB) + AC_DEFINE(KRBCONF_KDC_MODIFIES_KDB,1,[Define if KDC should update database with each request]) fi dnl dnl Needed for hw-preauth replay detection on KDC. @@ -113,9 +113,9 @@ dnl AC_ARG_ENABLE([kdc-replay-cache], AC_HELP_STRING([--enable-kdc-replay-cache],[check for replayed/retransmitted KDC requests (recommended when hardware preauthentication is in use) @<:@disabled@:>@]), , enableval=yes)dnl if test "$enableval" = yes ; then - AC_DEFINE(USE_RCACHE) + AC_DEFINE(USE_RCACHE,1,[Define if the KDC should use a replay cache]) else - AC_DEFINE(NOCACHE) + AC_DEFINE(NOCACHE,1,[Define if the KDC should use no replay cache]) fi AC_ARG_ENABLE([fakeka], AC_HELP_STRING([--enable-fakeka],[build the Fake KA server (emulates an AFS kaserver) @<:@default: don't build@:>@]), , enableval=no)dnl @@ -130,6 +130,353 @@ dnl dnl for krb524 AC_TYPE_SIGNAL dnl +dnl from old include/configure.in +AH_TEMPLATE([HAVE_STRUCT_SOCKADDR_STORAGE], +[Define if "struct sockaddr_storage" is available.]) +dnl +AC_CONFIG_HEADER(include/krb5/autoconf.h) +AC_PROG_INSTALL +AC_PROG_AWK +AC_PROG_LEX +AC_C_CONST +AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid setreuid setegid setresgid setregid setsid flock fchmod chmod strftime strptime geteuid setenv unsetenv getenv gethostbyname2 getifaddrs gmtime_r localtime_r pthread_mutex_lock sched_yield dlopen) +AC_CHECK_FUNCS( mkstemp) +AC_HEADER_STDARG +AC_CHECK_HEADERS(unistd.h paths.h regex.h regexp.h regexpr.h fcntl.h memory.h ifaddrs.h sys/filio.h sched.h) +dnl +dnl Check what the return types for gethostbyname_r and getservbyname_r are. +dnl +AC_CHECK_FUNC(gethostbyname_r,[ +ac_cv_func_gethostbyname_r=yes +if test "$ac_cv_func_gethostbyname_r" = yes; then + AC_MSG_CHECKING([if gethostbyname_r returns an int]) + AC_CACHE_VAL(krb5_cv_gethostbyname_r_returns_int, + [AC_TRY_COMPILE([#include + extern int gethostbyname_r ();], [1;], + krb5_cv_gethostbyname_r_returns_int=yes, + krb5_cv_gethostbyname_r_returns_int=no)]) + AC_MSG_RESULT($krb5_cv_gethostbyname_r_returns_int) + + AC_MSG_CHECKING([if gethostbyname_r returns a pointer]) + AC_CACHE_VAL(krb5_cv_gethostbyname_r_returns_ptr, + [AC_TRY_COMPILE([#include + extern struct hostent *gethostbyname_r ();], [1;], + krb5_cv_gethostbyname_r_returns_ptr=yes, + krb5_cv_gethostbyname_r_returns_ptr=no)]) + AC_MSG_RESULT($krb5_cv_gethostbyname_r_returns_ptr) + + if test "$krb5_cv_gethostbyname_r_returns_int" = "$krb5_cv_gethostbyname_r_returns_ptr"; then + AC_MSG_WARN(cannot determine return type of gethostbyname_r -- disabling) + ac_cv_func_gethostbyname_r=no + fi + if test "$krb5_cv_gethostbyname_r_returns_int" = yes; then + AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT, 1, [Define if gethostbyname_r returns int rather than struct hostent * ]) + fi +fi +if test "$ac_cv_func_gethostbyname_r" = yes; then + AC_DEFINE(HAVE_GETHOSTBYNAME_R, 1, [Define if gethostbyname_r exists and its return type is known]) + AC_CHECK_FUNC(gethostbyaddr_r) +fi +]) +dnl + +AC_CHECK_FUNC(getpwnam_r,ac_cv_func_getpwnam_r=yes,ac_cv_func_getpwnam_r=no) +AC_CHECK_FUNC(getpwuid_r,ac_cv_func_getpwuid_r=yes,ac_cv_func_getpwuid_r=no) +if test "$ac_cv_func_getpwnam_r" = yes; then + AC_MSG_CHECKING([return type of getpwnam_r]) + AC_CACHE_VAL(krb5_cv_getpwnam_r_return_type, + [AC_TRY_COMPILE([#include + extern int getpwnam_r();], [1;], + getpwnam_r_returns_int=yes,getpwnam_r_returns_int=no) + AC_TRY_COMPILE([#include + extern struct passwd *getpwnam_r();], [1;], + getpwnam_r_returns_ptr=yes,getpwnam_r_returns_ptr=no) + case "$getpwnam_r_returns_int/$getpwnam_r_returns_ptr" in + yes/no) krb5_cv_getpwnam_r_return_type=int ;; + no/yes) krb5_cv_getpwnam_r_return_type=ptr ;; + *) krb5_cv_getpwnam_r_return_type=unknown ;; + esac]) + AC_MSG_RESULT($krb5_cv_getpwnam_r_return_type) + if test $krb5_cv_getpwnam_r_return_type = int; then + AC_DEFINE(GETPWNAM_R_RETURNS_INT, 1, [Define if getpwnam_r returns an int]) + elif test $krb5_cv_getpwnam_r_return_type = unknown; then + AC_MSG_WARN([Cannot determine getpwnam_r return type, disabling getpwnam_r]) + ac_cv_func_getpwnam_r=no + fi +fi +if test "$ac_cv_func_getpwnam_r" = yes; then + AC_MSG_CHECKING([number of arguments to getpwnam_r]) + AC_CACHE_VAL(krb5_cv_getpwnam_r_args, + [AC_TRY_COMPILE([#include + struct passwd pwx; char buf[1024];], + [getpwnam_r("", &pwx, buf, sizeof(buf));], args4=yes, args4=no) + AC_TRY_COMPILE([#include + struct passwd pwx, *p; char buf[1024];], + [getpwnam_r("", &pwx, buf, sizeof(buf), &p);], args5=yes, args5=no) + case $args4/$args5 in + yes/no) krb5_cv_getpwnam_r_args=4 ;; + no/yes) krb5_cv_getpwnam_r_args=5 ;; + *) krb5_cv_getpwnam_r_args=unknown ;; + esac]) + AC_MSG_RESULT($krb5_cv_getpwnam_r_args) + if test "$krb5_cv_getpwnam_r_args" = unknown; then + AC_MSG_WARN([Cannot determine number of arguments to getpwnam_r, disabling its use.]) + ac_cv_func_getpwnam_r=no + else + AC_DEFINE(HAVE_GETPWNAM_R,1,[Define if getpwnam_r is available and useful.]) + if test "$krb5_cv_getpwnam_r_args" = 4; then + AC_DEFINE(GETPWNAM_R_4_ARGS,1,[Define if getpwnam_r exists but takes only 4 arguments (e.g., POSIX draft 6 implementations like some Solaris releases).]) + fi + fi +fi + +if test "$ac_cv_func_getpwnam_r" = no && test "$ac_cv_func_getpwuid_r" = yes; then + # Actually, we could do this check, and the corresponding checks + # for return type and number of arguments, but I doubt we'll run + # into a system where we'd get to use getpwuid_r but not getpwnam_r. + AC_MSG_NOTICE([getpwnam_r not useful, so disabling getpwuid_r too]) + ac_cv_func_getpwuid_r=no +fi +if test "$ac_cv_func_getpwuid_r" = yes; then + AC_DEFINE(HAVE_GETPWUID_R,1,[Define if getpwuid_r is available and useful.]) + # Hack: Assume getpwuid_r is the shorter form if getpwnam_r is. + if test "$krb5_cv_getpwnam_r_args" = 4; then + AC_DEFINE(GETPWUID_R_4_ARGS,1,[Define if getpwuid_r exists but takes only 4 arguments (e.g., POSIX draft 6 implementations like some Solaris releases).]) + fi +fi + +if test "$ac_cv_func_gmtime_r" = yes; then + AC_MSG_CHECKING([whether gmtime_r returns int]) + AC_CACHE_VAL(krb5_cv_gmtime_r_returns_int, + [AC_TRY_COMPILE([#include + extern int gmtime_r ();], [1;], return_int=yes, return_int=no) + AC_TRY_COMPILE([#include + extern struct tm *gmtime_r ();], [1;], return_ptr=yes, return_ptr=no) + case $return_int/$return_ptr in + yes/no) krb5_cv_gmtime_r_returns_int=yes ;; + no/yes) krb5_cv_gmtime_r_returns_int=no ;; + *) # Can't figure it out, punt the function. + ac_cv_func_gmtime_r=no ;; + esac]) + if test "$ac_cv_func_gmtime_r" = no; then + AC_MSG_RESULT(unknown -- ignoring gmtime_r) + else + AC_MSG_RESULT($krb5_cv_gmtime_r_returns_int) + if test "$krb5_cv_gmtime_r_returns_int" = yes; then + AC_DEFINE(GMTIME_R_RETURNS_INT,1,[Define if gmtime_r returns int instead of struct tm pointer, as on old HP-UX systems.]) + fi + fi +fi + +AC_CHECK_FUNC(getservbyname_r,[ +ac_cv_func_getservbyname_r=yes +if test "$ac_cv_func_getservbyname_r" = yes; then + AC_MSG_CHECKING([if getservbyname_r returns an int]) + AC_CACHE_VAL(krb5_cv_getservbyname_r_returns_int, + [AC_TRY_COMPILE([#include + extern int getservbyname_r ();], [1;], + krb5_cv_getservbyname_r_returns_int=yes, + krb5_cv_getservbyname_r_returns_int=no)]) + AC_MSG_RESULT($krb5_cv_getservbyname_r_returns_int) + + AC_MSG_CHECKING([if getservbyname_r returns a pointer]) + AC_CACHE_VAL(krb5_cv_getservbyname_r_returns_ptr, + [AC_TRY_COMPILE([#include + extern struct servent *getservbyname_r ();], [1;], + krb5_cv_getservbyname_r_returns_ptr=yes, + krb5_cv_getservbyname_r_returns_ptr=no)]) + AC_MSG_RESULT($krb5_cv_getservbyname_r_returns_ptr) + + if test "$krb5_cv_getservbyname_r_returns_int" = "$krb5_cv_getservbyname_r_returns_ptr"; then + AC_MSG_WARN(cannot determine return type of getservbyname_r -- disabling) + ac_cv_func_getservbyname_r=no + fi + if test "$krb5_cv_getservbyname_r_returns_int" = yes; then + AC_DEFINE(GETSERVBYNAME_R_RETURNS_INT, 1, [Define if getservbyname_r returns int rather than struct servent * ]) + fi +fi +if test "$ac_cv_func_getservbyname_r" = yes; then + AC_DEFINE(HAVE_GETSERVBYNAME_R, 1, [Define if getservbyname_r exists and its return type is known]) + AC_CHECK_FUNC(getservbyport_r) +fi +]) +dnl +HAVE_YYLINENO +CHECK_DIRENT +AC_TYPE_UID_T +AC_TYPE_MODE_T +dnl +AC_CHECK_HEADER(termios.h,dnl +[AC_CHECK_FUNC([tcsetattr],dnl + AC_DEFINE(POSIX_TERMIOS,1,[Define if termios.h exists and tcsetattr exists]))]) +dnl +KRB5_SIGTYPE +AC_CHECK_HEADERS(stdlib.h string.h stddef.h unistd.h sys/types.h sys/file.h sys/param.h sys/stat.h sys/time.h netinet/in.h sys/uio.h sys/filio.h sys/select.h time.h paths.h) +AC_HEADER_STDARG +KRB5_AC_INET6 +dnl +dnl If compiling with IPv6 support, test if in6addr_any functions. +dnl Irix 6.5.16 defines it, but lacks support in the C library. +if test $krb5_cv_inet6 = yes || test "$krb5_cv_inet6_with_dinet6" = yes ; then +AC_CACHE_CHECK([for in6addr_any definition in library], + krb5_cv_var_in6addr_any, +[AC_TRY_LINK([ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#include +#include +#include +],[ + struct sockaddr_in6 in; + in.sin6_addr = in6addr_any; + printf("%x", &in); +],krb5_cv_var_in6addr_any=yes, krb5_cv_var_in6addr_any=no)]) + if test $krb5_cv_var_in6addr_any = no; then + AC_DEFINE(NEED_INSIXADDR_ANY,1,[Define if in6addr_any is not defined in libc]) + fi +fi + +dnl +dnl +dnl check for ANSI stdio, esp "b" option to fopen(). This (unfortunately) +dnl requires a run check... +dnl +AC_MSG_CHECKING([for ANSI stdio]) +AC_CACHE_VAL(krb5_cv_has_ansi_stdio, +[AC_TRY_RUN( +[#include +int main() +{ + FILE *conftest; + if ((conftest = fopen("conftest.dat", "w")) == NULL) exit(1); + if (fclose(conftest)) exit(1); + if ((conftest = fopen("conftest.dat", "rb+")) == NULL) exit(1); + if (fputs("testing ANSI for stdio\n", conftest) == EOF) exit(1); + exit(0); +}], +krb5_cv_has_ansi_stdio=yes, krb5_cv_has_ansi_stdio=no, +krb5_cv_has_ansi_stdio=yes)])dnl assume ANSI in cross environment +AC_MSG_RESULT($krb5_cv_has_ansi_stdio) +if test $krb5_cv_has_ansi_stdio = yes; then +AC_DEFINE(ANSI_STDIO,1,[Define if ANSI stdio is present (in particular "b" option to fopen)]) +fi +dnl +dnl Word sizes... +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) +dnl +dnl then from osconf.h, we have +dnl +AC_HEADER_TIME +AC_CHECK_TYPE(time_t, long) +dnl +dnl Determine where to put the replay cache. +dnl +AC_MSG_CHECKING([for replay cache directory]) +AC_CACHE_VAL(krb5_cv_sys_rcdir, +[ +for t_dir in /var/tmp /usr/tmp /var/usr/tmp /tmp ; do + test -d $t_dir || continue + krb5_cv_sys_rcdir=$t_dir + break +done])dnl +AC_MSG_RESULT($krb5_cv_sys_rcdir) +KRB5_RCTMPDIR=$krb5_cv_sys_rcdir +AC_SUBST(KRB5_RCTMPDIR) +dnl +dnl +AC_MSG_CHECKING(for socklen_t) +AC_CACHE_VAL(krb5_cv_has_type_socklen_t, +[AC_TRY_COMPILE( +[#include +#include +],[sizeof (socklen_t);], +krb5_cv_has_type_socklen_t=yes,krb5_cv_has_type_socklen_t=no)]) +AC_MSG_RESULT($krb5_cv_has_type_socklen_t) +if test $krb5_cv_has_type_socklen_t = yes; then + AC_DEFINE(HAVE_SOCKLEN_T,1,[Define if there is a socklen_t type. If not, probably use size_t]) +fi +dnl +AC_MSG_CHECKING(for struct lifconf) +AC_CACHE_VAL(krb5_cv_has_struct_lifconf, +[AC_TRY_COMPILE( +[#include +#include +],[sizeof (struct lifconf);], +krb5_cv_has_struct_lifconf=yes,krb5_cv_has_struct_lifconf=no)]) +AC_MSG_RESULT($krb5_cv_has_struct_lifconf) +if test $krb5_cv_has_struct_lifconf = yes; then + AC_DEFINE(HAVE_STRUCT_LIFCONF,1,[Define if there is a struct lifconf.]) +fi +dnl HP-UX 11 uses stuct if_laddrconf +AC_MSG_CHECKING(for struct if_laddrconf) +AC_CACHE_VAL(krb5_cv_has_struct_if_laddrconf, +[AC_TRY_COMPILE( +[#include +#include +#include +],[sizeof (struct if_laddrconf);], +krb5_cv_has_struct_if_laddrconf=yes,krb5_cv_has_struct_if_laddrconf=no)]) +AC_MSG_RESULT($krb5_cv_has_struct_if_laddrconf) +if test $krb5_cv_has_struct_if_laddrconf = yes; then + AC_DEFINE(HAVE_STRUCT_IF_LADDRCONF,1,[Define if there is a struct if_laddrconf.]) +fi +dnl +dnl +AC_MSG_CHECKING([for h_errno in netdb.h]) +AC_CACHE_VAL(krb5_cv_header_netdb_h_h_errno, +[AC_TRY_COMPILE( + [#include ], + [int x = h_errno;], krb5_cv_header_netdb_h_h_errno=yes, + krb5_cv_header_netdb_h_h_errno=no)]) +AC_MSG_RESULT($krb5_cv_header_netdb_h_h_errno) +if test $krb5_cv_header_netdb_h_h_errno = yes; then + AC_DEFINE([HAVE_NETDB_H_H_ERRNO], 1, + [Define if netdb.h declares h_errno]) +fi +dnl +dnl +AC_ARG_ENABLE([athena], +[ --enable-athena build with MIT Project Athena configuration], +AC_DEFINE(KRB5_ATHENA_COMPAT,1,[Define if MIT Project Athena default configuration should be used]),) + +if test "$KRB4_LIB" = ''; then + AC_MSG_NOTICE(No Kerberos 4 compatibility) + maybe_kerberosIV= +else + AC_MSG_NOTICE(Kerberos 4 compatibility enabled) + maybe_kerberosIV=kerberosIV + AC_DEFINE(KRB5_KRB4_COMPAT,1,[Define if Kerberos V4 backwards compatibility should be supported]) +fi +AC_SUBST(maybe_kerberosIV) +dnl +AC_C_INLINE +AH_TOP([ +#ifndef KRB5_AUTOCONF_H +]) +AH_BOTTOM([ +#if defined(__GNUC__) && !defined(inline) +/* Silence gcc pedantic warnings about ANSI C. */ +# define inline __inline__ +#endif + +#define KRB5_AUTOCONF_H +#endif +]) +dnl +dnl Not used yet, but let's find out what we've got on the platforms +dnl we're working with.... +AC_CHECK_HEADERS(inttypes.h stdint.h) +AC_CHECK_TYPES([uint32_t, int32_t, uint64_t, int64_t, uint_least32_t, uintptr_t, uintmax_t, long long], , , [ +#ifdef HAVE_STDINT_H +# include +#elif defined(HAVE_INTTYPES_H) +# include +#endif +]) +dnl dnl dnl Check for thread safety issues. dnl (Is there a better place for this?) @@ -174,7 +521,7 @@ AC_CONFIG_SUBDIRS(util/profile util/pty) if test "$DB_VERSION" = k5 ; then AC_CONFIG_SUBDIRS(util/db2) fi -AC_CONFIG_SUBDIRS(include lib/crypto lib/krb5 lib/des425 lib/apputils) +AC_CONFIG_SUBDIRS(lib/crypto lib/krb5 lib/des425 lib/apputils) if test -n "$KRB4_LIB"; then AC_CONFIG_SUBDIRS(lib/krb4) fi @@ -185,4 +532,4 @@ dnl fi AC_CONFIG_SUBDIRS(kadmin clients appl tests) AC_CONFIG_FILES(krb5-config, [chmod +x krb5-config]) -V5_AC_OUTPUT_MAKEFILE(. util util/support util/send-pr lib kdc slave krb524 config-files gen-manpages) +V5_AC_OUTPUT_MAKEFILE(. util util/support util/send-pr lib kdc slave krb524 config-files gen-manpages include include/krb5 include/kerberosIV) diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 64e8de6f7..60ee43c87 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,11 @@ +2005-05-13 Ken Raeburn + + * configure.in: Deleted, content merged into ../configure.in. + * Makefile.in (thisconfigdir, mydir): Updated for configure + change. + ($(srcdir)/krb5/autoconf.stmp): Use $(thisconfigdir) when + locating configure.in and autom4te.cache. + 2005-04-28 Ken Raeburn * k5-int.h: Include fcntl.h only if HAVE_FCNTL_H is defined. diff --git a/src/include/Makefile.in b/src/include/Makefile.in index d0550c0d1..dcd86a26f 100644 --- a/src/include/Makefile.in +++ b/src/include/Makefile.in @@ -1,6 +1,6 @@ -thisconfigdir=. +thisconfigdir=.. myfulldir=include -mydir=. +mydir=include LOCAL_SUBDIRS=krb5 @maybe_kerberosIV@ BUILDTOP=$(REL).. ##DOSBUILDTOP = .. @@ -27,11 +27,11 @@ all-recurse: krb5/autoconf.h krb5/autoconf.h: $(srcdir)/krb5/autoconf.h.in (cd krb5; $(MAKE) autoconf.h) $(srcdir)/krb5/autoconf.h.in: @MAINT@ $(srcdir)/krb5/autoconf.stmp -$(srcdir)/krb5/autoconf.stmp: $(srcdir)/configure.in $(SRCTOP)/aclocal.m4 - $(RM) -r $(srcdir)/autom4te.cache - cd $(srcdir) && $(AUTOHEADER) --include=$(CONFIG_RELTOPDIR) $(AUTOHEADERFLAGS) +$(srcdir)/krb5/autoconf.stmp: $(srcdir)/$(thisconfigdir)/configure.in $(SRCTOP)/aclocal.m4 + $(RM) -r $(srcdir)/$(thisconfigdir)/autom4te.cache + cd $(srcdir)/$(thisconfigdir) && $(AUTOHEADER) --include=$(CONFIG_RELTOPDIR) $(AUTOHEADERFLAGS) touch $(srcdir)/krb5/autoconf.stmp - $(RM) -r $(srcdir)/autom4te.cache + $(RM) -r $(srcdir)/$(thisconfigdir)/autom4te.cache krb5.h: krb5/autoconf.h $(srcdir)/krb5.hin krb5_err.h kdb5_err.h kv5m_err.h krb524_err.h \ asn1_err.h diff --git a/src/include/configure.in b/src/include/configure.in deleted file mode 100644 index 5a24e1b92..000000000 --- a/src/include/configure.in +++ /dev/null @@ -1,350 +0,0 @@ -AC_INIT(configure.in) -CONFIG_RULES -dnl -AH_TEMPLATE([HAVE_STRUCT_SOCKADDR_STORAGE], -[Define if "struct sockaddr_storage" is available.]) -dnl -AC_CONFIG_HEADER(krb5/autoconf.h) -AC_PROG_INSTALL -AC_PROG_AWK -AC_PROG_LEX -AC_C_CONST -AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid setreuid setegid setresgid setregid setsid flock fchmod chmod strftime strptime geteuid setenv unsetenv getenv gethostbyname2 getifaddrs gmtime_r localtime_r pthread_mutex_lock sched_yield dlopen) -AC_CHECK_FUNCS( mkstemp) -AC_HEADER_STDARG -AC_CHECK_HEADERS(unistd.h paths.h regex.h regexp.h regexpr.h fcntl.h memory.h ifaddrs.h sys/filio.h sched.h) -dnl -dnl Check what the return types for gethostbyname_r and getservbyname_r are. -dnl -AC_CHECK_FUNC(gethostbyname_r,[ -ac_cv_func_gethostbyname_r=yes -if test "$ac_cv_func_gethostbyname_r" = yes; then - AC_MSG_CHECKING([if gethostbyname_r returns an int]) - AC_CACHE_VAL(krb5_cv_gethostbyname_r_returns_int, - [AC_TRY_COMPILE([#include - extern int gethostbyname_r ();], [1;], - krb5_cv_gethostbyname_r_returns_int=yes, - krb5_cv_gethostbyname_r_returns_int=no)]) - AC_MSG_RESULT($krb5_cv_gethostbyname_r_returns_int) - - AC_MSG_CHECKING([if gethostbyname_r returns a pointer]) - AC_CACHE_VAL(krb5_cv_gethostbyname_r_returns_ptr, - [AC_TRY_COMPILE([#include - extern struct hostent *gethostbyname_r ();], [1;], - krb5_cv_gethostbyname_r_returns_ptr=yes, - krb5_cv_gethostbyname_r_returns_ptr=no)]) - AC_MSG_RESULT($krb5_cv_gethostbyname_r_returns_ptr) - - if test "$krb5_cv_gethostbyname_r_returns_int" = "$krb5_cv_gethostbyname_r_returns_ptr"; then - AC_MSG_WARN(cannot determine return type of gethostbyname_r -- disabling) - ac_cv_func_gethostbyname_r=no - fi - if test "$krb5_cv_gethostbyname_r_returns_int" = yes; then - AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT, 1, [Define if gethostbyname_r returns int rather than struct hostent * ]) - fi -fi -if test "$ac_cv_func_gethostbyname_r" = yes; then - AC_DEFINE(HAVE_GETHOSTBYNAME_R, 1, [Define if gethostbyname_r exists and its return type is known]) - AC_CHECK_FUNC(gethostbyaddr_r) -fi -]) -dnl - -AC_CHECK_FUNC(getpwnam_r,ac_cv_func_getpwnam_r=yes,ac_cv_func_getpwnam_r=no) -AC_CHECK_FUNC(getpwuid_r,ac_cv_func_getpwuid_r=yes,ac_cv_func_getpwuid_r=no) -if test "$ac_cv_func_getpwnam_r" = yes; then - AC_MSG_CHECKING([return type of getpwnam_r]) - AC_CACHE_VAL(krb5_cv_getpwnam_r_return_type, - [AC_TRY_COMPILE([#include - extern int getpwnam_r();], [1;], - getpwnam_r_returns_int=yes,getpwnam_r_returns_int=no) - AC_TRY_COMPILE([#include - extern struct passwd *getpwnam_r();], [1;], - getpwnam_r_returns_ptr=yes,getpwnam_r_returns_ptr=no) - case "$getpwnam_r_returns_int/$getpwnam_r_returns_ptr" in - yes/no) krb5_cv_getpwnam_r_return_type=int ;; - no/yes) krb5_cv_getpwnam_r_return_type=ptr ;; - *) krb5_cv_getpwnam_r_return_type=unknown ;; - esac]) - AC_MSG_RESULT($krb5_cv_getpwnam_r_return_type) - if test $krb5_cv_getpwnam_r_return_type = int; then - AC_DEFINE(GETPWNAM_R_RETURNS_INT, 1, [Define if getpwnam_r returns an int]) - elif test $krb5_cv_getpwnam_r_return_type = unknown; then - AC_MSG_WARN([Cannot determine getpwnam_r return type, disabling getpwnam_r]) - ac_cv_func_getpwnam_r=no - fi -fi -if test "$ac_cv_func_getpwnam_r" = yes; then - AC_MSG_CHECKING([number of arguments to getpwnam_r]) - AC_CACHE_VAL(krb5_cv_getpwnam_r_args, - [AC_TRY_COMPILE([#include - struct passwd pwx; char buf[1024];], - [getpwnam_r("", &pwx, buf, sizeof(buf));], args4=yes, args4=no) - AC_TRY_COMPILE([#include - struct passwd pwx, *p; char buf[1024];], - [getpwnam_r("", &pwx, buf, sizeof(buf), &p);], args5=yes, args5=no) - case $args4/$args5 in - yes/no) krb5_cv_getpwnam_r_args=4 ;; - no/yes) krb5_cv_getpwnam_r_args=5 ;; - *) krb5_cv_getpwnam_r_args=unknown ;; - esac]) - AC_MSG_RESULT($krb5_cv_getpwnam_r_args) - if test "$krb5_cv_getpwnam_r_args" = unknown; then - AC_MSG_WARN([Cannot determine number of arguments to getpwnam_r, disabling its use.]) - ac_cv_func_getpwnam_r=no - else - AC_DEFINE(HAVE_GETPWNAM_R,1,[Define if getpwnam_r is available and useful.]) - if test "$krb5_cv_getpwnam_r_args" = 4; then - AC_DEFINE(GETPWNAM_R_4_ARGS,1,[Define if getpwnam_r exists but takes only 4 arguments (e.g., POSIX draft 6 implementations like some Solaris releases).]) - fi - fi -fi - -if test "$ac_cv_func_getpwnam_r" = no && test "$ac_cv_func_getpwuid_r" = yes; then - # Actually, we could do this check, and the corresponding checks - # for return type and number of arguments, but I doubt we'll run - # into a system where we'd get to use getpwuid_r but not getpwnam_r. - AC_MSG_NOTICE([getpwnam_r not useful, so disabling getpwuid_r too]) - ac_cv_func_getpwuid_r=no -fi -if test "$ac_cv_func_getpwuid_r" = yes; then - AC_DEFINE(HAVE_GETPWUID_R,1,[Define if getpwuid_r is available and useful.]) - # Hack: Assume getpwuid_r is the shorter form if getpwnam_r is. - if test "$krb5_cv_getpwnam_r_args" = 4; then - AC_DEFINE(GETPWUID_R_4_ARGS,1,[Define if getpwuid_r exists but takes only 4 arguments (e.g., POSIX draft 6 implementations like some Solaris releases).]) - fi -fi - -if test "$ac_cv_func_gmtime_r" = yes; then - AC_MSG_CHECKING([whether gmtime_r returns int]) - AC_CACHE_VAL(krb5_cv_gmtime_r_returns_int, - [AC_TRY_COMPILE([#include - extern int gmtime_r ();], [1;], return_int=yes, return_int=no) - AC_TRY_COMPILE([#include - extern struct tm *gmtime_r ();], [1;], return_ptr=yes, return_ptr=no) - case $return_int/$return_ptr in - yes/no) krb5_cv_gmtime_r_returns_int=yes ;; - no/yes) krb5_cv_gmtime_r_returns_int=no ;; - *) # Can't figure it out, punt the function. - ac_cv_func_gmtime_r=no ;; - esac]) - if test "$ac_cv_func_gmtime_r" = no; then - AC_MSG_RESULT(unknown -- ignoring gmtime_r) - else - AC_MSG_RESULT($krb5_cv_gmtime_r_returns_int) - if test "$krb5_cv_gmtime_r_returns_int" = yes; then - AC_DEFINE(GMTIME_R_RETURNS_INT,1,[Define if gmtime_r returns int instead of struct tm pointer, as on old HP-UX systems.]) - fi - fi -fi - -AC_CHECK_FUNC(getservbyname_r,[ -ac_cv_func_getservbyname_r=yes -if test "$ac_cv_func_getservbyname_r" = yes; then - AC_MSG_CHECKING([if getservbyname_r returns an int]) - AC_CACHE_VAL(krb5_cv_getservbyname_r_returns_int, - [AC_TRY_COMPILE([#include - extern int getservbyname_r ();], [1;], - krb5_cv_getservbyname_r_returns_int=yes, - krb5_cv_getservbyname_r_returns_int=no)]) - AC_MSG_RESULT($krb5_cv_getservbyname_r_returns_int) - - AC_MSG_CHECKING([if getservbyname_r returns a pointer]) - AC_CACHE_VAL(krb5_cv_getservbyname_r_returns_ptr, - [AC_TRY_COMPILE([#include - extern struct servent *getservbyname_r ();], [1;], - krb5_cv_getservbyname_r_returns_ptr=yes, - krb5_cv_getservbyname_r_returns_ptr=no)]) - AC_MSG_RESULT($krb5_cv_getservbyname_r_returns_ptr) - - if test "$krb5_cv_getservbyname_r_returns_int" = "$krb5_cv_getservbyname_r_returns_ptr"; then - AC_MSG_WARN(cannot determine return type of getservbyname_r -- disabling) - ac_cv_func_getservbyname_r=no - fi - if test "$krb5_cv_getservbyname_r_returns_int" = yes; then - AC_DEFINE(GETSERVBYNAME_R_RETURNS_INT, 1, [Define if getservbyname_r returns int rather than struct servent * ]) - fi -fi -if test "$ac_cv_func_getservbyname_r" = yes; then - AC_DEFINE(HAVE_GETSERVBYNAME_R, 1, [Define if getservbyname_r exists and its return type is known]) - AC_CHECK_FUNC(getservbyport_r) -fi -]) -dnl -HAVE_YYLINENO -CHECK_DIRENT -AC_TYPE_UID_T -AC_TYPE_MODE_T -dnl -AC_CHECK_HEADER(termios.h,dnl -[AC_CHECK_FUNC([tcsetattr],dnl - AC_DEFINE(POSIX_TERMIOS,1,[Define if termios.h exists and tcsetattr exists]))]) -dnl -KRB5_SIGTYPE -AC_CHECK_HEADERS(stdlib.h string.h stddef.h unistd.h sys/types.h sys/file.h sys/param.h sys/stat.h sys/time.h netinet/in.h sys/uio.h sys/filio.h sys/select.h time.h paths.h) -AC_HEADER_STDARG -KRB5_AC_INET6 -dnl -dnl If compiling with IPv6 support, test if in6addr_any functions. -dnl Irix 6.5.16 defines it, but lacks support in the C library. -if test $krb5_cv_inet6 = yes || test "$krb5_cv_inet6_with_dinet6" = yes ; then -AC_CACHE_CHECK([for in6addr_any definition in library], - krb5_cv_var_in6addr_any, -[AC_TRY_LINK([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#include -#include -#include -],[ - struct sockaddr_in6 in; - in.sin6_addr = in6addr_any; - printf("%x", &in); -],krb5_cv_var_in6addr_any=yes, krb5_cv_var_in6addr_any=no)]) - if test $krb5_cv_var_in6addr_any = no; then - AC_DEFINE(NEED_INSIXADDR_ANY,1,[Define if in6addr_any is not defined in libc]) - fi -fi - -dnl -dnl -dnl check for ANSI stdio, esp "b" option to fopen(). This (unfortunately) -dnl requires a run check... -dnl -AC_MSG_CHECKING([for ANSI stdio]) -AC_CACHE_VAL(krb5_cv_has_ansi_stdio, -[AC_TRY_RUN( -[#include -int main() -{ - FILE *conftest; - if ((conftest = fopen("conftest.dat", "w")) == NULL) exit(1); - if (fclose(conftest)) exit(1); - if ((conftest = fopen("conftest.dat", "rb+")) == NULL) exit(1); - if (fputs("testing ANSI for stdio\n", conftest) == EOF) exit(1); - exit(0); -}], -krb5_cv_has_ansi_stdio=yes, krb5_cv_has_ansi_stdio=no, -krb5_cv_has_ansi_stdio=yes)])dnl assume ANSI in cross environment -AC_MSG_RESULT($krb5_cv_has_ansi_stdio) -if test $krb5_cv_has_ansi_stdio = yes; then -AC_DEFINE(ANSI_STDIO,1,[Define if ANSI stdio is present (in particular "b" option to fopen)]) -fi -dnl -dnl Word sizes... -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -dnl -dnl then from osconf.h, we have -dnl -AC_HEADER_TIME -AC_CHECK_TYPE(time_t, long) -dnl -dnl Determine where to put the replay cache. -dnl -AC_MSG_CHECKING([for replay cache directory]) -AC_CACHE_VAL(krb5_cv_sys_rcdir, -[ -for t_dir in /var/tmp /usr/tmp /var/usr/tmp /tmp ; do - test -d $t_dir || continue - krb5_cv_sys_rcdir=$t_dir - break -done])dnl -AC_MSG_RESULT($krb5_cv_sys_rcdir) -KRB5_RCTMPDIR=$krb5_cv_sys_rcdir -AC_SUBST(KRB5_RCTMPDIR) -dnl -dnl -AC_MSG_CHECKING(for socklen_t) -AC_CACHE_VAL(krb5_cv_has_type_socklen_t, -[AC_TRY_COMPILE( -[#include -#include -],[sizeof (socklen_t);], -krb5_cv_has_type_socklen_t=yes,krb5_cv_has_type_socklen_t=no)]) -AC_MSG_RESULT($krb5_cv_has_type_socklen_t) -if test $krb5_cv_has_type_socklen_t = yes; then - AC_DEFINE(HAVE_SOCKLEN_T,1,[Define if there is a socklen_t type. If not, probably use size_t]) -fi -dnl -AC_MSG_CHECKING(for struct lifconf) -AC_CACHE_VAL(krb5_cv_has_struct_lifconf, -[AC_TRY_COMPILE( -[#include -#include -],[sizeof (struct lifconf);], -krb5_cv_has_struct_lifconf=yes,krb5_cv_has_struct_lifconf=no)]) -AC_MSG_RESULT($krb5_cv_has_struct_lifconf) -if test $krb5_cv_has_struct_lifconf = yes; then - AC_DEFINE(HAVE_STRUCT_LIFCONF,1,[Define if there is a struct lifconf.]) -fi -dnl HP-UX 11 uses stuct if_laddrconf -AC_MSG_CHECKING(for struct if_laddrconf) -AC_CACHE_VAL(krb5_cv_has_struct_if_laddrconf, -[AC_TRY_COMPILE( -[#include -#include -#include -],[sizeof (struct if_laddrconf);], -krb5_cv_has_struct_if_laddrconf=yes,krb5_cv_has_struct_if_laddrconf=no)]) -AC_MSG_RESULT($krb5_cv_has_struct_if_laddrconf) -if test $krb5_cv_has_struct_if_laddrconf = yes; then - AC_DEFINE(HAVE_STRUCT_IF_LADDRCONF,1,[Define if there is a struct if_laddrconf.]) -fi -dnl -dnl -AC_MSG_CHECKING([for h_errno in netdb.h]) -AC_CACHE_VAL(krb5_cv_header_netdb_h_h_errno, -[AC_TRY_COMPILE( - [#include ], - [int x = h_errno;], krb5_cv_header_netdb_h_h_errno=yes, - krb5_cv_header_netdb_h_h_errno=no)]) -AC_MSG_RESULT($krb5_cv_header_netdb_h_h_errno) -if test $krb5_cv_header_netdb_h_h_errno = yes; then - AC_DEFINE([HAVE_NETDB_H_H_ERRNO], 1, - [Define if netdb.h declares h_errno]) -fi -dnl -dnl -AC_ARG_ENABLE([athena], -[ --enable-athena build with MIT Project Athena configuration], -AC_DEFINE(KRB5_ATHENA_COMPAT,1,[Define if MIT Project Athena default configuration should be used]),) - -if test "$KRB4_LIB" = ''; then - AC_MSG_NOTICE(No Kerberos 4 compatibility) - maybe_kerberosIV= -else - AC_MSG_NOTICE(Kerberos 4 compatibility enabled) - maybe_kerberosIV=kerberosIV - AC_DEFINE(KRB5_KRB4_COMPAT,1,[Define if Kerberos V4 backwards compatibility should be supported]) -fi -AC_SUBST(maybe_kerberosIV) -dnl -AC_C_INLINE -AH_TOP([ -#ifndef KRB5_AUTOCONF_H -]) -AH_BOTTOM([ -#if defined(__GNUC__) && !defined(inline) -/* Silence gcc pedantic warnings about ANSI C. */ -# define inline __inline__ -#endif - -#define KRB5_AUTOCONF_H -#endif -]) -dnl -dnl Not used yet, but let's find out what we've got on the platforms -dnl we're working with.... -AC_CHECK_HEADERS(inttypes.h stdint.h) -AC_CHECK_TYPES([uint32_t, int32_t, uint64_t, int64_t, uint_least32_t, uintptr_t, uintmax_t, long long], , , [ -#ifdef HAVE_STDINT_H -# include -#elif defined(HAVE_INTTYPES_H) -# include -#endif -]) -dnl -V5_AC_OUTPUT_MAKEFILE(. krb5 kerberosIV) diff --git a/src/include/kerberosIV/ChangeLog b/src/include/kerberosIV/ChangeLog index 19e0b012a..9a0cd7764 100644 --- a/src/include/kerberosIV/ChangeLog +++ b/src/include/kerberosIV/ChangeLog @@ -1,3 +1,8 @@ +2005-05-13 Ken Raeburn + + * Makefile.in (thisconfigdir, mydir): Updated for configure + change. + 2004-06-22 Ken Raeburn * des.h, krb.h: Don't test for macintosh or __MWERKS__. diff --git a/src/include/kerberosIV/Makefile.in b/src/include/kerberosIV/Makefile.in index 785484f91..dc410e885 100644 --- a/src/include/kerberosIV/Makefile.in +++ b/src/include/kerberosIV/Makefile.in @@ -1,6 +1,6 @@ -thisconfigdir=./.. +thisconfigdir=./../.. myfulldir=include/kerberosIV -mydir=kerberosIV +mydir=include/kerberosIV BUILDTOP=$(REL)..$(S).. KRB4_HEADERS=krb.h des.h mit-copyright.h diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog index bcef580f5..8983c767a 100644 --- a/src/include/krb5/ChangeLog +++ b/src/include/krb5/ChangeLog @@ -1,3 +1,8 @@ +2005-05-13 Ken Raeburn + + * Makefile.in (thisconfigdir, mydir): Updated for configure + change. + 2004-06-22 Ken Raeburn * adm_proto.h, kdb.h, kdb_dbc.h, kdb_kt.h: Don't test macintosh. diff --git a/src/include/krb5/Makefile.in b/src/include/krb5/Makefile.in index 3d6d5f69c..d45d9bfbc 100644 --- a/src/include/krb5/Makefile.in +++ b/src/include/krb5/Makefile.in @@ -1,6 +1,6 @@ -thisconfigdir=./.. +thisconfigdir=./../.. myfulldir=include/krb5 -mydir=krb5 +mydir=include/krb5 BUILDTOP=$(REL)..$(S).. KRB5RCTMPDIR= @KRB5_RCTMPDIR@