锟斤拷锟节汇集锟剿达拷锟斤拷锟斤拷锟斤拷锟绞憋拷锟斤拷值某锟斤拷锟斤拷锟斤拷锟�
锟斤拷锟斤拷氚沧帮拷锟� GNU autoconf 锟斤拷锟斤拷锟斤拷锟斤拷锟脚匡拷锟皆达拷 configure.in锟斤拷锟斤拷 configure 锟脚憋拷锟斤拷锟斤拷 GIT 锟斤拷锟斤拷锟叫得碉拷源锟斤拷锟斤拷锟街灰拷锟斤拷锟竭诧拷锟侥柯硷拷锟斤拷锟斤拷锟� ./buildconf锟斤拷锟缴★拷锟斤拷同时要注锟解,锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 --enable-maintainer-mode选锟斤拷锟斤拷锟斤拷锟斤拷 configure锟斤拷锟斤拷锟斤拷使 configure.in锟侥硷拷锟斤拷锟斤拷锟剿o拷configure 锟脚憋拷也锟斤拷锟斤拷锟皆讹拷锟斤拷锟斤拷锟斤拷锟缴★拷锟斤拷锟皆碉拷锟姐发锟斤拷 configure.in锟侥硷拷锟斤拷锟斤拷锟斤拷时要确锟斤拷锟街癸拷锟斤拷锟斤拷锟斤拷锟斤拷 configure 锟脚憋拷锟斤拷锟斤拷一锟斤拷症状锟斤拷锟斤拷 configure 之锟斤拷锟斤拷锟斤拷锟斤拷锟� config.status时锟斤拷 Makefile 锟斤拷寻锟斤拷锟斤拷锟斤拷 @VARIABLE@ 锟侥讹拷锟斤拷锟斤拷锟斤拷
锟斤拷锟斤拷要锟斤拷锟斤拷 configure/setup 锟脚憋拷锟斤拷锟� Apache 源锟斤拷锟斤拷锟斤拷锟较诧拷锟侥柯嘉伙拷谩锟斤拷锟斤拷锟轿讹拷锟斤拷锟斤拷锟揭拷锟斤拷锟街革拷锟� --with-apache=/path/to/apache 锟斤拷 锟斤拷锟斤拷锟斤拷锟斤拷 --with-apache=/path/to/apache/src 锟斤拷
锟斤拷锟斤拷锟斤拷锟侥讹拷 PHP 锟斤拷 锟斤拷装说锟斤拷锟斤拷锟斤拷注锟斤拷要锟斤拷锟斤拷 PHP 锟斤拷要同时锟斤拷装 flex 锟斤拷 bison锟斤拷锟斤拷锟斤拷锟斤拷锟矫的诧拷同锟斤拷锟斤拷锟皆达拷源锟斤拷锟斤拷锟斤拷锟� bison 锟斤拷 flex锟斤拷要么通锟斤拷锟窖憋拷锟斤拷玫姆锟斤拷邪锟斤拷锟斤拷锟斤拷锟� RPM锟斤拷
锟斤拷锟斤拷通锟斤拷指锟斤拷锟斤拷锟接碉拷选锟斤拷锟斤拷 configure 锟脚憋拷锟节非憋拷准锟斤拷路锟斤拷锟斤拷寻锟斤拷头锟侥硷拷锟酵库并锟斤拷锟捷革拷 C 预锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟界:
CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure
env CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure
锟斤拷要锟斤拷锟斤拷 Bison 锟侥版本锟斤拷锟斤拷锟铰版本锟斤拷 » http://www.gnu.org/software/bison/bison.html锟斤拷
一些锟缴版本锟斤拷 make 没锟斤拷锟斤拷确锟斤拷 functions 目录锟铰憋拷锟斤拷锟斤拷锟侥硷拷锟脚碉拷同一锟斤拷目录锟铰★拷锟斤拷锟斤拷锟斤拷锟斤拷 cp *.o functions然锟斤拷锟斤拷锟斤拷锟斤拷 make锟斤拷锟斤拷锟斤拷没锟斤拷什么锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷晒锟斤拷耍锟斤拷锟斤拷锟饺肥碉拷锟揭拷锟斤拷碌锟斤拷锟斤拷掳锟斤拷 GNU make锟斤拷
锟斤拷锟斤拷锟斤拷锟接碉拷锟斤拷一锟斤拷锟斤拷锟筋,确锟斤拷锟斤拷锟斤拷锟绞碉拷锟侥库都锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷恕锟酵拷锟斤拷锟斤拷锟铰╋拷锟斤拷锟�"-ldl"锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷魏锟斤拷锟斤拷菘锟街э拷锟斤拷锟斤拷锟揭拷目狻�
一些锟斤拷也锟斤拷锟斤拷说锟节猴拷 Apache 锟斤拷锟斤拷时锟斤拷锟角诧拷锟矫诧拷锟斤拷锟斤拷锟斤拷 libphp4.a之锟斤拷锟斤拷锟�"-ldl"锟斤拷
锟斤拷锟斤拷实锟杰简单★拷小锟侥碉拷锟斤拷锟斤拷锟斤拷锟铰诧拷锟斤拷锟斤拷锟斤拷
注锟解:也锟斤拷锟斤拷锟斤拷锟铰碉拷 Apache ./configure锟脚憋拷锟斤拷锟轿硷拷 Apache 锟斤拷锟叫帮拷锟斤拷 README.configure锟侥硷拷锟叫碉拷说锟斤拷锟斤拷也锟斤拷锟斤拷 PHP 锟斤拷锟叫帮拷锟叫碉拷 INSTALL锟侥硷拷锟斤拷
锟斤拷说锟斤拷 PHP 模锟斤拷锟斤拷锟侥承┰拷锟矫伙拷斜锟斤拷锟斤拷谩锟斤拷锟窖帮拷锟斤拷锟斤拷锟斤拷锟角帮拷燃锟斤拷锟斤拷锟斤拷锟铰o拷
注锟斤拷 libphp4.a锟侥硷拷锟斤拷锟斤拷锟酵诧拷锟矫达拷锟节o拷apache 锟斤拷锟教斤拷锟斤拷锟斤拷锟斤拷锟斤拷
锟斤拷锟斤拷一锟斤拷 Apache 锟襟报的达拷锟斤拷锟斤拷息锟斤拷锟斤拷锟铰的版本锟斤拷锟窖撅拷锟斤拷锟斤拷锟剿★拷
锟斤拷锟斤拷要锟斤拷锟斤拷锟斤拷锟斤拷隆锟斤拷锟斤拷龋锟斤拷锟斤拷锟侥承┰拷锟� Apache 锟斤拷锟斤拷 apxs Perl 锟脚憋拷时锟斤拷锟斤拷时没锟斤拷锟斤拷确锟侥憋拷锟斤拷捅锟角憋拷锟斤拷锟酵斤拷锟斤拷锟剿★拷锟揭碉拷锟斤拷锟� apxs 锟脚憋拷锟斤拷锟斤拷锟斤拷锟斤拷 which apxs锟斤拷锟斤拷锟斤拷时锟斤拷锟斤拷 /usr/local/apache/bin/apxs锟斤拷锟斤拷 /usr/sbin/apxs锟斤拷锟津开诧拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷碌锟斤拷校锟�
my $CFG_CFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl my $CFG_LD_SHLIB = ' '; # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl
my $CFG_CFLAGS_SHLIB = '-fpic -DSHARED_MODULE'; # substituted via Makefile.tmpl my $CFG_LD_SHLIB = 'gcc'; # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = q(-shared); # substituted via Makefile.tmpl
my $CFG_LIBEXECDIR = 'modules'; # substituted via APACI install
my $CFG_LIBEXECDIR = '/usr/lib/apache'; # substituted via APACI install
锟斤拷锟� make时锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟解:
microtime.c: In function `php_if_getrusage': microtime.c:94: storage size of `usg' isn't known microtime.c:97: `RUSAGE_SELF' undeclared (first use in this function) microtime.c:97: (Each undeclared identifier is reported only once microtime.c:97: for each function it appears in.) microtime.c:103: `RUSAGE_CHILDREN' undeclared (first use in this function) make[3]: *** [microtime.lo] Error 1 make[3]: Leaving directory `/home/master/php-4.0.1/ext/standard' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/master/php-4.0.1/ext/standard' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/master/php-4.0.1/ext' make: *** [all-recursive] Error 1
锟斤拷锟较低筹拷锟斤拷恕锟斤拷锟斤拷锟揭拷锟阶耙伙拷锟斤拷锟斤拷锟斤拷锟斤拷 glibc 锟斤拷 glibc-devel 锟斤拷锟斤拷锟睫革拷 /usr/include锟叫碉拷锟侥硷拷锟斤拷锟斤拷锟� PHP 锟斤拷锟斤拷没锟斤拷锟轿何癸拷系锟斤拷要证实锟斤拷一锟姐,锟斤拷锟斤拷锟斤拷锟斤拷虻サ牟锟斤拷裕锟�
$ cat >test.c <<X #include <sys/resource.h> X $ gcc -E test.c >/dev/null
锟斤拷锟饺o拷锟斤拷锟斤拷锟斤拷要锟斤拷识锟斤拷锟斤拷只锟角革拷 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷息通锟斤拷锟斤拷锟斤拷 make锟斤拷锟斤拷锟斤拷锟斤拷锟侥o拷锟斤拷锟皆匡拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷锟襟,碉拷实锟斤拷锟较诧拷锟角★拷锟斤拷然锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷贸锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟较⑹蓖V癸拷锟斤拷锟斤拷锟揭诧拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街碉拷锟揭伙拷锟斤拷锟角o拷MySQL 锟斤拷支锟斤拷锟斤拷默锟较打开的★拷
Note:
锟斤拷 PHP 4.3.2 锟斤拷锟姐将锟节憋拷锟诫(make锟斤拷锟斤拷锟斤拷锟襟看碉拷锟斤拷锟斤拷锟斤拷锟斤拷郑锟�
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).
要么锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟诫当前锟斤拷 PHP 锟斤拷源锟斤拷锟斤拷锟叫查看 config.nice 锟侥硷拷锟斤拷锟斤拷锟矫伙拷校锟街灰拷锟斤拷写私疟锟斤拷锟�
<?php phpinfo(); ?>
确锟斤拷锟斤拷锟� GD 锟斤拷锟� PHP 锟斤拷锟斤拷锟斤拷时使锟斤拷锟斤拷锟斤拷同锟斤拷锟斤拷支锟街库(锟斤拷锟斤拷 libpng锟斤拷锟斤拷
锟斤拷锟斤拷锟斤拷 PHP 时使锟矫凤拷 GNU 锟侥癸拷锟竭会导锟斤拷锟斤拷锟解。确锟斤拷使锟斤拷 GNU 锟斤拷锟斤拷锟斤拷确锟斤拷锟杰癸拷锟斤拷确锟斤拷锟斤拷 PHP锟斤拷锟斤拷锟界,锟斤拷 Solaris 锟斤拷锟芥不锟斤拷使锟斤拷 SunOS BSD 锟斤拷锟捷伙拷锟斤拷 Solaris 锟芥本锟斤拷 sed锟斤拷锟斤拷锟叫o拷锟斤拷锟斤拷使锟斤拷 GNU 锟斤拷锟斤拷 Sun POSIX (xpg4) 锟芥本锟斤拷 sed锟酵匡拷锟皆★拷锟斤拷锟斤拷锟斤拷樱锟� » GNU sed锟斤拷 » GNU flex锟斤拷 » GNU bison锟斤拷