Clean up the parts of configure.in responsible for handling libidn2
detection and adjust other pieces of the build system to match these
cleanups:
- use pkg-config when --with-libidn2 is used without an explicit path,
- look for idn2_to_ascii_lz() rather than idn2_to_ascii_8z() as the
former is used in BIND while the latter is not,
- do not look for idn2_to_unicode_8zlz() as it is present in all
libidn2 versions which have idn2_to_ascii_lz(),
- check whether the <idn2.h> header is usable,
- set LDFLAGS in the Makefile for dig so that, if specified, the
requested libidn2 path is used when linking with libidn2,
- override CPPFLAGS when looking for libidn2 components so that the
configure script does not produce warnings when libidn2 is not
installed system-wide,
- merge the AS_CASE() call into the AS_IF() call below it to simplify
code,
- indicate the default value of --with-libidn2 in "./configure --help"
output,
- use $with_libidn2 rather than $use_libidn2 to better match the name
of the configure script argument,
- stop differentiating between IDN "in" and "out" support, i.e. make
dig either support libidn2 or not; remove WITH_* Autoconf macros and
use a new one, HAVE_LIBIDN2, to determine whether libidn2 support
should be enabled.
114 lines
3.3 KiB
Makefile
114 lines
3.3 KiB
Makefile
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
# See the COPYRIGHT file distributed with this work for additional
|
|
# information regarding copyright ownership.
|
|
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VERSION=@BIND9_VERSION@
|
|
|
|
@BIND9_MAKE_INCLUDES@
|
|
|
|
READLINE_LIB = @READLINE_LIB@
|
|
|
|
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
|
|
${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
|
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
|
|
|
|
CDEFINES = -DVERSION=\"${VERSION}\"
|
|
CWARNINGS =
|
|
|
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
|
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
|
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
|
IRSLIBS = ../../lib/irs/libirs.@A@
|
|
|
|
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
|
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
|
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
|
|
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
|
IRSDEPLIBS = ../../lib/irs/libirs.@A@
|
|
|
|
DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
|
|
${ISCDEPLIBS} ${ISCCFGDEPLIBS}
|
|
|
|
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
|
|
${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@
|
|
|
|
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
|
|
${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@
|
|
|
|
SUBDIRS =
|
|
|
|
TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@
|
|
|
|
OBJS = dig.@O@ dighost.@O@ host.@O@ nslookup.@O@
|
|
|
|
UOBJS =
|
|
|
|
SRCS = dig.c dighost.c host.c nslookup.c
|
|
|
|
MANPAGES = dig.1 host.1 nslookup.1
|
|
|
|
HTMLPAGES = dig.html host.html nslookup.html
|
|
|
|
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
|
|
|
@BIND9_MAKE_RULES@
|
|
|
|
LDFLAGS = @LIBIDN2_LDFLAGS@
|
|
|
|
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
|
export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
|
|
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
|
|
${FINALBUILDCMD}
|
|
|
|
host@EXEEXT@: host.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
|
export BASEOBJS="host.@O@ dighost.@O@ ${UOBJS}"; \
|
|
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
|
|
${FINALBUILDCMD}
|
|
|
|
nslookup@EXEEXT@: nslookup.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
|
export BASEOBJS="nslookup.@O@ dighost.@O@ ${READLINE_LIB} ${UOBJS}"; \
|
|
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
|
|
${FINALBUILDCMD}
|
|
|
|
doc man:: ${MANOBJS}
|
|
|
|
docclean manclean maintainer-clean::
|
|
rm -f ${MANOBJS}
|
|
|
|
clean distclean maintainer-clean::
|
|
rm -f ${TARGETS}
|
|
|
|
installdirs:
|
|
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
|
|
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
|
|
|
|
install:: dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ installdirs
|
|
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
|
|
dig@EXEEXT@ ${DESTDIR}${bindir}
|
|
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
|
|
host@EXEEXT@ ${DESTDIR}${bindir}
|
|
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
|
|
nslookup@EXEEXT@ ${DESTDIR}${bindir}
|
|
for m in ${MANPAGES}; do \
|
|
${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; \
|
|
done
|
|
|
|
uninstall::
|
|
for m in ${MANPAGES}; do \
|
|
rm -f ${DESTDIR}${mandir}/man1/$$m ; \
|
|
done
|
|
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/nslookup@EXEEXT@
|
|
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/host@EXEEXT@
|
|
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/dig@EXEEXT@
|