OSDN Git Service

Check if GCC uses assembler cfi support
[pf3gnuchains/gcc-fork.git] / gnattools / configure.ac
1 # Configure script for libada.
2 #   Copyright 2003, 2004, 2009 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_TARGET
50
51 # Need to pass this down for now :-P
52 AC_PROG_LN_S
53
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"
60 fi
61 AC_SUBST([default_gnattools_target])
62
63 # Target-specific stuff (defaults)
64 TOOLS_TARGET_PAIRS=
65 AC_SUBST(TOOLS_TARGET_PAIRS)
66 EXTRA_GNATTOOLS=
67 AC_SUBST(EXTRA_GNATTOOLS)
68
69 # Per-target case statement
70 # -------------------------
71 case "${target}" in
72   alpha*-dec-vx*) # Unlike all other Vxworks
73     ;;
74   m68k*-wrs-vx* \
75   | powerpc*-wrs-vxworks \
76   | sparc*-wrs-vx* \
77   | *86-wrs-vxworks \
78   | mips*-wrs-vx*)
79     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb"
80     ;;
81   sparc-sun-solaris*)
82     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb"
83     ;;
84   *86-*-solaris2* | x86_64-*-solaris2.1[[0-9]]*)
85     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb"
86     ;;
87   *86-*-linux* \
88   | powerpc*-*-linux* \
89   | *ia64-*-linux* \
90   | alpha*-*-linux* \
91   | sparc*-*-linux* \
92   | hppa*-*-linux* \
93   | *x86_64-*-linux*)
94     TOOLS_TARGET_PAIRS="\
95     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
96     indepsw.adb<indepsw-gnu.adb"
97     ;;
98   s390*-*-linux*)
99     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb"
100     ;;
101   *86-*-freebsd*)
102     TOOLS_TARGET_PAIRS="\
103     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
104     indepsw.adb<indepsw-gnu.adb"
105     ;;
106   mips-sgi-irix*)
107     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb"
108     ;;
109   hppa*-hp-hpux10*) # Unlike hpux11
110     ;;
111   hppa*-hp-hpux11*)
112     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb"
113     ;;
114   *-ibm-aix*)
115     TOOLS_TARGET_PAIRS="\
116     mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
117     indepsw.adb<indepsw-aix.adb"
118     ;;
119   alpha*-dec-osf*)
120     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb"
121     ;;
122   alpha*-dec-vms* | alpha*-dec-openvms* | alpha*-dec-vms* \
123   | alpha*-hp-vms* | alpha*-hp-openvms* | alpha*-hp-vms*)
124     TOOLS_TARGET_PAIRS="\
125     mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
126     symbols.adb<symbols-vms.adb \
127     symbols-processing.adb<symbols-processing-vms-alpha.adb"
128
129     EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
130     ;;
131   ia64*-dec-vms* | ia64*-dec-openvms* | ia64*-dec-vms* \
132   | ia64*-hp-vms* | ia64*-hp-openvms* | ia64*-hp-vms*)
133     TOOLS_TARGET_PAIRS="\
134     mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
135     symbols.adb<symbols-vms.adb \
136     symbols-processing.adb<symbols-processing-vms-ia64.adb"
137
138     EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
139     ;;
140   *-*-cygwin32* | *-*-mingw32* | *-*-pe)
141     TOOLS_TARGET_PAIRS="\
142     mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
143     indepsw.adb<indepsw-mingw.adb"
144     EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
145     ;;
146   *-*-darwin*)
147     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb"
148     ;;
149   *-*-lynxos)
150     TOOLS_TARGET_PAIRS="\
151     mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
152     indepsw.adb<indepsw-gnu.adb"
153     ;;
154 esac
155
156 # From user or toplevel makefile.
157 AC_SUBST(ADA_CFLAGS)
158
159 AC_PROG_CC
160 warn_cflags=
161 if test "x$GCC" = "xyes"; then
162   warn_cflags='$(GCC_WARN_CFLAGS)'
163 fi
164 AC_SUBST(warn_cflags)
165
166 # Output: create a Makefile.
167 AC_CONFIG_FILES([Makefile])
168
169 AC_OUTPUT