Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34837 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57436 invoked by uid 1010); 21 Jan 2008 11:06:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 57420 invoked from network); 21 Jan 2008 11:06:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jan 2008 11:06:22 -0000 Authentication-Results: pb1.pair.com header.from=lucas@facebook.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lnealan@facebook.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain facebook.com designates 204.15.23.140 as permitted sender) X-PHP-List-Original-Sender: lnealan@facebook.com X-Host-Fingerprint: 204.15.23.140 fw-sf2p.facebook.com Windows 2000 SP4, XP SP1 Received: from [204.15.23.140] ([204.15.23.140:55800] helo=SF2PMXF01.TheFacebook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/04-23010-BAC74974 for ; Mon, 21 Jan 2008 06:06:21 -0500 Received: from SF2PMXB01.TheFacebook.com ([192.168.16.15]) by SF2PMXF01.TheFacebook.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 21 Jan 2008 03:07:07 -0800 Received: from 10.8.254.247 ([10.8.254.247]) by SF2PMXB01.TheFacebook.com ([192.168.16.15]) via Exchange Front-End Server mail.thefacebook.com ([192.168.16.11]) with Microsoft Exchange Server HTTP-DAV ; Mon, 21 Jan 2008 11:07:06 +0000 User-Agent: Microsoft-Entourage/11.2.5.060620 Date: Mon, 21 Jan 2008 03:06:03 -0800 To: CC: Message-ID: Thread-Topic: [DIFF] phpize won't work on extensions without config.m4 Thread-Index: AchcHZyHRhgCF42vPUCqnkkT/4sDdQ== Reply-to: lucas@facebook.com Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 21 Jan 2008 11:07:07.0382 (UTC) FILETIME=[C2E78960:01C85C1D] Subject: [DIFF] phpize won't work on extensions without config.m4 From: lucas@facebook.com (Lucas Nealan) I found out the hard way that phpize won't build some extensions like ext/openssl because they have no config.m4, only a config0.m4. I could not find a reason why this shouldn't work and propose the patch below for phpize to support config0.m4 as well as config9.m4. This will generate a standalone extension configure with all the same extension options as a static builds. If extensions expressly rely on the fact that phpize doesn't support these then we have a problem. I could not find any historical discussion on the topic. With this patch the following standard extensions can now be build via phpize which couldn't before: ext/libxml ext/openssl ext/pcre ext/zlib -lucas Index: phpize.in =================================================================== RCS file: /repository/php-src/scripts/phpize.in,v retrieving revision 1.28.2.3.2.1 diff -u -r1.28.2.3.2.1 phpize.in --- phpize.in 29 Jun 2007 01:10:35 -0000 1.28.2.3.2.1 +++ phpize.in 21 Jan 2008 10:40:52 -0000 @@ -28,7 +28,7 @@ clean=" --clean" fi - echo "Cannot find config.m4. " + echo "Cannot find a config.m4." echo "Make sure that you run '$0$clean' in the top level source directory of the module" echo } @@ -47,8 +47,8 @@ phpize_check_configm4() { - if test ! -r config.m4; then - phpize_no_configm4 $@ + if test ! -r config.m4 && test ! -r config0.m4 && test ! -r config9.m4; then + phpize_no_configm4 $@ exit 1 fi Index: phpize.m4 =================================================================== RCS file: /repository/php-src/scripts/phpize.m4,v retrieving revision 1.17.2.3.2.5 diff -u -r1.17.2.3.2.5 phpize.m4 --- phpize.m4 14 Aug 2007 08:43:41 -0000 1.17.2.3.2.5 +++ phpize.m4 21 Jan 2008 10:40:52 -0000 @@ -3,7 +3,7 @@ divert(1) AC_PREREQ(2.13) -AC_INIT(config.m4) +AC_INIT(configure.in) PHP_CONFIG_NICE(config.nice) @@ -65,7 +65,9 @@ PHP_PROG_RE2C PHP_PROG_AWK +sinclude(config0.m4) sinclude(config.m4) +sinclude(config9.m4) enable_static=no enable_shared=yes