annotate libada/configure.ac @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 # Configure script for libada.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 # Copyright (C) 2003-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 #
kono
parents:
diff changeset
4 # This file is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
5 # under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
6 # the Free Software Foundation; either version 3 of the License, or
kono
parents:
diff changeset
7 # (at your option) any later version.
kono
parents:
diff changeset
8 #
kono
parents:
diff changeset
9 # This program is distributed in the hope that it will be useful, but
kono
parents:
diff changeset
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
kono
parents:
diff changeset
12 # General Public License for more details.
kono
parents:
diff changeset
13 #
kono
parents:
diff changeset
14 # You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
15 # along with this program; see the file COPYING3. If not see
kono
parents:
diff changeset
16 # <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 sinclude(../config/acx.m4)
kono
parents:
diff changeset
19 sinclude(../config/multi.m4)
kono
parents:
diff changeset
20 sinclude(../config/override.m4)
kono
parents:
diff changeset
21 sinclude(../config/picflag.m4)
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
22 sinclude(../config/toolexeclibdir.m4)
111
kono
parents:
diff changeset
23 sinclude(../config/unwind_ipinfo.m4)
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 AC_INIT
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 AC_CONFIG_SRCDIR([Makefile.in])
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 # Determine the host, build, and target systems
kono
parents:
diff changeset
30 AC_CANONICAL_BUILD
kono
parents:
diff changeset
31 AC_CANONICAL_HOST
kono
parents:
diff changeset
32 AC_CANONICAL_TARGET
kono
parents:
diff changeset
33 target_alias=${target_alias-$host_alias}
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 # Determine the noncanonical target name, for directory use.
kono
parents:
diff changeset
36 ACX_NONCANONICAL_TARGET
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 # Determine the target- and build-specific subdirectories
kono
parents:
diff changeset
39 GCC_TOPLEV_SUBDIRS
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 # Command-line options.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
42
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
43 AC_ARG_ENABLE(version-specific-runtime-libs,
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
44 [AS_HELP_STRING([--enable-version-specific-runtime-libs],
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
45 [specify that runtime libraries should be
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
46 installed in a compiler-specific directory])],
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
47 [case "$enableval" in
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
48 yes|no)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
49 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
50 *)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
51 AC_MSG_ERROR([--enable-version-specific-runtime-libs must be yes or no])
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
52 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
53 esac],
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
54 [enable_version_specific_runtime_libs=yes]
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
55 )
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
56
111
kono
parents:
diff changeset
57 # Very limited version of AC_MAINTAINER_MODE.
kono
parents:
diff changeset
58 AC_ARG_ENABLE([maintainer-mode],
kono
parents:
diff changeset
59 [AC_HELP_STRING([--enable-maintainer-mode],
kono
parents:
diff changeset
60 [enable make rules and dependencies not useful (and
kono
parents:
diff changeset
61 sometimes confusing) to the casual installer])],
kono
parents:
diff changeset
62 [case ${enable_maintainer_mode} in
kono
parents:
diff changeset
63 yes) MAINT='' ;;
kono
parents:
diff changeset
64 no) MAINT='#' ;;
kono
parents:
diff changeset
65 *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;;
kono
parents:
diff changeset
66 esac
kono
parents:
diff changeset
67 maintainer_mode=${enableval}],
kono
parents:
diff changeset
68 [MAINT='#'])
kono
parents:
diff changeset
69 AC_SUBST([MAINT])dnl
kono
parents:
diff changeset
70
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
71 GCC_WITH_TOOLEXECLIBDIR
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
72
111
kono
parents:
diff changeset
73 AM_ENABLE_MULTILIB(, ..)
kono
parents:
diff changeset
74 # Calculate toolexeclibdir
kono
parents:
diff changeset
75 # Also toolexecdir, though it's only used in toolexeclibdir
kono
parents:
diff changeset
76 case ${enable_version_specific_runtime_libs} in
kono
parents:
diff changeset
77 yes)
kono
parents:
diff changeset
78 # Need the gcc compiler version to know where to install libraries
kono
parents:
diff changeset
79 # and header files if --enable-version-specific-runtime-libs option
kono
parents:
diff changeset
80 # is selected.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
81 toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
82 toolexeclibdir='$(toolexecdir)/$(version)$(MULTISUBDIR)/adalib'
111
kono
parents:
diff changeset
83 ;;
kono
parents:
diff changeset
84 no)
kono
parents:
diff changeset
85 if test -n "$with_cross_host" &&
kono
parents:
diff changeset
86 test x"$with_cross_host" != x"no"; then
kono
parents:
diff changeset
87 # Install a library built with a cross compiler in tooldir, not libdir.
kono
parents:
diff changeset
88 toolexecdir='$(exec_prefix)/$(target_alias)'
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
89 case ${with_toolexeclibdir} in
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
90 no)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
91 toolexeclibdir='$(toolexecdir)/lib'
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
92 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
93 *)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
94 toolexeclibdir=${with_toolexeclibdir}
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
95 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
96 esac
111
kono
parents:
diff changeset
97 else
kono
parents:
diff changeset
98 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
kono
parents:
diff changeset
99 toolexeclibdir='$(libdir)'
kono
parents:
diff changeset
100 fi
kono
parents:
diff changeset
101 multi_os_directory=`$CC -print-multi-os-directory`
kono
parents:
diff changeset
102 case $multi_os_directory in
kono
parents:
diff changeset
103 .) ;; # Avoid trailing /.
kono
parents:
diff changeset
104 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
kono
parents:
diff changeset
105 esac
kono
parents:
diff changeset
106 ;;
kono
parents:
diff changeset
107 esac
kono
parents:
diff changeset
108 AC_SUBST(toolexecdir)
kono
parents:
diff changeset
109 AC_SUBST(toolexeclibdir)
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 # Check the compiler.
kono
parents:
diff changeset
112 # The same as in boehm-gc and libstdc++. Have to borrow it from there.
kono
parents:
diff changeset
113 # We must force CC to /not/ be precious variables; otherwise
kono
parents:
diff changeset
114 # the wrong, non-multilib-adjusted value will be used in multilibs.
kono
parents:
diff changeset
115 # As a side effect, we have to subst CFLAGS ourselves.
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
kono
parents:
diff changeset
118 m4_define([_AC_ARG_VAR_PRECIOUS],[])
kono
parents:
diff changeset
119 AC_PROG_CC
kono
parents:
diff changeset
120 m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 AC_SUBST(CFLAGS)
kono
parents:
diff changeset
123
kono
parents:
diff changeset
124 AC_ARG_ENABLE([shared],
kono
parents:
diff changeset
125 [AC_HELP_STRING([--disable-shared],
kono
parents:
diff changeset
126 [don't provide a shared libgnat])],
kono
parents:
diff changeset
127 [
kono
parents:
diff changeset
128 case $enable_shared in
kono
parents:
diff changeset
129 yes | no) ;;
kono
parents:
diff changeset
130 *)
kono
parents:
diff changeset
131 enable_shared=no
kono
parents:
diff changeset
132 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
kono
parents:
diff changeset
133 for pkg in $enableval; do
kono
parents:
diff changeset
134 case $pkg in
kono
parents:
diff changeset
135 ada | libada)
kono
parents:
diff changeset
136 enable_shared=yes ;;
kono
parents:
diff changeset
137 esac
kono
parents:
diff changeset
138 done
kono
parents:
diff changeset
139 IFS="$ac_save_ifs"
kono
parents:
diff changeset
140 ;;
kono
parents:
diff changeset
141 esac
kono
parents:
diff changeset
142 ], [enable_shared=yes])
kono
parents:
diff changeset
143 AC_SUBST([enable_shared])
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 GCC_PICFLAG
kono
parents:
diff changeset
146 AC_SUBST([PICFLAG])
kono
parents:
diff changeset
147
kono
parents:
diff changeset
148 # These must be passed down, or are needed by gcc/libgcc.mvars
kono
parents:
diff changeset
149 AC_PROG_AWK
kono
parents:
diff changeset
150 AC_PROG_LN_S
kono
parents:
diff changeset
151
kono
parents:
diff changeset
152 # Determine what to build for 'gnatlib'
kono
parents:
diff changeset
153 if test ${enable_shared} = yes; then
kono
parents:
diff changeset
154 default_gnatlib_target="gnatlib-shared"
kono
parents:
diff changeset
155 else
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
156 default_gnatlib_target="gnatlib"
111
kono
parents:
diff changeset
157 fi
kono
parents:
diff changeset
158 AC_SUBST([default_gnatlib_target])
kono
parents:
diff changeset
159
kono
parents:
diff changeset
160 # Check for _Unwind_GetIPInfo
kono
parents:
diff changeset
161 GCC_CHECK_UNWIND_GETIPINFO
kono
parents:
diff changeset
162 if test x$have_unwind_getipinfo = xyes; then
kono
parents:
diff changeset
163 have_getipinfo=-DHAVE_GETIPINFO
kono
parents:
diff changeset
164 else
kono
parents:
diff changeset
165 have_getipinfo=
kono
parents:
diff changeset
166 fi
kono
parents:
diff changeset
167 AC_SUBST([have_getipinfo])
kono
parents:
diff changeset
168
kono
parents:
diff changeset
169 # Check for <sys/capability.h>
kono
parents:
diff changeset
170 AC_CHECK_HEADER([sys/capability.h], have_capability=-DHAVE_CAPABILITY, have_capability=)
kono
parents:
diff changeset
171 AC_SUBST([have_capability])
kono
parents:
diff changeset
172
kono
parents:
diff changeset
173 # Determine what GCC version number to use in filesystem paths.
kono
parents:
diff changeset
174 GCC_BASE_VER
kono
parents:
diff changeset
175
kono
parents:
diff changeset
176 # Output: create a Makefile.
kono
parents:
diff changeset
177 AC_CONFIG_FILES([Makefile])
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 AC_OUTPUT