]>
Commit | Line | Data |
---|---|---|
b0b70d84 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 | ||
18c04407 RW |
18 | sinclude(../config/acx.m4) |
19 | sinclude(../config/override.m4) | |
20 | ||
215cae7b | 21 | AC_INIT |
8ab705be | 22 | AC_PREREQ([2.59]) |
b0b70d84 | 23 | |
80dab182 NN |
24 | AC_CONFIG_SRCDIR([Makefile.in]) |
25 | ||
9bd6112c PB |
26 | # Determine the host, build, and target systems |
27 | AC_CANONICAL_BUILD | |
28 | AC_CANONICAL_HOST | |
29 | AC_CANONICAL_TARGET | |
30 | ||
31 | # Determine the noncanonical target name, for directory use. | |
32 | ACX_NONCANONICAL_TARGET | |
33 | ||
34 | # Determine the target- and build-specific subdirectories | |
35 | GCC_TOPLEV_SUBDIRS | |
36 | ||
80dab182 | 37 | # Command-line options. |
b0b70d84 | 38 | # Very limited version of AC_MAINTAINER_MODE. |
80dab182 NN |
39 | AC_ARG_ENABLE([maintainer-mode], |
40 | [AC_HELP_STRING([--enable-maintainer-mode], | |
b0b70d84 | 41 | [enable make rules and dependencies not useful (and |
80dab182 | 42 | sometimes confusing) to the casual installer])], |
b0b70d84 AC |
43 | [case ${enable_maintainer_mode} in |
44 | yes) MAINT='' ;; | |
45 | no) MAINT='#' ;; | |
46 | *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;; | |
47 | esac | |
48 | maintainer_mode=${enableval}], | |
49 | [MAINT='#']) | |
50 | AC_SUBST([MAINT])dnl | |
51 | ||
80dab182 NN |
52 | AC_ARG_ENABLE([shared], |
53 | [AC_HELP_STRING([--disable-shared], | |
54 | [don't provide a shared libgnat])], | |
55 | [ | |
56 | case $enable_shared in | |
b0b70d84 AC |
57 | yes | no) ;; |
58 | *) | |
59 | enable_shared=no | |
60 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
61 | for pkg in $enableval; do | |
80dab182 NN |
62 | case $pkg in |
63 | ada | libada) | |
64 | enable_shared=yes ;; | |
65 | esac | |
b0b70d84 AC |
66 | done |
67 | IFS="$ac_save_ifs" | |
68 | ;; | |
80dab182 | 69 | esac |
b0b70d84 | 70 | ], [enable_shared=yes]) |
80dab182 NN |
71 | AC_SUBST([enable_shared]) |
72 | ||
80dab182 NN |
73 | # Need to pass this down for now :-P |
74 | AC_PROG_LN_S | |
75 | ||
80dab182 NN |
76 | # Determine what to build for 'gnatlib' |
77 | if test $build = $target \ | |
78 | && test ${enable_shared} = yes ; then | |
79 | # Note that build=target is almost certainly the wrong test; FIXME | |
80 | default_gnatlib_target="gnatlib-shared" | |
81 | else | |
f206bf50 | 82 | default_gnatlib_target="gnatlib-plain" |
80dab182 NN |
83 | fi |
84 | AC_SUBST([default_gnatlib_target]) | |
d743b2b6 | 85 | |
47ad7893 PB |
86 | AC_PROG_CC |
87 | warn_cflags= | |
88 | if test "x$GCC" = "xyes"; then | |
89 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
90 | fi | |
91 | AC_SUBST(warn_cflags) | |
92 | ||
80dab182 NN |
93 | # Output: create a Makefile. |
94 | AC_CONFIG_FILES([Makefile]) | |
b0b70d84 AC |
95 | |
96 | AC_OUTPUT |