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=sparc-sun-sunos4;;
58 TargetPlatform=sparc-sun-solaris2;;
60 echo "Unrecognised platform: $TargetPlatform"
64 echo "Which we'll further canonicalise into: $TargetPlatform"
66 AC_SUBST(TargetPlatform)
68 AC_CHECK_PROG(PerlCmd,perl,$ac_dir/$ac_word)
69 if test -z "$PerlCmd"; then
70 echo "You must install perl before you can continue"
71 echo "Perhaps it is already installed, but not in your PATH?"
73 echo "Continuing, assuming perl will be available as: perl"
76 dnl ** does #!.../perl work? (sometimes it's too long...)
77 echo "checking if \`#!$PerlCmd' works in shell scripts"
82 (SHELL=/bin/sh; export SHELL; ./conftest 69 > /dev/null)
83 if test $? -ne 69; then
86 echo "It doesn't! Perhaps \`#!$PerlCmd' is too long (often 32 characters max)"
91 dnl ** check if perl library is properly installed
92 # (by seeing if a "do 'getopts.pl'" works...
93 if $PerlCmd -e 'do "getopts.pl" || exit(1); exit(0);' > /dev/null 2>&1 ; then
96 echo "I think your perl library is misinstalled."
97 echo "The following script did not work:"
98 echo ' do "getopts.pl" || exit(1); exit(0);'
99 echo "But, nevermind, let us continue.."
102 dnl ** figure out how to do a BSD-ish install