]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libiberty/configure.ac
[PATCH v3] libiberty: Use posix_spawn in pex-unix when available.
[thirdparty/gcc.git] / libiberty / configure.ac
index b2cfef90489691df97fe58e1c7a0b66c0df37652..2488b031bc845362eb35acdc57f20ccd4da1700b 100644 (file)
@@ -20,44 +20,6 @@ AC_ARG_WITH(cross-host,
 AC_ARG_WITH(newlib,
 [  --with-newlib                    Configuring with newlib])
 
-AC_ARG_WITH(sphinx-build,
-  [AS_HELP_STRING([--with-sphinx-build=],
-                  [Use sphinx-build from a given path])],
-  [CONFIGURE_SPHINX_BUILD=$withval],
-  [CONFIGURE_SPHINX_BUILD=]
-)
-AC_SUBST(CONFIGURE_SPHINX_BUILD)
-
-# See if sphinx-build has been installed and is modern enough
-# that we can use it.
-AC_MSG_CHECKING([for sphinx-build])
-sphinx=sphinx-build
-if test x${CONFIGURE_SPHINX_BUILD} != x ; then
-  sphinx=${CONFIGURE_SPHINX_BUILD}
-fi
-
-tempdir=build.$$
-source=source.$$
-mkdir $source
-grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
-touch $source/index.rst
-if ${sphinx} $source $tempdir >/dev/null 2>&1; then
-  SPHINX_BUILD=${sphinx}
-  HAS_SPHINX_BUILD=has-sphinx-build
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_WARN([
-  *** sphinx-build is missing or too old.
-  *** Info and man pages documentation will not be built.])
-  AC_MSG_RESULT(no)
-  SPHINX_BUILD=
-  HAS_SPHINX_BUILD=
-fi
-rm -rf $tempdir
-rm -rf $source
-AC_SUBST(SPHINX_BUILD)
-AC_SUBST(HAS_SPHINX_BUILD)
-
 if test "${srcdir}" = "."; then
   if test -n "${with_build_subdir}"; then
     libiberty_topdir="${srcdir}/../.."
@@ -152,6 +114,18 @@ dnl to call AC_CHECK_PROG.
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 
+GCC_PLUGIN_OPTION(PLUGIN_OPTION)
+if test -n "$PLUGIN_OPTION"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR_PLUGIN_OPTION="$PLUGIN_OPTION"
+    AC_SUBST(AR_PLUGIN_OPTION)
+  fi
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
+    AC_SUBST(RANLIB_PLUGIN_OPTION)
+  fi
+fi
+
 dnl When switching to automake, replace the following with AM_ENABLE_MULTILIB.
 # Add --enable-multilib to configure.
 # Default to --enable-multilib
@@ -271,8 +245,8 @@ case "${enable_shared}" in
   *) shared=yes ;;
 esac
 
-# ...unless --enable-host-shared was passed from top-level config:
-if [[ "${enable_host_shared}" = "yes" ]]; then
+# ...unless --enable-host-{shared,pie} was passed from top-level config:
+if [[ "${enable_host_shared}" = "yes" ]] || [[ "${enable_host_pie}" = "yes" ]]; then
   shared=yes
 fi
 
@@ -315,7 +289,7 @@ AC_SUBST_FILE(host_makefile_frag)
 # It's OK to check for header files.  Although the compiler may not be
 # able to link anything, it had better be able to at least compile
 # something.
-AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h)
+AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h spawn.h)
 AC_HEADER_SYS_WAIT
 AC_HEADER_TIME
 
@@ -438,7 +412,8 @@ funcs="$funcs setproctitle"
 vars="sys_errlist sys_nerr sys_siglist"
 
 checkfuncs="__fsetlocking canonicalize_file_name dup3 getrlimit getrusage \
- getsysinfo gettimeofday on_exit pipe2 psignal pstat_getdynamic pstat_getstatic \
+ getsysinfo gettimeofday on_exit pipe2 posix_spawn posix_spawnp psignal \
+ pstat_getdynamic pstat_getstatic \
  realpath setrlimit spawnve spawnvpe strerror strsignal sysconf sysctl \
  sysmp table times wait3 wait4"
 
@@ -461,7 +436,8 @@ if test "x" = "y"; then
     index insque \
     memchr memcmp memcpy memmem memmove memset mkstemps \
     on_exit \
-    pipe2 psignal pstat_getdynamic pstat_getstatic putenv \
+    pipe2 posix_spawn posix_spawnp psignal \
+    pstat_getdynamic pstat_getstatic putenv \
     random realpath rename rindex \
     sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
      stpcpy stpncpy strcasecmp strchr strdup \