1 # configure.ac -- Go library configure script.
3 # Copyright 2009 The Go Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style
5 # license that can be found in the LICENSE file.
7 # Process this file with autoreconf to produce configure.
10 AC_INIT(package-unused, version-unused,, libgo)
11 AC_CONFIG_SRCDIR(Makefile.am)
12 AC_CONFIG_HEADER(config.h)
15 AC_SUBST(libtool_VERSION)
17 AM_ENABLE_MULTILIB(, ..)
20 target_alias=${target_alias-$host_alias}
22 AM_INIT_AUTOMAKE([1.9.3 no-define foreign -Wall])
23 AH_TEMPLATE(PACKAGE, [Name of package])
24 AH_TEMPLATE(VERSION, [Version number of package])
26 m4_rename([_AC_ARG_VAR_PRECIOUS],[glibgo_PRECIOUS])
27 m4_define([_AC_ARG_VAR_PRECIOUS],[])
30 m4_rename_force([glibgo_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
40 AC_CHECK_TOOL(OBJCOPY, objcopy, missing-objcopy)
44 AC_SUBST(enable_shared)
45 AC_SUBST(enable_static)
47 CC_FOR_BUILD=${CC_FOR_BUILD:-gcc}
48 AC_SUBST(CC_FOR_BUILD)
52 WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual'
55 dnl FIXME: This should be controlled by --enable-maintainer-mode.
60 glibgo_toolexeclibdir=no
62 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
63 AC_ARG_ENABLE([version-specific-runtime-libs],
64 AC_HELP_STRING([--enable-version-specific-runtime-libs],
65 [Specify that runtime libraries should be installed in a compiler-specific directory]),
67 yes) version_specific_libs=yes ;;
68 no) version_specific_libs=no ;;
69 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
71 [version_specific_libs=no])
72 AC_MSG_RESULT($version_specific_libs)
74 # Version-specific runtime libs processing.
75 if test $version_specific_libs = yes; then
76 glibgo_toolexecdir='${libdir}/gcc/${host_alias}'
77 glibgo_toolexeclibdir='${toolexecdir}/${gcc_version}$(MULTISUBDIR)'
80 # Calculate glibgo_toolexecdir, glibgo_toolexeclibdir
81 # Install a library built with a cross compiler in tooldir, not libdir.
82 if test -n "$with_cross_host" &&
83 test x"$with_cross_host" != x"no"; then
84 nover_glibgo_toolexecdir='${exec_prefix}/${host_alias}'
85 nover_glibgo_toolexeclibdir='${toolexecdir}/lib'
87 nover_glibgo_toolexecdir='${libdir}/gcc/${host_alias}'
88 nover_glibgo_toolexeclibdir='${libdir}'
90 multi_os_directory=`$CC -print-multi-os-directory`
91 case $multi_os_directory in
92 .) ;; # Avoid trailing /.
93 *) nover_glibgo_toolexeclibdir=${nover_glibgo_toolexeclibdir}/${multi_os_directory} ;;
96 if test x"$glibgo_toolexecdir" = x"no"; then
97 glibgo_toolexecdir="${nover_glibgo_toolexecdir}"
98 glibgo_toolexeclibdir="${nover_glibgo_toolexeclibdir}"
101 AC_SUBST(glibgo_toolexecdir)
102 AC_SUBST(glibgo_toolexeclibdir)
103 AC_SUBST(nover_glibgo_toolexeclibdir)
105 # See if the user wants to configure without libffi. Some
106 # architectures don't support it. FIXME: We should set a default
109 AS_HELP_STRING([--without-libffi],
112 [with_libffi=${with_libffi_default-yes}])
116 if test "$with_libffi" != no; then
117 AC_DEFINE(USE_LIBFFI, 1, [Define if we're to use libffi.])
118 LIBFFI=../libffi/libffi_convenience.la
119 LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include'
124 # Used to tell GNU make to include a file without telling automake to
126 go_include="-include"
138 *-*-darwin*) is_darwin=yes; GOOS=darwin ;;
139 *-*-freebsd*) is_freebsd=yes; GOOS=freebsd ;;
140 *-*-irix6*) is_irix=yes; GOOS=irix ;;
141 *-*-linux*) is_linux=yes; GOOS=linux ;;
142 *-*-netbsd*) is_netbsd=yes; GOOS=netbsd ;;
143 *-*-rtems*) is_rtems=yes; GOOS=rtems ;;
144 *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
146 AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes)
147 AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes)
148 AM_CONDITIONAL(LIBGO_IS_IRIX, test $is_irix = yes)
149 AM_CONDITIONAL(LIBGO_IS_LINUX, test $is_linux = yes)
150 AM_CONDITIONAL(LIBGO_IS_NETBSD, test $is_netbsd = yes)
151 AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
152 AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
155 dnl N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch).
172 arm*-*-* | strongarm*-*-* | ep9312*-*-* | xscale-*-*)
177 i[34567]86-*-* | x86_64-*-*)
183 [is_386=yes], [is_x86_64=yes])
184 if test "$is_386" = "yes"; then
196 #if _MIPS_SIM != _ABIO32
201 #if _MIPS_SIM != _ABIN32
206 #if _MIPS_SIM != _ABI64
211 #if _MIPS_SIM != _ABIO64
215 [AC_MSG_ERROR([unknown MIPS ABI])
216 [mips_abi="n32"]])])])])
218 "o32") GOARCH=mipso32 ;;
219 "n32") GOARCH=mipsn32 ;;
220 "n64") GOARCH=mipsn64 ;;
221 "o64") GOARCH=mipso64 ;;
224 rs6000*-*-* | powerpc*-*-*)
229 [is_ppc=yes], [is_ppc64=yes])
230 if test "$is_ppc" = "yes"; then
238 #if defined(__sparcv9) || defined(__arch64__)
241 [is_sparc=yes], [is_sparc64=yes])
242 if test "$is_sparc" = "yes"; then
249 AM_CONDITIONAL(LIBGO_IS_386, test $is_386 = yes)
250 AM_CONDITIONAL(LIBGO_IS_ALPHA, test $is_alpha = yes)
251 AM_CONDITIONAL(LIBGO_IS_ARM, test $is_arm = yes)
252 AM_CONDITIONAL(LIBGO_IS_M68K, test $is_m68k = yes)
253 AM_CONDITIONAL(LIBGO_IS_MIPS, test $mips_abi != unknown)
254 AM_CONDITIONAL(LIBGO_IS_MIPSO32, test $mips_abi = o32)
255 AM_CONDITIONAL(LIBGO_IS_MIPSN32, test $mips_abi = n32)
256 AM_CONDITIONAL(LIBGO_IS_MIPSN64, test $mips_abi = n64)
257 AM_CONDITIONAL(LIBGO_IS_MIPSO64, test $mips_abi = o64)
258 AM_CONDITIONAL(LIBGO_IS_PPC, test $is_ppc = yes)
259 AM_CONDITIONAL(LIBGO_IS_PPC64, test $is_ppc64 = yes)
260 AM_CONDITIONAL(LIBGO_IS_SPARC, test $is_sparc = yes)
261 AM_CONDITIONAL(LIBGO_IS_SPARC64, test $is_sparc64 = yes)
262 AM_CONDITIONAL(LIBGO_IS_X86_64, test $is_x86_64 = yes)
265 dnl Some files are only present when needed for specific architectures.
267 GO_LIBCALL_OS_ARCH_FILE=
269 GO_SYSCALL_OS_ARCH_FILE=
270 if test -f ${srcdir}/go/syscall/libcall_${GOOS}.go; then
271 GO_LIBCALL_OS_FILE=go/syscall/libcall_${GOOS}.go
273 if test -f ${srcdir}/go/syscall/libcall_${GOOS}_${GOARCH}.go; then
274 GO_LIBCALL_OS_ARCH_FILE=go/syscall/libcall_${GOOS}_${GOARCH}.go
276 if test -f ${srcdir}/go/syscall/syscall_${GOOS}.go; then
277 GO_SYSCALL_OS_FILE=go/syscall/syscall_${GOOS}.go
279 if test -f ${srcdir}/go/syscall/syscall_${GOOS}_${GOARCH}.go; then
280 GO_SYSCALL_OS_ARCH_FILE=go/syscall/syscall_${GOOS}_${GOARCH}.go
282 AC_SUBST(GO_LIBCALL_OS_FILE)
283 AC_SUBST(GO_LIBCALL_OS_ARCH_FILE)
284 AC_SUBST(GO_SYSCALL_OS_FILE)
285 AC_SUBST(GO_SYSCALL_OS_ARCH_FILE)
287 dnl Special flags used to generate sysinfo.go.
288 OSCFLAGS="-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
291 # IRIX 6 needs _XOPEN_SOURCE=500 for the XPG5 version of struct
292 # msghdr in <sys/socket.h>.
293 OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=500"
296 # Solaris 8/9 need this so struct msghdr gets the msg_control
297 # etc. fields in <sys/socket.h> (_XPG4_2).
298 OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D__EXTENSIONS__"
300 *-*-solaris2.1[[01]])
301 # Solaris 10+ needs this so struct msghdr gets the msg_control
302 # etc. fields in <sys/socket.h> (_XPG4_2). _XOPEN_SOURCE=600 as
303 # above doesn't work with C99.
304 OSCFLAGS="$OSCFLAGS -std=gnu99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__"
309 dnl Use -fsplit-stack when compiling C code if available.
310 AC_CACHE_CHECK([whether -fsplit-stack is supported],
311 [libgo_cv_c_split_stack_supported],
313 CFLAGS="$CFLAGS -fsplit-stack"
314 AC_COMPILE_IFELSE([[int i;]],
315 [libgo_cv_c_split_stack_supported=yes],
316 [libgo_cv_c_split_stack_supported=no])
317 CFLAGS=$CFLAGS_hold])
318 if test "$libgo_cv_c_split_stack_supported" = yes; then
319 SPLIT_STACK=-fsplit-stack
320 AC_DEFINE(USING_SPLIT_STACK, 1,
321 [Define if the compiler supports -fsplit-stack])
325 AC_SUBST(SPLIT_STACK)
326 AM_CONDITIONAL(USING_SPLIT_STACK,
327 test "$libgo_cv_c_split_stack_supported" = yes)
329 dnl Check whether the linker does stack munging when calling from
330 dnl split-stack into non-split-stack code. We check this by looking
331 dnl at the --help output. FIXME: This is only half right: it's
332 dnl possible for the linker to support this for some targets but not
334 AC_CACHE_CHECK([whether linker supports split stack],
335 [libgo_cv_c_linker_supports_split_stack],
336 libgo_cv_c_linker_supports_split_stack=no
337 if $LD --help 2>/dev/null | grep split-stack-adjust-size >/dev/null 2>&1; then
338 libgo_cv_c_linker_supports_split_stack=yes
340 if test "$libgo_cv_c_linker_supports_split_stack" = yes; then
341 AC_DEFINE(LINKER_SUPPORTS_SPLIT_STACK, 1,
342 [Define if the linker support split stack adjustments])
345 dnl Test for the -lm library.
347 AC_CHECK_LIB([m], [sqrt], MATH_LIBS=-lm)
350 dnl Test for -lsocket and -lnsl. Copied from libjava/configure.ac.
351 AC_CACHE_CHECK([for socket libraries], libgo_cv_lib_sockets,
352 [libgo_cv_lib_sockets=
354 AC_CHECK_FUNC(connect, libgo_check_socket=no, libgo_check_socket=yes)
355 if test "$libgo_check_socket" = "yes"; then
356 unset ac_cv_func_connect
357 AC_CHECK_LIB(socket, main, libgo_cv_lib_sockets="-lsocket",
358 libgo_check_both=yes)
360 if test "$libgo_check_both" = "yes"; then
362 LIBS="$LIBS -lsocket -lnsl"
363 unset ac_cv_func_accept
364 AC_CHECK_FUNC(accept,
366 libgo_cv_lib_sockets="-lsocket -lnsl"])
367 unset ac_cv_func_accept
370 unset ac_cv_func_gethostbyname
371 libgo_old_libs="$LIBS"
372 AC_CHECK_FUNC(gethostbyname, ,
373 [AC_CHECK_LIB(nsl, main,
374 [libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lnsl"])])
375 unset ac_cv_func_gethostbyname
378 NET_LIBS="$libgo_cv_lib_sockets"
381 dnl Test whether the compiler supports the -pthread option.
382 AC_CACHE_CHECK([whether -pthread is supported],
383 [libgo_cv_lib_pthread],
385 CFLAGS="$CFLAGS -pthread"
386 AC_COMPILE_IFELSE([[int i;]],
387 [libgo_cv_lib_pthread=yes],
388 [libgo_cv_lib_pthread=no])
389 CFLAGS=$CFLAGS_hold])
391 if test "$libgo_cv_lib_pthread" = yes; then
392 PTHREAD_CFLAGS=-pthread
394 AC_SUBST(PTHREAD_CFLAGS)
396 dnl Test for the -lpthread library.
398 AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS=-lpthread)
399 AC_SUBST(PTHREAD_LIBS)
401 dnl Test if -lrt is required for sched_yield.
402 AC_SEARCH_LIBS([sched_yield], [rt])
406 GCC_CHECK_UNWIND_GETIPINFO
408 AC_ARG_ENABLE(sjlj-exceptions,
409 AC_HELP_STRING([--enable-sjlj-exceptions],
410 [force use of builtin_setjmp for exceptions]),
411 [case "$enableval" in
413 *) AC_MSG_ERROR([unknown argument to --enable-sjlj-exceptions]) ;;
415 [enable_sjlj_exceptions=auto])
417 AC_CACHE_CHECK([whether to use setjmp/longjmp exceptions],
418 [libgo_cv_lib_sjlj_exceptions],
425 int i __attribute__ ((cleanup (clean)));
430 CFLAGS="--save-temps -fexceptions"
431 libgo_cv_lib_sjlj_exceptions=unknown
432 AS_IF([ac_fn_c_try_compile],
433 [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
434 libgo_cv_lib_sjlj_exceptions=yes
435 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
436 libgo_cv_lib_sjlj_exceptions=no
442 if test "$enable_sjlj_exceptions" = "auto"; then
443 enable_sjlj_exceptions=$libgo_cv_lib_sjlj_exceptions
446 case $enable_sjlj_exceptions in
448 AC_DEFINE(LIBGO_SJLJ_EXCEPTIONS, 1,
449 [Define if the C++ compiler is configured for setjmp/longjmp exceptions.])
454 AC_MSG_ERROR([unable to detect exception model])
458 AC_CHECK_HEADERS(sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h sys/prctl.h)
460 AC_CHECK_HEADERS([linux/filter.h linux/netlink.h linux/rtnetlink.h], [], [],
461 [#ifdef HAVE_SYS_SOCKET_H
462 #include <sys/socket.h>
466 AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes)
468 AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv)
469 AM_CONDITIONAL(HAVE_STRERROR_R, test "$ac_cv_func_strerror_r" = yes)
470 AM_CONDITIONAL(HAVE_WAIT4, test "$ac_cv_func_wait4" = yes)
472 AC_CHECK_FUNCS(epoll_create1 faccessat fchmodat fchownat futimesat inotify_add_watch inotify_init inotify_rm_watch mkdirat mknodat openat renameat splice tee unlinkat unshare)
473 AC_CHECK_TYPES([loff_t])
475 CFLAGS_hold="$CFLAGS"
476 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
478 LIBS="$LIBS $PTHREAD_LIBS"
479 AC_CHECK_FUNCS(sem_timedwait)
480 CFLAGS="$CFLAGS_hold"
484 LIBS="$LIBS $MATH_LIBS"
485 AC_CHECK_FUNCS(matherr)
488 AC_CACHE_CHECK([for __sync_bool_compare_and_swap_4],
489 [libgo_cv_func___sync_bool_compare_and_swap_4],
491 typedef unsigned int uint32 __attribute__ ((mode (SI)));
493 int main() { return __sync_bool_compare_and_swap (&i, 0, 1); }
495 [libgo_cv_func___sync_bool_compare_and_swap_4=yes],
496 [libgo_cv_func___sync_bool_compare_and_swap_4=no])])
497 if test "$libgo_cv_func___sync_bool_compare_and_swap_4" = "yes"; then
498 AC_DEFINE(HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4, 1,
499 [Define to 1 if the compiler provides the __sync_bool_compare_and_swap function for uint32])
502 AC_CACHE_CHECK([for __sync_bool_compare_and_swap_8],
503 [libgo_cv_func___sync_bool_compare_and_swap_8],
505 typedef unsigned int uint64 __attribute__ ((mode (DI)));
507 int main() { return __sync_bool_compare_and_swap (&i, 0, 1); }
509 [libgo_cv_func___sync_bool_compare_and_swap_8=yes],
510 [libgo_cv_func___sync_bool_compare_and_swap_8=no])])
511 if test "$libgo_cv_func___sync_bool_compare_and_swap_8" = "yes"; then
512 AC_DEFINE(HAVE_SYNC_BOOL_COMPARE_AND_SWAP_8, 1,
513 [Define to 1 if the compiler provides the __sync_bool_compare_and_swap function for uint64])
516 AC_CACHE_CHECK([for __sync_fetch_and_add_4],
517 [libgo_cv_func___sync_fetch_and_add_4],
519 typedef unsigned int uint32 __attribute__ ((mode (SI)));
521 int main() { return __sync_fetch_and_add (&i, 1); }
523 [libgo_cv_func___sync_fetch_and_add_4=yes],
524 [libgo_cv_func___sync_fetch_and_add_4=no])])
525 if test "$libgo_cv_func___sync_fetch_and_add_4" = "yes"; then
526 AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD_4, 1,
527 [Define to 1 if the compiler provides the __sync_fetch_and_add function for uint32])
530 AC_CACHE_CHECK([for __sync_add_and_fetch_8],
531 [libgo_cv_func___sync_add_and_fetch_8],
533 typedef unsigned int uint64 __attribute__ ((mode (DI)));
535 int main() { return __sync_add_and_fetch (&i, 1); }
537 [libgo_cv_func___sync_add_and_fetch_8=yes],
538 [libgo_cv_func___sync_add_and_fetch_8=no])])
539 if test "$libgo_cv_func___sync_add_and_fetch_8" = "yes"; then
540 AC_DEFINE(HAVE_SYNC_ADD_AND_FETCH_8, 1,
541 [Define to 1 if the compiler provides the __sync_add_and_fetch function for uint64])
544 dnl For x86 we want to use the -minline-all-stringops option to avoid
545 dnl forcing a stack split when calling memcpy and friends.
546 AC_CACHE_CHECK([whether compiler supports -minline-all-stringops],
547 [libgo_cv_c_stringops],
549 CFLAGS="$CFLAGS -minline-all-stringops"
550 AC_COMPILE_IFELSE([int i;],
551 [libgo_cv_c_stringops=yes],
552 [libgo_cv_c_stringops=no])
553 CFLAGS=$CFLAGS_hold])
555 if test "$libgo_cv_c_stringops" = yes; then
556 STRINGOPS_FLAG=-minline-all-stringops
558 AC_SUBST(STRINGOPS_FLAG)
560 dnl For x86 we want to compile the math library with -mfancy-math-387
561 dnl -funsafe-math-optimizations so that we can use the builtin
562 dnl instructions directly.
563 AC_CACHE_CHECK([whether compiler supports -mfancy-math-387],
564 [libgo_cv_c_fancymath],
566 CFLAGS="$CFLAGS -mfancy-math-387"
567 AC_COMPILE_IFELSE([int i;],
568 [libgo_cv_c_fancymath=yes],
569 [libgo_cv_c_fancymath=no])
570 CFLAGS=$CFLAGS_hold])
572 if test "$libgo_cv_c_fancymath" = yes; then
573 MATH_FLAG="-mfancy-math-387 -funsafe-math-optimizations"
578 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
579 AC_CHECK_TYPES([off64_t])
582 dnl Work out the size of the epoll_events struct on GNU/Linux.
583 AC_CACHE_CHECK([epoll_event size],
584 [libgo_cv_c_epoll_event_size],
585 [AC_COMPUTE_INT(libgo_cv_c_epoll_event_size,
586 [sizeof (struct epoll_event)],
587 [#include <sys/epoll.h>],
588 [libgo_cv_c_epoll_event_size=0])])
589 SIZEOF_STRUCT_EPOLL_EVENT=${libgo_cv_c_epoll_event_size}
590 AC_SUBST(SIZEOF_STRUCT_EPOLL_EVENT)
592 dnl Work out the offset of the fd field in the epoll_events struct on
594 AC_CACHE_CHECK([epoll_event data.fd offset],
595 [libgo_cv_c_epoll_event_fd_offset],
596 [AC_COMPUTE_INT(libgo_cv_c_epoll_event_fd_offset,
597 [offsetof (struct epoll_event, data.fd)],
599 #include <sys/epoll.h>],
600 [libgo_cv_c_epoll_event_fd_offset=0])])
601 STRUCT_EPOLL_EVENT_FD_OFFSET=${libgo_cv_c_epoll_event_fd_offset}
602 AC_SUBST(STRUCT_EPOLL_EVENT_FD_OFFSET)
604 dnl See if struct exception is defined in <math.h>.
605 AC_CHECK_TYPE([struct exception],
606 [libgo_has_struct_exception=yes],
607 [libgo_has_struct_exception=no],
609 if test "$libgo_has_struct_exception" = "yes"; then
610 AC_DEFINE(HAVE_STRUCT_EXCEPTION, 1,
611 [Define to 1 if <math.h> defines struct exception])
614 dnl See whether setcontext changes the value of TLS variables.
615 AC_CACHE_CHECK([whether setcontext clobbers TLS variables],
616 [libgo_cv_lib_setcontext_clobbers_tls],
617 [CFLAGS_hold="$CFLAGS"
618 CFLAGS="$PTHREAD_CFLAGS"
620 LIBS="$LIBS $PTHREAD_LIBS"
621 AC_CHECK_SIZEOF([void *])
622 AS_VAR_ARITH([ptr_type_size], [$ac_cv_sizeof_void_p \* 8])
627 #include <ucontext.h>
632 static char stack[[10 * 1024 * 1024]];
635 /* Called via makecontext/setcontext. */
643 /* Called via pthread_create. */
648 /* The thread should still see this value after calling
654 /* The call to setcontext should not return. */
663 /* The thread should not see this value. */
666 if (getcontext (&c) < 0)
669 c.uc_stack.ss_sp = stack;
670 c.uc_stack.ss_flags = 0;
671 c.uc_stack.ss_size = sizeof stack;
673 makecontext (&c, cfn, 0);
675 if (pthread_create (&tid, NULL, tfn, NULL) != 0)
678 if (pthread_join (tid, NULL) != 0)
681 /* The thread should have called exit. */
685 [libgo_cv_lib_setcontext_clobbers_tls=no],
686 [libgo_cv_lib_setcontext_clobbers_tls=yes],
687 [case "$target:$ptr_type_size" in
688 i?86-*-solaris2.1[[01]]:64 | x86_64*-*-solaris2.1[[01]]:64)
689 libgo_cv_lib_setcontext_clobbers_tls=yes ;;
691 libgo_cv_lib_setcontext_clobbers_tls=no ;;
694 CFLAGS="$CFLAGS_hold"
697 if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then
698 AC_DEFINE(SETCONTEXT_CLOBBERS_TLS, 1,
699 [Define if setcontext clobbers TLS variables])
704 if test ${multilib} = yes; then
705 multilib_arg="--enable-multilib"
710 AC_CONFIG_FILES(Makefile testsuite/Makefile)
712 AC_CONFIG_COMMANDS([default],
713 [if test -n "$CONFIG_FILES"; then
714 # Multilibs need MULTISUBDIR defined correctly in certain makefiles so
715 # that multilib installs will end up installed in the correct place.
716 # The testsuite needs it for multilib-aware ABI baseline files.
717 # To work around this not being passed down from config-ml.in ->
718 # srcdir/Makefile.am -> srcdir/{src,libsupc++,...}/Makefile.am, manually
719 # append it here. Only modify Makefiles that have just been created.
721 # Also, get rid of this simulated-VPATH thing that automake does.
723 s!`test -f '$<' || echo '$(srcdir)/'`!!
725 for i in $SUBDIRS; do
726 case $CONFIG_FILES in
728 #echo "Adding MULTISUBDIR to $i/Makefile"
729 sed -f vpsed $i/Makefile > tmp
730 grep '^MULTISUBDIR =' Makefile >> tmp
739 # Variables needed in config.status (file generation) which aren't already
740 # passed by autoconf.