Index: ossp-pkg/eperl/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/eperl/ChangeLog,v co -q -kk -p'1.10' '/v/ossp/cvs/ossp-pkg/eperl/ChangeLog,v' | diff -u /dev/null - -L'ossp-pkg/eperl/ChangeLog' 2>/dev/null --- ossp-pkg/eperl/ChangeLog +++ - 2024-04-28 17:27:19.153784953 +0200 @@ -0,0 +1,992 @@ + ____ _ + ___| _ \ ___ _ __| | + / _ \ |_) / _ \ '__| | + | __/ __/ __/ | | | + \___|_| \___|_| |_| + + ePerl -- Embedded Perl 5 Language + + ChangeLog + ========= + + Changes between 2.2.14 and 2.3.0 + -------------------------------- + + 20000703 o upgraded to new GNU shtool 1.5.0 + 20000501 o upgraded to new GNU shtool 1.4.9 + 970811 o Fixed stringEQn() defines in eperl_global.h + 971004 o Fixed platform conflicts of strndup() & Co functions. + 990503 o Imported source into CVS repository + o Upgraded to Autoconf 2.14 + o Merged ChangeLog.* files into ChangeLog + o Replaced lots of etc/* stuff with new shtool + o Fixed a few compiler warnings + 990507 o Bugfix for mysetenv() function [Thanks to Denis Barbier + for patch] + 990518 o Y2K fix [Thanks to Denis Barbier + for patch] + 990612 o upgraded to new shtool 1.3.0 + + Changes between 2.2.13 and 2.2.14 + --------------------------------- + [Bugfixes only] + + 970727 o Fixed HTTP header parsing: Now beside the header/body + delimiter "\n\n" also "\r\n\r\n" is recogized correctly. This + fixes especially the communication between CGI.pm and ePerl. + [Thanks to Steve Dodd for hints and initial + patches] + o Fixed examples in Apache::ePerl manual + [Thanks to Ian Wojtowicz for hints] + o Fixed recognization of CGI situation where GET is used + instead of POST to send data to ePerl scripts. [Thanks to Steve + Dodd for hint] + o Added a CREDITS file to give explicit credits to the + people who contributed stuff in the past + 970802 o Replaced build user/host/domain/time determination stuff with a new + `buildinfo' script I've written for Apache which is more robust. + o Replaced mkinstalldirs and install-sh with the cleaned up + versions I've done for Apache 1.3's APACI stuff. + o Ported to Perl 5.005 where variables start with PL_, etc. + + Changes between 2.2.12 and 2.2.13 + --------------------------------- + [Security and Bug Fixes] + + 980120 o Fixed construction of URLs inside Apache::ePerl for + cases where the server port is not 80. [Thanks to Jim + O'Quinn for hint] + 980202 o Changed .so generation to be more compatible + 980404 o Made etc/newvers more portable + 980605 o Fix a minor comparison bug in Apache::ePerl + [Thanks to Eric Howe for hint] + 980705 o Fixed copyright statements by adding 1998 and + removing the "All Rights Reserved" part because + this is incompatible with the GPL. + 980710 o Fix again a non-trivial-to-fix security bug related to the + inconsitency way webservers handle QUERY_STRINGs: this time by + making more exact parameter comparison. Now we check + back even the argv[optind] against the provided + QUERY_STRING, etc. Now the determination of the three + runtime modes (CGI, NPH-CGI, FILTER) should be + correct. [Thanks to Tiago Luz Pinto + who reported this security hole on + bugtraq] + + Changes between 2.2.11 and 2.2.12 + --------------------------------- + [Bugfix only] + + 971231 o ARGL! We really need 1998 now: Yesterday + I've released 2.2.11 with two nasty syntax errors in + the configure script. Hmmmmm... 1998 is now really + needed, I think. [Thanks to Anthony Fok + and ??? + for quick response and patch] + + Changes between 2.2.10 and 2.2.11 + --------------------------------- + [Bugfix only] + + 971230 o Activated Perl Locale support for both Perl 5.003 + and Perl 5.004 variants. + o Fixed owner determination in eperl_main.c: ePerl core + dumped when the owner of the script does not exists in + the passwd database. + o Updated contrib/pkg/ files + o Updated VERSIONS file + + Changes between 2.2.9 and 2.2.10 + -------------------------------- + [Bugfix only] + + 971228 o little distribution bug: the asc2c was not run before + the 2.2.9 release, so it has to be run by the builder + which is not what was intended. + + Changes between 2.2.8 and 2.2.9 + ------------------------------- + [Bugfix only] + + 971120 o fixed demo.image.phtml description + 971221 o fixed a really nasty fclose() bug in eperl_main.c + which caused core dumps under Debian GNU/Linux with + libc6. [Thanks to and Anthony Fok + for hints] + + Changes between 2.2.7 and 2.2.8 + ------------------------------- + [Bugfix and Minor Enhancement] + + 971107 o ported to AIX 4.1.x by adding a fix for Perl's ccdlflags + 971108 o again made Apache::ePerl even more complete: added the + following env variables similar to nph-eperl: + SCRIPT_SRC_URL, SCRIPT_SRC_URL_DIR, + SCRIPT_SRC_URL_FILE, SCRIPT_SRC_PATH, + SCRIPT_SRC_PATH_DIR, SCRIPT_SRC_PATH_FILE, + SCRIPT_SRC_MODIFIED, SCRIPT_SRC_MODIFIED_CTIME, + SCRIPT_SRC_MODIFIED_ISOTIME, SCRIPT_SRC_SIZE, + SCRIPT_SRC_OWNER + o enhanced the Apache::ePerl status page: now displays + also the cache size + 971116 o fixed shebang mode for webserver environment. [Thanks + to J. Douglas Dunlop for hint] + o added hint to INSTALL file that PerlIO+SfIO is currently + not supported. + o fixed HTTP header parsing: now setting of cookies + (e.g. via Perl's CGI module) work correctly. + o fixed HTTP header parsing in Apache::ePerl. Now even + the special-case "Content-type: ..." works as expected. + 971117 o fixed typos in eperl.pod + o fixed preprocessing for Apache::ePerl + o overhauled the demo webpages under eg/. Now the + CGI::Cookie is used an example for CGI.pm. + o adjusted VERSIONS file + + Changes between 2.2.6 and 2.2.7 + ------------------------------- + [Bugfix and Minor Enhancement] + + 971102 o reduced memory consumption of Apache::ePerl by + specificing detailed import flags + o fixed prototype bug in Parse::ePerl's XS part + [Thanks to Doug MacEachern for patch] + o removed the not needed AUTOLOAD facility from + Parse::ePerl because this causes problems. + [Thanks to Doug MacEachern for hint] + 971104 o added VERSION_LANGUAGE and VERSION_INTERPRETER + environment variables to Apache::ePerl the same way it is provides + by the stand-alone program. + 971105 o adjusted the URL to the Perl homepage in the PODs. + o fixed Content-length header generation in Apache::ePerl + o minor cleanup to Parse::ePerl + 971106 o added workarounds to Parse::ePerl for tainted environments + like the "PerlTaintCheck On" under Apache/mod_perl where + Parse::ePerl is called from Apache::ePerl. + o made the Apache::ePerl error page similar to the one nph-eperl + displays. + + Changes between 2.2.5 and 2.2.6 + ------------------------------- + [Bugfix and Minor Enhancement] + + 970903 o merged ANNOUNCE and ANNOUNCE.ADDR files + o slightly fixed comments in eperl_getopt.[ch] + 970911 o added mod/README with CPAN module snipppet + o changed the $VERSION variables to hold a real floating + point number like 2.0206 instead of 2.2.6 + o updated contrib/pkg/fbsdpkg/ stuff + o fixed a bug in the preprocessor: filedescriptors were + not closed for #include directive [Thanks to + mhalperi@bbnplanet.com for patch] + 971024 o fixed configure's Perl version check because of Perl + 5.004_04's changed -v output. + o added Apache->request($r) to Apache::ePerl for + Apache::Registry modules like new CGI.pm under mod_perl-1.02. + o updated PORTING file + o added GNU long options + o changed -i (nocase on delimiters) to -n + o cleaned up source by sorted options + o now the usage is only displayed on -h/--help + o now the copyright and disclaimer is displayed on -V, too. + o now configure removes -D_POSIX_SOURCE from Perl's + ccflags under IRIX 5.3 because this causes problems with strdup. + o now configure explicitly removed newlines at the end + of the determined hostname/domainname pair because these + would lead to a failure for GNU autoconfs final sed-part. + [Thanks to for bug report] + o added another -f test inside configure when trying + to find a perl binary because when /tmp/perl is + a directory -x alone fails. + o added eperl_config.[ch] and moved some code from + eperl_global to this file. + o added test for strdup() to configure and a private + replacement version to eperl_config.c (from FreeBSD 2.2) + because Ultrix is missing strdup(). + [Thanks to Joerg Lenneis for hint] + o now the XS-Init function in eperl_perl5.c has a variable + list of newXS() calls which come from the new + eperl_perl5_sm.h file which itself is generated by + eperl_perl5_sm.pl. This way we're now really able to + use static module when no DynaLoader is available. + [Thanks to Joerg Lenneis for hint] + 971027 o fixed also PORTING.test for new "perl -v" output + o changed "prefix" stuff in Makefile.in to make the + life of our Debian friends a little bit easier... ;_) + o added Debian stuff to contrib/pkg/dpkg/ + o added workaround in aclocal.m4 for SunOS's braindead "date" + o sucessfully run PORTING.test on platforms found in PORTING + + Changes between 2.2.4 and 2.2.5 + ------------------------------- + [Bugfix and Minor Enhancement] + + 970902 o fixed error catching for Parse::ePerl::Precompile. + [Thanks to Joseph W. Norton for hint] + 970903 o added better support for PerlIO/StdIO. The combination + PerlIO/SfIO is currently untested and may be broken because + the I/O redirection for SfIO is very different from StdIO. + o added Perl I/O layer info to eperl -V + o added built time/user info to configure and eperl -V + + Changes between 2.2.3 and 2.2.4 + ------------------------------- + [Bugfix and Major Enhancement] + + 970901 o added more hints to PORTING file + o fixed a bug in Parse::ePerl for case where $error was undefined + [Thanks to Joseph W. Norton for patch] + o fixed -I option: now it works as expected even for + cases where you want to add stuff to @INC which is + needed at _parse_ time. + o now the webmaster can configure the delimiters and other stuff via + Apache::ePerl::Config hash from within ... sections in + Apache. An example is added to the synopsis of Apache::ePerl + manpage. + + Changes between 2.2.2 and 2.2.3 + ------------------------------- + [Security Bugfix and Minor Enhancement] + + 970821 o fixed installation section in Apache::ePerl manpage + o ***** SECURITY BUGFIX ***** + ePerl versions <= 2.2.2 have a heavy security hole when running + under a webserver's CGI/1.1 interface. Because ePerl assumed here + there are not command line arguments. THIS IS WRONG! According to + the CGI/1.1 spec when an ISINDEX document is used (QUERY_STRING!) + the query is provided on the command line by the webserver. So, + when only one query existed, there was exactly one command line + argument and ePerl switched to stand-alone runtime mode and all + CGI-mode restrictions are falling down!! + ***** SECURITY BUGFIX ***** + [Thanks to Andrew Pimlott for + finding this security bug!] + o now a chdir is done before the preprocessor is run so relative + paths in #include directives work as expected. [Thanks to Marc + Singer for patch] + + Changes between 2.2.1 and 2.2.2 + ------------------------------- + [Bugfix and Porting Enhancement] + + 970804 o removed bad demo.errsync.phtml + 970806 o fixed a few spaces in Makefile.in + 970807 o removed wrong $AUTOLOAD from Apache::ePerl + o fixed a few other things in Apache::ePerl and Parse::ePerl + o added 2.2.1 to VERSIONS file + o moved the place of the release macros in Makefile.in + before any targets because some braindead Make variants + don't like it in the middle of targets. + o added a new test 09-dynaloader.t for testing if + dynamic loading works correctly. + o added error capturing for Parse::ePerl::Evaluate via __DIE__ hook. + o fixed the PODs + o moved -lperl at linking after DynaLoader + 970808 o fixed configure help string for --with-perl=PATH + o added missing .eperl extension in eperl_security.h + [Thanks to Heiko Schlittermann for hint] + o added more stuff to INSTALL.APACHE + 970811 o fixed wrong coding in setuid check + [Thanks to SONE Takeshi for patch] + + Changes between 2.2.0 and 2.2.1 + ------------------------------- + [Bugfix and Enhancement] + + 970721 o fixed eg/demo.net.phtml + 970727 o optimized the Perl 5 internal stuff in eperl_eperl5.c + [Thanks to Doug McEachern for patches] + o added support for Cwd parameter to Parse::ePerl::Precompile and use + this also in Apache::ePerl when precompiling. + [Thanks to Michael Lazar for idea] + o added support for quotation marks and angle brackets in #include + and #sinclude directives: these are just skipped. + [Thanks to Karl Wallner for idea] + o now DOCUMENT_ROOT is automatically added to @INC in CGI modes. + [Thanks to Karl Wallner for idea] + o now Apache::ePerl always uses option "ConvertEntities=1" when + calling Parse::ePerl::Translate. + [Thanks to Mike Pheasant for hint] + o fixed demos for strict variables and added both .phtml + and .iphtml files (same contents!) for easier testing + with both nph-eperl and Apache::ePerl. + o added support for generated custom HTTP headers + to Apache::ePerl. + 970801 o added "/eperl" to $libdir for installation + o now "make install" installs the demo pages into $libdir/eg + o added PORTING.test script for making porting tests easier + o changed test for Perl in configure from "test -f" to "test -x" + o fixed the examples again. + o fixed a few things in eperl.pod + 970802 o enhanced the overwriting of the perl and cc programs + for the build process. See INSTALL for more details. + o enhanced PORTING.test to be able to set perl and cc. + o added overview to INSTALL + + Changes between 2.2b9 and 2.2.0 + ------------------------------- + [Bugfix only] + + 970706 o added missing eperl_getopt.h include + for eperl_main.c which caused the compilation + at least under SunOS 4.x to fail. + o added more descriptive error message + to configure when Perl version is to old + o added hint to INSTALL that the same + environment have to be used for compiling + ePerl as for Perl. + 970709 o added klduge to support Perl+SFIO where + fwrite has to be replaced by PerlIO_write + o enabled ``CC=/path/to/cc ./configure'' again + for cases where one wants to overwrite the + used C compiler. + 970714 o removed some unused defines in eperl_global.h + which lead to problems under AIX 4.1.4 + o removed the P_ macros in eperl_proto.h because + AIX 4.1.4 is not happy about it because of + PrintError defines which has "...". Should + be ok without P_ because we need an ANSI + compiler since the first days. + 970715 o changed Perl requirement from 5.00390 to 5.00325 + 970718 o added ANNOUNCE.ADDR file + o updated NEWS file and updated ANNOUNCE file + o updated VERSIONS file + o slightly adjusted NEWS file + o created contrib/utils/00README file + o added the package files to contrib/pkg/ + o updated the demo files + + Changes between 2.2b8 and 2.2b9 + ------------------------------- + + 970623 o added docs about #elsif to eperl.pod and NEWS file + 970628 o added VERSIONS file with ePerl history + o shit happens: the preprocessor parsing had + nasty bugs where a string "#include" somewhere + in the text leads to a total skip of all + real "^#include" directives :-( + + Changes between 2.2b7 and 2.2b8 + ------------------------------- + + 970615 o added hint about Options +ExecCGI + to mod/Apache/ePerl.pm + o split the ChangeLog file into seperated files + o added old stuff from 2.1.2 to end of NEWS file + o created a KNOWN.BUGS file + o created a INSTALL.NSAPI + o slightly fixed the POD in mod/Apache/ePerl.pm + o created a new set of demo files in eg/ + o fixed some README headers + 970620 o created a contrib/ dir and initially + started to write a shtml2phtml script + which converts (X)SSI to ePerl + o fixed tabs in top-level Makefile + 970622 o changed red colors to blue ones in error page + o added the new powered-by-ePerl image + which can be retrieved via URL nph-eperl/powered.gif + o added del2del script to contrib/ + o added a #elsif to the preprocessor + + Changes between 2.2b6 and 2.2b7 + ------------------------------- + + 970602 o now etc/newvers always removes /tmp/genopt + [Thanks to Phil Ritzenthaler + for hint] + o now configure determines the full + operating system id from Perl's Config.pm + 970604 o set -Wl,-woff 85 only for IRIX 6.x because + IRIX 5.x hates this option.. + [Thanks to Ewan McPhail and + Phil Ritzenthaler for hint] + o fixed the preprocessor: the inital searching + of the directives was broken, only worked + when a specific order was used. So some + directives were skipped :-( + o added a #sinclude (secure include) directive + which is the same as #include but removes + all begin and end delimiters, so this one + is a secure way of including stuff from + foreign servers. + o rewritten the preprocessor part of eperl.pod + + Changes between 2.2b5 and 2.2b6 + ------------------------------- + + 970601 o added a #c preprocessor directive + to be able to comment out stuff + (even to use "#c #include..." to + disable an include directive) + [Thanks to J. Douglas Dunlop for hint] + o now the preprocessor checks the + HTTP response code when http://.. + is uses as the file: + - when 301 and 302 are returned + it searches for the new URL in the Location-header + and restarts with this one + - when a response code other + than 200 (OK) is returned it fails the same way + as it fails when a local file it not found: + with an error. + [Thanks to J. Douglas Dunlop for hint] + o removed the Bash check in configure + because this it not used + + Changes between 2.2b4 and 2.2b5 + ------------------------------- + + 970530 o fixed perlvers -> perl_vers stuff + o fixed again problem with VERSION stuff: + ePerl.pm's were broken (ARGL!) + + Changes between 2.2b3 and 2.2b4 + ------------------------------- + + 970529 o fixed preprocessor: #include only + valid at column 0, i.e. at start of line + o added a test 08 for the preprocessor + o now any characters are skipped at end + of #include lines up to the newline + o added new parsing feature: + "_" as the last non-whitespace command disables the automatic + adding of the final semicolon. This is to be able to writeo + <: if { :> ... <: } :> etc. + o added new optional(!) parsing feature + which is per-default disabled(!): "\" directly before a newline + character outside ePerl blocks prevent the newline to be printed, + i.e. the line is continued in the output + This feature can be turned on via new option -L. + o added new parsing feature: + when an end delimiter is directly followed by ``//'' + this discards all data up to and including the following + newline. + o added three new commands to preprocessor + which gets converted to ePerl blocks: + ``#if expr'' -> ``<: if (expr) { _:>//' + ``#else'' -> ``<: } else { _:>//'' + ``#endif'' -> ``<: } _:>//'' + o imported the patch from ePerl 2.1.2 which + fixes a problem under non-GCC compilers + with a semicolon in eperl_security.h + o removed the sin_len stuff + 970530 o !! Essential Change !! + configure now imports all essential compilation + flags from Perl's Config.pm, including the compiler. + This is necessary to make ePerl work even under + HP-UX and IRIX where they need the special compiler + and special compiler flags. The point is that + Perl already determined the correct flags, so + we can use it. + o changed C++ style comments in + eperl_parse.c to C style + o fixed a missing "int" in eperl_sys.c + o renamed eperl_getopt.c to original + eperl_egetopt.c and make the namespace + clean, i.e. renamed optXXX to egetopt_optXXX. + This is needed at least for IRIX + o changes egetopt() slightly + o replaced the old egetopt() by the GNU getopt() + because egetopt() was broken under some + systems like IRIX. + o option -h now never displays the version + o added a missing semicolon in mod/Parse/ePerl.pm + o renamed and fixed mod/Parse/t/04_compile.t + o now etc/newvers resets the LANG variable + to prevent LOCALE warnings + o provided an own copy of perl_eval_pv() which + is too new. It was introduced in Perl 5.003_97e. + Now plain old Perl 5.003 will work again. + o the Perl 5 interface modules can only be + used with Perl 5.003_90 or higher because + of the TIEHANDLE stuff which is not working + in prior releases. + o fixed update-version target in Makefile.i + + Changes between 2.2b2 and 2.2b3 + ------------------------------- + + 970521 o fixed NEWS and ANNOUNCE files o spellchecked + INSTALL, INSTALL.APACHE and eperl.pod + 970522 o fixed eperl.pod =back stuff and added a paragraph + about software leverage. + 970523 o added reference for Parse::ePerl and Apache::ePerl + to eperl.pod + o changed abstract in all source files + 970525 o ** added new option -P for an own #include preprocessor. ** + o added new option -I: same as for "perl" to + add directories to @INC and preprocessor + 970526 o ** added support for URLs to #include ** + o added a kludge to etc/newvers for systems + like BSDI where no "getopt" program is available + 970527 o added Parse::ePerl::Preprocess which is the + interface to the new preprocessor + o added six new environment variables: + SCRIPT_SRC_PATH, SCRIPT_SRC_PATH_DIR and SCRIPT_SRC_PATH_FILE + SCRIPT_SRC_URL, SCRIPT_SRC_URL_DIR and SCRIPT_SRC_URL_FILE + o fixed a long-standing bug: temporary files were + not removed :-( + o added new option -C for HTML entity conversions + inside ePerl blocks. This is for people who + use HTML editors which have now knowledge of ePerl code. + 970529 o slightly fixed eperl.pod at some places + + Changes between 2.2b1 and 2.2b2 + ------------------------------- + + 970518 o fixed ``make install UNINST=1'' case + for Makefile.PL + 970520 o added more POD to Apache::ePerl + + Changes between 2.2a2 and 2.2b1 + ------------------------------- + + 970505 o again reorganized the source + code and renamed a lot of + functions. + o created modules/ with h2xs + for a Parse::ePerl module + o created generation of libeperl.a + containing shared objects for + Parse::ePerl + 970506 o created a top-level Makefile.PL + for faking a MakeMaker distribution + 970509 o created a Apache::ePerl module + 970510 o added option -i for making the + delimiters case-sensitive in more + explicit way + 970511 o added t/05* to Parse::ePerl + and made delimiter case variable + 970513 o enhanced Parse::ePerl and + finished Apache::ePerl + 970515 o fixed tests 4 and 5 for non-Bash users + and fixed a char/int problem in eperl_main.c + and eperl_sys.c + [Thanks to Jarom Smith ] + 970516 o finished Apache::ePerl and Parse::ePerl + 970517 o added a INSTALL.APACHE which describes the + installation of ePerl as an SSSL under Apache + + Changes between 2.2a1 and 2.2a2 + ------------------------------- + + 970504 o removed -s and added -m 755 + to install in configure + o optimized the parser; no + ``print "";'' constructs are + never created which at least slightly + speeds up processing. + + Changes between 2.2a0 and 2.2a1 + ------------------------------- + + 970503 o now the begin and end delimiters are searched + case-insensitive. + o added -h for displaying the usage list. + Just to be consequent with options. + o added leading and trailing whitespaces + for Perl blocks when translating the source file + to make the -x display more readable. + + Changes between 2.1.1 and 2.2a0 + ------------------------------- + + 970502 o added support for '=' prefix: now <:= ... :> + automatically gets converted to "print ...". Now one + can interpolate variables in a more shorter way via + instead of the long (in conjunction with the next + enhancements) + o now ePerl is much smarter when converting the ePerl + blocks, i.e. it now recognizes final semicolons and + automatically puts one if missing. Now <: cmd;cmd :> + is also valid. + o Whitespaces are not only stripped + from the beginning of a ePerl block. Now + they are stripped from the end, too. + o !!CHANGED THE PARSING AGAIN!! + Now again (as in 2.0.3) ePerl block end delimiters are + found via plain forward search. No quoted strings are + recognized. The reason is that constructs with odd + number of quoting characters are more often seen than + end delimiters in quoted string. And one more fact: It + is easier to escape the end delimiter in a quotes + string (e.g. via backslahes) than to rewrite a + complex construct (e.g. m|"[^"]+"| !!). + o added -T (Tainting) and -w (Warnings) options + which can be used like the same in "perl". + o added alpha and snap releases to NEWVERS + + Changes between 2.1.1 and 2.1.2 + ------------------------------- + + 970529 o fixed a typo in eperl_security.h + which caused problems for non GCC + compilers, e.g. under IRIX. + [Thanks to Ewan McPhail + for hint] + + Changes between 2.1.0 and 2.1.1 + ------------------------------- + + 970501 o added -P option to etc/newsvers + o removed \n at SCRIPT_.._CTIME + 970502 o replaced the $| = 1 stuff in eperl_perl5.c to the way + mod_perl does it + [Thanks to Doug MacEachern for patch] + o enhanced the SetUID-based UID/GID checking: now in + eperl_global.h is an option DO_ON_FAILED_STEP which + either forces ePerl to error on any failed checks or go + on but finally don't do the UID/GID switching + o moved the security definitions from eperl_global.h to + a new eperl_security.h and changed the references in + eperl.pod + + Changes between 2.1b8 and 2.1.0 + ------------------------------- + + 970426 o removed more obsolete @logfile@ stuff + o again revised eperl.pod + o !! CHANGED LICENSE !! + NOW ePerl IS DISTRIBUTED AT THE TERMS + OF EITHER THE GPL OR THE ARTISTIC LICENSE + LIKE THE Perl 5.0 INTERPRETER ITSELF + o fixed /tmp/x usage in configure + o created PORTING file + o tested ePerl on various platforms + o made seteuid/setegid configureable + via GNU autoconf for HP/UX and others + o made the include files in eperl_globa.h + conditional + o made the -O2 conditional for GCC only + + Changes between 2.1b7 and 2.1b8 + ------------------------------- + + 970425 o fixed installation manpath + o fixed a security hole: the + effective uid/gid have to be eliminated + independend of mode and uid switching + o fixed some typos in eperl.pod + o rewritten the NEWS file + o renamed the options: + -D => -d, -E => -D (more intuitive) + -b => -B, -e => -E (prevent conflicts) + o fixed the order of command line + option descriptions + o removed the @logfile@ stuff from Makefile + + Changes between 2.1b6 and 2.1b7 + ------------------------------- + + 970425 o fixed error page colors + o changed some aux files: NEWS, TODO + o added .cgi to allowed extensions + for using shebang CGI/ePerl scripts + o added more clear info about shebang + to eperl.pod + o fixed more bugs in eperl.pod + o removed the exit on debug + o finished the test suite + o slightly fixed the usage output + o added support for HEAD requests in + case the server does not do it for us + o documented provided env variables + o created new isotime() function + for SCRIPT_SRC_MODIFIED_ISOTIME variable + o removed eperl_log.c because this + will be used in later versions only + + Changes between 2.1b5 and 2.1b6 + ------------------------------- + + 970414 o slightly changed the error message page + 970418 o created -c for syntax check like "perl -c" + o now the default delimiters are + for CGI modes + and <: ...:> for Filter mode + o removed the delimiters defs in eperl_global.h + but added a table to eperl.pod + o completely rewritten the setuid security stuff !! + o added security information to eperl.pod + o now -x does something useful: it outputs + the internally generated Perl script to /dev/tty + and exits + + Changes between 2.1b4 and 2.1b5 + ------------------------------- + + 970404 o now when used as a Unix filter the exit code + is != 0 on error while for CGI scripts it is + still 0 (needed to make the webserver happy + and to force him to accept your HTML error page). + o now prints the error message on stderr instead + of stdout in Unix filter mode + o fixed "make distclean", now t/Makefile is + also removed. + + Changes between 2.1b3 and 2.1b4 + ------------------------------- + + 970403 o fixed a bug in the b3 distribution: + autoheader was not run, so to _compile_ + ePerl GNU autoconf was needed. :-( + o slight adjustments to eperl.pod + + Changes between 2.1b2 and 2.1b3 + ------------------------------- + + 970402 o starting with Perl 5.003_96 the dXSUB_SYS define + is empty. Removed the call and the gcc -Wall + kludge from eperl_perl5.c + o fixed etc/newvers + o add "none" to configure DynaLoader check + + Changes between 2.1b1 and 2.1b2 + ------------------------------- + + 970330 o reduced the logo GIF image in size to fit betteri + into the browser window. The reduced one also has + 10 KB less bytes. + o made the Error HTML page nicer + o removed the not used -a (age) option + + Changes between 2.1b0 and 2.1b1 + ------------------------------- + + 970326 o added "-o file" to the usage message + o when running as a Unix filter the current + working directory is restored before the + final outputfile (-o) is created. + o documented that "-o outputfile" is + relative to source file dir when + runtime mode is CGI or NPH-CGI + o added new-betalevel to Makefile.in + + Changes between 2.0.3 and 2.1b0 + ------------------------------- + + 970322 o released as 2.1b0 for first test + + 970310 o added --with-perl=/path/to/perl option + to ./configure to force a specific perl + + 970302 o removed getdate.c stuff :-( + o added more tests + o changed aux dir to etc for porting to WinNT :-( + + 970228 o debugged and cleanup up eperl_parse.c + o fixed the core-dump under SunOS which + comes from SunOS' non-POSIX vsprintf(). + o removed the sdbm and md5 stuff because + this should be introduced in 3.0 later only. + o removed brainfile stuff + o fixed another coredump in eperl_parse.c + o fixed mode determination and mode-dependend + error message + + 970227 o debugged and cleanup up eperl_parse.c + + 970226 o added dmalloc support for debugging + + 970224 o changed sprintf stuff to more portable + variant in eperl_main.c + o now autoconf checks for memmove and + if not found eperl_parse.c uses bcopy. + + 970219 o changed bool checking to Autoconf stuff + + 970216 o ported to Linux: now bool is defined, + prefix was replaced by AC_prefix to avoid collisions and the + ccdlflags from Perl are used which need to be -rdynamic under + Linux. Now ePerl compiles out of the box on Linux and runs fine, + even with dynamic loading. + + 970210 o added getdate() code + o added --enable-brainfile=/path/to/brainfile + which sets the brain file where timestamps and + md5 etc. are stored. + o added -a option to set an age + + 970209 o added MD5 code + o added SDBM code + + 970207 o changed -c and -s options to -m c and -m f + o adding -m n for NPH/CGI, -m c is no only CGI + o added stdin support via "-" and tmpfiles + o added automatic tmpfile support with remove + on interrupts or errors + o now the old tempfiles are also created + with new mechanism + o added -o option for specifying an + explicit outputfile instead of stdout + o greatly imporved the manpage and brroght it + to the latest status + o created a test suite with Perl Test::Harness + o now ePerl also accepts an empty file + o added a security logfile which can be optionally + enabled via "--enable-logfile=/path/to/logfile" + at compile time. + o added configure support for debug compilation + via --enable-debug. This adds -g -ggdb3 to + the CFLAGS and LDFLAGS and prevents the + executable from being stripped. + o removed the old doc/ subdir with the + old FAQ and About file. + + 970206 o removed the generation of libeperl.a + o added a real installation target to Makefile + o removed eperl_parse.h, because it is still + replaced by the generated eperl_proto.h + o added -V option which now displays the compile + parameters + o removed the .. tags from error output + because for the stand-alone version is looks bad. + o added experimental TAINT...TAINT_NOT around perl_run. + o added -d option to set real Perl variables and + not just $ENV{'...'}; + + 970128 o added support to configure for Perl snapshot + releases named 5.003_XX. + o added a first security check: If operating in + NPH-CGI mode the source file has to be one of + the predefined valid file extensions. + o now when ePerl runs as a setuid program (seteuid = 0) + it switches to the uid/gid of the file owner + + 970127 o added -D option to set environment variables. + (this is needed for my WML project where in + pass 3 eperl gets called via -D...) + o added -k option to keep CWD. + (this is needed for my WML project where + ePerl should not chdir to the /tmp/xxx files). + + 970118 o make the BEGIN/END_DELIMITER strings variables which + now can be set via -b and -e + (this is needed for my WML project where I use + two variants of embedded Perl blocks) + + 970107 o fixed this changelog file + o added test directory + o cleanup of Makefile + o removed obsolete prototypes in eperl_lib.h + o cleaned up eperl_global.h + o make eperl_getopt.[ch] gcc -Wall clean + o added support for shebang usage, i.e. you can use #!/path/to/eperl + at the top of your pages and use them as a CGI script now. ePerl + will ignore the shebang line. + o moved the system IO and env functions out to new eperl_sys.c + o renamed eperl_lib to eperl_parse + o Hups! all references to the CGI/1.0 standard were wrong, it + actually is CGI/1.1... + + 970106 o added stand-alone interpreter with options + o added -x and -v options + o added README and LICENSE display + o now ePerl reads the file from stdin if + the argument is "-" + o added a ePerl manual page for the + stand-alone interpreter + + Changes between 2.0.2 and 2.0.3 + ------------------------------- + + 970104 o added some documentation from the webpages to misc/doc/ + o added a FreeBSD ports area to the webpages + + Changes between 2.0.1 and 2.0.2 + ------------------------------- + + 970104 o remove of the temporary files were disabled for + debugging purposes. Fixed. + + Changes between 2.0.0 and 2.0.1 + ------------------------------- + + 970103 o removed unused variables + + Changes between 1.5 and 2.0.0 + ----------------------------- + + 970102 o ePerl now supports the Perl 5 DynaLoader interface for + dynamic linking and loading of shared modules. This provides ePerl + with the complete power of the underlying Perl 5 installation, + including the shared objects. + + o ePerl now runs as NPH-CGI/1.1 script, i.e. as a Non-Parsed-Header + CGI-script. This means that it is able to create its own HTTP + header. Implications of this include: + - To create HTTP headers just put them on the first + lines in your script as plain text or just generate them on the + fly by a ePerl block at the beginning of your script. With this + feature you can for instance write pages which create images + instead of HTML code. + - If no headers were created by the script, it + outputs it with MIME-type "text/html", including an additional + calculated "Content-Length" header. + - It automatically adds "Date" and "Server" headers. + + o ePerl now saves and checks the STDERR output of the script. + If this contains data this implies an error and leads to the + display of the error HTML page, displaying the STDERR output. + + o ePerl now saves the STDOUT output of the script (the real + contents). This implies that it can calculate the Content-Length or + ignore it if STDERR was created and the error page have to be + displayed. + + o Additional environment variables will be set by ePerl + prior to the execution of the bristled Perl blocks: + SCRIPT_SRC_SIZE ....... the byte size of the original source file + SCRIPT_SRC_MTIME ...... the integer value of the last modify time + SCRIPT_SRC_MTIME_FMT .. the formatted string of the last modify time + SCRIPT_SRC_OWNER ...... the owner of the original source file + VERSION_INTERPRETER ... the ePerl version string + VERSION_LANGUAGE ...... the Perl version string + + o The ePerl sources were split into distinct peaces to + allow further development, e.g. a standalone program or a Apache + API module. + + Changes between 1.4 and 1.5 + --------------------------- + + 9609xx o started with the work to split the ePerl + functionality into a library and create a stand-alone + CGI-program and a Apache module which use this library. + + Changes between 1.3 and 1.4 + --------------------------- + + 960906 o changed source from PATH_INFO to PATH_TRANSLATED + o cleanup the sources and released it + the first time officially on the Web + + Changes between 1.2 and 1.3 + --------------------------- + + 960622 o created WWW pages + o changed all old EPL references to ePerl + o added a lot of comments to the source + o made the begin and end delimiters variable + o changed the end delimiter from ">" to "!>" + because ">" makes problems if it occurs inside the + ePerl block + + Changes between 1.1 and 1.2 + --------------------------- + + 960510 o created GNU autoconf files, Makefiles, etc. + + Changes between 1.0 and 1.1 + --------------------------- + + 960415 o fixed a bug in the escape code: more chars + have to be escaped! + + Changes between *GENESIS* and 1.0 + --------------------------------- + + 960323 o adapted for Apache 1.1b0+ak + 960310 o *GENESIS* + Index: ossp-pkg/eperl/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/eperl/Makefile.in,v co -q -kk -p'1.5' '/v/ossp/cvs/ossp-pkg/eperl/Makefile.in,v' | diff -u /dev/null - -L'ossp-pkg/eperl/Makefile.in' 2>/dev/null --- ossp-pkg/eperl/Makefile.in +++ - 2024-04-28 17:27:19.157183862 +0200 @@ -0,0 +1,364 @@ +## +## Makefile -- ePerl Makefile +## Copyright (c) 1996-2000 Ralf S. Engelschall, All Rights Reserved. +## +@SET_MAKE@ + +# ------------------------------------------------ +# DEFINITIONS +# ------------------------------------------------ + +# imported Perl 5 parameters +perl_prog = @perl_prog@ +perl_cc = @perl_cc@ +perl_optimize = @perl_optimize@ +perl_ccflags = @perl_ccflags@ +perl_ldflags = @perl_ldflags@ +perl_libs = @perl_libs@ +perl_dla = @perl_dla@ +perl_ccdlflags = @perl_ccdlflags@ +perl_cccdlflags = @perl_cccdlflags@ +perl_archlib = @perl_archlib@ + +# compiler tools +CC = $(perl_cc) +CFLAGS = @CFLAGS@ $(perl_optimize) $(perl_ccflags) -I$(perl_archlib)/CORE -I. +DLCFLAGS = @CFLAGS@ $(perl_optimize) $(perl_cccdlflags) $(perl_ccflags) -I$(perl_archlib)/CORE -I. +LDFLAGS = @LDFLAGS@ $(perl_ccdlflags) $(perl_ldflags) -L$(perl_archlib)/CORE +LDLIBS = $(perl_dla) -lperl $(perl_libs) +AR = @AR@ +RANLIB = @RANLIB@ +SIZE = @SIZE@ +debug = @debug@ +dmalloc = @dmalloc@ + +# installation tools +SHTOOL = @SHTOOL@ +CP = cp + +# installation paths +prefix = @prefix@ +exec_prefix = $(prefix) +bindir = $(prefix)/bin +libsubdir = @libsubdir@ +libdir = $(prefix)/lib$(libsubdir) +mandir = $(prefix)/man/man1 + + +# ------------------------------------------------ +# THE RELEASE STUFF (MACROS) +# ------------------------------------------------ + +_GETDISTINFO = \ + _version=`$(SHTOOL) version -l c -d short eperl_version.c`; \ + _date=`date '+%y%m%d_%H%M'` + +_BUILDDIST = \ + echo "Creating tarball..."; \ + gtar --no-recursion -cvf - `find * -depth -print | sort` | grep -v CVS | grep -v .cvsignore \ + tardy --user_number=1000 --user_name=rse \ + --group_number=1000 --group_name=en \ + --prefix=$${_distname} - |\ + gzip >$${_tarball}; \ + echo "Done"; \ + ls -l $${_tarball} + +_NEWVERS = \ + $(SHTOOL) version -l c -n ePerl -p eperl_ $$OPT eperl_version.c; \ + V=`$(SHTOOL) version -l c -d long eperl_version.c`;\ + sed -e "s/Version .*(.*)/Version $$V/g" README.n && mv README.n README; \ + V=`$(SHTOOL) version -l c -d short eperl_version.c`;\ + sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Parse/ePerl.pm.n && mv mod/Parse/ePerl.pm.n mod/Parse/ePerl.pm; \ + sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Apache/ePerl.pm.n && mv mod/Apache/ePerl.pm.n mod/Apache/ePerl.pm + +_UPDATEVERS = \ + V=`$(SHTOOL) version -l c -d short eperl_version.c`;\ + $(SHTOOL) version -l c -n ePerl -p eperl_ -s $$V eperl_version.c; \ + V=`$(SHTOOL) version -l c -d long eperl_version.c`;\ + sed -e "s/Version .*(.*)/Version $$V/g" README.n && mv README.n README; \ + V=`$(SHTOOL) version -l c -d short eperl_version.c`;\ + sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Parse/ePerl.pm.n && mv mod/Parse/ePerl.pm.n mod/Parse/ePerl.pm; \ + sed -e "s/@v=(\"[0-9.]*\"/@v=(\"$$V\"/g" mod/Apache/ePerl.pm.n && mv mod/Apache/ePerl.pm.n mod/Apache/ePerl.pm + + +# ------------------------------------------------ +# THE DEFAULT TARGET +# ------------------------------------------------ + +all: config eperl eperl.1 + + +# ------------------------------------------------ +# THE CONFIGURATION SUPPORT +# ------------------------------------------------ + +config: configure config_ac.h.in + +configure: configure.in aclocal.m4 acconfig.h + rm -f configure + autoconf configure.in >configure + chmod 770 configure + +config_ac.h.in: configure.in acconfig.h + rm -f config_ac.h.in + autoheader configure.in >config_ac.h.in + + +# ------------------------------------------------ +# THE RELEASE STUFF (TARGETS) +# ------------------------------------------------ + +release: distclean fixperm + @$(_GETDISTINFO); \ + _distname="eperl-$${_version}"; \ + _tarball="/tmp/$${_distname}.tar.gz"; \ + echo "Release Distribution: ePerl Version $$_version"; \ + $(_BUILDDIST); \ + mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz + +snap: distclean fixperm + @$(_GETDISTINFO); \ + _distname="eperl-$${_version}-SNAP-$${_date}"; \ + _tarball="/tmp/$${_distname}.tar.gz"; \ + echo "Snap of whole source tree: ePerl Version $$_version as of $${_date}"; \ + $(_BUILDDIST); \ + mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz + +new-version: + @V="$(VERSION)"; \ + if [ ".$$V" != . ]; then \ + OPT="-s$$V"; \ + else \ + OPT="-e"; \ + fi; \ + $(_NEWVERS) +update-version: + $(_UPDATEVERS) + + +# ------------------------------------------------ +# THE PROGRAM +# ------------------------------------------------ + +PROTO_SRCS = \ + eperl_main.c \ + eperl_perl5.c \ + eperl_parse.c \ + eperl_pp.c \ + eperl_sys.c \ + eperl_http.c \ + eperl_debug.c \ + eperl_config.c \ + eperl_readme.c \ + eperl_license.c \ + eperl_logo.c \ + eperl_powered.c + +SRCS = \ + eperl_main.c \ + eperl_perl5.c \ + eperl_parse.c \ + eperl_pp.o \ + eperl_sys.c \ + eperl_http.c \ + eperl_getopt.c \ + eperl_debug.c \ + eperl_config.c \ + eperl_version.c \ + eperl_readme.c \ + eperl_license.c \ + eperl_logo.c \ + eperl_powered.c + +OBJS = \ + eperl_main.o \ + eperl_perl5.o \ + eperl_parse.o \ + eperl_pp.o \ + eperl_sys.o \ + eperl_http.o \ + eperl_getopt.o \ + eperl_debug.o \ + eperl_config.o \ + eperl_version.o \ + eperl_readme.o \ + eperl_license.o \ + eperl_logo.o \ + eperl_powered.o + +eperl: $(OBJS) + $(CC) $(LDFLAGS) -o eperl $(OBJS) $(LDLIBS) $(dmalloc) + @if [ "x$(debug)" = xoff ]; then \ + strip eperl; \ + fi + +eperl_main.o: eperl_main.c + $(CC) $(CFLAGS) -c eperl_main.c + +eperl_perl5.o: eperl_perl5.c eperl_perl5_sm.h + $(CC) $(CFLAGS) -c eperl_perl5.c + +eperl_perl5_sm.h: eperl_perl5_sm.pl + $(perl_prog) eperl_perl5_sm.pl >eperl_perl5_sm.h + +eperl_getopt.o: eperl_getopt.c + $(CC) $(CFLAGS) -c eperl_getopt.c + +eperl_parse.o: eperl_parse.c + $(CC) $(CFLAGS) -c eperl_parse.c + +eperl_pp.o: eperl_pp.c + $(CC) $(CFLAGS) -c eperl_pp.c + +eperl_sys.o: eperl_sys.c + $(CC) $(CFLAGS) -c eperl_sys.c + +eperl_debug.o: eperl_debug.c + $(CC) $(CFLAGS) -c eperl_debug.c + +eperl_config.o: eperl_config.c + $(CC) $(CFLAGS) -c eperl_config.c + +eperl_http.o: eperl_http.c + $(CC) $(CFLAGS) -c eperl_http.c + +eperl_version.o: eperl_version.c + $(CC) $(CFLAGS) -c eperl_version.c + +eperl_readme.c: README + ./etc/asc2c README eperl_readme ePerl_README + +eperl_readme.o: eperl_readme.c + $(CC) $(CFLAGS) -c eperl_readme.c + +eperl_license.c: ARTISTIC COPYING + (\ + echo "--File: COPYING-------------------------------------"; \ + cat COPYING; \ + echo "--File: ARTISTIC------------------------------------"; \ + cat ARTISTIC; \ + ) >LICENSE + ./etc/asc2c LICENSE eperl_license ePerl_LICENSE + rm -f LICENSE + +eperl_license.o: eperl_license.c + $(CC) $(CFLAGS) -c eperl_license.c + +eperl_logo.c: eperl_logo.gif + ./etc/bin2c eperl_logo.gif eperl_logo ePerl_LOGO + +eperl_logo.o: eperl_logo.c + $(CC) $(CFLAGS) -c eperl_logo.c + +eperl_powered.c: eperl_powered.gif + ./etc/bin2c eperl_powered.gif eperl_powered ePerl_POWERED + +eperl_powered.o: eperl_powered.c + $(CC) $(CFLAGS) -c eperl_powered.c + + +mkproto: + ./etc/mkproto eperl_proto.h $(PROTO_SRCS) + +fixperm: + ./etc/fixperm * + + +# ------------------------------------------------ +# THE DOCUMENTATION +# ------------------------------------------------ + +eperl.1: eperl.pod eperl_version.c + V=`$(SHTOOL) version -l c -d short eperl_version.c`; \ + sed -e "s|\@V\@|$$V|g" -e "s|\@prefix\@|$(prefix)|" /tmp/eperl.pod; \ + pod2man --section=1 \ + --center="Ralf S. Engelschall" \ + --release="EN" \ + /tmp/eperl.pod >eperl.1 && \ + rm -f /tmp/eperl.pod + + +# ------------------------------------------------ +# THE SHARED LIBRARY +# ------------------------------------------------ + +SOBJS = \ + eperl_parse.so \ + eperl_pp.so \ + eperl_http.so \ + eperl_version.so + +libeperl.a: $(SOBJS) + $(AR) r libeperl.a $(SOBJS) + $(RANLIB) libeperl.a + +eperl_parse.so: eperl_parse.c + $(CC) $(DLCFLAGS) -o eperl_parse.o -c eperl_parse.c && mv eperl_parse.o eperl_parse.so + +eperl_pp.so: eperl_pp.c + $(CC) $(DLCFLAGS) -o eperl_pp.o -c eperl_pp.c && mv eperl_pp.o eperl_pp.so + +eperl_http.so: eperl_http.c + $(CC) $(DLCFLAGS) -o eperl_http.o -c eperl_http.c && mv eperl_http.o eperl_http.so + +eperl_version.so: eperl_version.c + $(CC) $(DLCFLAGS) -o eperl_version.o -c eperl_version.c && mv eperl_version.o eperl_version.so + + +# ------------------------------------------------ +# TEST SUITE +# ------------------------------------------------ + +test: + @cd t; make test + + +# ------------------------------------------------ +# INSTALLATION +# ------------------------------------------------ + +install: all + $(SHTOOL) mkdir -f -p -m 755 $(bindir) + $(SHTOOL) mkdir -f -p -m 755 $(mandir) + $(SHTOOL) mkdir -f -p -m 755 $(libdir) + $(SHTOOL) install -c -m 755 -c eperl $(bindir)/eperl + $(SHTOOL) install -c -m 644 eperl.1 $(mandir)/eperl.1 + $(CP) -r eg/* $(libdir)/ + + +# ------------------------------------------------ +# CLEANUP +# ------------------------------------------------ + +clean: + -rm -f $(OBJS) + -rm -f eperl + -rm -f $(SOBJS) + -rm -f libeperl.a + -rm -f core *.core + +realclean: + -rm -f $(OBJS) + -rm -f eperl + -rm -f $(SOBJS) + -rm -f libeperl.a + -rm -f core *.core + -rm -f eperl_perl5_sm.h + -rm -f eperl.1 + -rm -f eperl_readme.[ch] + -rm -f eperl_license.[ch] + +distclean: + -rm -f $(OBJS) + -rm -f eperl + -rm -f $(SOBJS) + -rm -f libeperl.a + -rm -f core *.core + -rm -f eperl_perl5_sm.h + -rm -f config_ac.h config_sc.h + -rm -f config.status config.cache config.log + -rm -f Makefile + -rm -f t/Makefile + + +##EOF## Index: ossp-pkg/eperl/configure RCS File: /v/ossp/cvs/ossp-pkg/eperl/configure,v co -q -kk -p'1.4' '/v/ossp/cvs/ossp-pkg/eperl/configure,v' | diff -u /dev/null - -L'ossp-pkg/eperl/configure' 2>/dev/null --- ossp-pkg/eperl/configure +++ - 2024-04-28 17:27:19.160023263 +0200 @@ -0,0 +1,2064 @@ +#! /bin/sh + +# From configure.in Revision: 2.0 +SHTOOL="etc/shtool" + +T_MD="`$SHTOOL echo -n -e %B`" +T_ME="`$SHTOOL echo -n -e %b`" +VERS="`$SHTOOL version -l c -d long eperl_version.c`" +echo "Configuring for ${T_MD}ePerl${T_ME}, Version ${T_MD}$VERS${T_ME}" + + + + + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_default_prefix=/usr/local +ac_help="$ac_help + --with-perl=PATH force the usage of a specific installed Perl" +ac_help="$ac_help + --enable-debug build for debugging" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=README + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + + + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +eval "dir=$prefix" +case $dir in + *eperl* ) libsubdir= ;; + * ) libsubdir="/eperl" ;; +esac + + + + +echo "$ac_t""" 1>&6 +echo "$ac_t""${T_MD}CHECK: Configuration of Perl Language${T_ME}" 1>&6 + +echo $ac_n "checking for Perl language""... $ac_c" 1>&6 +echo "configure:559: checking for Perl language" >&5 +# Check whether --with-perl or --without-perl was given. +if test "${with_perl+set}" = set; then + withval="$with_perl" + perlprog=$with_perl + +else + perlprog=`$SHTOOL path -m perl` + +fi +perlvers=`$perlprog -e 'printf("%.3f", $]);'` +PATH_PERL=$perlprog +echo "$ac_t""$perlprog v$perlvers" 1>&6 +case $perlvers in + 5.003* | 5.004* | 5.005* | 5.006* ) + ;; + * ) echo "" + echo "Latest Perl found on your system is $perlvers," + echo "but at least Perl version 5.003 is required." + echo "In case the newer one is not in PATH, just use" + echo "the option --with-perl=/path/to/bin/perl to" + echo "provide the correct executable." + echo "" + { echo "configure: error: Perl version too old" 1>&2; exit 1; } + ;; +esac +case $perlvers in + 5.00[3-6]_[0-9][0-9] ) + perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; + 5.00[3-6] ) + perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/$/00/'` ;; + * ) + perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; +esac + + + + +perl_prog=$perlprog +perl_vers=$perlvers +perl_vnum=$perlvnum + + + +if test -f $PATH_PERL; then + : +else + { echo "configure: error: required program ``perl'' not found" 1>&2; exit 1; } +fi + + + +echo $ac_n "checking for Perl knowledge of system""... $ac_c" 1>&6 +echo "configure:612: checking for Perl knowledge of system" >&5 +perl_osname="`$perl_prog -e 'use Config; print $Config{osname}'`"; +perl_osvers="`$perl_prog -e 'use Config; print $Config{osvers}'`"; +perl_os="$perl_osname-$perl_osvers" + + + +echo "$ac_t""$perl_os" 1>&6 + +echo $ac_n "checking for Perl standard compiler""... $ac_c" 1>&6 +echo "configure:622: checking for Perl standard compiler" >&5 +perl_cc="`$perl_prog -e 'use Config; print $Config{cc}'`"; +if test ".$CC" = .; then + CC=$perl_cc + export CC + echo "$ac_t""$perl_cc" 1>&6 +else + perl_cc=$CC + echo "$ac_t""$perl_cc (OVERWRITTEN)" 1>&6 +fi + + +echo $ac_n "checking for Perl standard optimization flags""... $ac_c" 1>&6 +echo "configure:635: checking for Perl standard optimization flags" >&5 +perl_optimize="`$perl_prog -e 'use Config; print $Config{optimize}'`"; +echo "$ac_t""$perl_optimize" 1>&6 + + +echo $ac_n "checking for Perl standard compilation flags""... $ac_c" 1>&6 +echo "configure:641: checking for Perl standard compilation flags" >&5 +perl_ccflags="`$perl_prog -e 'use Config; print $Config{ccflags}'`"; +case $perl_os in + *hpux* ) perl_ccflags="$perl_ccflags -Wp,-H32768" ;; + *irix-5.* ) perl_ccflags="`echo $perl_ccflags | sed -e 's/-D_POSIX_SOURCE//'`" ;; +esac +echo "$ac_t""$perl_ccflags" 1>&6 + + +echo $ac_n "checking for Perl standard link flags""... $ac_c" 1>&6 +echo "configure:651: checking for Perl standard link flags" >&5 +perl_ldflags="`$perl_prog -e 'use Config; print $Config{ldflags}'`"; +case $perl_os in + *irix-6.* ) perl_ldflags="$perl_ldflags '-Wl,-woff 85'" ;; +esac +echo "$ac_t""$perl_ldflags" 1>&6 + + +echo $ac_n "checking for Perl library files""... $ac_c" 1>&6 +echo "configure:660: checking for Perl library files" >&5 +perl_libs="`$perl_prog -e 'use Config; print $Config{libs}'`" +echo "$ac_t""$perl_libs" 1>&6 + + +echo $ac_n "checking for Perl architecture directory""... $ac_c" 1>&6 +echo "configure:666: checking for Perl architecture directory" >&5 +perl_archlib="`$perlprog -e 'use Config; print $Config{archlib}'`"; +echo "$ac_t""$perl_archlib" 1>&6 + + +echo $ac_n "checking for Perl dynamic loading support""... $ac_c" 1>&6 +echo "configure:672: checking for Perl dynamic loading support" >&5 +usedl="`$perlprog -e 'use Config; print $Config{usedl}'`"; +case $usedl in + define ) + rc=yes + cat >> confdefs.h <<\EOF +#define HAVE_PERL_DYNALOADER 1 +EOF + + perl_dla=$perl_archlib/auto/DynaLoader/DynaLoader.a + ;; + * ) + rc=no + perl_dla= + ;; +esac + +echo "$ac_t""$rc" 1>&6 + +echo $ac_n "checking for Perl dynamic loading compilation flags""... $ac_c" 1>&6 +echo "configure:692: checking for Perl dynamic loading compilation flags" >&5 +perl_cccdlflags="`$perlprog -e 'use Config; print $Config{cccdlflags}'`"; +case $perl_cccdlflags in + " " ) x="none" ;; + * ) x="$perl_cccdlflags" ;; +esac +echo "$ac_t""$x" 1>&6 + + +echo $ac_n "checking for Perl dynamic loading link flags""... $ac_c" 1>&6 +echo "configure:702: checking for Perl dynamic loading link flags" >&5 +perl_ccdlflags="`$perlprog -e 'use Config; print $Config{ccdlflags}'`"; +case $perl_os in + *aix* ) perl_ccdlflags="`echo $perl_ccdlflags | sed -e 's;-bE:perl.exp;-bE:${perl_archlib}/CORE/perl.exp;'`" ;; +esac +case $perl_ccdlflags in + " " ) x="none" ;; + * ) x="$perl_ccdlflags" ;; +esac +echo "$ac_t""$x" 1>&6 + + + + +echo "$ac_t""" 1>&6 +echo "$ac_t""${T_MD}CHECK: System Build Environment${T_ME}" 1>&6 + +echo $ac_n "checking for build user""... $ac_c" 1>&6 +echo "configure:720: checking for build user" >&5 +build_user="`$SHTOOL echo -n -e '%u@%h%d'`" + +echo "$ac_t""$build_user" 1>&6 + +echo $ac_n "checking for build time""... $ac_c" 1>&6 +echo "configure:726: checking for build time" >&5 +build_time_ctime="`date | sed -e 's/\n$//'`" +build_time_iso="`$SHTOOL echo -n -e '%D-%m-%Y'`" +echo "$ac_t""$build_time_iso" 1>&6 + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:736: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:766: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:817: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:849: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 860 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:891: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:896: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:924: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking for compilation debug mode""... $ac_c" 1>&6 +echo "configure:956: checking for compilation debug mode" >&5 +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + if test ".$ac_cv_prog_gcc" = ".yes"; then + case "$CFLAGS" in + *-O2* ) ;; + * ) CFLAGS="$CFLAGS -O2" ;; + esac + case "$CFLAGS" in + *-g* ) ;; + * ) CFLAGS="$CFLAGS -g" ;; + esac + CFLAGS="$CFLAGS -ggdb3" + CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wcast-align" + CFLAGS="$CFLAGS -Wmissing-prototypes -Wmissing-declarations -Winline" + dmalloc="" + if test -f /sw/include/dmalloc.h; then + if test -f /sw/lib/libdmalloc.a; then + cat >> confdefs.h <<\EOF +#define HAVE_DMALLOC 1 +EOF + + CFLAGS="$CFLAGS -I/sw/include" + LDFLAGS="$LDFLAGS -L/sw/lib" + dmalloc="-ldmalloc" + fi + fi + +else + case "$CFLAGS" in + *-g* ) ;; + * ) CFLAGS="$CFLAGS -g" ;; + esac +fi +msg="enabled" +cat >> confdefs.h <<\EOF +#define DEBUG_ENABLED 1 +EOF + + +else + +msg=disabled + +fi +echo "$ac_t""$msg" 1>&6 + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1007: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1037: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AR="ar" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AR="$ac_cv_prog_AR" +if test -n "$AR"; then + echo "$ac_t""$AR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "size", so it can be a program name with args. +set dummy size; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1066: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_SIZE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$SIZE"; then + ac_cv_prog_SIZE="$SIZE" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_SIZE="size" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +SIZE="$ac_cv_prog_SIZE" +if test -n "$SIZE"; then + echo "$ac_t""$SIZE" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +case $perl_os in + *irix* ) SIZE="$SIZE -B" ;; +esac +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:1096: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + + +echo "$ac_t""" 1>&6 +echo "$ac_t""${T_MD}CHECK: Characteristic of System Headers and Libraries${T_ME}" 1>&6 + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1128: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1203: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1283: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +for ac_hdr in stdio.h stdarg.h stdlib.h string.h ctype.h unistd.h time.h signal.h pwd.h grp.h sys/types.h sys/stat.h sys/param.h sys/socket.h netinet/in.h netdb.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1390: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking for bool""... $ac_c" 1>&6 +echo "configure:1427: checking for bool" >&5 +if eval "test \"`echo '$''{'ac_cv_type_bool'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])bool[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_bool=yes +else + rm -rf conftest* + ac_cv_type_bool=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_bool" 1>&6 +if test $ac_cv_type_bool = no; then + cat >> confdefs.h <<\EOF +#define bool char +EOF + +fi + +for ac_func in memmove +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1462: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in seteuid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1517: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in setegid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1572: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in strdup +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1627: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + + +echo "$ac_t""" 1>&6 +echo "$ac_t""${T_MD}RESULT: Sourcefile Substitution${T_ME}" 1>&6 + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "Makefile t/Makefile config_sc.h config_ac.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHTOOL@%$SHTOOL%g +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@libsubdir@%$libsubdir%g +s%@PATH_PERL@%$PATH_PERL%g +s%@perlprog@%$perlprog%g +s%@perlvers@%$perlvers%g +s%@perlvnum@%$perlvnum%g +s%@perl_prog@%$perl_prog%g +s%@perl_vers@%$perl_vers%g +s%@perl_vnum@%$perl_vnum%g +s%@perl_osname@%$perl_osname%g +s%@perl_osvers@%$perl_osvers%g +s%@perl_os@%$perl_os%g +s%@perl_cc@%$perl_cc%g +s%@perl_optimize@%$perl_optimize%g +s%@perl_ccflags@%$perl_ccflags%g +s%@perl_ldflags@%$perl_ldflags%g +s%@perl_libs@%$perl_libs%g +s%@perl_archlib@%$perl_archlib%g +s%@perl_dla@%$perl_dla%g +s%@perl_cccdlflags@%$perl_cccdlflags%g +s%@perl_ccdlflags@%$perl_ccdlflags%g +s%@build_user@%$build_user%g +s%@build_time_ctime@%$build_time_ctime%g +s%@build_time_iso@%$build_time_iso%g +s%@CC@%$CC%g +s%@dmalloc@%$dmalloc%g +s%@RANLIB@%$RANLIB%g +s%@AR@%$AR%g +s%@SIZE@%$SIZE%g +s%@SET_MAKE@%$SET_MAKE%g +s%@CPP@%$CPP%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +echo "" +echo "Now please type '${T_MD}make${T_ME}' to compile. Good luck." +echo "" + Index: ossp-pkg/eperl/configure.in RCS File: /v/ossp/cvs/ossp-pkg/eperl/configure.in,v co -q -kk -p'1.4' '/v/ossp/cvs/ossp-pkg/eperl/configure.in,v' | diff -u /dev/null - -L'ossp-pkg/eperl/configure.in' 2>/dev/null --- ossp-pkg/eperl/configure.in +++ - 2024-04-28 17:27:19.163917035 +0200 @@ -0,0 +1,240 @@ +dnl ## +dnl ## configure.in -- GNU autoconf configuration spec +dnl ## Copyright (c) 1996-1999 Ralf S. Engelschall, +dnl ## +dnl ## Process this file with ``autoconf'' to produce a configure script. +dnl ## + + +dnl # +dnl # standard autoconf prolog +dnl # + +AC_PREREQ(2.13)dnl +AC_REVISION($Revision$) +SHTOOL="etc/shtool" +AC_SUBST(SHTOOL) +T_MD="`$SHTOOL echo -n -e %B`" +T_ME="`$SHTOOL echo -n -e %b`" +VERS="`$SHTOOL version -l c -d long eperl_version.c`" +echo "Configuring for ${T_MD}ePerl${T_ME}, Version ${T_MD}$VERS${T_ME}" + +AC_INIT(README) +AC_CONFIG_HEADER(config_ac.h)dnl +AC_PREFIX_DEFAULT(/usr/local) + +dnl # +dnl # libdir adjustment +dnl # + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +eval "dir=$prefix" +case $dir in + *eperl* ) libsubdir= ;; + * ) libsubdir="/eperl" ;; +esac +AC_SUBST(libsubdir) + + +dnl # +dnl # latest find Perl interpreter +dnl # + +AC_CONFIGURE_PART(CHECK: Configuration of Perl Language) +AC_MSG_CHECKING([for Perl language]) +AC_ARG_WITH(perl,dnl +[ --with-perl=PATH force the usage of a specific installed Perl], +perlprog=$with_perl +, +perlprog=`$SHTOOL path -m perl` +)dnl +changequote(, )dnl +perlvers=`$perlprog -e 'printf("%.3f", $]);'` +changequote([, ])dnl +PATH_PERL=$perlprog +AC_MSG_RESULT([$perlprog v$perlvers]) +case $perlvers in + 5.003* | 5.004* | 5.005* | 5.006* ) + ;; + * ) echo "" + echo "Latest Perl found on your system is $perlvers," + echo "but at least Perl version 5.003 is required." + echo "In case the newer one is not in PATH, just use" + echo "the option --with-perl=/path/to/bin/perl to" + echo "provide the correct executable." + echo "" + AC_ERROR([Perl version too old]) + ;; +esac +case $perlvers in + 5.00[[3-6]_[0-9][0-9]] ) + perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; + 5.00[[3-6]] ) + perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/$/00/'` ;; + * ) + perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;; +esac +AC_SUBST(PATH_PERL) +AC_SUBST(perlprog) +AC_SUBST(perlvers) +AC_SUBST(perlvnum) +perl_prog=$perlprog +perl_vers=$perlvers +perl_vnum=$perlvnum +AC_SUBST(perl_prog) +AC_SUBST(perl_vers) +AC_SUBST(perl_vnum) +if test -f $PATH_PERL; then + : +else + AC_ERROR([required program ``perl'' not found]) +fi + + +dnl # +dnl # determine Perl parameters +dnl # + +AC_MSG_CHECKING([for Perl knowledge of system]) +perl_osname="`$perl_prog -e 'use Config; print $Config{osname}'`"; +perl_osvers="`$perl_prog -e 'use Config; print $Config{osvers}'`"; +perl_os="$perl_osname-$perl_osvers" +AC_SUBST(perl_osname) +AC_SUBST(perl_osvers) +AC_SUBST(perl_os) +AC_MSG_RESULT([$perl_os]) + +AC_MSG_CHECKING([for Perl standard compiler]) +perl_cc="`$perl_prog -e 'use Config; print $Config{cc}'`"; +if test ".$CC" = .; then + CC=$perl_cc + export CC + AC_MSG_RESULT([$perl_cc]) +else + perl_cc=$CC + AC_MSG_RESULT([$perl_cc (OVERWRITTEN)]) +fi +AC_SUBST(perl_cc) + +AC_MSG_CHECKING([for Perl standard optimization flags]) +perl_optimize="`$perl_prog -e 'use Config; print $Config{optimize}'`"; +AC_MSG_RESULT([$perl_optimize]) +AC_SUBST(perl_optimize) + +AC_MSG_CHECKING([for Perl standard compilation flags]) +perl_ccflags="`$perl_prog -e 'use Config; print $Config{ccflags}'`"; +case $perl_os in + *hpux* ) perl_ccflags="$perl_ccflags -Wp,-H32768" ;; + *irix-5.* ) perl_ccflags="`echo $perl_ccflags | sed -e 's/-D_POSIX_SOURCE//'`" ;; +esac +AC_MSG_RESULT([$perl_ccflags]) +AC_SUBST(perl_ccflags) + +AC_MSG_CHECKING([for Perl standard link flags]) +perl_ldflags="`$perl_prog -e 'use Config; print $Config{ldflags}'`"; +case $perl_os in + *irix-6.* ) perl_ldflags="$perl_ldflags '-Wl,-woff 85'" ;; +esac +AC_MSG_RESULT([$perl_ldflags]) +AC_SUBST(perl_ldflags) + +AC_MSG_CHECKING([for Perl library files]) +perl_libs="`$perl_prog -e 'use Config; print $Config{libs}'`" +AC_MSG_RESULT([$perl_libs]) +AC_SUBST(perl_libs) + +AC_MSG_CHECKING([for Perl architecture directory]) +perl_archlib="`$perlprog -e 'use Config; print $Config{archlib}'`"; +AC_MSG_RESULT([$perl_archlib]) +AC_SUBST(perl_archlib) + +AC_MSG_CHECKING([for Perl dynamic loading support]) +usedl="`$perlprog -e 'use Config; print $Config{usedl}'`"; +case $usedl in + define ) + rc=yes + AC_DEFINE(HAVE_PERL_DYNALOADER) + perl_dla=$perl_archlib/auto/DynaLoader/DynaLoader.a + ;; + * ) + rc=no + perl_dla= + ;; +esac +AC_SUBST(perl_dla) +AC_MSG_RESULT([$rc]) + +AC_MSG_CHECKING([for Perl dynamic loading compilation flags]) +perl_cccdlflags="`$perlprog -e 'use Config; print $Config{cccdlflags}'`"; +case $perl_cccdlflags in + " " ) x="none" ;; + * ) x="$perl_cccdlflags" ;; +esac +AC_MSG_RESULT([$x]) +AC_SUBST(perl_cccdlflags) + +AC_MSG_CHECKING([for Perl dynamic loading link flags]) +perl_ccdlflags="`$perlprog -e 'use Config; print $Config{ccdlflags}'`"; +case $perl_os in + *aix* ) perl_ccdlflags="`echo $perl_ccdlflags | sed -e 's;-bE:perl.exp;-bE:${perl_archlib}/CORE/perl.exp;'`" ;; +esac +case $perl_ccdlflags in + " " ) x="none" ;; + * ) x="$perl_ccdlflags" ;; +esac +AC_MSG_RESULT([$x]) +AC_SUBST(perl_ccdlflags) + + +dnl # +dnl # determine build tools and parameters +dnl # + +AC_CONFIGURE_PART(CHECK: System Build Environment) +AC_BUILD_USER +AC_BUILD_TIME +AC_PROG_CC +AC_CHECK_DEBUGGING +AC_PROG_RANLIB +AC_PROGRAM_CHECK(AR, ar, ar,) +AC_PROGRAM_CHECK(SIZE, size, size,) +case $perl_os in + *irix* ) SIZE="$SIZE -B" ;; +esac +AC_SET_MAKE + +dnl # +dnl # determine system parameters +dnl # + +AC_CONFIGURE_PART(CHECK: Characteristic of System Headers and Libraries) +AC_CONST +AC_STDC_HEADERS +AC_HAVE_HEADERS(stdio.h stdarg.h stdlib.h string.h ctype.h dnl + unistd.h time.h signal.h pwd.h grp.h dnl + sys/types.h sys/stat.h sys/param.h dnl + sys/socket.h netinet/in.h netdb.h) +AC_CHECK_TYPE(bool, char) +AC_CHECK_FUNCS(memmove) +AC_CHECK_FUNCS(seteuid) +AC_CHECK_FUNCS(setegid) +AC_CHECK_FUNCS(strdup) + + +dnl # +dnl # finally: source file substitution... +dnl # + +AC_CONFIGURE_PART(RESULT: Sourcefile Substitution) +AC_OUTPUT(dnl +Makefile dnl +t/Makefile dnl +config_sc.h dnl +,dnl +)dnl + +echo "" +echo "Now please type '${T_MD}make${T_ME}' to compile. Good luck." +echo "" + +dnl ##EOF## Index: ossp-pkg/eperl/eperl_main.c RCS File: /v/ossp/cvs/ossp-pkg/eperl/eperl_main.c,v co -q -kk -p'1.2' '/v/ossp/cvs/ossp-pkg/eperl/eperl_main.c,v' | diff -u /dev/null - -L'ossp-pkg/eperl/eperl_main.c' 2>/dev/null --- ossp-pkg/eperl/eperl_main.c +++ - 2024-04-28 17:27:19.166621607 +0200 @@ -0,0 +1,1261 @@ +/* +** ____ _ +** ___| _ \ ___ _ __| | +** / _ \ |_) / _ \ '__| | +** | __/ __/ __/ | | | +** \___|_| \___|_| |_| +** +** ePerl -- Embedded Perl 5 Language +** +** ePerl interprets an ASCII file bristled with Perl 5 program statements +** by evaluating the Perl 5 code while passing through the plain ASCII +** data. It can operate both as a standard Unix filter for general file +** generation tasks and as a powerful Webserver scripting language for +** dynamic HTML page programming. +** +** ====================================================================== +** +** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** +** This program is free software; it may be redistributed and/or modified +** only under the terms of either the Artistic License or the GNU General +** Public License, which may be found in the ePerl source distribution. +** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive +** a built-in copy of both license files. +** +** This program is distributed in the hope that it will be useful, but +** WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the +** Artistic License or the GNU General Public License for more details. +** +** ====================================================================== +** +** eperl_main.c -- ePerl main procedure +*/ + +#include "eperl_config.h" +#include "eperl_global.h" +#include "eperl_security.h" +#include "eperl_getopt.h" +#include "eperl_perl5.h" +#include "eperl_proto.h" + +#define _EPERL_VERSION_C_AS_HEADER_ +#include "eperl_version.c" +#undef _EPERL_VERSION_C_AS_HEADER_ + +int mode = MODE_UNKNOWN; + +char *allowed_file_ext[] = LIST_OF_ALLOWED_FILE_EXT; +char *allowed_caller_uid[] = LIST_OF_ALLOWED_CALLER_UID; + +/* + * Display an error message and a logfile content as a HTML page + */ +void PrintError(int mode, char *scripturl, char *scriptfile, char *logfile, char *str, ...) +{ + va_list ap; + char ca[1024]; + char *cpBuf; + char *cp; + + va_start(ap, str); + vsprintf(ca, str, ap); + + IO_restore_stdout(); + IO_restore_stderr(); + + if (mode == MODE_CGI || mode == MODE_NPHCGI) { + if (mode == MODE_NPHCGI) + HTTP_PrintResponseHeaders(""); + printf("Content-Type: text/html\n\n"); + printf("\n"); + printf("\n"); + printf("ePerl: ERROR: %s\n", ca); + printf("\n"); + printf("\n"); + printf("
\n"); + cp = getenv("SCRIPT_NAME"); + if (cp == NULL) + cp = "UNKNOWN_IMG_DIR"; + printf("\"Powered\n", cp); + printf("\n"); + printf("\n"); + printf("\n", cp); + printf("\n"); + printf("\n"); + printf("\n", eperl_version.v_short); + printf("\n"); + printf("
\"Embedded
Version %s
\n"); + printf("

\n"); + printf("\n"); + printf("\n"); + printf("\n"); + printf("
\n"); + printf("ERROR:\n"); + printf("
\n"); + printf("

%s

\n", ca); + printf("
\n"); + if (logfile != NULL) { + if ((cpBuf = ePerl_ReadErrorFile(logfile, scriptfile, scripturl)) != NULL) { + printf("

"); + printf("\n"); + printf("\n"); + printf("\n"); + printf("
\n"); + printf("Contents of STDERR channel:\n"); + printf("
\n"); + printf("
\n");
+                printf("%s", cpBuf);
+                printf("
"); + printf("
\n"); + } + } + printf("

\n"); + printf("\n"); + printf("\n"); + } + else { + fprintf(stderr, "ePerl:Error: %s\n", ca); + if (logfile != NULL) { + if ((cpBuf = ePerl_ReadErrorFile(logfile, scriptfile, scripturl)) != NULL) { + fprintf(stderr, "\n"); + fprintf(stderr, "---- Contents of STDERR channel: ---------\n"); + fprintf(stderr, "%s", cpBuf); + if (cpBuf[strlen(cpBuf)-1] != '\n') + fprintf(stderr, "\n"); + fprintf(stderr, "------------------------------------------\n"); + } + } + } + fflush(stderr); + fflush(stdout); + + va_end(ap); + return; +} + +void give_version(void) +{ + fprintf(stdout, "%s\n", eperl_version.v_tex); + fprintf(stdout, "\n"); + fprintf(stdout, "Copyright (c) 1996-2000 Ralf S. Engelschall \n"); + fprintf(stdout, "\n"); + fprintf(stdout, "This program is distributed in the hope that it will be useful,\n"); + fprintf(stdout, "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); + fprintf(stdout, "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either\n"); + fprintf(stdout, "the Artistic License or the GNU General Public License for more details.\n"); + fprintf(stdout, "\n"); +} + +void give_version_extended(void) +{ + give_version(); + fprintf(stdout, "Characteristics of this binary:\n"); + fprintf(stdout, " Perl Version : %s (%s)\n", AC_perl_vers, AC_perl_prog); + fprintf(stdout, " Perl I/O Layer : %s\n", PERL_IO_LAYER_ID); + fprintf(stdout, " Perl Library : %s/CORE/libperl.a\n", AC_perl_archlib); + fprintf(stdout, " Perl DynaLoader : %s\n", AC_perl_dla); + fprintf(stdout, " System Libs : %s\n", AC_perl_libs); + fprintf(stdout, " Built User : %s\n", AC_build_user); + fprintf(stdout, " Built Time : %s\n", AC_build_time_iso); + fprintf(stdout, "\n"); +} + +void give_readme(void) +{ + fprintf(stdout, ePerl_README); +} + +void give_license(void) +{ + fprintf(stdout, ePerl_LICENSE); +} + +void give_img_logo(void) +{ + if (mode == MODE_NPHCGI) + HTTP_PrintResponseHeaders(""); + printf("Content-Type: image/gif\n\n"); + fwrite(ePerl_LOGO_data, ePerl_LOGO_size, 1, stdout); +} + +void give_img_powered(void) +{ + if (mode == MODE_NPHCGI) + HTTP_PrintResponseHeaders(""); + printf("Content-Type: image/gif\n\n"); + fwrite(ePerl_POWERED_data, ePerl_POWERED_size, 1, stdout); +} + +void give_usage(char *name) +{ + fprintf(stderr, "Usage: %s [options] [scriptfile]\n", name); + fprintf(stderr, "\n"); + fprintf(stderr, "Input Options:\n"); + fprintf(stderr, " -d, --define=NAME=VALUE define global Perl variable ($main::name)\n"); + fprintf(stderr, " -D, --setenv=NAME=VALUE define environment variable ($ENV{'name'})\n"); + fprintf(stderr, " -I, --includedir=PATH add @INC/#include directory\n"); + fprintf(stderr, " -B, --block-begin=STR set begin block delimiter\n"); + fprintf(stderr, " -E, --block-end=STR set end block delimiter\n"); + fprintf(stderr, " -n, --nocase force block delimiters to be case insensitive\n"); + fprintf(stderr, " -k, --keepcwd force keeping of current working directory\n"); + fprintf(stderr, " -P, --preprocess enable ePerl Preprocessor\n"); + fprintf(stderr, " -C, --convert-entity enable HTML entity conversion for ePerl blocks\n"); + fprintf(stderr, " -L, --line-continue enable line continuation via backslashes\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "Output Options:\n"); + fprintf(stderr, " -T, --tainting enable Perl Tainting\n"); + fprintf(stderr, " -w, --warnings enable Perl Warnings\n"); + fprintf(stderr, " -x, --debug enable ePerl debugging output on console\n"); + fprintf(stderr, " -m, --mode=STR force runtime mode to FILTER, CGI or NPH-CGI\n"); + fprintf(stderr, " -o, --outputfile=PATH force the output to be send to this file (default=stdout)\n"); + fprintf(stderr, " -c, --check run syntax check only and exit (no execution)\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "Giving Feedback:\n"); + fprintf(stderr, " -r, --readme display ePerl README file\n"); + fprintf(stderr, " -l, --license display ePerl license files (COPYING and ARTISTIC)\n"); + fprintf(stderr, " -v, --version display ePerl VERSION id\n"); + fprintf(stderr, " -V, --ingredients display ePerl VERSION id & compilation parameters\n"); + fprintf(stderr, " -h, --help display ePerl usage list (this one)\n"); + fprintf(stderr, "\n"); +} + +char *RememberedINC[1024] = { NULL }; + +void RememberINC(char *str) +{ + int i; + + for (i = 0; RememberedINC[i] != NULL; i++) + ; + RememberedINC[i++] = strdup(str); + RememberedINC[i++] = NULL; + return; +} + +void mysighandler(int rc) +{ + /* ignore more signals */ + signal(SIGINT, SIG_IGN); + signal(SIGTERM, SIG_IGN); + + /* restore filehandles */ + IO_restore_stdout(); + IO_restore_stderr(); + + /* give interrupt information */ + fprintf(stderr, "ePerl: **INTERRUPT**\n"); + + /* exit immediately */ + myexit(EX_FAIL); +} + +void myinit(void) +{ + /* caught signals */ + signal(SIGINT, mysighandler); + signal(SIGTERM, mysighandler); +} + +void myexit(int rc) +{ + /* cleanup */ +#ifndef DEBUG_ENABLED + remove_mytmpfiles(); +#endif + + /* restore signals */ + signal(SIGINT, SIG_DFL); + signal(SIGTERM, SIG_DFL); + +#ifdef DEBUG_ENABLED +#ifdef HAVE_DMALLOC + dmalloc_shutdown(); +#endif +#endif + + /* die gracefully */ + exit(rc); +} + +struct option options[] = { + { "define", 1, NULL, 'd' }, + { "setenv", 1, NULL, 'D' }, + { "includedir", 1, NULL, 'I' }, + { "block-begin", 1, NULL, 'B' }, + { "block-end", 1, NULL, 'E' }, + { "nocase", 0, NULL, 'n' }, + { "keepcwd", 0, NULL, 'k' }, + { "preprocess", 0, NULL, 'P' }, + { "convert-entity", 0, NULL, 'C' }, + { "line-continue", 0, NULL, 'L' }, + { "tainting", 0, NULL, 'T' }, + { "warnings", 0, NULL, 'w' }, + { "debug", 0, NULL, 'x' }, + { "mode", 1, NULL, 'm' }, + { "outputfile", 1, NULL, 'o' }, + { "check", 0, NULL, 'c' }, + { "readme", 0, NULL, 'r' }, + { "license", 0, NULL, 'l' }, + { "version", 0, NULL, 'v' }, + { "ingredients", 0, NULL, 'V' }, + { "help", 0, NULL, 'h' } +}; + +/* + * main procedure + */ +int main(int argc, char **argv, char **env) +{ + DECL_EXRC; + FILE *fp = NULL; + FILE *er = NULL; + FILE *out = NULL; + char *cpBuf = NULL; + char *cpBuf2 = NULL; + char *cpBuf3 = NULL; + char perlscript[1024] = ""; + char perlstderr[1024] = ""; + char perlstdout[1024] = ""; + char dir_tmp[1024]; + char *dir_home; + char *dir_script; + char ca[1024] = ""; + int myargc; + char *myargv[20]; + char *progname; + int nBuf; + int nOut; + char *source = NULL; + char sourcedir[2048]; + char *cp; + static PerlInterpreter *my_perl = NULL; + struct stat st; + char *cpOut = NULL; + int size; + struct passwd *pw; + struct passwd *pw2; + struct group *gr; + int uid, gid; + int keepcwd = FALSE; + int c; + char *cpScript = NULL; + int allow; + int i, n, k; + char *outputfile = NULL; + char cwd[MAXPATHLEN]; + int fCheck = FALSE; + int fTaint = FALSE; + int fWarn = FALSE; + int fNoCase = FALSE; + int fPP = FALSE; + char *cwd2; + int fOkSwitch; + char *cpHost; + char *cpPort; + char *cpPath; + char *cpCGIgi; + char *cpCGIpt; + char *cpCGIqs; + int fCGIqsEqualChar; + + /* first step: our process initialisation */ + myinit(); + + /* second step: canonicalize program name */ + progname = argv[0]; + if ((cp = strrchr(progname, '/')) != NULL) { + progname = cp+1; + } + + /* parse the option arguments */ + opterr = 0; + while ((c = getopt_long(argc, argv, ":d:D:I:B:E:nkPCLTwxm:o:crlvVh", options, NULL)) != -1) { + if (optarg == NULL) + optarg = "(null)"; + switch (c) { + case 'd': + Perl5_RememberScalar(optarg); + break; + case 'D': + env = Perl5_SetEnvVar(env, optarg); + break; + case 'I': + RememberINC(optarg); + break; + case 'B': + ePerl_begin_delimiter = strdup(optarg); + break; + case 'E': + ePerl_end_delimiter = strdup(optarg); + break; + case 'n': + fNoCase = TRUE; + break; + case 'k': + keepcwd = TRUE; + break; + case 'P': + fPP = TRUE; + break; + case 'C': + ePerl_convert_entities = TRUE; + break; + case 'L': + ePerl_line_continuation = TRUE; + break; + case 'T': + fTaint = TRUE; + break; + case 'w': + fWarn = TRUE; + break; + case 'x': + fDebug = TRUE; + break; + case 'm': + if (strcasecmp(optarg, "f") == 0 || + strcasecmp(optarg, "filter") == 0 ) { + mode = MODE_FILTER; + } + else if (strcasecmp(optarg, "c") == 0 || + strcasecmp(optarg, "cgi") == 0 ) { + mode = MODE_CGI; + } + else if (strcasecmp(optarg, "n") == 0 || + strcasecmp(optarg, "nph") == 0 || + strcasecmp(optarg, "nphcgi") == 0 || + strcasecmp(optarg, "nph-cgi") == 0 ) { + mode = MODE_NPHCGI; + } + else { + PrintError(mode, "", NULL, NULL, "Unknown runtime mode `%s'", optarg); + CU(EX_USAGE); + } + break; + case 'o': + outputfile = strdup(optarg); + break; + case 'c': + fCheck = TRUE; + break; + case 'r': + give_readme(); + myexit(EX_OK); + case 'l': + give_license(); + myexit(EX_OK); + case 'v': + give_version(); + myexit(EX_OK); + case 'V': + give_version_extended(); + myexit(EX_OK); + case 'h': + give_usage(progname); + myexit(EX_OK); + case '?': + if (isprint(optopt)) + fprintf(stderr, "ePerl:Error: Unknown option `-%c'.\n", optopt); + else + fprintf(stderr, "ePerl:Error: Unknown option character `\\x%x'.\n", optopt); + fprintf(stderr, "Try `%s --help' for more information.\n", progname); + myexit(EX_USAGE); + case ':': + if (isprint(optopt)) + fprintf(stderr, "ePerl:Error: Missing argument for option `-%c'.\n", optopt); + else + fprintf(stderr, "ePerl:Error: Missing argument for option character `\\x%x'.\n", optopt); + fprintf(stderr, "Try `%s --help' for more information.\n", progname); + myexit(EX_USAGE); + } + } + + /* + * determine source filename and runtime mode + */ + + if ((cpCGIgi = getenv("GATEWAY_INTERFACE")) == NULL) + cpCGIgi = ""; + if ((cpCGIpt = getenv("PATH_TRANSLATED")) == NULL) + cpCGIpt = ""; + if ((cpCGIqs = getenv("QUERY_STRING")) == NULL) + cpCGIqs = ""; + fCGIqsEqualChar = FALSE; + if (cpCGIqs != NULL && strchr(cpCGIqs, '=') != NULL) + fCGIqsEqualChar = TRUE; + + /* + * Server-Side-Scripting-Language: + * + * Request: + * /url/to/nph-eperl/url/to/script.phtml[?query-string] + * Environment: + * GATEWAY_INTERFACE=CGI/1.1 + * SCRIPT_NAME=/url/to/nph-eperl + * SCRIPT_FILENAME=/path/to/nph-eperl + * PATH_INFO=/url/to/script.phtml + * PATH_TRANSLATED=/path/to/script.phtml + * a) QUERY_STRING="" + * optind=argc + * b) QUERY_STRING=query-string (containing "=" char) + * optind=argc + * c) QUERY_STRING=query-string (containing NO "=" char) + * optind=argc-1 + * argv[optind]=query-string + */ + if ( cpCGIgi[0] != NUL + && cpCGIpt[0] != NUL + && ( ( optind == argc + && ( cpCGIqs[0] == NUL + || fCGIqsEqualChar ) ) + || ( optind == argc-1 + && !fCGIqsEqualChar + && stringEQ(argv[optind], cpCGIqs) ) ) ) { + + if (strncasecmp(cpCGIgi, "CGI/1", 5) != 0) { + fprintf(stderr, "ePerl:Error: Unknown gateway interface: NOT CGI/1.x\n"); + CU(EX_IOERR); + } + + /* CGI/1.1 or NPH-CGI/1.1 script, + source in PATH_TRANSLATED. */ + source = cpCGIpt; + + /* determine whether pure CGI or NPH-CGI mode */ + if ((cp = getenv("SCRIPT_FILENAME")) != NULL) { + strcpy(ca, cp); + if ((cp = strrchr(ca, '/')) != NULL) + *cp++ = NUL; + else + cp = ca; + if (strncasecmp(cp, "nph-", 4) == 0) + mode = (mode == MODE_UNKNOWN ? MODE_NPHCGI : mode); + else + mode = (mode == MODE_UNKNOWN ? MODE_CGI : mode); + } + else { + mode = (mode == MODE_UNKNOWN ? MODE_CGI : mode); + } + + /* set the command line for ``ps'' output */ + sprintf(ca, "%s %s [%sCGI/SSSL]", argv[0], source, mode == MODE_NPHCGI ? "NPH-" : ""); + argv[0] = strdup(ca); + } + /* + * Stand-Alone inside Webserver environment: + * + * Request: + * /url/to/script.cgi[/path-info][?query-string] + * [script.cgi has shebang #!/path/to/eperl] + * Environment: + * GATEWAY_INTERFACE=CGI/1.1 + * SCRIPT_NAME=/url/to/script.cgi + * SCRIPT_FILENAME=/path/to/script.cgi + * PATH_INFO=/path-info + * PATH_TRANSLATED=/path/to/docroot/path-info + * a) QUERY_STRING="" + * optind=argc-1 + * argv[optind]=/path/to/script.cgi + * b) QUERY_STRING=query-string (containing "=" char) + * optind=argc-1 + * argv[optind]=/path/to/script.cgi + * c) QUERY_STRING=query-string (containing NO "=" char) + * optind=argc-2 + * argv[optind]=/path/to/script.cgi + * argv[optind+1]=query-string + */ + else if ( cpCGIgi[0] != NUL + && ( ( optind == argc-1 + && ( cpCGIqs[0] == NUL + || fCGIqsEqualChar ) ) || + ( optind == argc-2 + && !fCGIqsEqualChar + && stringEQ(argv[optind+1], cpCGIqs)) ) ) { + + if (strncasecmp(cpCGIgi, "CGI/1", 5) != 0) { + fprintf(stderr, "ePerl:Error: Unknown gateway interface: NOT CGI/1.x\n"); + CU(EX_IOERR); + } + + /* CGI/1.1 or NPH-CGI/1.1 script, + source in ARGV */ + source = argv[optind]; + + /* determine whether pure CGI or NPH-CGI mode */ + if ((cp = getenv("SCRIPT_FILENAME")) != NULL) { + strcpy(ca, cp); + if ((cp = strrchr(ca, '/')) != NULL) + *cp++ = NUL; + else + cp = ca; + if (strncasecmp(cp, "nph-", 4) == 0) + mode = (mode == MODE_UNKNOWN ? MODE_NPHCGI : mode); + else + mode = (mode == MODE_UNKNOWN ? MODE_CGI : mode); + } + else { + mode = (mode == MODE_UNKNOWN ? MODE_CGI : mode); + } + + /* set the command line for ``ps'' output */ + sprintf(ca, "%s %s [%sCGI/stand-alone]", argv[0], source, mode == MODE_NPHCGI ? "NPH-" : ""); + argv[0] = strdup(ca); + } + /* + * Stand-Alone outside Webserver environment: + * + * Request: + * eperl script + * Environment: + * GATEWAY_INTERFACE="" + * SCRIPT_NAME="" + * SCRIPT_FILENAME="" + * PATH_INFO="" + * PATH_TRANSLATED="" + * QUERY_STRING="" + * optind=argc-1 + * argv[optind]=script + */ + else if ( cpCGIgi[0] == NUL + && cpCGIpt[0] == NUL + && cpCGIqs[0] == NUL + && optind == argc-1 ) { + + /* stand-alone filter, source as argument: + either manually on the console or via shebang */ + source = argv[optind]; + mode = (mode == MODE_UNKNOWN ? MODE_FILTER : mode); + + /* provide flexibility by recognizing "-" for stdin */ + if (stringEQ(source, "-")) { + /* store stdin to tmpfile */ + source = mytmpfile("ePerl.stdin"); + if ((fp = fopen(source, "w")) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open tmpfile `%s' for writing", source); + CU(EX_IOERR); + } + while ((c = fgetc(stdin)) != EOF) { + fputc(c, fp); + } + fclose(fp); fp = NULL; + + /* stdin script implies keeping of cwd */ + keepcwd = TRUE; + } + } + /* + * Any other calling environment is an error... + */ + else { + fprintf(stderr, "ePerl:Error: Missing required file to process\n"); + fprintf(stderr, "ePerl:Error: Use either a filename, `-' for STDIN or PATH_TRANSLATED.\n"); + fprintf(stderr, "Try `%s --help' for more information.\n", progname); + myexit(EX_USAGE); + } + + /* set default delimiters */ + if (ePerl_begin_delimiter == NULL) { + if (mode == MODE_FILTER) + ePerl_begin_delimiter = BEGIN_DELIMITER_FILTER; + else + ePerl_begin_delimiter = BEGIN_DELIMITER_CGI; + } + if (ePerl_end_delimiter == NULL) { + if (mode == MODE_FILTER) + ePerl_end_delimiter = END_DELIMITER_FILTER; + else + ePerl_end_delimiter = END_DELIMITER_CGI; + } + if (fNoCase) + ePerl_case_sensitive_delimiters = FALSE; + else + ePerl_case_sensitive_delimiters = TRUE; + + /* the built-in GIF images */ + if ((mode == MODE_CGI || mode == MODE_NPHCGI) && (cp = getenv("PATH_INFO")) != NULL) { + if (stringEQ(cp, "/logo.gif")) { + give_img_logo(); + myexit(0); + } + else if (stringEQ(cp, "/powered.gif")) { + give_img_powered(); + myexit(0); + } + } + + /* CGI modes imply + - Preprocessor usage + - HTML entity conversions + - adding of DOCUMENT_ROOT to include paths */ + if (mode == MODE_CGI || mode == MODE_NPHCGI) { + fPP = TRUE; + ePerl_convert_entities = TRUE; + if ((cp = getenv("DOCUMENT_ROOT")) != NULL) + RememberINC(cp); + } + + /* check for valid source file */ + if (*source == NUL) { + PrintError(mode, "", NULL, NULL, "Filename is empty"); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + + /* check for existing source file */ + if ((stat(source, &st)) != 0) { + PrintError(mode, source, NULL, NULL, "File `%s' not exists", source); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + + /* + * Security Checks for the CGI modes + */ + if (mode == MODE_CGI || mode == MODE_NPHCGI) { + + /* + * + * == General Security == + * + */ + + /* general security check: allowed file extension */ + if (CGI_NEEDS_ALLOWED_FILE_EXT) { + allow = FALSE; + n = strlen(source); + for (i = 0; allowed_file_ext[i] != NULL; i++) { + k = strlen(allowed_file_ext[i]); + if (stringEQ(source+n-k, allowed_file_ext[i])) + allow = TRUE; + } + if (!allow) { + PrintError(mode, source, NULL, NULL, "File `%s' is not allowed to be interpreted by ePerl (wrong extension!)", source); + CU(EX_OK); + } + } + + /* + * + * == Perl Security == + * + */ + + /* perhaps force Taint mode */ + if (CGI_MODES_FORCE_TAINTING) + fTaint = TRUE; + + /* perhaps force Warnings */ + if (CGI_MODES_FORCE_WARNINGS) + fWarn = TRUE; + + /* + * + * == UID/GID switching == + * + */ + + /* we can only do a switching if we have euid == 0 (root) */ + if (geteuid() == 0) { + + fOkSwitch = TRUE; + + /* get our real user id (= caller uid) */ + uid = getuid(); + + /* security check: valid caller uid */ + pw = getpwuid(uid); + if (SETUID_NEEDS_VALID_CALLER_UID && pw == NULL) { + if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { + PrintError(mode, source, NULL, NULL, "Invalid UID %d of caller", uid); + CU(EX_OK); + } + else + fOkSwitch = FALSE; + } + else { + /* security check: allowed caller uid */ + if (SETUID_NEEDS_ALLOWED_CALLER_UID) { + allow = FALSE; + for (i = 0; allowed_caller_uid[i] != NULL; i++) { + if (isdigit(allowed_caller_uid[i][0])) + pw2 = getpwuid(atoi(allowed_caller_uid[i])); + else + pw2 = getpwnam(allowed_caller_uid[i]); + if (stringEQ(pw->pw_name, pw2->pw_name)) { + allow = TRUE; + break; + } + } + if (!allow) { + if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { + PrintError(mode, source, NULL, NULL, "UID %d of caller not allowed", uid); + CU(EX_OK); + } + else + fOkSwitch = FALSE; + } + } + } + + /* security check: valid owner UID */ + pw = getpwuid(st.st_uid); + if (SETUID_NEEDS_VALID_OWNER_UID && pw == NULL) + if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { + PrintError(mode, source, NULL, NULL, "Invalid UID %d of owner", st.st_uid); + CU(EX_OK); + } + else + fOkSwitch = FALSE; + else + uid = pw->pw_uid; + + /* security check: valid owner GID */ + gr = getgrgid(st.st_gid); + if (SETUID_NEEDS_VALID_OWNER_GID && gr == NULL) + if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { + PrintError(mode, source, NULL, NULL, "Invalid GID %d of owner", st.st_gid); + CU(EX_OK); + } + else + fOkSwitch = FALSE; + else + gid = gr->gr_gid; + + /* security check: file has to stay below owner homedir */ + if (fOkSwitch && SETUID_NEEDS_BELOW_OWNER_HOME) { + /* preserve current working directory */ + cwd2 = getcwd(NULL, 1024); + + /* determine physical homedir of owner */ + pw = getpwuid(st.st_uid); + if (chdir(pw->pw_dir) == -1) { + if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { + PrintError(mode, source, NULL, NULL, "Invalid homedir ``%s'' of file owner", pw->pw_dir); + CU(EX_OK); + } + else + fOkSwitch = FALSE; + } + else { + dir_home = getcwd(NULL, 1024); + + /* determine physical dir of file */ + strcpy(dir_tmp, source); + if ((cp = strrchr(dir_tmp, '/')) == NULL) { + if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { + PrintError(mode, source, NULL, NULL, "Invalid script ``%s'': no absolute path", source); + CU(EX_OK); + } + else + fOkSwitch = FALSE; + } + else { + *cp = NUL; + if (chdir(dir_tmp) == -1) { + if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { + PrintError(mode, source, NULL, NULL, "Invalid script ``%s'': cannot chdir to its location", source); + CU(EX_OK); + } + else + fOkSwitch = FALSE; + } + else { + dir_script = getcwd(NULL, 1024); + + /* dir_home has to be a prefix of dir_script */ + if (strncmp(dir_script, dir_home, strlen(dir_home)) < 0) { + if (DO_FOR_FAILED_STEP == STOP_AND_ERROR) { + PrintError(mode, source, NULL, NULL, "Invalid script ``%s'': does not stay below homedir of owner", source); + CU(EX_OK); + } + else + fOkSwitch = FALSE; + } + + free(dir_script); + } + } + free(dir_home); + } + + /* restore original cwd */ + chdir(cwd2); + + free(cwd2); + } + + if (fOkSwitch && uid != 0 && gid != 0) { + /* switch to new uid/gid */ + if (((setgid(gid)) != 0) || (initgroups(pw->pw_name,gid) != 0)) { + PrintError(mode, source, NULL, NULL, "Unable to set GID %d: setgid/initgroups failed", gid); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + if ((setuid(uid)) != 0) { + PrintError(mode, source, NULL, NULL, "Unable to set UID %d: setuid failed", uid); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + } + } + } + + /* Security! Eliminate effective root permissions if we are running setuid */ + if (geteuid() == 0) { + uid = getuid(); + gid = getgid(); +#ifdef HAVE_SETEUID + seteuid(uid); +#else + /* HP/UX and others eliminate the effective UID with setuid(uid) ! */ + setuid(uid); +#endif +#ifdef HAVE_SETEGID + setegid(uid); +#else + /* HP/UX and others eliminate the effective GID with setgid(gid) ! */ + setgid(gid); +#endif + } + + /* read source file into internal buffer */ + if ((cpBuf = ePerl_ReadSourceFile(source, &cpBuf, &nBuf)) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open source file `%s' for reading\n%s", source, ePerl_GetError); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + + /* strip shebang prefix */ + if (strncmp(cpBuf, "#!", 2) == 0) { + for (cpScript = cpBuf; + (*cpScript != ' ' && *cpScript != '\t' && *cpScript != '\n') && (cpScript-cpBuf < nBuf); + cpScript++) + ; + for (cpScript = cpBuf; + *cpScript != '\n' && (cpScript-cpBuf < nBuf); + cpScript++) + ; + cpScript++; + } + else + cpScript = cpBuf; + + /* now set the additional env vars */ + env = mysetenv(env, "SCRIPT_SRC_PATH", "%s", abspath(source)); + env = mysetenv(env, "SCRIPT_SRC_PATH_FILE", "%s", filename(source)); + env = mysetenv(env, "SCRIPT_SRC_PATH_DIR", "%s", abspath(dirname(source))); + if ((cpPath = getenv("PATH_INFO")) != NULL) { + if ((cpHost = getenv("SERVER_NAME")) == NULL) + cpHost = "localhost"; + cpPort = getenv("SERVER_PORT"); + if (stringEQ(cpPort, "80")) + cpPort = NULL; + sprintf(ca, "http://%s%s%s%s", + cpHost, cpPort != NULL ? ":" : "", cpPort != NULL ? cpPort : "", cpPath); + env = mysetenv(env, "SCRIPT_SRC_URL", "%s", ca); + env = mysetenv(env, "SCRIPT_SRC_URL_FILE", "%s", filename(ca)); + env = mysetenv(env, "SCRIPT_SRC_URL_DIR", "%s", dirname(ca)); + } + else { + env = mysetenv(env, "SCRIPT_SRC_URL", "file://%s", abspath(source)); + env = mysetenv(env, "SCRIPT_SRC_URL_FILE", "%s", filename(source)); + env = mysetenv(env, "SCRIPT_SRC_URL_DIR", "file://%s", abspath(source)); + } + + env = mysetenv(env, "SCRIPT_SRC_SIZE", "%d", nBuf); + stat(source, &st); + env = mysetenv(env, "SCRIPT_SRC_MODIFIED", "%d", st.st_mtime); + cp = ctime(&(st.st_mtime)); + cp[strlen(cp)-1] = NUL; + env = mysetenv(env, "SCRIPT_SRC_MODIFIED_CTIME", "%s", cp); + env = mysetenv(env, "SCRIPT_SRC_MODIFIED_ISOTIME", "%s", isotime(&(st.st_mtime))); + if ((pw = getpwuid(st.st_uid)) != NULL) + env = mysetenv(env, "SCRIPT_SRC_OWNER", "%s", pw->pw_name); + else + env = mysetenv(env, "SCRIPT_SRC_OWNER", "unknown-uid-%d", st.st_uid); + env = mysetenv(env, "VERSION_INTERPRETER", "%s", eperl_version.v_web); + env = mysetenv(env, "VERSION_LANGUAGE", "Perl/%s", AC_perl_vers); + + /* optionally run the ePerl preprocessor */ + if (fPP) { + /* switch to directory where script stays */ + getcwd(cwd, MAXPATHLEN); + strcpy(sourcedir, source); + for (cp = sourcedir+strlen(sourcedir); cp > sourcedir && *cp != '/'; cp--) + ; + *cp = NUL; + chdir(sourcedir); + /* run the preprocessor */ + if ((cpBuf3 = ePerl_PP(cpScript, RememberedINC)) == NULL) { + PrintError(mode, source, NULL, NULL, "Preprocessing failed for `%s': %s", source, ePerl_PP_GetError()); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + cpScript = cpBuf3; + /* switch to previous dir */ + chdir(cwd); + } + + /* convert bristled source to valid Perl code */ + if ((cpBuf2 = ePerl_Bristled2Plain(cpScript)) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot convert bristled code file `%s' to pure HTML", source); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + cpScript = cpBuf2; + + /* write buffer to temporary script file */ + strcpy(perlscript, mytmpfile("ePerl.script")); +#ifndef DEBUG_ENABLED + unlink(perlscript); +#endif + if ((fp = fopen(perlscript, "w")) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open Perl script file `%s' for writing", perlscript); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + fwrite(cpScript, strlen(cpScript), 1, fp); + fclose(fp); fp = NULL; + + /* in Debug mode output the script to the console */ + if (fDebug) { + if ((fp = fopen("/dev/tty", "w")) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open /dev/tty for debugging message"); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + fprintf(fp, "----internally created Perl script-----------------------------------\n"); + fwrite(cpScript, strlen(cpScript)-1, 1, fp); + if (cpScript[strlen(cpScript)-1] == '\n') + fprintf(fp, "%c", cpScript[strlen(cpScript)-1]); + else + fprintf(fp, "%c\n", cpScript[strlen(cpScript)-1]); + fprintf(fp, "----internally created Perl script-----------------------------------\n"); + fclose(fp); fp = NULL; + } + + /* open a file for Perl's STDOUT channel + and redirect stdout to the new channel */ + strcpy(perlstdout, mytmpfile("ePerl.stdout")); +#ifndef DEBUG_ENABLED + unlink(perlstdout); +#endif + if ((out = fopen(perlstdout, "w")) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open STDOUT file `%s' for writing", perlstdout); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + IO_redirect_stdout(out); + + /* open a file for Perl's STDERR channel + and redirect stderr to the new channel */ + strcpy(perlstderr, mytmpfile("ePerl.stderr")); +#ifndef DEBUG_ENABLED + unlink(perlstderr); +#endif + if ((er = fopen(perlstderr, "w")) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open STDERR file `%s' for writing", perlstderr); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + IO_redirect_stderr(er); + + /* now allocate the Perl interpreter */ + my_perl = perl_alloc(); + perl_construct(my_perl); + /* perl_destruct_level = 1; */ + + /* initialise the Perl Locale environment */ +#if AC_perl_vnum < 500400 + perl_init_i18nl14n(1); /* Perl 5.003 or lower */ +#else + perl_init_i18nl10n(1); /* Perl 5.004 or higher */ +#endif + + /* create command line... */ + myargc = 0; + /* - program name and possible -T -w options */ + myargv[myargc++] = progname; + if (fTaint) + myargv[myargc++] = "-T"; + if (fWarn) + myargv[myargc++] = "-w"; + /* - previously remembered Perl 5 INC entries (option -I) */ + for (i = 0; RememberedINC[i] != NULL; i++) { + myargv[myargc++] = "-I"; + myargv[myargc++] = RememberedINC[i]; + } + /* - and the script itself */ + myargv[myargc++] = perlscript; + + /* now parse the script! + NOTICE: At this point, the script gets + only _parsed_, not evaluated/executed! */ +#ifdef HAVE_PERL_DYNALOADER + rc = perl_parse(my_perl, Perl5_XSInit, myargc, myargv, env); +#else + rc = perl_parse(my_perl, NULL, myargc, myargv, env); +#endif + if (rc != 0) { + if (fCheck && mode == MODE_FILTER) { + fclose(er); er = NULL; + IO_restore_stdout(); + IO_restore_stderr(); + if ((cpBuf = ePerl_ReadErrorFile(perlstderr, perlscript, source)) != NULL) { + fprintf(stderr, cpBuf); + } + CU(EX_IOERR); + } + else { + fclose(er); er = NULL; + PrintError(mode, source, perlscript, perlstderr, "Perl parsing error (interpreter rc=%d)", rc); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + } + + /* Stop when we are just doing a syntax check */ + if (fCheck && mode == MODE_FILTER) { + fclose(er); er = NULL; + IO_restore_stdout(); + IO_restore_stderr(); + fprintf(stderr, "%s syntax OK\n", source); + CU(EX_OK); + } + + /* change to directory of script: + this actually is not important to us, but really useful + for the ePerl source file programmer!! */ + cwd[0] = NUL; + if (!keepcwd) { + /* if running as a Unix filter remember the cwd for outputfile */ + if (mode == MODE_FILTER) + getcwd(cwd, MAXPATHLEN); + /* determine dir of source file and switch to it */ + strcpy(sourcedir, source); + for (cp = sourcedir+strlen(sourcedir); cp > sourcedir && *cp != '/'; cp--) + ; + *cp = NUL; + chdir(sourcedir); + } + + /* Set the previously remembered Perl 5 scalars (option -d) */ + Perl5_SetRememberedScalars(); + + /* Force unbuffered I/O */ + Perl5_ForceUnbufferedStdout(); + + /* NOW IT IS TIME to evaluate/execute the script!!! */ + rc = perl_run(my_perl); + + /* pre-close the handles, to be able to check + its size and to be able to display the contents */ + fclose(out); out = NULL; + fclose(er); er = NULL; + + /* when the Perl interpreter failed or there + is data on stderr, we print a error page */ + if (stat(perlstderr, &st) == 0) + size = st.st_size; + else + size = 0; + if (rc != 0 || size > 0) { + PrintError(mode, source, perlscript, perlstderr, "Perl runtime error (interpreter rc=%d)", rc); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + + /* else all processing was fine, so + we read in the stdout contents */ + if ((cpOut = ePerl_ReadSourceFile(perlstdout, &cpOut, &nOut)) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open STDOUT file `%s' for reading", perlstdout); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + stat(perlstdout, &st); + + /* ok, now recover the stdout and stderr and + print out the real contents on stdout or outputfile */ + IO_restore_stdout(); + IO_restore_stderr(); + + /* if we are running as a NPH-CGI/1.1 script + we had to provide the HTTP reponse headers ourself */ + if (mode == MODE_NPHCGI) { + HTTP_PrintResponseHeaders(cpOut); + + /* if there are no HTTP header lines, we print a basic + Content-Type header which should be ok */ + if (!HTTP_HeadersExists(cpOut)) { + printf("Content-Type: text/html\n"); + printf("Content-Length: %d\n", nOut); + printf("\n"); + } + } + else if (mode == MODE_CGI) { + HTTP_StripResponseHeaders(&cpOut, &nOut); + + /* if there are no HTTP header lines, we print a basic + Content-Type header which should be ok */ + if (!HTTP_HeadersExists(cpOut)) { + printf("Content-Type: text/html\n"); + printf("Content-Length: %d\n", nOut); + printf("\n"); + } + } + else if (mode == MODE_FILTER) { + HTTP_StripResponseHeaders(&cpOut, &nOut); + } + + /* now when the request was not a HEAD request we create the output */ + cp = getenv("REQUEST_METHOD"); + if (! ((mode == MODE_CGI || mode == MODE_NPHCGI) && + cp != NULL && stringEQ(cp, "HEAD"))) { + if (outputfile != NULL && stringNE(outputfile, "-")) { + /* if we remembered current working dir, restore it now */ + if (mode == MODE_FILTER && cwd[0] != NUL) + chdir(cwd); + /* open outputfile and write out the data */ + if ((fp = fopen(outputfile, "w")) == NULL) { + PrintError(mode, source, NULL, NULL, "Cannot open output file `%s' for writing", outputfile); + CU(mode == MODE_FILTER ? EX_IOERR : EX_OK); + } + fwrite(cpOut, nOut, 1, fp); + fclose(fp); fp = NULL; + } + else { + /* data just goes to stdout */ + fwrite(cpOut, nOut, 1, stdout); + /* make sure that the data is out before we exit */ + fflush(stdout); + } + } + + CUS: /* the Clean Up Sequence */ + + /* Ok, the script got evaluated. Now we can destroy + and de-allocate the Perl interpreter */ + if (my_perl) { + perl_destruct(my_perl); + perl_free(my_perl); + } + + /* close all still open file handles */ + if (out) + fclose(out); + if (er) + fclose(er); + if (fp) + fclose(fp); + + /* de-allocate the script buffer */ + if (cpBuf) + free(cpBuf); + if (cpBuf2) + free(cpBuf2); + if (cpOut) + free(cpOut); + + /* remove temporary files */ +#ifndef DEBUG_ENABLED + if (*perlstderr != NUL) + unlink(perlstderr); + if (*perlstdout != NUL) + unlink(perlstdout); + if (*perlscript != NUL) + unlink(perlscript); +#endif + + myexit(EXRC); + return EXRC; /* make -Wall happy ;-) */ +} + +/*EOF*/ Index: ossp-pkg/eperl/eperl_perl5.c RCS File: /v/ossp/cvs/ossp-pkg/eperl/eperl_perl5.c,v co -q -kk -p'1.2' '/v/ossp/cvs/ossp-pkg/eperl/eperl_perl5.c,v' | diff -u /dev/null - -L'ossp-pkg/eperl/eperl_perl5.c' 2>/dev/null --- ossp-pkg/eperl/eperl_perl5.c +++ - 2024-04-28 17:27:19.169980541 +0200 @@ -0,0 +1,152 @@ +/* +** ____ _ +** ___| _ \ ___ _ __| | +** / _ \ |_) / _ \ '__| | +** | __/ __/ __/ | | | +** \___|_| \___|_| |_| +** +** ePerl -- Embedded Perl 5 Language +** +** ePerl interprets an ASCII file bristled with Perl 5 program statements +** by evaluating the Perl 5 code while passing through the plain ASCII +** data. It can operate both as a standard Unix filter for general file +** generation tasks and as a powerful Webserver scripting language for +** dynamic HTML page programming. +** +** ====================================================================== +** +** Copyright (c) 1996,1997,1998 Ralf S. Engelschall +** +** This program is free software; it may be redistributed and/or modified +** only under the terms of either the Artistic License or the GNU General +** Public License, which may be found in the ePerl source distribution. +** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive +** a built-in copy of both license files. +** +** This program is distributed in the hope that it will be useful, but +** WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the +** Artistic License or the GNU General Public License for more details. +** +** ====================================================================== +** +** eperl_perl5.c -- ePerl Perl5 related stuff +*/ + +#include "eperl_config.h" +#include "eperl_global.h" +#include "eperl_perl5.h" +#include "eperl_perl5_sm.h" +#include "eperl_proto.h" + +#ifdef HAVE_PERL_DYNALOADER + +extern void boot_DynaLoader _((CV* cv)); + +/* +** +** the Perl XS init function for dynamic library loading +** +*/ +void Perl5_XSInit(void) +{ + char *file = __FILE__; + /* dXSUB_SYS; */ + /* dummy = 0; */ /* make gcc -Wall happy ;-) */ + + /* do newXS() the available modules */ + DO_NEWXS_STATIC_MODULES +} +#endif /* HAVE_PERL_DYNALOADER */ + +/* +** +** Force Perl to use unbuffered I/O +** +*/ +void Perl5_ForceUnbufferedStdout(void) +{ +#if AC_perl_vnum < 500476 + IoFLAGS(GvIOp(defoutgv)) |= IOf_FLUSH; /* $|=1 */ +#else + dTHR; + IoFLAGS(GvIOp(PL_defoutgv)) |= IOf_FLUSH; /* $|=1 */ +#endif + return; +} + +/* +** +** set a Perl environment variable +** +*/ +char **Perl5_SetEnvVar(char **env, char *str) +{ + char ca[1024]; + char *cp; + + strcpy(ca, str); + cp = strchr(ca, '='); + *cp++ = '\0'; + return mysetenv(env, ca, cp); +} + +/* +** +** sets a Perl scalar variable +** +*/ +void Perl5_SetScalar(char *pname, char *vname, char *vvalue) +{ +#if AC_perl_vnum >= 500476 + dTHR; +#endif + ENTER; + save_hptr(&curstash); + curstash = gv_stashpv(pname, TRUE); + sv_setpv(perl_get_sv(vname, TRUE), vvalue); + LEAVE; + return; +} + +/* +** +** remember a Perl scalar variable +** and set it later +** +** (this is needed because we have to +** remember the scalars when parsing +** the command line, but actually setting +** them can only be done later when the +** Perl 5 interpreter is allocated !!) +** +*/ + +char *Perl5_RememberedScalars[1024] = { NULL }; + +void Perl5_RememberScalar(char *str) +{ + int i; + + for (i = 0; Perl5_RememberedScalars[i] != NULL; i++) + ; + Perl5_RememberedScalars[i++] = strdup(str); + Perl5_RememberedScalars[i++] = NULL; + return; +} + +void Perl5_SetRememberedScalars(void) +{ + char ca[1024]; + char *cp; + int i; + + for (i = 0; Perl5_RememberedScalars[i] != NULL; i++) { + strcpy(ca, Perl5_RememberedScalars[i]); + cp = strchr(ca, '='); + *cp++ = '\0'; + Perl5_SetScalar("main", ca, cp); + } +} + +/*EOF*/