config.m4 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. dnl $Id$
  2. dnl config.m4 for extension symfony_debug
  3. dnl Comments in this file start with the string 'dnl'.
  4. dnl Remove where necessary. This file will not work
  5. dnl without editing.
  6. dnl If your extension references something external, use with:
  7. dnl PHP_ARG_WITH(symfony_debug, for symfony_debug support,
  8. dnl Make sure that the comment is aligned:
  9. dnl [ --with-symfony_debug Include symfony_debug support])
  10. dnl Otherwise use enable:
  11. PHP_ARG_ENABLE(symfony_debug, whether to enable symfony_debug support,
  12. dnl Make sure that the comment is aligned:
  13. [ --enable-symfony_debug Enable symfony_debug support])
  14. if test "$PHP_SYMFONY_DEBUG" != "no"; then
  15. dnl Write more examples of tests here...
  16. dnl # --with-symfony_debug -> check with-path
  17. dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
  18. dnl SEARCH_FOR="/include/symfony_debug.h" # you most likely want to change this
  19. dnl if test -r $PHP_SYMFONY_DEBUG/$SEARCH_FOR; then # path given as parameter
  20. dnl SYMFONY_DEBUG_DIR=$PHP_SYMFONY_DEBUG
  21. dnl else # search default path list
  22. dnl AC_MSG_CHECKING([for symfony_debug files in default path])
  23. dnl for i in $SEARCH_PATH ; do
  24. dnl if test -r $i/$SEARCH_FOR; then
  25. dnl SYMFONY_DEBUG_DIR=$i
  26. dnl AC_MSG_RESULT(found in $i)
  27. dnl fi
  28. dnl done
  29. dnl fi
  30. dnl
  31. dnl if test -z "$SYMFONY_DEBUG_DIR"; then
  32. dnl AC_MSG_RESULT([not found])
  33. dnl AC_MSG_ERROR([Please reinstall the symfony_debug distribution])
  34. dnl fi
  35. dnl # --with-symfony_debug -> add include path
  36. dnl PHP_ADD_INCLUDE($SYMFONY_DEBUG_DIR/include)
  37. dnl # --with-symfony_debug -> check for lib and symbol presence
  38. dnl LIBNAME=symfony_debug # you may want to change this
  39. dnl LIBSYMBOL=symfony_debug # you most likely want to change this
  40. dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
  41. dnl [
  42. dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SYMFONY_DEBUG_DIR/lib, SYMFONY_DEBUG_SHARED_LIBADD)
  43. dnl AC_DEFINE(HAVE_SYMFONY_DEBUGLIB,1,[ ])
  44. dnl ],[
  45. dnl AC_MSG_ERROR([wrong symfony_debug lib version or lib not found])
  46. dnl ],[
  47. dnl -L$SYMFONY_DEBUG_DIR/lib -lm
  48. dnl ])
  49. dnl
  50. dnl PHP_SUBST(SYMFONY_DEBUG_SHARED_LIBADD)
  51. PHP_NEW_EXTENSION(symfony_debug, symfony_debug.c, $ext_shared)
  52. fi