]> git.ipfire.org Git - thirdparty/gcc.git/blob - gnattools/configure.ac
86d8926b6c01d238f7d9a9e248f0b9671e081c4e
[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 AC_PREREQ([2.64])
23
24 AC_CONFIG_SRCDIR([Makefile.in])
25
26 # Command-line options.
27 # Very limited version of AC_MAINTAINER_MODE.
28 AC_ARG_ENABLE([maintainer-mode],
29 [AC_HELP_STRING([--enable-maintainer-mode],
30 [enable make rules and dependencies not useful (and
31 sometimes confusing) to the casual installer])],
32 [case ${enable_maintainer_mode} in
33 yes) MAINT='' ;;
34 no) MAINT='#' ;;
35 *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;;
36 esac
37 maintainer_mode=${enableval}],
38 [MAINT='#'])
39 AC_SUBST([MAINT])dnl
40
41 # Start of actual configure tests
42
43 AC_PROG_INSTALL
44
45 AC_CANONICAL_BUILD
46 AC_CANONICAL_HOST
47 AC_CANONICAL_TARGET
48
49 ACX_NONCANONICAL_HOST
50 ACX_NONCANONICAL_TARGET
51
52 # Need to pass this down for now :-P
53 AC_PROG_LN_S
54
55 # Determine what to build for 'gnattools'
56 if test $build = $target ; then
57 # Note that build=target is almost certainly the wrong test; FIXME
58 default_gnattools_target="gnattools-native"
59 else
60 default_gnattools_target="gnattools-cross"
61 fi
62 AC_SUBST([default_gnattools_target])
63
64 # Target-specific stuff (defaults)
65 TOOLS_TARGET_PAIRS=
66 AC_SUBST(TOOLS_TARGET_PAIRS)
67 EXTRA_GNATTOOLS=
68 AC_SUBST(EXTRA_GNATTOOLS)
69
70 # Per-target case statement
71 # -------------------------
72 case "${target}" in
73 *-*-aix*)
74 TOOLS_TARGET_PAIRS="\
75 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
76 indepsw.adb<indepsw-aix.adb"
77 ;;
78 *-*-darwin*)
79 TOOLS_TARGET_PAIRS="\
80 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
81 indepsw.adb<indepsw-darwin.adb"
82 ;;
83 *-*-dragonfly*)
84 TOOLS_TARGET_PAIRS="\
85 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
86 indepsw.adb<indepsw-gnu.adb"
87 ;;
88 *-*-freebsd*)
89 TOOLS_TARGET_PAIRS="\
90 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
91 indepsw.adb<indepsw-gnu.adb"
92 ;;
93 *-*-linux*)
94 TOOLS_TARGET_PAIRS="\
95 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
96 indepsw.adb<indepsw-gnu.adb"
97 ;;
98 *-*-solaris*)
99 TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb"
100 ;;
101 *-*-vxworks*)
102 TOOLS_TARGET_PAIRS="\
103 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
104 indepsw.adb<indepsw-gnu.adb"
105 ;;
106 hppa*-hp-hpux10*)
107 ;;
108 hppa*-hp-hpux11*)
109 TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb"
110 ;;
111 ia64-hp-hpux11*)
112 TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb"
113 ;;
114 alpha*-*-vms* | alpha*-*-openvms*)
115 TOOLS_TARGET_PAIRS="\
116 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
117 symbols.adb<symbols-vms.adb \
118 symbols-processing.adb<symbols-processing-vms-alpha.adb"
119 EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
120 ;;
121 ia64-*-vms* | ia64-*-openvms*)
122 TOOLS_TARGET_PAIRS="\
123 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
124 symbols.adb<symbols-vms.adb \
125 symbols-processing.adb<symbols-processing-vms-ia64.adb"
126 EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
127 ;;
128 *-*-cygwin32* | *-*-mingw32* | *-*-pe)
129 TOOLS_TARGET_PAIRS="\
130 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
131 indepsw.adb<indepsw-mingw.adb"
132 EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
133 ;;
134 esac
135
136 # From user or toplevel makefile.
137 AC_SUBST(ADA_CFLAGS)
138
139 AC_PROG_CC
140 warn_cflags=
141 if test "x$GCC" = "xyes"; then
142 warn_cflags='$(GCC_WARN_CFLAGS)'
143 fi
144 AC_SUBST(warn_cflags)
145
146 # Output: create a Makefile.
147 AC_CONFIG_FILES([Makefile])
148
149 AC_OUTPUT