pkgsrc/www/c-icap/patches/patch-configure
2014-10-15 22:10:21 +00:00

55 lines
1.6 KiB
Text

$NetBSD: patch-configure,v 1.4 2014/10/15 22:10:21 joerg Exp $
Detect Berkeley DB.
--- configure.orig 2013-01-04 08:36:02.000000000 +0000
+++ configure
@@ -635,6 +635,7 @@ DEFINE_OFF_T
DEFINE_SIZE_T
USE_REGEX
SYSV_IPC
+HAVE_STRNSTR
INTTYPES_H
SYS_TYPES_H
LDAP_ADD_FLAG
@@ -12525,12 +12526,11 @@ rm -f core conftest.err conftest.$ac_obj
OLDCFLAGS=$CFLAGS
OLDLDFLAGS=$LDFLAGS
OLDLIBS=$LIBS
- LIBS="-ldb $OLDLIBS"
- for DBVER in 54 53 52 51 50 49 48 47 46 45 44 43 42; do
+ for DBVER in 4 5 6; do
if test -d $libdbpath/include/db$DBVER; then
echo -n "checking for Berleley DB under $libdbpath/include/db$DBVER and $libdbpath/lib/db$DBVER... "
CFLAGS="-I$libdbpath/include/db$DBVER $OLDCFLAGS"
- LDFLAGS="-L$libdbpath/lib/db$DBVER $OLDLDFLAGS"
+ LDFLAGS="-L$libdbpath/lib -ldb$DBVER $OLDLDFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12544,7 +12544,7 @@ rm -f core conftest.err conftest.$ac_obj
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- echo yes;BDB_ADD_LDADD="-L$libdbpath/lib/db$DBVER -ldb"; BDB_ADD_FLAG="-I$libdbpath/include/db$DBVER";libdb="yes";
+ echo yes;BDB_ADD_LDADD="-L$libdbpath/lib -ldb$DBVER"; BDB_ADD_FLAG="-I$libdbpath/include/db$DBVER";libdb="yes";
else
libdb="no"; echo "no";
@@ -13302,6 +13302,7 @@ $as_echo "#define HAVE_INET_ATON 1" >>co
fi
done
+HAVE_STRNSTR="0"
for ac_func in strnstr
do :
@@ -13312,7 +13313,7 @@ if test "x$ac_cv_func_strnstr" = xyes; t
_ACEOF
$as_echo "#define HAVE_STRNSTR 1" >>confdefs.h
-
+HAVE_STRNSTR="1"
fi
done