svn: /phpdoc/doc-base/trunk/ configure.php

From: Date: Mon, 25 Apr 2011 21:38:54 +0000
Subject: svn: /phpdoc/doc-base/trunk/ configure.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-8002@lists.php.net to get a copy of this message
bjori Mon, 25 Apr 2011 21:38:54 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=310479 Log: Add a new --disable-segfault switch to make it possible to automate builds Changed paths: U phpdoc/doc-base/trunk/configure.php Modified: phpdoc/doc-base/trunk/configure.php =================================================================== --- phpdoc/doc-base/trunk/configure.php 2011-04-25 20:16:39 UTC (rev 310478) +++ phpdoc/doc-base/trunk/configure.php 2011-04-25 21:38:54 UTC (rev 310479) @@ -55,6 +55,7 @@ --enable-xml-details Enable detailed XML error messages [{$acd['DETAILED_ERRORMSG']}] --enable-howto Configure the phpdoc howto, not the phpdoc docs [{$acd['HOWTO']}] --disable-segfault-error LIBXML may segfault with broken XML, use this if it does [{$acd['SEGFAULT_ERROR']}] + --disable-segfault-speed PHP (<5.3.7) will segfault during shutdown. Disabling that segfault causes performance issues. [{$acd['SEGFAULT_SPEED']}] --disable-version-files Do not merge the extension specific version.xml files --disable-libxml-check Disable the libxml 2.7.4+ requirement check --with-php=PATH Path to php CLI executable [detect] @@ -269,6 +270,7 @@ 'PARTIAL' => 'no', 'DETAILED_ERRORMSG' => 'no', 'SEGFAULT_ERROR' => 'yes', + 'SEGFAULT_SPEED' => 'yes', 'VERSION_FILES' => 'yes', 'LIBXML_CHECK' => 'yes', 'HOWTO' => 'no', @@ -371,6 +373,10 @@ $ac['SEGFAULT_ERROR'] = $v; break; + case 'segfault-speed': + $ac['SEGFAULT_SPEED'] = $v; + break; + case 'version-files': $ac['VERSION_FILES'] = $v; break; @@ -490,6 +496,12 @@ checking('libxml version'); checkvalue(LIBXML_DOTTED_VERSION); +checking('whether to enable detailed error reporting (may segfault)'); +checkvalue($ac['SEGFAULT_ERROR']); +checking('whether to optimize out the DTD (performance gain, but segfaults)'); +checkvalue($ac['SEGFAULT_SPEED']); + + // We shouldn't be globbing for this. autoconf requires you to tell it which files to use, we should do the same // Notice how doing it this way results in generating less than half as many files. $infiles = array( @@ -669,8 +681,10 @@ echo "done.\n"; printf("\nAll good. Saving %s... ", basename($ac["OUTPUT_FILENAME"])); flush(STDOUT); - $t = $dom->doctype; - $dom->removeChild($t); + if ($ac["SEGFAULT_SPEED"]) { + $t = $dom->doctype; + $dom->removeChild($t); + } $dom->save($mxml); echo "done.\n"; @@ -680,7 +694,10 @@ if (function_exists('proc_nice')) { echo " (Run nice php configure.php next time!)\n"; } - echo "Yes. I know this segfaults. Thats OK. Thats next on the fixlist\n"; + if ($ac["SEGFAULT_SPEED"] && version_compare(PHP_VERSION, "5.3.7-dev", "lt")) { + $b = basename($mxml); + echo "\n\nPHP will segfault now :) - Don't worry though, the $b has been saved :D\n"; + } exit(0); // Tell the shell that this script finished successfully. } else {

« previous php.doc.cvs (#8002) next »