Author: scantor Date: Sat Feb 28 00:28:12 2015 New Revision: 1662862 URL: http://svn.apache.org/r1662862 Log: XERCESC-2028
Modified: xerces/c/branches/xerces-3.1/m4/xerces_curl_prefix.m4 Modified: xerces/c/branches/xerces-3.1/m4/xerces_curl_prefix.m4 URL: http://svn.apache.org/viewvc/xerces/c/branches/xerces-3.1/m4/xerces_curl_prefix.m4?rev=1662862&r1=1662861&r2=1662862&view=diff ============================================================================== --- xerces/c/branches/xerces-3.1/m4/xerces_curl_prefix.m4 (original) +++ xerces/c/branches/xerces-3.1/m4/xerces_curl_prefix.m4 Sat Feb 28 00:28:12 2015 @@ -14,10 +14,10 @@ AC_DEFUN([XERCES_CURL_PREFIX], AC_ARG_WITH([curl], [AS_HELP_STRING([--with-curl[[[[=DIR]]]]],[Specify location of libcurl])], [ - if test x"$with_curl" = x"yes"; then - with_curl= - fi - ], + if test x"$with_curl" = x"yes"; then + with_curl= + fi + ], [with_curl=]) # Determine if curl is available @@ -26,49 +26,49 @@ AC_DEFUN([XERCES_CURL_PREFIX], xerces_cv_curl_present=no if test x"$with_curl" != x"no"; then - # See if we were given a prefix. - # - if test -n "$with_curl"; then - AC_PATH_PROG([curl_config], [curl-config],[],[$with_curl/bin]) - else - AC_PATH_PROG([curl_config], [curl-config],[]) - fi - - if test -n "$curl_config"; then - curl_flags=`$curl_config --cflags` - curl_libs=`$curl_config --libs` - else - if test -n "$with_curl"; then - curl_flags="-I$with_curl/include" - curl_libs="-L$with_curl/lib -lcurl" - else - # Default compiler paths. - # - curl_flags= - curl_libs=-lcurl - fi - fi - - # Check that the headers exist and can be compiled. - # - orig_cppflags=$CPPFLAGS - if test -n "$curl_flags"; then - CPPFLAGS="$curl_flags $CPPFLAGS" - fi - AC_CHECK_HEADER([curl/curl.h], [xerces_cv_curl_present=yes]) - CPPFLAGS=$orig_cppflags - - if test x"$xerces_cv_curl_present" != x"no"; then - - # Check that the library can be linked. - # - AC_MSG_CHECKING([for curl_multi_init in -lcurl]) + # See if we were given a prefix. + # + if test -n "$with_curl"; then + AC_PATH_PROG([curl_config], [curl-config],[],[$with_curl/bin]) + else + AC_PATH_PROG([curl_config], [curl-config],[]) + fi + + if test -n "$curl_config"; then + curl_flags=`$curl_config --cflags` + curl_libs=`$curl_config --libs` + else + if test -n "$with_curl"; then + curl_flags="-I$with_curl/include" + curl_libs="-L$with_curl/lib -lcurl" + else + # Default compiler paths. + # + curl_flags= + curl_libs=-lcurl + fi + fi + + # Check that the headers exist and can be compiled. + # + orig_cppflags=$CPPFLAGS + if test -n "$curl_flags"; then + CPPFLAGS="$curl_flags $CPPFLAGS" + fi + AC_CHECK_HEADER([curl/curl.h], [xerces_cv_curl_present=yes]) + CPPFLAGS=$orig_cppflags + + if test x"$xerces_cv_curl_present" != x"no"; then + + # Check that the library can be linked. + # + AC_MSG_CHECKING([for curl_multi_init in -lcurl]) - orig_ldflags=$LDFLAGS - LDFLAGS="$curl_libs $LDFLAGS" + orig_libs=$LIBS + LIBS="$curl_libs $LIBS" - AC_LINK_IFELSE( - AC_LANG_SOURCE[[ + AC_LINK_IFELSE( + AC_LANG_SOURCE[[ #include <curl/curl.h> #include <curl/multi.h> #include <curl/easy.h> @@ -78,21 +78,21 @@ AC_DEFUN([XERCES_CURL_PREFIX], curl_multi_init(); return 0; } - ]], - [], [xerces_cv_curl_present=no]) + ]], + [], [xerces_cv_curl_present=no]) - LDFLAGS=$orig_ldflags + LIBS=$orig_libs - if test x"$xerces_cv_curl_present" != x"no"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - fi + if test x"$xerces_cv_curl_present" != x"no"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi fi + fi ]) - AC_CACHE_VAL([xerces_cv_curl_flags], [xerces_cv_curl_flags=$curl_flags]) + AC_CACHE_VAL([xerces_cv_curl_flags], [xerces_cv_curl_flags=$curl_flags]) AC_CACHE_VAL([xerces_cv_curl_libs], [xerces_cv_curl_libs=$curl_libs]) AC_SUBST([CURL_PRESENT], [$xerces_cv_curl_present]) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org