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