]> granicus.if.org Git - pdns/commitdiff
Look for mbedtls before polarssl
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 28 Apr 2015 10:22:58 +0000 (12:22 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 9 May 2015 11:53:01 +0000 (13:53 +0200)
PolarSSL has been renamed to mbed TLS

Fixes #2336

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
(cherry picked from commit 933de4e3a2797f6362c9bc24fa69aaeaad171d1b)

m4/pdns_with_system_polarssl.m4

index 846ac7c2f5166c58a6974d05712e8c1da063305b..da4dcd07c7e5405601e2e1ce591d2310fe46e83f 100644 (file)
@@ -5,8 +5,15 @@ AC_DEFUN([PDNS_WITH_SYSTEM_POLARSSL],[
     [with_system_polarssl=no],
   )
 
+  POLARSSL_SUBDIR=polarssl
+  POLARSSL_CFLAGS=-I\$\(top_srcdir\)/pdns/ext/$POLARSSL_SUBDIR/include/
+  POLARSSL_LIBS="-L\$(top_builddir)/pdns/ext/$POLARSSL_SUBDIR/library/ -lpolarssl"
+
   AS_IF([test "x$with_system_polarssl" = "xyes"],[
-    AC_CHECK_LIB([polarssl], [sha1_hmac],[
+    OLD_LIBS=$LIBS
+    LIBS=""
+    AC_SEARCH_LIBS([sha1_hmac], [mbedtls polarssl],[
+      POLARSSL_LIBS=$LIBS
       AC_MSG_CHECKING([for PolarSSL version >= 1.1])
       AC_COMPILE_IFELSE([
         AC_LANG_PROGRAM(
@@ -23,17 +30,14 @@ AC_DEFUN([PDNS_WITH_SYSTEM_POLARSSL],[
       AC_MSG_RESULT([$have_system_polarssl])
       ],
       [have_system_polarssl=no]
-    )],
+    )
+    LIBS=$OLD_LIBS
+    ],
     [have_system_polarssl=no]
   )
 
-  POLARSSL_SUBDIR=polarssl
-  POLARSSL_CFLAGS=-I\$\(top_srcdir\)/pdns/ext/$POLARSSL_SUBDIR/include/
-  POLARSSL_LIBS="-L\$(top_builddir)/pdns/ext/$POLARSSL_SUBDIR/library/ -lpolarssl"
-
   AS_IF([test "x$have_system_polarssl" = "xyes"],[
     POLARSSL_CFLAGS=
-    POLARSSL_LIBS=-lpolarssl
     POLARSSL_SUBDIR=
     ],[
     AS_IF([test "x$with_system_polarssl" = "xyes"],[