diff options
author | Tor Lillqvist <tml@iki.fi> | 2011-06-05 00:45:13 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2011-06-05 00:55:21 +0300 |
commit | abe8a14f8834813fb74de5b71c1ac6b3d4aade8f (patch) | |
tree | f10f633861ea4543082d67a5d091fe9b8b401e12 /configure.in | |
parent | 9c0ba9c3d12bde7bdccb3c3fa191a2719a1eedd6 (diff) |
Improve libcurl configury
Hardcode use of the curl-config from the 10.4 SDK for MacOSX. Make use
of pkg-config to find libcurl when cross-compiling optional, if no
libcurl package found by pkg-config, use curl-config.
Diffstat (limited to 'configure.in')
-rwxr-xr-x | configure.in | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/configure.in b/configure.in index 7fbea643f015..17302c673e0f 100755 --- a/configure.in +++ b/configure.in @@ -4985,19 +4985,29 @@ dnl =================================================================== if test "$_os" = "Darwin" -a "$with_system_curl" != "no"; then with_system_curl=yes fi -AC_MSG_CHECKING([which curl to use]) +AC_MSG_CHECKING([which libcurl to use]) if test -n "$with_system_curl" -o -n "$with_system_libs" && \ test "$with_system_curl" != "no"; then AC_MSG_RESULT([external]) SYSTEM_CURL=YES + test $_os = Darwin && CURLCONFIG=/Developer/SDKs/MacOSX10.4u.sdk/usr/bin/curl-config + + curl_version="" if test "$cross_compiling" = "yes"; then - PKG_CHECK_MODULES(CURL, libcurl) - curl_version=`$PKG_CONFIG --modversion libcurl` - else + dnl At least the OBS mingw32-libcurl-devel package + dnl comes with a proper .pc file + PKG_CHECK_MODULES(CURL, libcurl,, [:]) + if test -n "CURL_PKG_ERRORS"; then + AC_MSG_RESULT([no]) + else + curl_version=`$PKG_CONFIG --modversion libcurl` + fi + fi + if test -z "$curl_version"; then AC_PATH_PROG(CURLCONFIG, curl-config) if test -z "$CURLCONFIG"; then - AC_MSG_ERROR([install curl to run this script]) + AC_MSG_ERROR([install the libcurl development package]) fi CURL_LIBS=`$CURLCONFIG --libs` CURL_CFLAGS=`$CURLCONFIG --cflags` |