Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 1af7d3c

Browse files
author
Matthias Koeppe
committed
Check whether libcurl links to executables
1 parent 895eed3 commit 1af7d3c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

build/pkgs/curl/spkg-configure.m4

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,19 @@ SAGE_SPKG_CONFIGURE([curl], [
88
])
99
AS_IF([test -z "$ac_cv_path_CURL"], [sage_spkg_install_curl=yes])
1010
LIBCURL_CHECK_CONFIG(, 7.22, , [sage_spkg_install_curl=yes])
11+
# Anaconda on macOS provides a libcurl with @rpath. Check that
12+
# linking produces a binary than can be run. (#27941)
13+
AC_CACHE_CHECK([whether programs linking to libcurl can be executed],
14+
[sage_libcurl_cv_lib_curl_executable],
15+
[
16+
_libcurl_save_cppflags=$CPPFLAGS
17+
CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
18+
_libcurl_save_libs=$LIBS
19+
LIBS="$LIBCURL $LIBS"
20+
21+
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
22+
curl_easy_setopt(NULL,CURLOPT_URL,NULL);
23+
]])], sage_libcurl_cv_lib_curl_executable=yes, sage_libcurl_cv_lib_curl_executable=no)
24+
])
25+
AS_IF([test "$sage_libcurl_cv_lib_curl_executable" = "no"], [sage_spkg_install_curl=yes])
1126
])

0 commit comments

Comments
 (0)