1 # Configure script for libada.
2 # Copyright 2003, 2004, 2009, 2012 Free Software Foundation, Inc.
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.
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.
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/>.
18 sinclude(../config/acx.m4)
19 sinclude(../config/override.m4)
23 AC_CONFIG_SRCDIR([Makefile.in])
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
34 *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;;
36 maintainer_mode=${enableval}],
40 # Start of actual configure tests
49 ACX_NONCANONICAL_TARGET
51 # Need to pass this down for now :-P
54 # Target-specific stuff (defaults)
58 # Per-target case statement
59 # -------------------------
62 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-aix.adb"
65 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-darwin.adb"
68 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
71 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
74 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
77 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
79 *-*-cygwin32* | *-*-mingw32* | *-*-pe)
80 TOOLS_TARGET_PAIRS="indepsw.adb<indepsw-gnu.adb"
81 EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
85 AC_SUBST(TOOLS_TARGET_PAIRS)
86 AC_SUBST(EXTRA_GNATTOOLS)
88 # From user or toplevel makefile.
91 # This is testing the CC passed from the toplevel Makefile, not the
92 # one we will select below.
95 if test "x$GCC" = "xyes"; then
96 warn_cflags='$(GCC_WARN_CFLAGS)'
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"
115 default_gnattools_target="gnattools-cross"
117 AC_SUBST([default_gnattools_target])
119 # Output: create a Makefile.
120 AC_CONFIG_FILES([Makefile])