Commit 8a896bc6 authored by Mark Andrews's avatar Mark Andrews

fix configure.in to remove warnings when running autoconf

    only compile geoip.o when requested.
    silence compiler warnings
parent 5eab7b89
......@@ -81,8 +81,10 @@ SUBDIRS = unix
TARGETS = named@EXEEXT@ lwresd@EXEEXT@
GEOIPLINKOBJS = geoip.@O@
OBJS = builtin.@O@ client.@O@ config.@O@ control.@O@ \
controlconf.@O@ geoip.@O@ interfacemgr.@O@ \
controlconf.@O@ @GEOIPLINKOBJS@ interfacemgr.@O@ \
listenlist.@O@ log.@O@ logconf.@O@ main.@O@ notify.@O@ \
query.@O@ server.@O@ sortlist.@O@ statschannel.@O@ \
tkeyconf.@O@ tsigconf.@O@ update.@O@ xfrout.@O@ \
......@@ -95,8 +97,10 @@ UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@
SYMOBJS = symtbl.@O@
GEOIPLINKSRCS = geoip.c
SRCS = builtin.c client.c config.c control.c \
controlconf.c geoip.c interfacemgr.c \
controlconf.c @GEOIPLINKSRCS@ interfacemgr.c \
listenlist.c log.c logconf.c main.c notify.c \
query.c server.c sortlist.c statschannel.c symtbl.c symtbl-empty.c \
tkeyconf.c tsigconf.c update.c xfrout.c \
......
......@@ -18,6 +18,8 @@
#include <config.h>
#include <isc/util.h>
#ifdef HAVE_GEOIP
#include <named/log.h>
#include <named/geoip.h>
......@@ -102,6 +104,9 @@ ns_geoip_init(void) {
void
ns_geoip_load(char *dir) {
#ifndef HAVE_GEOIP
UNUSED(dir);
return;
#else
GeoIPOptions method;
......
......@@ -1312,6 +1312,8 @@ ISC_PLATFORM_KRB5HEADER
ISC_PLATFORM_GSSAPI_KRB5_HEADER
ISC_PLATFORM_GSSAPIHEADER
ISC_PLATFORM_HAVEGSSAPI
GEOIPLINKOBJS
GEOIPLINKSRCS
PKCS11_PROVIDER
PKCS11_TOOLS
USE_PKCS11
......@@ -14473,6 +14475,8 @@ $as_echo "PKCS11 provider is \"$use_pkcs11\"" >&6; }
esac
GEOIPLINKSRCS=
GEOIPLINKOBJS=
# Check whether --with-geoip was given.
if test "${with_geoip+set}" = set; then :
......@@ -14649,6 +14653,8 @@ fi
$as_echo "#define HAVE_GEOIP 1" >>confdefs.h
GEOIPLINKSRCS='${GEOIPLINKSRCS}'
GEOIPLINKOBJS='${GEOIPLINKOBJS}'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GeoIP support" >&5
$as_echo_n "checking for GeoIP support... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
......@@ -14726,6 +14732,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSSAPI library" >&5
$as_echo_n "checking for GSSAPI library... " >&6; }
......
......@@ -972,6 +972,8 @@ case "$use_pkcs11" in
esac
AC_SUBST(PKCS11_PROVIDER)
GEOIPLINKSRCS=
GEOIPLINKOBJS=
AC_ARG_WITH(geoip,
[ --with-geoip=PATH Build with GeoIP support (yes|no|path)],
use_geoip="$withval", use_geoip="no")
......@@ -1021,18 +1023,20 @@ case "$use_geoip" in
[AC_MSG_ERROR([Math library not found])]
)
AC_DEFINE(HAVE_GEOIP, 1, Build with GeoIP support)
GEOIPLINKSRCS='${GEOIPLINKSRCS}'
GEOIPLINKOBJS='${GEOIPLINKOBJS}'
AC_MSG_CHECKING([for GeoIP support])
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for GeoIP Country IPv6 support])
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM([[
[AC_LANG_PROGRAM([
#include <GeoIP.h>
#include <netinet/in.h>
]], [[
], [
struct in6_addr in6;
GeoIP_country_name_by_ipnum_v6(NULL, in6);
]]),
])],
[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GEOIP_V6, 1, Build with GeoIP Country IPv6 support)
......@@ -1042,15 +1046,15 @@ case "$use_geoip" in
AC_MSG_CHECKING([for GeoIP City IPv6 support])
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM([[
[AC_LANG_PROGRAM([
#include <GeoIP.h>
#include <GeoIPCity.h>
#include <netinet/in.h>
]], [[
], [
struct in6_addr in6;
int i = GEOIP_CITY_EDITION_REV0_V6;
GeoIP_record_by_ipnum_v6(NULL, in6);
]]),
])],
[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GEOIP_CITY_V6, 1, Build with GeoIP City IPv6 support)
......@@ -1059,6 +1063,8 @@ case "$use_geoip" in
)
;;
esac
AC_SUBST(GEOIPLINKSRCS)
AC_SUBST(GEOIPLINKOBJS)
AC_MSG_CHECKING(for GSSAPI library)
AC_ARG_WITH(gssapi,
......
......@@ -58,11 +58,13 @@ DSTOBJS = @DST_EXTRA_OBJS@ @OPENSSLLINKOBJS@ \
dst_api.@O@ dst_lib.@O@ dst_parse.@O@ dst_result.@O@ \
gssapi_link.@O@ gssapictx.@O@ hmac_link.@O@ key.@O@
GEOIPLINKOBJS = geoip.@O@
# Alphabetically
DNSOBJS = acache.@O@ acl.@O@ adb.@O@ byaddr.@O@ \
cache.@O@ callbacks.@O@ clientinfo.@O@ compress.@O@ \
db.@O@ dbiterator.@O@ dbtable.@O@ diff.@O@ dispatch.@O@ \
dlz.@O@ dns64.@O@ dnssec.@O@ ds.@O@ forward.@O@ geoip.@O@\
dlz.@O@ dns64.@O@ dnssec.@O@ ds.@O@ forward.@O@ \
iptable.@O@ journal.@O@ keydata.@O@ keytable.@O@ \
lib.@O@ log.@O@ lookup.@O@ \
master.@O@ masterdump.@O@ message.@O@ \
......@@ -77,7 +79,8 @@ DNSOBJS = acache.@O@ acl.@O@ adb.@O@ byaddr.@O@ \
tsec.@O@ tsig.@O@ ttl.@O@ update.@O@ validator.@O@ \
version.@O@ view.@O@ xfrin.@O@ zone.@O@ zonekey.@O@ zt.@O@
OBJS= ${DNSOBJS} ${OTHEROBJS} ${DSTOBJS}
OBJS= ${DNSOBJS} ${OTHEROBJS} ${DSTOBJS} @GEOIPLINKOBJS@
# Alphabetically
OPENSSLGOSTLINKSRCS = opensslgost_link.c
......@@ -89,6 +92,8 @@ DSTSRCS = @DST_EXTRA_SRCS@ @OPENSSLLINKSRCS@ \
dst_result.c gssapi_link.c gssapictx.c \
hmac_link.c key.c
GEOIOLINKSRCS = geoip.c
DNSSRCS = acache.c acl.c adb.c byaddr.c \
cache.c callbacks.c clientinfo.c compress.c \
db.c dbiterator.c dbtable.c diff.c dispatch.c \
......@@ -104,7 +109,7 @@ DNSSRCS = acache.c acl.c adb.c byaddr.c \
tsec.c tsig.c ttl.c update.c validator.c \
version.c view.c xfrin.c zone.c zonekey.c zt.c ${OTHERSRCS}
SRCS = ${DSTSRCS} ${DNSSRCS}
SRCS = ${DSTSRCS} ${DNSSRCS} @GEOIPLINKSRCS@
SUBDIRS = include
TARGETS = include/dns/enumtype.h include/dns/enumclass.h \
......
......@@ -537,6 +537,7 @@ netspeed_lookup(GeoIP *db, dns_geoip_subtype_t subtype, isc_uint32_t ipnum) {
#define DB46(addr, geoip, name) \
((addr->family == AF_INET) ? (geoip->name##_v4) : (geoip->name##_v6))
#ifdef HAVE_GEOIP
/*
* Find the best database to answer a generic subtype
*/
......@@ -585,6 +586,7 @@ fix_subtype(const isc_netaddr_t *reqaddr, const dns_geoip_databases_t *geoip,
return (ret);
}
#endif /* HAVE_GEOIP */
isc_boolean_t
dns_geoip_match(const isc_netaddr_t *reqaddr,
......
......@@ -68,8 +68,9 @@ DNSOBJS = acl.@O@ adb.@O@ byaddr.@O@ \
tcpmsg.@O@ time.@O@ tsec.@O@ tsig.@O@ ttl.@O@ \
validator.@O@ version.@O@ view.@O@
PORTDNSOBJS = ecdb.@O@
GEOIPLINKOBJS = geoip.@O@
OBJS= ${DNSOBJS} ${OTHEROBJS} ${DSTOBJS} ${PORTDNSOBJS}
OBJS= ${DNSOBJS} ${OTHEROBJS} ${DSTOBJS} ${PORTDNSOBJS} @GEOIPLINKOBJS@
# Alphabetically
......@@ -95,8 +96,9 @@ DNSSRCS = acl.c adb.c byaddr.c \
tcpmsg.c time.c tsec.c tsig.c ttl.c \
validator.c version.c view.c
PORTDNSSRCS = ecdb.c
GEOIPLINKSRCS = geoip.c
SRCS = ${DSTSRCS} ${DNSSRCS} ${PORTDNSSRCS}
SRCS = ${DSTSRCS} ${DNSSRCS} ${PORTDNSSRCS} @GEOIPLINKSRCS@
SUBDIRS = include
TARGETS = include/dns/enumtype.h include/dns/enumclass.h \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment