gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gold / configure.ac
index 7a0b3713aa2389c7a395fc654810d339972e5bb0..c4c93a036cd8d39e7cebba3ffa885f09f79de00f 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
-dnl   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+dnl   Copyright (C) 2006-2020 Free Software Foundation, Inc.
 dnl
 dnl This file is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
@@ -85,21 +85,6 @@ AC_ARG_ENABLE(gold,
 AC_SUBST(install_as_default)
 AC_SUBST(installed_linker)
 
-dnl For now threads are a configure time option.
-AC_ARG_ENABLE([threads],
-[  --enable-threads        multi-threaded linking],
-[case "${enableval}" in
-  yes | "") threads=yes ;;
-  no) threads=no ;;
-  *) threads=yes ;;
- esac],
-[threads=no])
-if test "$threads" = "yes"; then
-  AC_DEFINE(ENABLE_THREADS, 1,
-           [Define to do multi-threaded linking])
-fi
-AM_CONDITIONAL(THREADS, test "$threads" = "yes")
-
 AC_PLUGINS
 if test "$plugins" = "yes"; then
   AC_DEFINE(ENABLE_PLUGINS, 1,
@@ -544,7 +529,7 @@ LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
 AC_SUBST(LFS_CFLAGS)
 
 AC_CHECK_HEADERS(sys/mman.h)
-AC_CHECK_FUNCS(chsize mmap)
+AC_CHECK_FUNCS(chsize mmap link)
 AC_REPLACE_FUNCS(pread ftruncate ffsll)
 
 AC_CACHE_CHECK([mremap with MREMAP_MAYMOVE], [gold_cv_lib_mremap_maymove],
@@ -563,6 +548,28 @@ fi
 # Link in zlib if we can.  This allows us to write compressed sections.
 AM_ZLIB
 
+AC_ARG_ENABLE([threads],
+[[  --enable-threads[=ARG]  multi-threaded linking [ARG={auto,yes,no}]]],
+[case "${enableval}" in
+  yes | "") threads=yes ;;
+  no) threads=no ;;
+  auto) threads=auto ;;
+  *) threads=yes ;;
+ esac],
+[threads=auto])
+
+if test "$threads" = "yes"; then
+  AX_PTHREAD([threads=yes], AC_MSG_ERROR([pthread not found]))
+elif test "$threads" = "auto"; then
+  AX_PTHREAD([threads=yes], [threads=no])
+fi
+
+if test "$threads" = "yes"; then
+  AC_DEFINE(ENABLE_THREADS, 1,
+           [Define to do multi-threaded linking])
+fi
+AM_CONDITIONAL(THREADS, test "$threads" = "yes")
+
 dnl We have to check these in C, not C++, because autoconf generates
 dnl tests which have no type information, and current glibc provides
 dnl multiple declarations of functions like basename when compiling
@@ -606,7 +613,7 @@ case "$ac_cv_search_dlopen" in
 esac
 AC_SUBST(DLOPEN_LIBS)
 
-AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times)
+AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times mkdtemp)
 AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp, strndup, memmem])
 
 # Use of ::std::tr1::unordered_map::rehash causes undefined symbols
This page took 0.029051 seconds and 4 git commands to generate.