xref: /PHP-5.5/sapi/nsapi/config.m4 (revision eb923bf6)
1dnl
2dnl $Id$
3dnl
4
5PHP_ARG_WITH(nsapi, for NSAPI support,
6[  --with-nsapi=DIR        Build PHP as NSAPI module for Netscape/iPlanet/Sun Webserver], no, no)
7
8if test "$PHP_NSAPI" != "no"; then
9  if test ! -d $PHP_NSAPI/bin ; then
10    AC_MSG_ERROR(Please specify the path to the root of your Netscape/iPlanet/Sun Webserver using --with-nsapi=DIR)
11  fi
12  AC_MSG_CHECKING([for NSAPI include files])
13  if test -d $PHP_NSAPI/include ; then
14    NSAPI_INC_DIR="$PHP_NSAPI/include"
15    AC_MSG_RESULT([Netscape 3.x / Sun 7.x style])
16    AC_CHECK_HEADERS([$NSAPI_INC_DIR/nsapi.h])
17    NSAPI_INCLUDE="-I$NSAPI_INC_DIR"
18  fi
19  if test -d $PHP_NSAPI/plugins/include ; then
20    NSAPI_INC_DIR="$PHP_NSAPI/plugins/include"
21    AC_MSG_RESULT([iPlanet 4.x / Sun 6.x style])
22    AC_CHECK_HEADERS([$NSAPI_INC_DIR/nsapi.h])
23    NSAPI_INCLUDE="$NSAPI_INCLUDE -I$NSAPI_INC_DIR"
24  fi
25  if test -z "$NSAPI_INCLUDE"; then
26    AC_MSG_ERROR([Please check you have nsapi.h in either $PHP_NSAPI/include or $PHP_NSAPI/plugins/include])
27  fi
28
29  PHP_EVAL_INCLINE($NSAPI_INCLUDE)
30  PHP_BUILD_THREAD_SAFE
31  AC_DEFINE(HAVE_NSAPI, 1, [Whether you have a Netscape/iPlanet/Sun Webserver])
32  PHP_SELECT_SAPI(nsapi, shared, nsapi.c)
33  INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHP_NSAPI/bin/"
34fi
35
36
37dnl ## Local Variables:
38dnl ## tab-width: 4
39dnl ## End:
40