OSDN Git Service

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