[PHP] PHP Extension开发 Unix Build System配置 conf →→→→→进入此内容的聊天室

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

回复 "PHP Extension开发 Unix Build System配置 conf"

这儿你可以回复上面这条便签

captcha