#18794 [Opn->Fbk]: inappropriate if logic in configure --with-nsapi

From: Date: Thu, 08 Aug 2002 05:53:00 +0000
Subject: #18794 [Opn->Fbk]: inappropriate if logic in configure --with-nsapi
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16236@lists.php.net to get a copy of this message
ID: 18794 Updated by: kalowsky@php.net Reported By: vlb@gene.com -Status: Open +Status: Feedback Bug Type: *Configuration Issues Operating System: Tru64 Unix (but n/a) PHP Version: 4.2.2 New Comment: Changes made to the configure script. Can you please test this later in a little bit with a new snapshot from http://snaps.php.net Thank you. Previous Comments: ------------------------------------------------------------------------ [2002-08-07 17:00:01] vlb@gene.com Configure options configure --with-nsapi=/usr/prop/netscape/server4/ configure succeeds; make exits with cc: Severe: nsapi.c, line 50: Cannot find file "nsapi.h" specified in #include directive. (noinclfilef) #include "nsapi.h" -^ Reason: Configure script contains this if block: if test -d $PHP_NSAPI/include ; then NSAPI_INCLUDE=$PHP_NSAPI/include echo "$ac_t""Netscape-Enterprise/3.x style" 1>&6 elif test -d $PHP_NSAPI/plugins/include ; then NSAPI_INCLUDE=$PHP_NSAPI/plugins/include echo "$ac_t""iPlanet/4.x style" 1>&6 else { echo "configure: error: Please check you have nsapi.h in either DIR/include DIR/plugins/include" 1>&2; exit 1; } fi There are two things wrong here: 1) it is inappropriate to check for $PHP_NSAPI/include; the appropriate test should be for the _file_ $PHP_NSAPI/include/nsapi.h In our case, both $PHP_NSAPI/include and $PHP_NSAPI/plugins/include exist (this has also been the case for at least one of the other bugs filed; see #5233). Configure should not assume a file exists simply because a directory it might be in happens to exist. 2) In the error message, `DIR' is meaningless. The error should use $PHP_NSAPI, not the literal string `DIR'. See also bug 11446 and several others, closed as "bogus" or "not a bug in PHP". While that is technically true, the bug is nonetheless in the PHP configuration script, and it should be addressed by the php team. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18794&edit=1

« previous php.bugs (#16236) next »