2 dnl Binary distribution configure script
10 # First off, what system are we running under?
14 dnl ** canonicalize platform names
15 # Canonicali[sz]e the platform name
16 TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1
19 # The following will be more difficult when we *are* cross-compiling.
20 # Suitable names to slam in *_CPP are in platform.h.in.
21 # We also record the architecture, vendor, and operating system (OS)
24 alpha-dec-osf[[1234]]*)
25 TargetPlatform=alpha-dec-osf1;;
27 TargetPlatform=hppa1.1-hp-hpux;;
28 i[[3456]]86-*-linuxaout*)
29 TargetPlatform=i386-unknown-linuxaout;;
31 TargetPlatform=i386-unknown-linux;;
32 i[[3456]]86-*-freebsd*)
33 TargetPlatform=i386-unknown-freebsd;;
34 i[[3456]]86-*-netbsd*)
35 TargetPlatform=i386-unknown-netbsd;;
36 i[[3456]]86-*-solaris2*)
37 TargetPlatform=i386-unknown-solaris2;;
38 i[[3456]]86-*-cygwin32*)
39 TargetPlatform=i386-unknown-cygwin32;;
41 TargetPlatform=m68k-next-nextstep2;;
43 TargetPlatform=m68k-next-nextstep3;;
44 i[[3456]]86-next-nextstep3)
45 TargetPlatform=i386-next-nextstep3
47 TargetPlatform=m68k-sun-sunos4 #hack
49 TargetPlaformP=mips-dec-ultrix;;
51 TargetPlatform=mips-sgi-irix;;
53 TargetPlatform=powerpc-ibm-aix;;
55 TargetPlatform=sparc-sun-sunos4;;
57 TargetPlatform=sparc-sun-solaris2;;
59 echo "Unrecognised platform: $TargetPlatform"
63 echo "Which we'll canonicalise into: $TargetPlatform"
65 platform=$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?"
74 $PerlCmd -v >conftest.out 2>&1
75 if egrep "version 4" conftest.out >/dev/null 2>&1; then
76 if egrep "Patch level: 35" conftest.out >/dev/null 2>&1; then
78 ************************************************************************
79 Uh-oh...looks like you have Perl 4.035.
81 Perl version 4.035 has a bug to do with recursion that will bite if
82 you run the lit2texi script, when making Info files from
83 literate files of various sorts. Either use the current version
84 (4.036), an older version (e.g., perl 4.019) or apply the patch in
85 glafp-utils/perl-4.035-fixes to your 4.035 perl.
86 ************************************************************************
90 if egrep "version 5" conftest.out >/dev/null 2>&1; then
93 echo "I'm not sure if your version of perl will work,"
94 echo "but it's worth a shot, eh?"
100 dnl ** does #!.../perl work? (sometimes it's too long...)
101 echo "checking if \`#!$PerlCmd' works in shell scripts"
106 (SHELL=/bin/sh; export SHELL; ./conftest 69 > /dev/null)
107 if test $? -ne 69; then
110 echo "It doesn't! Perhaps \`#!$PerlCmd' is too long (often 32 characters max)"
115 dnl ** check if perl library is properly installed
116 # (by seeing if a "do 'getopts.pl'" works...
117 if $PerlCmd -e 'do "getopts.pl" || exit(1); exit(0);' > /dev/null 2>&1 ; then
120 echo "I think your perl library is misinstalled."
121 echo "The following script did not work:"
122 echo ' do "getopts.pl" || exit(1); exit(0);'
126 dnl ** figure out how to do a BSD-ish install