From: Wouter Wijngaards Date: Fri, 3 Jul 2009 19:40:14 +0000 (+0000) Subject: Fix for linking when ldns installed. X-Git-Tag: release-1.3.1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1cf8bdae51e981bb6e184dcf7761a094747a1fca;p=thirdparty%2Funbound.git Fix for linking when ldns installed. git-svn-id: file:///svn/unbound/trunk@1695 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/aclocal.m4 b/aclocal.m4 index 676de8484..7c01b0da1 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10.2 -*- Autoconf -*- +# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/acx_nlnetlabs.m4 b/acx_nlnetlabs.m4 index e83f08095..3baa9d3bf 100644 --- a/acx_nlnetlabs.m4 +++ b/acx_nlnetlabs.m4 @@ -2,8 +2,10 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 1 -# 2009-04-23 +# Version 2 +# 2009-07-03 +# Changelog +# - fixup LDFLAGS for empty ssl dir. # # Automates some of the checking constructs. Aims at portability for POSIX. # Documentation for functions is below. @@ -592,7 +594,7 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname], AC_MSG_RESULT(found in $ssldir) HAVE_SSL=yes dnl assume /usr is already in the lib and dynlib paths. - if test "$ssldir" != "/usr"; then + if test "$ssldir" != "/usr" -a "$ssldir" != ""; then LDFLAGS="$LDFLAGS -L$ssldir/lib" ACX_RUNTIME_PATH_ADD([$ssldir/lib]) fi diff --git a/configure b/configure index 5e924811f..19a79e778 100755 --- a/configure +++ b/configure @@ -16891,7 +16891,7 @@ $as_echo "$as_me: error: Cannot find the SSL libraries in $withval" >&2;} { $as_echo "$as_me:$LINENO: result: found in $ssldir" >&5 $as_echo "found in $ssldir" >&6; } HAVE_SSL=yes - if test "$ssldir" != "/usr"; then + if test "$ssldir" != "/usr" -a "$ssldir" != ""; then LDFLAGS="$LDFLAGS -L$ssldir/lib" if test "x$enable_rpath" = xyes; then @@ -17805,7 +17805,7 @@ large outgoing port ranges. " >&2;} else { $as_echo "$as_me:$LINENO: result: found in $thedir" >&5 $as_echo "found in $thedir" >&6; } - if test "$thedir" != "/usr"; then + if test "$thedir" != "/usr" -a "$thedir" != ""; then LDFLAGS="$LDFLAGS -L$thedir/lib" if test "x$enable_rpath" = xyes; then @@ -21826,8 +21826,9 @@ use_ldns_builtin="no" # Check whether --with-ldns was given. if test "${with_ldns+set}" = set; then withval=$with_ldns; specialldnsdir="$withval" - CPPFLAGS="-I$withval/include $CPPFLAGS" - LDFLAGS="-L$withval -L$withval/lib $LDFLAGS" + if test "$withval" != ""; then + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval -L$withval/lib $LDFLAGS" if test "x$enable_rpath" = xyes; then if echo "$withval/lib" | grep "^/" >/dev/null; then @@ -21835,6 +21836,7 @@ if test "${with_ldns+set}" = set; then fi fi + fi ldnsdir="$withval" diff --git a/configure.ac b/configure.ac index dd08993fd..f4dd3bb89 100644 --- a/configure.ac +++ b/configure.ac @@ -408,8 +408,8 @@ large outgoing port ranges. ]) fi else AC_MSG_RESULT(found in $thedir) - dnl assume /usr is in default path. - if test "$thedir" != "/usr"; then + dnl assume /usr is in default path, do not add "". + if test "$thedir" != "/usr" -a "$thedir" != ""; then LDFLAGS="$LDFLAGS -L$thedir/lib" ACX_RUNTIME_PATH_ADD([$thedir/lib]) fi @@ -512,9 +512,11 @@ use_ldns_builtin="no" AC_ARG_WITH(ldns, AC_HELP_STRING([--with-ldns=PATH], [specify prefix of path of ldns library to use]), [ specialldnsdir="$withval" - CPPFLAGS="-I$withval/include $CPPFLAGS" - LDFLAGS="-L$withval -L$withval/lib $LDFLAGS" - ACX_RUNTIME_PATH_ADD([$withval/lib]) + if test "$withval" != ""; then + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval -L$withval/lib $LDFLAGS" + ACX_RUNTIME_PATH_ADD([$withval/lib]) + fi ldnsdir="$withval" AC_SUBST(ldnsdir) ])