]> git.ipfire.org Git - thirdparty/gcc.git/blame - libada/configure.ac
Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).
[thirdparty/gcc.git] / libada / configure.ac
CommitLineData
b0b70d84 1# Configure script for libada.
85ec4feb 2# Copyright (C) 2003-2018 Free Software Foundation, Inc.
b0b70d84
AC
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
748086b7 6# the Free Software Foundation; either version 3 of the License, or
b0b70d84
AC
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
748086b7
JJ
15# along with this program; see the file COPYING3. If not see
16# <http://www.gnu.org/licenses/>.
b0b70d84 17
18c04407 18sinclude(../config/acx.m4)
05682af8 19sinclude(../config/multi.m4)
18c04407 20sinclude(../config/override.m4)
e3aa9eba 21sinclude(../config/picflag.m4)
2f18d9af 22sinclude(../config/unwind_ipinfo.m4)
18c04407 23
215cae7b 24AC_INIT
b0b70d84 25
80dab182
NN
26AC_CONFIG_SRCDIR([Makefile.in])
27
9bd6112c
PB
28# Determine the host, build, and target systems
29AC_CANONICAL_BUILD
30AC_CANONICAL_HOST
31AC_CANONICAL_TARGET
05682af8 32target_alias=${target_alias-$host_alias}
9bd6112c
PB
33
34# Determine the noncanonical target name, for directory use.
35ACX_NONCANONICAL_TARGET
36
37# Determine the target- and build-specific subdirectories
38GCC_TOPLEV_SUBDIRS
39
80dab182 40# Command-line options.
b0b70d84 41# Very limited version of AC_MAINTAINER_MODE.
80dab182
NN
42AC_ARG_ENABLE([maintainer-mode],
43 [AC_HELP_STRING([--enable-maintainer-mode],
b0b70d84 44 [enable make rules and dependencies not useful (and
80dab182 45 sometimes confusing) to the casual installer])],
b0b70d84
AC
46 [case ${enable_maintainer_mode} in
47 yes) MAINT='' ;;
48 no) MAINT='#' ;;
49 *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;;
50 esac
51 maintainer_mode=${enableval}],
52 [MAINT='#'])
53AC_SUBST([MAINT])dnl
54
7193e639
LG
55AM_ENABLE_MULTILIB(, ..)
56# Calculate toolexeclibdir
57# Also toolexecdir, though it's only used in toolexeclibdir
58case ${enable_version_specific_runtime_libs} in
59 yes)
60 # Need the gcc compiler version to know where to install libraries
61 # and header files if --enable-version-specific-runtime-libs option
62 # is selected.
63 toolexecdir='$(libdir)/gcc/$(target_alias)'
64 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
65 ;;
66 no)
67 if test -n "$with_cross_host" &&
68 test x"$with_cross_host" != x"no"; then
69 # Install a library built with a cross compiler in tooldir, not libdir.
70 toolexecdir='$(exec_prefix)/$(target_alias)'
71 toolexeclibdir='$(toolexecdir)/lib'
72 else
73 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
74 toolexeclibdir='$(libdir)'
75 fi
76 multi_os_directory=`$CC -print-multi-os-directory`
77 case $multi_os_directory in
78 .) ;; # Avoid trailing /.
79 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
80 esac
81 ;;
82esac
83AC_SUBST(toolexecdir)
84AC_SUBST(toolexeclibdir)
85#TODO: toolexeclibdir is currently disregarded
86
87# Check the compiler.
88# The same as in boehm-gc and libstdc++. Have to borrow it from there.
89# We must force CC to /not/ be precious variables; otherwise
90# the wrong, non-multilib-adjusted value will be used in multilibs.
91# As a side effect, we have to subst CFLAGS ourselves.
92
93m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
94m4_define([_AC_ARG_VAR_PRECIOUS],[])
95AC_PROG_CC
1b3b24c2 96m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
7193e639
LG
97
98AC_SUBST(CFLAGS)
99
80dab182
NN
100AC_ARG_ENABLE([shared],
101[AC_HELP_STRING([--disable-shared],
102 [don't provide a shared libgnat])],
103[
104case $enable_shared in
b0b70d84
AC
105 yes | no) ;;
106 *)
107 enable_shared=no
108 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
109 for pkg in $enableval; do
80dab182
NN
110 case $pkg in
111 ada | libada)
112 enable_shared=yes ;;
113 esac
b0b70d84
AC
114 done
115 IFS="$ac_save_ifs"
116 ;;
80dab182 117esac
b0b70d84 118], [enable_shared=yes])
80dab182
NN
119AC_SUBST([enable_shared])
120
e3aa9eba
RO
121GCC_PICFLAG
122AC_SUBST([PICFLAG])
123
c390c361
PB
124# These must be passed down, or are needed by gcc/libgcc.mvars
125AC_PROG_AWK
80dab182
NN
126AC_PROG_LN_S
127
80dab182 128# Determine what to build for 'gnatlib'
2d16708f 129if test ${enable_shared} = yes; then
80dab182
NN
130 default_gnatlib_target="gnatlib-shared"
131else
f206bf50 132 default_gnatlib_target="gnatlib-plain"
80dab182
NN
133fi
134AC_SUBST([default_gnatlib_target])
d743b2b6 135
2f18d9af
EB
136# Check for _Unwind_GetIPInfo
137GCC_CHECK_UNWIND_GETIPINFO
2f18d9af
EB
138if test x$have_unwind_getipinfo = xyes; then
139 have_getipinfo=-DHAVE_GETIPINFO
2d16708f
EB
140else
141 have_getipinfo=
2f18d9af 142fi
2d16708f 143AC_SUBST([have_getipinfo])
2f18d9af 144
772cd694
EB
145# Check for <sys/capability.h>
146AC_CHECK_HEADER([sys/capability.h], have_capability=-DHAVE_CAPABILITY, have_capability=)
2d16708f 147AC_SUBST([have_capability])
772cd694 148
3c36aa6b
JJ
149# Determine what GCC version number to use in filesystem paths.
150GCC_BASE_VER
151
80dab182
NN
152# Output: create a Makefile.
153AC_CONFIG_FILES([Makefile])
b0b70d84
AC
154
155AC_OUTPUT