annotate gnattools/configure.ac @ 158:494b0b89df80 default tip

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