]>
Commit | Line | Data |
---|---|---|
a136b23d | 1 | # Configure script for libada. |
126b6848 | 2 | # Copyright 2003, 2004, 2009, 2012 Free Software Foundation, Inc. |
a136b23d | 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 | |
6bc9506f | 6 | # the Free Software Foundation; either version 3 of the License, or |
a136b23d | 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 | |
6bc9506f | 15 | # along with this program; see the file COPYING3. If not see |
16 | # <http://www.gnu.org/licenses/>. | |
a136b23d | 17 | |
5b2c7553 | 18 | sinclude(../config/acx.m4) |
19 | sinclude(../config/override.m4) | |
20 | ||
a136b23d | 21 | AC_INIT |
81a71e2b | 22 | AC_PREREQ([2.64]) |
a136b23d | 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 | ||
a136b23d | 49 | ACX_NONCANONICAL_TARGET |
50 | ||
51 | # Need to pass this down for now :-P | |
52 | AC_PROG_LN_S | |
53 | ||
a136b23d | 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 | |
5b173fd9 | 72 | *-*-aix*) |
73 | TOOLS_TARGET_PAIRS="\ | |
74 | mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \ | |
75 | indepsw.adb<indepsw-aix.adb" | |
a136b23d | 76 | ;; |
5b173fd9 | 77 | *-*-darwin*) |
78 | TOOLS_TARGET_PAIRS="\ | |
79 | mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \ | |
80 | indepsw.adb<indepsw-darwin.adb" | |
a136b23d | 81 | ;; |
87e3f630 | 82 | *-*-dragonfly*) |
83 | TOOLS_TARGET_PAIRS="\ | |
84 | mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \ | |
85 | indepsw.adb<indepsw-gnu.adb" | |
86 | ;; | |
5b173fd9 | 87 | *-*-freebsd*) |
88 | TOOLS_TARGET_PAIRS="\ | |
89 | mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \ | |
90 | indepsw.adb<indepsw-gnu.adb" | |
a136b23d | 91 | ;; |
5b173fd9 | 92 | *-*-linux*) |
a136b23d | 93 | TOOLS_TARGET_PAIRS="\ |
e92dcf50 | 94 | mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \ |
1b924cb3 | 95 | indepsw.adb<indepsw-gnu.adb" |
a136b23d | 96 | ;; |
5b173fd9 | 97 | *-*-solaris*) |
98 | TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb" | |
a136b23d | 99 | ;; |
5b173fd9 | 100 | *-*-vxworks*) |
a136b23d | 101 | TOOLS_TARGET_PAIRS="\ |
5b173fd9 | 102 | mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \ |
1b924cb3 | 103 | indepsw.adb<indepsw-gnu.adb" |
a136b23d | 104 | ;; |
5b173fd9 | 105 | hppa*-hp-hpux10*) |
a136b23d | 106 | ;; |
107 | hppa*-hp-hpux11*) | |
e92dcf50 | 108 | TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb" |
a136b23d | 109 | ;; |
5b173fd9 | 110 | ia64-hp-hpux11*) |
111 | TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb" | |
a136b23d | 112 | ;; |
5b173fd9 | 113 | alpha*-*-vms* | alpha*-*-openvms*) |
a136b23d | 114 | TOOLS_TARGET_PAIRS="\ |
e92dcf50 | 115 | mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \ |
1b924cb3 | 116 | symbols.adb<symbols-vms.adb \ |
117 | symbols-processing.adb<symbols-processing-vms-alpha.adb" | |
a136b23d | 118 | EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)' |
119 | ;; | |
5b173fd9 | 120 | ia64-*-vms* | ia64-*-openvms*) |
a136b23d | 121 | TOOLS_TARGET_PAIRS="\ |
e92dcf50 | 122 | mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \ |
1b924cb3 | 123 | symbols.adb<symbols-vms.adb \ |
124 | symbols-processing.adb<symbols-processing-vms-ia64.adb" | |
a136b23d | 125 | EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)' |
126 | ;; | |
127 | *-*-cygwin32* | *-*-mingw32* | *-*-pe) | |
128 | TOOLS_TARGET_PAIRS="\ | |
e92dcf50 | 129 | mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \ |
a136b23d | 130 | indepsw.adb<indepsw-mingw.adb" |
131 | EXTRA_GNATTOOLS='../../gnatdll$(exeext)' | |
132 | ;; | |
a136b23d | 133 | esac |
134 | ||
3bed0958 | 135 | # From user or toplevel makefile. |
136 | AC_SUBST(ADA_CFLAGS) | |
137 | ||
9a8d280d | 138 | AC_PROG_CC |
139 | warn_cflags= | |
140 | if test "x$GCC" = "xyes"; then | |
141 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
142 | fi | |
143 | AC_SUBST(warn_cflags) | |
144 | ||
a136b23d | 145 | # Output: create a Makefile. |
146 | AC_CONFIG_FILES([Makefile]) | |
147 | ||
148 | AC_OUTPUT |