Put back the cygwin32 Configure fix of 3582 undone by 3597.
[p5sagit/p5-mst-13.2.git] / Configure
index 2c717fe..22f6dd8 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Sat May 29 13:37:18 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Tue Jul  6 11:02:34 EET DST 1999 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -628,6 +628,7 @@ d_pwquota=''
 i_pwd=''
 i_sfio=''
 i_shadow=''
+i_socks=''
 i_stddef=''
 i_stdlib=''
 i_string=''
@@ -817,6 +818,7 @@ nm_so_opt=''
 runnm=''
 usenm=''
 useperlio=''
+usesocks=''
 d_oldpthreads=''
 usethreads=''
 incpath=''
@@ -950,6 +952,7 @@ useposix=true
 : set useopcode=false in your hint file to disable the Opcode extension.
 useopcode=true
 : set usemultiplicity on the Configure command line to enable multiplicity.
+: set usesocks on the Configure command line to enable socks.
 : set usethreads on the Configure command line to enable threads.
 : List of libraries we want.
 : If anyone needs -lnet, put it in a hint file.
@@ -2627,7 +2630,7 @@ case "$use64bits" in
                . ./use64bits.cbu
        fi
        case "$osname" in
-       dec_osf|hpux|irix|solaris|unicos)
+       aix|dec_osf|hpux|irix|solaris|unicos)
                # Known 64-bit capable platforms.
                ;;
        *)
@@ -3625,7 +3628,7 @@ int main() {
        exit(0);
 }
 EOM
-if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
+if $cc -o gccvers gccvers.c; then
        gccversion=`./gccvers`
        case "$gccversion" in
        '') echo "You are not using GNU cc." ;;
@@ -3945,6 +3948,27 @@ case "$firstmakefile" in
 '') firstmakefile='makefile';;
 esac
 
+cat <<EOM
+
+Perl can be built to use the SOCKS proxy protocol library.  To do so,
+Configure must be run with -Dusesocks.
+
+Normally you do not need this and you should answer no.
+
+EOM
+case "$usesocks" in
+$define|true|[yY]*)    dflt='y';;
+*) dflt='n';;
+esac
+rp='Build Perl for SOCKS?'
+. ./myread
+case "$ans" in
+y|Y)   val="$define" ;;     
+*)      val="$undef" ;;
+esac
+set usesocks
+eval $setvar
+
 : Looking for optional libraries
 echo " "
 echo "Checking for optional libraries..." >&4
@@ -3955,6 +3979,11 @@ esac
 case "$libswanted" in
 '') libswanted='c_s';;
 esac
