annotate libobjc/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 # Process this file with autoconf to produce a configure script.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 # Originally contributed by Dave Love (d.love@dl.ac.uk).
kono
parents:
diff changeset
4 #
kono
parents:
diff changeset
5 #This file is part of GCC.
kono
parents:
diff changeset
6 #
kono
parents:
diff changeset
7 #GCC is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
8 #it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
9 #the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
10 #any later version.
kono
parents:
diff changeset
11 #
kono
parents:
diff changeset
12 #GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
13 #but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
14 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
15 #GNU General Public License for more details.
kono
parents:
diff changeset
16 #
kono
parents:
diff changeset
17 #You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 #along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 #<http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 AC_INIT(package-unused, version-unused,, libobjc)
kono
parents:
diff changeset
22 AC_CONFIG_SRCDIR([objc/objc.h])
kono
parents:
diff changeset
23 GCC_TOPLEV_SUBDIRS
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 # We need the following definitions because AC_PROG_LIBTOOL relies on them
kono
parents:
diff changeset
26 PACKAGE=libobjc
kono
parents:
diff changeset
27 # Version is pulled out to make it a bit easier to change using sed.
kono
parents:
diff changeset
28 VERSION=4:0:0
kono
parents:
diff changeset
29 AC_SUBST(VERSION)
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 # This works around the fact that libtool configuration may change LD
kono
parents:
diff changeset
32 # for this particular configuration, but some shells, instead of
kono
parents:
diff changeset
33 # keeping the changes in LD private, export them just because LD is
kono
parents:
diff changeset
34 # exported.
kono
parents:
diff changeset
35 ORIGINAL_LD_FOR_MULTILIBS=$LD
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 # -------
kono
parents:
diff changeset
38 # Options
kono
parents:
diff changeset
39 # -------
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 # We use these options to decide which functions to include.
kono
parents:
diff changeset
42 AC_ARG_WITH(target-subdir,
kono
parents:
diff changeset
43 [ --with-target-subdir=SUBDIR
kono
parents:
diff changeset
44 configuring in a subdirectory])
kono
parents:
diff changeset
45 AC_ARG_WITH(cross-host,
kono
parents:
diff changeset
46 [ --with-cross-host=HOST configuring with a cross compiler])
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
kono
parents:
diff changeset
49 AC_ARG_ENABLE(version-specific-runtime-libs,
kono
parents:
diff changeset
50 [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
kono
parents:
diff changeset
51 [case "$enableval" in
kono
parents:
diff changeset
52 yes) version_specific_libs=yes ;;
kono
parents:
diff changeset
53 no) version_specific_libs=no ;;
kono
parents:
diff changeset
54 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
kono
parents:
diff changeset
55 esac],
kono
parents:
diff changeset
56 [version_specific_libs=no])
kono
parents:
diff changeset
57 AC_MSG_RESULT($version_specific_libs)
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 # -----------
kono
parents:
diff changeset
60 # Directories
kono
parents:
diff changeset
61 # -----------
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 # Find the rest of the source tree framework.
kono
parents:
diff changeset
64 AM_ENABLE_MULTILIB(, ..)
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 AC_CANONICAL_SYSTEM
kono
parents:
diff changeset
67 ACX_NONCANONICAL_TARGET
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 # Export source directory.
kono
parents:
diff changeset
70 # These need to be absolute paths, yet at the same time need to
kono
parents:
diff changeset
71 # canonicalize only relative paths, because then amd will not unmount
kono
parents:
diff changeset
72 # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
kono
parents:
diff changeset
73 case $srcdir in
kono
parents:
diff changeset
74 [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
kono
parents:
diff changeset
75 *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
kono
parents:
diff changeset
76 esac
kono
parents:
diff changeset
77 AC_SUBST(glibcpp_srcdir)
kono
parents:
diff changeset
78
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
79 GCC_WITH_TOOLEXECLIBDIR
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
80
111
kono
parents:
diff changeset
81 # Calculate toolexeclibdir
kono
parents:
diff changeset
82 # Also toolexecdir, though it's only used in toolexeclibdir
kono
parents:
diff changeset
83 case ${version_specific_libs} in
kono
parents:
diff changeset
84 yes)
kono
parents:
diff changeset
85 # Need the gcc compiler version to know where to install libraries
kono
parents:
diff changeset
86 # and header files if --enable-version-specific-runtime-libs option
kono
parents:
diff changeset
87 # is selected.
kono
parents:
diff changeset
88 toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
kono
parents:
diff changeset
89 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
kono
parents:
diff changeset
90 ;;
kono
parents:
diff changeset
91 no)
kono
parents:
diff changeset
92 if test -n "$with_cross_host" &&
kono
parents:
diff changeset
93 test x"$with_cross_host" != x"no"; then
kono
parents:
diff changeset
94 # Install a library built with a cross compiler in tooldir, not libdir.
kono
parents:
diff changeset
95 toolexecdir='$(exec_prefix)/$(target_noncanonical)'
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
96 case ${with_toolexeclibdir} in
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
97 no)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
98 toolexeclibdir='$(toolexecdir)/lib'
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
99 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
100 *)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
101 toolexeclibdir=${with_toolexeclibdir}
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
102 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
103 esac
111
kono
parents:
diff changeset
104 else
kono
parents:
diff changeset
105 toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
kono
parents:
diff changeset
106 toolexeclibdir='$(libdir)'
kono
parents:
diff changeset
107 fi
kono
parents:
diff changeset
108 multi_os_directory=`$CC -print-multi-os-directory`
kono
parents:
diff changeset
109 case $multi_os_directory in
kono
parents:
diff changeset
110 .) ;; # Avoid trailing /.
kono
parents:
diff changeset
111 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
kono
parents:
diff changeset
112 esac
kono
parents:
diff changeset
113 ;;
kono
parents:
diff changeset
114 esac
kono
parents:
diff changeset
115 AC_SUBST(toolexecdir)
kono
parents:
diff changeset
116 AC_SUBST(toolexeclibdir)
kono
parents:
diff changeset
117
kono
parents:
diff changeset
118 # Figure out if we want to name the include directory and the
kono
parents:
diff changeset
119 # library name changes differently.
kono
parents:
diff changeset
120 includedirname=include
kono
parents:
diff changeset
121 libsuffix=
kono
parents:
diff changeset
122 case "${host}" in
kono
parents:
diff changeset
123 *-darwin*)
kono
parents:
diff changeset
124 # Darwin is the only target so far that needs a different include directory.
kono
parents:
diff changeset
125 includedirname=include-gnu-runtime
kono
parents:
diff changeset
126 libsuffix=-gnu
kono
parents:
diff changeset
127 ;;
kono
parents:
diff changeset
128 esac
kono
parents:
diff changeset
129 AC_SUBST(includedirname)
kono
parents:
diff changeset
130 AC_SUBST(libsuffix)
kono
parents:
diff changeset
131
kono
parents:
diff changeset
132 AC_CONFIG_HEADERS(config.h)
kono
parents:
diff changeset
133
kono
parents:
diff changeset
134 # --------
kono
parents:
diff changeset
135 # Programs
kono
parents:
diff changeset
136 # --------
kono
parents:
diff changeset
137
kono
parents:
diff changeset
138 GCC_NO_EXECUTABLES
kono
parents:
diff changeset
139
kono
parents:
diff changeset
140 # We must force CC to /not/ be a precious variable; otherwise
kono
parents:
diff changeset
141 # the wrong, non-multilib-adjusted value will be used in multilibs.
kono
parents:
diff changeset
142 # As a side effect, we have to subst CFLAGS ourselves.
kono
parents:
diff changeset
143 m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
kono
parents:
diff changeset
144 m4_define([_AC_ARG_VAR_PRECIOUS],[])
kono
parents:
diff changeset
145 AC_PROG_CC
kono
parents:
diff changeset
146 m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
kono
parents:
diff changeset
147
kono
parents:
diff changeset
148 # extra LD Flags which are required for targets
kono
parents:
diff changeset
149 ACX_LT_HOST_FLAGS
kono
parents:
diff changeset
150 case "${host}" in
kono
parents:
diff changeset
151 *-darwin*)
kono
parents:
diff changeset
152 # Darwin needs -single_module when linking libobjc
kono
parents:
diff changeset
153 extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module'
kono
parents:
diff changeset
154 ;;
kono
parents:
diff changeset
155 *-cygwin*|*-mingw*)
kono
parents:
diff changeset
156 # Tell libtool to build DLLs on Windows
kono
parents:
diff changeset
157 extra_ldflags_libobjc='$(lt_host_flags)'
kono
parents:
diff changeset
158 ;;
kono
parents:
diff changeset
159 esac
kono
parents:
diff changeset
160 AC_SUBST(extra_ldflags_libobjc)
kono
parents:
diff changeset
161
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
162 # Add CET specific flags if CET is enabled
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
163 GCC_CET_FLAGS(CET_FLAGS)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
164 XCFLAGS="$XCFLAGS $CET_FLAGS"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
165
111
kono
parents:
diff changeset
166 AC_SUBST(CFLAGS)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
167 AC_SUBST(XCFLAGS)
111
kono
parents:
diff changeset
168
kono
parents:
diff changeset
169 AC_CHECK_TOOL(AS, as)
kono
parents:
diff changeset
170 AC_CHECK_TOOL(AR, ar)
kono
parents:
diff changeset
171 AC_CHECK_TOOL(RANLIB, ranlib, :)
kono
parents:
diff changeset
172 AC_PROG_INSTALL
kono
parents:
diff changeset
173
kono
parents:
diff changeset
174 AM_MAINTAINER_MODE
kono
parents:
diff changeset
175
kono
parents:
diff changeset
176 # Enable Win32 DLL on MS Windows - FIXME
kono
parents:
diff changeset
177 AC_LIBTOOL_WIN32_DLL
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 AC_PROG_LIBTOOL
kono
parents:
diff changeset
180
kono
parents:
diff changeset
181 AM_PROG_CC_C_O
kono
parents:
diff changeset
182
kono
parents:
diff changeset
183 AC_PROG_MAKE_SET
kono
parents:
diff changeset
184
kono
parents:
diff changeset
185 # -------
kono
parents:
diff changeset
186 # Headers
kono
parents:
diff changeset
187 # -------
kono
parents:
diff changeset
188
kono
parents:
diff changeset
189 # Sanity check for the cross-compilation case:
kono
parents:
diff changeset
190 AC_CHECK_HEADER(stdio.h,:,
kono
parents:
diff changeset
191 [AC_MSG_ERROR([Can't find stdio.h.
kono
parents:
diff changeset
192 You must have a usable C system for the target already installed, at least
kono
parents:
diff changeset
193 including headers and, preferably, the library, before you can configure
kono
parents:
diff changeset
194 the Objective C runtime system. If necessary, install gcc now with
kono
parents:
diff changeset
195 \`LANGUAGES=c', then the target library, then build with \`LANGUAGES=objc'.])])
kono
parents:
diff changeset
196
kono
parents:
diff changeset
197 AC_HEADER_STDC
kono
parents:
diff changeset
198
kono
parents:
diff changeset
199 AC_CHECK_HEADERS(sched.h)
kono
parents:
diff changeset
200
kono
parents:
diff changeset
201 # -----------
kono
parents:
diff changeset
202 # Miscellanea
kono
parents:
diff changeset
203 # -----------
kono
parents:
diff changeset
204
kono
parents:
diff changeset
205 # Check if we have thread-local storage
kono
parents:
diff changeset
206 GCC_CHECK_TLS
kono
parents:
diff changeset
207
kono
parents:
diff changeset
208 gt_BITFIELD_TYPE_MATTERS
kono
parents:
diff changeset
209
kono
parents:
diff changeset
210 # -----------
kono
parents:
diff changeset
211 # boehm-gc
kono
parents:
diff changeset
212 # -----------
kono
parents:
diff changeset
213
kono
parents:
diff changeset
214 AC_ARG_ENABLE(objc-gc,
kono
parents:
diff changeset
215 [AS_HELP_STRING([--enable-objc-gc],
kono
parents:
diff changeset
216 [enable use of Boehm's garbage collector with the
kono
parents:
diff changeset
217 GNU Objective-C runtime])],,enable_objc_gc=no)
kono
parents:
diff changeset
218 AC_ARG_WITH([target-bdw-gc],
kono
parents:
diff changeset
219 [AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
kono
parents:
diff changeset
220 [specify prefix directory for installed bdw-gc package.
kono
parents:
diff changeset
221 Equivalent to --with-target-bdw-gc-include=PATH/include
kono
parents:
diff changeset
222 plus --with-target-bdw-gc-lib=PATH/lib])])
kono
parents:
diff changeset
223 AC_ARG_WITH([target-bdw-gc-include],
kono
parents:
diff changeset
224 [AS_HELP_STRING([--with-target-bdw-gc-include=PATHLIST],
kono
parents:
diff changeset
225 [specify directories for installed bdw-gc include files])])
kono
parents:
diff changeset
226 AC_ARG_WITH([target-bdw-gc-lib],
kono
parents:
diff changeset
227 [AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST],
kono
parents:
diff changeset
228 [specify directories for installed bdw-gc library])])
kono
parents:
diff changeset
229
kono
parents:
diff changeset
230 case "$enable_objc_gc" in
kono
parents:
diff changeset
231 no)
kono
parents:
diff changeset
232 use_bdw_gc=no
kono
parents:
diff changeset
233 ;;
kono
parents:
diff changeset
234 *)
kono
parents:
diff changeset
235 AC_MSG_CHECKING([for bdw garbage collector])
kono
parents:
diff changeset
236 if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
kono
parents:
diff changeset
237 dnl no bdw-gw options, assuming bdw-gc in default locations
kono
parents:
diff changeset
238 BDW_GC_CFLAGS=
kono
parents:
diff changeset
239 BDW_GC_LIBS="-lgc"
kono
parents:
diff changeset
240 else
kono
parents:
diff changeset
241 dnl bdw-gw options passed by configure flags
kono
parents:
diff changeset
242 if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
kono
parents:
diff changeset
243 AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing])
kono
parents:
diff changeset
244 elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
kono
parents:
diff changeset
245 AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing])
kono
parents:
diff changeset
246 else
kono
parents:
diff changeset
247 AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options])
kono
parents:
diff changeset
248 fi
kono
parents:
diff changeset
249 mldir=`${CC-gcc} --print-multi-directory 2>/dev/null`
kono
parents:
diff changeset
250 bdw_val=
kono
parents:
diff changeset
251 if test "x$with_target_bdw_gc" != x; then
kono
parents:
diff changeset
252 for i in `echo $with_target_bdw_gc | tr ',' ' '`; do
kono
parents:
diff changeset
253 case "$i" in
kono
parents:
diff changeset
254 *=*) sd=${i%%=*}; d=${i#*=} ;;
kono
parents:
diff changeset
255 *) sd=.; d=$i ;;
kono
parents:
diff changeset
256 esac
kono
parents:
diff changeset
257 if test "$mldir" = "$sd"; then
kono
parents:
diff changeset
258 bdw_val=$d
kono
parents:
diff changeset
259 fi
kono
parents:
diff changeset
260 done
kono
parents:
diff changeset
261 if test "x$bdw_val" = x; then
kono
parents:
diff changeset
262 AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc])
kono
parents:
diff changeset
263 fi
kono
parents:
diff changeset
264 bdw_inc_dir="$bdw_val/include"
kono
parents:
diff changeset
265 bdw_lib_dir="$bdw_val/lib"
kono
parents:
diff changeset
266 fi
kono
parents:
diff changeset
267 bdw_val=
kono
parents:
diff changeset
268 if test "x$with_target_bdw_gc_include" != x; then
kono
parents:
diff changeset
269 for i in `echo $with_target_bdw_gc_include | tr ',' ' '`; do
kono
parents:
diff changeset
270 case "$i" in
kono
parents:
diff changeset
271 *=*) sd=${i%%=*}; d=${i#*=} ;;
kono
parents:
diff changeset
272 *) sd=.; d=$i; fallback=$i ;;
kono
parents:
diff changeset
273 esac
kono
parents:
diff changeset
274 if test "$mldir" = "$sd"; then
kono
parents:
diff changeset
275 bdw_val=$d
kono
parents:
diff changeset
276 fi
kono
parents:
diff changeset
277 done
kono
parents:
diff changeset
278 if test "x$bdw_val" = x && test "x$bdw_inc_dir" = x && test "x$fallback" != x; then
kono
parents:
diff changeset
279 bdw_inc_dir="$fallback"
kono
parents:
diff changeset
280 elif test "x$bdw_val" = x; then
kono
parents:
diff changeset
281 AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-include])
kono
parents:
diff changeset
282 else
kono
parents:
diff changeset
283 bdw_inc_dir="$bdw_val"
kono
parents:
diff changeset
284 fi
kono
parents:
diff changeset
285 fi
kono
parents:
diff changeset
286 bdw_val=
kono
parents:
diff changeset
287 if test "x$with_target_bdw_gc_lib" != x; then
kono
parents:
diff changeset
288 for i in `echo $with_target_bdw_gc_lib | tr ',' ' '`; do
kono
parents:
diff changeset
289 case "$i" in
kono
parents:
diff changeset
290 *=*) sd=${i%%=*}; d=${i#*=} ;;
kono
parents:
diff changeset
291 *) sd=.; d=$i ;;
kono
parents:
diff changeset
292 esac
kono
parents:
diff changeset
293 if test "$mldir" = "$sd"; then
kono
parents:
diff changeset
294 bdw_val=$d
kono
parents:
diff changeset
295 fi
kono
parents:
diff changeset
296 done
kono
parents:
diff changeset
297 if test "x$bdw_val" = x; then
kono
parents:
diff changeset
298 AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-lib])
kono
parents:
diff changeset
299 fi
kono
parents:
diff changeset
300 bdw_lib_dir="$bdw_val"
kono
parents:
diff changeset
301 fi
kono
parents:
diff changeset
302 if test "x$bdw_inc_dir" = x; then
kono
parents:
diff changeset
303 AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-include])
kono
parents:
diff changeset
304 fi
kono
parents:
diff changeset
305 if test "x$bdw_lib_dir" = x; then
kono
parents:
diff changeset
306 AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-lib])
kono
parents:
diff changeset
307 fi
kono
parents:
diff changeset
308 BDW_GC_CFLAGS="-I$bdw_inc_dir"
kono
parents:
diff changeset
309 if test -f $bdw_lib_dir/libgc.la; then
kono
parents:
diff changeset
310 BDW_GC_LIBS="$bdw_lib_dir/libgc.la"
kono
parents:
diff changeset
311 else
kono
parents:
diff changeset
312 BDW_GC_LIBS="-L$bdw_lib_dir -lgc"
kono
parents:
diff changeset
313 fi
kono
parents:
diff changeset
314 AC_MSG_RESULT([found])
kono
parents:
diff changeset
315 fi
kono
parents:
diff changeset
316
kono
parents:
diff changeset
317 case "$BDW_GC_LIBS" in
kono
parents:
diff changeset
318 *libgc.la)
kono
parents:
diff changeset
319 use_bdw_gc=yes
kono
parents:
diff changeset
320 ;;
kono
parents:
diff changeset
321 *)
kono
parents:
diff changeset
322 AC_MSG_CHECKING([for system boehm-gc])
kono
parents:
diff changeset
323 save_CFLAGS=$CFLAGS
kono
parents:
diff changeset
324 save_LIBS=$LIBS
kono
parents:
diff changeset
325 CFLAGS="$CFLAGS $BDW_GC_CFLAGS"
kono
parents:
diff changeset
326 LIBS="$LIBS $BDW_GC_LIBS"
kono
parents:
diff changeset
327 dnl the link test is not good enough for ARM32 multilib detection,
kono
parents:
diff changeset
328 dnl first check to link, then to run
kono
parents:
diff changeset
329 AC_LINK_IFELSE(
kono
parents:
diff changeset
330 [AC_LANG_PROGRAM([#include <gc/gc.h>],[GC_init()])],
kono
parents:
diff changeset
331 [
kono
parents:
diff changeset
332 AC_RUN_IFELSE([AC_LANG_SOURCE([[
kono
parents:
diff changeset
333 #include <gc/gc.h>
kono
parents:
diff changeset
334 int main() {
kono
parents:
diff changeset
335 GC_init();
kono
parents:
diff changeset
336 return 0;
kono
parents:
diff changeset
337 }
kono
parents:
diff changeset
338 ]])],
kono
parents:
diff changeset
339 [system_bdw_gc_found=yes],
kono
parents:
diff changeset
340 [system_bdw_gc_found=no],
kono
parents:
diff changeset
341 dnl assume no system boehm-gc for cross builds ...
kono
parents:
diff changeset
342 [system_bdw_gc_found=no]
kono
parents:
diff changeset
343 )
kono
parents:
diff changeset
344 ],
kono
parents:
diff changeset
345 [system_bdw_gc_found=no])
kono
parents:
diff changeset
346 CFLAGS=$save_CFLAGS
kono
parents:
diff changeset
347 LIBS=$save_LIBS
kono
parents:
diff changeset
348 if test x$enable_objc_gc = xauto && test x$system_bdw_gc_found = xno; then
kono
parents:
diff changeset
349 AC_MSG_WARN([system bdw-gc not found, not building libobjc_gc])
kono
parents:
diff changeset
350 use_bdw_gc=no
kono
parents:
diff changeset
351 elif test x$enable_objc_gc = xyes && test x$system_bdw_gc_found = xno; then
kono
parents:
diff changeset
352 AC_MSG_ERROR([system bdw-gc required but not found])
kono
parents:
diff changeset
353 else
kono
parents:
diff changeset
354 use_bdw_gc=yes
kono
parents:
diff changeset
355 AC_MSG_RESULT([found])
kono
parents:
diff changeset
356 fi
kono
parents:
diff changeset
357 esac
kono
parents:
diff changeset
358 esac
kono
parents:
diff changeset
359
kono
parents:
diff changeset
360 if test "$use_bdw_gc" = no; then
kono
parents:
diff changeset
361 OBJC_GCFLAGS=''
kono
parents:
diff changeset
362 OBJC_BOEHM_GC=''
kono
parents:
diff changeset
363 OBJC_BOEHM_GC_INCLUDES=''
kono
parents:
diff changeset
364 OBJC_BOEHM_GC_LIBS=''
kono
parents:
diff changeset
365 else
kono
parents:
diff changeset
366 OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
kono
parents:
diff changeset
367 OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
kono
parents:
diff changeset
368 OBJC_BOEHM_GC_INCLUDES=$BDW_GC_CFLAGS
kono
parents:
diff changeset
369 OBJC_BOEHM_GC_LIBS=$BDW_GC_LIBS
kono
parents:
diff changeset
370 fi
kono
parents:
diff changeset
371 AC_SUBST(OBJC_GCFLAGS)
kono
parents:
diff changeset
372 AC_SUBST(OBJC_BOEHM_GC)
kono
parents:
diff changeset
373 AC_SUBST(OBJC_BOEHM_GC_INCLUDES)
kono
parents:
diff changeset
374 AC_SUBST(OBJC_BOEHM_GC_LIBS)
kono
parents:
diff changeset
375
kono
parents:
diff changeset
376 # Determine what GCC version number to use in filesystem paths.
kono
parents:
diff changeset
377 GCC_BASE_VER
kono
parents:
diff changeset
378
kono
parents:
diff changeset
379 # ------
kono
parents:
diff changeset
380 # Output
kono
parents:
diff changeset
381 # ------
kono
parents:
diff changeset
382
kono
parents:
diff changeset
383 if test ${multilib} = yes; then
kono
parents:
diff changeset
384 multilib_arg="--enable-multilib"
kono
parents:
diff changeset
385 else
kono
parents:
diff changeset
386 multilib_arg=
kono
parents:
diff changeset
387 fi
kono
parents:
diff changeset
388
kono
parents:
diff changeset
389 AC_CONFIG_FILES([Makefile])
kono
parents:
diff changeset
390 AC_OUTPUT