]> granicus.if.org Git - curl/commitdiff
configure: replace AC_TRY_RUN with CURL_RUN_IFELSE
authorDaniel Stenberg <daniel@haxx.se>
Sat, 19 May 2018 09:24:33 +0000 (11:24 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 21 May 2018 17:55:51 +0000 (19:55 +0200)
... and export LD_LIBRARY_PATH properly. This is a follow-up from
2d4c215.

Fixes #2586
Reported-by: Bernhard Walle
acinclude.m4
m4/curl-functions.m4

index 69bb6c00233c59f25ab79b8de7d26a9f4e7310c0..81c16f9b1139775e85b3f24b8f812015d10d99bd 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -2464,7 +2464,7 @@ AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [
     dnl just run a program to verify that the libs checked for previous to this
     dnl point also is available run-time!
     AC_MSG_CHECKING([run-time libs availability])
-    AC_TRY_RUN([
+    CURL_RUN_IFELSE([
 main()
 {
   return 0;
index 1bbde9ed5aeade79b1e5f1dc3d22487f576f73d0..49b4c79322ad03cbd00f5d015754224ab90b5a2e 100644 (file)
@@ -7020,7 +7020,8 @@ AC_DEFUN([CURL_RUN_IFELSE], [
    AC_REQUIRE([AC_RUN_IFELSE])dnl
 
    old=$LD_LIBRARY_PATH
-   LD_LIBRARY_PATH=$CURL_LIBRARY_PATH
+   LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+   export LD_LIBRARY_PATH
    AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
    LD_LIBRARY_PATH=$old # restore
 ])