# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Thu Jul 22 22:55:08 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Fri Jul 23 13:08:17 EET DST 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
d_telldir64=''
d_truncate64=''
libc=''
+ldlibpthname=''
libperl=''
shrpenv=''
useshrplib=''
. ./myread
case "$ans" in
true|$define|[Yy]*)
- useshrplib='true'
- # Why does next4 have to be so different?
- case "${osname}${osvers}" in
- next4*|rhapsody*)
- xxx='DYLD_LIBRARY_PATH' ;;
- os2*) xxx='' ;; # Nothing special needed.
- beos*) xxx='' ;;
- *) xxx='LD_LIBRARY_PATH' ;;
- esac
- ;;
+ useshrplib='true' ;;
*) useshrplib='false' ;;
esac
;;
;;
esac
fi
+# Fix ccdlflags in AIX for building external extensions.
+# (For building Perl itself bare -bE:perl.exp is needed,
+# Makefile.SH takes care of this.)
case "$osname" in
-aix*) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
+aix) ccdlflags="$ccdlflags -bE:$installarchlib/CORE/perl.exp" ;;
esac
# Respect a hint or command-line value.
case "$shrpenv" in
'') shrpenv="$tmp_shrpenv" ;;
esac
+case "$ldlibpthname" in
+'') ldlibpthname=LD_LIBRARY_PATH ;;
+none) ldlibpthname='' ;;
+esac
: determine where manual pages go
set man1dir man1dir none
echo "You have EBCDIC." >&4
val="$define"
else
- echo "Nope, no EBCDIC. Assuming ASCII or some ISO Latin." >&4
+ echo "Nope, no EBCDIC. Assuming ASCII or some ISO Latin, or UTF." >&4
fi
else
echo "I'm unable to compile the test program." >&4
ld='$ld'
lddlflags='$lddlflags'
ldflags='$ldflags'
+ldlibpthname='$ldlibpthname'
less='$less'
lib_ext='$lib_ext'
libc='$libc'
case "$useshrplib" in
true)
# Prefix all runs of 'miniperl' and 'perl' with
- # $ldlibpth so that ./perl finds *this* libperl.so.
+ # $ldlibpth so that ./perl finds *this* shared libperl.
ldlibpth="LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH"
pldlflags="$cccdlflags"
- # NeXT-4 specific stuff. Can't we do this in the hint file?
case "${osname}${osvers}" in
next4*)
ld=libtool
lddlflags="-dynamic -undefined warning -framework System \
-compatibility_version 1 -current_version $patchlevel \
-prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@"
- # NeXT uses a different name.
- ldlibpth="DYLD_LIBRARY_PATH=`pwd`:$DYLD_LIBRARY_PATH"
;;
- rhapsody*)
- ldlibpth="DYLD_LIBRARY_PATH=`pwd`/Perl:$DYLD_LIBRARY_PATH"
- ;;
- cygwin*) ldlibpth="PATH='`pwd`:$PATH'"
+ cygwin*)
linklibperl="-lperl"
;;
- os2*) # OS/2 doesn't need anything special for LD_LIBRARY_PATH.
- ldlibpth=''
- ;;
sunos*)
linklibperl="-lperl"
;;
esac
shrpldflags="$shrpldflags $ldflags $libs $cryptlib"
linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
- ldlibpth="LIBPATH=`pwd`:${LIBPATH}"
;;
hpux*)
linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl"
- ldlibpth="SHLIB_PATH=`pwd`:${SHLIB_PATH}"
- ;;
- beos*) ldlibpth="LIBRARY_PATH=`pwd`:$LIBRARY_PATH"
;;
esac
+ case "$ldlibpthname" in
+ '') ;;
+ *)
+ case "$osname" in
+ os2)
+ ldlibpth=''
+ ;;
+ rhapsody)
+ eval "ldlibpth=\"$ldlibpthname=`pwd`/Perl:\$$ldlibpthname\""
+ ;;
+ *)
+ eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
+ ;;
+ esac
+ ;;
+ esac
;;
*) pldlflags=''
;;
SHRPENV = $shrpenv
# The following is used to include the current directory in
-# LD_LIBRARY_PATH if you are building a shared libperl.so.
+# the dynamic loader path you are building a shared libperl.
LDLIBPTH = $ldlibpth
dynamic_ext = $dynamic_list
print OUT <<'EOT';
-# Add to @dl_library_path any extra directories we can gather from
-# environment variables. So far LD_LIBRARY_PATH is the only known
-# variable used for this purpose. Others may be added later.
+# Add to @dl_library_path any extra directories we can gather
+# from environment variables.
+push(@dl_library_path, split(/:/, $ENV{$Config::Config{ldlibpthname}}))
+ if exists $Config::Config{ldlibpthname} &&
+ $Config::Config{ldlibpthname} ne '' &&
+ exists $ENV{$Config::Config{ldlibpthname}} ;;
+# E.g. HP-UX supports both its native SHLIB_PATH *and* LD_LIBRARY_PATH.
push(@dl_library_path, split(/:/, $ENV{LD_LIBRARY_PATH}))
- if $ENV{LD_LIBRARY_PATH};
-
+ if exists $ENV{LD_LIBRARY_PATH};
# No prizes for guessing why we don't say 'bootstrap DynaLoader;' here.
boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) &&
# the required -bE:$installarchlib/CORE/perl.exp is added by
# libperl.U (Configure) later.
+case "$ldlibpthname" in
+'') ldlibpthname=LIBPATH ;;
+esac
+
# The first 3 options would not be needed if dynamic libs. could be linked
# with the compiler instead of ld.
# -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary
# Of course, this may also change with R5.
export PATH="$PATH:$PWD/beos"
+
+case "$ldlibpthname" in
+'') ldlibpthname=LIBRARY_PATH ;;
+esac
man1dir=/usr/local/man/man1
man3dir=/usr/local/man/man3
sitelib=/usr/local/lib/perl5/site_perl
+
+case "$ldlibpthname" in
+'') ldlibpthname=PATH ;;
+esac
# as it would suck to try to get support if the vendor learned that you
# were physically replacing the system binaries.
#
-# Be aware that if you opt to use dynamic loading you'll need to set
-# your $LD_LIBRARY_PATH to include the source directory when you build,
-# test and install the software.
-#
# -Roderick Schertler <roderick@argon.org>
-
# Here are the things from some old DGUX hints files which are different
# from what's in here now. I don't know the exact reasons that most of
# these settings were in the hints files, presumably they can be chalked
# We _do_ want the -L paths in ldflags, but we don't want the -non_shared.
lddlflags=`echo $lddlflags | sed 's/-non_shared//'`
-cat <<'EOM' >&4
-
-If you wish to use dynamic linking, you must use
- LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH
-or
- setenv LD_LIBRARY_PATH `pwd`
-before running make.
-
-EOM
rm -f /tmp/esix$$
fi
-cat <<'EOM' >&4
-
-If you wish to use dynamic linking, you must use
- LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH
-or
- setenv LD_LIBRARY_PATH `pwd`
-before running make.
-
-EOM
'') d_dosuid="$undef" ;;
esac
+# HP-UX 11 groks also LD_LIBRARY_PATH but SHLIB_PATH
+# is recommended for compatibility.
+case "$ldlibpthname" in
+'') ldlibpthname=SHLIB_PATH ;;
+esac
+
# Date: Fri, 6 Sep 96 23:15:31 CDT
# From: "Daniel S. Lewart" <d-lewart@uiuc.edu>
# I looked through the gcc.info and found this:
-######################################################################
-#
-# IMPORTANT: before you run 'make', you need to enter one of these two
-# lines (depending on your shell):
-# DYLD_LIBRARY_PATH=`pwd`; export DYLD_LIBRARY_PATH
-# or
-# setenv DYLD_LIBRARY_PATH `pwd`
-#
-######################################################################
-
# Posix support has been removed from NextStep
#
useposix='undef'
# running ranlib. The '5' is an empirical number that's "long enough."
# (Thanks to Andreas Koenig <k@franz.ww.tu-berlin.de>)
ranlib='sleep 5; /bin/ranlib'
+
+case "$ldlibpthname" in
+'') ldlibpthname=DYLD_LIBRARY_PATH ;;
+esac
fi
done
+case "$ldlibpthname" in
+'') ldlibpthname=none ;;
+esac
+
# Now go back
cd ../..
# malloc works
usemymalloc='n';
+
+case "$ldlibpthname" in
+'') ldlibpthname=DYLD_LIBRARY_PATH ;;
+esac
+
d_suidsafe='define' # "./Configure -d" can't figure this out easilly
-cat <<'EOM' >&4
-
-If you wish to use dynamic linking, you must use
- LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH
-or
- setenv LD_LIBRARY_PATH `pwd`
-before running make.
-
-EOM
$ENV{THREADS_TYPE} ||= "green_threads";
$JAVALIB = "$ENV{JAVA_HOME}/lib/$arch/$ENV{THREADS_TYPE}";
- $ENV{LD_LIBRARY_PATH} .= ":$JAVALIB";
+ $ENV{$Config{ldlibpthname}":$JAVALIB";
$JVM = GetJavaVM("$JAVALIB/libjava.so",@JVM_ARGS);
}
CLASSPATH=".:$JPL_HOME/lib${CLASSPATH:+:$CLASSPATH}"
export CLASSPATH
-LD_LIBRARY_PATH=".:$JPL_HOME/lib/$archname:$archlib/CORE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
-export LD_LIBRARY_PATH
+ldlibpthname=`$JPLPERL -MConfig -e 'print $Config{ldlibpthname}'`
+case "$ldlibpthname" in
+'') ldlibpthname=LD_LIBRARY_PATH ;;
+esac
+eval "ldlibpth=\$$ldlibpthname"
+
+$ldlibpthname=".:$JPL_HOME/lib/$archname:$archlib/CORE$ldlibpth"
+export $ldlibpthname
PERL5LIB="$JPL_HOME/perl${PERL5LIB:+:$PERL5LIB}"
export PERL5LIB
\$ENV{JPL_HOME} = '$JPL_HOME';
\$ENV{JPLPERL} = '$JPLPERL';
\$ENV{CLASSPATH} = '$CLASSPATH';
-\$ENV{LD_LIBRARY_PATH} = '$LD_LIBRARY_PATH';
+\$ENV{$ldlibpthname} = '$ldlibpth';
\$ENV{PERL5LIB} = '$PERL5LIB';
END
;;
-sh)
cat <<END
- PATH='$PATH';export PATH;JAVA_HOME='$JAVA_HOME';export JAVA_HOME;JPL_HOME='$JPL_HOME';export JPL_HOME;JPLPERL='$JPLPERL';export JPLPERL;CLASSPATH='$CLASSPATH';export CLASSPATH;LD_LIBRARY_PATH='$LD_LIBRARY_PATH';export LD_LIBRARY_PATH;PERL5LIB='$PERL5LIB';export PERL5LIB
+ PATH='$PATH';export PATH;JAVA_HOME='$JAVA_HOME';export JAVA_HOME;JPL_HOME='$JPL_HOME';export JPL_HOME;JPLPERL='$JPLPERL';export JPLPERL;CLASSPATH='$CLASSPATH';export CLASSPATH;$ldlibpthname='$ldlibpth';export $ldlibpthname;PERL5LIB='$PERL5LIB';export PERL5LIB
END
;;
-csh)
setenv JPL_HOME '$JPL_HOME';
setenv JPLPERL '$JPLPERL';
setenv CLASSPATH '$CLASSPATH';
-setenv LD_LIBRARY_PATH '$LD_LIBRARY_PATH';
+setenv $ldlibpthname '$ldlibpth';
setenv PERL5LIB '$PERL5LIB';
END
;;
---
Environment for perl $]:
EOF
- for my $env (sort
- (qw(PATH LD_LIBRARY_PATH LANG PERL_BADLANG SHELL HOME LOGDIR LANGUAGE),
- grep /^(?:PERL|LC_)/, keys %ENV)
+ my @env =
+ qw(PATH LD_LIBRARY_PATH LANG PERL_BADLANG SHELL HOME LOGDIR LANGUAGE);
+ push @env, $Config{ldlibpthname} if $Config{ldlibpthname} ne '';
+ for my $env (sort @env,
+ grep /^(?:PERL|LC_)/, keys %ENV)
) {
print OUT " $env",
exists $ENV{$env} ? "=$ENV{$env}" : ' (unset)',