]> git.ipfire.org Git - thirdparty/gcc.git/blob - gnattools/configure.ac
Remove obsolete configure code in gnattools
[thirdparty/gcc.git] / gnattools / configure.ac
1 # Configure script for libada.
2 # Copyright 2003, 2004, 2009, 2012 Free Software Foundation, Inc.
3 #
4 # This file is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; see the file COPYING3. If not see
16 # <http://www.gnu.org/licenses/>.
17
18 sinclude(../config/acx.m4)
19 sinclude(../config/override.m4)
20
21 AC_INIT
22
23 AC_CONFIG_SRCDIR([Makefile.in])
24
25 # Command-line options.
26 # Very limited version of AC_MAINTAINER_MODE.
27 AC_ARG_ENABLE([maintainer-mode],
28 [AC_HELP_STRING([--enable-maintainer-mode],
29 [enable make rules and dependencies not useful (and
30 sometimes confusing) to the casual installer])],
31 [case ${enable_maintainer_mode} in
32 yes) MAINT='' ;;
33 no) MAINT='#' ;;
34 *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;;
35 esac
36 maintainer_mode=${enableval}],
37 [MAINT='#'])
38 AC_SUBST([MAINT])dnl
39
40 # Start of actual configure tests
41
42 AC_PROG_INSTALL
43
44 AC_CANONICAL_BUILD
45 AC_CANONICAL_HOST
46 AC_CANONICAL_TARGET
47
48 ACX_NONCANONICAL_HOST
49 ACX_NONCANONICAL_TARGET
50
51 # Need to pass this down for now :-P
52 AC_PROG_LN_S
53
54 # Target-specific stuff (defaults)
55 TOOLS_TARGET_PAIRS=
56 EXTRA_GNATTOOLS=
57
58 # Per-target case statement
59 # -------------------------
60 case "${target}" in
61 *-*-aix*)
62 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-aix.adb"
63 ;;
64 *-*-darwin*)
65 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-darwin.adb"
66 ;;
67 *-*-dragonfly*)
68 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
69 ;;
70 *-*-freebsd*)
71 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
72 ;;
73 *-*-linux*)
74 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
75 ;;
76 *-*-vxworks*)
77 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
78 ;;
79 *-*-cygwin32* | *-*-mingw32* | *-*-pe)
80 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
81 EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
82 ;;
83 esac
84
85 AC_SUBST(TOOLS_TARGET_PAIRS)
86 AC_SUBST(EXTRA_GNATTOOLS)
87
88 # From user or toplevel makefile.
89 AC_SUBST(ADA_CFLAGS)
90
91 # This is testing the CC passed from the toplevel Makefile, not the
92 # one we will select below.
93 AC_PROG_CC
94 warn_cflags=
95 if test "x$GCC" = "xyes"; then
96 warn_cflags='$(GCC_WARN_CFLAGS)'
97 fi
98 AC_SUBST(warn_cflags)
99
100 # Determine what to build for 'gnattools'. Test after the above,
101 # because testing for CC sets the final value of cross_compiling, even
102 # if we end up using a different CC. We want to build
103 # gnattools-native when: (a) this is a native build, i.e.,
104 # cross_compiling=no, otherwise we know we cannot run binaries
105 # produced by the toolchain used for the build, not even the binaries
106 # created within ../gcc/; (b) build and host are the same, otherwise
107 # this is to be regarded as a cross build environment even if it seems
108 # that we can run host binaries; (c) host and target are the same,
109 # otherwise the tools in ../gcc/ generate code for a different
110 # platform. If you change this test, be sure to adjust
111 # ../gcc/ada/gcc-interface/config-lang.in as well.
112 if test "x$cross_compiling/$build/$host" = "xno/$host/$target" ; then
113 default_gnattools_target="gnattools-native"
114 else
115 default_gnattools_target="gnattools-cross"
116 fi
117 AC_SUBST([default_gnattools_target])
118
119 # Output: create a Makefile.
120 AC_CONFIG_FILES([Makefile])
121
122 AC_OUTPUT