|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-08-07 17:00 UTC] vlb at gene dot 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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
There is a check for the header file nsapi.h in both sections. Also my brief (albiet limited) understanding is that nsapi v4 uses only the plugins/include/ directory, nsapi v3 usrs just the includes directory. Thus the OR between them. Anyways if you can test this patch to the config.m4 (you'll need to run cvsclean and buildconf) I'd appriciate it Index: config.m4 =================================================================== RCS file: /repository/php4/sapi/nsapi/config.m4,v retrieving revision 1.12 diff -u -u -r1.12 config.m4 --- config.m4 8 Aug 2002 05:52:15 -0000 1.12 +++ config.m4 14 Aug 2002 00:15:19 -0000 @@ -20,11 +20,13 @@ NSAPI_INCLUDE=$PHP_NSAPI/include AC_MSG_RESULT(Netscape-Enterprise/3.x style) AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h]) - elif test -d $PHP_NSAPI/plugins/include ; then - NSAPI_INCLUDE=$PHP_NSAPI/plugins/include + fi + if test -d $PHP_NSAPI/plugins/include ; then + NSAPI_INCLUDE="$NSAPI_INCLUDE $PHP_NSAPI/plugins/include" AC_MSG_RESULT(iPlanet/4.x style) AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h]) - else + fi + if test "$NSAPI_INCLUDE" = ""; then AC_MSG_ERROR(Please check you have nsapi.h in either $PHP_NSAPI/include or $PHP_NSAPI/plugins/include) fi PHP_ADD_INCLUDE($NSAPI_INCLUDE)