+case "$usesocks" in
+$define)
+       libswanted="$libswanted socks5 socks5_sh"
+       ;;
+esac
 for thislib in $libswanted; do
        
        if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`;
@@ -4010,20 +4039,14 @@ case "$dflt" in
 esac
 
 $cat <<EOM
-Some versions of Unix support shared libraries, which make executables smaller
-but make load time slightly longer.
-
-On some systems, mostly System V Release 3's, the shared library is included
-by putting the option "-lc_s" as the last thing on the cc command line when
-linking.  Other systems use shared libraries by default.  There may be other
-libraries needed to compile $package on your machine as well.  If your system
-needs the "-lc_s" option, include it here.  Include any other special libraries
-here as well.  Say "none" for none.
+
+In order to compile $package on your machine, a number of libraries
+are usually needed.  Include any other special libraries here as well.
+Say "none" for none.  The default list is almost always right.
 EOM
 
 echo " "
-rp="Any additional libraries?"
+rp="What libraries to use?"
 . ./myread
 case "$ans" in
 none) libs=' ';;
@@ -4105,6 +4128,12 @@ fi'
 
 set signal.h LANGUAGE_C; eval $inctest
 
+case "$usesocks" in
+$define)
+       ccflags="$ccflags -DSOCKS"
+       ;;
+esac
+
 case "$hint" in
 none|recommended) dflt="$ccflags $dflt" ;;
 *) dflt="$ccflags";;
@@ -4368,15 +4397,22 @@ $grep "^[       ]*#.*\$wanted" | \
 while read cline; do
        name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
        case "\$name" in
-       *[/\\\\]\$wanted) echo "\$name"; exit 0;;
-       *[\\\\/]\$wanted) echo "\$name"; exit 0;;
-       *) name='';;
+       *[/\\\\]\$wanted) echo "\$name"; exit 1;;
+       *[\\\\/]\$wanted) echo "\$name"; exit 1;;
+       *) exit 2;;
        esac;
 done;
+#
+# status = 0: grep returned 0 lines, case statement not executed
+# status = 1: headerfile found
+# status = 2: while loop executed, no headerfile found
+#
+status=\$?
 $rm -f foo\$\$.c;
-case "\$name" in
-'') exit 1;;
-esac
+if test \$status -eq 1; then
+       exit 0;
+fi
+exit 1
 EOF
 chmod +x findhdr
 
@@ -10983,6 +11019,7 @@ $rm -f tebcdic.c tebcdic
 set ebcdic
 eval $setvar
 
+echo " "
 $cat >&4 <<EOM
 Checking how to flush all pending stdio output...
 EOM
@@ -11023,7 +11060,7 @@ int main() {
 #  if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
     open_max = sysconf(_SC_OPEN_MAX);
 #  else
-#  ifdef FOPEN_MAX
+#   ifdef FOPEN_MAX
     open_max = FOPEN_MAX;
 #   else
 #    ifdef OPEN_MAX
@@ -11035,6 +11072,7 @@ int main() {
 #    endif
 #   endif
 #  endif
+# endif 
 # ifdef HAS_STDIO_STREAM_ARRAY
     if (open_max > 0) {
       long i;
@@ -11054,8 +11092,8 @@ EOCP
 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
     output=''
     set try -DTRY_FPUTC
-    $rm -f try.out
     if eval $compile; then
+           $rm -f try.out
            ./try$exe_ext 2>/dev/null
            if $test ! -s try.out -a "X$?" = X42; then
                output=-DTRY_FPUTC
@@ -11066,6 +11104,7 @@ if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
            set try -DTRY_FPRINTF
            $rm -f try.out
            if eval $compile; then
+                   $rm -f try.out
                    ./try$exe_ext 2>/dev/null
                    if $test ! -s try.out -a "X$?" = X42; then
                        output=-DTRY_FPRINTF
@@ -11077,8 +11116,8 @@ fi
 : check for fflush NULL behaviour
 case "$fflushNULL" in
 '')    set try -DTRY_FFLUSH_NULL $output
-       $rm -f try.out
        if eval $compile; then
+               $rm -f try.out
                ./try$exe_ext 2>/dev/null
                code="$?"
                if $test -s try.out -a "X$code" = X42; then
@@ -11124,11 +11163,11 @@ case "$fflushNULL" in
        : check for fflush all behaviour
        case "$fflushall" in
        '')     set try -DTRY_FFLUSH_ALL $output
-               $rm -f try.out
                if eval $compile; then
-               $cat >&4 <<EOM
+                       $cat >&4 <<EOM
 (Now testing the other method--but note that also this may fail.)
 EOM
+                       $rm -f try.out
                        ./try$exe_ext 2>/dev/null
                        if $test -s try.out -a "X$?" = X42; then
                                fflushall="`$cat try.out`"
@@ -12415,6 +12454,10 @@ val=$val3; set i_termios; eval $setvar
 set shadow.h i_shadow
 eval $inhdr
 
+: see if this is a socks.h system
+set socks.h i_socks
+eval $inhdr
+
 : see if stdarg is available
 echo " "
 if $test `./findhdr stdarg.h`; then
@@ -13328,6 +13371,7 @@ i_rpcsvcdbm='$i_rpcsvcdbm'
 i_sfio='$i_sfio'
 i_sgtty='$i_sgtty'
 i_shadow='$i_shadow'
+i_socks='$i_socks'
 i_stdarg='$i_stdarg'
 i_stddef='$i_stddef'
 i_stdlib='$i_stdlib'
@@ -13553,6 +13597,7 @@ useperlio='$useperlio'
 useposix='$useposix'
 usesfio='$usesfio'
 useshrplib='$useshrplib'
+usesocks='$usesocks'
 usethreads='$usethreads'
 usevfork='$usevfork'
 usrinc='$usrinc'