From 2726bc50a91ff4fc06813edaab91e3596df37e8f Mon Sep 17 00:00:00 2001 From: bfernhomberg Date: Wed, 14 Jan 2004 16:10:29 +0000 Subject: [PATCH] apply parts of the netbsd build patch by Patrick Welche , mostly build related stuff. --- configure.in | 29 +++++++++++++++-------------- etc/afpd/unix.h | 5 ++++- etc/uams/uams_passwd.c | 6 +++--- macros/ssl-check.m4 | 4 ++-- macros/tcp-wrappers.m4 | 8 ++++---- 5 files changed, 28 insertions(+), 24 deletions(-) diff --git a/configure.in b/configure.in index ffa16bf7..92bfcbe2 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.201 2003-12-15 06:56:33 srittau Exp $ +dnl $Id: configure.in,v 1.202 2004-01-14 16:10:29 bfernhomberg Exp $ dnl configure.in for netatalk AC_INIT(etc/afpd/main.c) @@ -21,7 +21,7 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_LIBTOOL_DLOPEN -AM_PROG_LIBTOOL +AC_PROG_LIBTOOL AC_PROG_PERL AC_PROG_GREP AC_PROG_PS @@ -42,11 +42,22 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_CHECK_HEADERS(fcntl.h limits.h stdint.h strings.h sys/fcntl.h sys/time.h sys/mnttab.h sys/statvfs.h sys/stat.h sys/vfs.h mntent.h unistd.h termios.h sys/termios.h netdb.h sgtty.h sys/mount.h statfs.h sys/types.h dlfcn.h errno.h sys/errno.h) +AC_CHECK_HEADERS(fcntl.h limits.h stdint.h strings.h sys/fcntl.h sys/file.h sys/ioctl.h sys/time.h sys/mnttab.h sys/statvfs.h sys/stat.h sys/vfs.h mntent.h syslog.h unistd.h termios.h sys/termios.h netdb.h sgtty.h ufs/quota.h mount.h statfs.h sys/types.h dlfcn.h errno.h sys/errno.h crypt.h) + AC_CHECK_HEADER(sys/cdefs.h,, AC_MSG_RESULT([enabling generic cdefs.h from tree]) CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS" ) +AC_CHECK_HEADERS([sys/param.h]) +AC_CHECK_HEADERS([sys/mount.h], [], [], +[ +#if HAVE_SYS_PARAM_H +#include +#endif +]) + + dnl dnl Checks for typedefs, structures, and compiler characteristics. dnl @@ -80,7 +91,7 @@ AC_MSG_CHECKING([for logfile path]) AC_ARG_WITH(logfile, [ --with-logfile=PATH path for file used by logger [/var/log/netatalk.log] use --without-logfile to disable logger], [ - if test "x$withval" == "xno"; then + if test "x$withval" = "xno"; then AC_DEFINE(DISABLE_LOGGER, 1, [Define if the logger should not be used]) AC_MSG_RESULT([syslog]) elif test "$withval" != "yes"; then @@ -418,8 +429,6 @@ if test x"$this_os" = "xfreebsd"; then AC_MSG_RESULT([ * FreeBSD specific configuration]) AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro]) AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics]) - - AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist]) fi dnl ----- HP-UX 11 specific ----- @@ -505,12 +514,8 @@ if test x"$this_os" = "xnetbsd"; then # This REALLY should be a configure test. AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro]) fi - CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS" + CFLAGS="-I\$(top_srcdir)/sys/netbsd $CFLAGS" need_dash_r=yes - - dnl ----- NetBSD does not have crypt.h, uses unistd.h ----- - AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled]) - AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist]) fi dnl ----- OpenBSD specific ----- @@ -518,10 +523,6 @@ if test x"$this_os" = "xopenbsd"; then AC_MSG_RESULT([ * OpenBSD specific configuration]) AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro]) AC_DEFINE(DLSYM_PREPEND_UNDERSCORE, 1, [BSD compatibility macro]) - - dnl ----- OpenBSD does not have crypt.h, uses unistd.h ----- - AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled]) - AC_DEFINE(NO_CRYPT_H, 1, [Define if crypt.h does not exist]) fi dnl ----- Solaris specific ----- diff --git a/etc/afpd/unix.h b/etc/afpd/unix.h index e3a4d86a..b0d377c3 100644 --- a/etc/afpd/unix.h +++ b/etc/afpd/unix.h @@ -1,5 +1,5 @@ /* - * $Id: unix.h,v 1.16 2003-12-28 13:51:12 srittau Exp $ + * $Id: unix.h,v 1.17 2004-01-14 16:10:29 bfernhomberg Exp $ */ #ifndef AFPD_UNIX_H @@ -43,6 +43,9 @@ typedef int mode_t; #endif /* __svr4__ || HAVE_SYS_MNTTAB_H */ #ifdef HAVE_SYS_MOUNT_H +#ifdef HAVE_SYS_PARM_H +#include +#endif /* HAVE_SYS_PARM_H */ #include #endif /* HAVE_SYS_MOUNT_H */ diff --git a/etc/uams/uams_passwd.c b/etc/uams/uams_passwd.c index 5b38d5cd..49b4e72e 100644 --- a/etc/uams/uams_passwd.c +++ b/etc/uams/uams_passwd.c @@ -1,5 +1,5 @@ /* - * $Id: uams_passwd.c,v 1.21 2003-06-11 07:16:14 srittau Exp $ + * $Id: uams_passwd.c,v 1.22 2004-01-14 16:10:29 bfernhomberg Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) @@ -33,9 +33,9 @@ char *strchr (), *strrchr (); #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -#ifndef NO_CRYPT_H +#ifdef HAVE_CRYPT_H #include -#endif /* ! NO_CRYPT_H */ +#endif /* HAVE_CRYPT_H */ #include #include diff --git a/macros/ssl-check.m4 b/macros/ssl-check.m4 index 356101ec..66c8f7a8 100644 --- a/macros/ssl-check.m4 +++ b/macros/ssl-check.m4 @@ -1,4 +1,4 @@ -dnl $Id: ssl-check.m4,v 1.11 2003-06-09 02:50:45 srittau Exp $ +dnl $Id: ssl-check.m4,v 1.12 2004-01-14 16:10:29 bfernhomberg Exp $ dnl Autoconf macro to check for SSL or OpenSSL AC_DEFUN([AC_PATH_GCRYPT], [ @@ -34,7 +34,7 @@ AC_DEFUN([AC_PATH_GCRYPT], [ AC_SUBST(GCRYPT_CFLAGS) AC_SUBST(GCRYPT_LIBS) - AM_CONDITIONAL(HAVE_GCRYPT, test -n "$GCRYPT_CONFIG") + AM_CONDITIONAL(HAVE_GCRYPT, test "x$GCRYPT_CONFIG" != "xno") ]) AC_DEFUN([AC_PATH_SSL], [ diff --git a/macros/tcp-wrappers.m4 b/macros/tcp-wrappers.m4 index 3274d1d7..50a0ac2e 100644 --- a/macros/tcp-wrappers.m4 +++ b/macros/tcp-wrappers.m4 @@ -1,11 +1,11 @@ -dnl $Id: tcp-wrappers.m4,v 1.1 2003-06-12 23:15:07 srittau Exp $ +dnl $Id: tcp-wrappers.m4,v 1.2 2004-01-14 16:10:29 bfernhomberg Exp $ AC_DEFUN([NETATALK_TCP_WRAPPERS], [ check=maybe AC_ARG_ENABLE(tcp-wrappers, [ --disable-tcp-wrappers disable TCP wrappers support], [ - if test "x$enableval" == "xno"; then + if test "x$enableval" = "xno"; then check=no else check=yes @@ -19,12 +19,12 @@ AC_DEFUN([NETATALK_TCP_WRAPPERS], [ fi AC_MSG_CHECKING([whether to enable the TCP wrappers]) - if test "x$enable" == "xyes"; then + if test "x$enable" = "xyes"; then AC_DEFINE(TCPWRAP, 1, [Define if TCP wrappers should be used]) WRAP_LIBS="-lwrap" AC_MSG_RESULT([yes]) else - if test "x$check" == "xyes"; then + if test "x$check" = "xyes"; then AC_MSG_ERROR([libwrap not found]) else AC_MSG_RESULT([no]) -- 2.39.2