rse 98/04/04 08:42:46
Modified: src Configure Log: Make the Perl interpreter check for the DSO fallback more robust by avoiding confusing "perl: not found" messages. Although it worked correctly this really makes the user think Perl is required for shared object support which is not the case. Revision Changes Path 1.227 +36 -22 apache-1.3/src/Configure Index: Configure =================================================================== RCS file: /export/home/cvs/apache-1.3/src/Configure,v retrieving revision 1.226 retrieving revision 1.227 diff -u -r1.226 -r1.227 --- Configure 1998/04/04 16:21:23 1.226 +++ Configure 1998/04/04 16:42:45 1.227 @@ -811,28 +811,42 @@ ## We take a second chance by guessing the compiler ## and linker flags from the Perl installation ## if it exists. - if [ ".`perl -V:dlsrc 2>/dev/null | grep dlopen`" != . ]; then - # cool, Perl is installed on this platform - # and actually uses the dlopen-style interface, - # so we can guess the flags from its knowledge - CFLAGS_SHLIB="`perl -V:cccdlflags | cut -d\' -f2`" - LDFLAGS_SHLIB="`perl -V:lddlflags | cut -d\' -f2`" - LDFLAGS_SHLIB_EXPORT="`perl -V:ccdlflags | cut -d\' -f2`" - # but additionally we have to inform the - # user that we are just guessing the flags - echo "" - echo "** WARNING: We have no explicit knowledge about shared object" - echo "** support for your particular platform. But perhaps you have" - echo "** luck: We were able to guess the compiler and linker flags" - echo "** for creating shared objects from your Perl installation." - echo "** If they actually work, please send the following information" - echo "** for inclusion into later releases to [EMAIL PROTECTED] or" - echo "** make a suggestion report at http://bugs.apache.org/:" - echo "** PLATFORM=$PLAT" - echo "** CFLAGS_SHLIB=$CFLAGS_SHLIB" - echo "** LDFLAGS_SHLIB=$LDFLAGS_SHLIB" - echo "** LDFLAGS_SHLIB_EXPORT=$LDFLAGS_SHLIB_EXPORT" - echo "" + PERL= + for dir in `echo $PATH | sed -e 's/:/ /g'` + do + if [ -f "$dir/perl5" ]; then + PERL="$dir/perl5" + break + fi + if [ -f "$dir/perl" ]; then + PERL="$dir/perl" + break + fi + done + if [ ".$PERL" != . ]; then + # cool, Perl is installed on this platform... + if [ ".`$PERL -V:dlsrc 2>/dev/null | grep dlopen`" != . ]; then + # ...and actually uses the dlopen-style interface, + # so we can guess the flags from its knowledge + CFLAGS_SHLIB="`perl -V:cccdlflags | cut -d\' -f2`" + LDFLAGS_SHLIB="`perl -V:lddlflags | cut -d\' -f2`" + LDFLAGS_SHLIB_EXPORT="`perl -V:ccdlflags | cut -d\' -f2`" + # but additionally we have to inform the + # user that we are just guessing the flags + echo "" + echo "** WARNING: We have no explicit knowledge about shared object" + echo "** support for your particular platform. But perhaps you have" + echo "** luck: We were able to guess the compiler and linker flags" + echo "** for creating shared objects from your Perl installation." + echo "** If they actually work, please send the following information" + echo "** for inclusion into later releases to [EMAIL PROTECTED] or" + echo "** make a suggestion report at http://bugs.apache.org/:" + echo "** PLATFORM=$PLAT" + echo "** CFLAGS_SHLIB=$CFLAGS_SHLIB" + echo "** LDFLAGS_SHLIB=$LDFLAGS_SHLIB" + echo "** LDFLAGS_SHLIB_EXPORT=$LDFLAGS_SHLIB_EXPORT" + echo "" + fi fi ;; esac