1dnl 2dnl $Id$ 3dnl 4 5PHP_ARG_ENABLE(phpdbg, for phpdbg support, 6[ --enable-phpdbg Build phpdbg], yes, yes) 7 8PHP_ARG_ENABLE(phpdbg-webhelper, for phpdbg web SAPI support, 9[ --enable-phpdbg-webhelper Build phpdbg web SAPI support], no) 10 11PHP_ARG_ENABLE(phpdbg-debug, for phpdbg debug build, 12[ --enable-phpdbg-debug Build phpdbg in debug mode], no, no) 13 14if test "$BUILD_PHPDBG" = "" && test "$PHP_PHPDBG" != "no"; then 15 AC_HEADER_TIOCGWINSZ 16 AC_DEFINE(HAVE_PHPDBG, 1, [ ]) 17 18 if test "$PHP_PHPDBG_DEBUG" != "no"; then 19 AC_DEFINE(PHPDBG_DEBUG, 1, [ ]) 20 else 21 AC_DEFINE(PHPDBG_DEBUG, 0, [ ]) 22 fi 23 24 PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" 25 PHP_PHPDBG_FILES="phpdbg.c phpdbg_parser.c phpdbg_lexer.c phpdbg_prompt.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c phpdbg_info.c phpdbg_cmd.c phpdbg_set.c phpdbg_frame.c phpdbg_watch.c phpdbg_btree.c phpdbg_sigsafe.c phpdbg_wait.c phpdbg_io.c phpdbg_eol.c phpdbg_out.c" 26 27 if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then 28 PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS" 29 fi 30 31 PHP_SUBST(PHP_PHPDBG_CFLAGS) 32 PHP_SUBST(PHP_PHPDBG_FILES) 33 PHP_SUBST(PHPDBG_EXTRA_LIBS) 34 35 PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/phpdbg/Makefile.frag], [$abs_srcdir/sapi/phpdbg], [$abs_builddir/sapi/phpdbg]) 36 PHP_SELECT_SAPI(phpdbg, program, $PHP_PHPDBG_FILES, $PHP_PHPDBG_CFLAGS, [$(SAPI_PHPDBG_PATH)]) 37 38 BUILD_BINARY="sapi/phpdbg/phpdbg" 39 BUILD_SHARED="sapi/phpdbg/libphpdbg.la" 40 41 BUILD_PHPDBG="\$(LIBTOOL) --mode=link \ 42 \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \ 43 \$(PHP_GLOBAL_OBJS) \ 44 \$(PHP_BINARY_OBJS) \ 45 \$(PHP_PHPDBG_OBJS) \ 46 \$(EXTRA_LIBS) \ 47 \$(PHPDBG_EXTRA_LIBS) \ 48 \$(ZEND_EXTRA_LIBS) \ 49 -o \$(BUILD_BINARY)" 50 51 BUILD_PHPDBG_SHARED="\$(LIBTOOL) --mode=link \ 52 \$(CC) -shared -Wl,-soname,libphpdbg.so -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \ 53 \$(PHP_GLOBAL_OBJS) \ 54 \$(PHP_BINARY_OBJS) \ 55 \$(PHP_PHPDBG_OBJS) \ 56 \$(EXTRA_LIBS) \ 57 \$(PHPDBG_EXTRA_LIBS) \ 58 \$(ZEND_EXTRA_LIBS) \ 59 \-DPHPDBG_SHARED \ 60 -o \$(BUILD_SHARED)" 61 62 PHP_SUBST(BUILD_BINARY) 63 PHP_SUBST(BUILD_SHARED) 64 PHP_SUBST(BUILD_PHPDBG) 65 PHP_SUBST(BUILD_PHPDBG_SHARED) 66fi 67 68if test "$PHP_PHPDBG_WEBHELPER" != "no"; then 69 PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared) 70fi 71 72dnl ## Local Variables: 73dnl ## tab-width: 4 74dnl ## End: 75