diff options
author | foobar <sniper@php.net> | 2002-11-01 16:45:59 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2002-11-01 16:45:59 +0000 |
commit | 4dabb162d0a387a5f05f60fba7a2a360a0325cf2 (patch) | |
tree | c36c5d78c9f67e9d15eb2afb5828165b301fb66b /ext/imap | |
parent | bf15b826a14cb4d1ab974ad9111279de717a5b5b (diff) | |
download | php-git-4dabb162d0a387a5f05f60fba7a2a360a0325cf2.tar.gz |
- Added searching for Kerberos libs in default locations if no path is
given for --with-kerberos.
# Marcus, please try this. :)
Diffstat (limited to 'ext/imap')
-rw-r--r-- | ext/imap/config.m4 | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index f87f8cd9f9..7ddf58b93f 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 @@ -63,19 +63,29 @@ AC_DEFUN(PHP_IMAP_KRB_CHK, [ PHP_KERBEROS=no ]) - if test "$PHP_KERBEROS" = "yes"; then - test -d /usr/kerberos && PHP_KERBEROS=/usr/kerberos - fi - if test "$PHP_KERBEROS" != "no"; then - if test ! -f $PHP_KERBEROS/lib/libkrb5.a && test ! -f $PHP_KERBEROS/lib/libkrb5.$SHLIB_SUFFIX_NAME; then - AC_MSG_ERROR([Kerberos libraries not found in $PHP_KERBEROS/lib. + + if test "$PHP_KERBEROS" = "yes"; then + SEARCH_PATHS="/usr/kerberos /usr/local /usr" + else + SEARCH_PATHS=$PHP_KERBEROS + fi + + for i in $SEARCH_PATHS; do + if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then + PHP_KERBEROS_DIR=$i + break + fi + done + + if test -z "$PHP_KERBEROS_DIR"; then + AC_MSG_ERROR([Kerberos libraries not found. - Check the path given to --with-kerberos (if no path is given, defaults to /usr/kerberos ) + Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr ) ]) fi AC_DEFINE(HAVE_IMAP_KRB,1,[ ]) - PHP_ADD_LIBPATH($PHP_KERBEROS/lib, IMAP_SHARED_LIBADD) + PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, IMAP_SHARED_LIBADD) PHP_ADD_LIBRARY(gssapi_krb5, 1, IMAP_SHARED_LIBADD) PHP_ADD_LIBRARY(krb5, 1, IMAP_SHARED_LIBADD) PHP_ADD_LIBRARY(k5crypto, 1, IMAP_SHARED_LIBADD) |