summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-04-13 14:07:39 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-04-16 20:32:17 +0200
commit2d4c2152c9eb3dbdf943de46ed8fc11285f1b90b (patch)
tree3f3000e2155b8da029d14a591475c17aa35bbd34 /m4
parent627bd7da760c67211a6b7d3c98bba94c6213323e (diff)
downloadcurl-2d4c2152c9eb3dbdf943de46ed8fc11285f1b90b.tar.gz
configure: keep LD_LIBRARY_PATH changes local
... only set it when we actually have to run tests to reduce its impact on for example build commands etc. Fixes #2490 Closes #2492 Reported-by: Dmitry Mikhirev
Diffstat (limited to 'm4')
-rw-r--r--m4/curl-functions.m418
1 files changed, 17 insertions, 1 deletions
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index dde7fe2ea..1bbde9ed5 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, 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
@@ -7008,3 +7008,19 @@ AC_DEFUN([CURL_CHECK_FUNC_WRITEV], [
curl_cv_func_writev="no"
fi
])
+
+dnl CURL_RUN_IFELSE
+dnl -------------------------------------------------
+dnl Wrapper macro to use instead of AC_RUN_IFELSE. It
+dnl sets LD_LIBRARY_PATH locally for this run only, from the
+dnl CURL_LIBRARY_PATH variable. It keeps the LD_LIBRARY_PATH
+dnl changes contained within this macro.
+
+AC_DEFUN([CURL_RUN_IFELSE], [
+ AC_REQUIRE([AC_RUN_IFELSE])dnl
+
+ old=$LD_LIBRARY_PATH
+ LD_LIBRARY_PATH=$CURL_LIBRARY_PATH
+ AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
+ LD_LIBRARY_PATH=$old # restore
+])