Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: jrobinson/conf…
Fetching contributors…

Cannot retrieve contributors at this time

executable file 24134 lines (22700 sloc) 553.324 kB
#! /bin/sh
#
# If these # comments don't work, trim them. Don't worry about any other
# shell scripts, Configure will trim # comments from them for you.
#
# (If you are trying to port this package to a machine without sh,
# I would suggest you have a look at the prototypical config_h.SH file
# and edit it to reflect your system. Some packages may include samples
# of config.h for certain machines, so you might look for one of those.)
#
# Yes, you may rip this off to use in other distribution packages. This
# script belongs to the public domain and cannot be copyrighted.
#
# Note: this Configure script was generated automatically. Rather than
# working with this copy of Configure, you may wish to get metaconfig.
# The dist package (which contains metaconfig) is available via SVN:
# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
#
# Though this script was generated by metaconfig from metaunits, it is
# OK to send patches against Configure itself. It's up to the Configure
# pumpkin to backport the patch to the metaunits if it is accepted.
# For more information on patching Configure, see pod/perlhack.pod
#
# The metaunits are also available from the public git repository:
# http://perl5.git.perl.org/metaconfig.git/ or
# $ git clone git://perl5.git.perl.org/metaconfig.git metaconfig
#
# See Porting/pumpkin.pod for more information on metaconfig.
#
# Generated on Sun Aug 26 14:33:39 CEST 2012 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
ARGGGHHHH!!!!!
SCO csh still thinks true is false. Write to SCO today and tell them that next
year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
(Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
we'd have to do is go in and swap the && and || tokens, wherever they are.)
[End of diatribe. We now return you to your regularly scheduled programming...]
EOF
cat >c2$$ <<EOF
OOPS! You naughty creature! You didn't run Configure with sh!
I will attempt to remedy the situation by running sh for you...
EOF
true || cat c1$$ c2$$
true || exec sh $0 $argv:q
(exit $?0) || cat c2$$
(exit $?0) || exec sh $0 $argv:q
rm -f c1$$ c2$$
if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
cat <<EOF
***
*** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do
*** Configure that well. (Plan 9 is close to UNIX but not close enough.)
*** Please read the README.plan9 for further instructions.
*** Cannot continue, aborting.
***
EOF
exit 1
fi
if test ! -c /dev/null ; then
cat <<EOF
***
*** I'm sorry, but /dev/null appears to be a file rather than a device.
*** Please consult your operating sytem's notes for making a device
*** in /dev.
*** Cannot continue, aborting.
***
EOF
exit 1
fi
: compute my invocation name
me=$0
case "$0" in
*/*)
me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
test "$me" || me=$0
;;
esac
: Proper separator for the PATH environment variable
p_=:
: On OS/2 this directory should exist if this is not floppy only system ":-]"
if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then
if test -n "$OS2_SHELL"; then
p_=\;
PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
is_os2=yes
elif test -n "$DJGPP"; then
case "X${MACHTYPE:-nonesuchmach}" in
*cygwin) ;;
*) p_=\; ;;
esac
fi
fi
: Proper PATH setting
paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
paths="$paths /sbin /usr/sbin /usr/libexec"
paths="$paths /system/gnu_library/bin"
for p in $paths
do
case "$p_$PATH$p_" in
*$p_$p$p_*) ;;
*) test -d $p && PATH=$PATH$p_$p ;;
esac
done
PATH=.$p_$PATH
export PATH
: shall we be using ksh?
inksh=''
needksh=''
avoidksh=''
newsh=/bin/ksh
changesh=''
if (PATH=.; alias -x) >/dev/null 2>&1; then
inksh=true
fi
if test -f /hp-ux -a -f /bin/ksh; then
needksh='to avoid sh bug in "here document" expansion'
fi
if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
if test X`/usr/bin/uname -v` = X4; then
avoidksh="to avoid AIX 4's /bin/sh"
newsh=/usr/bin/bsh
fi
fi
if test -f /osf_boot -a -f /usr/sbin/setld; then
if test X`/usr/bin/uname -s` = XOSF1; then
avoidksh="to avoid Digital UNIX' ksh"
newsh=/bin/sh
unset BIN_SH
fi
fi
case "$inksh/$needksh" in
/[a-z]*)
ENV=''
changesh=true
reason="$needksh"
;;
esac
case "$inksh/$avoidksh" in
true/[a-z]*)
changesh=true
reason="$avoidksh"
;;
esac
case "$inksh/$needksh-$avoidksh-" in
true/--)
cat <<EOM
(I see you are using the Korn shell. Some ksh's blow up on $me,
mainly on older exotic systems. If yours does, try the Bourne shell instead.)
EOM
;;
esac
case "$changesh" in
true)
export newsh
echo "(Feeding myself to $newsh $reason.)"
case "$0" in
Configure|*/Configure) exec $newsh $0 "$@";;
*) exec $newsh Configure "$@";;
esac
;;
esac
test -x "${newsh}" || unset newsh
: if needed, set CDPATH to a harmless value that is not chatty
: avoid bash 2.02 problems with empty CDPATH.
case "$CDPATH" in
'') ;;
*) case "$SHELL" in
*bash*) CDPATH='.' ;;
*) CDPATH='' ;;
esac
;;
esac
: Configure runs within the UU subdirectory
test -d UU || mkdir UU
cd UU && rm -f ./*
ccname=''
ccversion=''
ccsymbols=''
cppccsymbols=''
cppsymbols=''
from=''
run=''
targetarch=''
to=''
sysroot=''
usecrosscompile=''
hostperl=''
hostgenerate=''
extern_C=''
mistrustnm=''
usedevel=''
perllibs=''
dynamic_ext=''
extensions=''
known_extensions=''
nonxs_ext=''
static_ext=''
useopcode=''
useposix=''
extras=''
d_bsd=''
d_eunice=''
d_xenix=''
eunicefix=''
ar=''
awk=''
bash=''
bison=''
byacc=''
cat=''
chgrp=''
chmod=''
chown=''
comm=''
compress=''
cp=''
cpio=''
cpp=''
csh=''
date=''
echo=''
egrep=''
emacs=''
expr=''
find=''
flex=''
gmake=''
grep=''
gzip=''
inews=''
ksh=''
less=''
line=''
lint=''
ln=''
lp=''
lpr=''
ls=''
mail=''
mailx=''
make=''
mkdir=''
more=''
mv=''
nm=''
nroff=''
perl=''
pg=''
pmake=''
pr=''
rm=''
rmail=''
sed=''
sendmail=''
shar=''
sleep=''
smail=''
sort=''
submit=''
tail=''
tar=''
tbl=''
tee=''
test=''
touch=''
tr=''
troff=''
uname=''
uniq=''
uuname=''
vi=''
zcat=''
zip=''
full_ar=''
full_sed=''
libswanted=''
hint=''
myuname=''
osname=''
osvers=''
Author=''
Date=''
Header=''
Id=''
Locker=''
Log=''
RCSfile=''
Revision=''
Source=''
State=''
_a=''
_exe=''
_o=''
archobjs=''
exe_ext=''
firstmakefile=''
lib_ext=''
obj_ext=''
path_sep=''
rm_try=''
afs=''
afsroot=''
alignbytes=''
ansi2knr=''
archlib=''
archlibexp=''
d_archlib=''
installarchlib=''
archname=''
myarchname=''
d_atolf=''
d_atoll=''
baserev=''
bin=''
binexp=''
initialinstalllocation=''
installbin=''
userelocatableinc=''
byteorder=''
cc=''
ccflags=''
cppflags=''
ldflags=''
lkflags=''
locincpth=''
optimize=''
cf_email=''
cf_by=''
cf_time=''
charbits=''
charsize=''
contains=''
cpp_stuff=''
cpplast=''
cppminus=''
cpprun=''
cppstdin=''
d__fwalk=''
d_access=''
d_accessx=''
d_aintl=''
d_alarm=''
asctime_r_proto=''
d_asctime_r=''
d_attribute_deprecated=''
d_attribute_format=''
d_attribute_malloc=''
d_attribute_nonnull=''
d_attribute_noreturn=''
d_attribute_pure=''
d_attribute_unused=''
d_attribute_warn_unused_result=''
d_printf_format_null=''
d_bcmp=''
d_bcopy=''
d_builtin_choose_expr=''
d_builtin_expect=''
d_bzero=''
d_c99_variadic_macros=''
d_casti32=''
castflags=''
d_castneg=''
d_chown=''
d_chroot=''
d_chsize=''
d_class=''
d_clearenv=''
d_closedir=''
d_void_closedir=''
d_cmsghdr_s=''
d_const=''
d_copysignl=''
d_cplusplus=''
cryptlib=''
d_crypt=''
crypt_r_proto=''
d_crypt_r=''
d_csh=''
full_csh=''
d_ctermid=''
ctermid_r_proto=''
d_ctermid_r=''
ctime_r_proto=''
d_ctime_r=''
d_cuserid=''
d_dbl_dig=''
d_dbminitproto=''
d_difftime=''
d_dir_dd_fd=''
d_dirfd=''
d_dlerror=''
d_dlopen=''
d_dlsymun=''
d_dosuid=''
d_suidsafe=''
d_drand48_r=''
drand48_r_proto=''
d_drand48proto=''
d_dup2=''
d_eaccess=''
d_endgrent=''
d_endgrent_r=''
endgrent_r_proto=''
d_endhent=''
d_endhostent_r=''
endhostent_r_proto=''
d_endnent=''
d_endnetent_r=''
endnetent_r_proto=''
d_endpent=''
d_endprotoent_r=''
endprotoent_r_proto=''
d_endpwent=''
d_endpwent_r=''
endpwent_r_proto=''
d_endsent=''
d_endservent_r=''
endservent_r_proto=''
d_faststdio=''
d_fchdir=''
d_fchmod=''
d_fchown=''
d_fcntl=''
d_fcntl_can_lock=''
d_fd_macros=''
d_fd_set=''
d_fds_bits=''
d_fgetpos=''
d_finite=''
d_finitel=''
d_flexfnam=''
d_flock=''
d_flockproto=''
d_fork=''
d_fp_class=''
d_fpclass=''
d_fpclassify=''
d_fpclassl=''
d_fpos64_t=''
d_frexpl=''
d_fs_data_s=''
d_fseeko=''
d_fsetpos=''
d_fstatfs=''
d_fsync=''
d_ftello=''
d_ftime=''
d_gettimeod=''
d_futimes=''
d_Gconvert=''
d_getaddrinfo=''
d_getcwd=''
d_getespwnam=''
d_getfsstat=''
d_getgrent=''
d_getgrent_r=''
getgrent_r_proto=''
d_getgrgid_r=''
getgrgid_r_proto=''
d_getgrnam_r=''
getgrnam_r_proto=''
d_getgrps=''
d_gethbyaddr=''
d_gethbyname=''
d_gethent=''
aphostname=''
d_gethname=''
d_phostname=''
d_uname=''
d_gethostbyaddr_r=''
gethostbyaddr_r_proto=''
d_gethostbyname_r=''
gethostbyname_r_proto=''
d_gethostent_r=''
gethostent_r_proto=''
d_gethostprotos=''
d_getitimer=''
d_getlogin=''
d_getlogin_r=''
getlogin_r_proto=''
d_getmnt=''
d_getmntent=''
d_getnameinfo=''
d_getnbyaddr=''
d_getnbyname=''
d_getnent=''
d_getnetbyaddr_r=''
getnetbyaddr_r_proto=''
d_getnetbyname_r=''
getnetbyname_r_proto=''
d_getnetent_r=''
getnetent_r_proto=''
d_getnetprotos=''
d_getpagsz=''
d_getpent=''
d_getpgid=''
d_getpgrp2=''
d_bsdgetpgrp=''
d_getpgrp=''
d_getppid=''
d_getprior=''
d_getpbyname=''
d_getpbynumber=''
d_getprotobyname_r=''
getprotobyname_r_proto=''
d_getprotobynumber_r=''
getprotobynumber_r_proto=''
d_getprotoent_r=''
getprotoent_r_proto=''
d_getprotoprotos=''
d_getprpwnam=''
d_getpwent=''
d_getpwent_r=''
getpwent_r_proto=''
d_getpwnam_r=''
getpwnam_r_proto=''
d_getpwuid_r=''
getpwuid_r_proto=''
d_getsent=''
d_getservbyname_r=''
getservbyname_r_proto=''
d_getservbyport_r=''
getservbyport_r_proto=''
d_getservent_r=''
getservent_r_proto=''
d_getservprotos=''
d_getspnam=''
d_getspnam_r=''
getspnam_r_proto=''
d_getsbyname=''
d_getsbyport=''
d_gmtime_r=''
gmtime_r_proto=''
d_gnulibc=''
gnulibc_version=''
d_hasmntopt=''
d_htonl=''
d_ilogbl=''
d_inetaton=''
d_inetntop=''
d_inetpton=''
d_int64_t=''
d_isascii=''
d_isblank=''
d_isfinite=''
d_isinf=''
d_isnan=''
d_isnanl=''
d_killpg=''
d_lchown=''
d_ldbl_dig=''
d_libm_lib_version=''
d_link=''
d_localtime_r=''
d_localtime_r_needs_tzset=''
localtime_r_proto=''
d_locconv=''
d_lockf=''
d_longdbl=''
longdblsize=''
d_longlong=''
longlongsize=''
d_lseekproto=''
d_lstat=''
d_madvise=''
d_malloc_good_size=''
d_malloc_size=''
d_mblen=''
d_mbstowcs=''
d_mbtowc=''
d_memchr=''
d_memcmp=''
d_memcpy=''
d_memmove=''
d_memset=''
d_mkdir=''
d_mkdtemp=''
d_mkfifo=''
d_mkstemp=''
d_mkstemps=''
d_mktime=''
d_mmap=''
mmaptype=''
d_modfl=''
d_modfl_pow32_bug=''
d_modflproto=''
d_mprotect=''
d_msg=''
d_msgctl=''
d_msgget=''
d_msghdr_s=''
d_msgrcv=''
d_msgsnd=''
d_msync=''
d_munmap=''
d_nice=''
d_nl_langinfo=''
d_off64_t=''
d_open3=''
d_fpathconf=''
d_pathconf=''
d_pause=''
d_pipe=''
d_poll=''
d_portable=''
d_prctl=''
d_prctl_set_name=''
d_procselfexe=''
procselfexe=''
d_old_pthread_create_joinable=''
old_pthread_create_joinable=''
d_pthread_atfork=''
d_pthread_attr_setscope=''
d_pthread_yield=''
d_sched_yield=''
sched_yield=''
d_qgcvt=''
d_random_r=''
random_r_proto=''
d_readdir64_r=''
readdir64_r_proto=''
d_readdir=''
d_rewinddir=''
d_seekdir=''
d_telldir=''
d_readdir_r=''
readdir_r_proto=''
d_readlink=''
d_readv=''
d_recvmsg=''
d_rename=''
d_rmdir=''
d_safebcpy=''
d_safemcpy=''
d_sanemcmp=''
d_sbrkproto=''
d_scalbnl=''
d_select=''
d_sem=''
d_semctl=''
d_semget=''
d_semop=''
d_sendmsg=''
d_setegid=''
d_seteuid=''
d_setgrent=''
d_setgrent_r=''
setgrent_r_proto=''
d_setgrps=''
d_sethent=''
d_sethostent_r=''
sethostent_r_proto=''
d_setitimer=''
d_setlinebuf=''
d_setlocale=''
d_setlocale_r=''
setlocale_r_proto=''
d_setnent=''
d_setnetent_r=''
setnetent_r_proto=''
d_setpent=''
d_setpgid=''
d_setpgrp2=''
d_bsdsetpgrp=''
d_setpgrp=''
d_setprior=''
d_setproctitle=''
d_setprotoent_r=''
setprotoent_r_proto=''
d_setpwent=''
d_setpwent_r=''
setpwent_r_proto=''
d_setregid=''
d_setresgid=''
d_setresuid=''
d_setreuid=''
d_setrgid=''
d_setruid=''
d_setsent=''
d_setservent_r=''
setservent_r_proto=''
d_setsid=''
d_setvbuf=''
d_sfio=''
usesfio=''
d_shm=''
d_shmat=''
d_shmatprototype=''
shmattype=''
d_shmctl=''
d_shmdt=''
d_shmget=''
d_sigaction=''
d_signbit=''
d_sigprocmask=''
d_sigsetjmp=''
usesitecustomize=''
d_snprintf=''
d_vsnprintf=''
d_sockatmark=''
d_sockatmarkproto=''
d_ip_mreq=''
d_ip_mreq_source=''
d_ipv6_mreq=''
d_ipv6_mreq_source=''
d_msg_ctrunc=''
d_msg_dontroute=''
d_msg_oob=''
d_msg_peek=''
d_msg_proxy=''
d_oldsock=''
d_scm_rights=''
d_sin6_scope_id=''
d_sockaddr_in6=''
d_sockaddr_sa_len=''
d_socket=''
d_sockpair=''
sockethdr=''
socketlib=''
d_socklen_t=''
d_socks5_init=''
d_sprintf_returns_strlen=''
d_sqrtl=''
d_srand48_r=''
srand48_r_proto=''
d_srandom_r=''
srandom_r_proto=''
d_sresgproto=''
d_sresuproto=''
d_statblks=''
d_statfs_f_flags=''
d_statfs_s=''
d_static_inline=''
perl_static_inline=''
d_fstatvfs=''
d_statvfs=''
d_stdio_cnt_lval=''
d_stdio_ptr_lval=''
d_stdio_ptr_lval_nochange_cnt=''
d_stdio_ptr_lval_sets_cnt=''
d_stdiobase=''
d_stdstdio=''
stdio_base=''
stdio_bufsiz=''
stdio_cnt=''
stdio_filbuf=''
stdio_ptr=''
d_index=''
d_strchr=''
d_strcoll=''
d_strctcpy=''
d_strerrm=''
d_strerror=''
d_sysernlst=''
d_syserrlst=''
d_strerror_r=''
strerror_r_proto=''
d_strftime=''
d_strlcat=''
d_strlcpy=''
d_strtod=''
d_strtol=''
d_strtold=''
d_strtoll=''
d_strtoq=''
d_strtoul=''
d_strtoull=''
d_strtouq=''
d_strxfrm=''
d_symlink=''
d_syscall=''
d_syscallproto=''
d_sysconf=''
d_system=''
d_tcgetpgrp=''
d_tcsetpgrp=''
d_telldirproto=''
d_time=''
timetype=''
d_asctime64=''
d_ctime64=''
d_difftime64=''
d_gmtime64=''
d_localtime64=''
d_mktime64=''
d_timegm=''
clocktype=''
d_times=''
d_tmpnam_r=''
tmpnam_r_proto=''
d_truncate=''
d_ttyname_r=''
ttyname_r_proto=''
d_tzname=''
d_u32align=''
d_ualarm=''
d_umask=''
d_semctl_semid_ds=''
d_semctl_semun=''
d_union_semun=''
d_unordered=''
d_unsetenv=''
d_usleep=''
d_usleepproto=''
d_ustat=''
d_pseudofork=''
d_vfork=''
usevfork=''
d_voidsig=''
signal_t=''
d_volatile=''
d_charvspr=''
d_vprintf=''
d_wait4=''
d_waitpid=''
d_wcstombs=''
d_wctomb=''
d_writev=''
dlext=''
bin_ELF=''
cccdlflags=''
ccdlflags=''
dlsrc=''
ld=''
ld_can_script=''
lddlflags=''
usedl=''
doublesize=''
ebcdic=''
fflushNULL=''
fflushall=''
fpossize=''
fpostype=''
gccansipedantic=''
gccosandvers=''
gccversion=''
gidformat=''
gidsign=''
gidsize=''
gidtype=''
groupstype=''
h_fcntl=''
h_sysfile=''
html1dir=''
html1direxp=''
installhtml1dir=''
html3dir=''
html3direxp=''
installhtml3dir=''
i_arpainet=''
i_assert=''
i_crypt=''
db_hashtype=''
db_prefixtype=''
db_version_major=''
db_version_minor=''
db_version_patch=''
i_db=''
i_dbm=''
i_rpcsvcdbm=''
d_dirnamlen=''
direntrytype=''
i_dirent=''
i_dld=''
i_dlfcn=''
i_fcntl=''
i_float=''
i_fp=''
i_fp_class=''
i_gdbm=''
d_grpasswd=''
i_grp=''
i_ieeefp=''
i_inttypes=''
i_langinfo=''
i_libutil=''
i_limits=''
i_locale=''
i_machcthr=''
i_malloc=''
i_mallocmalloc=''
i_math=''
i_memory=''
i_mntent=''
d_gdbm_ndbm_h_uses_prototypes=''
d_gdbmndbm_h_uses_prototypes=''
d_ndbm=''
d_ndbm_h_uses_prototypes=''
i_gdbm_ndbm=''
i_gdbmndbm=''
i_ndbm=''
i_netdb=''
i_neterrno=''
i_netinettcp=''
i_niin=''
i_sysin=''
i_poll=''
i_prot=''
i_pthread=''
d_pwage=''
d_pwchange=''
d_pwclass=''
d_pwcomment=''
d_pwexpire=''
d_pwgecos=''
d_pwpasswd=''
d_pwquota=''
i_pwd=''
i_sfio=''
i_shadow=''
i_socks=''
i_stdbool=''
i_stddef=''
i_stdlib=''
i_string=''
strings=''
i_sunmath=''
i_sysaccess=''
i_sysdir=''
i_sysfile=''
d_voidtty=''
i_bsdioctl=''
i_sysfilio=''
i_sysioctl=''
i_syssockio=''
i_syslog=''
i_sysmman=''
i_sysmode=''
i_sysmount=''
i_sysndir=''
i_sysparam=''
i_syspoll=''
i_sysresrc=''
i_syssecrt=''
i_sysselct=''
i_sysstat=''
i_sysstatfs=''
i_sysstatvfs=''
i_systimes=''
i_systypes=''
i_sysuio=''
i_sysun=''
i_sysutsname=''
i_sysvfs=''
i_syswait=''
i_sgtty=''
i_termio=''
i_termios=''
d_tm_tm_gmtoff=''
d_tm_tm_zone=''
i_systime=''
i_systimek=''
i_time=''
timeincl=''
i_unistd=''
i_ustat=''
i_utime=''
i_values=''
i_stdarg=''
i_varargs=''
i_varhdr=''
i_vfork=''
d_inc_version_list=''
inc_version_list=''
inc_version_list_init=''
installprefix=''
installprefixexp=''
installstyle=''
installusrbinperl=''
intsize=''
longsize=''
shortsize=''
issymlink=''
libc=''
ldlibpthname=''
libperl=''
shrpenv=''
useshrplib=''
glibpth=''
libpth=''
loclibpth=''
plibpth=''
xlibpth=''
ignore_versioned_solibs=''
libs=''
libsdirs=''
libsfiles=''
libsfound=''
libspath=''
lns=''
d_PRIEUldbl=''
d_PRIFUldbl=''
d_PRIGUldbl=''
d_PRIeldbl=''
d_PRIfldbl=''
d_PRIgldbl=''
d_SCNfldbl=''
sPRIEUldbl=''
sPRIFUldbl=''
sPRIGUldbl=''
sPRIeldbl=''
sPRIfldbl=''
sPRIgldbl=''
sSCNfldbl=''
lseeksize=''
lseektype=''
mad=''
madlyh=''
madlyobj=''
madlysrc=''
make_set_make=''
d_mymalloc=''
freetype=''
mallocobj=''
mallocsrc=''
malloctype=''
usemallocwrap=''
usemymalloc=''
installman1dir=''
man1dir=''
man1direxp=''
man1ext=''
installman3dir=''
man3dir=''
man3direxp=''
man3ext=''
modetype=''
multiarch=''
mydomain=''
myhostname=''
phostname=''
c=''
n=''
d_eofnblk=''
eagain=''
o_nonblock=''
rd_nodata=''
need_va_copy=''
netdb_hlen_type=''
netdb_host_type=''
netdb_name_type=''
netdb_net_type=''
groupcat=''
hostcat=''
passcat=''
orderlib=''
ranlib=''
d_perl_otherlibdirs=''
otherlibdirs=''
package=''
spackage=''
pager=''
api_revision=''
api_subversion=''
api_version=''
api_versionstring=''
patchlevel=''
perl_patchlevel=''
revision=''
subversion=''
version=''
version_patchlevel_string=''
perl5=''
perladmin=''
perlpath=''
d_nv_preserves_uv=''
d_nv_zero_is_allbits_zero=''
i16size=''
i16type=''
i32size=''
i32type=''
i64size=''
i64type=''
i8size=''
i8type=''
ivsize=''
ivtype=''
nv_overflows_integers_at=''
nv_preserves_uv_bits=''
nvsize=''
nvtype=''
u16size=''
u16type=''
u32size=''
u32type=''
u64size=''
u64type=''
u8size=''
u8type=''
uvsize=''
uvtype=''
ivdformat=''
nvEUformat=''
nvFUformat=''
nvGUformat=''
nveformat=''
nvfformat=''
nvgformat=''
uvXUformat=''
uvoformat=''
uvuformat=''
uvxformat=''
pidtype=''
prefix=''
prefixexp=''
installprivlib=''
privlib=''
privlibexp=''
prototype=''
ptrsize=''
d_PRIXU64=''
d_PRId64=''
d_PRIi64=''
d_PRIo64=''
d_PRIu64=''
d_PRIx64=''
sPRIXU64=''
sPRId64=''
sPRIi64=''
sPRIo64=''
sPRIu64=''
sPRIx64=''
d_quad=''
quadkind=''
quadtype=''
uquadtype=''
drand01=''
randbits=''
randfunc=''
randseedtype=''
seedfunc=''
installscript=''
scriptdir=''
scriptdirexp=''
selectminbits=''
selecttype=''
sh=''
sig_count=''
sig_name=''
sig_name_init=''
sig_num=''
sig_num_init=''
sig_size=''
d_sitearch=''
installsitearch=''
sitearch=''
sitearchexp=''
installsitebin=''
sitebin=''
sitebinexp=''
installsitehtml1dir=''
sitehtml1dir=''
sitehtml1direxp=''
installsitehtml3dir=''
sitehtml3dir=''
sitehtml3direxp=''
installsitelib=''
sitelib=''
sitelib_stem=''
sitelibexp=''
installsiteman1dir=''
siteman1dir=''
siteman1direxp=''
installsiteman3dir=''
siteman3dir=''
siteman3direxp=''
siteprefix=''
siteprefixexp=''
installsitescript=''
sitescript=''
sitescriptexp=''
sizesize=''
sizetype=''
so=''
socksizetype=''
sharpbang=''
shsharp=''
spitshell=''
src=''
ssizetype=''
st_ino_sign=''
st_ino_size=''
startperl=''
startsh=''
stdchar=''
d_stdio_stream_array=''
stdio_stream_array=''
sysman=''
sGMTIME_max=''
sGMTIME_min=''
sLOCALTIME_max=''
sLOCALTIME_min=''
trnl=''
uidformat=''
uidsign=''
uidsize=''
uidtype=''
archname64=''
use64bitall=''
use64bitint=''
dtrace=''
usedtrace=''
usefaststdio=''
usekernprocpathname=''
ccflags_uselargefiles=''
ldflags_uselargefiles=''
libswanted_uselargefiles=''
uselargefiles=''
uselongdouble=''
usemorebits=''
usemultiplicity=''
nm_opt=''
nm_so_opt=''
runnm=''
usenm=''
usensgetexecutablepath=''
useperlio=''
usesocks=''
d_oldpthreads=''
use5005threads=''
useithreads=''
usereentrant=''
usethreads=''
incpath=''
mips_type=''
usrinc=''
vaproto=''
d_vendorarch=''
installvendorarch=''
vendorarch=''
vendorarchexp=''
d_vendorbin=''
installvendorbin=''
vendorbin=''
vendorbinexp=''
installvendorhtml1dir=''
vendorhtml1dir=''
vendorhtml1direxp=''
installvendorhtml3dir=''
vendorhtml3dir=''
vendorhtml3direxp=''
d_vendorlib=''
installvendorlib=''
vendorlib=''
vendorlib_stem=''
vendorlibexp=''
installvendorman1dir=''
vendorman1dir=''
vendorman1direxp=''
installvendorman3dir=''
vendorman3dir=''
vendorman3direxp=''
usevendorprefix=''
vendorprefix=''
vendorprefixexp=''
d_vendorscript=''
installvendorscript=''
vendorscript=''
vendorscriptexp=''
versiononly=''
defvoidused=''
voidflags=''
yacc=''
yaccflags=''
CONFIG=''
: Detect odd OSs
define='define'
undef='undef'
smallmach='pdp11 i8086 z8000 i80286 iAPX286'
rmlist=''
: We must find out about Eunice early
eunicefix=':'
if test -f /etc/unixtovms; then
eunicefix=/etc/unixtovms
fi
if test -f /etc/unixtovms.exe; then
eunicefix=/etc/unixtovms.exe
fi
: Set executable suffix now -- needed before hints available
if test -f "/libs/version.library"; then
: Amiga OS
_exe=""
elif test -f "/system/gnu_library/bin/ar.pm"; then
: Stratus VOS
_exe=".pm"
elif test -n "$DJGPP"; then
: DOS DJGPP
_exe=".exe"
elif test -d c:/. -o -n "$is_os2" ; then
: OS/2 or cygwin
_exe=".exe"
fi
groupstype=''
i_whoami=''
: Trailing extension. Override this in a hint file, if needed.
: Extra object files, if any, needed on this platform.
archobjs=''
archname=''
: Possible local include directories to search.
: Set locincpth to "" in a hint file to defeat local include searches.
locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
:
: no include file wanted by default
inclwanted=''
: Enable -DEBUGGING and -DDEBUGGING from the command line
EBUGGING=''
DEBUGGING=''
libnames=''
: change the next line if compiling for Xenix/286 on Xenix/386
xlibpth='/usr/lib/386 /lib/386'
: Possible local library directories to search.
loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
: general looking path for locating libraries
glibpth="/lib /usr/lib $xlibpth"
glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
test -f /shlib/libc.so && glibpth="/shlib $glibpth"
test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
: Private path used by Configure to find libraries. Its value
: is prepended to libpth. This variable takes care of special
: machines, like the mips. Usually, it should be empty.
plibpth=''
: default library list
libswanted=''
: some systems want to use only the non-versioned libso:s
ignore_versioned_solibs=''
: set usethreads on the Configure command line to enable threads.
usereentrant='undef'
: full support for void wanted by default
defvoidused=15
ccname=''
ccversion=''
perllibs=''
: set useposix=false in your hint file to disable the POSIX extension.
useposix=true
: set useopcode=false in your hint file to disable the Opcode extension.
useopcode=true
archname64=''
ccflags_uselargefiles=''
ldflags_uselargefiles=''
libswanted_uselargefiles=''
: set usemultiplicity on the Configure command line to enable multiplicity.
: set usesocks on the Configure command line to enable socks.
: List of libraries we want.
: If anyone needs extra -lxxx, put those in a hint file.
libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun"
libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
: We probably want to search /usr/shlib before most other libraries.
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
glibpth="/usr/shlib $glibpth"
: Do not use vfork unless overridden by a hint file.
usevfork=false
: Find the basic shell for Bourne shell scripts
case "$sh" in
'')
case "$SYSTYPE" in
*bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
*) xxx='/bin/sh';;
esac
if test -f "$xxx"; then
sh="$xxx"
else
: Build up a list and do a single loop so we can 'break' out.
pth=`echo $PATH | sed -e "s/$p_/ /g"`
for xxx in sh bash ksh pdksh ash; do
for p in $pth; do
try="$try ${p}/${xxx}"
done
done
for xxx in $try; do
if test -f "$xxx"; then
sh="$xxx";
break
elif test "X$_exe" != X -a -f "$xxx$_exe"; then
sh="$xxx";
break
elif test -f "$xxx.exe"; then
sh="$xxx";
break
fi
done
fi
;;
esac
case "$sh" in
'') cat >&2 <<EOM
$me: Fatal Error: I can't find a Bourne Shell anywhere.
Usually it's in /bin/sh. How did you even get this far?
Please contact me (Perl Maintainers) at perlbug@perl.org and
we'll try to straighten this all out.
EOM
exit 1
;;
esac
: see if sh knows # comments
if `$sh -c '#' >/dev/null 2>&1`; then
shsharp=true
spitshell=cat
xcat=/bin/cat
test -f $xcat$_exe || xcat=/usr/bin/cat
if test ! -f $xcat$_exe; then
for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
if test -f $p/cat$_exe; then
xcat=$p/cat
break
fi
done
if test ! -f $xcat$_exe; then
echo "Can't find cat anywhere!"
exit 1
fi
fi
echo "#!$xcat" >sharp
$eunicefix sharp
chmod +x sharp
./sharp > today 2>/dev/null
if test -s today; then
sharpbang='#!'
else
echo "#! $xcat" > sharp
$eunicefix sharp
chmod +x sharp
./sharp > today 2>/dev/null
if test -s today; then
sharpbang='#! '
else
sharpbang=': use '
fi
fi
else
echo " "
echo "Your $sh doesn't grok # comments--I will strip them later on."
shsharp=false
cd ..
echo "exec grep -v '^[ ]*#'" >spitshell
chmod +x spitshell
$eunicefix spitshell
spitshell=`pwd`/spitshell
cd UU
echo "I presume that if # doesn't work, #! won't work either!"
sharpbang=': use '
fi
rm -f sharp today
: figure out how to guarantee sh startup
case "$startsh" in
'') startsh=${sharpbang}${sh} ;;
*)
esac
cat >sharp <<EOSS
$startsh
set abc
test "$?abc" != 1
EOSS
chmod +x sharp
$eunicefix sharp
if ./sharp; then
: echo "Yup, it does."
else
echo "Hmm... '$startsh' does not guarantee sh startup..."
echo "You may have to fix up the shell scripts to make sure $sh runs them."
fi
rm -f sharp
: Save command line options in file UU/cmdline.opt for later use in
: generating config.sh.
cat > cmdline.opt <<EOSH
: Configure command line arguments.
config_arg0='$0'
config_args='$*'
config_argc=$#
EOSH
argn=1
args_exp=''
args_sep=''
for arg in "$@"; do
cat >>cmdline.opt <<EOSH
config_arg$argn='$arg'
EOSH
cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
$arg
EOC
arg_exp=`cat cmdl.opt`
args_exp="$args_exp$args_sep'$arg_exp'"
argn=`expr $argn + 1`
args_sep=' '
done
rm -f cmdl.opt
: produce awk script to parse command line options
cat >options.awk <<'EOF'
BEGIN {
optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
len = length(optstr);
for (i = 1; i <= len; i++) {
c = substr(optstr, i, 1);
if (i < len) a = substr(optstr, i + 1, 1); else a = "";
if (a == ":") {
arg[c] = 1;
i++;
}
opt[c] = 1;
}
}
{
expect = 0;
str = $0;
if (substr(str, 1, 1) != "-") {
printf("'%s'\n", str);
next;
}
len = length($0);
for (i = 2; i <= len; i++) {
c = substr(str, i, 1);
if (!opt[c]) {
printf("-%s\n", substr(str, i));
next;
}
printf("-%s\n", c);
if (arg[c]) {
if (i < len)
printf("'%s'\n", substr(str, i + 1));
else
expect = 1;
next;
}
}
}
END {
if (expect)
print "?";
}
EOF
: process the command line options
set X `for arg in "$@"; do echo "X$arg"; done |
sed -e s/X// | awk -f options.awk`
eval "set $*"
shift
rm -f options.awk
: set up default values
fastread=''
reuseval=false
config_sh=''
alldone=''
error=''
silent=''
extractsh=''
override=''
knowitall=''
rm -f optdef.sh posthint.sh
cat >optdef.sh <<EOS
$startsh
EOS
: option parsing
while test $# -gt 0; do
case "$1" in
-d) shift; fastread=yes;;
-e) shift; alldone=cont;;
-f)
shift
cd ..
if test -r "$1"; then
config_sh="$1"
else
echo "$me: cannot read config file $1." >&2
error=true
fi
cd UU
shift;;
--help|\
-h) shift; error=true;;
-r) shift; reuseval=true;;
-s) shift; silent=true; realsilent=true;;
-E) shift; alldone=exit;;
-K) shift; knowitall=true;;
-O) shift; override=true;;
-S) shift; silent=true; extractsh=true;;
-D)
shift
case "$1" in
*=)
echo "$me: use '-U symbol=', not '-D symbol='." >&2
echo "$me: ignoring -D $1" >&2
;;
*=*) echo "$1" | \
sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
*) echo "$1='define'" >> optdef.sh;;
esac
shift
;;
-U)
shift
case "$1" in
*=) echo "$1" >> optdef.sh;;
*=*)
echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
echo "$me: ignoring -U $1" >&2
;;
*) echo "$1='undef'" >> optdef.sh;;
esac
shift
;;
-A)
shift
xxx=''
yyy="$1"
zzz=''
uuu=undef
case "$yyy" in
*=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
case "$zzz" in
*:*) zzz='' ;;
*) xxx=append
zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
esac
;;
esac
case "$xxx" in
'') case "$yyy" in
*:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
*) xxx=`echo "$yyy"|sed 's!:.*!!'`
yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
esac
;;
esac
case "$xxx" in
append)
echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
clear)
echo "$yyy=''" >> posthint.sh ;;
define)
case "$zzz" in
'') zzz=define ;;
esac
echo "$yyy='$zzz'" >> posthint.sh ;;
eval)
echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
prepend)
echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
undef)
case "$zzz" in
'') zzz="$uuu" ;;
esac
echo "$yyy=$zzz" >> posthint.sh ;;
*) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
esac
shift
;;
-V) echo "$me generated by metaconfig 3.5 PL0." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
*) break;;
esac
done
case "$error" in
true)
cat >&2 <<EOM
Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
[-U symbol] [-U symbol=] [-A command:symbol...]
-d : use defaults for all answers.
-e : go on without questioning past the production of config.sh.
-f : specify an alternate default configuration file.
-h : print this help message and exit (with an error status).
-r : reuse C symbols value if possible (skips costly nm extraction).
-s : silent mode, only echoes questions and essential information.
-D : define symbol to have some value:
-D symbol symbol gets the value 'define'
-D symbol=value symbol gets the value 'value'
common used examples (see INSTALL for more info):
-Duse64bitint use 64bit integers
-Duse64bitall use 64bit integers and pointers
-Dusethreads use thread support
-Dinc_version_list=none do not include older perl trees in @INC
-DEBUGGING=none DEBUGGING options
-Dcc=gcc choose your compiler
-Dprefix=/opt/perl5 choose your destination
-E : stop at the end of questions, after having produced config.sh.
-K : do not use unless you know what you are doing.
-O : let -D and -U override definitions from loaded configuration file.
-S : perform variable substitutions on all .SH files (can mix with -f)
-U : undefine symbol:
-U symbol symbol gets the value 'undef'
-U symbol= symbol gets completely empty
e.g.: -Uversiononly
-A : manipulate symbol after the platform specific hints have been applied:
-A append:symbol=value append value to symbol
-A symbol=value like append:, but with a separating space
-A define:symbol=value define symbol to have value
-A clear:symbol define symbol to be ''
-A define:symbol define symbol to be 'define'
-A eval:symbol=value define symbol to be eval of value
-A prepend:symbol=value prepend value to symbol
-A undef:symbol define symbol to be 'undef'
-A undef:symbol= define symbol to be ''
e.g.: -A prepend:libswanted='cl pthread '
-A ccflags=-DSOME_MACRO
-V : print version number and exit (with a zero status).
EOM
exit 1
;;
esac
: Sanity checks
case "$fastread$alldone" in
yescont|yesexit) ;;
*)
case "$extractsh" in
true) ;;
*)
if test ! -t 0; then
echo "Say 'sh Configure', not 'sh <Configure'"
exit 1
fi
;;
esac
;;
esac
exec 4>&1
case "$silent" in
true) exec 1>/dev/null;;
esac
: run the defines and the undefines, if any, but leave the file out there...
touch optdef.sh
. ./optdef.sh
: create the posthint manipulation script and leave the file out there...
touch posthint.sh
: set package name
package='perl5'
first=`echo $package | sed -e 's/^\(.\).*/\1/'`
last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
esac
: Some greps do not return status, grrr.
echo "grimblepritz" >grimble
if grep blurfldyick grimble >/dev/null 2>&1 ; then
contains=contains
elif grep grimblepritz grimble >/dev/null 2>&1 ; then
contains=grep
else
contains=contains
fi
rm -f grimble
: the following should work in any shell
case "$contains" in
contains*)
echo " "
echo "AGH! Grep doesn't return a status. Attempting remedial action."
cat >contains <<'EOSS'
grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
EOSS
chmod +x contains
esac
: Find the path to the source tree
case "$src" in
'') case "$0" in
*/*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
case "$src" in
/*) ;;
.) ;;
*) src=`cd ../$src && pwd` ;;
esac
;;
*) src='.';;
esac;;
esac
case "$src" in
'') src=/
rsrc=/
;;
/*) rsrc="$src";;
*) rsrc="../$src";;
esac
if test -f $rsrc/Configure && \
$contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
then
: found it, so we are ok.
else
rsrc=''
for src in . .. ../.. ../../.. ../../../..; do
if test -f ../$src/Configure && \
$contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
then
rsrc=../$src
break
fi
done
fi
case "$rsrc" in
'')
cat <<EOM >&4
Sorry, I can't seem to locate the source dir for $package. Please start
Configure with an explicit path -- i.e. /some/path/Configure.
EOM
exit 1
;;
../.) rsrc='..';;
*)
echo " "
echo "Sources for $package found in \"$src\"." >&4
;;
esac
: script used to extract .SH files with variable substitutions
cat >extract <<'EOS'
PERL_CONFIG_SH=true
echo "Doing variable substitutions on .SH files..."
if test -f MANIFEST; then
set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
else
echo "(Looking for .SH files under the source directory.)"
set x `(cd "$src"; find . -name "*.SH" -print)`
fi
shift
case $# in
0) set x `(cd "$src"; echo *.SH)`; shift;;
esac
if test ! -f "$src/$1"; then
shift
fi
mkdir_p='
name=$1;
create="";
while test $name; do
if test ! -d "$name"; then
create="$name $create";
name=`echo $name | sed -e "s|^[^/]*$||"`;
name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
else
name="";
fi;
done;
for file in $create; do
mkdir $file;
done
'
for file in $*; do
case "$src" in
".")
case "$file" in
*/*)
dir=`expr X$file : 'X\(.*\)/'`
file=`expr X$file : 'X.*/\(.*\)'`
(cd "$dir" && . ./$file)
;;
*)
. ./$file
;;
esac
;;
*)
case "$file" in
*/*)
dir=`expr X$file : 'X\(.*\)/'`
file=`expr X$file : 'X.*/\(.*\)'`
(set x $dir; shift; eval $mkdir_p)
sh <"$src/$dir/$file"
;;
*)
sh <"$src/$file"
;;
esac
;;
esac
done
if test -f "$src/config_h.SH"; then
if test ! -f config.h; then
: oops, they left it out of MANIFEST, probably, so do it anyway.
. "$src/config_h.SH"
fi
fi
EOS
: extract files and exit if asked to do so
case "$extractsh" in
true)
case "$realsilent" in
true) ;;
*) exec 1>&4;;
esac
case "$config_sh" in
'') config_sh='config.sh';;
esac
echo " "
echo "Fetching answers from $config_sh..."
cd ..
. $config_sh
test "$override" && . ./optdef.sh
echo " "
. UU/extract
rm -rf UU
echo "Extraction done."
exit 0
;;
esac
: Set 'sysroot' to change the logical root directory to your headers and libraries see man gcc
: This is primarily meant for cross-compile environments, and may fail to be useful in other cases
if test "X$sysroot" != X; then
echo "Using $sysroot to find your headers and libraries, adding to ccflags"
case "$ccflags" in
*sysroot*) ;;
'undef'|*)
ccflags="$ccflags --sysroot=$sysroot"
esac
case "$ldflags" in
*sysroot*) ;;
'undef'|*)
ldflags="$ldflags --sysroot=$sysroot"
esac
case "$cccdlflags" in
*sysroot*) ;;
'undef'|*)
cccdlflags="$cccdlflags --sysroot=$sysroot"
esac
# lddlflags updated below in lddlflags section
fi
: Eunice requires " " instead of "", can you believe it
echo " "
: Here we go...
echo "Beginning of configuration questions for $package."
trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
: first determine how to suppress newline on echo command
echo " "
echo "Checking echo to see how to suppress newlines..."
(echo "hi there\c" ; echo " ") >.echotmp
if $contains c .echotmp >/dev/null 2>&1 ; then
echo "...using -n."
n='-n'
c=''
else
cat <<'EOM'
...using \c
EOM
n=''
c='\c'
fi
echo $n "The star should be here-->$c"
echo '*'
rm -f .echotmp
: Now test for existence of everything in MANIFEST
echo " "
if test -f "$rsrc/MANIFEST"; then
echo "First let's make sure your kit is complete. Checking..." >&4
awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
(split -l 50 2>/dev/null || split -50)
rm -f missing
tmppwd=`pwd`
for filelist in x??; do
(cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
>/dev/null 2>>"$tmppwd/missing")
done
if test -s missing; then
cat missing >&4
cat >&4 <<'EOM'
THIS PACKAGE SEEMS TO BE INCOMPLETE.
You have the option of continuing the configuration process, despite the
distinct possibility that your kit is damaged, by typing 'y'es. If you
do, don't blame me if something goes wrong. I advise you to type 'n'o
and contact the author (perlbug@perl.org).
EOM
echo $n "Continue? [n] $c" >&4
read ans
case "$ans" in
y*)
echo "Continuing..." >&4
rm -f missing
;;
*)
echo "ABORTING..." >&4
kill $$
;;
esac
else
echo "Looks good..."
fi
else
echo "There is no MANIFEST file. I hope your kit is complete !"
fi
rm -f missing x??
: Find the appropriate value for a newline for tr
echo " "
if test -n "$DJGPP"; then
trnl='\012'
fi
if test X"$trnl" = X; then
case "`echo foo|tr '\n' x 2>/dev/null`" in
foox) trnl='\n' ;;
esac
fi
if test X"$trnl" = X; then
case "`echo foo|tr '\012' x 2>/dev/null`" in
foox) trnl='\012' ;;
esac
fi
if test X"$trnl" = X; then
case "`echo foo|tr '\r\n' xy 2>/dev/null`" in
fooxy) trnl='\n\r' ;;
esac
fi
if test X"$trnl" = X; then
cat <<EOM >&2
$me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
EOM
exit 1
fi
: compute the number of columns on the terminal for proper question formatting
case "$COLUMNS" in
'') COLUMNS='80';;
esac
: set up the echo used in my read
myecho="case \"\$xxxm\" in
'') echo $n \"\$rp $c\" >&4;;
*) case \"\$rp\" in
'') echo $n \"[\$xxxm] $c\";;
*)
if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
echo \"\$rp\" >&4
echo $n \"[\$xxxm] $c\" >&4
else
echo $n \"\$rp [\$xxxm] $c\" >&4
fi
;;
esac;;
esac"
: now set up to do reads with possible shell escape and default assignment
cat <<EOSC >myread
$startsh
xxxm=\$dflt
$myecho
ans='!'
case "\$fastread" in
yes) case "\$dflt" in
'') ;;
*) ans='';
case "\$silent-\$rp" in
true-) ;;
*) echo " " >&4;;
esac;;
esac;;
*) case "\$silent" in
true) case "\$rp" in
'') ans='';;
esac;;
esac;;
esac
while expr "X\$ans" : "X!" >/dev/null; do
read answ
set x \$xxxm
shift
aok=''; eval "ans=\\"\$answ\\"" && aok=y
case "\$answ" in
"!")
sh 1>&4
echo " "
$myecho
;;
!*)
set x \`expr "X\$ans" : "X!\(.*\)\$"\`
shift
sh 1>&4 -c "\$*"
echo " "
$myecho
;;
"\$ans")
case "\$ans" in
\\&*)
set x \`expr "X\$ans" : "X&\(.*\)\$"\`
shift
case "\$1" in
-d)
fastread=yes
echo "(OK, I'll run with -d after this question.)" >&4
;;
-*)
echo "*** Sorry, \$1 not supported yet." >&4
;;
esac
$myecho
ans=!
;;
esac;;
*)
case "\$aok" in
y)
echo "*** Substitution done -- please confirm."
xxxm="\$ans"
ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
xxxm="\$ans"
ans=!
;;
*)
echo "*** Error -- try again."
ans=!
;;
esac
$myecho
;;
esac
case "\$ans\$xxxm\$nostick" in
'')
ans=!
$myecho
;;
esac
done
case "\$ans" in
'') ans="\$xxxm";;
esac
EOSC
: create .config dir to save info across Configure sessions
test -d ../.config || mkdir ../.config
cat >../.config/README <<EOF
This directory created by Configure to save information that should
persist across sessions for $package.
You may safely delete it if you wish.
EOF
: See if we are using a devel version and want that
xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
case "$usedevel" in
$define|true|[yY]*)
usedevel="$define" ;;
*) case "$xversion" in
*[13579])
cat >&4 <<EOH
*** WHOA THERE!!! ***
This is an UNSTABLE DEVELOPMENT release.
The version of this $package distribution is $xversion, that is, odd,
(as opposed to even) and that signifies a development release.
If you want a maintenance release, you want an even-numbered version.
Do ***NOT*** install this into production use.
Data corruption and crashes are possible.
It is most seriously suggested that you do not continue any further
unless you want to help in developing and debugging Perl.
If you *still* want to build perl, you can answer 'y' now,
or pass -Dusedevel to Configure.
EOH
rp='Do you really want to continue?'
dflt='n'
. ./myread
case "$ans" in
[yY]) echo >&4 "Okay, continuing."
usedevel="$define" ;;
*) echo >&4 "Okay, bye."
exit 1
;;
esac
;;
esac
usedevel="$undef"
;;
esac
case "$usedevel" in
$define|true|[yY]*)
case "$versiononly" in
'') versiononly="$define" ;;
esac
case "$installusrbinperl" in
'') installusrbinperl="$undef" ;;
esac
;;
esac
: general instructions
needman=true
firsttime=true
user=`(logname) 2>/dev/null`
case "$user" in
'') user=`whoami 2>&1`;;
esac
if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
firsttime=false
echo " "
rp='Would you like to see the instructions?'
dflt=n
. ./myread
case "$ans" in
[yY]*) ;;
*) needman=false;;
esac
fi
if $needman; then
cat <<EOH
This installation shell script will examine your system and ask you questions
to determine how the perl5 package should be installed. If you get
stuck on a question, you may use a ! shell escape to start a subshell or
execute a command. Many of the questions will have default answers in square
brackets; typing carriage return will give you the default.
On some of the questions which ask for file or directory names you are allowed
to use the ~name construct to specify the login directory belonging to "name",
even if you don't have a shell which knows about that. Questions where this is
allowed will be marked "(~name ok)".
EOH
rp=''
dflt='Type carriage return to continue'
. ./myread
cat <<'EOH'
The prompter used in this script allows you to use shell variables and
backticks in your answers. You may use $1, $2, etc... to refer to the words
in the default answer, as if the default line was a set of arguments given to a
script shell. This means you may also use $* to repeat the whole default line,
so you do not have to re-type everything to add something to the default.
Every time there is a substitution, you will have to confirm. If there is an
error (e.g. an unmatched backtick), the default answer will remain unchanged
and you will be prompted again.
If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
the questions and use the computed defaults (or the previous answers if there
was already a config.sh file). Type 'Configure -h' for a list of options.
You may also start interactively and then answer '& -d' at any prompt to turn
on the non-interactive behaviour for the remainder of the execution.
EOH
. ./myread
cat <<EOH
Much effort has been expended to ensure that this shell script will run on any
Unix system. If despite that it blows up on yours, your best bet is to edit
Configure and run it again. If you can't run Configure for some reason,
you'll have to generate a config.sh file by hand. Whatever problems you
have, let me (perlbug@perl.org) know how I blew it.
This installation script affects things in two ways:
1) it may do direct variable substitutions on some of the files included
in this kit.
2) it builds a config.h file for inclusion in C programs. You may edit
any of these files as the need arises after running this script.
If you make a mistake on a question, there is no easy way to back up to it
currently. The easiest thing to do is to edit config.sh and rerun all the SH
files. Configure will offer to let you do this before it runs the SH files.
EOH
dflt='Type carriage return to continue'
. ./myread
case "$firsttime" in
true) echo $user >>../.config/instruct;;
esac
fi
: find out where common programs are
echo " "
echo "Locating common programs..." >&4
cat <<EOSC >loc
$startsh
case \$# in
0) exit 1;;
esac
thing=\$1
shift
dflt=\$1
shift
for dir in \$*; do
case "\$thing" in
.)
if test -d \$dir/\$thing; then
echo \$dir
exit 0
fi
;;
*)
for thisthing in \$dir/\$thing; do
: just loop through to pick last item
done
if test -f \$thisthing; then
echo \$thisthing
exit 0
elif test "X$_exe" != X -a -f \$thisthing$_exe; then
echo \$thisthing
exit 0
elif test -f \$dir/\$thing.exe; then
if test -n "$DJGPP"; then
echo \$dir/\$thing.exe
elif test "$eunicefix" != ":"; then
: on Eunice apparently
echo \$dir/\$thing
fi
exit 0
fi
;;
esac
done
echo \$dflt
exit 1
EOSC
chmod +x loc
$eunicefix loc
loclist="
awk
cat
chmod
comm
cp
echo
expr
grep
ls
mkdir
rm
sed
sort
touch
tr
uniq
"
trylist="
ar
bison
byacc
cpp
csh
date
egrep
gmake
gzip
less
ln
make
more
nm
nroff
perl
pg
test
uname
zip
"
pth=`echo $PATH | sed -e "s/$p_/ /g"`
pth="$pth /lib /usr/lib"
for file in $loclist; do
eval xxx=\$$file
case "$xxx" in
/*|?:[\\/]*)
if test -f "$xxx"; then
: ok
else
echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
eval $file=$xxx$_exe
eval _$file=$xxx
case "$xxx" in
/*)
echo $file is in $xxx.
;;
?:[\\/]*)
echo $file is in $xxx.
;;
*)
echo "I don't know where '$file' is, and my life depends on it." >&4
echo "Go find a public domain implementation or fix your PATH setting!" >&4
exit 1
;;
esac
done
echo " "
echo "Don't worry if any of the following aren't found..."
say=offhand
for file in $trylist; do
eval xxx=\$$file
case "$xxx" in
/*|?:[\\/]*)
if test -f "$xxx"; then
: ok
else
echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
eval $file=$xxx$_exe
eval _$file=$xxx
case "$xxx" in
/*)
echo $file is in $xxx.
;;
?:[\\/]*)
echo $file is in $xxx.
;;
*)
echo "I don't see $file out there, $say."
say=either
;;
esac
done
case "$egrep" in
egrep)
echo "Substituting grep for egrep."
egrep=$grep
_egrep=$grep
;;
esac
case "$less" in
'') ;;
*) if $less -R </dev/null >/dev/null; then
echo "Substituting less -R for less."
less="$less -R"
_less=$less
fi
;;
esac
case "$ln" in
ln)
echo "Substituting cp for ln."
ln=$cp
_ln=$cp
;;
esac
case "$make" in
make)
case "$gmake" in
gmake)
echo "I can't find make or gmake, and my life depends on it." >&4
echo "Go find a public domain implementation or fix your PATH setting!" >&4
exit 1
;;
esac
;;
esac
case "$gmake" in
gmake) ;;
*) # We can't have osname yet.
if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
# Assume that gmake, if found, is definitely GNU make
# and prefer it over the system make.
echo "Substituting gmake for make."
make=$gmake
_make=$gmake
fi
;;
esac
case "$test" in
test)
echo "Hopefully test is built into your sh."
;;
*)
if `sh -c "PATH= test true" >/dev/null 2>&1`; then
echo "Using the test built into your sh."
test=test
_test=test
fi
;;
esac
case "$echo" in
echo)
echo "Hopefully echo is built into your sh."
;;
'') ;;
*)
echo " "
echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
$echo $n "hi there$c" >foo1
echo $n "hi there$c" >foo2
if cmp foo1 foo2 >/dev/null 2>&1; then
echo "They are compatible. In fact, they may be identical."
else
case "$n" in
'-n') n='' c='\c';;
*) n='-n' c='';;
esac
cat <<FOO
They are not compatible! You are probably running ksh on a non-USG system.
I'll have to use $echo instead of the builtin, since Bourne shell doesn't
have echo built in and we may have to run some Bourne shell scripts. That
means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
FOO
$echo $n "The star should be here-->$c"
$echo "*"
fi
$rm -f foo1 foo2
;;
esac
# This question was auctioned at YAPC::Europe-2007 in Vienna
# I never promised you could answer it. I only auctioned the question.
cat <<FOO
The following message is sponsored by
Dresden.pm<--The stars should be here.
Dear Perl user, system administrator or package
maintainer, the Perl community sends greetings to
you. Do you (emblematical) greet back [Y/n]? n
FOO
: Check what type of C compiler we use
cat <<EOS >trygcc
$startsh
EOS
cat <<'EOSC' >>trygcc
case "$cc" in
'') ;;
*) $rm -f try try.*
$cat >try.c <<EOM
int main(int argc, char *argv[]) {
return 0;
}
EOM
if $cc -o try $ccflags $ldflags try.c; then
:
else
echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
despair=yes
trygcc=yes
case "$cc" in
*gcc*) trygcc=no ;;
esac
# Skip this test because it gives a false match on output like:
# ./trygcc: line 23: cc: command not found
# case "`$cc -v -c try.c 2>&1`" in
# *gcc*) trygcc=no ;;
# esac
if $test X"$trygcc" = Xyes; then
if gcc -o try -c try.c; then
echo " "
echo "You seem to have a working gcc, though." >&4
# Switching compilers may undo the work of hints files.
# The most common problem is -D_REENTRANT for threads.
# This heuristic catches that case, but gets false positives
# if -Dusethreads was not actually specified. Better to
# bail out here with a useful message than fail
# mysteriously later. Should we perhaps just try to
# re-invoke Configure -Dcc=gcc config_args ?
if $test -f usethreads.cbu; then
$cat >&4 <<EOM
*** However, any setting of the C compiler flags (e.g. for thread support)
*** will be lost. It may be necessary for you to restart Configure and
*** add -Dcc=gcc to your Configure command line.
EOM
rp="Would you like to go ahead and try gcc anyway?"
dflt=n
else
rp="Would you like to use it?"
dflt=y
fi
if $test -f myread; then
. ./myread
else
if $test -f UU/myread; then
. ./UU/myread
else
echo "Cannot find myread, sorry. Aborting." >&2
exit 1
fi
fi
case "$ans" in
[yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
esac
fi
fi
fi
$rm -f try try.*
;;
esac
EOSC
cat <<EOS >checkcc
$startsh
EOS
cat <<'EOSC' >>checkcc
case "$cc" in
'') ;;
*) $rm -f try try.*
$cat >try.c <<EOM
int main(int argc, char *argv[]) {
return 0;
}
EOM
if $cc -o try $ccflags $ldflags try.c; then
:
else
if $test X"$despair" = Xyes; then
echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
fi
$cat >&4 <<EOM
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS vendor,
or for a free C compiler try http://gcc.gnu.org/
I cannot continue any further, aborting.
EOM
exit 1
fi
$rm -f try try.*
;;
esac
EOSC
: determine whether symbolic links are supported
echo " "
$touch blurfl
if $ln -s blurfl sym > /dev/null 2>&1 ; then
echo "Symbolic links are supported." >&4
lns="$ln -s"
else
echo "Symbolic links are NOT supported." >&4
lns="$ln"
fi
$rm -f blurfl sym
: determine whether symbolic links are supported
echo " "
case "$lns" in
*"ln"*" -s")
echo "Checking how to test for symbolic links..." >&4
$lns blurfl sym
if $test "X$issymlink" = X; then
case "$newsh" in
'') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
*) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
esac
if test $? = 0; then
issymlink="test -h"
else
echo "Your builtin 'test -h' may be broken." >&4
case "$test" in
/*) ;;
*) pth=`echo $PATH | sed -e "s/$p_/ /g"`
for p in $pth
do
if test -f "$p/$test"; then
test="$p/$test"
break
fi
done
;;
esac
case "$test" in
/*)
echo "Trying external '$test -h'." >&4
issymlink="$test -h"
if $test ! -h sym >/dev/null 2>&1; then
echo "External '$test -h' is broken, too." >&4
issymlink=''
fi
;;
*) issymlink='' ;;
esac
fi
fi
if $test "X$issymlink" = X; then
if $test -L sym 2>/dev/null; then
issymlink="$test -L"
echo "The builtin '$test -L' worked." >&4
fi
fi
if $test "X$issymlink" != X; then
echo "You can test for symbolic links with '$issymlink'." >&4
else
echo "I do not know how you can test for symbolic links." >&4
fi
$rm -f blurfl sym
;;
*) echo "No symbolic links, so not testing for their testing..." >&4
;;
esac
echo " "
: Make symlinks util
case "$mksymlinks" in
$define|true|[yY]*)
case "$src" in
''|'.') echo "Cannot create symlinks in the original directory." >&4
exit 1
;;
*) case "$lns:$issymlink" in
*"ln"*" -s:"*"test -"?)
echo "Creating the symbolic links..." >&4
echo "(First creating the subdirectories...)" >&4
cd ..
awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
read directory
test -z "$directory" && break
mkdir -p $directory
done
# Sanity check 1.
if test ! -d t/base; then
echo "Failed to create the subdirectories. Aborting." >&4
exit 1
fi
echo "(Then creating the symlinks...)" >&4
awk '{print $1}' $src/MANIFEST | while true; do
read filename
test -z "$filename" && break
if test -f $filename; then
if $issymlink $filename; then
rm -f $filename
fi
fi
if test -f $filename; then
echo "$filename already exists, not symlinking."
else
ln -s $src/$filename $filename
fi
done
# Sanity check 2.
if test ! -f t/base/lex.t; then
echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
exit 1
fi
cd UU
;;
*) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
;;
esac
;;
esac
;;
esac
: Check for Cross-Compilation
case "$usecrosscompile" in
$define|true|[yY]*)
$echo "Cross-compiling..."
croak=''
case "$cc" in
*-*-gcc) # A cross-compiling gcc, probably. Only supporting gcc at the moment.
targetarch=`$echo $cc|$sed 's/-gcc$//'`
$echo "Your targetarch is now set to: $targetarch"
ar=$targetarch-ar
# leave out ld, choosing it is more complex
nm=$targetarch-nm
ranlib=$targetarch-ranlib
# if sysroot is set we already have our incpath and libpath discovered, else try to get gcc to tell us
if test "X$sysroot" = X; then
$echo 'extern int foo;' > try.c
set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
shift
if $test $# -gt 0; then
incpth="$incpth $*"
incpth="`$echo $incpth|$sed 's/^ //'`"
echo "Guessing incpth '$incpth'." >&4
for i in $*; do
j="`$echo $i|$sed 's,/include$,/lib,'`"
if $test -d $j; then
libpth="$libpth $j"
fi
done
libpth="`$echo $libpth|$sed 's/^ //'`"
echo "Guessing libpth '$libpth'." >&4
fi
$rm -f try.c
fi
;;
esac
case "$targetarch" in
'') echo "Targetarch not defined." >&4; croak=y ;;
*) echo "Using targetarch $targetarch." >&4 ;;
esac
if test "X$sysroot" = X; then
case "$incpth" in
'') echo "Incpth not defined." >&4; croak=y ;;
*) echo "Using incpth '$incpth'." >&4 ;;
esac
case "$libpth" in
'') echo "Libpth not defined." >&4; croak=y ;;
*) echo "Using libpth '$libpth'." >&4 ;;
esac
case "$usrinc" in
'') for i in $incpth; do
if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
usrinc=$i
echo "Guessing usrinc $usrinc." >&4
break
fi
done
case "$usrinc" in
'') echo "Usrinc not defined." >&4; croak=y ;;
esac
;;
*) echo "Using usrinc $usrinc." >&4 ;;
esac
case "$croak" in
y) echo "Cannot continue, aborting." >&4; exit 1 ;;
esac
locincpth=' '
loclibpth=' '
else
echo "Cross-compiling using sysroot $sysroot, guessing of GCC inc/lib paths skipped" >&4
fi
: compile a host miniperl and generate_uudmap, unless we got passed them
if $test "X$hostperl" = X; then
echo "Building host miniperl and generate_uudmap binaries" >&4
cd ..
test -d host || mkdir host
cd host && rm -r ./*
../Configure -des -Dusedevel -Dmksymlinks
make miniperl
make generate_uudmap
hostperl=host/miniperl
hostgenerate=host/generate_uudmap
cd ..
cd UU
fi
;;
*)
usecrosscompile='undef'
;;
esac
## Define -Dtargethost=somecomputer to run compiled tests on another machine
case "$targethost" in
'') echo "Checking for cross-compile" >&4
case "$usecrosscompile$multiarch" in
*$define*) echo "Skipping the try tests in the rest of Configure as no targethost was defined when cross-compiling" >&4
if [ -f Makefile ]; then
echo " "
echo "Now you must ensure config.sh, config.h and the generated headers exist and run a $make."
else
echo "Configure done."
fi
exit 0
;;
*) echo "No targethost for running compiler tests against defined, running locally" >&4
run=''
to=:
from=:
;;
esac
;;
*) echo "Using targethost $targethost." >&4
case "$src" in
/*) run=$src/Cross/run
targetmkdir=$src/Cross/mkdir
to=$src/Cross/to
from=$src/Cross/from
;;
*) pwd=`$test -f ../Configure && cd ..; pwd`
run=$pwd/Cross/run
targetmkdir=$pwd/Cross/mkdir
to=$pwd/Cross/to
from=$pwd/Cross/from
;;
esac
case "$targetrun" in
'') targetrun=ssh ;;
esac
case "$targetto" in
'') targetto=scp ;;
esac
case "$targetfrom" in
'') targetfrom=scp ;;
esac
run=$run-$targetrun
to=$to-$targetto
from=$from-$targetfrom
case "$targetdir" in
'') targetdir=/tmp
echo "Guessing targetdir $targetdir." >&4
;;
esac
case "$targetuser" in
'') targetuser=root
echo "Guessing targetuser $targetuser." >&4
;;
esac
case "$targetfrom" in
scp) q=-q ;;
*) q='' ;;
esac
case "$targetrun" in
ssh|rsh)
cat >$run <<EOF
#!/bin/sh
case "\$1" in
-cwd)
shift
cwd=\$1
shift
;;
esac
case "\$cwd" in
'') cwd=$targetdir ;;
esac
exe=\$1
shift
$to \$exe
$targetrun -l $targetuser $targethost "\$cwd/\$exe \$@"
EOF
;;
*) echo "Unknown targetrun '$targetrun'" >&4
exit 1
;;
esac
case "$targetmkdir" in
*/Cross/mkdir)
cat >$targetmkdir <<EOF
#!/bin/sh
$targetrun -l $targetuser $targethost "mkdir -p \$@"
EOF
$chmod a+rx $targetmkdir
;;
*) echo "Unknown targetmkdir '$targetmkdir'" >&4
exit 1
;;
esac
case "$targetto" in
scp|rcp)
cat >$to <<EOF
#!/bin/sh
for f in \$@
do
case "\$f" in
/*)
$targetmkdir \`dirname \$f\`
$targetto $q \$f $targetuser@$targethost:\$f || exit 1
;;
*)
$targetmkdir $targetdir/\`dirname \$f\`
$targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
;;
esac
done
exit 0
EOF
;;
cp) cat >$to <<EOF
#!/bin/sh
for f in \$@
do
case "\$f" in
/*)
$mkdir -p $targetdir/\`dirname \$f\`
$cp \$f $targetdir/\$f || exit 1
;;
*)
$targetmkdir $targetdir/\`dirname \$f\`
$cp \$f $targetdir/\$f || exit 1
;;
esac
done
exit 0
EOF
;;
*) echo "Unknown targetto '$targetto'" >&4
exit 1
;;
esac
case "$targetfrom" in
scp|rcp)
cat >$from <<EOF
#!/bin/sh
for f in \$@
do
$rm -f \$f
$targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
done
exit 0
EOF
;;
cp) cat >$from <<EOF
#!/bin/sh
for f in \$@
do
$rm -f \$f
cp $targetdir/\$f . || exit 1
done
exit 0
EOF
;;
*) echo "Unknown targetfrom '$targetfrom'" >&4
exit 1
;;
esac
if $test ! -f $run; then
echo "Target 'run' script '$run' not found." >&4
else
$chmod a+rx $run
fi
if $test ! -f $to; then
echo "Target 'to' script '$to' not found." >&4
else
$chmod a+rx $to
fi
if $test ! -f $from; then
echo "Target 'from' script '$from' not found." >&4
else
$chmod a+rx $from
fi
if $test ! -f $run -o ! -f $to -o ! -f $from; then
exit 1
fi
cat >&4 <<EOF
Using '$run' for remote execution,
and '$from' and '$to'
for remote file transfer.
EOF
;;
esac # if targethost
: see whether [:lower:] and [:upper:] are supported character classes
echo " "
case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
ABYZ)
echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
up='[:upper:]'
low='[:lower:]'
;;
*) # There is a discontinuity in EBCDIC between 'R' and 'S'
# (0xd9 and 0xe2), therefore that is a nice testing point.
if test "X$up" = X -o "X$low" = X; then
case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in
rs) up='[A-Z]'
low='[a-z]'
;;
esac
fi
if test "X$up" = X -o "X$low" = X; then
case "`echo RS | $tr R-S r-s 2>/dev/null`" in
rs) up='A-Z'
low='a-z'
;;
esac
fi
if test "X$up" = X -o "X$low" = X; then
case "`echo RS | od -x 2>/dev/null`" in
*D9E2*|*d9e2*)
echo "Hey, this might be EBCDIC." >&4
if test "X$up" = X -o "X$low" = X; then
case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
rs) up='[A-IJ-RS-Z]'
low='[a-ij-rs-z]'
;;
esac
fi
if test "X$up" = X -o "X$low" = X; then
case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
rs) up='A-IJ-RS-Z'
low='a-ij-rs-z'
;;
esac
fi
;;
esac
fi
esac
case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in
rs)
echo "Using $up and $low to convert case." >&4
;;
*)
echo "I don't know how to translate letters from upper to lower case." >&4
echo "Your tr is not acting any way I know of." >&4
exit 1
;;
esac
: set up the translation script tr, must be called with ./tr of course
cat >tr <<EOSC
$startsh
case "\$1\$2" in
'[A-Z][a-z]') exec $tr '$up' '$low';;
'[a-z][A-Z]') exec $tr '$low' '$up';;
esac
exec $tr "\$@"
EOSC
chmod +x tr
$eunicefix tr
: Try to determine whether config.sh was made on this system
case "$config_sh" in
'')
myuname=`$uname -a 2>/dev/null`
$test -z "$myuname" && myuname=`hostname 2>/dev/null`
# tr '[A-Z]' '[a-z]' would not work in EBCDIC
# because the A-Z/a-z are not consecutive.
myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \
./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
newmyuname="$myuname"
dflt=n
case "$knowitall" in
'')
if test -f ../config.sh; then
if $contains myuname= ../config.sh >/dev/null 2>&1; then
eval "`grep myuname= ../config.sh`"
fi
if test "X$myuname" = "X$newmyuname"; then
dflt=y
fi
fi
;;
*) dflt=y;;
esac
: Get old answers from old config file if Configure was run on the
: same system, otherwise use the hints.
hint=default
cd ..
if test -f config.sh; then
echo " "
rp="I see a config.sh file. Shall I use it to set the defaults?"
. UU/myread
case "$ans" in
n*|N*) echo "OK, I'll ignore it."
mv config.sh config.sh.old
myuname="$newmyuname"
;;
*) echo "Fetching default answers from your old config.sh file..." >&4
tmp_n="$n"
tmp_c="$c"
tmp_sh="$sh"
. ./config.sh
cp config.sh UU
n="$tmp_n"
c="$tmp_c"
: Older versions did not always set $sh. Catch re-use of such
: an old config.sh.
case "$sh" in
'') sh="$tmp_sh" ;;
esac
hint=previous
;;
esac
fi
. ./UU/checkcc
if test ! -f config.sh; then
$cat <<EOM
First time through, eh? I have some defaults handy for some systems
that need some extra help getting the Configure answers right:
EOM
(cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
dflt=''
: Half the following guesses are probably wrong... If you have better
: tests or hints, please send them to perlbug@perl.org
: The metaconfig authors would also appreciate a copy...
$test -f /irix && osname=irix
$test -f /xenix && osname=sco_xenix
$test -f /dynix && osname=dynix
$test -f /dnix && osname=dnix
$test -f /lynx.os && osname=lynxos
$test -f /unicos && osname=unicos && osvers=`$uname -r`
$test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
$test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
$test -f /bin/mips && /bin/mips && osname=mips
$test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
$sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
$test -d /usr/apollo/bin && osname=apollo
$test -f /etc/saf/_sactab && osname=svr4
$test -d /usr/include/minix && osname=minix
$test -f /system/gnu_library/bin/ar.pm && osname=vos
if $test -d /MachTen -o -d /MachTen_Folder; then
osname=machten
if $test -x /sbin/version; then
osvers=`/sbin/version | $awk '{print $2}' |
$sed -e 's/[A-Za-z]$//'`
elif $test -x /usr/etc/version; then
osvers=`/usr/etc/version | $awk '{print $2}' |
$sed -e 's/[A-Za-z]$//'`
else
osvers="$2.$3"
fi
fi
$test -f /sys/posix.dll &&
$test -f /usr/bin/what &&
set X `/usr/bin/what /sys/posix.dll` &&
$test "$3" = UWIN &&
osname=uwin &&
osvers="$5"
if $test -f $uname; then
set X $myuname
shift
case "$5" in
fps*) osname=fps ;;
mips*)
case "$4" in
umips) osname=umips ;;
*) osname=mips ;;
esac;;
[23]100) osname=mips ;;
next*) osname=next ;;
i386*)
tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
osname='sco'
osvers=$tmp
elif $test -f /etc/kconfig; then
osname=isc
if test "$lns" = "$ln -s"; then
osvers=4
elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
osvers=3
elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
osvers=2
fi
fi
tmp=''
;;
pc*)
if test -n "$DJGPP"; then
osname=dos
osvers=djgpp
fi
;;
esac
case "$1" in
aix) osname=aix
tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
case "$tmp" in
# oslevel can fail with:
# oslevel: Unable to acquire lock.
*not\ found) osvers="$4"."$3" ;;
'<3240'|'<>3240') osvers=3.2.0 ;;
'=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
'=3250'|'>3250') osvers=3.2.5 ;;
*) osvers=$tmp;;
esac
;;
bsd386) osname=bsd386
osvers=`$uname -r`
;;
cygwin*) osname=cygwin
osvers="$3"
;;
*dc.osx) osname=dcosx
osvers="$3"
;;
dnix) osname=dnix
osvers="$3"
;;
domainos) osname=apollo
osvers="$3"
;;
dgux) osname=dgux
osvers="$3"
;;
dragonfly) osname=dragonfly
osvers="$3"
;;
dynixptx*) osname=dynixptx
osvers=`echo "$4"|sed 's/^v//'`
;;
freebsd) osname=freebsd
osvers="$3" ;;
genix) osname=genix ;;
gnu) osname=gnu
osvers="$3" ;;
hp*) osname=hpux
osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
;;
irix*) osname=irix
case "$3" in
4*) osvers=4 ;;
5*) osvers=5 ;;
*) osvers="$3" ;;
esac
;;
linux) osname=linux
case "$3" in
*) osvers="$3" ;;
esac
;;
MiNT) osname=mint
;;
netbsd*) osname=netbsd
osvers="$3"
;;
news-os) osvers="$3"
case "$3" in
4*) osname=newsos4 ;;
*) osname=newsos ;;
esac
;;
next*) osname=next ;;
nonstop-ux) osname=nonstopux ;;
openbsd) osname=openbsd
osvers="$3"
;;
os2) osname=os2
osvers=