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