annotate libada/configure.ac @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 84e7813d76e9
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 # Configure script for libada.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 # Copyright (C) 2003-2018 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)
kono
parents:
diff changeset
22 sinclude(../config/unwind_ipinfo.m4)
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 AC_INIT
kono
parents:
diff changeset
25 AC_PREREQ([2.64])
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.
kono
parents:
diff changeset
42 # Very limited version of AC_MAINTAINER_MODE.
kono
parents:
diff changeset
43 AC_ARG_ENABLE([maintainer-mode],
kono
parents:
diff changeset
44 [AC_HELP_STRING([--enable-maintainer-mode],
kono
parents:
diff changeset
45 [enable make rules and dependencies not useful (and
kono
parents:
diff changeset
46 sometimes confusing) to the casual installer])],
kono
parents:
diff changeset
47 [case ${enable_maintainer_mode} in
kono
parents:
diff changeset
48 yes) MAINT='' ;;
kono
parents:
diff changeset
49 no) MAINT='#' ;;
kono
parents:
diff changeset
50 *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;;
kono
parents:
diff changeset
51 esac
kono
parents:
diff changeset
52 maintainer_mode=${enableval}],
kono
parents:
diff changeset
53 [MAINT='#'])
kono
parents:
diff changeset
54 AC_SUBST([MAINT])dnl
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 AM_ENABLE_MULTILIB(, ..)
kono
parents:
diff changeset
57 # Calculate toolexeclibdir
kono
parents:
diff changeset
58 # Also toolexecdir, though it's only used in toolexeclibdir
kono
parents:
diff changeset
59 case ${enable_version_specific_runtime_libs} in
kono
parents:
diff changeset
60 yes)
kono
parents:
diff changeset
61 # Need the gcc compiler version to know where to install libraries
kono
parents:
diff changeset
62 # and header files if --enable-version-specific-runtime-libs option
kono
parents:
diff changeset
63 # is selected.
kono
parents:
diff changeset
64 toolexecdir='$(libdir)/gcc/$(target_alias)'
kono
parents:
diff changeset
65 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
kono
parents:
diff changeset
66 ;;
kono
parents:
diff changeset
67 no)
kono
parents:
diff changeset
68 if test -n "$with_cross_host" &&
kono
parents:
diff changeset
69 test x"$with_cross_host" != x"no"; then
kono
parents:
diff changeset
70 # Install a library built with a cross compiler in tooldir, not libdir.
kono
parents:
diff changeset
71 toolexecdir='$(exec_prefix)/$(target_alias)'
kono
parents:
diff changeset
72 toolexeclibdir='$(toolexecdir)/lib'
kono
parents:
diff changeset
73 else
kono
parents:
diff changeset
74 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
kono
parents:
diff changeset
75 toolexeclibdir='$(libdir)'
kono
parents:
diff changeset
76 fi
kono
parents:
diff changeset
77 multi_os_directory=`$CC -print-multi-os-directory`
kono
parents:
diff changeset
78 case $multi_os_directory in
kono
parents:
diff changeset
79 .) ;; # Avoid trailing /.
kono
parents:
diff changeset
80 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
kono
parents:
diff changeset
81 esac
kono
parents:
diff changeset
82 ;;
kono
parents:
diff changeset
83 esac
kono
parents:
diff changeset
84 AC_SUBST(toolexecdir)
kono
parents:
diff changeset
85 AC_SUBST(toolexeclibdir)
kono
parents:
diff changeset
86 #TODO: toolexeclibdir is currently disregarded
kono
parents:
diff changeset
87
kono
parents:
diff changeset
88 # Check the compiler.
kono
parents:
diff changeset
89 # The same as in boehm-gc and libstdc++. Have to borrow it from there.
kono
parents:
diff changeset
90 # We must force CC to /not/ be precious variables; otherwise
kono
parents:
diff changeset
91 # the wrong, non-multilib-adjusted value will be used in multilibs.
kono
parents:
diff changeset
92 # As a side effect, we have to subst CFLAGS ourselves.
kono
parents:
diff changeset
93
kono
parents:
diff changeset
94 m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
kono
parents:
diff changeset
95 m4_define([_AC_ARG_VAR_PRECIOUS],[])
kono
parents:
diff changeset
96 AC_PROG_CC
kono
parents:
diff changeset
97 m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
kono
parents:
diff changeset
98
kono
parents:
diff changeset
99 AC_SUBST(CFLAGS)
kono
parents:
diff changeset
100
kono
parents:
diff changeset
101 AC_ARG_ENABLE([shared],
kono
parents:
diff changeset
102 [AC_HELP_STRING([--disable-shared],
kono
parents:
diff changeset
103 [don't provide a shared libgnat])],
kono
parents:
diff changeset
104 [
kono
parents:
diff changeset
105 case $enable_shared in
kono
parents:
diff changeset
106 yes | no) ;;
kono
parents:
diff changeset
107 *)
kono
parents:
diff changeset
108 enable_shared=no
kono
parents:
diff changeset
109 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
kono
parents:
diff changeset
110 for pkg in $enableval; do
kono
parents:
diff changeset
111 case $pkg in
kono
parents:
diff changeset
112 ada | libada)
kono
parents:
diff changeset
113 enable_shared=yes ;;
kono
parents:
diff changeset
114 esac
kono
parents:
diff changeset
115 done
kono
parents:
diff changeset
116 IFS="$ac_save_ifs"
kono
parents:
diff changeset
117 ;;
kono
parents:
diff changeset
118 esac
kono
parents:
diff changeset
119 ], [enable_shared=yes])
kono
parents:
diff changeset
120 AC_SUBST([enable_shared])
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 GCC_PICFLAG
kono
parents:
diff changeset
123 AC_SUBST([PICFLAG])
kono
parents:
diff changeset
124
kono
parents:
diff changeset
125 # These must be passed down, or are needed by gcc/libgcc.mvars
kono
parents:
diff changeset
126 AC_PROG_AWK
kono
parents:
diff changeset
127 AC_PROG_LN_S
kono
parents:
diff changeset
128
kono
parents:
diff changeset
129 # Determine what to build for 'gnatlib'
kono
parents:
diff changeset
130 if test ${enable_shared} = yes; then
kono
parents:
diff changeset
131 default_gnatlib_target="gnatlib-shared"
kono
parents:
diff changeset
132 else
kono
parents:
diff changeset
133 default_gnatlib_target="gnatlib-plain"
kono
parents:
diff changeset
134 fi
kono
parents:
diff changeset
135 AC_SUBST([default_gnatlib_target])
kono
parents:
diff changeset
136
kono
parents:
diff changeset
137 # Check for _Unwind_GetIPInfo
kono
parents:
diff changeset
138 GCC_CHECK_UNWIND_GETIPINFO
kono
parents:
diff changeset
139 if test x$have_unwind_getipinfo = xyes; then
kono
parents:
diff changeset
140 have_getipinfo=-DHAVE_GETIPINFO
kono
parents:
diff changeset
141 else
kono
parents:
diff changeset
142 have_getipinfo=
kono
parents:
diff changeset
143 fi
kono
parents:
diff changeset
144 AC_SUBST([have_getipinfo])
kono
parents:
diff changeset
145
kono
parents:
diff changeset
146 # Check for <sys/capability.h>
kono
parents:
diff changeset
147 AC_CHECK_HEADER([sys/capability.h], have_capability=-DHAVE_CAPABILITY, have_capability=)
kono
parents:
diff changeset
148 AC_SUBST([have_capability])
kono
parents:
diff changeset
149
kono
parents:
diff changeset
150 # Determine what GCC version number to use in filesystem paths.
kono
parents:
diff changeset
151 GCC_BASE_VER
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 # Output: create a Makefile.
kono
parents:
diff changeset
154 AC_CONFIG_FILES([Makefile])
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 AC_OUTPUT