--- inn-2.4.3/configure.in.lib64 2006-03-20 05:14:57.000000000 +0100 +++ inn-2.4.3/configure.in 2006-03-30 18:03:13.000000000 +0200 @@ -280,6 +280,57 @@ AC_SUBST(LOG_COMPRESS) AC_SUBST(LOG_COMPRESSEXT) +dnl Set some configuration file defaults from the machine hostname. +HOSTNAME=`hostname 2> /dev/null || uname -n` +AC_SUBST(HOSTNAME) + +dnl Use libtool if it was requested. Otherwise, hunt up that information +dnl ourselves. Manually set a few things for makefiles. +if test x"$inn_use_libtool" = xyes ; then + AC_PROG_LIBTOOL + EXTLIB='la' + EXTOBJ='lo' + LIBTOOL='../libtool' + UPLIBTOOL='../../libtool' +else + AC_CANONICAL_HOST + AC_PROG_CC + EXTLIB='a' + EXTOBJ='o' + LIBTOOL='' + UPLIBTOOL='' + AC_SUBST(LIBTOOL) +fi +AC_SUBST(EXTLIB) +AC_SUBST(EXTOBJ) +AC_SUBST(UPLIBTOOL) + +dnl Determine library name. +case $host in +*-*-linux*) + # Test if the compiler is 64bit + echo 'int i;' > conftest.$ac_ext + inn_cv_cc_64bit_output=no + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *"ELF 64"*) + inn_cv_cc_64bit_output=yes + ;; + esac + fi + rm -rf conftest* + ;; +esac + +case $host_cpu:$inn_cv_cc_64bit_output in +powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) + inn_libname="lib64" + ;; +*:*) + inn_libname="lib" + ;; +esac + dnl inndstart by default only allows ports 119 and 433 below 1024; if the user dnl wants to use some other port as well, they must use this option. AC_ARG_WITH(innd-port, @@ -353,7 +404,7 @@ AC_ARG_WITH(kerberos, [ --with-kerberos=PATH Path to Kerberos v5 (for auth_krb5)], [if test x"$with_kerberos" != xno ; then - KRB5_LDFLAGS="-L$with_kerberos/lib" + KRB5_LDFLAGS="-L$with_kerberos/$inn_libname" KRB5_INC="-I$with_kerberos/include" fi]) @@ -536,7 +587,7 @@ AC_MSG_CHECKING(for sendmail) AC_MSG_RESULT($SENDMAIL) else - AC_PATH_PROG(SENDMAIL, sendmail, , "/usr/sbin:/usr/lib") + AC_PATH_PROG(SENDMAIL, sendmail, , "/usr/sbin:/usr/$inn_libname") if test -z "$SENDMAIL" ; then AC_MSG_ERROR(sendmail not found, re-run with --with-sendmail) fi @@ -649,7 +700,7 @@ if test x"$BERKELEY_DB_DIR" = xyes ; then for v in db43 db42 db41 db4 db3 db2 ; do if test -d "/usr/local/include/$v" ; then - BERKELEY_DB_LDFLAGS="-L/usr/local/lib" + BERKELEY_DB_LDFLAGS="-L/usr/local/$inn_libname" BERKELEY_DB_CFLAGS="-I/usr/local/include/$v" BERKELEY_DB_LIB="-l$v" AC_MSG_RESULT(FreeBSD locations) @@ -671,7 +722,7 @@ fi fi else - BERKELEY_DB_LDFLAGS="-L$BERKELEY_DB_DIR/lib" + BERKELEY_DB_LDFLAGS="-L$BERKELEY_DB_DIR/$inn_libname" BERKELEY_DB_CFLAGS="-I$BERKELEY_DB_DIR/include" BERKELEY_DB_LIB="-ldb" AC_MSG_RESULT($BERKELEY_DB_DIR) @@ -700,7 +751,7 @@ AC_MSG_RESULT(yes) AC_MSG_CHECKING(for OpenSSL location) if test x"$OPENSSL_DIR" = xyes ; then - for dir in $prefix /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg \ + for dir in $prefix /usr/local/ssl /usr/$inn_libname/ssl /usr/ssl /usr/pkg \ /usr/local /usr ; do if test -f "$dir/include/openssl/ssl.h" ; then OPENSSL_DIR=$dir @@ -723,7 +774,7 @@ # into SSL_LIB, and then at the end, restore LIBS and move -L to the # beginning of SSL_LIB. inn_save_LIBS=$LIBS - LIBS="$LIBS -L${OPENSSL_DIR}/lib" + LIBS="$LIBS -L${OPENSSL_DIR}/$inn_libname" SSL_LIB='' AC_CHECK_LIB(rsaref, RSAPublicEncrypt, [AC_CHECK_LIB(RSAglue, RSAPublicEncrypt, @@ -739,7 +790,7 @@ [SSL_LIB="-lssl $SSL_LIB"], [AC_MSG_ERROR(Can not find OpenSSL)], $SSL_LIB) - SSL_LIB="-L${OPENSSL_DIR}/lib $SSL_LIB" + SSL_LIB="-L${OPENSSL_DIR}/$inn_libname $SSL_LIB" LIBS=$inn_save_LIBS AC_DEFINE(HAVE_SSL, 1, [Define if OpenSSL is available.]) fi @@ -790,9 +841,9 @@ SASL_INC="-I${SASL_DIR}/include" inn_save_LIBS=$LIBS - LIBS="$LIBS -L${SASL_DIR}/lib" + LIBS="$LIBS -L${SASL_DIR}/$inn_libname" AC_CHECK_LIB(sasl2, sasl_getprop, - [SASL_LIB="-L${SASL_DIR}/lib -lsasl2"], + [SASL_LIB="-L${SASL_DIR}/$inn_libname -lsasl2"], [AC_MSG_ERROR(Can not find SASL)],) LIBS=$inn_save_LIBS AC_DEFINE(HAVE_SASL, 1, [Define if SASL is available.]) @@ -878,7 +929,7 @@ AC_MSG_CHECKING(for Python linkage) py_prefix=`$_PATH_PYTHON -c 'import sys; print sys.prefix'` py_ver=`$_PATH_PYTHON -c 'import sys; print sys.version[[:3]]'` - py_libdir="${py_prefix}/lib/python${py_ver}" + py_libdir="${py_prefix}/$inn_libname/python${py_ver}" PYTHON_INC="-I${py_prefix}/include/python${py_ver}" py_linkage="" for py_linkpart in LIBS LIBC LIBM LOCALMODLIBS BASEMODLIBS \