compiler: remove stack_allocation_expression
[gcc.git] / gotools / configure.ac
index 24f4498d27900bfcff38533ee5ded95e7b2e207d..5b0920448e30921f67580c924ae6091f789ea39c 100644 (file)
@@ -1,5 +1,5 @@
 # Configure script for gotools.
-#   Copyright 2015 Free Software Foundation, Inc.
+#   Copyright (C) 2015-2016 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -46,7 +46,12 @@ AC_PROG_INSTALL
 AC_PROG_CC
 AC_PROG_GO
 
-AM_CONDITIONAL(NATIVE, test "$cross_compiling" = no)
+# These should be defined by the top-level configure.
+# Copy them into Makefile.
+AC_SUBST(GOC_FOR_TARGET)
+AC_SUBST(GCC_FOR_TARGET)
+
+AM_CONDITIONAL(NATIVE, test "$host_alias" = "$target_alias")
 
 dnl Test for -lsocket and -lnsl.  Copied from libjava/configure.ac.
 AC_CACHE_CHECK([for socket libraries], gotools_cv_lib_sockets,
@@ -79,6 +84,10 @@ AC_CACHE_CHECK([for socket libraries], gotools_cv_lib_sockets,
 NET_LIBS="$gotools_cv_lib_sockets"
 AC_SUBST(NET_LIBS)
 
+dnl Test if -lrt is required for sched_yield and/or nanosleep.
+AC_SEARCH_LIBS([sched_yield], [rt])
+AC_SEARCH_LIBS([nanosleep], [rt])
+
 AC_CONFIG_FILES(Makefile)
 
 AC_OUTPUT