exit 1
fi
-if test ! -c /dev/null ; then
+if test -f /sys/utilities/MultiView ; then
+ # AmigaOS, test -c for /dev/null is not useful
+ :
+elif test ! -c /dev/null ; then
cat <<EOF
***
*** I'm sorry, but /dev/null appears to be a file rather than a device.
error=''
silent=''
extractsh=''
-override=''
knowitall=''
rm -f optdef.sh posthint.sh
cat >optdef.sh <<EOS
-s) shift; silent=true; realsilent=true;;
-E) shift; alldone=exit;;
-K) shift; knowitall=true;;
- -O) shift; override=true;;
+ -O) shift;;
-S) shift; silent=true; extractsh=true;;
-D)
shift
-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.
+ -O : ignored for backward compatibility
-S : perform variable substitutions on all .SH files (can mix with -f)
-U : undefine symbol:
-U symbol symbol gets the value 'undef'
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;;
+case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`"-"`echo AbyZ | tr '[:upper:]' '[:lower:]' 2>/dev/null`" in
+ABYZ-abyz) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
esac
echo "Fetching answers from $config_sh..."
cd ..
. $config_sh
- test "$override" && . ./optdef.sh
+ . ./optdef.sh
echo " "
. UU/extract
rm -rf UU
: see whether [:lower:] and [:upper:] are supported character classes
echo " "
-case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
-ABYZ)
+case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`"-"`echo AbyZ | $tr '[:upper:]' '[:lower:]' 2>/dev/null`" in
+ABYZ-abyz)
echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
up='[:upper:]'
low='[:lower:]'
$test -f /etc/saf/_sactab && osname=svr4
$test -d /usr/include/minix && osname=minix && osvers=`$uname -r`
$test -f /system/gnu_library/bin/ar.pm && osname=vos
+ $test -f /sys/utilities/MultiView && osname=amigaos
if $test -d /MachTen -o -d /MachTen_Folder; then
osname=machten
if $test -x /sbin/version; then
hint=previous
;;
esac
-test "$override" && . ./optdef.sh
+. ./optdef.sh
: Restore computed paths
for file in $loclist $trylist; do
dos|vms)
: XXX Should be a Configure test for double-dots in filenames.
version=`echo $revision $patchlevel $subversion | \
- $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
+ $awk '{ printf "%d_%d_%d", $1, $2, $3 }'`
api_versionstring=`echo $api_revision $api_version $api_subversion | \
- $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
+ $awk '{ printf "%d_%d_%d", $1, $2, $3 }'`
;;
*)
version=`echo $revision $patchlevel $subversion | \
- $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
+ $awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
api_versionstring=`echo $api_revision $api_version $api_subversion | \
- $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
+ $awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
;;
esac
: Special case the 5.005_xx maintenance series, which used 5.005
# is to add the flag to the flags passed to the compiler at link time,
# as that way the compiler can do the right implementation dependant
# thing. (NWC)
- case "$gccversion" in
- ?*) set stack-protector-strong -fstack-protector-strong
- eval $checkccflag
- case "$dflt" in
- *-fstack-protector-strong*) ;; # It got added.
- *) # Try the plain/older -fstack-protector.
- set stack-protector -fstack-protector
- eval $checkccflag
- ;;
+ case "$osname" in
+ amigaos) ;; # -fstack-protector builds but doesn't work
+ *) case "$gccversion" in
+ ?*) set stack-protector-strong -fstack-protector-strong
+ eval $checkccflag
+ case "$dflt" in
+ *-fstack-protector-strong*) ;; # It got added.
+ *) # Try the plain/older -fstack-protector.
+ set stack-protector -fstack-protector
+ eval $checkccflag
+ ;;
+ esac
+ ;;
esac
;;
esac
: the following weeds options from ccflags that are of no interest to cpp
case "$cppflags" in
'') cppflags="$ccflags" ;;
-*) cppflags="$cppflags $ccflags" ;;
+*) set X $ccflags; shift
+ case " $cppflags " in
+ *" $1 "*) ;; # Try to avoid doubling the cppflags.
+ *) cppflags="$cppflags $ccflags" ;;
+ esac
+ ;;
esac
case "$gccversion" in
1*) cppflags="$cppflags -D__GNUC__"
echo " "
echo "Computing filename position in cpp output for #include directives..." >&4
case "$osname" in
+amigaos) fieldn=3 ;; # Workaround for a bug in abc (pdksh).
+esac
+case "$fieldn" in
+'')
+case "$osname" in
vos) testaccess=-e ;;
*) testaccess=-r ;;
esac
chmod +x fieldn
fieldn=`./fieldn`
$rm -f foo.c fieldn
+;;
+esac
case $fieldn in
'') pos='???';;
1) pos=first;;
: with g++ one needs -shared to get is-in-libc to work for dlopen
case "$gccversion" in
'') ;;
+*Clang*) ;;
*) case "$d_cplusplus" in
"$define") ccflags="$ccflags -shared" ;;
esac
exit(1); /* fail */
}
EOM
- if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
+ if $cc $ccflags $ldflags -o a.out try.c >/dev/null 2>&1 && $run ./a.out; then
bin_ELF="$define"
fi
$rm_try
echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
case "$eagain" in
'')
- case "$d_fork:$d_pipe" in
- define:define)
+ case "$d_fork:$d_pipe:$d_alarm" in
+ define:define:define)
$cat head.c > try.c
$cat >>try.c <<EOCP
#include <errno.h>
set readlink d_readlink
eval $inlibc
-: Check if exe is symlink to abs path of executing program
+: Check if there is a /proc symlink to the abs path of
+: the executing program. We will honor hints of d_procselfexe=$undef
+: or procselfexe being non-empty, otherwise will try to determine both
+: if we have readlink.
+: AmigaOS will attempt to mount proc: aka /proc, if /proc/... is
+: referenced, and AmigaOS does not have a proc filesystem anyway.
echo " "
-procselfexe=''
val="$undef"
-case "$d_readlink" in
- "$define")
- : NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
- : more tidy to avoid an extra level of symlink
+if $test "X$d_procselfexe" = Xundef; then
+ procselfexe=''
+elif $test "X$procselfexe" != X -a "X$procselfexe" != 'X '; then
+ val="$define"
+elif $test "X$d_readlink" = Xdefine; then
+ : NetBSD first as /proc/self is a symlink to /proc/curproc,
+ : and it feels more tidy to avoid an extra level of symlink
set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
while test $# -gt 0; do
type=$1; try=$2
fi
fi
done
- ;;
-esac
+fi
$rm -f reflect
set d_procselfexe
eval $setvar
esac
: Trace out the files included by signal.h, then look for SIGxxx names.
+case "$sig_num_init" in
+'')
if [ "X$fieldn" = X ]; then
: Just make some guesses. We check them later.
xxx="$sysroot/usr/include/signal.h $sysroot/usr/include/sys/signal.h"
}'
sig_size=`echo $sig_name | awk '{print NF}'`
$rm -f signal signal.c signal.awk signal.lst signal_cmd
+;;
+esac
: Check size of size
echo " "
: add -D_FORTIFY_SOURCE if feasible and not already there
case "$gccversion" in
-4.*) case "$optimize$ccflags" in
+[45].*) case "$optimize$ccflags" in
*-O*) case "$ccflags$cppsymbols" in
*_FORTIFY_SOURCE=*) # Don't add it again.
echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4
;;
esac
;;
- *) echo "You have gcc 4.* but not optimizing, not adding -D_FORTIFY_SOURCE." >&4
+ *) echo "You have gcc 4.* or later but not optimizing, not adding -D_FORTIFY_SOURCE." >&4
;;
esac
;;
-*) echo "You seem not to have gcc 4.*, not adding -D_FORTIFY_SOURCE." >&4
+*) echo "You seem not to have gcc 4.* or later, not adding -D_FORTIFY_SOURCE." >&4
;;
esac
case "$xxx" in
DynaLoader|dynaload) ;;
*)
- this_ext=`echo $xxx | $sed -e s/-/\\\//g`;
+ this_ext=`echo "$xxx" | $sed -e s/-/\\\//g`;
case "$this_ext" in
Scalar/List/Utils) this_ext="List/Util" ;;
PathTools) this_ext="Cwd" ;;
esac;
- echo " $xs_extensions $nonxs_extensions" > $tdir/$$.tmp;
- if $contains " $this_ext " $tdir/$$.tmp; then
+ echo " $xs_extensions $nonxs_extensions" > "$tdir/$$.tmp";
+ if $contains " $this_ext " "$tdir/$$.tmp"; then
echo >&4;
echo "Duplicate directories detected for extension $xxx" >&4;
echo "Configure cannot correctly recover from this - shall I abort?" >&4;
esac;
echo "Ok. You will need to correct config.sh before running make." >&4;
fi;
- $ls -1 $xxx > $tdir/$$.tmp;
- if $contains "\.xs$" $tdir/$$.tmp > /dev/null 2>&1; then
+ $ls -1 "$xxx" > "$tdir/$$.tmp";
+ if $contains "\.xs$" "$tdir/$$.tmp" > /dev/null 2>&1; then
xs_extensions="$xs_extensions $this_ext";
- elif $contains "\.c$" $tdir/$$.tmp > /dev/null 2>&1; then
+ elif $contains "\.c$" "$tdir/$$.tmp" > /dev/null 2>&1; then
xs_extensions="$xs_extensions $this_ext";
- elif $test -d $xxx; then
+ elif $test -d "$xxx"; then
nonxs_extensions="$nonxs_extensions $this_ext";
fi;
- $rm -f $tdir/$$.tmp;
+ $rm -f "$tdir/$$.tmp";
;;
esac;
done'
avail_ext=''
for xxx in $xs_extensions ; do
case "$xxx" in
+ Amiga*)
+ case "$osname" in
+ amigaos) avail_ext="$avail_ext $xxx" ;;
+ esac
+ ;;
DB_File|db_file)
case "$i_db" in
$define) avail_ext="$avail_ext $xxx" ;;
esac
;;
Sys/Syslog|sys/syslog)
- : XXX syslog requires socket
- case "$d_socket" in
- true|$define|y) avail_ext="$avail_ext $xxx" ;;
+ case $osname in
+ amigaos) ;; # not really very useful on AmigaOS
+ *)
+ : XXX syslog requires socket
+ case "$d_socket" in
+ true|$define|y) avail_ext="$avail_ext $xxx" ;;
+ esac
+ ;;
esac
;;
Thread|thread)