diff -ruN mod_php4.old/scripts/configure.php mod_php4/scripts/configure.php --- mod_php4.old/scripts/configure.php Wed Mar 5 05:28:38 2003 +++ mod_php4/scripts/configure.php Wed Mar 5 07:23:18 2003 @@ -256,10 +256,18 @@ echo "CONFIGURE_ARGS+=--with-openssl=\${OPENSSLBASE}" ;; \"SNMP\") - echo "LIB_DEPENDS+= snmp.4:\${PORTSDIR}/net/net-snmp4" - echo "CONFIGURE_ARGS+=--with-snmp=\${LOCALBASE} --enable-ucd-snmp-hack --with-openssl=\${OPENSSLBASE}" - echo "USE_OPENSSL= yes" - LIBS="${LIBS} -L\${OPENSSLBASE}/lib -lcrypto -lssl" + echo "LIB_DEPENDS+= snmp.4:\${PORTSDIR}/net/net-snmp4" + echo "CONFIGURE_ARGS+=--with-snmp=\${LOCALBASE} --enable-ucd-snmp-hack" + + # if .4 is compiled with OpenSSL, PHP depends on OpenSSL too. + # if .5 and not .4 installed, we are in need to install .4 (which compiles default with SSL) + # if .4 and .5 is present in the system, we can't be shure that sbin/snmp is from net-snmp4 + if ([ -r ${LOCALBASE}/lib/libsnmp.so.4 ] && /usr/bin/ldd ${LOCALBASE}/sbin/snmpd 2> /dev/null | /usr/bin/grep -q "libcrypto") || [ -r ${LOCALBASE}/lib/libnetsnmp.so ]; then + + echo "CONFIGURE_ARGS+= --with-openssl=\${OPENSSLBASE}" + echo "USE_OPENSSL= yes" + LIBS="${LIBS} -L\${OPENSSLBASE}/lib -lcrypto -lssl" + fi ;; \"XML\") if [ -z "$XML" ]; then