configure.ac: Don't let the LIBS setting leak out. master
authorMark Wooding <mdw@distorted.org.uk>
Sun, 13 May 2012 21:01:54 +0000 (22:01 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 13 May 2012 21:01:54 +0000 (22:01 +0100)
Otherwise binaries will be linked against Nettle unnecessarily.

configure.ac

index b360139..45ddbb6 100644 (file)
@@ -43,12 +43,13 @@ PKG_CHECK_MODULES([nettle], [nettle >= 2.4], [], [
   ## That didn't work; unfortunately older Nettle packages don't have a
   ## pkg-config dropping.  Let's see whether it will work anyway.
   nettlep=t
+  save_LIBS=$LIBS
   AC_CHECK_HEADER([nettle/sha.h], [], [nettlep=nil])
   AC_CHECK_LIB([nettle], [nettle_sha256_init], [], [nettlep=nil])
   case $nettlep in
     nil) AC_MSG_ERROR([Failed to find Nettle library.]) ;;
   esac
-  nettle_CFLAGS= nettle_LIBS=-lnettle])
+  nettle_CFLAGS= nettle_LIBS=-lnettle LIBS=$save_LIBS])
 
 dnl--------------------------------------------------------------------------
 dnl Perl programming environment.