From be9e180b28f7396b79dd6b0bca4383ecd84a709b Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Fri, 29 Nov 2013 17:03:01 +0100 Subject: [PATCH] Searches, --with-libidn, libunbound, libldns. --- configure.ac | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/configure.ac b/configure.ac index 17a67058..cc7022e9 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,64 @@ fi ]) ACX_ARG_RPATH +# search to set include and library paths right +# find libidn +AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=pathname], + [path to libidn (default: search /usr/local ..)]), + [], [withval="yes"]) +if test x_$withval = x_yes; then + for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do + if test -f "$dir/include/idna.h"; then + CPPFLAGS="$CPPFLAGS -I$dir/include" + LDFLAGS="$LDFLAGS -L$dir/lib" + AC_MSG_NOTICE([Found libidn in $dir]) + break + fi + done +fi +if test x_$withval != x_no; then + CPPFLAGS="$CPPFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib" +fi + +# find libldns +AC_ARG_WITH(libldns, AC_HELP_STRING([--with-libldns=pathname], + [path to libldns (default: search /usr/local ..)]), + [], [withval="yes"]) +if test x_$withval = x_yes; then + for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do + if test -f "$dir/include/ldns/ldns.h"; then + CPPFLAGS="$CPPFLAGS -I$dir/include" + LDFLAGS="$LDFLAGS -L$dir/lib" + AC_MSG_NOTICE([Found libldns in $dir]) + break + fi + done +fi +if test x_$withval != x_no; then + CPPFLAGS="$CPPFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib" +fi + +# find libunbound +AC_ARG_WITH(libunbound, AC_HELP_STRING([--with-libunbound=pathname], + [path to libunbound (default: search /usr/local ..)]), + [], [withval="yes"]) +if test x_$withval = x_yes; then + for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do + if test -f "$dir/include/unbound.h"; then + CPPFLAGS="$CPPFLAGS -I$dir/include" + LDFLAGS="$LDFLAGS -L$dir/lib" + AC_MSG_NOTICE([Found libunbound in $dir]) + break + fi + done +fi +if test x_$withval != x_no; then + CPPFLAGS="$CPPFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib" +fi + # Checks for libraries. found_all_libs=1 AC_MSG_NOTICE([Checking for dependencies libevent, ldns])