Bug#183 fixup.

git-svn-id: file:///svn/unbound/trunk@1114 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2008-06-09 14:59:29 +00:00
parent 8ffff3c0a3
commit 423e1a95a8
10 changed files with 146 additions and 63 deletions

View file

@ -232,7 +232,7 @@
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #undef PACKAGE_VERSION
/* Pathname to unbound process id file */ /* default pidfile location */
#undef PIDFILE #undef PIDFILE
/* Define to necessary symbol if this constant uses a non-standard name on /* Define to necessary symbol if this constant uses a non-standard name on

113
configure vendored
View file

@ -815,6 +815,9 @@ CPP
GREP GREP
EGREP EGREP
ub_conf_file ub_conf_file
UNBOUND_RUN_DIR
UNBOUND_CHROOT_DIR
UNBOUND_PIDFILE
debug_enabled debug_enabled
libtool libtool
AR AR
@ -1455,6 +1458,12 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-conf-file=path Pathname to the Unbound configuration file --with-conf-file=path Pathname to the Unbound configuration file
--with-run-dir=path set default directory to chdir to (by default dir
part of cfg file)
--with-chroot-dir=path set default directory to chroot to (by default same
as run-dir)
--with-pidfile=filename set default pathname to unbound pidfile (default
run-dir/unbound.pid)
--with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-pic try to use only PIC/non-PIC objects [default=use --with-pic try to use only PIC/non-PIC objects [default=use
both] both]
@ -3301,38 +3310,64 @@ esac
# #
# Determine configuration file # Determine configuration file
ub_conf_file=${sysconfdir}/unbound/unbound.conf # the eval is to evaluate shell expansion twice
ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
# Check whether --with-conf_file was given. # Check whether --with-conf_file was given.
if test "${with_conf_file+set}" = set; then if test "${with_conf_file+set}" = set; then
withval=$with_conf_file; ub_conf_file=$withval withval=$with_conf_file; ub_conf_file="$withval"
fi fi
# the eval is to evaluate shell expansion twice, once
# for $nsd_conf_file and once for the ${prefix} within it.
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define CONFIGFILE "`eval echo $ub_conf_file`" #define CONFIGFILE "$ub_conf_file"
_ACEOF _ACEOF
# Determine run, chroot directory and pidfile locations # Determine run, chroot directory and pidfile locations
ub_cfg=`eval echo $ub_conf_file`
ub_dir=`dirname $ub_cfg` # Check whether --with-run-dir was given.
if test "${with_run_dir+set}" = set; then
withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
else
UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
fi
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define RUN_DIR "$ub_dir" #define RUN_DIR "$UNBOUND_RUN_DIR"
_ACEOF _ACEOF
# Check whether --with-chroot-dir was given.
if test "${with_chroot_dir+set}" = set; then
withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
else
UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
fi
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define CHROOT_DIR "$ub_dir" #define CHROOT_DIR "$UNBOUND_CHROOT_DIR"
_ACEOF _ACEOF
# Check whether --with-pidfile was given.
if test "${with_pidfile+set}" = set; then
withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
else
UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
fi
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define PIDFILE "$ub_dir/unbound.pid" #define PIDFILE "$UNBOUND_PIDFILE"
_ACEOF _ACEOF
@ -5873,7 +5908,7 @@ ia64-*-hpux*)
;; ;;
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # Find out which ABI we are using.
echo '#line 5876 "configure"' > conftest.$ac_ext echo '#line 5911 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5 (eval $ac_compile) 2>&5
ac_status=$? ac_status=$?
@ -7187,11 +7222,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7190: $lt_compile\"" >&5) (eval echo "\"\$as_me:7225: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:7194: \$? = $ac_status" >&5 echo "$as_me:7229: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@ -7477,11 +7512,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7480: $lt_compile\"" >&5) (eval echo "\"\$as_me:7515: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:7484: \$? = $ac_status" >&5 echo "$as_me:7519: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@ -7581,11 +7616,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7584: $lt_compile\"" >&5) (eval echo "\"\$as_me:7619: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:7588: \$? = $ac_status" >&5 echo "$as_me:7623: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@ -9932,7 +9967,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 9935 "configure" #line 9970 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -10032,7 +10067,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 10035 "configure" #line 10070 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -12452,11 +12487,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12455: $lt_compile\"" >&5) (eval echo "\"\$as_me:12490: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:12459: \$? = $ac_status" >&5 echo "$as_me:12494: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@ -12556,11 +12591,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12559: $lt_compile\"" >&5) (eval echo "\"\$as_me:12594: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:12563: \$? = $ac_status" >&5 echo "$as_me:12598: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@ -14120,11 +14155,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14123: $lt_compile\"" >&5) (eval echo "\"\$as_me:14158: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:14127: \$? = $ac_status" >&5 echo "$as_me:14162: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@ -14224,11 +14259,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14227: $lt_compile\"" >&5) (eval echo "\"\$as_me:14262: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:14231: \$? = $ac_status" >&5 echo "$as_me:14266: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@ -16413,11 +16448,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16416: $lt_compile\"" >&5) (eval echo "\"\$as_me:16451: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:16420: \$? = $ac_status" >&5 echo "$as_me:16455: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@ -16703,11 +16738,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16706: $lt_compile\"" >&5) (eval echo "\"\$as_me:16741: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:16710: \$? = $ac_status" >&5 echo "$as_me:16745: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@ -16807,11 +16842,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16810: $lt_compile\"" >&5) (eval echo "\"\$as_me:16845: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:16814: \$? = $ac_status" >&5 echo "$as_me:16849: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@ -25428,7 +25463,7 @@ _ACEOF
ac_config_files="$ac_config_files Makefile" ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-checkconf.8 doc/unbound.conf.5"
ac_config_headers="$ac_config_headers config.h" ac_config_headers="$ac_config_headers config.h"
@ -25985,6 +26020,11 @@ for ac_config_target in $ac_config_targets
do do
case $ac_config_target in case $ac_config_target in
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
"doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
"doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
"doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
"doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@ -26098,6 +26138,9 @@ CPP!$CPP$ac_delim
GREP!$GREP$ac_delim GREP!$GREP$ac_delim
EGREP!$EGREP$ac_delim EGREP!$EGREP$ac_delim
ub_conf_file!$ub_conf_file$ac_delim ub_conf_file!$ub_conf_file$ac_delim
UNBOUND_RUN_DIR!$UNBOUND_RUN_DIR$ac_delim
UNBOUND_CHROOT_DIR!$UNBOUND_CHROOT_DIR$ac_delim
UNBOUND_PIDFILE!$UNBOUND_PIDFILE$ac_delim
debug_enabled!$debug_enabled$ac_delim debug_enabled!$debug_enabled$ac_delim
libtool!$libtool$ac_delim libtool!$libtool$ac_delim
AR!$AR$ac_delim AR!$AR$ac_delim
@ -26134,7 +26177,7 @@ subdirs!$subdirs$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF _ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then
break break
elif $ac_last_try; then elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View file

@ -46,21 +46,39 @@ esac
# #
# Determine configuration file # Determine configuration file
ub_conf_file=${sysconfdir}/unbound/unbound.conf # the eval is to evaluate shell expansion twice
ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
AC_ARG_WITH([conf_file], AC_ARG_WITH([conf_file],
AC_HELP_STRING([--with-conf-file=path], [Pathname to the Unbound configuration file]), AC_HELP_STRING([--with-conf-file=path],
[ub_conf_file=$withval]) [Pathname to the Unbound configuration file]),
[ub_conf_file="$withval"])
AC_SUBST(ub_conf_file) AC_SUBST(ub_conf_file)
# the eval is to evaluate shell expansion twice, once AC_DEFINE_UNQUOTED(CONFIGFILE, ["$ub_conf_file"], [Pathname to the Unbound configuration file])
# for $nsd_conf_file and once for the ${prefix} within it.
AC_DEFINE_UNQUOTED(CONFIGFILE, ["`eval echo $ub_conf_file`"], [Pathname to the Unbound configuration file])
# Determine run, chroot directory and pidfile locations # Determine run, chroot directory and pidfile locations
ub_cfg=`eval echo $ub_conf_file` AC_ARG_WITH(run-dir,
ub_dir=`dirname $ub_cfg` AC_HELP_STRING([--with-run-dir=path],
AC_DEFINE_UNQUOTED(RUN_DIR, ["$ub_dir"], [Directory to chdir to]) [set default directory to chdir to (by default dir part of cfg file)]),
AC_DEFINE_UNQUOTED(CHROOT_DIR, ["$ub_dir"], [Directory to chroot to]) UNBOUND_RUN_DIR="$withval",
AC_DEFINE_UNQUOTED(PIDFILE, ["$ub_dir/unbound.pid"], [Pathname to unbound process id file]) UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`)
AC_SUBST(UNBOUND_RUN_DIR)
AC_DEFINE_UNQUOTED(RUN_DIR, ["$UNBOUND_RUN_DIR"], [Directory to chdir to])
AC_ARG_WITH(chroot-dir,
AC_HELP_STRING([--with-chroot-dir=path],
[set default directory to chroot to (by default same as run-dir)]),
UNBOUND_CHROOT_DIR="$withval",
UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR")
AC_SUBST(UNBOUND_CHROOT_DIR)
AC_DEFINE_UNQUOTED(CHROOT_DIR, ["$UNBOUND_CHROOT_DIR"], [Directory to chroot to])
AC_ARG_WITH(pidfile,
AC_HELP_STRING([--with-pidfile=filename],
[set default pathname to unbound pidfile (default run-dir/unbound.pid)]),
UNBOUND_PIDFILE="$withval",
UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid")
AC_SUBST(UNBOUND_PIDFILE)
AC_DEFINE_UNQUOTED(PIDFILE, ["$UNBOUND_PIDFILE"], [default pidfile location])
AC_DEFINE(WINVER, 0x0502, [the version of the windows API enabled]) AC_DEFINE(WINVER, 0x0502, [the version of the windows API enabled])
@ -932,6 +950,6 @@ void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
#define UNBOUND_DNS_PORT 53 #define UNBOUND_DNS_PORT 53
]) ])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-checkconf.8 doc/unbound.conf.5])
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADER([config.h])
AC_OUTPUT AC_OUTPUT

View file

@ -5,6 +5,13 @@
* check if no AA bit for non-forwarder, and thus lame zone. * check if no AA bit for non-forwarder, and thus lame zone.
In response to error report by Richard Doty for mail.opusnet.com. In response to error report by Richard Doty for mail.opusnet.com.
- fixup unput warning from lexer on freeBSD. - fixup unput warning from lexer on freeBSD.
- bug#183. pidfile, rundir, and chroot configure options. Also the
example.conf and manual pages get the configured defaults.
You can use: (or accept the defaults to /usr/local/etc/unbound/)
--with-conf-file=filename
--with-pidfile=filename
--with-run-dir=path
--with-chroot-dir=path
8 June 2008: Wouter 8 June 2008: Wouter
- if multiple CNAMEs, use the first one. Fixup akamai CNAME bug. - if multiple CNAMEs, use the first one. Fixup akamai CNAME bug.

View file

@ -43,6 +43,18 @@ This software is under BSD license, see LICENSE for details.
The server periodically checks if the amount of memory used fits with The server periodically checks if the amount of memory used fits with
the amount of memory it thinks it should be using, and reports the amount of memory it thinks it should be using, and reports
memory usage in detail. memory usage in detail.
* --with-conf-file=filename
Set default location of config file,
the default is /usr/local/etc/unbound/unbound.conf.
* --with-pidfile=filename
Set default location of pidfile,
the default is /usr/local/etc/unbound/unbound.pid.
* --with-run-dir=path
Set default working directory,
the default is /usr/local/etc/unbound.
* --with-chroot-dir=path
Set default chroot directory,
the default is /usr/local/etc/unbound.
* 'make test' attempts to run a series of tests, depending on the support * 'make test' attempts to run a series of tests, depending on the support
programs that are installed. programs that are installed.

View file

@ -162,7 +162,7 @@ server:
# How to do this is specific to your OS. # How to do this is specific to your OS.
# #
# If you give "" no chroot is performed. The path must not end in a /. # If you give "" no chroot is performed. The path must not end in a /.
# chroot: "/usr/local/etc/unbound" # chroot: "@UNBOUND_CHROOT_DIR@"
# if given, user privileges are dropped (after binding port), # if given, user privileges are dropped (after binding port),
# and the given username is assumed. Default is user "unbound". # and the given username is assumed. Default is user "unbound".
@ -172,7 +172,7 @@ server:
# the working directory. The relative files in this config are # the working directory. The relative files in this config are
# relative to this directory. If you give "" the working directory # relative to this directory. If you give "" the working directory
# is not changed. # is not changed.
# directory: "/usr/local/etc/unbound" # directory: "@UNBOUND_RUN_DIR@"
# the log file, "" means log to stderr. # the log file, "" means log to stderr.
# Use of this option sets use-syslog to "no". # Use of this option sets use-syslog to "no".
@ -183,7 +183,7 @@ server:
# use-syslog: yes # use-syslog: yes
# the pid file. # the pid file.
# pidfile: "/usr/local/etc/unbound/unbound.pid" # pidfile: "@UNBOUND_PIDFILE@"
# file to read root hints from. # file to read root hints from.
# get one from ftp://FTP.INTERNIC.NET/domain/named.cache # get one from ftp://FTP.INTERNIC.NET/domain/named.cache

View file

@ -36,7 +36,7 @@ The unbound-checkconf program exits with status code 1 on error,
0 for a correct config file. 0 for a correct config file.
.SH "FILES" .SH "FILES"
.TP .TP
.I /usr/local/etc/unbound/unbound.conf .I @ub_conf_file@
unbound configuration file. unbound configuration file.
.SH "SEE ALSO" .SH "SEE ALSO"
\fIunbound.conf\fR(5), \fIunbound.conf\fR(5),

View file

@ -31,8 +31,8 @@ The available options are:
Show the version and commandline option help. Show the version and commandline option help.
.TP .TP
.B \-c\fI cfgfile .B \-c\fI cfgfile
Set the config file with settings for unbound to read instead of the Set the config file with settings for unbound to read instead of reading the
file at default location /usr/local/etc/unbound/unbound.conf. The syntax is file at the default location, @ub_conf_file@. The syntax is
described in \fIunbound.conf\fR(5). described in \fIunbound.conf\fR(5).
.TP .TP
.B \-d .B \-d

View file

@ -254,7 +254,7 @@ Additionally, unbound may need to access /dev/random (for entropy)
and to /dev/log (if you use syslog) from inside the chroot. and to /dev/log (if you use syslog) from inside the chroot.
.IP .IP
If given a chroot is done to the given directory. The default is If given a chroot is done to the given directory. The default is
"/usr/local/etc/unbound". If you give "" no chroot is performed. "@UNBOUND_CHROOT_DIR@". If you give "" no chroot is performed.
.TP .TP
.B username: \fI<name> .B username: \fI<name>
If given, after binding the port the user privileges are dropped. Default is If given, after binding the port the user privileges are dropped. Default is
@ -266,7 +266,7 @@ If you change the port number in the config file, and that new port number
requires privileges, then a reload will fail; a restart is needed. requires privileges, then a reload will fail; a restart is needed.
.TP .TP
.B directory: \fI<directory> .B directory: \fI<directory>
Sets the working directory for the program. Sets the working directory for the program. Default is "@UNBOUND_RUN_DIR@".
.TP .TP
.B logfile: \fI<filename> .B logfile: \fI<filename>
If "" is given, logging goes to stderr, or nowhere once daemonized. If "" is given, logging goes to stderr, or nowhere once daemonized.
@ -286,14 +286,14 @@ The logfile setting is overridden when use\-syslog is turned on.
The default is to log to syslog. The default is to log to syslog.
.TP .TP
.B pidfile: \fI<filename> .B pidfile: \fI<filename>
The process id is written to the file. Default is "/usr/local/etc/unbound/unbound.pid". The process id is written to the file. Default is "@UNBOUND_PIDFILE@".
So, So,
.nf .nf
kill \-HUP `cat /usr/local/etc/unbound/unbound.pid` kill \-HUP `cat @UNBOUND_PIDFILE@`
.fi .fi
triggers a reload, triggers a reload,
.nf .nf
kill \-QUIT `cat /usr/local/etc/unbound/unbound.pid` kill \-QUIT `cat @UNBOUND_PIDFILE@`
.fi .fi
gracefully terminates. gracefully terminates.
.TP .TP
@ -663,15 +663,18 @@ server:
.fi .fi
.SH "FILES" .SH "FILES"
.TP .TP
.I /usr/local/etc/unbound .I @UNBOUND_RUN_DIR@
default unbound working directory and default default unbound working directory.
.TP
.I @UNBOUND_CHROOT_DIR@
default
\fIchroot\fR(2) \fIchroot\fR(2)
location. location.
.TP .TP
.I unbound.conf .I @ub_conf_file@
unbound configuration file. unbound configuration file.
.TP .TP
.I unbound.pid .I @UNBOUND_PIDFILE@
default unbound pidfile with process ID of the running daemon. default unbound pidfile with process ID of the running daemon.
.TP .TP
.I unbound.log .I unbound.log