OSDN Git Service

cd5e8402bd91f9cf9320c9402fef752bc80778c3
[pf3gnuchains/gcc-fork.git] / gnattools / configure.ac
1 # Configure script for libada.
2 #   Copyright 2003, 2004 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 2 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; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18 sinclude(../config/acx.m4)
19 sinclude(../config/override.m4)
20
21 AC_INIT
22 AC_PREREQ([2.59])
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 x_ada_cflags
55 case $host in
56   hppa*) x_ada_cflags=-mdisable-indexing ;;
57   *) x_ada_cflags= ;;
58 esac
59 AC_SUBST([x_ada_cflags])
60
61 # Determine what to build for 'gnattools'
62 if test $build = $target ; then
63   # Note that build=target is almost certainly the wrong test; FIXME
64   default_gnattools_target="gnattools-native"
65 else
66   default_gnattools_target="gnattools-cross"
67 fi
68 AC_SUBST([default_gnattools_target])
69
70 # Target-specific stuff (defaults)
71 TOOLS_TARGET_PAIRS=
72 AC_SUBST(TOOLS_TARGET_PAIRS)
73 EXTRA_GNATTOOLS=
74 AC_SUBST(EXTRA_GNATTOOLS)
75
76 # Per-target case statement
77 # -------------------------
78 case "${target}" in
79   alpha*-dec-vx*) # Unlike all other Vxworks
80     ;;
81   m68k*-wrs-vx* \
82   | powerpc*-wrs-vxworks \
83   | sparc*-wrs-vx* \
84   | *86-wrs-vxworks \
85   | mips*-wrs-vx*)
86     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb"
87     ;;
88   sparc-sun-solaris*)
89     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb"
90     ;;
91   *86-*-solaris2*)
92     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb"
93     ;;
94   *86-*-linux* \
95   | powerpc*-*-linux* \
96   | *ia64-*-linux* \
97   | alpha*-*-linux* \
98   | sparc*-*-linux* \
99   | hppa*-*-linux* \
100   | *x86_64-*-linux*)
101     TOOLS_TARGET_PAIRS="\
102     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
103     indepsw.adb<indepsw-gnu.adb"
104     ;;
105   s390*-*-linux*)
106     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb"
107     ;;
108   *86-*-freebsd*)
109     TOOLS_TARGET_PAIRS="\
110     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
111     indepsw.adb<indepsw-gnu.adb"
112     ;;
113   mips-sgi-irix*)
114     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb"
115     ;;
116   hppa*-hp-hpux10*) # Unlike hpux11
117     ;;
118   hppa*-hp-hpux11*)
119     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb"
120     ;;
121   *-ibm-aix*)
122     TOOLS_TARGET_PAIRS="\
123     mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
124     indepsw.adb<indepsw-aix.adb"
125     ;;
126   alpha*-dec-osf*)
127     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb"
128     ;;
129   alpha*-dec-vms* | alpha*-dec-openvms* | alpha*-dec-vms* \
130   | alpha*-hp-vms* | alpha*-hp-openvms* | alpha*-hp-vms*)
131     TOOLS_TARGET_PAIRS="\
132     mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
133     symbols.adb<symbols-vms.adb \
134     symbols-processing.adb<symbols-processing-vms-alpha.adb"
135
136     EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
137     ;;
138   ia64*-dec-vms* | ia64*-dec-openvms* | ia64*-dec-vms* \
139   | ia64*-hp-vms* | ia64*-hp-openvms* | ia64*-hp-vms*)
140     TOOLS_TARGET_PAIRS="\
141     mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
142     symbols.adb<symbols-vms.adb \
143     symbols-processing.adb<symbols-processing-vms-ia64.adb"
144
145     EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
146     ;;
147   *-*-cygwin32* | *-*-mingw32* | *-*-pe)
148     TOOLS_TARGET_PAIRS="\
149     mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
150     indepsw.adb<indepsw-mingw.adb"
151     EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
152     ;;
153   powerpc-*-darwin* | *86-*-darwin*)
154     TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb"
155     ;;
156   *-*-lynxos)
157     TOOLS_TARGET_PAIRS="\
158     mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
159     indepsw.adb<indepsw-gnu.adb"
160     ;;
161 esac
162
163 # Output: create a Makefile.
164 AC_CONFIG_FILES([Makefile])
165
166 AC_OUTPUT