option to force builtin ldns version.

git-svn-id: file:///svn/unbound/trunk@1454 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2009-02-05 14:01:37 +00:00
parent 80fa6c037a
commit 6e0d34659b
4 changed files with 78 additions and 48 deletions

81
configure vendored
View file

@ -1485,8 +1485,7 @@ Optional Packages:
an explicit path). Slower, but allows use of large
outgoing port ranges.
--with-ldns=PATH specify prefix of path of ldns library to use
--with-ldns-builtin forces use of package included with this one
Some influential environment variables:
CC C compiler command
@ -6195,7 +6194,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 6198 "configure"' > conftest.$ac_ext
echo '#line 6197 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -7509,11 +7508,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7512: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7511: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7516: \$? = $ac_status" >&5
echo "$as_me:7515: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7799,11 +7798,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7802: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7801: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7806: \$? = $ac_status" >&5
echo "$as_me:7805: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7903,11 +7902,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7906: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7905: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7910: \$? = $ac_status" >&5
echo "$as_me:7909: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -10254,7 +10253,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10257 "configure"
#line 10256 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -10354,7 +10353,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10357 "configure"
#line 10356 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12774,11 +12773,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12777: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12776: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:12781: \$? = $ac_status" >&5
echo "$as_me:12780: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -12878,11 +12877,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12881: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12880: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:12885: \$? = $ac_status" >&5
echo "$as_me:12884: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -14442,11 +14441,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14445: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14444: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14449: \$? = $ac_status" >&5
echo "$as_me:14448: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -14546,11 +14545,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14549: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14548: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14553: \$? = $ac_status" >&5
echo "$as_me:14552: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -16735,11 +16734,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16738: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16737: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16742: \$? = $ac_status" >&5
echo "$as_me:16741: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -17025,11 +17024,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:17028: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17027: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:17032: \$? = $ac_status" >&5
echo "$as_me:17031: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -17129,11 +17128,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:17132: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17131: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:17136: \$? = $ac_status" >&5
echo "$as_me:17135: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -26417,19 +26416,31 @@ done
# check this after all other compilation checks, since the linking of the lib
# may break checks after this.
use_ldns_builtin="no"
# Check whether --with-ldns was given.
if test "${with_ldns+set}" = set; then
withval=$with_ldns; specialldnsdir="$withval"
CPPFLAGS="$CPPFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval -L$withval/lib -lldns"
CPPFLAGS="-I$withval/include $CPPFLAGS"
LDFLAGS="-L$withval -L$withval/lib $LDFLAGS -lldns"
ldnsdir="$withval"
fi
{ echo "$as_me:$LINENO: checking for ldns_buffer_copy in -lldns" >&5
# Check whether --with-ldns-builtin was given.
if test "${with_ldns_builtin+set}" = set; then
withval=$with_ldns_builtin;
use_ldns_builtin="yes"
fi
# check if ldns is good enough
if test "$use_ldns_builtin" = "no"; then
{ echo "$as_me:$LINENO: checking for ldns_buffer_copy in -lldns" >&5
echo $ECHO_N "checking for ldns_buffer_copy in -lldns... $ECHO_C" >&6; }
if test "${ac_cv_lib_ldns_ldns_buffer_copy+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@ -26563,7 +26574,7 @@ _ACEOF
fi
{ echo "$as_me:$LINENO: checking for ldns_b32_ntop_extended_hex" >&5
{ echo "$as_me:$LINENO: checking for ldns_b32_ntop_extended_hex" >&5
echo $ECHO_N "checking for ldns_b32_ntop_extended_hex... $ECHO_C" >&6; }
if test "${ac_cv_func_ldns_b32_ntop_extended_hex+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@ -26648,7 +26659,7 @@ if test $ac_cv_func_ldns_b32_ntop_extended_hex = yes; then
:
else
{ { echo "$as_me:$LINENO: error: ldns version too old, need >=1.4.0" >&5
{ { echo "$as_me:$LINENO: error: ldns version too old, need >=1.4.0" >&5
echo "$as_me: error: ldns version too old, need >=1.4.0" >&2;}
{ (exit 1); exit 1; }; }
fi
@ -26656,6 +26667,13 @@ fi
else
use_ldns_builtin="yes"
fi
fi
if test "$use_ldns_builtin" = "yes"; then
if test ! -f $srcdir/ldns-src.tar.gz; then
{ { echo "$as_me:$LINENO: error: No ldns library found and no ldns-src.tar.gz, use --with-ldns=path." >&5
echo "$as_me: error: No ldns library found and no ldns-src.tar.gz, use --with-ldns=path." >&2;}
@ -26663,7 +26681,6 @@ echo "$as_me: error: No ldns library found and no ldns-src.tar.gz, use --with-ld
fi
echo "****************************************************************"
echo "*** ***"
echo "*** ldns library not found (--with-ldns= to specify by hand) ***"
echo "*** Building ldns library from package included in this one. ***"
echo "*** ***"
echo "****************************************************************"
@ -26677,9 +26694,7 @@ subdirs="$subdirs ldns-src"
CPPFLAGS="-I$ldnsdir/include $CPPFLAGS"
LDFLAGS="$LDFLAGS $ldnsdir/*.lo"
fi
LDFLAGS="$LATE_LDFLAGS $LDFLAGS"

View file

@ -1032,28 +1032,40 @@ AC_REPLACE_FUNCS(gmtime_r)
# check this after all other compilation checks, since the linking of the lib
# may break checks after this.
AC_ARG_WITH(ldns,
AC_HELP_STRING([--with-ldns=PATH specify prefix of path of ldns library to use])
, [ specialldnsdir="$withval"
CPPFLAGS="$CPPFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval -L$withval/lib -lldns"
use_ldns_builtin="no"
AC_ARG_WITH(ldns, AC_HELP_STRING([--with-ldns=PATH],
[specify prefix of path of ldns library to use]),
[ specialldnsdir="$withval"
CPPFLAGS="-I$withval/include $CPPFLAGS"
LDFLAGS="-L$withval -L$withval/lib $LDFLAGS -lldns"
ldnsdir="$withval"
AC_SUBST(ldnsdir)
])
AC_CHECK_LIB(ldns, ldns_buffer_copy, [
dnl ldns was found, check compat functions
AC_CHECK_LIB(ldns, [ldns_rr_free])
AC_CHECK_FUNC([ldns_b32_ntop_extended_hex],, [
AC_MSG_ERROR([ldns version too old, need >=1.4.0])])
] , [
AC_ARG_WITH(ldns-builtin, AC_HELP_STRING([--with-ldns-builtin],
[forces use of package included with this one]), [
use_ldns_builtin="yes"
])
# check if ldns is good enough
if test "$use_ldns_builtin" = "no"; then
AC_CHECK_LIB(ldns, ldns_buffer_copy, [
dnl ldns was found, check compat functions
AC_CHECK_LIB(ldns, [ldns_rr_free])
AC_CHECK_FUNC([ldns_b32_ntop_extended_hex],, [
AC_MSG_ERROR([ldns version too old, need >=1.4.0])])
] , [
use_ldns_builtin="yes"
])
fi
if test "$use_ldns_builtin" = "yes"; then
dnl use the builtin ldns-src.tar.gz file to build ldns.
if test ! -f $srcdir/ldns-src.tar.gz; then
AC_MSG_ERROR([No ldns library found and no ldns-src.tar.gz, use --with-ldns=path.])
fi
echo "****************************************************************"
echo "*** ***"
echo "*** ldns library not found (--with-ldns= to specify by hand) ***"
echo "*** Building ldns library from package included in this one. ***"
echo "*** ***"
echo "****************************************************************"
@ -1065,7 +1077,8 @@ AC_CONFIG_SUBDIRS([ldns-src])
CPPFLAGS="-I$ldnsdir/include $CPPFLAGS"
LDFLAGS="$LDFLAGS $ldnsdir/*.lo"
AC_SUBST(ldnsdir)
])
fi dnl end of use_ldns_builtin == yes
LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
AC_DEFINE_UNQUOTED([MAXSYSLOGMSGLEN], [5120], [Define to the maximum message length to pass to syslog.])

View file

@ -11,6 +11,10 @@
- MacOSX Leopard cleaner text output from configure.
- initgroups(3) is called to drop secondary group permissions, if
applicable.
- configure option --with-ldns-builtin forces the use of the
inluded ldns package with the unbound source. The -I include
is put before the others, so it avoids bad include files from
an older ldns install.
4 February 2009: Wouter
- tag for release 1.2.1.

View file

@ -57,7 +57,6 @@ o on windows version, implement that OS ancillary data capabilities for
o local-zone directive with authority service, full authority server
is a non-goal.
o configure option to force use of builtin ldns tarball.
o make so revoke bit keys cannot verify signatures
o option to print UTC timestamps instead of epoch in seconds.
o print querier IP address on high loglevels.
@ -74,4 +73,3 @@ o see if we can use daemon(3), cleaner posix usage.
o see if we can include the python bindings (contrib).
o see if we can suport var:value (nospace) by parser.
o remote control read ssl information while priviledged.
o call initgroups(3) to drop secondary group permissions.