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