2 dnl Binary distribution configure script
13 # First off, what system are we running under?
17 dnl ** canonicalize platform names
18 # Canonicali[sz]e the platform name
19 TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1
22 # The following will be more difficult when we *are* cross-compiling.
23 # Suitable names to slam in *_CPP are in platform.h.in.
24 # We also record the architecture, vendor, and operating system (OS)
26 case $TargetPlatform in
28 TargetPlatform=alpha-dec-osf1;;
30 TargetPlatform=alpha-dec-osf3;;
32 TargetPlatform=alpha-unknown-linux;;
33 alpha-unknown-freebsd*)
34 TargetPlatform=alpha-unknown-freebsd;;
36 TargetPlatform=hppa1.1-hp-hpux;;
37 i[[3456]]86-*-linuxaout*)
38 TargetPlatform=i386-unknown-linuxaout;;
40 TargetPlatform=i386-unknown-linux;;
41 i[[3456]]86-*-freebsd2*)
42 TargetPlatform=i386-unknown-freebsd2;;
43 i[[3456]]86-*-freebsd[[3-9]]*)
44 TargetPlatform=i386-unknown-freebsd;;
45 i[[3456]]86-*-netbsd*)
46 TargetPlatform=i386-unknown-netbsd;;
47 i[[3456]]86-*-openbsd*)
48 TargetPlatform=i386-unknown-openbsd;;
49 i[[3456]]86-*-solaris2*)
50 TargetPlatform=i386-unknown-solaris2;;
51 i[[3456]]86-*-cygwin32*)
53 TargetPlatform=i386-unknown-cygwin32;;
54 i[[3456]]86-*-mingw32*)
56 # We assume you're using mingw32 via the gcc that comes
57 # with cygwin, and not the native port, so let's augment
58 # the gcc command-line used here with -mno-cygwin to
59 # arrange for good things to happen.
60 CFLAGS="-mno-cygwin $CFLAGS"
61 TargetPlatform=i386-unknown-mingw32
64 TargetPlatform=m68k-next-nextstep2;;
66 TargetPlatform=m68k-next-nextstep3;;
67 i[[3456]]86-next-nextstep3)
68 TargetPlatform=i386-next-nextstep3;;
70 TargetPlatform=m68k-sun-sunos4;;
72 TargetPlaformP=mips-dec-ultrix;;
74 TargetPlatform=mips-sgi-irix;;
76 TargetPlatform=powerpc-ibm-aix;;
78 TargetPlatform=rs6000-ibm-aix;;
80 TargetPlatform=sparc-sun-sunos4;;
82 TargetPlatform=sparc-sun-solaris2;;
84 echo "Unrecognised platform: $TargetPlatform"
88 echo "Which we'll further canonicalise into: $TargetPlatform"
90 AC_SUBST(TargetPlatform)
93 AC_CHECK_PROG(PerlCmd,perl,$ac_dir/$ac_word)
94 if test -z "$PerlCmd"; then
95 echo "You must install perl before you can continue"
96 echo "Perhaps it is already installed, but not in your PATH?"
98 echo "Continuing, assuming perl will be available as: perl"
101 dnl ** does #!.../perl work? (sometimes it's too long...)
102 echo "checking if \`#!$PerlCmd' works in shell scripts"
107 (SHELL=/bin/sh; export SHELL; ./conftest 69 > /dev/null)
108 if test $? -ne 69; then
111 echo "It doesn't! Perhaps \`#!$PerlCmd' is too long (often 32 characters max).."
116 dnl ** figure out how to do a BSD-ish install **
121 dnl ** how to do symlinks **
126 dnl ** Find the path to sed **
128 AC_PATH_PROG(SedCmd,sed)
131 dnl ** How to invoke cpp directly **
140 echo "****************************************************"
141 echo "Configuration done, ready to either 'make install'"
142 echo "or 'make in-place'."
143 echo "(see README and INSTALL files for more info.)"
144 echo "****************************************************"