that addresses the notorious "Additional libraries" question.
p4raw-id: //depot/cfgperl@3597
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Mon Jul 5 02:09:55 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Mon Jul 5 22:55:23 EET DST 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
runnm=''
usenm=''
useperlio=''
+usesocks=''
d_oldpthreads=''
usethreads=''
incpath=''
: 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.
'') 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
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`;
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=' ';;
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";;
while read cline; do
name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
case "\$name" in
- *[/\\\\]\$wanted) echo "\$name"; exit 1;;
- *[\\\\/]\$wanted) echo "\$name"; exit 1;;
- *) exit 2;;
+ *[/\\\\]\$wanted) echo "\$name"; exit 0;;
+ *[\\\\/]\$wanted) echo "\$name"; exit 0;;
+ *) name='';;
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;
-if test \$status -eq 1; then
- exit 0;
-fi
-exit 1
+case "\$name" in
+'') exit 1;;
+esac
EOF
chmod +x findhdr
-
: define an alternate in-header-list? function
inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
cont=true; xxf="echo \"<\$1> found.\" >&4";
set ebcdic
eval $setvar
+echo " "
$cat >&4 <<EOM
Checking how to flush all pending stdio output...
EOM
useposix='$useposix'
usesfio='$usesfio'
useshrplib='$useshrplib'
+usesocks='$usesocks'
usethreads='$usethreads'
usevfork='$usevfork'
usrinc='$usrinc'
This variable is set to 'yes' if the user wishes
to build a shared libperl, and 'no' otherwise.
+usesocks (usesocks.U):
+ This variable conditionally defines the USE_SOCKS symbol,
+ and indicates that Perl should be built to use SOCKS.
+
usethreads (usethreads.U):
This variable conditionally defines the USE_THREADS symbol,
and indicates that Perl should be built to use threads.
# Package name : perl5
# Source directory : .
-# Configuration time: Mon Jul 5 02:12:38 EET DST 1999
+# Configuration time: Mon Jul 5 22:50:29 EET DST 1999
# Configured by : jhi
# Target system : osf1 alpha.hut.fi v4.0 878 alpha
ccsymbols='__LANGUAGE_C__=1 _LONGLONG=1 LANGUAGE_C=1 SYSTYPE_BSD=1'
cf_by='jhi'
cf_email='yourname@yourhost.yourplace.com'
-cf_time='Mon Jul 5 02:12:38 EET DST 1999'
+cf_time='Mon Jul 5 22:50:29 EET DST 1999'
chgrp=''
chmod=''
chown=''
useposix='true'
usesfio='false'
useshrplib='true'
+usesocks='undef'
usethreads='define'
usevfork='false'
usrinc='/usr/include'
/*
* Package name : perl5
* Source directory : .
- * Configuration time: Mon Jul 5 02:12:38 EET DST 1999
+ * Configuration time: Mon Jul 5 22:50:29 EET DST 1999
* Configured by : jhi
* Target system : osf1 alpha.hut.fi v4.0 878 alpha
*/
*/
/*#define USE_PERLIO / **/
+/* USE_SOCKS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use socks.
+ */
+/*#define USE_SOCKS / **/
+
/* HAS_DRAND48_PROTO:
* This symbol, if defined, indicates that the system provides
* a prototype for the drand48() function. Otherwise, it is up
*/
#$useperlio USE_PERLIO /**/
+/* USE_SOCKS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use socks.
+ */
+#$usesocks USE_SOCKS /**/
+
/* HAS_DRAND48_PROTO:
* This symbol, if defined, indicates that the system provides
* a prototype for the drand48() function. Otherwise, it is up
#if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */
# include <sys/socket.h>
-# if (defined(SOCKS) || defined(USE_SOCKS)) && defined(I_SOCKS)
+# if defined(USE_SOCKS) && defined(I_SOCKS)
# include <socks.h>
# endif
# ifdef I_NETBSD
# include <sys/types.h>
# endif
# include <sys/socket.h>
-# if (defined(SOCKS) || defined(USE_SOCKS)) && defined(I_SOCKS)
+# if defined(USE_SOCKS) && defined(I_SOCKS)
# include <socks.h>
# endif
# ifdef MPE
#
# - use nm in AIX 43x and above
# - gcc + threads now builds
-# - added support for socks, when Dccflags=-DSOCKS specified
+# [(added support for socks) Jul 99 SOCKS support rewritten]
#
# Notes:
#
;;
esac
-# Save this for backward compatibility for now.
-# Configure already (5.005_58) knows how to probe for
-# <socks.h> and libsocks. What sucks is that the name
-# of the socks library seems to be version dependent
-# (e.g. libsocks5), bleagh.
-#
-# if $ccflags contains -DSOCKS, then add socks library support.
-#
-# It is expected that libsocks.a resides in /usr/local/lib and that
-# socks.h resides in /usr/local/include. If these files live some
-# different place then modify
-#
-
-for arg in $ccflags ; do
-
- if [ "$arg" = "-DSOCKS" ] ; then
-
- sockslib=socks5
- incpath=/usr/local/include
- libpath=/usr/local/lib
-
- lddlflags="$lddlflags -l$sockslib"
-
- # setting $libs here breaks the optional libraries search
- # for some reason, so use $libswanted instead
- #libs="$libs -lsocks5"
-
- libswanted="$libswanted $sockslib"
-
- #
- # path for include file
- #
-
- locincpth="$locincpath /usr/local/include"
-
- #
- # path for library not needed, if in /usr/local/lib as that
- # directory is already searched.
- #
-
- #loclibpth="$loclibpath /usr/local/lib"
-
- break
-
- fi
-
-done
-
# This script UU/usethreads.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use threads.
cat > UU/usethreads.cbu <<'EOCBU'
init_os_extras(aTHX);
#endif
+#ifdef USE_SOCKS
+ SOCKSinit(argv[0]);
+#endif
+
init_predump_symbols();
/* init_postdump_symbols not currently designed to be called */
/* more than once (ENV isn't cleared first, for example) */
#if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */
# include <sys/socket.h>
-# if (defined(SOCKS) || defined(USE_SOCKS)) && defined(I_SOCKS)
+# if defined(USE_SOCKS) && defined(I_SOCKS)
# include <socks.h>
# endif
# ifdef I_NETDB