config.m4 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. dnl config.m4 for sapi phpdbg
  2. PHP_ARG_ENABLE(phpdbg, for phpdbg support,
  3. [ --enable-phpdbg Build phpdbg], yes, yes)
  4. PHP_ARG_ENABLE(phpdbg-webhelper, for phpdbg web SAPI support,
  5. [ --enable-phpdbg-webhelper
  6. Build phpdbg web SAPI support], no)
  7. PHP_ARG_ENABLE(phpdbg-debug, for phpdbg debug build,
  8. [ --enable-phpdbg-debug Build phpdbg in debug mode], no, no)
  9. PHP_ARG_ENABLE(phpdbg-readline, for phpdbg readline support,
  10. [ --enable-phpdbg-readline Enable readline support in phpdbg (depends on static ext/readline)], no, no)
  11. if test "$BUILD_PHPDBG" = "" && test "$PHP_PHPDBG" != "no"; then
  12. AC_HEADER_TIOCGWINSZ
  13. AC_DEFINE(HAVE_PHPDBG, 1, [ ])
  14. if test "$PHP_PHPDBG_DEBUG" != "no"; then
  15. AC_DEFINE(PHPDBG_DEBUG, 1, [ ])
  16. else
  17. AC_DEFINE(PHPDBG_DEBUG, 0, [ ])
  18. fi
  19. PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
  20. 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"
  21. AC_MSG_CHECKING([for phpdbg and readline integration])
  22. if test "$PHP_PHPDBG_READLINE" = "yes"; then
  23. if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then
  24. AC_DEFINE(HAVE_PHPDBG_READLINE, 1, [ ])
  25. PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS"
  26. AC_MSG_RESULT([ok])
  27. else
  28. AC_MSG_RESULT([readline is not available])
  29. fi
  30. else
  31. AC_MSG_RESULT([disabled])
  32. fi
  33. PHP_SUBST(PHP_PHPDBG_CFLAGS)
  34. PHP_SUBST(PHP_PHPDBG_FILES)
  35. PHP_SUBST(PHPDBG_EXTRA_LIBS)
  36. PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/phpdbg/Makefile.frag], [$abs_srcdir/sapi/phpdbg], [$abs_builddir/sapi/phpdbg])
  37. PHP_SELECT_SAPI(phpdbg, program, $PHP_PHPDBG_FILES, $PHP_PHPDBG_CFLAGS, [$(SAPI_PHPDBG_PATH)])
  38. BUILD_BINARY="sapi/phpdbg/phpdbg"
  39. BUILD_SHARED="sapi/phpdbg/libphpdbg.la"
  40. BUILD_PHPDBG="\$(LIBTOOL) --mode=link \
  41. \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \
  42. \$(PHP_GLOBAL_OBJS) \
  43. \$(PHP_BINARY_OBJS) \
  44. \$(PHP_PHPDBG_OBJS) \
  45. \$(EXTRA_LIBS) \
  46. \$(PHPDBG_EXTRA_LIBS) \
  47. \$(ZEND_EXTRA_LIBS) \
  48. \$(PHP_FRAMEWORKS) \
  49. -o \$(BUILD_BINARY)"
  50. BUILD_PHPDBG_SHARED="\$(LIBTOOL) --mode=link \
  51. \$(CC) -shared -Wl,-soname,libphpdbg.so -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \
  52. \$(PHP_GLOBAL_OBJS) \
  53. \$(PHP_BINARY_OBJS) \
  54. \$(PHP_PHPDBG_OBJS) \
  55. \$(EXTRA_LIBS) \
  56. \$(PHPDBG_EXTRA_LIBS) \
  57. \$(ZEND_EXTRA_LIBS) \
  58. \-DPHPDBG_SHARED \
  59. -o \$(BUILD_SHARED)"
  60. PHP_SUBST(BUILD_BINARY)
  61. PHP_SUBST(BUILD_SHARED)
  62. PHP_SUBST(BUILD_PHPDBG)
  63. PHP_SUBST(BUILD_PHPDBG_SHARED)
  64. PHP_OUTPUT(sapi/phpdbg/phpdbg.1)
  65. fi
  66. if test "$PHP_PHPDBG_WEBHELPER" != "no"; then
  67. PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared)
  68. fi
  69. dnl ## Local Variables:
  70. dnl ## tab-width: 4
  71. dnl ## End: