configure-bin.ac 3.7 KB
Newer Older
1 2 3 4 5 6
dnl
dnl Binary distribution configure script
dnl
#!/bin/sh
#

sof's avatar
sof committed
7
# Is it there?
8
AC_INIT(Makefile-vars.in)
9

sof's avatar
sof committed
10 11
exeext=''

12 13 14 15 16 17 18 19 20 21 22 23 24 25
#
# First off, what system are we running under?
#
AC_CANONICAL_SYSTEM

dnl ** canonicalize platform names
# Canonicali[sz]e the platform name
TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1

#
# The following will be more difficult when we *are* cross-compiling.
# Suitable names to slam in *_CPP are in platform.h.in.
# We also record the architecture, vendor, and operating system (OS)
# separately.
sof's avatar
sof committed
26
case $TargetPlatform in
ken's avatar
ken committed
27
alpha*-dec-osf[[12]]*)
28
	TargetPlatform=alpha-dec-osf1;;
ken's avatar
ken committed
29
alpha*-dec-osf[[345]]*)
30
	TargetPlatform=alpha-dec-osf3;;
ken's avatar
ken committed
31
alpha*-unknown-linux)
32
	TargetPlatform=alpha-unknown-linux;;
ken's avatar
ken committed
33
alpha*-unknown-freebsd*)
34
	TargetPlatform=alpha-unknown-freebsd;;
35 36 37 38 39 40
hppa1.1-hp-hpux*)
	TargetPlatform=hppa1.1-hp-hpux;;
i[[3456]]86-*-linuxaout*)
	TargetPlatform=i386-unknown-linuxaout;;
i[[3456]]86-*-linux*)
	TargetPlatform=i386-unknown-linux;;
41 42
i[[3456]]86-*-freebsd2*)
	TargetPlatform=i386-unknown-freebsd2;;
43
i[[3456]]86-*-freebsd[[3-9]]*)
44
	TargetPlatform=i386-unknown-freebsd;;
45 46
i[[3456]]86-*-netbsd*)
	TargetPlatform=i386-unknown-netbsd;;
47 48
i[[3456]]86-*-openbsd*)
	TargetPlatform=i386-unknown-openbsd;;
49 50
i[[3456]]86-*-solaris2*)
	TargetPlatform=i386-unknown-solaris2;;
sof's avatar
sof committed
51
i[[3456]]86-*-cygwin*)
sof's avatar
sof committed
52
	exeext='.exe'
53
	TargetPlatform=i386-unknown-cygwin32;;
sof's avatar
sof committed
54 55 56 57
i[[3456]]86-*-mingw32*)
	exeext='.exe'
	# We assume you're using mingw32 via the gcc that comes
	# with cygwin, and not the native port, so let's augment
rrt's avatar
rrt committed
58 59 60
	# the gcc command-line used here with -mno-cygwin -mwin32
	# to arrange for good things to happen.
	CFLAGS="-mno-cygwin -mwin32 $CFLAGS"
sof's avatar
sof committed
61 62
	TargetPlatform=i386-unknown-mingw32
	;;
63 64
i[[3456]]86-apple-darwin*)
	TargetPlatform=i386-apple-darwin;;
65 66 67 68 69
m68k-next-nextstep2)
	TargetPlatform=m68k-next-nextstep2;;
m68k-next-nextstep3)
	TargetPlatform=m68k-next-nextstep3;;
i[[3456]]86-next-nextstep3)
sof's avatar
sof committed
70
	TargetPlatform=i386-next-nextstep3;;
71
m68k-sun-sunos4*)
sof's avatar
sof committed
72
	TargetPlatform=m68k-sun-sunos4;;
73 74 75 76 77 78
mips-dec-ultrix*)
        TargetPlaformP=mips-dec-ultrix;;
mips-sgi-irix*)
	TargetPlatform=mips-sgi-irix;;
powerpc-ibm-aix*)
	TargetPlatform=powerpc-ibm-aix;;
79 80
rs6000-ibm-aix*)
	TargetPlatform=rs6000-ibm-aix;;
sebc's avatar
sebc committed
81 82
powerpc-apple-darwin*)
	TargetPlatform=powerpc-apple-darwin;;
83 84 85 86
powerpc-*-linux*)
	TargetPlatform=powerpc-unknown-linux;;
powerpc64-*-linux*)
	TargetPlatform=powerpc64-unknown-linux;;
87 88 89 90
sparc-sun-sunos4*)
	TargetPlatform=sparc-sun-sunos4;;
sparc-sun-solaris2*)
	TargetPlatform=sparc-sun-solaris2;;
91 92 93 94 95 96 97 98
x86_64-*-linux*)
        TargetPlatform=x86_64-unknown-linux;;
x86_64-*-freebsd*)
	TargetPlatform=x86_64-unknown-freebsd;;
x86_64-*-openbsd*)
	TargetPlatform=x86_64-unknown-openbsd;;
x86_64-*-netbsd*)
	TargetPlatform=x86_64-unknown-netbsd;;
99 100
x86_64-apple-darwin*)
	TargetPlatform=x86_64-apple-darwin;;
101 102 103 104 105
*)
        echo "Unrecognised platform: $TargetPlatform"
        exit 1
        ;;
esac
sof's avatar
sof committed
106
echo "Which we'll further canonicalise into: $TargetPlatform"
107

sof's avatar
sof committed
108
AC_SUBST(TargetPlatform)
sof's avatar
sof committed
109
AC_SUBST(exeext)
110 111

#
112 113 114 115 116 117 118
dnl ** Check Perl installation **
#
AC_PATH_PROG(PerlCmd,perl)
if test -z "$PerlCmd"; then
   echo "You must install perl before you can continue"
   echo "Perhaps it is already installed, but not in your PATH?"
   exit 1
119
fi
120
FPTOOLS_SHEBANG_PERL
121

sof's avatar
sof committed
122 123
#
dnl ** figure out how to do a BSD-ish install **
124 125
#
AC_PROG_INSTALL
sof's avatar
sof committed
126 127 128 129

#
dnl ** how to do symlinks **
#
sof's avatar
sof committed
130
AC_PROG_LN_S()
sof's avatar
sof committed
131 132 133

#
dnl ** Find the path to sed **
134
#
sof's avatar
sof committed
135
AC_PATH_PROG(SedCmd,sed)
136

sof's avatar
sof committed
137 138 139
#
dnl ** How to invoke cpp directly **
#
140
FP_HAVE_GCC
141
AC_PROG_CPP
142

sof's avatar
sof committed
143
#
144
AC_OUTPUT(Makefile-vars)
145

146
echo "****************************************************"
147
echo "Configuration done, ready to either 'make install'"
148
echo "or 'make in-place'."
sof's avatar
sof committed
149
echo "(see README and INSTALL files for more info.)"
150
echo "****************************************************"