diff --git a/configure b/configure index 95617e5345..e88bc82889 100755 --- a/configure +++ b/configure @@ -27421,7 +27421,14 @@ if test "$wxUSE_LIBMSPACK" != "no"; then fi -if test "$wxUSE_WEBREQUEST" = "yes" -a "$wxUSE_LIBCURL" != "no"; then +if test "$wxUSE_WEBREQUEST" = "yes"; then + if test "$wxUSE_LIBCURL" = "builtin"; then + if test "$USE_DARWIN" = 1; then + wxUSE_LIBCURL=no + fi + fi + + if test "$wxUSE_LIBCURL" != "no"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCURL" >&5 @@ -27482,15 +27489,15 @@ fi echo "$LIBCURL_PKG_ERRORS" >&5 - wxUSE_LIBCURL=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 + wxUSE_LIBCURL=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } elif test $pkg_failed = untried; then - wxUSE_LIBCURL=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 + wxUSE_LIBCURL=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } @@ -27500,11 +27507,12 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - wxUSE_LIBCURL=yes - CXXFLAGS="$LIBCURL_CFLAGS $CXXFLAGS" - LIBS="$LIBCURL_LIBS $LIBS" + wxUSE_LIBCURL=yes + CXXFLAGS="$LIBCURL_CFLAGS $CXXFLAGS" + LIBS="$LIBCURL_LIBS $LIBS" fi + fi fi diff --git a/configure.in b/configure.in index 19c44fcab1..1dff0dc99f 100644 --- a/configure.in +++ b/configure.in @@ -3001,18 +3001,31 @@ dnl ------------------------------------------------------------------------ dnl Check for libcurl dnl ------------------------------------------------------------------------ -if test "$wxUSE_WEBREQUEST" = "yes" -a "$wxUSE_LIBCURL" != "no"; then - PKG_CHECK_MODULES(LIBCURL, [libcurl], - [ - wxUSE_LIBCURL=yes - CXXFLAGS="$LIBCURL_CFLAGS $CXXFLAGS" - LIBS="$LIBCURL_LIBS $LIBS" - ], - [ +if test "$wxUSE_WEBREQUEST" = "yes"; then + if test "$wxUSE_LIBCURL" = "builtin"; then + dnl When using --disable-sys-libs, we typically want to disable + dnl dependencies on the libraries that are not part of "the + dnl platform" and under macOS libcurl is definitely not part of the + dnl system -- but under Linux it arguably is, so handle this case + dnl appropriately. + if test "$USE_DARWIN" = 1; then wxUSE_LIBCURL=no - AC_MSG_RESULT([not found]) - ] - ) + fi + fi + + if test "$wxUSE_LIBCURL" != "no"; then + PKG_CHECK_MODULES(LIBCURL, [libcurl], + [ + wxUSE_LIBCURL=yes + CXXFLAGS="$LIBCURL_CFLAGS $CXXFLAGS" + LIBS="$LIBCURL_LIBS $LIBS" + ], + [ + wxUSE_LIBCURL=no + AC_MSG_RESULT([not found]) + ] + ) + fi fi dnl ----------------------------------------------------------------