Fix bug #68000 Extension does not build on FreeBSD
authorMichael Wallner <mike@php.net>
Mon, 15 Sep 2014 11:56:29 +0000 (13:56 +0200)
committerMichael Wallner <mike@php.net>
Mon, 15 Sep 2014 11:56:29 +0000 (13:56 +0200)
config9.m4
package.xml

index 9ca835630506f1a608fcfb7b75bb994e917dff50..686b5ea286aaaca9349956f228a55c45eeef4457 100644 (file)
@@ -190,7 +190,7 @@ dnl ----
                
                        AC_MSG_CHECKING([for SSL support in libcurl])
                        CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
-                       CURL_SSL_LIBS=()
+                       CURL_SSL_LIBS=""
                        if test "$CURL_SSL" = "SSL"; then
                                AC_MSG_RESULT([yes])
                                AC_DEFINE([PHP_HTTP_HAVE_SSL], [1], [ ])
@@ -212,7 +212,7 @@ dnl ----
                                        AC_CHECK_HEADER([openssl/ssl.h], [
                                                AC_CHECK_HEADER([openssl/crypto.h], [
                                                        AC_DEFINE([PHP_HTTP_HAVE_OPENSSL], [1], [ ])
-                                                       CURL_SSL_LIBS=(ssl crypto)
+                                                       CURL_SSL_LIBS="ssl crypto"
                                                ])
                                        ])
                                ], [
@@ -238,7 +238,7 @@ dnl ----
                                        AC_CHECK_HEADER([gnutls.h], [
                                                AC_CHECK_HEADER([gcrypt.h], [
                                                        AC_DEFINE([PHP_HTTP_HAVE_GNUTLS], [1], [ ])
-                                                       CURL_SSL_LIBS=(gnutls gcrypt)
+                                                       CURL_SSL_LIBS="gnutls gcrypt"
                                                ])
                                        ])
                                ], [
@@ -274,9 +274,11 @@ dnl ----
                        CFLAGS="$save_CFLAGS"
                        LDFLAGS="$save_LDFLAGS"
                        
-                       for CURL_SSL_LIB in "${CURL_SSL_LIBS[[@]]}"; do
-                               PHP_ADD_LIBRARY_WITH_PATH([$CURL_SSL_LIB], $CURL_DIR/$PHP_LIBDIR, PHP_HTTP_SHARED_LIBADD)
-                       done
+                       if test -n "$CURL_SSL_LIBS"; then
+                               for CURL_SSL_LIB in $CURL_SSL_LIBS; do
+                                       PHP_ADD_LIBRARY_WITH_PATH([$CURL_SSL_LIB], $CURL_DIR/$PHP_LIBDIR, PHP_HTTP_SHARED_LIBADD)
+                               done
+                       fi
                        
                        dnl end compile tests
                
index eb7642db38207d66da9fc5a1abf6ad56c4a0eed8..914591f9fe32e1e48fd72e44a1ba1c5db5fb88c5 100644 (file)
@@ -49,6 +49,7 @@ v2: http://dev.iworks.at/ext-http/lcov/ext/http/
  <license>BSD, revised</license>
  <notes><![CDATA[
 * Fixed bug #68009 (Segmentation fault after calling exit(0) after a request)
+* Fixed bug #68000 (Extension does not build on FreeBSD)
 ]]></notes>
  <contents>
   <dir name="/">