1、找到PHP扩展脚本ext_skel,ext_skel是PHP源代码中的脚本工具,位于目录ext下
find / -name ext_skel
2、 生成名字为helloworld的目录,该目录包含所需的文件
./ext_skel --extname=helloworld
# cd helloworld/
# ls
config.m4 config.w32 CREDITS EXPERIMENTAL helloworld.c
helloworld.php php_helloworld.h tests
3、修改config.m4
//修改
dnl PHP_ARG_WITH(helloworld, for helloworld support,
dnl Make sure that the comment is aligned:
dnl [ --with-helloworld Include helloworld support])
//为
PHP_ARG_WITH(helloworld, for helloworld support,
[ --with-helloworld Include helloworld support])
//dnl 代表注释,下边 –enable-