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)
56 AC_SUBST(TOOLS_TARGET_PAIRS)
58 AC_SUBST(EXTRA_GNATTOOLS)
60 # Per-target case statement
61 # -------------------------
65 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
66 indepsw.adb<indepsw-aix.adb"
70 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
71 indepsw.adb<indepsw-darwin.adb"
75 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
76 indepsw.adb<indepsw-gnu.adb"
80 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
81 indepsw.adb<indepsw-gnu.adb"
85 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
86 indepsw.adb<indepsw-gnu.adb"
89 TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb"
93 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
94 indepsw.adb<indepsw-gnu.adb"
99 TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb"
102 TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb"
104 alpha*-*-vms* | alpha*-*-openvms*)
105 TOOLS_TARGET_PAIRS="\
106 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
107 symbols.adb<symbols-vms.adb \
108 symbols-processing.adb<symbols-processing-vms-alpha.adb"
109 EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
111 ia64-*-vms* | ia64-*-openvms*)
112 TOOLS_TARGET_PAIRS="\
113 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
114 symbols.adb<symbols-vms.adb \
115 symbols-processing.adb<symbols-processing-vms-ia64.adb"
116 EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
118 *-*-cygwin32* | *-*-mingw32* | *-*-pe)
119 TOOLS_TARGET_PAIRS="\
120 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
121 indepsw.adb<indepsw-mingw.adb"
122 EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
126 # From user or toplevel makefile.
129 # This is testing the CC passed from the toplevel Makefile, not the
130 # one we will select below.
133 if test "x$GCC" = "xyes"; then
134 warn_cflags='$(GCC_WARN_CFLAGS)'
136 AC_SUBST(warn_cflags)
138 # Determine what to build for 'gnattools'. Test after the above,
139 # because testing for CC sets the final value of cross_compiling, even
140 # if we end up using a different CC. We want to build
141 # gnattools-native when: (a) this is a native build, i.e.,
142 # cross_compiling=no, otherwise we know we cannot run binaries
143 # produced by the toolchain used for the build, not even the binaries
144 # created within ../gcc/; (b) build and host are the same, otherwise
145 # this is to be regarded as a cross build environment even if it seems
146 # that we can run host binaries; (c) host and target are the same,
147 # otherwise the tools in ../gcc/ generate code for a different
148 # platform. If you change this test, be sure to adjust
149 # ../gcc/ada/gcc-interface/config-lang.in as well.
150 if test "x$cross_compiling/$build/$host" = "xno/$host/$target" ; then
151 default_gnattools_target="gnattools-native"
153 default_gnattools_target="gnattools-cross"
155 AC_SUBST([default_gnattools_target])
157 # Output: create a Makefile.
158 AC_CONFIG_FILES([Makefile])