config.m4 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. dnl $Id$
  2. dnl config.m4 for extension fcgi
  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(fcgi, for fcgi support,
  8. dnl Make sure that the comment is aligned:
  9. dnl [ --with-fcgi Include fcgi support])
  10. dnl Otherwise use enable:
  11. PHP_ARG_ENABLE(fcgi, whether to enable fcgi support,
  12. dnl Make sure that the comment is aligned:
  13. [ --enable-fcgi Enable fcgi support])
  14. if test "$PHP_FCGI" != "no"; then
  15. dnl Write more examples of tests here...
  16. dnl # --with-fcgi -> check with-path
  17. dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
  18. dnl SEARCH_FOR="/include/fcgi.h" # you most likely want to change this
  19. dnl if test -r $PHP_FCGI/$SEARCH_FOR; then # path given as parameter
  20. dnl FCGI_DIR=$PHP_FCGI
  21. dnl else # search default path list
  22. dnl AC_MSG_CHECKING([for fcgi files in default path])
  23. dnl for i in $SEARCH_PATH ; do
  24. dnl if test -r $i/$SEARCH_FOR; then
  25. dnl FCGI_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 "$FCGI_DIR"; then
  32. dnl AC_MSG_RESULT([not found])
  33. dnl AC_MSG_ERROR([Please reinstall the fcgi distribution])
  34. dnl fi
  35. dnl # --with-fcgi -> add include path
  36. dnl PHP_ADD_INCLUDE($FCGI_DIR/include)
  37. dnl # --with-fcgi -> check for lib and symbol presence
  38. dnl LIBNAME=fcgi # you may want to change this
  39. dnl LIBSYMBOL=fcgi # you most likely want to change this
  40. dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
  41. dnl [
  42. dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $FCGI_DIR/$PHP_LIBDIR, FCGI_SHARED_LIBADD)
  43. dnl AC_DEFINE(HAVE_FCGILIB,1,[ ])
  44. dnl ],[
  45. dnl AC_MSG_ERROR([wrong fcgi lib version or lib not found])
  46. dnl ],[
  47. dnl -L$FCGI_DIR/$PHP_LIBDIR -lm /usr/local/lib/libfcgi++.a /usr/local/lib/libfcgi.a
  48. dnl ])
  49. dnl
  50. dnl PHP_SUBST(FCGI_SHARED_LIBADD)
  51. PHP_NEW_EXTENSION(fcgi, fcgi.c multipart_parser.c, $ext_shared)
  52. fi