diff options
Diffstat (limited to 'crypto/heimdal/cf')
30 files changed, 854 insertions, 303 deletions
diff --git a/crypto/heimdal/cf/ChangeLog b/crypto/heimdal/cf/ChangeLog index 0decfb5..9629a38 100644 --- a/crypto/heimdal/cf/ChangeLog +++ b/crypto/heimdal/cf/ChangeLog @@ -1,3 +1,179 @@ +2002-08-28 Assar Westerlund <assar@kth.se> + + * krb-readline.m4: also add LIB_tgetent in the case of editline + + * crypto.m4: define HAVE_OPENSSL even if we got to hear about it + by krb4 + +2002-08-28 Johan Danielsson <joda@pdc.kth.se> + + * krb-readline.m4: add LIB_tgetent to LIB_readline if we have to + + * sunos.m4: various sunos tests + + * crypto.m4: try to extract the crypto compiler flags from + {INCLUDE,LIB}_krb4 + (XXX this is really horrible) + + * krb-readline.m4: don't add -rpath to LIB_readline (libtool + should to this for us), also don't append LIB_tgetent to + LIB_readline (TEST_PACKAGE should do this) + + * test-package.m4: add the possibility to use a *-config program + to get flags; rename to rk_TEST_PACKAGE while here + + * krb-bigendian.m4: move ENDIANESS_IN_SYS_PARAM_H tests here + + * aix.m4: rename to rk_AIX + + * telnet.m4: move telnet tests here + + * aix.m4: restructure this somewhat + + * dlopen.m4: test for dlopen suitable for AC_REQUIRE + + * irix.m4: move some stuff here and rename to irix.m4 + + * krb-sys-nextstep.m4: move SGTTY stuff to read_pwd.c + +2002-08-28 Jacques Vidrine <nectar@kth.se> + + * auth-modules.m4: do not build pam_krb4 on freebsd + +2002-08-26 Assar Westerlund <assar@kth.se> + + * roken-frag.m4: test for the vis, strvis functions requiring + prototypes + +2002-08-23 Johan Danielsson <joda@pdc.kth.se> + + * need-proto.m4: missing comma + +2002-08-22 Johan Danielsson <joda@pdc.kth.se> + + * roken-frag.m4: some rototilling + + * need-proto.m4: use AS_TR_CPP + +2002-08-20 Johan Danielsson <joda@pdc.kth.se> + + * roken-frag.m4: HAVE_TYPE instead of CHECK_TYPE ssize_t + + * krb-version.m4: use PACKAGE_TARNAME and PACKAGE_STRING + + * broken-getaddrinfo.m4: can't test for EAI_SERVICE here since AIX + is even more fsck:ed + + * roken-frag.m4: test for altzone + +2002-08-19 Johan Danielsson <joda@pdc.kth.se> + + * Makefile.am.common: only define ROKEN_RENAME if do_roken_rename + +2002-08-13 Johan Danielsson <joda@pdc.kth.se> + + * Makefile.am.common: add ROKEN_RENAME variable + +2002-08-12 Johan Danielsson <joda@pdc.kth.se> + + * make-proto.pl: include <stdarg.h> to get va_list + + * destdirs.m4: also define localstatedir and sysconfdir + +2002-08-01 Johan Danielsson <joda@pdc.kth.se> + + * crypto.m4: newer openssl seems to take the address of the + schedule parameter to des_cbc_encrypt, so we need to feed it a + variable, not just NULL (from Magnus Holmberg) + +2002-05-24 Johan Danielsson <joda@pdc.kth.se> + + * misc.m4: change \100 back to @; some m4's (probably some regex) + doesn't like this as a replacement regexp; the reason it was once + changed to \100 was probably because of some autoconf bug at the + time + +2002-05-20 Johan Danielsson <joda@pdc.kth.se> + + * broken2.m4 []-less is apparently the way to go + +2002-05-19 Johan Danielsson <joda@pdc.kth.se> + + * otp.m4: check db_type instead of precence of dbm_firstkey + + * roken-frag.m4: don't AC_LIBOBJ more than one function at a time + + * find-if-not-broken.m4: s/AC_LIBOBJ/rk_LIBOBJ/ + + * broken2.m4: s/AC_LIBOBJ/rk_LIBOBJ/ + + * broken.m4: s/AC_LIBOBJ/rk_LIBOBJ/ + + * misc.m4: automake can't handle macros passed to AC_LIBOBJ, so + add an alias to it called rk_LIBOBJ; this requires that the + relevant source are manually included in roken/Makefile.am + + * aix.m4: ac_enable --diable-dynamic-afs + + * roken-frag.m4: use AC_LIBOBJ + + * krb-func-getcwd-broken.m4: use AC_LIBOBJ + + * find-if-not-broken.m4: use AC_LIBOBJ + + * broken2.m4: use AC_LIBOBJ + + * broken.m4: use AC_LIBOBJ + + * aix.m4: recognise aix5 + +2002-05-17 Johan Danielsson <joda@pdc.kth.se> + + * crypto.m4: am-conditionalise HAVE_OPENSSL + + * db.m4: make it possible to run this twice + + * Makefile.am.common: also install nodist_include_HEADERS + +2002-05-16 Johan Danielsson <joda@pdc.kth.se> + + * make-proto.pl: make it possible to redefine the "private" regexp + +2002-05-02 Johan Danielsson <joda@pdc.kth.se> + + * db.m4: am_cond HAVE_* + +2002-04-30 Johan Danielsson <joda@pdc.kth.se> + + * krb-ipv6.m4: use AC_HELP_STRING; fix logic bug in AC_MSG_RESULT + call + + * test-package.m4: use AC_HELP_STRING + + * roken.m4: use AC_HELP_STRING + + * osfc2.m4: use AC_HELP_STRING + + * mips-abi.m4: use AC_HELP_STRING + + * krb-bigendian.m4: use AC_HELP_STRING + + * db.m4: rework this somewhat; check for db3/4 in subdirs, change + --with to --enable; it should really be possible to point it to + some directory --with-berkeley-db=/foo + + * otp.m4: OTP test + +2002-04-25 Johan Danielsson <joda@pdc.kth.se> + + * destdirs.m4: define BINDIR et al + +2002-04-18 Johan Danielsson <joda@pdc.kth.se> + + * misc.m4: remove some stuff that is defined elsewhere + + * make-proto.pl: optionally remove __P and parameter names + 2001-11-30 Assar Westerlund <assar@sics.se> * roken-frag.m4: move ipv6 tests after -lsocket (to handle Solaris diff --git a/crypto/heimdal/cf/Makefile.am.common b/crypto/heimdal/cf/Makefile.am.common index 95f0284..a59eed3 100644 --- a/crypto/heimdal/cf/Makefile.am.common +++ b/crypto/heimdal/cf/Makefile.am.common @@ -1,11 +1,15 @@ -# $Id: Makefile.am.common,v 1.31 2001/09/01 11:12:18 assar Exp $ +# $Id: Makefile.am.common,v 1.36 2002/08/19 16:10:25 joda Exp $ -AUTOMAKE_OPTIONS = foreign no-dependencies 1.4b +AUTOMAKE_OPTIONS = foreign no-dependencies 1.6 SUFFIXES = .et .h INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) +if do_roken_rename +ROKEN_RENAME = -DROKEN_RENAME +endif + AM_CFLAGS = $(WFLAGS) CP = cp @@ -39,8 +43,6 @@ LIB_socket = @LIB_socket@ LIB_syslog = @LIB_syslog@ LIB_tgetent = @LIB_tgetent@ -LIBS = @LIBS@ - HESIODLIB = @HESIODLIB@ HESIODINCLUDE = @HESIODINCLUDE@ INCLUDE_hesiod = @INCLUDE_hesiod@ @@ -70,7 +72,7 @@ install-suid-programs: install-exec-hook: install-suid-programs install-build-headers:: $(include_HEADERS) $(build_HEADERZ) - @foo='$(include_HEADERS) $(build_HEADERZ)'; \ + @foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \ for f in $$foo; do \ f=`basename $$f`; \ if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ @@ -84,6 +86,38 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ) all-local: install-build-headers +check-local:: + @if test '$(CHECK_LOCAL)'; then \ + foo='$(CHECK_LOCAL)'; else \ + foo='$(PROGRAMS)'; fi; \ + if test "$$foo"; then \ + failed=0; all=0; \ + for i in $$foo; do \ + all=`expr $$all + 1`; \ + if ./$$i --version > /dev/null 2>&1; then \ + echo "PASS: $$i"; \ + else \ + echo "FAIL: $$i"; \ + failed=`expr $$failed + 1`; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="$$failed of $$all tests failed"; \ + fi; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0; \ + fi + +SUFFIXES += .x + +.x.c: + @cmp -s $< $@ 2> /dev/null || cp $< $@ + SUFFIXES += .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 NROFF_MAN = groff -mandoc -Tascii diff --git a/crypto/heimdal/cf/aix.m4 b/crypto/heimdal/cf/aix.m4 index 25aaa2a..8cca239 100644 --- a/crypto/heimdal/cf/aix.m4 +++ b/crypto/heimdal/cf/aix.m4 @@ -1,39 +1,57 @@ dnl -dnl $Id: aix.m4,v 1.5 2000/11/05 17:15:46 joda Exp $ +dnl $Id: aix.m4,v 1.9 2002/08/28 19:19:43 joda Exp $ dnl -AC_DEFUN(KRB_AIX,[ +AC_DEFUN(rk_AIX,[ + aix=no case "$host" in *-*-aix3*) aix=3 ;; -*-*-aix4*) +*-*-aix4*|*-*-aix5*) aix=4 ;; esac + AM_CONDITIONAL(AIX, test "$aix" != no)dnl AM_CONDITIONAL(AIX4, test "$aix" = 4) -aix_dynamic_afs=yes -AM_CONDITIONAL(AIX_DYNAMIC_AFS, test "$aix_dynamic_afs" = yes)dnl -AC_FIND_FUNC_NO_LIBS(dlopen, dl) + +AC_ARG_ENABLE(dynamic-afs, + AC_HELP_STRING([--disable-dynamic-afs], + [do not use loaded AFS library with AIX])) if test "$aix" != no; then - if test "$aix_dynamic_afs" = yes; then - if test "$ac_cv_funclib_dlopen" = yes; then - AIX_EXTRA_KAFS= - elif test "$ac_cv_funclib_dlopen" != no; then - AIX_EXTRA_KAFS="$ac_cv_funclib_dlopen" + if test "$enable_dynamic_afs" != no; then + AC_REQUIRE([rk_DLOPEN]) + if test "$ac_cv_func_dlopen" = no; then + AC_FIND_FUNC_NO_LIBS(loadquery, ld) + fi + if test "$ac_cv_func_dlopen" != no; then + AIX_EXTRA_KAFS='$(LIB_dlopen)' + elif test "$ac_cv_func_loadquery" != no; then + AIX_EXTRA_KAFS='$(LIB_loadquery)' else - AIX_EXTRA_KAFS=-lld + AC_MSG_NOTICE([not using dynloaded AFS library]) + AIX_EXTRA_KAFS= + enable_dynamic_afs=no fi else AIX_EXTRA_KAFS= fi fi -AM_CONDITIONAL(HAVE_DLOPEN, test "$ac_cv_funclib_dlopen" != no)dnl +AM_CONDITIONAL(AIX_DYNAMIC_AFS, test "$enable_dynamic_afs" != no)dnl AC_SUBST(AIX_EXTRA_KAFS)dnl -])
\ No newline at end of file +AH_BOTTOM([#if _AIX +#define _ALL_SOURCE +/* XXX this is gross, but kills about a gazillion warnings */ +struct ether_addr; +struct sockaddr; +struct sockaddr_dl; +struct sockaddr_in; +#endif]) + +]) diff --git a/crypto/heimdal/cf/auth-modules.m4 b/crypto/heimdal/cf/auth-modules.m4 index 99ae597..675d573 100644 --- a/crypto/heimdal/cf/auth-modules.m4 +++ b/crypto/heimdal/cf/auth-modules.m4 @@ -1,4 +1,4 @@ -dnl $Id: auth-modules.m4,v 1.2 2001/09/01 11:56:05 assar Exp $ +dnl $Id: auth-modules.m4,v 1.3 2002/08/28 15:04:57 nectar Exp $ dnl dnl Figure what authentication modules should be built @@ -11,7 +11,14 @@ if test "$ac_cv_header_siad_h" = yes; then LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS sia" fi -if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_shared" = yes; then +case "${host}" in +*-*-freebsd*) ac_cv_want_pam_krb4=no ;; +*) ac_cv_want_pam_krb4=yes ;; +esac + +if test "$ac_cv_want_pam_krb4" = yes -a \ + "$ac_cv_header_security_pam_modules_h" = yes -a \ + "$enable_shared" = yes; then LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS pam" fi diff --git a/crypto/heimdal/cf/broken-getaddrinfo.m4 b/crypto/heimdal/cf/broken-getaddrinfo.m4 index 9a3f776..bb1c129 100644 --- a/crypto/heimdal/cf/broken-getaddrinfo.m4 +++ b/crypto/heimdal/cf/broken-getaddrinfo.m4 @@ -1,4 +1,4 @@ -dnl $Id: broken-getaddrinfo.m4,v 1.2 2001/08/22 01:05:29 assar Exp $ +dnl $Id: broken-getaddrinfo.m4,v 1.3 2002/08/20 14:09:40 joda Exp $ dnl dnl test if getaddrinfo can handle numeric services @@ -17,7 +17,7 @@ main(int argc, char **argv) hints.ai_flags = AI_PASSIVE; hints.ai_socktype = SOCK_STREAM; hints.ai_family = PF_UNSPEC; - if(getaddrinfo(NULL, "17", &hints, &ai) == EAI_SERVICE) + if(getaddrinfo(NULL, "17", &hints, &ai) != 0) return 1; return 0; } diff --git a/crypto/heimdal/cf/broken.m4 b/crypto/heimdal/cf/broken.m4 index 911ed27..92b84dd 100644 --- a/crypto/heimdal/cf/broken.m4 +++ b/crypto/heimdal/cf/broken.m4 @@ -1,18 +1,12 @@ -dnl $Id: broken.m4,v 1.4 2000/07/15 18:06:36 joda Exp $ +dnl $Id: broken.m4,v 1.6 2002/05/19 19:36:52 joda Exp $ dnl dnl dnl Same as AC _REPLACE_FUNCS, just define HAVE_func if found in normal dnl libraries -AC_DEFUN(AC_BROKEN, -[for ac_func in $1 -do -AC_CHECK_FUNC($ac_func, [ -ac_tr_func=HAVE_[]upcase($ac_func) -AC_DEFINE_UNQUOTED($ac_tr_func)],[LIBOBJS[]="$LIBOBJS ${ac_func}.o"]) -if false; then - AC_CHECK_FUNCS($1) -fi -done -AC_SUBST(LIBOBJS)dnl -]) +AC_DEFUN([AC_BROKEN], +[AC_FOREACH([rk_func], [$1], + [AC_CHECK_FUNC(rk_func, + [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]rk_func), 1, + [Define if you have the function `]rk_func['.])], + [rk_LIBOBJ(rk_func)])])]) diff --git a/crypto/heimdal/cf/broken2.m4 b/crypto/heimdal/cf/broken2.m4 index 78a3dcb..56ed7a1 100644 --- a/crypto/heimdal/cf/broken2.m4 +++ b/crypto/heimdal/cf/broken2.m4 @@ -1,13 +1,11 @@ -dnl $Id: broken2.m4,v 1.1 2000/12/15 14:27:33 assar Exp $ +dnl $Id: broken2.m4,v 1.4 2002/05/19 22:16:46 joda Exp $ dnl dnl AC_BROKEN but with more arguments dnl AC_BROKEN2(func, includes, arguments) -AC_DEFUN(AC_BROKEN2, -[for ac_func in $1 -do -AC_MSG_CHECKING([for $ac_func]) -AC_CACHE_VAL(ac_cv_func_$ac_func, +AC_DEFUN([AC_BROKEN2], +[AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(ac_cv_func_[]$1, [AC_TRY_LINK([$2], [ /* The GNU C library defines this for functions which it implements @@ -16,20 +14,13 @@ AC_CACHE_VAL(ac_cv_func_$ac_func, #if defined (__stub_$1) || defined (__stub___$1) choke me #else -$ac_func($3) +$1($3) #endif -], [eval "ac_cv_func_$ac_func=yes"], [eval "ac_cv_func_$ac_func=no"])]) -if eval "test \"\${ac_cv_func_$ac_func}\" = yes"; then - ac_tr_func=HAVE_[]upcase($ac_func) - AC_DEFINE_UNQUOTED($ac_tr_func) +], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])]) +if eval "test \"\${ac_cv_func_[]$1}\" = yes"; then + AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) - LIBOBJS[]="$LIBOBJS ${ac_func}.o" -fi -done -if false; then - AC_CHECK_FUNCS($1) -fi -AC_SUBST(LIBOBJS)dnl -]) + rk_LIBOBJ($1) +fi]) diff --git a/crypto/heimdal/cf/crypto.m4 b/crypto/heimdal/cf/crypto.m4 index d16d348..359aa30 100644 --- a/crypto/heimdal/cf/crypto.m4 +++ b/crypto/heimdal/cf/crypto.m4 @@ -1,4 +1,4 @@ -dnl $Id: crypto.m4,v 1.7 2001/08/29 17:02:48 assar Exp $ +dnl $Id: crypto.m4,v 1.11 2002/08/28 23:09:05 assar Exp $ dnl dnl test for crypto libraries: dnl - libcrypto (from openssl) @@ -13,6 +13,7 @@ DIR_des= AC_MSG_CHECKING([for crypto library]) +openssl=no if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then save_CPPFLAGS="$CPPFLAGS" @@ -39,6 +40,7 @@ if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then #include <openssl/rc4.h> ], [ + void *schedule = 0; MD4_CTX md4; MD5_CTX md5; SHA_CTX sha1; @@ -47,55 +49,127 @@ if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then MD5_Init(&md5); SHA1_Init(&sha1); - des_cbc_encrypt(0, 0, 0, 0, 0, 0); + des_cbc_encrypt(0, 0, 0, schedule, 0, 0); RC4(0, 0, 0, 0); ], [ - crypto_lib=libcrypto - AC_DEFINE([HAVE_OPENSSL], 1, [define to use openssl's libcrypto]) + crypto_lib=libcrypto openssl=yes AC_MSG_RESULT([libcrypto])]) CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS" fi if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then - - save_CPPFLAGS="$CPPFLAGS" - save_LIBS="$LIBS" - INCLUDE_des="${INCLUDE_krb4}" - LIB_des= - if test "$krb4_libdir"; then - LIB_des="-L${krb4_libdir}" - fi - LIB_des="${LIB_des} -ldes" - CPPFLAGS="${CPPFLAGS} ${INCLUDE_des}" - LIBS="${LIBS} ${LIB_des}" - LIB_des_a="$LIB_des" - LIB_des_so="$LIB_des" - LIB_des_appl="$LIB_des" - LIBS="${LIBS} ${LIB_des}" - AC_TRY_LINK([ - #undef KRB5 /* makes md4.h et al unhappy */ - #define KRB4 - #include <md4.h> - #include <md5.h> - #include <sha.h> - #include <des.h> - #include <rc4.h> - ], - [ - MD4_CTX md4; - MD5_CTX md5; - SHA_CTX sha1; - - MD4_Init(&md4); - MD5_Init(&md5); - SHA1_Init(&sha1); - - des_cbc_encrypt(0, 0, 0, 0, 0, 0); - RC4(0, 0, 0, 0); - ], [crypto_lib=krb4; AC_MSG_RESULT([krb4's libdes])]) - CPPFLAGS="$save_CPPFLAGS" - LIBS="$save_LIBS" + save_CPPFLAGS="$CPPFLAGS" + save_LIBS="$LIBS" + + cdirs= clibs= + for i in $LIB_krb4; do + case "$i" in + -L*) cdirs="$cdirs $i";; + -l*) clibs="$clibs $i";; + esac + done + + ires= + for i in $INCLUDE_krb4; do + CFLAGS="$i $save_CFLAGS" + AC_TRY_COMPILE([ + #undef KRB5 /* makes md4.h et al unhappy */ + #define KRB4 + #include <openssl/md4.h> + #include <openssl/md5.h> + #include <openssl/sha.h> + #include <openssl/des.h> + #include <openssl/rc4.h> + ], [ + MD4_CTX md4; + MD5_CTX md5; + SHA_CTX sha1; + + MD4_Init(&md4); + MD5_Init(&md5); + SHA1_Init(&sha1); + + des_cbc_encrypt(0, 0, 0, 0, 0, 0); + RC4(0, 0, 0, 0);],openssl=yes ires="$i"; break) + AC_TRY_COMPILE([ + #undef KRB5 /* makes md4.h et al unhappy */ + #define KRB4 + #include <md4.h> + #include <md5.h> + #include <sha.h> + #include <des.h> + #include <rc4.h> + ], [ + MD4_CTX md4; + MD5_CTX md5; + SHA_CTX sha1; + + MD4_Init(&md4); + MD5_Init(&md5); + SHA1_Init(&sha1); + + des_cbc_encrypt(0, 0, 0, 0, 0, 0); + RC4(0, 0, 0, 0);],ires="$i"; break) + done + lres= + for i in $cdirs; do + for j in $clibs; do + LIBS="$i $j $save_LIBS" + if test "$openssl" = yes; then + AC_TRY_LINK([ + #undef KRB5 /* makes md4.h et al unhappy */ + #define KRB4 + #include <openssl/md4.h> + #include <openssl/md5.h> + #include <openssl/sha.h> + #include <openssl/des.h> + #include <openssl/rc4.h> + ], [ + MD4_CTX md4; + MD5_CTX md5; + SHA_CTX sha1; + + MD4_Init(&md4); + MD5_Init(&md5); + SHA1_Init(&sha1); + + des_cbc_encrypt(0, 0, 0, 0, 0, 0); + RC4(0, 0, 0, 0);],lres="$i $j"; break 2) + else + AC_TRY_LINK([ + #undef KRB5 /* makes md4.h et al unhappy */ + #define KRB4 + #include <md4.h> + #include <md5.h> + #include <sha.h> + #include <des.h> + #include <rc4.h> + ], [ + MD4_CTX md4; + MD5_CTX md5; + SHA_CTX sha1; + + MD4_Init(&md4); + MD5_Init(&md5); + SHA1_Init(&sha1); + + des_cbc_encrypt(0, 0, 0, 0, 0, 0); + RC4(0, 0, 0, 0);],lres="$i $j"; break 2) + fi + done + done + CFLAGS="$save_CFLAGS" + LIBS="$save_LIBS" + if test "$ires" -a "$lres"; then + INCLUDE_des="$ires" + LIB_des="$lres" + crypto_lib=krb4 + AC_MSG_RESULT([same as krb4]) + LIB_des_a='$(LIB_des)' + LIB_des_so='$(LIB_des)' + LIB_des_appl='$(LIB_des)' + fi fi if test "$crypto_lib" = "unknown"; then @@ -110,6 +184,11 @@ if test "$crypto_lib" = "unknown"; then fi +if test "$openssl" = "yes"; then + AC_DEFINE([HAVE_OPENSSL], 1, [define to use openssl's libcrypto]) +fi +AM_CONDITIONAL(HAVE_OPENSSL, test "$openssl" = yes)dnl + AC_SUBST(DIR_des) AC_SUBST(INCLUDE_des) AC_SUBST(LIB_des) diff --git a/crypto/heimdal/cf/db.m4 b/crypto/heimdal/cf/db.m4 index 8c72798..e2b52f2 100644 --- a/crypto/heimdal/cf/db.m4 +++ b/crypto/heimdal/cf/db.m4 @@ -1,30 +1,36 @@ -dnl $Id: db.m4,v 1.5 2001/09/13 00:34:07 assar Exp $ +dnl $Id: db.m4,v 1.8 2002/05/17 15:32:21 joda Exp $ dnl dnl tests for various db libraries dnl -AC_DEFUN([rk_DB],[berkeley_db=db -AC_ARG_WITH(berkeley-db, -[ --without-berkeley-db if you don't want berkeley db],[ -if test "$withval" = no; then - berkeley_db="" -fi +AC_DEFUN([rk_DB],[ +AC_ARG_ENABLE(berkeley-db, + AC_HELP_STRING([--disable-berkeley-db], + [if you don't want berkeley db]),[ ]) have_ndbm=no db_type=unknown -if test "$berkeley_db"; then +if test "$enable_berkeley_db" != no; then AC_CHECK_HEADERS([ \ + db4/db.h \ + db3/db.h \ db.h \ db_185.h \ ]) -dnl db_create is used by db3 +dnl db_create is used by db3 and db4 - AC_FIND_FUNC_NO_LIBS(db_create, $berkeley_db, [ + AC_FIND_FUNC_NO_LIBS(db_create, db4 db3 db, [ #include <stdio.h> + #ifdef HAVE_DB4_DB_H + #include <db4/db.h> + #elif defined(HAVE_DB3_DB_H) + #include <db3/db.h> + #else #include <db.h> + #endif ],[NULL, NULL, 0]) if test "$ac_cv_func_db_create" = "yes"; then @@ -34,14 +40,16 @@ dnl db_create is used by db3 else DBLIB="" fi - AC_DEFINE(HAVE_DB3, 1, [define if you have a berkeley db3 library]) + AC_DEFINE(HAVE_DB3, 1, [define if you have a berkeley db3/4 library]) else dnl dbopen is used by db1/db2 - AC_FIND_FUNC_NO_LIBS(dbopen, $berkeley_db, [ + AC_FIND_FUNC_NO_LIBS(dbopen, db2 db, [ #include <stdio.h> - #if defined(HAVE_DB_185_H) + #if defined(HAVE_DB2_DB_H) + #include <db2/db.h> + #elif defined(HAVE_DB_185_H) #include <db_185.h> #elif defined(HAVE_DB_H) #include <db.h> @@ -63,24 +71,26 @@ dnl dbopen is used by db1/db2 dnl test for ndbm compatability - AC_FIND_FUNC_NO_LIBS2(dbm_firstkey, $ac_cv_funclib_dbopen $ac_cv_funclib_db_create, [ - #include <stdio.h> - #define DB_DBM_HSEARCH 1 - #include <db.h> - DBM *dbm; - ],[NULL]) - - if test "$ac_cv_func_dbm_firstkey" = "yes"; then - if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then - LIB_NDBM="$ac_cv_funclib_dbm_firstkey" + if test "$ac_cv_func_dbm_firstkey" != yes; then + AC_FIND_FUNC_NO_LIBS2(dbm_firstkey, $ac_cv_funclib_dbopen $ac_cv_funclib_db_create, [ + #include <stdio.h> + #define DB_DBM_HSEARCH 1 + #include <db.h> + DBM *dbm; + ],[NULL]) + + if test "$ac_cv_func_dbm_firstkey" = "yes"; then + if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then + LIB_NDBM="$ac_cv_funclib_dbm_firstkey" + else + LIB_NDBM="" + fi + AC_DEFINE(HAVE_DB_NDBM, 1, [define if you have ndbm compat in db]) + AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)]) else - LIB_NDBM="" + $as_unset ac_cv_func_dbm_firstkey + $as_unset ac_cv_funclib_dbm_firstkey fi - AC_DEFINE(HAVE_DB_NDBM, 1, [define if you have ndbm compat in db]) - AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)]) - else - $as_unset ac_cv_func_dbm_firstkey - $as_unset ac_cv_funclib_dbm_firstkey fi fi # berkeley db @@ -98,8 +108,6 @@ if test "$db_type" = "unknown" -o "$ac_cv_func_dbm_firstkey" = ""; then #include <ndbm.h> #elif defined(HAVE_DBM_H) #include <dbm.h> - #else - #error no ndbm.h #endif DBM *dbm; ],[NULL]) @@ -178,6 +186,11 @@ int main() fi],[AC_MSG_RESULT([no])]) fi +AM_CONDITIONAL(HAVE_DB1, test "$db_type" = db1)dnl +AM_CONDITIONAL(HAVE_DB3, test "$db_type" = db3)dnl +AM_CONDITIONAL(HAVE_NDBM, test "$db_type" = ndbm)dnl + +DBLIB="$LDFLAGS $DBLIB" AC_SUBST(DBLIB)dnl AC_SUBST(LIB_NDBM)dnl ]) diff --git a/crypto/heimdal/cf/destdirs.m4 b/crypto/heimdal/cf/destdirs.m4 new file mode 100644 index 0000000..0d56e9c --- /dev/null +++ b/crypto/heimdal/cf/destdirs.m4 @@ -0,0 +1,18 @@ +dnl +dnl $Id: destdirs.m4,v 1.2 2002/08/12 15:12:50 joda Exp $ +dnl + +AC_DEFUN([rk_DESTDIRS], [ +# This is done by AC_OUTPUT but we need the result here. +test "x$prefix" = xNONE && prefix=$ac_default_prefix +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +AC_FOREACH([rk_dir], [bin lib libexec localstate sbin sysconf], [ + x="${rk_dir[]dir}" + eval y="$x" + while test "x$y" != "x$x"; do + x="$y" + eval y="$x" + done + AC_DEFINE_UNQUOTED(AS_TR_CPP(rk_dir[]dir), "$x", [path to ]rk_dir[])]) +]) diff --git a/crypto/heimdal/cf/dlopen.m4 b/crypto/heimdal/cf/dlopen.m4 new file mode 100644 index 0000000..322f8b9 --- /dev/null +++ b/crypto/heimdal/cf/dlopen.m4 @@ -0,0 +1,8 @@ +dnl +dnl $Id: dlopen.m4,v 1.1 2002/08/28 16:32:16 joda Exp $ +dnl + +AC_DEFUN([rk_DLOPEN], [ + AC_FIND_FUNC_NO_LIBS(dlopen, dl) + AM_CONDITIONAL(HAVE_DLOPEN, test "$ac_cv_funclib_dlopen" != no) +]) diff --git a/crypto/heimdal/cf/find-if-not-broken.m4 b/crypto/heimdal/cf/find-if-not-broken.m4 index e855ec7..88d4fc0 100644 --- a/crypto/heimdal/cf/find-if-not-broken.m4 +++ b/crypto/heimdal/cf/find-if-not-broken.m4 @@ -1,4 +1,4 @@ -dnl $Id: find-if-not-broken.m4,v 1.2 1998/03/16 22:16:27 joda Exp $ +dnl $Id: find-if-not-broken.m4,v 1.4 2002/05/19 19:37:08 joda Exp $ dnl dnl dnl Mix between AC_FIND_FUNC and AC_BROKEN @@ -6,8 +6,7 @@ dnl AC_DEFUN(AC_FIND_IF_NOT_BROKEN, [AC_FIND_FUNC([$1], [$2], [$3], [$4]) -if eval "test \"$ac_cv_func_$1\" != yes"; then -LIBOBJS[]="$LIBOBJS $1.o" +if eval "test \"$ac_cv_func_$1\" != yes"; then + rk_LIBOBJ([$1]) fi -AC_SUBST(LIBOBJS)dnl ]) diff --git a/crypto/heimdal/cf/irix.m4 b/crypto/heimdal/cf/irix.m4 new file mode 100644 index 0000000..b62e2c3 --- /dev/null +++ b/crypto/heimdal/cf/irix.m4 @@ -0,0 +1,26 @@ +dnl +dnl $Id: irix.m4,v 1.1 2002/08/28 19:11:44 joda Exp $ +dnl + +AC_DEFUN([rk_IRIX], +[ +irix=no +case "$host" in +*-*-irix4*) + AC_DEFINE([IRIX4], 1, + [Define if you are running IRIX 4.]) + irix=yes + ;; +*-*-irix*) + irix=yes + ;; +esac +AM_CONDITIONAL(IRIX, test "$irix" != no)dnl + +AH_BOTTOM([ +/* IRIX 4 braindamage */ +#if IRIX == 4 && !defined(__STDC__) +#define __STDC__ 0 +#endif +]) +]) diff --git a/crypto/heimdal/cf/krb-bigendian.m4 b/crypto/heimdal/cf/krb-bigendian.m4 index ab16931..4aa73d2 100644 --- a/crypto/heimdal/cf/krb-bigendian.m4 +++ b/crypto/heimdal/cf/krb-bigendian.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: krb-bigendian.m4,v 1.6 2000/08/19 15:37:00 assar Exp $ +dnl $Id: krb-bigendian.m4,v 1.8 2002/08/28 19:20:19 joda Exp $ dnl dnl check if this computer is little or big-endian @@ -9,10 +9,10 @@ dnl it when cross-compiling AC_DEFUN(KRB_C_BIGENDIAN, [ AC_ARG_ENABLE(bigendian, -[ --enable-bigendian the target is big endian], + AC_HELP_STRING([--enable-bigendian],[the target is big endian]), krb_cv_c_bigendian=yes) AC_ARG_ENABLE(littleendian, -[ --enable-littleendian the target is little endian], + AC_HELP_STRING([--enable-littleendian],[the target is little endian]), krb_cv_c_bigendian=no) AC_CACHE_CHECK(whether byte order is known at compile time, krb_cv_c_bigendian_compile, @@ -50,4 +50,13 @@ fi if test "$krb_cv_c_bigendian_compile" = "yes"; then AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl fi +AH_BOTTOM([ +#if ENDIANESS_IN_SYS_PARAM_H +# include <sys/types.h> +# include <sys/param.h> +# if BYTE_ORDER == BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +# endif +#endif +]) ]) diff --git a/crypto/heimdal/cf/krb-func-getcwd-broken.m4 b/crypto/heimdal/cf/krb-func-getcwd-broken.m4 index d248922..3f08030 100644 --- a/crypto/heimdal/cf/krb-func-getcwd-broken.m4 +++ b/crypto/heimdal/cf/krb-func-getcwd-broken.m4 @@ -1,4 +1,4 @@ -dnl $Id: krb-func-getcwd-broken.m4,v 1.2 1999/03/01 13:03:32 joda Exp $ +dnl $Id: krb-func-getcwd-broken.m4,v 1.3 2002/05/19 19:17:35 joda Exp $ dnl dnl dnl test for broken getcwd in (SunOS braindamage) @@ -32,8 +32,7 @@ int main() ]) if test "$ac_cv_func_getcwd_broken" = yes; then AC_DEFINE(BROKEN_GETCWD, 1, [Define if getcwd is broken (like in SunOS 4).])dnl - LIBOBJS="$LIBOBJS getcwd.o" - AC_SUBST(LIBOBJS)dnl + AC_LIBOBJ(getcwd) AC_MSG_RESULT($ac_cv_func_getcwd_broken) else AC_MSG_RESULT([seems ok]) diff --git a/crypto/heimdal/cf/krb-ipv6.m4 b/crypto/heimdal/cf/krb-ipv6.m4 index 34a718d..ba66be7 100644 --- a/crypto/heimdal/cf/krb-ipv6.m4 +++ b/crypto/heimdal/cf/krb-ipv6.m4 @@ -1,20 +1,19 @@ -dnl $Id: krb-ipv6.m4,v 1.12 2001/08/19 16:27:02 joda Exp $ +dnl $Id: krb-ipv6.m4,v 1.13 2002/04/30 16:48:13 joda Exp $ dnl dnl test for IPv6 dnl AC_DEFUN(AC_KRB_IPV6, [ AC_ARG_WITH(ipv6, -[ --without-ipv6 do not enable IPv6 support],[ + AC_HELP_STRING([--without-ipv6],[do not enable IPv6 support]),[ if test "$withval" = "no"; then ac_cv_lib_ipv6=no fi]) save_CFLAGS="${CFLAGS}" -AC_CACHE_VAL(ac_cv_lib_ipv6, +AC_CACHE_CHECK([for IPv6 stack type], v6type, [dnl check for different v6 implementations (by itojun) v6type=unknown v6lib=none -AC_MSG_CHECKING([ipv6 stack type]) for i in v6d toshiba kame inria zeta linux; do case $i in v6d) @@ -78,7 +77,6 @@ yes break fi done -AC_MSG_RESULT($v6type) if test "$v6lib" != "none"; then for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do @@ -88,6 +86,9 @@ if test "$v6lib" != "none"; then fi done fi +]) + +AC_CACHE_CHECK([for IPv6], ac_cv_lib_ipv6, [ AC_TRY_LINK([ #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -115,8 +116,6 @@ AC_TRY_LINK([ ], ac_cv_lib_ipv6=yes, ac_cv_lib_ipv6=no)]) -AC_MSG_CHECKING(for IPv6) -AC_MSG_RESULT($ac_cv_lib_ipv6) if test "$ac_cv_lib_ipv6" = yes; then AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.]) else diff --git a/crypto/heimdal/cf/krb-readline.m4 b/crypto/heimdal/cf/krb-readline.m4 index 6d0f0b2..656a088 100644 --- a/crypto/heimdal/cf/krb-readline.m4 +++ b/crypto/heimdal/cf/krb-readline.m4 @@ -1,4 +1,4 @@ -dnl $Id: krb-readline.m4,v 1.2 2000/11/15 00:47:08 assar Exp $ +dnl $Id: krb-readline.m4,v 1.5 2002/08/29 02:22:32 assar Exp $ dnl dnl Tests for readline functions dnl @@ -28,16 +28,12 @@ elif test "$ac_cv_func_readline" = yes; then : elif test "$ac_cv_func_el_init" = yes; then ac_foo=yes - LIB_readline="\$(top_builddir)/lib/editline/libel_compat.la $LIB_el_init" + LIB_readline="\$(top_builddir)/lib/editline/libel_compat.la \$(LIB_el_init) \$(LIB_tgetent)" else - LIB_readline='$(top_builddir)/lib/editline/libeditline.la' + LIB_readline="\$(top_builddir)/lib/editline/libeditline.la \$(LIB_tgetent)" fi AM_CONDITIONAL(el_compat, test "$ac_foo" = yes) -if test "$readline_libdir"; then - LIB_readline="-rpath $readline_libdir $LIB_readline" -fi -LIB_readline="$LIB_readline \$(LIB_tgetent)" AC_DEFINE(HAVE_READLINE, 1, [Define if you have a readline compatible library.])dnl -])
\ No newline at end of file +]) diff --git a/crypto/heimdal/cf/krb-sys-nextstep.m4 b/crypto/heimdal/cf/krb-sys-nextstep.m4 index 5dec8b1..6e9e316 100644 --- a/crypto/heimdal/cf/krb-sys-nextstep.m4 +++ b/crypto/heimdal/cf/krb-sys-nextstep.m4 @@ -1,4 +1,4 @@ -dnl $Id: krb-sys-nextstep.m4,v 1.3 2000/07/15 17:56:45 joda Exp $ +dnl $Id: krb-sys-nextstep.m4,v 1.4 2002/08/28 18:44:32 joda Exp $ dnl dnl NEXTSTEP is not posix compliant by default, dnl you need a switch -posix to the compiler @@ -15,7 +15,4 @@ if test "$rk_cv_sys_nextstep" = "yes"; then CFLAGS="$CFLAGS -posix" LIBS="$LIBS -posix" fi -AH_BOTTOM([#if defined(HAVE_SGTTY_H) && defined(__NeXT__) -#define SGTTY -#endif]) ]) diff --git a/crypto/heimdal/cf/krb-version.m4 b/crypto/heimdal/cf/krb-version.m4 index 9907ed1..4b55590 100644 --- a/crypto/heimdal/cf/krb-version.m4 +++ b/crypto/heimdal/cf/krb-version.m4 @@ -1,13 +1,13 @@ -dnl $Id: krb-version.m4,v 1.2 2000/08/27 05:42:19 assar Exp $ +dnl $Id: krb-version.m4,v 1.3 2002/08/20 15:49:58 joda Exp $ dnl dnl dnl output a C header-file with some version strings dnl + AC_DEFUN(AC_KRB_VERSION,[ -dnl AC_OUTPUT_COMMANDS([ cat > include/newversion.h.in <<FOOBAR -const char *${PACKAGE}_long_version = "@(#)\$Version: $PACKAGE-$VERSION by @USER@ on @HOST@ ($host) @DATE@ \$"; -const char *${PACKAGE}_version = "$PACKAGE-$VERSION"; +const char *${PACKAGE_TARNAME}_long_version = "@(#)\$Version: $PACKAGE_STRING by @USER@ on @HOST@ ($host) @DATE@ \$"; +const char *${PACKAGE_TARNAME}_version = "$PACKAGE_STRING"; FOOBAR if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then @@ -21,5 +21,4 @@ else mv -f include/newversion.h.in include/version.h.in sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h fi -dnl ],host=$host PACKAGE=$PACKAGE VERSION=$VERSION) ]) diff --git a/crypto/heimdal/cf/make-proto.pl b/crypto/heimdal/cf/make-proto.pl index 9850d24..dd386e4 100644 --- a/crypto/heimdal/cf/make-proto.pl +++ b/crypto/heimdal/cf/make-proto.pl @@ -1,5 +1,5 @@ # Make prototypes from .c files -# $Id: make-proto.pl,v 1.12 2001/06/23 22:29:18 assar Exp $ +# $Id: make-proto.pl,v 1.15 2002/08/12 16:23:58 joda Exp $ ##use Getopt::Std; require 'getopts.pl'; @@ -7,13 +7,23 @@ require 'getopts.pl'; $brace = 0; $line = ""; $debug = 0; +$oproto = 1; +$private_func_re = "^_"; -do Getopts('o:p:d') || die "foo"; +do Getopts('o:p:dqR:P:') || die "foo"; if($opt_d) { $debug = 1; } +if($opt_q) { + $oproto = 0; +} + +if($opt_R) { + $private_func_re = $opt_R; +} + while(<>) { print $brace, " ", $_ if($debug); if(/^\#if 0/) { @@ -50,28 +60,43 @@ while(<>) { $attr = ""; } # remove outer () - s/\s*\(/@/; - s/\)\s?$/@/; + s/\s*\(/</; + s/\)\s?$/>/; # remove , within () while(s/\(([^()]*),(.*)\)/($1\$$2)/g){} + s/\<\s*void\s*\>/<>/; + # remove parameter names + if($opt_P eq "remove") { + s/(\s*)([a-zA-Z0-9_]+)([,>])/$3/g; + s/\(\*(\s*)([a-zA-Z0-9_]+)\)/(*)/g; + } elsif($opt_P eq "comment") { + s/([a-zA-Z0-9_]+)([,>])/\/\*$1\*\/$2/g; + s/\(\*([a-zA-Z0-9_]+)\)/(*\/\*$1\*\/)/g; + } + s/\<\>/<void>/; + # add newlines before parameters s/,\s*/,\n\t/g; # fix removed , s/\$/,/g; # match function name - /([a-zA-Z0-9_]+)\s*@/; + /([a-zA-Z0-9_]+)\s*\</; $f = $1; + if($oproto) { + $LP = "__P(("; + $RP = "))"; + } else { + $LP = "("; + $RP = ")"; + } # only add newline if more than one parameter - $LP = "(("; # XXX workaround for indentation bug in emacs - $RP = "))"; - $P = "__P(("; if(/,/){ - s/@/ __P$LP\n\t/; + s/\</ $LP\n\t/; }else{ - s/@/ __P$LP/; + s/\</ $LP/; } - s/@/$RP/; + s/\>/$RP/; # insert newline before function name - s/(.*)\s([a-zA-Z0-9_]+ __P)/$1\n$2/; + s/(.*)\s([a-zA-Z0-9_]+ \Q$LP\E)/$1\n$2/; if($attr ne "") { $_ .= "\n $attr"; } @@ -121,7 +146,9 @@ $public_h_header = "/* This is a generated file */ #ifndef $block #define $block -#ifdef __STDC__ +"; +if ($oproto) { +$public_h_header .= "#ifdef __STDC__ #include <stdarg.h> #ifndef __P #define __P(x) x @@ -133,12 +160,19 @@ $public_h_header = "/* This is a generated file */ #endif "; +} else { + $public_h_header .= "#include <stdarg.h> + +"; +} $private_h_header = "/* This is a generated file */ #ifndef $private #define $private -#ifdef __STDC__ +"; +if($oproto) { +$private_h_header .= "#ifdef __STDC__ #include <stdarg.h> #ifndef __P #define __P(x) x @@ -150,10 +184,14 @@ $private_h_header = "/* This is a generated file */ #endif "; +} else { + $private_h_header .= "#include <stdarg.h> +"; +} foreach(sort keys %funcs){ if(/^(main)$/) { next } - if(/^_/) { + if(/$private_func_re/) { $private_h .= $funcs{$_} . "\n\n"; if($funcs{$_} =~ /__attribute__/) { $private_attribute_seen = 1; diff --git a/crypto/heimdal/cf/mips-abi.m4 b/crypto/heimdal/cf/mips-abi.m4 index afd3fc0..5ad464c 100644 --- a/crypto/heimdal/cf/mips-abi.m4 +++ b/crypto/heimdal/cf/mips-abi.m4 @@ -1,4 +1,4 @@ -dnl $Id: mips-abi.m4,v 1.5 2000/07/18 15:01:42 joda Exp $ +dnl $Id: mips-abi.m4,v 1.6 2002/04/30 16:46:05 joda Exp $ dnl dnl dnl Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext to some @@ -6,7 +6,7 @@ dnl value. AC_DEFUN(AC_MIPS_ABI, [ AC_ARG_WITH(mips_abi, -[ --with-mips-abi=abi ABI to use for IRIX (32, n32, or 64)]) + AC_HELP_STRING([--with-mips-abi=abi],[ABI to use for IRIX (32, n32, or 64)])) case "$host_os" in irix*) diff --git a/crypto/heimdal/cf/misc.m4 b/crypto/heimdal/cf/misc.m4 index c8c3804..a825834 100644 --- a/crypto/heimdal/cf/misc.m4 +++ b/crypto/heimdal/cf/misc.m4 @@ -1,25 +1,13 @@ -dnl $Id: misc.m4,v 1.2 2000/07/19 15:04:00 joda Exp $ + +dnl $Id: misc.m4,v 1.5 2002/05/24 15:35:32 joda Exp $ dnl AC_DEFUN([upcase],[`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`])dnl +AC_DEFUN([rk_LIBOBJ],[AC_LIBOBJ([$1])])dnl AC_DEFUN([rk_CONFIG_HEADER],[AH_TOP([#ifndef RCSID #define RCSID(msg) \ -static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg } +static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } #endif -#undef BINDIR -#undef LIBDIR -#undef LIBEXECDIR -#undef SBINDIR - -#undef HAVE_INT8_T -#undef HAVE_INT16_T -#undef HAVE_INT32_T -#undef HAVE_INT64_T -#undef HAVE_U_INT8_T -#undef HAVE_U_INT16_T -#undef HAVE_U_INT32_T -#undef HAVE_U_INT64_T - /* Maximum values on all known systems */ #define MaxHostNameLen (64+4) #define MaxPathLen (1024+4) diff --git a/crypto/heimdal/cf/need-proto.m4 b/crypto/heimdal/cf/need-proto.m4 index 8c8d1d3..52f05ba 100644 --- a/crypto/heimdal/cf/need-proto.m4 +++ b/crypto/heimdal/cf/need-proto.m4 @@ -1,4 +1,4 @@ -dnl $Id: need-proto.m4,v 1.2 1999/03/01 09:52:24 joda Exp $ +dnl $Id: need-proto.m4,v 1.4 2002/08/23 15:07:41 joda Exp $ dnl dnl dnl Check if we need the prototype for a function @@ -16,10 +16,9 @@ $2(&xx); ], eval "ac_cv_func_$2_noproto=yes", eval "ac_cv_func_$2_noproto=no")) -define([foo], [NEED_]translit($2, [a-z], [A-Z])[_PROTO]) if test "$ac_cv_func_$2_noproto" = yes; then - AC_DEFINE(foo, 1, [define if the system is missing a prototype for $2()]) + AC_DEFINE(AS_TR_CPP(NEED_[]$2[]_PROTO), 1, + [define if the system is missing a prototype for $2()]) fi -undefine([foo]) fi ]) diff --git a/crypto/heimdal/cf/osfc2.m4 b/crypto/heimdal/cf/osfc2.m4 index d8cb2e1..af30596 100644 --- a/crypto/heimdal/cf/osfc2.m4 +++ b/crypto/heimdal/cf/osfc2.m4 @@ -1,10 +1,10 @@ -dnl $Id: osfc2.m4,v 1.2 1999/03/27 17:28:16 joda Exp $ +dnl $Id: osfc2.m4,v 1.3 2002/04/30 16:46:18 joda Exp $ dnl dnl enable OSF C2 stuff AC_DEFUN(AC_CHECK_OSFC2,[ AC_ARG_ENABLE(osfc2, -[ --enable-osfc2 enable some OSF C2 support]) + AC_HELP_STRING([--enable-osfc2],[enable some OSF C2 support])) LIB_security= if test "$enable_osfc2" = yes; then AC_DEFINE(HAVE_OSFC2, 1, [Define to enable basic OSF C2 support.]) diff --git a/crypto/heimdal/cf/otp.m4 b/crypto/heimdal/cf/otp.m4 new file mode 100644 index 0000000..37265ef --- /dev/null +++ b/crypto/heimdal/cf/otp.m4 @@ -0,0 +1,27 @@ +dnl $Id: otp.m4,v 1.2 2002/05/19 20:51:08 joda Exp $ +dnl +dnl check requirements for OTP library +dnl +AC_DEFUN([rk_OTP],[ +AC_REQUIRE([rk_DB])dnl +AC_ARG_ENABLE(otp, + AC_HELP_STRING([--disable-otp],[if you don't want OTP support])) +if test "$enable_otp" = yes -a "$db_type" = unknown; then + AC_MSG_ERROR([OTP requires a NDBM/DB compatible library]) +fi +if test "$enable_otp" != no; then + if test "$db_type" != unknown; then + enable_otp=yes + else + enable_otp=no + fi +fi +if test "$enable_otp" = yes; then + AC_DEFINE(OTP, 1, [Define if you want OTP support in applications.]) + LIB_otp='$(top_builddir)/lib/otp/libotp.la' + AC_SUBST(LIB_otp) +fi +AC_MSG_CHECKING([whether to enable OTP library]) +AC_MSG_RESULT($enable_otp) +AM_CONDITIONAL(OTP, test "$enable_otp" = yes)dnl +]) diff --git a/crypto/heimdal/cf/roken-frag.m4 b/crypto/heimdal/cf/roken-frag.m4 index e5be036..51e39cc 100644 --- a/crypto/heimdal/cf/roken-frag.m4 +++ b/crypto/heimdal/cf/roken-frag.m4 @@ -1,4 +1,4 @@ -dnl $Id: roken-frag.m4,v 1.34 2001/11/30 03:29:47 assar Exp $ +dnl $Id: roken-frag.m4,v 1.42 2002/08/26 13:26:52 assar Exp $ dnl dnl some code to get roken working dnl @@ -33,7 +33,7 @@ AC_REQUIRE([rk_DB]) dnl C types AC_REQUIRE([AC_TYPE_SIZE_T]) -AC_CHECK_TYPE_EXTRA(ssize_t, int, [#include <unistd.h>]) +AC_HAVE_TYPE([ssize_t],[#include <unistd.h>]) AC_REQUIRE([AC_TYPE_PID_T]) AC_REQUIRE([AC_TYPE_UID_T]) AC_HAVE_TYPE([long long]) @@ -144,12 +144,28 @@ AC_FIND_FUNC(dn_expand, resolv, ], [0,0,0,0,0]) +rk_CHECK_VAR(_res, +[#include <stdio.h> +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif +#ifdef HAVE_ARPA_NAMESER_H +#include <arpa/nameser.h> +#endif +#ifdef HAVE_RESOLV_H +#include <resolv.h> +#endif]) + + AC_BROKEN_SNPRINTF AC_BROKEN_VSNPRINTF AC_BROKEN_GLOB if test "$ac_cv_func_glob_working" != yes; then - LIBOBJS="$LIBOBJS glob.o" + AC_LIBOBJ(glob) fi AM_CONDITIONAL(have_glob_h, test "$ac_cv_func_glob_working" = yes) @@ -184,7 +200,7 @@ AC_CHECK_FUNCS([ \ ]) if test "$ac_cv_func_cgetent" = no; then - LIBOBJS="$LIBOBJS getcap.o" + AC_LIBOBJ(getcap) fi AC_REQUIRE([AC_FUNC_GETLOGIN]) @@ -211,39 +227,17 @@ AC_FIND_IF_NOT_BROKEN(hstrerror, resolv, #include <netdb.h> #endif], 17) -if test "$ac_cv_func_hstrerror" = yes; then AC_NEED_PROTO([ #ifdef HAVE_NETDB_H #include <netdb.h> #endif], hstrerror) -fi -dnl sigh, wish this could be done in a loop -if test "$ac_cv_func_asprintf" = yes; then -AC_NEED_PROTO([ -#include <stdio.h> -#include <string.h>], -asprintf)dnl -fi -if test "$ac_cv_func_vasprintf" = yes; then -AC_NEED_PROTO([ -#include <stdio.h> -#include <string.h>], -vasprintf)dnl -fi -if test "$ac_cv_func_asnprintf" = yes; then -AC_NEED_PROTO([ -#include <stdio.h> -#include <string.h>], -asnprintf)dnl -fi -if test "$ac_cv_func_vasnprintf" = yes; then -AC_NEED_PROTO([ -#include <stdio.h> -#include <string.h>], -vasnprintf)dnl -fi +AC_FOREACH([rk_func], [asprintf vasprintf asnprintf vasnprintf], + [AC_NEED_PROTO([ + #include <stdio.h> + #include <string.h>], + rk_func)]) AC_FIND_FUNC_NO_LIBS(bswap16,, [#ifdef HAVE_SYS_BSWAP_H @@ -349,6 +343,14 @@ AC_BROKEN([ \ writev \ ]) +AC_FOREACH([rk_func], [strndup strsep strtok_r], + [AC_NEED_PROTO([#include <string.h>], rk_func)]) + +AC_FOREACH([rk_func], [strsvis strunvis strvis strvisx svis unvis vis], +[AC_NEED_PROTO([#ifdef HAVE_VIS_H +#include <vis.h> +#endif], rk_func)]) + AC_BROKEN2(inet_aton, [#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -404,14 +406,15 @@ AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h> if test "$ac_cv_func_getnameinfo" = "yes"; then rk_BROKEN_GETNAMEINFO if test "$ac_cv_func_getnameinfo_broken" = yes; then - LIBOBJS="$LIBOBJS getnameinfo.o" + AC_LIBOBJ(getnameinfo) fi fi if test "$ac_cv_func_getaddrinfo" = "yes"; then rk_BROKEN_GETADDRINFO if test "$ac_cv_func_getaddrinfo_numserv" = no; then - LIBOBJS="$LIBOBJS getaddrinfo.o freeaddrinfo.o" + AC_LIBOBJ(getaddrinfo) + AC_LIBOBJ(freeaddrinfo) fi fi @@ -530,16 +533,6 @@ AC_NEED_PROTO([ ], crypt) -AC_NEED_PROTO([ -#include <string.h> -], -strtok_r) - -AC_NEED_PROTO([ -#include <string.h> -], -strsep) - dnl variables rk_CHECK_VAR(h_errno, @@ -596,6 +589,7 @@ dnl or do we have a variable `timezone' ? dnl rk_CHECK_VAR(timezone,[#include <time.h>]) +rk_CHECK_VAR(altzone,[#include <time.h>]) AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>]) AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>]) @@ -603,6 +597,14 @@ 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_HAVE_TYPE([struct iovec],[ +#include <sys/types.h> +#include <sys/uio.h> +]) +AC_HAVE_TYPE([struct msghdr],[ +#include <sys/types.h> +#include <sys/socket.h> +]) dnl dnl Check for struct winsize diff --git a/crypto/heimdal/cf/roken.m4 b/crypto/heimdal/cf/roken.m4 index f5a8678..c835a15 100644 --- a/crypto/heimdal/cf/roken.m4 +++ b/crypto/heimdal/cf/roken.m4 @@ -1,4 +1,4 @@ -dnl $Id: roken.m4,v 1.2 2000/07/08 15:50:34 assar Exp $ +dnl $Id: roken.m4,v 1.3 2002/04/30 16:46:33 joda Exp $ dnl dnl try to look for an installed roken library with sufficient stuff dnl @@ -10,7 +10,7 @@ dnl AC_ROKEN(version,directory-to-try,roken-dir,fallback-library,fallback-cppfla AC_DEFUN(AC_ROKEN, [ AC_ARG_WITH(roken, -[ --with-roken=dir use the roken library in dir], + AC_HELP_STRING([--with-roken=dir],[use the roken library in dir]), [if test "$withval" = "no"; then AC_MSG_ERROR(roken is required) fi]) diff --git a/crypto/heimdal/cf/sunos.m4 b/crypto/heimdal/cf/sunos.m4 new file mode 100644 index 0000000..4a4400e --- /dev/null +++ b/crypto/heimdal/cf/sunos.m4 @@ -0,0 +1,25 @@ +dnl +dnl $Id: sunos.m4,v 1.1 2002/08/28 19:53:51 joda Exp $ +dnl + +AC_DEFUN([rk_SUNOS],[ +sunos=no +case "$host" in +*-*-sunos4*) + sunos=40 + ;; +*-*-solaris2.7) + sunos=57 + ;; +*-*-solaris2.[89]) + sunos=58 + ;; +*-*-solaris2*) + sunos=50 + ;; +esac +if test "$sunos" != no; then + AC_DEFINE_UNQUOTED(SunOS, $sunos, + [Define to what version of SunOS you are running.]) +fi +])
\ No newline at end of file diff --git a/crypto/heimdal/cf/telnet.m4 b/crypto/heimdal/cf/telnet.m4 new file mode 100644 index 0000000..add065c --- /dev/null +++ b/crypto/heimdal/cf/telnet.m4 @@ -0,0 +1,78 @@ +dnl +dnl $Id: telnet.m4,v 1.1 2002/08/28 19:19:01 joda Exp $ +dnl +dnl stuff used by telnet + +AC_DEFUN([rk_TELNET],[ +AC_DEFINE(AUTHENTICATION, 1, + [Define if you want authentication support in telnet.])dnl +AC_DEFINE(ENCRYPTION, 1, + [Define if you want encryption support in telnet.])dnl +AC_DEFINE(DES_ENCRYPTION, 1, + [Define if you want to use DES encryption in telnet.])dnl +AC_DEFINE(DIAGNOSTICS, 1, + [Define this to enable diagnostics in telnet.])dnl +AC_DEFINE(OLD_ENVIRON, 1, + [Define this to enable old environment option in telnet.])dnl +if false; then + AC_DEFINE(ENV_HACK, 1, + [Define this if you want support for broken ENV_{VAR,VAL} telnets.]) +fi + +# Simple test for streamspty, based on the existance of getmsg(), alas +# this breaks on SunOS4 which have streams but BSD-like ptys +# +# And also something wierd has happend with dec-osf1, fallback to bsd-ptys + +case "$host" in +*-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*) + ;; +*) + AC_CHECK_FUNC(getmsg) + if test "$ac_cv_func_getmsg" = "yes"; then + AC_CACHE_CHECK([if getmsg works], ac_cv_func_getmsg_works, + AC_TRY_RUN([ + #include <stdio.h> + #include <errno.h> + + int main() + { + int ret; + ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL); + if(ret < 0 && errno == ENOSYS) + return 1; + return 0; + } + ], ac_cv_func_getmsg_works=yes, + ac_cv_func_getmsg_works=no, + ac_cv_func_getmsg_works=no)) + if test "$ac_cv_func_getmsg_works" = "yes"; then + AC_DEFINE(HAVE_GETMSG, 1, + [Define if you have a working getmsg.]) + AC_DEFINE(STREAMSPTY, 1, + [Define if you have streams ptys.]) + fi + fi + ;; +esac + +AH_BOTTOM([ +#if defined(ENCRYPTION) && !defined(AUTHENTICATION) +#define AUTHENTICATION 1 +#endif + +/* Set this to the default system lead string for telnetd + * can contain %-escapes: %s=sysname, %m=machine, %r=os-release + * %v=os-version, %t=tty, %h=hostname, %d=date and time + */ +#undef USE_IM + +/* Used with login -p */ +#undef LOGIN_ARGS + +/* set this to a sensible login */ +#ifndef LOGIN_PATH +#define LOGIN_PATH BINDIR "/login" +#endif +]) +]) diff --git a/crypto/heimdal/cf/test-package.m4 b/crypto/heimdal/cf/test-package.m4 index 6aac770..00e7f34 100644 --- a/crypto/heimdal/cf/test-package.m4 +++ b/crypto/heimdal/cf/test-package.m4 @@ -1,93 +1,125 @@ -dnl $Id: test-package.m4,v 1.9 2000/12/15 04:54:24 assar Exp $ +dnl $Id: test-package.m4,v 1.11 2002/08/28 19:30:48 joda Exp $ dnl -dnl AC_TEST_PACKAGE_NEW(package,headers,libraries,extra libs,default locations, conditional) +dnl rk_TEST_PACKAGE(package,headers,libraries,extra libs, +dnl default locations, conditional, config-program) -AC_DEFUN(AC_TEST_PACKAGE,[AC_TEST_PACKAGE_NEW($1,[#include <$2>],$4,,$5)]) - -AC_DEFUN(AC_TEST_PACKAGE_NEW,[ +AC_DEFUN(rk_TEST_PACKAGE,[ AC_ARG_WITH($1, -[ --with-$1=dir use $1 in dir]) + AC_HELP_STRING([--with-$1=dir],[use $1 in dir])) AC_ARG_WITH($1-lib, -[ --with-$1-lib=dir use $1 libraries in dir], + AC_HELP_STRING([--with-$1-lib=dir],[use $1 libraries in dir]), [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-$1-lib]) elif test "X$with_$1" = "X"; then with_$1=yes fi]) AC_ARG_WITH($1-include, -[ --with-$1-include=dir use $1 headers in dir], + AC_HELP_STRING([--with-$1-include=dir],[use $1 headers in dir]), [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-$1-include]) elif test "X$with_$1" = "X"; then with_$1=yes fi]) +AC_ARG_WITH($1-config, + AC_HELP_STRING([--with-$1-config=path],[config program for $1])) + +m4_ifval([$6], + m4_define([rk_pkgname], $6), + m4_define([rk_pkgname], AS_TR_CPP($1))) AC_MSG_CHECKING(for $1) case "$with_$1" in -yes) ;; -no) ;; -"") ;; -*) if test "$with_$1_include" = ""; then - with_$1_include="$with_$1/include" - fi - if test "$with_$1_lib" = ""; then - with_$1_lib="$with_$1/lib$abilibdirext" - fi - ;; +yes|"") d='$5' ;; +no) d= ;; +*) d="$with_$1" ;; esac + header_dirs= lib_dirs= -d='$5' for i in $d; do - header_dirs="$header_dirs $i/include" - lib_dirs="$lib_dirs $i/lib$abilibdirext" + if test "$with_$1_include" = ""; then + if test -d "$i/include/$1"; then + header_dirs="$header_dirs $i/include/$1" + fi + if test -d "$i/include"; then + header_dirs="$header_dirs $i/include" + fi + fi + if test "$with_$1_lib" = ""; then + if test -d "$i/lib$abilibdirext"; then + lib_dirs="$lib_dirs $i/lib$abilibdirext" + fi + fi done -case "$with_$1_include" in -yes) ;; -no) ;; -*) header_dirs="$with_$1_include $header_dirs";; -esac -case "$with_$1_lib" in -yes) ;; -no) ;; -*) lib_dirs="$with_$1_lib $lib_dirs";; +if test "$with_$1_include"; then + header_dirs="$with_$1_include $header_dirs" +fi +if test "$with_$1_lib"; then + lib_dirs="$with_$1_lib $lib_dirs" +fi + +if test "$with_$1_config" = ""; then + with_$1_config='$7' +fi + +$1_cflags= +$1_libs= + +case "$with_$1_config" in +yes|no|"") + ;; +*) + $1_cflags="`$with_$1_config --cflags 2>&1`" + $1_libs="`$with_$1_config --libs 2>&1`" + ;; esac -save_CFLAGS="$CFLAGS" -save_LIBS="$LIBS" -ires= lres= -for i in $header_dirs; do - CFLAGS="-I$i $save_CFLAGS" - AC_TRY_COMPILE([$2],,ires=$i;break) -done -for i in $lib_dirs; do - LIBS="-L$i $3 $4 $save_LIBS" - AC_TRY_LINK([$2],,lres=$i;break) -done -CFLAGS="$save_CFLAGS" -LIBS="$save_LIBS" +found=no +if test "$with_$1" != no; then + save_CFLAGS="$CFLAGS" + save_LIBS="$LIBS" + if test "$[]$1_cflags" -a "$[]$1_libs"; then + CFLAGS="$[]$1_cflags $save_CFLAGS" + LIBS="$[]$1_libs $save_LIBS" + AC_TRY_LINK([$2],,[ + INCLUDE_$1="$[]$1_cflags" + LIB_$1="$[]$1_libs" + AC_MSG_RESULT([from $with_$1_config]) + found=yes]) + fi + if test "$found" = no; then + ires= lres= + for i in $header_dirs; do + CFLAGS="-I$i $save_CFLAGS" + AC_TRY_COMPILE([$2],,ires=$i;break) + done + for i in $lib_dirs; do + LIBS="-L$i $3 $4 $save_LIBS" + AC_TRY_LINK([$2],,lres=$i;break) + done + if test "$ires" -a "$lres" -a "$with_$1" != "no"; then + INCLUDE_$1="-I$ires" + LIB_$1="-L$lres $3" + found=yes + AC_MSG_RESULT([headers $ires, libraries $lres]) + fi + fi + CFLAGS="$save_CFLAGS" + LIBS="$save_LIBS" +fi -if test "$ires" -a "$lres" -a "$with_$1" != "no"; then - $1_includedir="$ires" - $1_libdir="$lres" - INCLUDE_$1="-I$$1_includedir" - LIB_$1="-L$$1_libdir $3" - m4_ifval([$6], - AC_DEFINE_UNQUOTED($6,1,[Define if you have the $1 package.]), - AC_DEFINE_UNQUOTED(upcase($1),1,[Define if you have the $1 package.])) +if test "$found" = yes; then + AC_DEFINE_UNQUOTED(rk_pkgname, 1, [Define if you have the $1 package.]) with_$1=yes - AC_MSG_RESULT([headers $ires, libraries $lres]) else + with_$1=no INCLUDE_$1= LIB_$1= - with_$1=no - AC_MSG_RESULT($with_$1) + AC_MSG_RESULT(no) fi -dnl m4_ifval([$6], -dnl AM_CONDITIONAL($6, test "$with_$1" = yes) -dnl AM_CONDITIONAL(upcase($1), test "$with_$1" = yes)) + AC_SUBST(INCLUDE_$1) AC_SUBST(LIB_$1) ]) |