1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.56)
sinclude(acx_nlnetlabs.m4)
CFLAGS="$CFLAGS"
AC_INIT(dnssec-trigger, 0.13, labs@nlnetlabs.nl, dnssec-trigger)
AC_AIX
AC_C_CONST
AC_LANG_C
dnl
dnl By default set prefix to /usr/local
dnl
case "$prefix" in
NONE)
prefix="/usr/local"
;;
esac
if test "$exec_prefix" == "NONE"; then
exec_prefix="$prefix"
fi
# are we on MinGW?
if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
else
if echo $target | grep mingw32 >/dev/null; then on_mingw="yes"
else on_mingw="no"; fi
fi
AC_DEFINE(WINVER, 0x0502, [the version of the windows API enabled])
dnl compute package version for windows res files, the first four numbers.
[
wnvs=`echo $PACKAGE_VERSION.0.0 | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' `
]
AC_DEFINE_UNQUOTED(RSRC_PACKAGE_VERSION, [$wnvs], [version number for resource files])
ACX_DEPFLAG
ACX_DETERMINE_EXT_FLAGS_UNBOUND
AC_CHECK_HEADERS([getopt.h time.h],,, [AC_INCLUDES_DEFAULT])
# flag warnings.
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debug warnings, asserts, makefile-dependencies]))
debug_enabled="$enable_debug"
AC_SUBST(debug_enabled)
case "$enable_debug" in
yes)
ACX_CHECK_COMPILER_FLAG(W, [CFLAGS="$CFLAGS -W"])
ACX_CHECK_COMPILER_FLAG(Wall, [CFLAGS="$CFLAGS -Wall"])
ACX_CHECK_COMPILER_FLAG(Wextra, [CFLAGS="$CFLAGS -Wextra"])
ACX_CHECK_COMPILER_FLAG(Wdeclaration-after-statement, [CFLAGS="$CFLAGS -Wdeclaration-after-statement"])
AC_DEFINE([DO_DEBUG], [], [define this to enable debug checks.])
;;
no|*)
# nothing to do.
;;
esac
if test "$on_mingw" = "yes"; then
# this flag is only really needed for GTK+ applications for its
# linkback of event functions.
EXPORT_DYNAMIC="-Wl,-export-all-symbols"
else
AC_MSG_CHECKING([if -export-dynamic works])
bakld="$LDFLAGS"
LDFLAGS="$LDFLAGS -export-dynamic"
AC_LINK_IFELSE([AC_LANG_SOURCE([[
int main(void) {
return 0;
}
]])], [
AC_MSG_RESULT(yes)
EXPORT_DYNAMIC="-export-dynamic"
], [AC_MSG_RESULT(no)])
LDFLAGS="$bakld"
AC_SUBST(EXPORT_DYNAMIC)
fi
AC_C_INLINE
ACX_CHECK_FORMAT_ATTRIBUTE
ACX_CHECK_UNUSED_ATTRIBUTE
if test "$srcdir" != "."; then
CPPFLAGS="$CPPFLAGS -I$srcdir"
fi
AC_CHECK_TOOL(STRIP, strip)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h],,, [AC_INCLUDES_DEFAULT])
# MinGW32 tests
if test "$on_mingw" = "yes"; then
AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h],,,
[AC_INCLUDES_DEFAULT])
fi
# end mingw32 tests
# check for types
AC_CHECK_TYPE(int8_t, char)
AC_CHECK_TYPE(int16_t, short)
AC_CHECK_TYPE(int32_t, int)
AC_CHECK_TYPE(int64_t, long long)
AC_CHECK_TYPE(uint8_t, unsigned char)
AC_CHECK_TYPE(uint16_t, unsigned short)
AC_CHECK_TYPE(uint32_t, unsigned int)
AC_CHECK_TYPE(uint64_t, unsigned long long)
AC_TYPE_SIZE_T
AC_CHECK_TYPE(ssize_t, int)
AC_TYPE_UID_T
AC_TYPE_PID_T
AC_TYPE_OFF_T
AC_CHECK_TYPE(u_char, ,
[AC_DEFINE([u_char], [unsigned char], [Define to 'unsigned char' if not defined])], [
AC_INCLUDES_DEFAULT
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
#endif
])
ACX_TYPE_RLIM_T
ACX_TYPE_SOCKLEN_T
ACX_TYPE_IN_ADDR_T
ACX_TYPE_IN_PORT_T
# check to see if libraries are needed for these functions.
AC_SEARCH_LIBS([inet_pton], [nsl])
AC_SEARCH_LIBS([socket], [socket])
# set static linking if requested
staticexe="no"
AC_ARG_ENABLE(static-exe, AC_HELP_STRING([--enable-static-exe],
[ enable to compile executables statically against ldns and crypto libs ]),
, )
if test x_$enable_static_exe = x_yes; then
staticexe="yes"
if test "$on_mingw" = yes; then
staticexe="-all-static"
# for static crosscompile, include gdi32 and zlib here.
if test "`uname`" = "Linux"; then
LIBS="$LIBS -lgdi32 -lz"
fi
fi
fi
ACX_FUNC_MALLOC([dnssectrigger])
AC_FUNC_CHOWN
AC_FUNC_FORK
AC_TYPE_SIGNAL
AC_FUNC_FSEEKO
ACX_SYS_LARGEFILE
# check for OpenSSL
ACX_WITH_SSL
ACX_LIB_SSL
AC_CHECK_HEADERS([openssl/conf.h],,, [AC_INCLUDES_DEFAULT])
AC_CHECK_HEADERS([openssl/engine.h],,, [AC_INCLUDES_DEFAULT])
if test "$staticexe" = "yes"; then
LIBS="`echo $LIBS | sed -e 's/ -lcrypto//'`"
LIBS="$ssldir/lib/libssl.a $ssldir/lib/libcrypto.a $LIBS"
# check if lz is needed
AC_MSG_CHECKING([if static libcrypto needs -lz])
AC_TRY_LINK(, [
int SSL_library_init(void);
(void)SSL_library_init();
], [
AC_MSG_RESULT(no)
], [
AC_MSG_RESULT(yes)
LIBS="$LIBS -lz"
])
else
LIBS="-lssl $LIBS"
fi
ACX_CHECK_GETADDRINFO_WITH_INCLUDES
if test "$USE_WINSOCK" = 1; then
AC_DEFINE(UB_ON_WINDOWS, 1, [Use win32 resources and API])
UB_ON_WINDOWS=yes
AC_SUBST(UB_ON_WINDOWS)
AC_CHECK_HEADERS([iphlpapi.h],,, [AC_INCLUDES_DEFAULT
#include <windows.h>
])
AC_CHECK_TOOL(WINDRES, windres)
LIBS="$LIBS -liphlpapi"
AC_CHECK_FUNC([EVP_PKEY_CTX_new_id],,[AC_ERROR(Need newer openssl)])
AC_CHECK_FUNCS([_beginthreadex])
AC_MSG_CHECKING([for GetAdaptersAddresses])
AC_LINK_IFELSE(
[AC_LANG_SOURCE([[
#include <windows.h>
#include <iphlpapi.h>
int main(void) {
(void)GetAdaptersAddresses(0, 0, NULL, NULL, NULL);
return 0;
}
]])]
, [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETADAPTERSADDRESSES, [1], [If we have this function (windows XP and later)])
], [
AC_MSG_RESULT(no)
])
fi
AC_DEFINE(USE_MINI_EVENT, 1, [Use builtin event system])
if test $ac_cv_func_getaddrinfo = no; then
AC_LIBOBJ([fake-rfc2553])
fi
# check after getaddrinfo for its libraries
ACX_FUNC_IOCTLSOCKET
# see if daemon(3) exists, and if it is deprecated.
AC_CHECK_FUNCS([daemon])
if test $ac_cv_func_daemon = yes; then
ACX_FUNC_DEPRECATED([daemon], [(void)daemon(0, 0);], [
#include <stdlib.h>
])
fi
AC_CHECK_FUNCS([strftime localtime_r fcntl setsid sleep usleep random srandom recvmsg sendmsg writev chflags])
AC_REPLACE_FUNCS(inet_pton)
AC_REPLACE_FUNCS(inet_ntop)
AC_REPLACE_FUNCS(snprintf)
AC_REPLACE_FUNCS(strlcpy)
AC_REPLACE_FUNCS(memmove)
hooks="auto"
AC_ARG_WITH([hooks], AC_HELP_STRING([--with-hooks],
[Set the DHCP change hooks to use, default 'auto', can be 'osx', 'networkmanager', 'netconfig', 'windows' or 'none']),, withval="")
if test -n "$withval"; then
hooks="$withval"
fi
# hook settings
networkmanager_dispatcher_dir="$sysconfdir/NetworkManager/dispatcher.d"
AC_ARG_WITH([networkmanager-dispatch], AC_HELP_STRING([--with-networkmanager-dispatch],
[Set the networkmanager dhcp dispatcher dir, default tests prefix/etc/NetworkManager/dispatcher.d and /etc/NetworkManager/dispatcher.d]),
, withval="")
with_nm_dispatch="$withval"
AC_SUBST(networkmanager_dispatcher_dir)
netconfig_dispatcher_dir="$sysconfdir/netconfig.d"
AC_ARG_WITH([netconfig-dispatch], AC_HELP_STRING([--with-netconfig-dispatch],
[Set the netconfig dhcp dispatcher dir, default tests prefix/etc/netconfig.d and /etc/netconfig.d]),
, withval="")
with_netconfig_dispatch="$withval"
AC_SUBST(netconfig_dispatcher_dir)
AC_MSG_CHECKING([for DHCP hooks])
if test "$hooks" != "auto"; then
:
else
if test "$on_mingw" = "yes"; then
hooks="windows"
else
if test -x "`which nmcli 2>&1`" -o -x "`which nm-tool 2>&1`"; then
hooks="networkmanager"
else
if test "`uname`" = "Darwin"; then
hooks="osx"
else
if test -x /sbin/netconfig; then
hooks="netconfig"
else
hooks="none"
fi
fi
fi
fi
fi
AC_MSG_RESULT([$hooks])
AC_SUBST(hooks)
if test "$hooks" = "networkmanager"; then
AC_MSG_CHECKING([for NetworkManager dispatch])
if test "$with_nm_dispatch" != ""; then
networkmanager_dispatcher_dir="$with_nm_dispatch"
else
if test -d "$networkmanager_dispatcher_dir" ; then
:
else if test -d /etc/NetworkManager/dispatcher.d; then
networkmanager_dispatcher_dir="/etc/NetworkManager/dispatcher.d"
fi
fi
fi
AC_MSG_RESULT([$networkmanager_dispatcher_dir])
fi
if test "$hooks" = "netconfig"; then
AC_MSG_CHECKING([for netconfig.d])
if test "$with_netconfig_dispatch" != ""; then
netconfig_dispatcher_dir="$with_netconfig_dispatch"
else
if test -d "$netconfig_dispatcher_dir" ; then
:
else if test -d /etc/netconfig.d; then
netconfig_dispatcher_dir="/etc/netconfig.d"
fi
fi
fi
AC_MSG_RESULT([$netconfig_dispatcher_dir])
fi
if test "$hooks" = "osx"; then
AC_DEFINE([HOOKS_OSX], 1, [we are on OSX, use that os specific funcs])
fi
if test "$hooks" = "none"; then
AC_MSG_WARN([have no DHCP hooks, cannot detect network changes])
fi
gui="auto"
AC_ARG_WITH([gui], AC_HELP_STRING([--with-gui],
[Set the user interface style to use, default 'auto', can be 'cocoa' (on OSX), 'windows' or 'gtk']),, withval="")
if test -n "$withval" -a "$withval" != "yes"; then
gui="$withval"
fi
AC_MSG_CHECKING([for gui])
if test "$gui" != "auto"; then
:
else
if test "`uname`" = "Darwin"; then
gui="cocoa"
else
if test "$on_mingw" = yes; then
gui="windows"
else
gui="gtk"
fi
fi
fi
AC_MSG_RESULT([$gui])
AC_SUBST(gui)
if test "$gui" = "gtk"; then
# GTK
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
GTK_LIBS=`pkg-config --libs gtk+-2.0`
if test -z "$GTK_LIBS"; then
AC_MSG_ERROR([No gtk+-2.0 detected, please install glib-dev, gtk2-dev])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
AC_MSG_CHECKING([for libappindicator])
AC_ARG_ENABLE(appindicator, AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators (for Ubuntu Unity)]), [enable_appindicator=$enableval], [enable_appindicator="auto"])
if test x$enable_appindicator = xauto ; then
if pkg-config --exists appindicator-0.1; then
enable_appindicator="yes"
else
enable_appindicator="no"
fi
fi
if test x$enable_appindicator = xyes ; then
# replace since GTK is included in the appindicator flags
GTK_CFLAGS=`pkg-config --cflags appindicator-0.1`
GTK_LIBS=`pkg-config --libs appindicator-0.1`
if test -z "$GTK_LIBS"; then
AC_MSG_ERROR([appindicator-0.1 is not installed, need libappindicator-dev])
fi
AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator (Ubuntu Unity)])
APP_INDICATOR="yes"
AC_SUBST(APP_INDICATOR)
AC_MSG_RESULT([yes])
BAKLIBS="$LIBS"
LIBS="$LIBS $GTK_LIBS"
AC_CHECK_FUNCS([app_indicator_set_icon_full])
LIBS="$BAKLIBS"
else
AC_MSG_RESULT([no])
fi
# check for missing -lgthread-2.0 in the GTK_LIBS string.
case "$GTK_LIBS" in *-lgthread* ) ;;
*) AC_CHECK_LIB(gthread-2.0, g_thread_init, [GTK_LIBS="$GTK_LIBS -lgthread-2.0"]) esac
if test "$on_mingw" = "no"; then
xdg_autostart_dir="$sysconfdir/xdg/autostart"
AC_ARG_WITH([xdg-autostart], AC_HELP_STRING([--with-xdg-autostart],
[Set the GNOME autostart dir, default tests prefix/etc/xdg/autostart and /etc/xdg/autostart]),
, withval="")
with_xdg_autostart="$withval"
AC_SUBST(xdg_autostart_dir)
AC_MSG_CHECKING([for autostart dir])
if test "$with_xdg_autostart" != ""; then
xdg_autostart_dir="$with_xdg_autostart"
else
if test -d "$xdg_autostart_dir" ; then
:
else if test -d /etc/xdg/autostart; then
xdg_autostart_dir="/etc/xdg/autostart"
fi
fi
fi
AC_MSG_RESULT([$xdg_autostart_dir])
fi
fi
login_command="auto"
login_location="auto"
AC_SUBST(login_command)
AC_SUBST(login_location)
AC_ARG_WITH([login-command], AC_HELP_STRING([--with-login-command],
[Set the command to start login, a web browser, default 'auto']),, withval="")
if test -n "$withval" -a "$withval" != "yes"; then
login_command="$withval"
fi
AC_ARG_WITH([login-location], AC_HELP_STRING([--with-login-location],
[Set the url location to login, default 'auto']),, withval="")
if test -n "$withval" -a "$withval" != "yes"; then
login_location="$withval"
fi
if test "$login_location" = "auto"; then
login_location="http://www.nlnetlabs.nl/projects/dnssec-trigger"
fi
AC_MSG_CHECKING([for web browser])
if test "$login_command" = "auto"; then
if test "$USE_WINSOCK" = 1; then
login_command="open"
else
if test "`uname`" = "Darwin"; then
login_command="open"
else
clist="xdg-open sensible-browser gnome-open x-www-browser firefox konqueror chrome google-chrome"
login_command=""
for i in $clist; do
if test -x "`which $i 2>&1`"; then
login_command="$i"
break;
fi
done
fi
fi
fi
AC_MSG_RESULT([$login_command])
AC_DEFINE_UNQUOTED([LOGIN_COMMAND], ["$login_command"], [web browser to open login url])
AC_DEFINE_UNQUOTED([LOGIN_LOCATION], ["$login_location"], [login url to open at hot spots])
AC_ARG_WITH([check-updates], AC_HELP_STRING([--with-check-updates=yesno],
[Set default value for check-updates config option]),, withval="")
if test -n "$withval"; then
check_updates="$withval"
else
# enable on WIN, OSX, not on unixes (use ports, package manager there).
if test "$USE_WINSOCK" = 1; then
check_updates="yes"
else
if test "`uname`" = "Darwin"; then
check_updates="yes"
else
check_updates="no"
fi
fi
fi
AC_DEFINE_UNQUOTED([CHECK_UPDATES], ["$check_updates"], [default value for check-updates config option])
AC_SUBST(check_updates)
AC_ARG_WITH([keydir], AC_HELP_STRING([--with-keydir=path],
[Set the directory where ssl key files are kept, read by daemon and other tools, default prefix/etc]),, withval="")
keydir=`eval echo "$sysconfdir"`
if test -n "$withval"; then
keydir="$withval"
fi
ACX_ESCAPE_BACKSLASH($keydir, keydir_esc)
AC_DEFINE_UNQUOTED([KEYDIR], ["$keydir_esc"], [directory with ssl key files for dnssec-trigger])
AC_SUBST(keydir)
libexec_store_dir=`eval echo "$libexecdir"`
ACX_ESCAPE_BACKSLASH($libexec_store_dir, libexec_store_dir_esc)
AC_DEFINE_UNQUOTED([LIBEXEC_DIR], ["$libexec_store_dir_esc"], [directory with scripts for dnssec-trigger])
AC_ARG_WITH([uidir], AC_HELP_STRING([--with-uidir=path],
[Set the directory where ui files (icon,xml) are kept, default prefix/share/dnssec-trigger]),, withval="")
uidir=`eval echo "$datadir/dnssec-trigger"`
if test -n "$withval"; then
uidir="$withval"
fi
ACX_ESCAPE_BACKSLASH($uidir, uidir2)
uidir=`eval echo $uidir2`
ACX_ESCAPE_BACKSLASH($uidir, uidir_esc)
AC_DEFINE_UNQUOTED([UIDIR], ["$uidir_esc"], [directory with UI xml and png for dnssec-trigger])
AC_SUBST(uidir)
AC_ARG_WITH([configfile], AC_HELP_STRING([--with-configfile=path],
[set the configfile to use, default keydir/dnssec-trigger.conf]),, withval="")
configfile="$keydir/dnssec-trigger.conf"
if test -n "$withval"; then
configfile="$withval"
fi
ACX_ESCAPE_BACKSLASH($configfile, configfile_esc)
AC_DEFINE_UNQUOTED([CONFIGFILE], ["$configfile_esc"], [default config file name for dnssec-trigger])
AC_SUBST(configfile)
AC_ARG_WITH([pidfile], AC_HELP_STRING([--with-pidfile=path],
[set the pidfile to use, default /run/dnssec-trigger.pid]),, withval="")
pidfile="/run/dnssec-trigger.pid"
if test -n "$withval"; then
pidfile="$withval"
fi
ACX_ESCAPE_BACKSLASH($pidfile, pidfile_esc)
AC_DEFINE_UNQUOTED([PIDFILE], ["$pidfile_esc"], [default pidfile name for dnssec-trigger])
AC_SUBST(pidfile)
AC_ARG_WITH([unbound-control], AC_HELP_STRING([--with-unbound-control=path],
[set the unbound-control to use, default what configure finds in its path]),, withval="")
AC_MSG_CHECKING([for unbound-control])
if test "$on_mingw" = "yes"; then
unbound_control_path='"C:\Program Files\Unbound\unbound-control.exe"'
else
unbound_control_path="`which unbound-control 2>&1`"
fi
if test -n "$withval"; then
unbound_control_path="$withval"
fi
if test "$on_mingw" = "yes" -o -n "$withval"; then
AC_MSG_RESULT($unbound_control_path)
else
if test -x "$unbound_control_path"; then
AC_MSG_RESULT($unbound_control_path)
else
AC_MSG_RESULT([not found: try "unbound-control" in runtime PATH])
unbound_control_path="unbound-control"
fi
fi
ACX_ESCAPE_BACKSLASH($unbound_control_path, unbound_control_esc)
unbound_control_esc="`echo $unbound_control_esc | sed -e 's/\\"/\\\\"/g'`"
AC_DEFINE_UNQUOTED([UNBOUND_CONTROL], ["$unbound_control_esc"], [unbound-control to call])
AC_SUBST(unbound_control_path)
LDNSLIBS=""
AC_ARG_WITH(ldns, AC_HELP_STRING([--with-ldns=PATH],
[specify prefix of path of ldns library to use]),
[
CPPFLAGS="-I$withval/include $CPPFLAGS"
LDFLAGS="-L$withval -L$withval/lib $LDFLAGS"
ldnsdir="$withval"
if test "$staticexe" = "yes"; then
LDNSLIBS="$ldnsdir/lib/libldns.a"
else
LDNSLIBS="-lldns"
ACX_RUNTIME_PATH_ADD([$withval/lib])
fi
AC_SUBST(ldnsdir)
AC_SUBST(LDNSLIBS)
], [
AC_CHECK_LIB(ldns, ldns_buffer_new,,[AC_MSG_ERROR([please install ldns-devel])])
])
# add option to disable the evil rpath
ACX_ARG_RPATH
AC_SUBST(RUNTIME_PATH)
AC_DEFINE_UNQUOTED([MAXSYSLOGMSGLEN], [10240], [Define to the maximum message length to pass to syslog.])
AC_DEFINE_UNQUOTED([DNS_PORT], [53], [DNS port number])
AH_BOTTOM([
#ifndef DO_DEBUG
# define NDEBUG
#endif
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <errno.h>
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#ifdef HAVE_OPENSSL_SSL_H
#include <openssl/ssl.h>
#endif
#ifdef HAVE_ATTR_FORMAT
# define ATTR_FORMAT(archetype, string_index, first_to_check) \
__attribute__ ((format (archetype, string_index, first_to_check)))
#else /* !HAVE_ATTR_FORMAT */
# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
#endif /* !HAVE_ATTR_FORMAT */
#if defined(DOXYGEN)
# define ATTR_UNUSED(x) x
#elif defined(__cplusplus)
# define ATTR_UNUSED(x)
#elif defined(HAVE_ATTR_UNUSED)
# define ATTR_UNUSED(x) x __attribute__((unused))
#else /* !HAVE_ATTR_UNUSED */
# define ATTR_UNUSED(x) x
#endif /* !HAVE_ATTR_UNUSED */
#ifndef HAVE_FSEEKO
#define fseeko fseek
#define ftello ftell
#endif /* HAVE_FSEEKO */
#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
/* using version of libevent that is not threadsafe. */
# define LIBEVENT_SIGNAL_PROBLEM 1
#endif
#ifndef RAND_MAX
#define RAND_MAX 2147483647
#endif
#ifndef CHECKED_INET6
# define CHECKED_INET6
# ifdef AF_INET6
# define INET6
# else
# define AF_INET6 28
# endif
#endif /* CHECKED_INET6 */
#ifndef HAVE_GETADDRINFO
struct sockaddr_storage;
#include "compat/fake-rfc2553.h"
#endif
]
AHX_CONFIG_INET_PTON(dnssectrigger)
AHX_CONFIG_INET_NTOP(dnssectrigger)
AHX_CONFIG_MEMMOVE(dnssectrigger)
AHX_CONFIG_STRLCPY(dnssectrigger)
AHX_CONFIG_SNPRINTF(dnssectrigger)
AHX_CONFIG_W32_SLEEP
AHX_CONFIG_W32_USLEEP
AHX_CONFIG_W32_RANDOM
AHX_CONFIG_W32_SRANDOM
AHX_CONFIG_W32_FD_SET_T
)
DATE=`date +%x`
AC_SUBST(DATE)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
if test "$hooks" = "none"; then
echo "WARNING NO DHCP HOOKS DETECTED CANNOT SETUP TRIGGER"
fi
[
echo "configure completed with $hooks hooks and $gui gui, now you can"
echo " make | make all : compile the code"
echo " make install : install files"
echo " make uninstall : uninstall files"
]
|