diff options
author | nectar <nectar@FreeBSD.org> | 2002-02-19 15:46:56 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-02-19 15:46:56 +0000 |
commit | 69a91bec14ec3ad49d1c8a82c40a796755f9e4a3 (patch) | |
tree | 85ecf91fd00875cec4b93111d3a8ed9eec9cddfe /crypto/heimdal/cf | |
parent | 8db4cdb3da4228a5d93635e43825e2e8a2f66db7 (diff) | |
download | FreeBSD-src-69a91bec14ec3ad49d1c8a82c40a796755f9e4a3.zip FreeBSD-src-69a91bec14ec3ad49d1c8a82c40a796755f9e4a3.tar.gz |
Import of Heimdal Kerberos from KTH repository circa 2002/02/17.
Diffstat (limited to 'crypto/heimdal/cf')
-rw-r--r-- | crypto/heimdal/cf/ChangeLog | 146 | ||||
-rw-r--r-- | crypto/heimdal/cf/Makefile.am.common | 10 | ||||
-rw-r--r-- | crypto/heimdal/cf/auth-modules.m4 | 6 | ||||
-rw-r--r-- | crypto/heimdal/cf/broken-getaddrinfo.m4 | 24 | ||||
-rw-r--r-- | crypto/heimdal/cf/broken-glob.m4 | 10 | ||||
-rw-r--r-- | crypto/heimdal/cf/broken-snprintf.m4 | 10 | ||||
-rw-r--r-- | crypto/heimdal/cf/check-compile-et.m4 | 77 | ||||
-rw-r--r-- | crypto/heimdal/cf/check-var.m4 | 4 | ||||
-rw-r--r-- | crypto/heimdal/cf/crypto.m4 | 119 | ||||
-rw-r--r-- | crypto/heimdal/cf/db.m4 | 181 | ||||
-rw-r--r-- | crypto/heimdal/cf/find-func-no-libs2.m4 | 14 | ||||
-rwxr-xr-x | crypto/heimdal/cf/install-catman.sh | 34 | ||||
-rw-r--r-- | crypto/heimdal/cf/krb-ipv6.m4 | 29 | ||||
-rw-r--r-- | crypto/heimdal/cf/krb-struct-winsize.m4 | 6 | ||||
-rw-r--r-- | crypto/heimdal/cf/make-proto.pl | 6 | ||||
-rw-r--r-- | crypto/heimdal/cf/roken-frag.m4 | 57 | ||||
-rw-r--r-- | crypto/heimdal/cf/with-all.m4 | 42 |
17 files changed, 704 insertions, 71 deletions
diff --git a/crypto/heimdal/cf/ChangeLog b/crypto/heimdal/cf/ChangeLog index e56198a..0decfb5 100644 --- a/crypto/heimdal/cf/ChangeLog +++ b/crypto/heimdal/cf/ChangeLog @@ -1,3 +1,149 @@ +2001-11-30 Assar Westerlund <assar@sics.se> + + * roken-frag.m4: move ipv6 tests after -lsocket (to handle Solaris + 8) + +2001-09-29 Assar Westerlund <assar@sics.se> + + * install-catman.sh: handle man pages without SYNOPSIS but looking + for both SYNOPSIS and DESCRIPTION + +2001-09-18 Johan Danielsson <joda@pdc.kth.se> + + * roken-frag.m4: include freeaddrinfo if using getaddrinfo + +2001-09-13 Assar Westerlund <assar@sics.se> + + * db.m4: test for the ndbm database really being a .db one + and use it when moving/removing database files + +2001-09-03 Assar Westerlund <assar@sics.se> + + * db.m4: prefer ndbm.h to dbm.h + * roken-frag.m4: check for atexit and on_exit + +2001-09-02 Assar Westerlund <assar@sics.se> + + * check-compile-et.m4: only add /usr/include/et to CPPFLAGS if + it's actually used + +2001-09-01 Assar Westerlund <assar@sics.se> + + * Makefile.am.common (AUTOMAKE_OPTIONS): set 1.4b here so that + users are warned if using earlier automake versions + + * find-func-no-libs2.m4: ignore "no" as a library - another + special case to make it easy to send the result from this macro + into another invocation + +2001-08-30 Assar Westerlund <assar@sics.se> + + * db.m4: check for ndbm functions in db3 library too + +2001-08-29 Jacques Vidrine <n@nectar.com> + + * check-compile-et.m4: Check for already-installed com_err. + * Makefile.am.common: Use the compile_et discovered at + configuration time. + +2001-08-29 Assar Westerlund <assar@sics.se> + + * crypto.m4: use AC_WITH_ALL to allow separate specification of + include and lib + * with-all.m4: new macro for doing --with-foo, --with-foo-include, + and --with-foo-lib in a sensible way + + * find-func-no-libs2.m4: handle both -llib and lib in the second + argument also yes -> "" as a library, to ease callers that send in + results from this macro (this might be a little bit unclean) + +2001-08-28 Assar Westerlund <assar@sics.se> + + * roken-frag.m4: test for issetugid + +2001-08-24 Assar Westerlund <assar@sics.se> + + * Makefile.am.common: change one += to = to AM_CFLAGS to avoid an + error with recent automake + +2001-08-22 Assar Westerlund <assar@sics.se> + + * crypto.m4: SHA1_CTX should be SHA_CTX + +2001-08-21 Assar Westerlund <assar@sics.se> + + * roken-frag.m4: remove all winsock.h + for now, it does more harm than good under cygwin and if it should be + used, the correct conditional needs to be found + from <tol@stacken.kth.se> + +2001-08-21 Johan Danielsson <joda@pdc.kth.se> + + * check-var.m4: AC_TR_CPP -> AS_TR_CPP to make autoconf 2.52 happy + +2001-08-17 Johan Danielsson <joda@pdc.kth.se> + + * krb-ipv6.m4: add test for non-existant in6addr_loopback in AIX + +2001-08-15 Johan Danielsson <joda@pdc.kth.se> + + * roken-frag.m4: test for getaddrinfo's that doesn't like numeric + services + + * broken-getaddrinfo.m4: test for getaddrinfo's that doesn't like + numeric services + +2001-08-08 Assar Westerlund <assar@sics.se> + + * db.m4: do a separate test for gdbm/ndbm.h and -lgdbm + +2001-08-05 Assar Westerlund <assar@sics.se> + + * db.m4: ac_cv_funclib_\func can be yes + * db.m4: use AC_FIND_FUNC_NO_LIBS to test in libc + anset cache variables after first attempt at finding dbm_firstkey (how + should this be done?) + * db.m4: do not test for ndbm library when ndbm-db was found in libc + * db.m4: test for ndbm-compatability with db + * db.m4: add forgotten AC_SUBST + * db.m4: first steps towards a new db test + + * roken-frag.m4: remove header files checked by rk_db + +2001-08-05 Assar Westerlund <assar@sics.se> + + * roken-frag.m4: remove header files checked by rk_db + +2001-06-24 Assar Westerlund <assar@sics.se> + + * roken-frag.m4: make sure of building getaddrinfo et al if + missing + +2001-06-20 Johan Danielsson <joda@pdc.kth.se> + + * install-catman.sh: try to install links to manpages + +2001-06-19 Assar Westerlund <assar@sics.se> + + * broken-glob.m4: try to handle FreeBSD's GLOB_MAXPATH + +2001-06-18 Johan Danielsson <joda@pdc.kth.se> + + * roken-frag.m4: test for getaddrinfo needs netdb.h on Tru64 + +2001-06-17 Assar Westerlund <assar@sics.se> + + * roken-frag.m4 (AC_CHECK_HEADERS): test for random + * roken-frag.m4 (AC_CHECK_HEADERS): test for initstate and + setstate + + * roken-frag.m4 (AC_BROKEN): test for + emalloc,ecalloc,erealloc,estrdup + +2001-05-11 Johan Danielsson <joda@pdc.kth.se> + + * roken-frag.m4: bswap{16,32} + 2001-03-26 Assar Westerlund <assar@sics.se> * broken-glob.m4: also test for GLOB_LIMIT diff --git a/crypto/heimdal/cf/Makefile.am.common b/crypto/heimdal/cf/Makefile.am.common index 963460c..95f0284 100644 --- a/crypto/heimdal/cf/Makefile.am.common +++ b/crypto/heimdal/cf/Makefile.am.common @@ -1,17 +1,15 @@ -# $Id: Makefile.am.common,v 1.26 2001/05/21 13:27:48 joda Exp $ +# $Id: Makefile.am.common,v 1.31 2001/09/01 11:12:18 assar Exp $ -AUTOMAKE_OPTIONS = foreign no-dependencies +AUTOMAKE_OPTIONS = foreign no-dependencies 1.4b SUFFIXES = .et .h INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) -AM_CFLAGS += $(WFLAGS) +AM_CFLAGS = $(WFLAGS) CP = cp -COMPILE_ET = $(top_builddir)/lib/com_err/compile_et - ## set build_HEADERZ to headers that should just be installed in build tree buildinclude = $(top_builddir)/include @@ -32,8 +30,8 @@ LIB_getsockopt = @LIB_getsockopt@ LIB_logout = @LIB_logout@ LIB_logwtmp = @LIB_logwtmp@ LIB_odm_initialize = @LIB_odm_initialize@ +LIB_openpty = @LIB_openpty@ LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ LIB_res_search = @LIB_res_search@ LIB_setpcred = @LIB_setpcred@ LIB_setsockopt = @LIB_setsockopt@ diff --git a/crypto/heimdal/cf/auth-modules.m4 b/crypto/heimdal/cf/auth-modules.m4 index 2f11c73..99ae597 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.1 1999/03/21 13:48:00 joda Exp $ +dnl $Id: auth-modules.m4,v 1.2 2001/09/01 11:56:05 assar Exp $ dnl dnl Figure what authentication modules should be built @@ -16,9 +16,7 @@ if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_shared" = yes; fi case "${host}" in -changequote(,)dnl -*-*-irix[56]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;; -changequote([,])dnl +*-*-irix[[56]]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;; esac AC_MSG_RESULT($LIB_AUTH_SUBDIRS) diff --git a/crypto/heimdal/cf/broken-getaddrinfo.m4 b/crypto/heimdal/cf/broken-getaddrinfo.m4 new file mode 100644 index 0000000..9a3f776 --- /dev/null +++ b/crypto/heimdal/cf/broken-getaddrinfo.m4 @@ -0,0 +1,24 @@ +dnl $Id: broken-getaddrinfo.m4,v 1.2 2001/08/22 01:05:29 assar Exp $ +dnl +dnl test if getaddrinfo can handle numeric services + +AC_DEFUN(rk_BROKEN_GETADDRINFO,[ +AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv, +AC_TRY_RUN([[#include <stdio.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <netdb.h> + +int +main(int argc, char **argv) +{ + struct addrinfo hints, *ai; + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_PASSIVE; + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = PF_UNSPEC; + if(getaddrinfo(NULL, "17", &hints, &ai) == EAI_SERVICE) + return 1; + return 0; +} +]], ac_cv_func_getaddrinfo_numserv=yes, ac_cv_func_getaddrinfo_numserv=no))]) diff --git a/crypto/heimdal/cf/broken-glob.m4 b/crypto/heimdal/cf/broken-glob.m4 index 149c957..1c01cdf 100644 --- a/crypto/heimdal/cf/broken-glob.m4 +++ b/crypto/heimdal/cf/broken-glob.m4 @@ -1,4 +1,4 @@ -dnl $Id: broken-glob.m4,v 1.3 2001/03/26 11:40:24 assar Exp $ +dnl $Id: broken-glob.m4,v 1.4 2001/06/19 09:59:46 assar Exp $ dnl dnl check for glob(3) dnl @@ -8,7 +8,13 @@ ac_cv_func_glob_working=yes AC_TRY_LINK([ #include <stdio.h> #include <glob.h>],[ -glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|GLOB_LIMIT, +glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE| +#ifdef GLOB_MAXPATH +GLOB_MAXPATH +#else +GLOB_LIMIT +#endif +, NULL, NULL); ],:,ac_cv_func_glob_working=no,:)) diff --git a/crypto/heimdal/cf/broken-snprintf.m4 b/crypto/heimdal/cf/broken-snprintf.m4 index efd69f0..4b66f97 100644 --- a/crypto/heimdal/cf/broken-snprintf.m4 +++ b/crypto/heimdal/cf/broken-snprintf.m4 @@ -1,4 +1,4 @@ -dnl $Id: broken-snprintf.m4,v 1.3 1999/03/01 09:52:22 joda Exp $ +dnl $Id: broken-snprintf.m4,v 1.4 2001/09/01 11:56:05 assar Exp $ dnl AC_DEFUN(AC_BROKEN_SNPRINTF, [ AC_CACHE_CHECK(for working snprintf,ac_cv_func_snprintf_working, @@ -8,9 +8,7 @@ AC_TRY_RUN([ #include <string.h> int main() { -changequote(`,')dnl - char foo[3]; -changequote([,])dnl + char foo[[3]]; snprintf(foo, 2, "12"); return strcmp(foo, "1"); }],:,ac_cv_func_snprintf_working=no,:)) @@ -33,9 +31,7 @@ AC_TRY_RUN([ int foo(int num, ...) { -changequote(`,')dnl - char bar[3]; -changequote([,])dnl + char bar[[3]]; va_list arg; va_start(arg, num); vsnprintf(bar, 2, "%s", arg); diff --git a/crypto/heimdal/cf/check-compile-et.m4 b/crypto/heimdal/cf/check-compile-et.m4 new file mode 100644 index 0000000..080faeb --- /dev/null +++ b/crypto/heimdal/cf/check-compile-et.m4 @@ -0,0 +1,77 @@ +dnl $Id: check-compile-et.m4,v 1.6 2001/09/02 17:08:48 assar Exp $ +dnl +dnl CHECK_COMPILE_ET +AC_DEFUN([CHECK_COMPILE_ET], [ + +AC_CHECK_PROG(COMPILE_ET, compile_et, [compile_et]) + +krb_cv_compile_et="no" +if test "${COMPILE_ET}" = "compile_et"; then + +dnl We have compile_et. Now let's see if it supports `prefix' and `index'. +AC_MSG_CHECKING(whether compile_et has the features we need) +cat > conftest_et.et <<'EOF' +error_table conf +prefix CONFTEST +index 1 +error_code CODE1, "CODE1" +index 128 +error_code CODE2, "CODE2" +end +EOF +if ${COMPILE_ET} conftest_et.et >/dev/null 2>&1; then + dnl XXX Some systems have <et/com_err.h>. + save_CPPFLAGS="${save_CPPFLAGS}" + if test -d "/usr/include/et"; then + CPPFLAGS="-I/usr/include/et ${CPPFLAGS}" + fi + dnl Check that the `prefix' and `index' directives were honored. + AC_TRY_RUN([ +#include <com_err.h> +#include <string.h> +#include "conftest_et.h" +int main(){return (CONFTEST_CODE2 - CONFTEST_CODE1) != 127;} + ], [krb_cv_compile_et="yes"],[CPPFLAGS="${save_CPPFLAGS}"]) +fi +AC_MSG_RESULT(${krb_cv_compile_et}) +rm -fr conftest* +fi + +if test "${krb_cv_compile_et}" = "yes"; then + dnl Since compile_et seems to work, let's check libcom_err + krb_cv_save_LIBS="${LIBS}" + LIBS="${LIBS} -lcom_err" + AC_MSG_CHECKING(for com_err) + AC_TRY_LINK([#include <com_err.h>],[ + const char *p; + p = error_message(0); + ],[krb_cv_com_err="yes"],[krb_cv_com_err="no"; CPPFLAGS="${save_CPPFLAGS}"]) + AC_MSG_RESULT(${krb_cv_com_err}) + LIBS="${krb_cv_save_LIBS}" +else + dnl Since compile_et doesn't work, forget about libcom_err + krb_cv_com_err="no" +fi + +dnl Only use the system's com_err if we found compile_et, libcom_err, and +dnl com_err.h. +if test "${krb_cv_com_err}" = "yes"; then + DIR_com_err="" + LIB_com_err="-lcom_err" + LIB_com_err_a="" + LIB_com_err_so="" + AC_MSG_NOTICE(Using the already-installed com_err) +else + COMPILE_ET="\$(top_builddir)/lib/com_err/compile_et" + DIR_com_err="com_err" + LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la" + LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a" + LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so" + AC_MSG_NOTICE(Using our own com_err) +fi +AC_SUBST(DIR_com_err) +AC_SUBST(LIB_com_err) +AC_SUBST(LIB_com_err_a) +AC_SUBST(LIB_com_err_so) + +]) diff --git a/crypto/heimdal/cf/check-var.m4 b/crypto/heimdal/cf/check-var.m4 index 8041c32..e409067 100644 --- a/crypto/heimdal/cf/check-var.m4 +++ b/crypto/heimdal/cf/check-var.m4 @@ -1,4 +1,4 @@ -dnl $Id: check-var.m4,v 1.5 2000/12/15 04:54:06 assar Exp $ +dnl $Id: check-var.m4,v 1.6 2001/08/21 12:00:16 joda Exp $ dnl dnl rk_CHECK_VAR(variable, includes) AC_DEFUN([rk_CHECK_VAR], [ @@ -12,7 +12,7 @@ int foo() { return $1; }], ac_foo=`eval echo \\$ac_cv_var_$1` AC_MSG_RESULT($ac_foo) if test "$ac_foo" = yes; then - AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]$1), 1, + AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, [Define if you have the `]$1[' variable.]) m4_ifval([$2], AC_CHECK_DECLARATION([$2],[$1])) fi diff --git a/crypto/heimdal/cf/crypto.m4 b/crypto/heimdal/cf/crypto.m4 new file mode 100644 index 0000000..d16d348 --- /dev/null +++ b/crypto/heimdal/cf/crypto.m4 @@ -0,0 +1,119 @@ +dnl $Id: crypto.m4,v 1.7 2001/08/29 17:02:48 assar Exp $ +dnl +dnl test for crypto libraries: +dnl - libcrypto (from openssl) +dnl - libdes (from krb4) +dnl - own-built libdes + +AC_DEFUN([KRB_CRYPTO],[ +crypto_lib=unknown +AC_WITH_ALL([openssl]) + +DIR_des= + +AC_MSG_CHECKING([for crypto library]) + +if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then + + save_CPPFLAGS="$CPPFLAGS" + save_LIBS="$LIBS" + INCLUDE_des= + LIB_des= + if test "$with_openssl_include" != ""; then + INCLUDE_des="-I${with_openssl}/include" + fi + if test "$with_openssl_lib" != ""; then + LIB_des="-L${with_openssl}/lib" + fi + CPPFLAGS="${INCLUDE_des} ${CPPFLAGS}" + LIB_des="${LIB_des} -lcrypto" + LIB_des_a="$LIB_des" + LIB_des_so="$LIB_des" + LIB_des_appl="$LIB_des" + LIBS="${LIBS} ${LIB_des}" + AC_TRY_LINK([ + #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); + ], [ + crypto_lib=libcrypto + AC_DEFINE([HAVE_OPENSSL], 1, [define to use openssl's libcrypto]) + 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" +fi + +if test "$crypto_lib" = "unknown"; then + + DIR_des='des' + LIB_des='$(top_builddir)/lib/des/libdes.la' + LIB_des_a='$(top_builddir)/lib/des/.libs/libdes.a' + LIB_des_so='$(top_builddir)/lib/des/.libs/libdes.so' + LIB_des_appl="-ldes" + + AC_MSG_RESULT([included libdes]) + +fi + +AC_SUBST(DIR_des) +AC_SUBST(INCLUDE_des) +AC_SUBST(LIB_des) +AC_SUBST(LIB_des_a) +AC_SUBST(LIB_des_so) +AC_SUBST(LIB_des_appl) +]) diff --git a/crypto/heimdal/cf/db.m4 b/crypto/heimdal/cf/db.m4 index c147569..8c72798 100644 --- a/crypto/heimdal/cf/db.m4 +++ b/crypto/heimdal/cf/db.m4 @@ -1,4 +1,4 @@ -dnl $Id: db.m4,v 1.1 2000/07/19 11:21:07 joda Exp $ +dnl $Id: db.m4,v 1.5 2001/09/13 00:34:07 assar Exp $ dnl dnl tests for various db libraries dnl @@ -9,32 +9,175 @@ if test "$withval" = no; then berkeley_db="" fi ]) + +have_ndbm=no +db_type=unknown + if test "$berkeley_db"; then + AC_CHECK_HEADERS([ \ db.h \ db_185.h \ ]) -fi -AC_FIND_FUNC_NO_LIBS2(dbopen, $berkeley_db, [ -#include <stdio.h> -#if defined(HAVE_DB_185_H) -#include <db_185.h> -#elif defined(HAVE_DB_H) -#include <db.h> -#endif -],[NULL, 0, 0, 0, NULL]) +dnl db_create is used by db3 -AC_FIND_FUNC_NO_LIBS(dbm_firstkey, $berkeley_db gdbm ndbm) -AC_FIND_FUNC_NO_LIBS(db_create, $berkeley_db) + AC_FIND_FUNC_NO_LIBS(db_create, $berkeley_db, [ + #include <stdio.h> + #include <db.h> + ],[NULL, NULL, 0]) -DBLIB="$LIB_dbopen" -if test "$LIB_dbopen" != "$LIB_db_create"; then - DBLIB="$DBLIB $LIB_db_create" -fi -if test "$LIB_dbopen" != "$LIB_dbm_firstkey"; then - DBLIB="$DBLIB $LIB_dbm_firstkey" + if test "$ac_cv_func_db_create" = "yes"; then + db_type=db3 + if test "$ac_cv_funclib_db_create" != "yes"; then + DBLIB="$ac_cv_funclib_db_create" + else + DBLIB="" + fi + AC_DEFINE(HAVE_DB3, 1, [define if you have a berkeley db3 library]) + else + +dnl dbopen is used by db1/db2 + + AC_FIND_FUNC_NO_LIBS(dbopen, $berkeley_db, [ + #include <stdio.h> + #if defined(HAVE_DB_185_H) + #include <db_185.h> + #elif defined(HAVE_DB_H) + #include <db.h> + #else + #error no db.h + #endif + ],[NULL, 0, 0, 0, NULL]) + + if test "$ac_cv_func_dbopen" = "yes"; then + db_type=db1 + if test "$ac_cv_funclib_dbopen" != "yes"; then + DBLIB="$ac_cv_funclib_dbopen" + else + DBLIB="" + fi + AC_DEFINE(HAVE_DB1, 1, [define if you have a berkeley db1/2 library]) + fi + fi + +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" + 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 + $as_unset ac_cv_func_dbm_firstkey + $as_unset ac_cv_funclib_dbm_firstkey + fi + +fi # berkeley db + +if test "$db_type" = "unknown" -o "$ac_cv_func_dbm_firstkey" = ""; then + + AC_CHECK_HEADERS([ \ + dbm.h \ + ndbm.h \ + ]) + + AC_FIND_FUNC_NO_LIBS(dbm_firstkey, ndbm, [ + #include <stdio.h> + #if defined(HAVE_NDBM_H) + #include <ndbm.h> + #elif defined(HAVE_DBM_H) + #include <dbm.h> + #else + #error no ndbm.h + #endif + 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_NDBM, 1, [define if you have a ndbm library])dnl + have_ndbm=yes + if test "$db_type" = "unknown"; then + db_type=ndbm + DBLIB="$LIB_NDBM" + fi + else + + $as_unset ac_cv_func_dbm_firstkey + $as_unset ac_cv_funclib_dbm_firstkey + + AC_CHECK_HEADERS([ \ + gdbm/ndbm.h \ + ]) + + AC_FIND_FUNC_NO_LIBS(dbm_firstkey, gdbm, [ + #include <stdio.h> + #include <gdbm/ndbm.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_NDBM, 1, [define if you have a ndbm library])dnl + have_ndbm=yes + if test "$db_type" = "unknown"; then + db_type=ndbm + DBLIB="$LIB_NDBM" + fi + fi + fi + +fi # unknown + +if test "$have_ndbm" = "yes"; then + AC_MSG_CHECKING([if ndbm is implemented with db]) + AC_TRY_RUN([ +#include <unistd.h> +#include <fcntl.h> +#if defined(HAVE_GDBM_NDBM_H) +#include <gdbm/ndbm.h> +#elif defined(HAVE_NDBM_H) +#include <ndbm.h> +#elif defined(HAVE_DBM_H) +#include <dbm.h> +#endif +int main() +{ + DBM *d; + + d = dbm_open("conftest", O_RDWR | O_CREAT, 0666); + if (d == NULL) + return 1; + dbm_close(d); + return 0; +}],[ + if test -f conftest.db; then + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)]) + else + AC_MSG_RESULT([no]) + fi],[AC_MSG_RESULT([no])]) fi -AC_SUBST(DBLIB)dnl +AC_SUBST(DBLIB)dnl +AC_SUBST(LIB_NDBM)dnl ]) diff --git a/crypto/heimdal/cf/find-func-no-libs2.m4 b/crypto/heimdal/cf/find-func-no-libs2.m4 index 87e8984..45e3f13 100644 --- a/crypto/heimdal/cf/find-func-no-libs2.m4 +++ b/crypto/heimdal/cf/find-func-no-libs2.m4 @@ -1,4 +1,4 @@ -dnl $Id: find-func-no-libs2.m4,v 1.4 2000/07/15 18:10:19 joda Exp $ +dnl $Id: find-func-no-libs2.m4,v 1.6 2001/09/01 10:57:32 assar Exp $ dnl dnl dnl Look for function in any of the specified libraries @@ -13,11 +13,13 @@ AC_CACHE_VAL(ac_cv_funclib_$1, if eval "test \"\$ac_cv_func_$1\" != yes" ; then ac_save_LIBS="$LIBS" for ac_lib in $2; do - if test -n "$ac_lib"; then - ac_lib="-l$ac_lib" - else - ac_lib="" - fi + case "$ac_lib" in + "") ;; + yes) ac_lib="" ;; + no) continue ;; + -l*) ;; + *) ac_lib="-l$ac_lib" ;; + esac LIBS="$6 $ac_lib $5 $ac_save_LIBS" AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break) done diff --git a/crypto/heimdal/cf/install-catman.sh b/crypto/heimdal/cf/install-catman.sh index c48cc20..4a5aa8e 100755 --- a/crypto/heimdal/cf/install-catman.sh +++ b/crypto/heimdal/cf/install-catman.sh @@ -1,20 +1,22 @@ #!/bin/sh # -# $Id: install-catman.sh,v 1.1 2000/11/30 01:38:17 joda Exp $ +# $Id: install-catman.sh,v 1.3 2001/09/29 16:05:38 assar Exp $ # # install preformatted manual pages INSTALL_DATA="$1"; shift mkinstalldirs="$1"; shift srcdir="$1"; shift -mandir="$1"; shift +manbase="$1"; shift suffix="$1"; shift for f in "$@"; do base=`echo "$f" | sed 's/\(.*\)\.\([^.]*\)$/\1/'` section=`echo "$f" | sed 's/\(.*\)\.\([^.]*\)$/\2/'` - catdir="$mandir/cat$section" + mandir="$manbase/man$section" + catdir="$manbase/cat$section" c="$base.cat$section" + if test -f "$srcdir/$c"; then if test \! -d "$catdir"; then eval "$mkinstalldirs $catdir" @@ -22,4 +24,30 @@ for f in "$@"; do eval "echo $INSTALL_DATA $srcdir/$c $catdir/$base.$suffix" eval "$INSTALL_DATA $srcdir/$c $catdir/$base.$suffix" fi + for link in `sed -n -e '/SYNOPSIS/q;/DESCRIPTION/q;s/^\.Nm \([^ ]*\).*/\1/p' $srcdir/$f`; do + if [ "$link" != "$base" ]; then + target="$mandir/$link.$section" + for cmd in "ln -f $mandir/$base.$section $target" \ + "ln -s $base.$section $target" \ + "cp -f $mandir/$base.$section $target" + do + if eval "$cmd"; then + eval echo "$cmd" + break + fi + done + if test -f "$srcdir/$c"; then + target="$catdir/$link.$suffix" + for cmd in "ln -f $catdir/$base.$suffix $target" \ + "ln -fs $base.$suffix $target" \ + "cp -f $catdir/$base.$suffix $target" + do + if eval "$cmd"; then + eval echo "$cmd" + break + fi + done + fi + fi + done done diff --git a/crypto/heimdal/cf/krb-ipv6.m4 b/crypto/heimdal/cf/krb-ipv6.m4 index bb494c1..34a718d 100644 --- a/crypto/heimdal/cf/krb-ipv6.m4 +++ b/crypto/heimdal/cf/krb-ipv6.m4 @@ -1,4 +1,4 @@ -dnl $Id: krb-ipv6.m4,v 1.10 2001/03/26 03:28:03 assar Exp $ +dnl $Id: krb-ipv6.m4,v 1.12 2001/08/19 16:27:02 joda Exp $ dnl dnl test for IPv6 dnl @@ -122,4 +122,29 @@ if test "$ac_cv_lib_ipv6" = yes; then else CFLAGS="${save_CFLAGS}" fi -]) + +## test for AIX missing in6addr_loopback +if test "$ac_cv_lib_ipv6" = yes; then + AC_CACHE_CHECK([for in6addr_loopback],[ac_cv_var_in6addr_loopback],[ + AC_TRY_LINK([ +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif +#ifdef HAVE_NETINET_IN6_H +#include <netinet/in6.h> +#endif],[ +struct sockaddr_in6 sin6; +sin6.sin6_addr = in6addr_loopback; +],ac_cv_var_in6addr_loopback=yes,ac_cv_var_in6addr_loopback=no)]) + if test "$ac_cv_var_in6addr_loopback" = yes; then + AC_DEFINE(HAVE_IN6ADDR_LOOPBACK, 1, + [Define if you have the in6addr_loopback variable]) + fi +fi +])
\ No newline at end of file diff --git a/crypto/heimdal/cf/krb-struct-winsize.m4 b/crypto/heimdal/cf/krb-struct-winsize.m4 index f89f683..8b2e1a2 100644 --- a/crypto/heimdal/cf/krb-struct-winsize.m4 +++ b/crypto/heimdal/cf/krb-struct-winsize.m4 @@ -1,4 +1,4 @@ -dnl $Id: krb-struct-winsize.m4,v 1.2 1999/03/01 09:52:23 joda Exp $ +dnl $Id: krb-struct-winsize.m4,v 1.3 2001/09/01 11:56:05 assar Exp $ dnl dnl dnl Search for struct winsize @@ -10,9 +10,7 @@ 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( -changequote(, )dnl -struct[ ]*winsize,dnl -changequote([,])dnl +struct[[ ]]*winsize,dnl $i, ac_cv_struct_winsize=yes; break)dnl done ]) diff --git a/crypto/heimdal/cf/make-proto.pl b/crypto/heimdal/cf/make-proto.pl index 9a47aed..9850d24 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.11 1999/04/15 12:37:54 joda Exp $ +# $Id: make-proto.pl,v 1.12 2001/06/23 22:29:18 assar Exp $ ##use Getopt::Std; require 'getopts.pl'; @@ -31,6 +31,9 @@ while(<>) { next; } if(/\{/){ + if (!/\}/) { + $brace++; + } $_ = $line; while(s/\*\//\ca/){ s/\/\*(.|\n)*\ca//; @@ -77,7 +80,6 @@ while(<>) { } } $line = ""; - $brace++; } if(/\}/){ $brace--; diff --git a/crypto/heimdal/cf/roken-frag.m4 b/crypto/heimdal/cf/roken-frag.m4 index fb0c14be..e5be036 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.21 2001/05/11 13:58:21 joda Exp $ +dnl $Id: roken-frag.m4,v 1.34 2001/11/30 03:29:47 assar Exp $ dnl dnl some code to get roken working dnl @@ -49,16 +49,12 @@ AC_CHECK_HEADERS([\ arpa/nameser.h \ config.h \ crypt.h \ - dbm.h \ - db.h \ dirent.h \ errno.h \ err.h \ fcntl.h \ - gdbm/ndbm.h \ grp.h \ ifaddrs.h \ - ndbm.h \ net/if.h \ netdb.h \ netinet/in.h \ @@ -69,7 +65,6 @@ AC_CHECK_HEADERS([\ paths.h \ pwd.h \ resolv.h \ - rpcsvc/dbm.h \ rpcsvc/ypclnt.h \ shadow.h \ sys/bswap.h \ @@ -94,7 +89,6 @@ AC_CHECK_HEADERS([\ usersec.h \ util.h \ vis.h \ - winsock.h \ ]) AC_REQUIRE([CHECK_NETINET_IP_AND_TCP]) @@ -106,11 +100,12 @@ AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes) dnl Check for functions and libraries -AC_KRB_IPV6 - AC_FIND_FUNC(socket, socket) AC_FIND_FUNC(gethostbyname, nsl) AC_FIND_FUNC(syslog, syslog) + +AC_KRB_IPV6 + AC_FIND_FUNC(gethostbyname2, inet6 ip6) AC_FIND_FUNC(res_search, resolv, @@ -162,12 +157,18 @@ AM_CONDITIONAL(have_glob_h, test "$ac_cv_func_glob_working" = yes) AC_CHECK_FUNCS([ \ asnprintf \ asprintf \ + atexit \ cgetent \ getconfattr \ getprogname \ getrlimit \ getspnam \ + initstate \ + issetugid \ + on_exit \ + random \ setprogname \ + setstate \ strsvis \ strunvis \ strvis \ @@ -259,19 +260,40 @@ AC_FIND_FUNC_NO_LIBS(pidfile,util, #include <util.h> #endif],0) +AC_FIND_IF_NOT_BROKEN(getaddrinfo,, +[#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif],[0,0,0,0]) + +AC_FIND_IF_NOT_BROKEN(getnameinfo,, +[#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif],[0,0,0,0,0,0,0]) + +AC_FIND_IF_NOT_BROKEN(freeaddrinfo,, +[#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif],[0]) + +AC_FIND_IF_NOT_BROKEN(gai_strerror,, +[#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif],[0]) + AC_BROKEN([ \ chown \ copyhostent \ daemon \ + ecalloc \ + emalloc \ + erealloc \ + estrdup \ err \ errx \ fchown \ flock \ fnmatch \ - freeaddrinfo \ freehostent \ - gai_strerror \ - getaddrinfo \ getcwd \ getdtablesize \ getegid \ @@ -281,7 +303,6 @@ AC_BROKEN([ \ getifaddrs \ getipnodebyaddr \ getipnodebyname \ - getnameinfo \ getopt \ gettimeofday \ getuid \ @@ -289,6 +310,7 @@ AC_BROKEN([ \ initgroups \ innetgr \ iruserok \ + localtime_r \ lstat \ memmove \ mkstemp \ @@ -386,6 +408,13 @@ if test "$ac_cv_func_getnameinfo" = "yes"; then 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" + fi +fi + AC_NEED_PROTO([#include <stdlib.h>], setenv) AC_NEED_PROTO([#include <stdlib.h>], unsetenv) AC_NEED_PROTO([#include <unistd.h>], gethostname) @@ -596,4 +625,4 @@ LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)" AC_SUBST(DIR_roken)dnl AC_SUBST(LIB_roken)dnl AC_SUBST(INCLUDES_roken)dnl -])
\ No newline at end of file +]) diff --git a/crypto/heimdal/cf/with-all.m4 b/crypto/heimdal/cf/with-all.m4 new file mode 100644 index 0000000..1b9d39f --- /dev/null +++ b/crypto/heimdal/cf/with-all.m4 @@ -0,0 +1,42 @@ +dnl +dnl $Id: with-all.m4,v 1.1 2001/08/29 17:01:23 assar Exp $ +dnl + +dnl AC_WITH_ALL(name) + +AC_DEFUN([AC_WITH_ALL], [ +AC_ARG_WITH($1, + AC_HELP_STRING([--with-$1=dir], + [use $1 in dir])) + +AC_ARG_WITH($1-lib, + 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, + 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]) + +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 + ;; +esac +])
\ No newline at end of file |