From 87e691af362d680265a61cf9e393abcc009b0a36 Mon Sep 17 00:00:00 2001 From: bfernhomberg Date: Sat, 3 Jan 2004 01:49:54 +0000 Subject: [PATCH] Fix some issues with older autoconf/automake. Fix some test ==, should be test = removed the db_create check from macros/db3-check.m4 renamed AM_ICONV to AC_CHECK_ICONV to avoid collisions --- configure.in | 16 +++++---- macros/db3-check.m4 | 77 +++++++++++++++++++++++------------------- macros/gssapi-check.m4 | 4 +-- macros/iconv.m4 | 2 +- macros/summary.m4 | 4 +-- macros/tcp-wrappers.m4 | 10 +++--- 6 files changed, 61 insertions(+), 52 deletions(-) diff --git a/configure.in b/configure.in index 5a9ed7c9..f055e1d8 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.179.2.3.2.14 2003-12-12 19:29:55 didg Exp $ +dnl $Id: configure.in,v 1.179.2.3.2.15 2004-01-03 01:49:54 bfernhomberg Exp $ dnl configure.in for netatalk AC_INIT(etc/afpd/main.c) @@ -17,7 +17,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 @@ -273,7 +273,7 @@ if test x"$afp3" = x"yes"; then AC_SYS_LARGEFILE([ AC_DEFINE(AFP3x, 1, [Define to enable AFP 3.x support]) ],[ - if test x"$afp3set" == x"yes"; then + if test x"$afp3set" = x"yes"; then AC_MSG_ERROR([AFP 3.x support requires Large File Support.]) else AC_MSG_WARN([AFP 3.x support requires Large File Support. AFP3.x support disabled]) @@ -282,7 +282,7 @@ if test x"$afp3" = x"yes"; then ]) fi -AM_ICONV +AC_CHECK_ICONV dnl ----------- A NOTE ABOUT DROPKLUDGE dnl The trouble with this fix is that if you know what the file is called, it @@ -377,7 +377,7 @@ if test "x$netatalk_cv_use_shadowpw" != "xno"; then fi AC_MSG_CHECKING([whether shadow support should be enabled]) -if test "x$netatalk_cv_use_shadowpw" == "xyes"; then +if test "x$netatalk_cv_use_shadowpw" = "xyes"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -597,11 +597,13 @@ if test x"$this_os" = "xlinux"; then dnl ----- kernel 2.6 changed struct at_addr to atalk_addr AC_MSG_CHECKING([for struct atalk_addr]) - AC_COMPILE_IFELSE([ +dnl AC_COMPILE_IFELSE([ + AC_TRY_COMPILE([ #include #include #include - +], +[ int main() { struct atalk_addr foo; diff --git a/macros/db3-check.m4 b/macros/db3-check.m4 index 9068caf8..dbc964a9 100644 --- a/macros/db3-check.m4 +++ b/macros/db3-check.m4 @@ -1,7 +1,8 @@ -dnl $Id: db3-check.m4,v 1.11.6.2 2003-11-24 17:16:51 bfernhomberg Exp $ +dnl $Id: db3-check.m4,v 1.11.6.3 2004-01-03 01:49:54 bfernhomberg Exp $ dnl Autoconf macro to check for the Berkeley DB library -AC_DEFUN([AC_PATH_BDB], [ +AC_DEFUN([AC_PATH_BDB], +[ trybdbdir="" dobdbsearch=yes bdb_search_dirs="/usr/local/include/db4 /usr/local/include /usr/include/db4 /usr/include" @@ -9,9 +10,9 @@ AC_DEFUN([AC_PATH_BDB], [ AC_ARG_WITH(bdb, [ --with-bdb=PATH specify path to Berkeley DB installation[[auto]]], - if test "x$withval" == "xno"; then + if test "x$withval" = "xno"; then dobdbsearch=no - elif test "x$withval" == "xyes"; then + elif test "x$withval" = "xyes"; then dobdbsearch=yes else bdb_search_dirs="$withval/include/db4 $withval/include $withval" @@ -19,8 +20,8 @@ AC_DEFUN([AC_PATH_BDB], [ ) bdbfound=no - if test "x$dobdbsearch" != "xno"; then - for bdbdir in $bdb_search_dirs ; do + if test "x$dobdbsearch" = "xyes"; then + for bdbdir in $bdb_search_dirs; do AC_MSG_CHECKING([for Berkeley DB headers in $bdbdir]) if test -f "$bdbdir/db.h" ; then AC_MSG_RESULT([yes]) @@ -37,25 +38,36 @@ AC_DEFUN([AC_PATH_BDB], [ CFLAGS="" LDFLAGS="-L$bdblibdir $LDFLAGS" - dnl db_create is BDB >3 specific - AC_CHECK_LIB(db, db_create, [ - bdbfound=yes - LIBS="$LIBS -ldb" - BDB_LIBS="-ldb"], [ - AC_CHECK_LIB(db4, db_create, [ - bdbfound=yes - LIBS="$LIBS -ldb4" - BDB_LIBS="-ldb4"]) - ]) +dnl This check breaks if bdb was configured with --with-uniquename, removed for now +dnl dnl db_create is BDB >3 specific +dnl AC_CHECK_LIB(db, db_create, [ +dnl bdbfound=yes +dnl LIBS="$LIBS -ldb" +dnl BDB_LIBS="-ldb"], [ +dnl AC_CHECK_LIB(db4, db_create, [ +dnl bdbfound=yes +dnl LIBS="$LIBS -ldb4" +dnl BDB_LIBS="-ldb4"]) +dnl ]) + + bdbfound=yes + LIBS="$LIBS -ldb" + BDB_LIBS="-ldb" dnl check for header ... should only fail if the header cannot be compiled dnl it does exist, otherwise we wouldn't be here if test "x$bdbfound" = "xyes"; then - AC_CHECK_HEADERS([db.h],[ - dnl check we have the correct bdb version - AC_MSG_CHECKING(Berkeley DB version >= 4.0) - AC_TRY_RUN([ + AC_CHECK_HEADERS(db.h, bdbfound=yes, bdbfound=no) + fi + + if test "x$bdbfound" = "xno"; then + AC_MSG_WARN([Berkeley DB libraries found, but required header files cannot be used!!!]) + fi + + dnl check we have the correct bdb version + AC_MSG_CHECKING([Berkeley DB version >= 4.0]) + AC_TRY_RUN([ #if STDC_HEADERS #include #endif @@ -87,21 +99,14 @@ int main(void) { exit (0); } -], - atalk_cv_bdbversion="yes", - atalk_cv_bdbversion="no", - atalk_cv_bdbversion="cross") - - if test ${atalk_cv_bdbversion} = "yes"; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - bdbfound=no - fi - ],[ +], atalk_cv_bdbversion="yes", atalk_cv_bdbversion="no", atalk_cv_bdbversion="cross") + + + if test ${atalk_cv_bdbversion} = "yes"; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) bdbfound=no - AC_MSG_WARN([Berkeley DB libraries found, but required header files cannot be used!!!]) - ]) fi if test "x$bdbfound" = "xyes"; then @@ -123,7 +128,7 @@ int main(void) { else AC_MSG_RESULT([no]) fi - done + done fi if test "x$bdbfound" = "xyes"; then @@ -137,3 +142,5 @@ int main(void) { AC_SUBST(BDB_BIN) AC_SUBST(BDB_PATH) ]) + + diff --git a/macros/gssapi-check.m4 b/macros/gssapi-check.m4 index 4f4da55c..d591ddd7 100644 --- a/macros/gssapi-check.m4 +++ b/macros/gssapi-check.m4 @@ -1,4 +1,4 @@ -dnl $Id: gssapi-check.m4,v 1.1.2.2 2003-10-29 23:53:24 bfernhomberg Exp $ +dnl $Id: gssapi-check.m4,v 1.1.2.3 2004-01-03 01:49:54 bfernhomberg Exp $ dnl Autoconf macro to check for kerberos AC_DEFUN([NETATALK_GSSAPI_CHECK], @@ -129,7 +129,7 @@ AC_DEFUN([NETATALK_GSSAPI_CHECK], GSSAPI_LIBS="$LIBS $LDLAGS" else AC_MSG_RESULT([no]) - if test x"$compilegssapi" == x"yes"; then + if test x"$compilegssapi" = x"yes"; then AC_MSG_ERROR([GSSAPI installation not found]) fi GSSAPI_LIBS="" diff --git a/macros/iconv.m4 b/macros/iconv.m4 index 8a0fffdf..2455696d 100644 --- a/macros/iconv.m4 +++ b/macros/iconv.m4 @@ -1,4 +1,4 @@ -AC_DEFUN([AM_ICONV], +AC_DEFUN([AC_CHECK_ICONV], [ dnl ################################################# diff --git a/macros/summary.m4 b/macros/summary.m4 index aaf97831..24220755 100644 --- a/macros/summary.m4 +++ b/macros/summary.m4 @@ -16,10 +16,10 @@ AC_DEFUN([AM_NETATALK_CONFIG_SUMMARY], [ if test x"$netatalk_cv_use_pam" != x"no"; then uams_using_options="PAM" fi - if test "x$netatalk_cv_use_shadowpw" == "xyes"; then + if test "x$netatalk_cv_use_shadowpw" = "xyes"; then uams_using_options="$uams_using_options SHADOW" fi - if test "x$compile_ssl" == "xyes"; then + if test "x$compile_ssl" = "xyes"; then AC_MSG_RESULT([ DHX ($uams_using_options)]) AC_MSG_RESULT([ RANDNUM ($uams_using_options)]) fi diff --git a/macros/tcp-wrappers.m4 b/macros/tcp-wrappers.m4 index 28f410be..57c56d6e 100644 --- a/macros/tcp-wrappers.m4 +++ b/macros/tcp-wrappers.m4 @@ -1,11 +1,11 @@ -dnl $Id: tcp-wrappers.m4,v 1.1.4.2 2003-10-29 23:53:24 bfernhomberg Exp $ +dnl $Id: tcp-wrappers.m4,v 1.1.4.3 2004-01-03 01:49:54 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 @@ -17,7 +17,7 @@ AC_DEFUN([NETATALK_TCP_WRAPPERS], [ if test "x$check" != "xno"; then AC_CHECK_LIB(wrap, tcpd_warn, enable=yes) fi - if test "x$enable" == "xyes"; then + if test "x$enable" = "xyes"; then AC_CHECK_HEADERS(tcpd.h) if test "x$ac_cv_header_tcpd_h" != "xyes"; then enable=no @@ -26,13 +26,13 @@ AC_DEFUN([NETATALK_TCP_WRAPPERS], [ netatalk_cv_tcpwrap=no 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" netatalk_cv_tcpwrap=yes 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