Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
dhcp
Commits
c87db1b1
Commit
c87db1b1
authored
Sep 23, 2016
by
Francis Dupont
Browse files
Rebased to post #43227
parent
38f8f603
Changes
12
Hide whitespace changes
Inline
Side-by-side
Makefile.am
View file @
c87db1b1
...
...
@@ -22,7 +22,7 @@ EXTRA_DIST = RELNOTES LICENSE \
doc/examples/dhclient-dhcpv6.conf doc/examples/dhcpd-dhcpv6.conf
\
doc/devel/arch.dox doc/devel/atf.dox doc/devel/contrib.dox
\
doc/devel/debug.dox doc/devel/isc-logo.jpg doc/devel/mainpage.dox
\
doc/devel/omapi.dox doc/devel/qa.dox
util/bindvar.sh
\
doc/devel/omapi.dox doc/devel/qa.dox
\
bind
/Makefile.in
bind
/bind.tar.gz
bind
/version.tmp
\
common/tests/Atffile server/tests/Atffile
...
...
Makefile.in
View file @
c87db1b1
...
...
@@ -362,7 +362,7 @@ EXTRA_DIST = RELNOTES LICENSE \
doc/examples/dhclient-dhcpv6.conf doc/examples/dhcpd-dhcpv6.conf
\
doc/devel/arch.dox doc/devel/atf.dox doc/devel/contrib.dox
\
doc/devel/debug.dox doc/devel/isc-logo.jpg doc/devel/mainpage.dox
\
doc/devel/omapi.dox doc/devel/qa.dox
util/bindvar.sh
\
doc/devel/omapi.dox doc/devel/qa.dox
\
bind
/Makefile.in
bind
/bind.tar.gz
bind
/version.tmp
\
common/tests/Atffile server/tests/Atffile
...
...
RELNOTES
View file @
c87db1b1
...
...
@@ -63,9 +63,31 @@ by Eric Young (eay@cryptsoft.com).
-
Removed
an
extraneous
expression
in
omapi
socket
callback
function
.
Prior
to
this
change
,
the
logic
was
techinically
incorrect
but
other
factors
ensured
the
outcome
itself
was
correct
.
This
change
was
made
primarily
for
code
clarity
.
for
code
clarity
.
Thanks
to
Ganesh
Pinjala
for
bringing
the
issue
to
our
attention
.
[
ISC
-
Bugs
#
42834
]
-
Corrected
a
bug
which
could
cause
the
server
to
sporadically
crash
while
loading
lease
files
with
the
lease
-
id
-
format
is
set
to
"hex"
.
Our
thanks
to
Jay
Ford
,
University
of
Iowa
for
reporting
the
issue
.
[
ISC
-
Bugs
#
43185
]
-
Pass
configure
arguments
which
begin
with
an
upper
case
letter
,
e
.
g
.
CFLAGS
,
to
the
embedded
bind
configure
,
so
it
is
no
longer
required
to
use
environment
variables
to
get
the
same
effect
.
[
ISC
-
Bugs
#
35143
]
-
Added
--
enable
-
kqueue
,
--
enable
-
epoll
,
--
enable
-
devpoll
and
a
more
general
--
with
-
bind
-
extra
-
config
to
pass
extra
options
to
the
embedded
bind
configure
.
Note
we
had
mixed
experiences
with
this
so
it
is
at
the
user
risk
,
i
.
e
.,
they
are
NOT
SUPPORTED
yet
.
[
ISC
-
Bugs
#
20890
]
-
Changed
the
way
the
embedded
bind
Makefile
is
updated
by
configure
.
The
only
user
visible
side
effect
is
that
--
with
-
libbind
now
requires
either
"no"
or
an
(
absolute
)
path
,
i
.
e
.
"yes"
is
no
longer
valid
.
[
ISC
-
Bugs
#
43227
]
Changes
since
4.3.0
(
bug
fixes
)
-
Tidy
up
several
small
tickets
.
...
...
common/parse.c
View file @
c87db1b1
...
...
@@ -98,7 +98,7 @@ void skip_to_rbrace (cfile, brace_count)
enum
dhcp_token
token
;
const
char
*
val
;
#if defined (DEBUG_TOKEN)
#if defined (DEBUG_TOKEN
S
)
log_error
(
"skip_to_rbrace: %d
\n
"
,
brace_count
);
#endif
do
{
...
...
common/print.c
View file @
c87db1b1
...
...
@@ -383,15 +383,27 @@ void print_hex_only (len, data, limit, buf)
unsigned
limit
;
char
*
buf
;
{
unsigned
i
;
char
*
bufptr
=
buf
;
int
byte
=
0
;
if
(
(
buf
==
NULL
)
||
(
limit
<
3
))
if
(
data
==
NULL
||
bufptr
==
NULL
||
limit
==
0
)
{
return
;
}
for
(
i
=
0
;
(
i
<
limit
/
3
)
&&
(
i
<
len
);
i
++
)
{
sprintf
(
&
buf
[
i
*
3
],
"%02x:"
,
data
[
i
]);
if
(((
len
==
0
)
||
((
len
*
3
)
>
limit
)))
{
*
bufptr
=
0x0
;
return
;
}
buf
[(
i
*
3
)
-
1
]
=
0
;
for
(
;
byte
<
len
;
++
byte
)
{
if
(
byte
>
0
)
{
*
bufptr
++
=
':'
;
}
sprintf
(
bufptr
,
"%02x"
,
data
[
byte
]);
bufptr
+=
2
;
}
return
;
}
...
...
common/tests/misc_unittest.c
View file @
c87db1b1
...
...
@@ -153,6 +153,69 @@ ATF_TC_BODY(find_percent_adv, tc)
return
;
}
ATF_TC
(
print_hex_only
);
ATF_TC_HEAD
(
print_hex_only
,
tc
)
{
atf_tc_set_md_var
(
tc
,
"descr"
,
"Verify hex data formatting."
);
}
/* This test exercises the print_hex_only function
*/
ATF_TC_BODY
(
print_hex_only
,
tc
)
{
unsigned
char
data
[]
=
{
0xaa
,
0xbb
,
0xcc
,
0xdd
};
char
*
ref
=
"aa:bb:cc:dd"
;
char
buf
[
14
];
memset
(
buf
,
'x'
,
sizeof
(
buf
));
int
data_len
=
sizeof
(
data
);
int
expected_len
=
12
;
/* Proper input values should produce proper result */
print_hex_only
(
data_len
,
data
,
expected_len
,
buf
);
if
(
strlen
(
buf
)
!=
strlen
(
ref
))
{
atf_tc_fail
(
"len of result is wrong"
);
}
if
(
strcmp
(
buf
,
ref
))
{
atf_tc_fail
(
"result doesn't match ref"
);
}
/* Make sure we didn't overrun the buffer */
if
(
buf
[
expected_len
]
!=
'x'
)
{
atf_tc_fail
(
"data over run detected"
);
}
/* Buffer == null doesn't crash */
print_hex_only
(
data_len
,
data
,
expected_len
,
NULL
);
/* Limit == 0 doesn't write (or crash) */
*
buf
=
'-'
;
print_hex_only
(
data_len
,
data
,
0
,
buf
);
if
(
*
buf
!=
'-'
)
{
atf_tc_fail
(
"limit of zero, altered buffer"
);
}
/* data == NULL doesn't write (or crash) */
print_hex_only
(
data_len
,
NULL
,
expected_len
,
buf
);
if
(
*
buf
!=
'-'
)
{
atf_tc_fail
(
"limit of zero, altered buffer"
);
}
/* Limit too small should produce zero length string */
*
buf
=
'-'
;
print_hex_only
(
data_len
,
data
,
expected_len
-
1
,
buf
);
if
(
*
buf
!=
0x0
)
{
atf_tc_fail
(
"limit too small should have failed"
);
}
/* Data length of 0 should produce zero length string */
*
buf
=
'-'
;
print_hex_only
(
0
,
data
,
expected_len
,
buf
);
if
(
*
buf
!=
0x0
)
{
atf_tc_fail
(
"limit too small should have failed"
);
}
}
/* This macro defines main() method that will call specified
test cases. tp and simple_test_case names can be whatever you want
...
...
@@ -161,6 +224,7 @@ ATF_TP_ADD_TCS(tp)
{
ATF_TP_ADD_TC
(
tp
,
find_percent_basic
);
ATF_TP_ADD_TC
(
tp
,
find_percent_adv
);
ATF_TP_ADD_TC
(
tp
,
print_hex_only
);
return
(
atf_no_error
());
}
configure
View file @
c87db1b1
...
...
@@ -627,8 +627,11 @@ LTLIBOBJS
LIBOBJS
LDAP_CFLAGS
LDAP_LIBS
BINDBUILD
BINDBIND
BINDSRCDIR
BINDDIR
BINDIOMUX
ac_prefix_program
DISTCHECK_ATF_CONFIGURE_FLAG
HAVE_ATF_FALSE
...
...
@@ -773,6 +776,10 @@ with_cli6_pid_file
with_relay_pid_file
with_relay6_pid_file
with_randomdev
enable_kqueue
enable_epoll
enable_devpoll
with_bind_extra_config
with_libbind
with_ldap
with_ldapcrypto
...
...
@@ -1437,6 +1444,9 @@ Optional Features:
--enable-log-pid Include PIDs in syslog messages (default is no).
--enable-binary-leases enable support for binary insertion of leases
(default is no)
--enable-kqueue use BSD kqueue (default is no)
--enable-epoll use Linux epoll (default is no)
--enable-devpoll use /dev/poll (default is no)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
...
...
@@ -1473,8 +1483,10 @@ Optional Packages:
File for dhcrelay6 process information (default is
LOCALSTATEDIR/run/dhcrelay6.pid)
--with-randomdev=PATH Path for random device (default is /dev/random)
--with-libbind=PATH bind includes and libraries are in PATH (default is
./bind)
--with-bind-extra-config
configure bind librairies with some extra options
(default is none)
--with-libbind=PATH bind includes and libraries are in PATH
--with-ldap enable OpenLDAP support in dhcpd (default is no)
--with-ldapcrypto enable OpenLDAP crypto support in dhcpd (default is
no)
...
...
@@ -4475,6 +4487,19 @@ BINDCONFIG=
if
test
"
$cross_compiling
"
=
"yes"
;
then
BINDCONFIG
=
"--host=
$host
"
fi
# Pass CFLAGS and co. $ac_configure_args looks like "'arg1' 'arg2' ..."
# and as there can be a space inside an argument some magic is required.
# This sets $1 ... $N to my_configure_args, arg1 ... argN
eval
"set my_configure_args
$ac_configure_args
"
# remove my_configure_args, i.e., the guard against empty $ac_configure_args
shift
# iterate on arguments and copying 'arg' when it begins by an upper case
for
a
do
case
$a
in
[
A-Z]
*
)
BINDCONFIG
=
"
$BINDCONFIG
'
$a
'"
;;
esac
done
if
test
"
$cross_compiling
"
=
"yes"
;
then
CROSS_COMPILING_TRUE
=
...
...
@@ -5657,8 +5682,8 @@ fi
fi
if
test
!
-x
$ATF_BIN
/atf-run
-o
!
-x
$ATF_BIN
/atf-report
;
then
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: WARNING: atf-run
,
atf-report not found, assuming they are in your path"
>
&5
$as_echo
"
$as_me
: WARNING: atf-run
,
atf-report not found, assuming they are in your path"
>
&2
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: WARNING: atf-run
/
atf-report not found, assuming they are in your path"
>
&5
$as_echo
"
$as_me
: WARNING: atf-run
/
atf-report not found, assuming they are in your path"
>
&2
;
}
fi
...
...
@@ -6722,6 +6747,65 @@ fi
BINDCONFIG
=
"
$BINDCONFIG
--with-randomdev=
$use_randomdev
"
fi
BINDIOMUX
=
"--disable-kqueue --disable-epoll --disable-devpoll"
# check kqueue/epoll/devpoll alternative to select
# Check whether --enable-kqueue was given.
if
test
"
${
enable_kqueue
+set
}
"
=
set
;
then
:
enableval
=
$enable_kqueue
;
want_kqueue
=
"
$enableval
"
else
want_kqueue
=
"no"
fi
if
test
"
$want_kqueue
"
=
"yes"
;
then
BINDIOMUX
=
"--enable-kqueue"
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: WARNING: --enable-kqueue is not supported: it may lead to issues such as server looping"
>
&5
$as_echo
"
$as_me
: WARNING: --enable-kqueue is not supported: it may lead to issues such as server looping"
>
&2
;
}
fi
# Check whether --enable-epoll was given.
if
test
"
${
enable_epoll
+set
}
"
=
set
;
then
:
enableval
=
$enable_epoll
;
want_epoll
=
"
$enableval
"
else
want_epoll
=
"no"
fi
if
test
"
$want_epoll
"
=
"yes"
;
then
BINDIOMUX
=
"--enable-epoll"
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: WARNING: --enable-epoll is not supported: it may lead to issues such as server looping"
>
&5
$as_echo
"
$as_me
: WARNING: --enable-epoll is not supported: it may lead to issues such as server looping"
>
&2
;
}
fi
# Check whether --enable-devpoll was given.
if
test
"
${
enable_devpoll
+set
}
"
=
set
;
then
:
enableval
=
$enable_devpoll
;
want_devpoll
=
"
$enableval
"
else
want_devpoll
=
"no"
fi
if
test
"
$want_devpoll
"
=
"yes"
;
then
BINDIOMUX
=
"--enable-devpoll"
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: WARNING: --enable-devpoll is not supported: it may lead to issues such as server looping"
>
&5
$as_echo
"
$as_me
: WARNING: --enable-devpoll is not supported: it may lead to issues such as server looping"
>
&2
;
}
fi
# general extra bind configure arguments
# Check whether --with-bind-extra-config was given.
if
test
"
${
with_bind_extra_config
+set
}
"
=
set
;
then
:
withval
=
$with_bind_extra_config
;
use_xbindconfig
=
"
$withval
"
else
use_xbindconfig
=
""
fi
case
"
$use_xbindconfig
"
in
yes
|
no|
''
)
;;
*
)
BINDCONFIG
=
"
$BINDCONFIG
$use_xbindconfig
"
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: WARNING: Most options to bind configure are not supported when used by ISC DHCP"
>
&5
$as_echo
"
$as_me
: WARNING: Most options to bind configure are not supported when used by ISC DHCP"
>
&2
;
}
;;
esac
# see if there is a "sa_len" field in our interface information structure
ac_fn_c_check_member
"
$LINENO
"
"struct sockaddr"
"sa_len"
"ac_cv_member_struct_sockaddr_sa_len"
"#include <sys/socket.h>
"
...
...
@@ -6822,8 +6906,11 @@ $as_echo "#define VLAN_TCI_PRESENT 1" >>confdefs.h
fi
# bind/Makefile.in is not from automake so we need 2 sets of variables
BINDDIR
=
BINDSRCDIR
=
BINDBIND
=
BINDBUILD
=
# Check whether --with-libbind was given.
if
test
"
${
with_libbind
+set
}
"
=
set
;
then
:
...
...
@@ -6834,31 +6921,47 @@ fi
case
"
$use_libbind
"
in
yes
)
BINDDIR
=
"
\$
{top_srcdir}/bind"
BINDSRCDIR
=
"
\$
{top_srcdir}/bind"
as_fn_error
$?
"PATH is required in --with-libbind=PATH"
"
$LINENO
"
5
;;
no
)
BINDDIR
=
"
\$
{top_srcdir}/bind"
BINDSRCDIR
=
"
\$
{top_srcdir}/bind"
my_abs_srcdir
=
`
cd
$srcdir
&&
pwd
`
BINDBIND
=
"
${
my_abs_srcdir
}
/bind"
if
test
!
-d
"
$srcdir
/bind"
;
then
as_fn_error
$?
"Where to find or build bind includes and libraries must be specified"
"
$LINENO
"
5
fi
if
test
-d
"
$srcdir
/bind/bind9"
;
then
BINDBUILD
=
"
${
my_abs_srcdir
}
/bind/bind9"
else
if
test
!
-f
"
$srcdir
/bind/version.tmp"
;
then
as_fn_error
$?
"Cannot find
$srcdir
/bind/version.tmp"
"
$LINENO
"
5
fi
.
"
$srcdir
/bind/version.tmp"
bindversion
=
${
MAJORVER
}
.
${
MINORVER
}
.
${
PATCHVER
}${
RELEASETYPE
}${
RELEASEVER
}
BINDBUILD
=
"
${
my_abs_srcdir
}
/bind/bind-
$bindversion
"
fi
ac_config_files
=
"
$ac_config_files
$srcdir
/bind/Makefile"
;;
*
)
BINDDIR
=
"
$use_libbind
"
if
test
!
-d
"
$srcdir
/bind"
;
then
# no bind directory, create it with a fake Makefile.in
# (AC_CONFIG_FILES and top Makefile refer to it so
# it must exits)
mkdir
$srcdir
/bind
cat
>
$srcdir
/bind/Makefile.in
<<
EOF
# placeholder
all check clean distclean distdir install uninstall:
EOF
if
test
!
-d
"
$use_libbind
"
;
then
as_fn_error
$?
"Cannot find bind directory at
$use_libbind
"
"
$LINENO
"
5
fi
if
test
!
-d
"
$use_libbind
/include"
;
then
as_fn_error
$?
"Cannot find bind includes at
$use_libbind
/include"
"
$LINENO
"
5
fi
if
test
!
-d
"
$use_libbind
/lib"
;
then
as_fn_error
$?
"Cannot find bind libraries at
$use_libbind
/lib"
"
$LINENO
"
5
fi
BINDDIR
=
"
$use_libbind
"
;;
esac
# OpenLDAP support.
# Check whether --with-ldap was given.
...
...
@@ -7240,7 +7343,7 @@ $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
fi
ac_config_files
=
"
$ac_config_files
Makefile
$srcdir
/bind/Makefile
client/Makefile client/tests/Makefile common/Makefile common/tests/Makefile dhcpctl/Makefile includes/Makefile omapip/Makefile relay/Makefile server/Makefile tests/Makefile tests/unittest.sh server/tests/Makefile doc/devel/doxyfile"
ac_config_files
=
"
$ac_config_files
Makefile client/Makefile client/tests/Makefile common/Makefile common/tests/Makefile dhcpctl/Makefile includes/Makefile omapip/Makefile relay/Makefile server/Makefile tests/Makefile tests/unittest.sh server/tests/Makefile doc/devel/doxyfile"
cat
>
confcache
<<
\
_ACEOF
# This file is a shell script that caches the results of configure
...
...
@@ -7986,8 +8089,8 @@ do
case
$ac_config_target
in
"depfiles") CONFIG_COMMANDS="
$CONFIG_COMMANDS
depfiles" ;;
"includes/config.h") CONFIG_HEADERS="
$CONFIG_HEADERS
includes/config.h" ;;
"Makefile") CONFIG_FILES="
$CONFIG_FILES
Makefile" ;;
"
$srcdir
/bind/Makefile") CONFIG_FILES="
$CONFIG_FILES
$srcdir
/bind/Makefile" ;;
"Makefile") CONFIG_FILES="
$CONFIG_FILES
Makefile" ;;
"client/Makefile") CONFIG_FILES="
$CONFIG_FILES
client/Makefile" ;;
"client/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
client/tests/Makefile" ;;
"common/Makefile") CONFIG_FILES="
$CONFIG_FILES
common/Makefile" ;;
...
...
@@ -8697,16 +8800,6 @@ else
DHCP_VERSIONS
=
"DHCPv4"
fi
(
cd
$srcdir
sh util/bindvar.sh
if
test
$?
-ne
0
;
then
as_fn_error
$?
"*** util/bindvar.sh failed"
"
$LINENO
"
5
fi
)
if
test
$?
-ne
0
;
then
exit
$?
fi
cat
>
config.report
<<
END
ISC DHCP source configure results:
...
...
configure.ac
View file @
c87db1b1
...
...
@@ -37,6 +37,19 @@ BINDCONFIG=
if test "$cross_compiling" = "yes"; then
BINDCONFIG="--host=$host"
fi
# Pass CFLAGS and co. $ac_configure_args looks like "'arg1' 'arg2' ..."
# and as there can be a space inside an argument some magic is required.
# This sets $1 ... $N to my_configure_args, arg1 ... argN
eval "set my_configure_args $ac_configure_args"
# remove my_configure_args, i.e., the guard against empty $ac_configure_args
shift
# iterate on arguments and copying 'arg' when it begins by an upper case
for a
do
case $a in
[[A-Z]]*) BINDCONFIG="$BINDCONFIG '$a'" ;;
esac
done
AC_SUBST(BINDCONFIG)
AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
...
...
@@ -295,7 +308,7 @@ elif test "$atf_path" != "no" ; then
fi
if test ! -x $ATF_BIN/atf-run -o ! -x $ATF_BIN/atf-report ; then
AC_MSG_WARN([atf-run
,
atf-report not found, assuming they are in your path])
AC_MSG_WARN([atf-run
/
atf-report not found, assuming they are in your path])
fi
AC_SUBST(ATF_CFLAGS)
...
...
@@ -631,6 +644,45 @@ else
BINDCONFIG="$BINDCONFIG --with-randomdev=$use_randomdev"
fi
BINDIOMUX="--disable-kqueue --disable-epoll --disable-devpoll"
# check kqueue/epoll/devpoll alternative to select
AC_ARG_ENABLE(kqueue,
AS_HELP_STRING([--enable-kqueue],[use BSD kqueue (default is no)]),
want_kqueue="$enableval", want_kqueue="no")
if test "$want_kqueue" = "yes"; then
BINDIOMUX="--enable-kqueue"
AC_MSG_WARN([--enable-kqueue is not supported: it may lead to issues such as server looping])
fi
AC_ARG_ENABLE(epoll,
AS_HELP_STRING([--enable-epoll],[use Linux epoll (default is no)]),
want_epoll="$enableval", want_epoll="no")
if test "$want_epoll" = "yes"; then
BINDIOMUX="--enable-epoll"
AC_MSG_WARN([--enable-epoll is not supported: it may lead to issues such as server looping])
fi
AC_ARG_ENABLE(devpoll,
AS_HELP_STRING([--enable-devpoll],[use /dev/poll (default is no)]),
want_devpoll="$enableval", want_devpoll="no")
if test "$want_devpoll" = "yes"; then
BINDIOMUX="--enable-devpoll"
AC_MSG_WARN([--enable-devpoll is not supported: it may lead to issues such as server looping])
fi
AC_SUBST(BINDIOMUX)
# general extra bind configure arguments
AC_ARG_WITH(bind-extra-config,
AS_HELP_STRING([--with-bind-extra-config],[configure bind librairies
with some extra options (default is none)]),
use_xbindconfig="$withval", use_xbindconfig="")
case "$use_xbindconfig" in
yes|no|'')
;;
*)
BINDCONFIG="$BINDCONFIG $use_xbindconfig"
AC_MSG_WARN([Most options to bind configure are not supported when used by ISC DHCP])
;;
esac
# see if there is a "sa_len" field in our interface information structure
AC_CHECK_MEMBER(struct sockaddr.sa_len,
AC_DEFINE([HAVE_SA_LEN], [],
...
...
@@ -679,38 +731,55 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci,
[AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])]
,, [#include <linux/if_packet.h>])
# bind/Makefile.in is not from automake so we need 2 sets of variables
BINDDIR=
BINDSRCDIR=
BINDBIND=
BINDBUILD=
AC_ARG_WITH(libbind,
AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
(default is ./bind)]),
AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH]),
use_libbind="$withval", use_libbind="no")
case "$use_libbind" in
yes)
BINDDIR="\${top_srcdir}/bind"
BINDSRCDIR="\${top_srcdir}/bind"
AC_MSG_ERROR([PATH is required in --with-libbind=PATH])
;;
no)
BINDDIR="\${top_srcdir}/bind"
BINDSRCDIR="\${top_srcdir}/bind"
my_abs_srcdir=`cd $srcdir && pwd`
BINDBIND="${my_abs_srcdir}/bind"
if test ! -d "$srcdir/bind"; then
AC_MSG_ERROR([Where to find or build bind includes and libraries must be specified])
fi
if test -d "$srcdir/bind/bind9"; then
BINDBUILD="${my_abs_srcdir}/bind/bind9"
else
if test ! -f "$srcdir/bind/version.tmp"; then
AC_MSG_ERROR([Cannot find $srcdir/bind/version.tmp])
fi
. "$srcdir/bind/version.tmp"
bindversion=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
BINDBUILD="${my_abs_srcdir}/bind/bind-$bindversion"
fi
AC_CONFIG_FILES([$srcdir/bind/Makefile])
;;
*)
BINDDIR="$use_libbind"
if test ! -d "$srcdir/bind"; then
# no bind directory, create it with a fake Makefile.in
# (AC_CONFIG_FILES and top Makefile refer to it so
# it must exits)
mkdir $srcdir/bind
cat > $srcdir/bind/Makefile.in << EOF
# placeholder
all check clean distclean distdir install uninstall:
EOF
if test ! -d "$use_libbind"; then
AC_MSG_ERROR([Cannot find bind directory at $use_libbind])
fi
if test ! -d "$use_libbind/include"; then
AC_MSG_ERROR([Cannot find bind includes at $use_libbind/include])
fi
if test ! -d "$use_libbind/lib"; then
AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/lib])
fi
BINDDIR="$use_libbind"
;;
esac
AC_SUBST(BINDDIR)
AC_SUBST(BINDSRCDIR)
AC_SUBST(BINDBIND)
AC_SUBST(BINDBUILD)
# OpenLDAP support.
AC_ARG_WITH(ldap,
...
...
@@ -805,7 +874,6 @@ AC_C_FLEXIBLE_ARRAY_MEMBER
AC_CONFIG_FILES([
Makefile
$srcdir/bind/Makefile
client/Makefile
client/tests/Makefile
common/Makefile
...
...
@@ -830,16 +898,6 @@ else
DHCP_VERSIONS="DHCPv4"
fi
(cd $srcdir
sh util/bindvar.sh
if test $? -ne 0; then
AC_MSG_ERROR([*** util/bindvar.sh failed])
fi
)
if test $? -ne 0; then
exit $?
fi
cat > config.report << END
ISC DHCP source configure results:
...
...
util/Makefile.bind.in
View file @
c87db1b1
...
...
@@ -15,22 +15,15 @@
# Configure and build the bind libraries for use by DHCP
in
clude
./version.tmp
version
=
${MAJORVER}
.
${MINORVER}
.
${PATCHVER}${RELEASETYPE}${RELEASEVER}
b
in
ddir
=
@BINDBIND@
bindsrcdir
=
@BINDBUILD@
# bindvar.tmp is constructed by configure, it has the paths for bind
# if GMAKE is blank the shell script couldn't find a gmake to use.
# binddir=
# GMAKE=
include
./bindvar.tmp
bindsrcdir
=
bind-
${version}
bindconfig
=
--disable-kqueue
--disable-epoll
--disable-devpoll
\
--without-openssl
--without-libxml2
--enable-exportlib
\
--with-gssapi
=
no
--enable-threads
=
no @BINDCONFIG@
\
bindconfig
=
--without-openssl
--without-libxml2
\
--without-gssapi
--disable-threads
\
--enable-exportlib
\
--with-export-includedir
=
${binddir}
/include
\
--with-export-libdir
=
${binddir}
/lib
--with-export-libdir
=
${binddir}
/lib
\
@BINDIOMUX@ @BINDCONFIG@
--enable-full-report
@BIND_ATF_FALSE@
cleandirs
=
./lib ./include
@BIND_ATF_TRUE@
cleandirs
=
./lib ./include ./atf
...
...
@@ -47,11 +40,6 @@ bind1:
gunzip
-c
bind.tar.gz
|
tar
xf
-
;
\
fi
@if
test
-z
"${GMAKE}"
;
then
\
echo
"unable to find gmake"
1>&2
;
\
exit
1;
\
fi
# Configure the export libraries
# Currently disable the epoll, devpoll and kqueue options as they
# don't interact well with the DHCP code.
...
...
@@ -74,7 +62,7 @@ atf:
else
\
echo
Building
ATF
support
;
\
(cd
${bindsrcdir}/unit;
\
MAKE
=
${GMAKE}
${GMAKE}
atf
>
${binddir}
/build.log
;
\