OSDN Git Service

a2668125d8eb73534c508fafd3221b15148a51b3
[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 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 # 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
37 # Command-line options.
38 # Very limited version of AC_MAINTAINER_MODE.
39 AC_ARG_ENABLE([maintainer-mode],
40   [AC_HELP_STRING([--enable-maintainer-mode],
41                  [enable make rules and dependencies not useful (and
42                   sometimes confusing) to the casual installer])],
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
52 AC_ARG_ENABLE([shared],
53 [AC_HELP_STRING([--disable-shared],
54                 [don't provide a shared libgnat])],
55 [
56 case $enable_shared in
57   yes | no) ;;
58   *)
59     enable_shared=no
60     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
61     for pkg in $enableval; do
62       case $pkg in
63         ada | libada)
64           enable_shared=yes ;;
65       esac
66     done
67     IFS="$ac_save_ifs"
68     ;;
69 esac
70 ], [enable_shared=yes])
71 AC_SUBST([enable_shared])
72
73 # Need to pass this down for now :-P
74 AC_PROG_LN_S
75
76 # Determine x_ada_cflags
77 case $host in
78   hppa*) x_ada_cflags=-mdisable-indexing ;;
79   *) x_ada_cflags= ;;
80 esac
81 AC_SUBST([x_ada_cflags])
82
83 # Determine what to build for 'gnatlib'
84 if test $build = $target \
85    && test ${enable_shared} = yes ; then
86   # Note that build=target is almost certainly the wrong test; FIXME
87   default_gnatlib_target="gnatlib-shared"
88 else
89   default_gnatlib_target="gnatlib-plain"
90 fi
91 AC_SUBST([default_gnatlib_target])
92
93 # Output: create a Makefile.
94 AC_CONFIG_FILES([Makefile])
95
96 AC_OUTPUT