PR rtl-optimization/88018
[official-gcc.git] / gnattools / configure.ac
blob0a94224a53629c5425f48716be99302d4aedf7f8
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)
21 AC_INIT
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
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
40 # Start of actual configure tests
42 AC_PROG_INSTALL
44 AC_CANONICAL_BUILD
45 AC_CANONICAL_HOST
46 AC_CANONICAL_TARGET
48 ACX_NONCANONICAL_HOST
49 ACX_NONCANONICAL_TARGET
51 # Need to pass this down for now :-P
52 AC_PROG_LN_S
54 # Determine what to build for 'gnattools'
55 if test $build = $target ; then
56   # Note that build=target is almost certainly the wrong test; FIXME
57   default_gnattools_target="gnattools-native"
58 else
59   default_gnattools_target="gnattools-cross"
61 AC_SUBST([default_gnattools_target])
63 # Target-specific stuff (defaults)
64 TOOLS_TARGET_PAIRS=
65 AC_SUBST(TOOLS_TARGET_PAIRS)
66 EXTRA_GNATTOOLS=
67 AC_SUBST(EXTRA_GNATTOOLS)
69 # Per-target case statement
70 # -------------------------
71 case "${target}" in
72   *-*-aix*)
73     TOOLS_TARGET_PAIRS="\
74     mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
75     indepsw.adb<indepsw-aix.adb"
76     ;;
77   *-*-darwin*)
78     TOOLS_TARGET_PAIRS="\
79     mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
80     indepsw.adb<indepsw-darwin.adb"
81     ;;
82   *-*-dragonfly*)
83     TOOLS_TARGET_PAIRS="\
84     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
85     indepsw.adb<indepsw-gnu.adb"
86     ;;
87   *-*-freebsd*)
88     TOOLS_TARGET_PAIRS="\
89     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
90     indepsw.adb<indepsw-gnu.adb"
91     ;;
92   *-*-linux*)
93     TOOLS_TARGET_PAIRS="\
94     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
95     indepsw.adb<indepsw-gnu.adb"
96     ;;
97   *-*-solaris*)
98     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb"
99     ;;
100   *-*-vxworks*)
101     TOOLS_TARGET_PAIRS="\
102     mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
103     indepsw.adb<indepsw-gnu.adb"
104     ;;
105   hppa*-hp-hpux10*)
106     ;;
107   hppa*-hp-hpux11*)
108     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb"
109     ;;
110   ia64-hp-hpux11*)
111     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb"
112     ;;
113   alpha*-*-vms* | alpha*-*-openvms*)
114     TOOLS_TARGET_PAIRS="\
115     mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
116     symbols.adb<symbols-vms.adb \
117     symbols-processing.adb<symbols-processing-vms-alpha.adb"
118     EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
119     ;;
120   ia64-*-vms* | ia64-*-openvms*)
121     TOOLS_TARGET_PAIRS="\
122     mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
123     symbols.adb<symbols-vms.adb \
124     symbols-processing.adb<symbols-processing-vms-ia64.adb"
125     EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
126     ;;
127   *-*-cygwin32* | *-*-mingw32* | *-*-pe)
128     TOOLS_TARGET_PAIRS="\
129     mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
130     indepsw.adb<indepsw-mingw.adb"
131     EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
132     ;;
133 esac
135 # From user or toplevel makefile.
136 AC_SUBST(ADA_CFLAGS)
138 AC_PROG_CC
139 warn_cflags=
140 if test "x$GCC" = "xyes"; then
141   warn_cflags='$(GCC_WARN_CFLAGS)'
143 AC_SUBST(warn_cflags)
145 # Output: create a Makefile.
146 AC_CONFIG_FILES([Makefile])
148 AC_OUTPUT