Annotation of embedaddon/php/sapi/cli/config.m4, revision 1.1.1.3

1.1       misho       1: dnl
1.1.1.2   misho       2: dnl $Id$
1.1       misho       3: dnl
                      4: 
                      5: PHP_ARG_ENABLE(cli,,
                      6: [  --disable-cli           Disable building CLI version of PHP
                      7:                           (this forces --without-pear)], yes, no)
                      8: 
                      9: AC_MSG_CHECKING(for CLI build)
                     10: if test "$PHP_CLI" != "no"; then
1.1.1.2   misho      11:   PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cli/Makefile.frag)
                     12: 
                     13:   dnl Set filename
1.1       misho      14:   SAPI_CLI_PATH=sapi/cli/php
1.1.1.2   misho      15: 
                     16:   dnl Select SAPI
                     17:   PHP_SELECT_SAPI(cli, program, php_cli.c php_http_parser.c php_cli_server.c,, '$(SAPI_CLI_PATH)')
1.1       misho      18: 
                     19:   case $host_alias in
                     20:   *aix*)
1.1.1.2   misho      21:     if test "$php_sapi_module" = "shared"; then
                     22:       BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
1.1       misho      23:     else
1.1.1.2   misho      24:       BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
1.1       misho      25:     fi
                     26:     ;;
                     27:   *darwin*)
1.1.1.2   misho      28:     BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
1.1       misho      29:     ;;
                     30:   *netware*)
1.1.1.2   misho      31:     BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -Lnetware -lphp5lib -o \$(SAPI_CLI_PATH)"
1.1       misho      32:     ;;
                     33:   *)
1.1.1.2   misho      34:     BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
1.1       misho      35:     ;;
                     36:   esac
                     37: 
1.1.1.2   misho      38:   dnl Set executable for tests
                     39:   PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
                     40:   PHP_SUBST(PHP_EXECUTABLE)
                     41: 
                     42:   dnl Expose to Makefile
                     43:   PHP_SUBST(SAPI_CLI_PATH)
1.1       misho      44:   PHP_SUBST(BUILD_CLI)
1.1.1.2   misho      45: 
1.1       misho      46:   PHP_OUTPUT(sapi/cli/php.1)
1.1.1.3 ! misho      47: 
        !            48:   PHP_INSTALL_HEADERS([sapi/cli/cli.h])
1.1       misho      49: fi
                     50: AC_MSG_RESULT($PHP_CLI)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>