Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1091 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34744 invoked from network); 28 Apr 2003 23:05:37 -0000 Received: from unknown (HELO echosuite.com) (66.14.129.196) by pb1.pair.com with SMTP; 28 Apr 2003 23:05:37 -0000 Received: (qmail 5359 invoked from network); 28 Apr 2003 23:05:36 -0000 Received: from palana.echospace.com (HELO php.net) (192.168.1.6) by seatac.echospace.com with SMTP; 28 Apr 2003 23:05:36 -0000 Message-ID: <3EADB3BD.90102@php.net> Date: Mon, 28 Apr 2003 16:05:33 -0700 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jani Taskinen CC: internals@lists.php.net References: <20030427223415.369767fc.kevin@oceania.net> <20030427225400.45d523d5.kevin@oceania.net> <3EAD841F.7060507@php.net> In-Reply-To: Content-Type: multipart/mixed; boundary="------------010201030800080504020301" Subject: Re: [PHP-DEV] php5 compile fails From: vlad@php.net (Vlad Krupin) --------------010201030800080504020301 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Jani Taskinen wrote: > There was some bug report about this too..so is the > answer to these "Not PHP bug, blame RH9" ? :) > I do not know. It depends... Redhat9 comes with openssl that is compiled without OPENSSL_NO_KRB5. Hence, krb5.h is required, but it's located in /usr/kerberos/include. They keep closing bugreports about that saying "won't fix" - they say that your make file is responsible for making sure it knows where to find kerberos include files. I respectfully disagree, because a file like: #include int main(){} should compile, and it doesn't. As a quick fix, I just ripped some code off imap/config.m4, modified it a bit and added to openssl/config.m4 (see patch). This fixes the problem. However, it is kinda silly to require --with-kerberos parameter if people are using older openssl and do not have/use kerberos. The right way to do this is to find out whether openssl was compiled with OPENSSL_NO_KRB5. If not, then we need to search for kerberos, like the patch does. If it is defined, no intervention is required. I am not quite sure what's the best way to do that, so could someone look at the patch and fix it to check for OPENSSL_NO_KRB5 ? (I don't have time to figure that out right this moment) Vlad P.S. This also affects 4.3.2 and will frustrate the heck out of everyone trying to install it on a redhat9 system. --------------010201030800080504020301 Content-Type: text/plain; name="diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff.txt" --- config.m4 2003-02-27 10:13:21.000000000 -0800 +++ /usr/src/phpdev/php5-200304282130/ext/openssl/config.m4 2003-04-28 14:19:19.000000000 -0700 @@ -2,9 +2,42 @@ dnl $Id: config.m4,v 1.5 2003/02/27 17:43:36 wez Exp $ dnl +AC_DEFUN(PHP_SSL_KRB_CHK, [ + AC_ARG_WITH(kerberos, + [ --with-kerberos[=DIR] OpenSSL: Include Kerberos support. DIR is the Kerberos install dir.],[ + PHP_KERBEROS=$withval + ],[ + PHP_KERBEROS=no + ]) + + if test "$PHP_KERBEROS" != "no"; then + 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/include/krb5.h; 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, searches in /usr/kerberos, /usr/local and /usr ) + ]) + else + PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include) + fi + fi +]) + if test "$PHP_OPENSSL" != "no"; then PHP_NEW_EXTENSION(openssl, openssl.c xp_ssl.c, $ext_openssl_shared) OPENSSL_SHARED_LIBADD="-lcrypto -lssl" PHP_SUBST(OPENSSL_SHARED_LIBADD) AC_DEFINE(HAVE_OPENSSL_EXT,1,[ ]) + PHP_SSL_KRB_CHK fi --------------010201030800080504020301--