Upstream-status: Unknown

diff --git a/acinclude.m4 b/acinclude.m4
index df11abd..06e7236 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2357,7 +2357,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
       PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
     fi
 
-    for i in $PHP_OPENSSL_DIR; do
+    for i in $PHP_OPENSSL_DIR $PHP_OPENSSL_DIR/usr; do
       if test -r $i/include/openssl/evp.h; then
         OPENSSL_INCDIR=$i/include
       fi
diff --git a/ext/imap/config.m4 b/ext/imap/config.m4
index 3fcf674..f08caf7 100644
--- a/ext/imap/config.m4
+++ b/ext/imap/config.m4
@@ -109,7 +109,7 @@ if test "$PHP_IMAP" != "no"; then
     PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared)
     AC_DEFINE(HAVE_IMAP,1,[ ])
 
-    for i in $PHP_IMAP /usr/local /usr; do
+    for i in $PHP_IMAP $PHP_IMAP/usr /usr/local /usr; do
       IMAP_INC_CHK()
       el[]IMAP_INC_CHK(/include/c-client)
       el[]IMAP_INC_CHK(/include/imap)
@@ -198,13 +198,7 @@ if test "$PHP_IMAP" != "no"; then
       AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
     fi
 
-    if test ! -r "$IMAP_DIR/c-client/libc-client.a" && test -r "$IMAP_DIR/c-client/c-client.a" ; then
-      ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
-    elif test ! -r "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" && test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
-      ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1
-    fi
-
-    for lib in c-client4 c-client imap; do
+    for lib in /usr/lib c-client4 c-client imap; do
       IMAP_LIB=$lib
       IMAP_LIB_CHK($PHP_LIBDIR)
       IMAP_LIB_CHK(c-client)
-- 
1.9.3

