2 dnl Binary distribution configure script
11 # First off, what system are we running under?
15 dnl ** canonicalize platform names
16 # Canonicali[sz]e the platform name
17 TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1
20 # The following will be more difficult when we *are* cross-compiling.
21 # Suitable names to slam in *_CPP are in platform.h.in.
22 # We also record the architecture, vendor, and operating system (OS)
24 case $TargetPlatform in
25 alpha-dec-osf[[1234]]*)
26 TargetPlatform=alpha-dec-osf1;;
28 TargetPlatform=hppa1.1-hp-hpux;;
29 i[[3456]]86-*-linuxaout*)
30 TargetPlatform=i386-unknown-linuxaout;;
32 TargetPlatform=i386-unknown-linux;;
33 i[[3456]]86-*-freebsd*)
34 TargetPlatform=i386-unknown-freebsd;;
35 i[[3456]]86-*-netbsd*)
36 TargetPlatform=i386-unknown-netbsd;;
37 i[[3456]]86-*-solaris2*)
38 TargetPlatform=i386-unknown-solaris2;;
39 i[[3456]]86-*-cygwin32*)
40 TargetPlatform=i386-unknown-cygwin32;;
42 TargetPlatform=m68k-next-nextstep2;;
44 TargetPlatform=m68k-next-nextstep3;;
45 i[[3456]]86-next-nextstep3)
46 TargetPlatform=i386-next-nextstep3;;
48 TargetPlatform=m68k-sun-sunos4;;
50 TargetPlaformP=mips-dec-ultrix;;
52 TargetPlatform=mips-sgi-irix;;
54 TargetPlatform=powerpc-ibm-aix;;
56 TargetPlatform=rs6000-ibm-aix;;
58 TargetPlatform=sparc-sun-sunos4;;
60 TargetPlatform=sparc-sun-solaris2;;
62 echo "Unrecognised platform: $TargetPlatform"
66 echo "Which we'll further canonicalise into: $TargetPlatform"
68 AC_SUBST(TargetPlatform)
70 AC_CHECK_PROG(PerlCmd,perl,$ac_dir/$ac_word)
71 if test -z "$PerlCmd"; then
72 echo "You must install perl before you can continue"
73 echo "Perhaps it is already installed, but not in your PATH?"
75 echo "Continuing, assuming perl will be available as: perl"
78 dnl ** does #!.../perl work? (sometimes it's too long...)
79 echo "checking if \`#!$PerlCmd' works in shell scripts"
84 (SHELL=/bin/sh; export SHELL; ./conftest 69 > /dev/null)
85 if test $? -ne 69; then
88 echo "It doesn't! Perhaps \`#!$PerlCmd' is too long (often 32 characters max)"
93 dnl ** check if perl library is properly installed
94 # (by seeing if a "do 'getopts.pl'" works...
95 if $PerlCmd -e 'do "getopts.pl" || exit(1); exit(0);' > /dev/null 2>&1 ; then
98 echo "I think your perl library is misinstalled."
99 echo "The following script did not work:"
100 echo ' do "getopts.pl" || exit(1); exit(0);'
101 echo "But, nevermind, let us continue.."
104 dnl ** figure out how to do a BSD-ish install