]> granicus.if.org Git - php/commitdiff
Moving --with-openssl to global configure, want OpenSSL for not just snmp
authorStig Venaas <venaas@php.net>
Sat, 28 Oct 2000 18:26:45 +0000 (18:26 +0000)
committerStig Venaas <venaas@php.net>
Sat, 28 Oct 2000 18:26:45 +0000 (18:26 +0000)
configure.in
ext/snmp/config.m4

index 3e60645b6a80ee408d2889d566e7c291ae296c37..88c2e82b7bc65d3248cb366d15a5378b2718d522 100644 (file)
@@ -501,6 +501,41 @@ AC_ARG_WITH(exec-dir,
        AC_MSG_RESULT(/usr/local/php/bin)
 ])
 
+PHP_ARG_WITH(openssl,for OpenSSL support,
+[  --with-openssl[=DIR]    Include OpenSSL support])
+if test "$PHP_OPENSSL" = "yes"; then
+  PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+fi
+
+AC_DEFUN(PHP_SETUP_OPENSSL,[
+  if test "$PHP_OPENSSL" = "no"; then
+    PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+  fi
+
+  for i in $PHP_OPENSSL; do
+    if test -r $i/include/openssl/evp.h; then
+      OPENSSL_DIR=$i
+      OPENSSL_INC=$i/include/openssl
+    elif test -r $i/include/evp.h; then
+      OPENSSL_DIR=$i
+      OPENSSL_INC=$i/include
+    fi
+  done
+
+  if test -z "$OPENSSL_DIR"; then
+    AC_MSG_ERROR(Cannot find OpenSSL's <evp.h>)
+  fi
+
+  AC_ADD_LIBPATH($OPENSSL_DIR/lib)
+  AC_ADD_LIBRARY(ssl)
+  AC_ADD_LIBRARY(crypto)
+  AC_ADD_INCLUDE($OPENSSL_INC)
+])
+
+if test "$PHP_OPENSSL" != "no"; then
+  PHP_SETUP_OPENSSL
+fi
+
 PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler,
 [  --enable-sigchild       Enable PHP's own SIGCHLD handler.],no)
 
index 0aea5b6ef51c6a511bca58f2341789d0c01cbc77..bc45789906a5b3a394b02e3fe4f64c3aa7156d46 100644 (file)
@@ -1,29 +1,5 @@
 
 
-PHP_ARG_WITH(openssl,for OpenSSL support in SNMP,
-[  --with-openssl[=DIR]    Include OpenSSL support in SNMP.])
-
-AC_DEFUN(PHP_SETUP_OPENSSL,[
-  for i in /usr/local/ssl /usr/local /usr /usr/local/openssl $PHP_OPENSSL; do
-    if test -r $i/include/openssl/evp.h; then
-      OPENSSL_DIR=$i
-      OPENSSL_INC=$i/include/openssl
-    elif test -r $i/include/evp.h; then
-      OPENSSL_DIR=$i
-      OPENSSL_INC=$i/include
-    fi
-  done
-
-  if test -z "$OPENSSL_DIR"; then
-    AC_MSG_ERROR(Cannot find OpenSSL's <evp.h>)
-  fi
-
-  AC_ADD_LIBPATH($OPENSSL_DIR/lib, SNMP_SHARED_LIBADD)
-  AC_ADD_LIBRARY(ssl, yes, SNMP_SHARED_LIBADD)
-  AC_ADD_LIBRARY(crypto, yes, SNMP_SHARED_LIBADD)
-  AC_ADD_INCLUDE($OPENSSL_INC)
-])
-
 PHP_ARG_WITH(snmp,for SNMP support,
 [  --with-snmp[=DIR]       Include SNMP support.  DIR is the SNMP base
                           install directory, defaults to searching through