198b9484cSchristosdnl Process this file with autoconf to produce a configure script 298b9484cSchristos 398b9484cSchristosAC_INIT 498b9484cSchristosAC_CONFIG_SRCDIR([xmalloc.c]) 54b169a6bSchristosAC_CONFIG_MACRO_DIRS([../config]) 698b9484cSchristos 798b9484cSchristos# This works around the fact that libtool configuration may change LD 898b9484cSchristos# for this particular configuration, but some shells, instead of 998b9484cSchristos# keeping the changes in LD private, export them just because LD is 1098b9484cSchristos# exported. We don't use libtool yet, but some day we might, so... 1198b9484cSchristosORIGINAL_LD_FOR_MULTILIBS=$LD 1298b9484cSchristos 1398b9484cSchristosdnl We use these options to decide which functions to include. 1498b9484cSchristosAC_ARG_WITH(target-subdir, 1598b9484cSchristos[ --with-target-subdir=SUBDIR Configuring in a subdirectory for target]) 1698b9484cSchristosAC_ARG_WITH(build-subdir, 1798b9484cSchristos[ --with-build-subdir=SUBDIR Configuring in a subdirectory for build]) 1898b9484cSchristosAC_ARG_WITH(cross-host, 1998b9484cSchristos[ --with-cross-host=HOST Configuring with a cross compiler]) 2098b9484cSchristosAC_ARG_WITH(newlib, 2198b9484cSchristos[ --with-newlib Configuring with newlib]) 2298b9484cSchristos 2398b9484cSchristosif test "${srcdir}" = "."; then 2498b9484cSchristos if test -n "${with_build_subdir}"; then 2598b9484cSchristos libiberty_topdir="${srcdir}/../.." 2698b9484cSchristos with_target_subdir= 2798b9484cSchristos elif test -z "${with_target_subdir}"; then 2898b9484cSchristos libiberty_topdir="${srcdir}/.." 2998b9484cSchristos else 3098b9484cSchristos if test "${with_target_subdir}" != "."; then 3198b9484cSchristos libiberty_topdir="${srcdir}/${with_multisrctop}../.." 3298b9484cSchristos else 3398b9484cSchristos libiberty_topdir="${srcdir}/${with_multisrctop}.." 3498b9484cSchristos fi 3598b9484cSchristos fi 3698b9484cSchristoselse 3798b9484cSchristos libiberty_topdir="${srcdir}/.." 3898b9484cSchristosfi 3998b9484cSchristosAC_SUBST(libiberty_topdir) 4098b9484cSchristosAC_CONFIG_AUX_DIR($libiberty_topdir) 4198b9484cSchristos 4298b9484cSchristosdnl Very limited version of automake's enable-maintainer-mode 4398b9484cSchristos 4498b9484cSchristosAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 4598b9484cSchristos dnl maintainer-mode is disabled by default 4698b9484cSchristos AC_ARG_ENABLE(maintainer-mode, 4798b9484cSchristos[ --enable-maintainer-mode 4898b9484cSchristos enable make rules and dependencies not useful 4998b9484cSchristos (and sometimes confusing) to the casual installer], 5098b9484cSchristos maintainer_mode=$enableval, 5198b9484cSchristos maintainer_mode=no) 5298b9484cSchristos 5398b9484cSchristosAC_MSG_RESULT($maintainer_mode) 5498b9484cSchristos 5598b9484cSchristosif test "$maintainer_mode" = "yes"; then 5698b9484cSchristos MAINT='' 5798b9484cSchristos NOTMAINT='#' 5898b9484cSchristoselse 5998b9484cSchristos MAINT='#' 6098b9484cSchristos NOTMAINT='' 6198b9484cSchristosfi 6298b9484cSchristosAC_SUBST(MAINT)dnl 6398b9484cSchristosAC_SUBST(NOTMAINT)dnl 6498b9484cSchristos 654b169a6bSchristosif test -z "$ETAGS"; then 664b169a6bSchristos ETAGS=etags 674b169a6bSchristosfi 684b169a6bSchristosAC_SUBST([ETAGS]) 694b169a6bSchristos 7098b9484cSchristos# Do we have a single-tree copy of texinfo? Even if we do, we can't 7198b9484cSchristos# rely on it - libiberty is built before texinfo. 7298b9484cSchristosAC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, ) 7398b9484cSchristosif test "x$MAKEINFO" = "x"; then 7498b9484cSchristos MAKEINFO="@echo makeinfo missing; true" 7598b9484cSchristos BUILD_INFO= 7698b9484cSchristoselse 7798b9484cSchristos BUILD_INFO=info 7898b9484cSchristos case "$MAKEINFO" in 7998b9484cSchristos */missing\ makeinfo*) 8098b9484cSchristos BUILD_INFO= 8198b9484cSchristos AC_MSG_WARN([ 8298b9484cSchristos*** Makeinfo is missing. Info documentation will not be built.]) 8398b9484cSchristos ;; 8498b9484cSchristos *) 8598b9484cSchristos case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in 8698b9484cSchristos x*\ [[1-3]].* ) 8798b9484cSchristos MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true" 8898b9484cSchristos BUILD_INFO= 8998b9484cSchristos AC_MSG_WARN([ 9098b9484cSchristos*** Makeinfo is too old. Info documentation will not be built.]) 9198b9484cSchristos ;; 9298b9484cSchristos esac 9398b9484cSchristos ;; 9498b9484cSchristos esac 9598b9484cSchristosfi 9698b9484cSchristosAC_SUBST(MAKEINFO) 9798b9484cSchristosAC_SUBST(BUILD_INFO) 9898b9484cSchristos 9998b9484cSchristosAC_CHECK_PROG(PERL, perl, perl, ) 10098b9484cSchristosif test x"$PERL" = x""; then 10198b9484cSchristos HAVE_PERL='#' 10298b9484cSchristoselse 10398b9484cSchristos HAVE_PERL='' 10498b9484cSchristosfi 10598b9484cSchristosAC_SUBST(HAVE_PERL) 10698b9484cSchristos 10798b9484cSchristosAC_CANONICAL_HOST 10898b9484cSchristos 10998b9484cSchristosdnl When we start using automake: 11098b9484cSchristosdnl AM_INIT_AUTOMAKE(libiberty, 1.0) 11198b9484cSchristos 11298b9484cSchristosdnl These must be called before AM_PROG_LIBTOOL, because it may want 11398b9484cSchristosdnl to call AC_CHECK_PROG. 11498b9484cSchristosAC_CHECK_TOOL(AR, ar) 11598b9484cSchristosAC_CHECK_TOOL(RANLIB, ranlib, :) 11698b9484cSchristos 1174b169a6bSchristosGCC_PLUGIN_OPTION(PLUGIN_OPTION) 1184b169a6bSchristosif test -n "$PLUGIN_OPTION"; then 1194b169a6bSchristos if $AR --help 2>&1 | grep -q "\--plugin"; then 1204b169a6bSchristos AR_PLUGIN_OPTION="$PLUGIN_OPTION" 1214b169a6bSchristos AC_SUBST(AR_PLUGIN_OPTION) 1224b169a6bSchristos fi 1234b169a6bSchristos if $RANLIB --help 2>&1 | grep -q "\--plugin"; then 1244b169a6bSchristos RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" 1254b169a6bSchristos AC_SUBST(RANLIB_PLUGIN_OPTION) 1264b169a6bSchristos fi 1274b169a6bSchristosfi 1284b169a6bSchristos 12998b9484cSchristosdnl When switching to automake, replace the following with AM_ENABLE_MULTILIB. 13098b9484cSchristos# Add --enable-multilib to configure. 13198b9484cSchristos# Default to --enable-multilib 13298b9484cSchristosAC_ARG_ENABLE(multilib, 13398b9484cSchristos[ --enable-multilib build many library versions (default)], 13498b9484cSchristos[case "$enableval" in 13598b9484cSchristos yes) multilib=yes ;; 13698b9484cSchristos no) multilib=no ;; 13798b9484cSchristos *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;; 13898b9484cSchristos esac], 13998b9484cSchristos [multilib=yes]) 14098b9484cSchristos 14198b9484cSchristos# Even if the default multilib is not a cross compilation, 14298b9484cSchristos# it may be that some of the other multilibs are. 14398b9484cSchristosif test $cross_compiling = no && test $multilib = yes \ 14498b9484cSchristos && test "x${with_multisubdir}" != x ; then 14598b9484cSchristos cross_compiling=maybe 14698b9484cSchristosfi 14798b9484cSchristos 14803467a24Schristos# We may wish to install the target headers somewhere. 14903467a24SchristosAC_MSG_CHECKING([whether to install libiberty headers and static library]) 15003467a24Schristosdnl install-libiberty is disabled by default 15103467a24Schristos 15203467a24SchristosAC_ARG_ENABLE(install-libiberty, 15303467a24Schristos[ --enable-install-libiberty Install headers and library for end users], 15403467a24Schristosenable_install_libiberty=$enableval, 15503467a24Schristosenable_install_libiberty=no)dnl 15603467a24Schristos 15703467a24Schristos# Option parsed, now set things appropriately. 15803467a24Schristoscase x"$enable_install_libiberty" in 15903467a24Schristos xyes|x) 16003467a24Schristos target_header_dir=libiberty 16103467a24Schristos ;; 16203467a24Schristos xno) 16303467a24Schristos target_header_dir= 16403467a24Schristos ;; 16503467a24Schristos *) 16603467a24Schristos # This could be sanity-checked in various ways... 16703467a24Schristos target_header_dir="${enable_install_libiberty}" 16803467a24Schristos ;; 16903467a24Schristosesac 17003467a24SchristosAC_MSG_RESULT($enable_install_libiberty) 17103467a24SchristosAC_MSG_NOTICE([target_header_dir = $target_header_dir]) 17203467a24Schristos 17398b9484cSchristosGCC_NO_EXECUTABLES 17498b9484cSchristosAC_PROG_CC 175212397c6SchristosAC_GNU_SOURCE 17698b9484cSchristosAC_SYS_LARGEFILE 17798b9484cSchristosAC_PROG_CPP_WERROR 17898b9484cSchristos 17998b9484cSchristosACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wc++-compat \ 180796c32c9Schristos -Wstrict-prototypes \ 181796c32c9Schristos -Wshadow=local], [ac_libiberty_warn_cflags]) 18298b9484cSchristosACX_PROG_CC_WARNING_ALMOST_PEDANTIC([], [ac_libiberty_warn_cflags]) 18398b9484cSchristos 18498b9484cSchristosAC_PROG_CC_C_O 18598b9484cSchristos# autoconf is lame and doesn't give us any substitution variable for this. 18698b9484cSchristosif eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then 18798b9484cSchristos NO_MINUS_C_MINUS_O=yes 18898b9484cSchristoselse 18998b9484cSchristos OUTPUT_OPTION='-o $@' 19098b9484cSchristosfi 19198b9484cSchristosAC_SUBST(NO_MINUS_C_MINUS_O) 19298b9484cSchristosAC_SUBST(OUTPUT_OPTION) 19398b9484cSchristos 19498b9484cSchristosAC_C_CONST 19598b9484cSchristosAC_C_INLINE 19698b9484cSchristosAC_C_BIGENDIAN 19798b9484cSchristos 19898b9484cSchristosdnl When we start using libtool: 19998b9484cSchristosdnl Default to a non shared library. This may be overridden by the 20098b9484cSchristosdnl configure option --enable-shared. 20198b9484cSchristosdnl AM_DISABLE_SHARED 20298b9484cSchristos 20398b9484cSchristosdnl When we start using libtool: 20498b9484cSchristosdnl AM_PROG_LIBTOOL 20598b9484cSchristos 20698b9484cSchristosdnl When we start using automake: 20798b9484cSchristosdnl AM_CONFIG_HEADER(config.h:config.in) 20898b9484cSchristosAC_CONFIG_HEADER(config.h:config.in) 20998b9484cSchristos 21098b9484cSchristosdnl When we start using automake: 21198b9484cSchristosdnl AM_MAINTAINER_MODE 21298b9484cSchristosdnl AC_EXEEXT 21398b9484cSchristos 21498b9484cSchristosdnl When we start using automake: 21598b9484cSchristosdnl AM_PROG_INSTALL 21698b9484cSchristosAC_PROG_INSTALL 21798b9484cSchristos 21898b9484cSchristos# Don't build the shared library for build. 21998b9484cSchristosif [[ -n "${with_build_subdir}" ]]; then 22098b9484cSchristos enable_shared=no 22198b9484cSchristosfi 22298b9484cSchristos 22398b9484cSchristosfrag= 22498b9484cSchristoscase "${host}" in 22598b9484cSchristos rs6000-ibm-aix3.1 | rs6000-ibm-aix) 22698b9484cSchristos frag=mh-aix ;; 22798b9484cSchristos *-*-cxux7*) frag=mh-cxux7 ;; 22898b9484cSchristos *-*-freebsd2.1.*) frag=mh-fbsd21 ;; 22998b9484cSchristos *-*-freebsd2.2.[[012]]) frag=mh-fbsd21 ;; 23098b9484cSchristos i370-*-opened*) frag=mh-openedition ;; 23198b9484cSchristos i[[34567]]86-*-windows*) frag=mh-windows ;; 23298b9484cSchristosesac 23398b9484cSchristos 23498b9484cSchristosif [[ -n "${frag}" ]]; then 23598b9484cSchristos frag=${libiberty_topdir}/libiberty/config/$frag 23698b9484cSchristosfi 23798b9484cSchristos 238a2e2270fSchristosGCC_PICFLAG 239a2e2270fSchristos 24098b9484cSchristos# If they didn't specify --enable-shared, don't generate shared libs. 24198b9484cSchristoscase "${enable_shared}" in 24298b9484cSchristos yes) shared=yes ;; 24398b9484cSchristos no) shared=no ;; 24498b9484cSchristos "") shared=no ;; 24598b9484cSchristos *) shared=yes ;; 24698b9484cSchristosesac 24703467a24Schristos 248*7e120ff0Schristos# ...unless --enable-host-{shared,pie} was passed from top-level config: 249*7e120ff0Schristosif [[ "${enable_host_shared}" = "yes" ]] || [[ "${enable_host_pie}" = "yes" ]]; then 25003467a24Schristos shared=yes 25103467a24Schristosfi 25203467a24Schristos 253a2e2270fSchristosif [[ "${shared}" != "yes" ]]; then 254a2e2270fSchristos PICFLAG= 25598b9484cSchristosfi 25698b9484cSchristosAC_SUBST(PICFLAG) 25798b9484cSchristos 258837edd6bSchristosNOASANFLAG= 259837edd6bSchristoscase " ${CFLAGS} " in 260837edd6bSchristos *\ -fsanitize=address\ *) NOASANFLAG=-fno-sanitize=address ;; 2614b169a6bSchristos *\ -fsanitize=hwaddress\ *) NOASANFLAG=-fno-sanitize=hwaddress ;; 262837edd6bSchristosesac 263837edd6bSchristosAC_SUBST(NOASANFLAG) 264837edd6bSchristos 2658dffb485SchristosGCC_CET_HOST_FLAGS(CET_HOST_FLAGS) 2668dffb485SchristosAC_SUBST(CET_HOST_FLAGS) 2678dffb485Schristos 268*7e120ff0SchristosGCC_CHECK_ASSEMBLER_HWCAP 269*7e120ff0Schristos 27098b9484cSchristosecho "# Warning: this fragment is automatically generated" > temp-frag 27198b9484cSchristos 27298b9484cSchristosif [[ -n "${frag}" ]] && [[ -f "${frag}" ]]; then 27398b9484cSchristos echo "Appending ${frag} to xhost-mkfrag" 27498b9484cSchristos echo "# Following fragment copied from ${frag}" >> temp-frag 27598b9484cSchristos cat ${frag} >> temp-frag 27698b9484cSchristosfi 27798b9484cSchristos 27898b9484cSchristos# record if we want to build shared libs. 27998b9484cSchristosif [[ "${shared}" = "yes" ]]; then 28098b9484cSchristos echo enable_shared = yes >> temp-frag 28198b9484cSchristoselse 28298b9484cSchristos echo enable_shared = no >> temp-frag 28398b9484cSchristosfi 28498b9484cSchristos 28598b9484cSchristosfrag=xhost-mkfrag 28698b9484cSchristos${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag 28798b9484cSchristos 28898b9484cSchristoshost_makefile_frag=${frag} 28998b9484cSchristosAC_SUBST_FILE(host_makefile_frag) 29098b9484cSchristos 29198b9484cSchristos# It's OK to check for header files. Although the compiler may not be 29298b9484cSchristos# able to link anything, it had better be able to at least compile 29398b9484cSchristos# something. 294*7e120ff0SchristosAC_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) 29598b9484cSchristosAC_HEADER_SYS_WAIT 29698b9484cSchristosAC_HEADER_TIME 29798b9484cSchristos 29898b9484cSchristoslibiberty_AC_DECLARE_ERRNO 29998b9484cSchristos 300837edd6bSchristos# Determine sizes of some types. 30198b9484cSchristosAC_CHECK_SIZEOF([int]) 302837edd6bSchristosAC_CHECK_SIZEOF([long]) 303ba340e45SchristosAC_CHECK_SIZEOF([size_t]) 304837edd6bSchristos 305837edd6bSchristos# Check for presense of long long 306837edd6bSchristosAC_CHECK_TYPE([long long], 307837edd6bSchristos [AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have the `long long' type.]) AC_CHECK_SIZEOF([long long])], 308837edd6bSchristos []) 30998b9484cSchristos 31098b9484cSchristos# Look for a 64-bit type. 31198b9484cSchristosAC_MSG_CHECKING([for a 64-bit type]) 31298b9484cSchristosAC_CACHE_VAL(liberty_cv_uint64, 31398b9484cSchristos[AC_TRY_COMPILE( 31498b9484cSchristos[#ifdef HAVE_STDINT_H 31598b9484cSchristos#include <stdint.h> 31698b9484cSchristos#endif], 31798b9484cSchristos[extern uint64_t foo;], 31898b9484cSchristosliberty_cv_uint64=uint64_t, 31998b9484cSchristos[AC_TRY_COMPILE( 32098b9484cSchristos[#ifdef HAVE_LIMITS_H 32198b9484cSchristos#include <limits.h> 32298b9484cSchristos#endif 32398b9484cSchristos#ifndef CHAR_BIT 32498b9484cSchristos#define CHAR_BIT 8 32598b9484cSchristos#endif], 32698b9484cSchristos[extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];], 32798b9484cSchristosliberty_cv_uint64="unsigned long", 32898b9484cSchristos[AC_TRY_COMPILE( 32998b9484cSchristos[#ifdef HAVE_LIMITS_H 33098b9484cSchristos#include <limits.h> 33198b9484cSchristos#endif 33298b9484cSchristos#ifndef CHAR_BIT 33398b9484cSchristos#define CHAR_BIT 8 33498b9484cSchristos#endif], 33598b9484cSchristos[extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];], 33698b9484cSchristosliberty_cv_uint64="unsigned long long", liberty_cv_uint64=none)])])]) 33798b9484cSchristosAC_MSG_RESULT($liberty_cv_uint64) 33898b9484cSchristosif test "$liberty_cv_uint64" != none; then 33998b9484cSchristos AC_DEFINE_UNQUOTED(UNSIGNED_64BIT_TYPE, $liberty_cv_uint64, 34098b9484cSchristos [Define to an unsigned 64-bit type available in the compiler.]) 34198b9484cSchristosfi 34298b9484cSchristos 34398b9484cSchristosAC_TYPE_INTPTR_T 34498b9484cSchristosAC_TYPE_UINTPTR_T 34598b9484cSchristosAC_TYPE_SSIZE_T 34698b9484cSchristos 34798b9484cSchristos# Given the above check, we always have uintptr_t or a fallback 34898b9484cSchristos# definition. So define HAVE_UINTPTR_T in case any imported code 34998b9484cSchristos# relies on it. 35098b9484cSchristosAC_DEFINE(HAVE_UINTPTR_T, 1, [Define if you have the \`uintptr_t' type.]) 35198b9484cSchristos 35298b9484cSchristosAC_TYPE_PID_T 35398b9484cSchristos 35498b9484cSchristos# This is the list of functions which libiberty will provide if they 35598b9484cSchristos# are not available on the host. 35698b9484cSchristos 35798b9484cSchristosfuncs="asprintf" 35898b9484cSchristosfuncs="$funcs atexit" 35998b9484cSchristosfuncs="$funcs basename" 36098b9484cSchristosfuncs="$funcs bcmp" 36198b9484cSchristosfuncs="$funcs bcopy" 36298b9484cSchristosfuncs="$funcs bsearch" 36398b9484cSchristosfuncs="$funcs bzero" 36498b9484cSchristosfuncs="$funcs calloc" 36598b9484cSchristosfuncs="$funcs clock" 36698b9484cSchristosfuncs="$funcs ffs" 36798b9484cSchristosfuncs="$funcs getcwd" 36898b9484cSchristosfuncs="$funcs getpagesize" 36998b9484cSchristosfuncs="$funcs gettimeofday" 37098b9484cSchristosfuncs="$funcs index" 37198b9484cSchristosfuncs="$funcs insque" 37298b9484cSchristosfuncs="$funcs memchr" 37398b9484cSchristosfuncs="$funcs memcmp" 37498b9484cSchristosfuncs="$funcs memcpy" 37598b9484cSchristosfuncs="$funcs memmem" 37698b9484cSchristosfuncs="$funcs memmove" 37798b9484cSchristosfuncs="$funcs mempcpy" 37898b9484cSchristosfuncs="$funcs memset" 37998b9484cSchristosfuncs="$funcs mkstemps" 38098b9484cSchristosfuncs="$funcs putenv" 38198b9484cSchristosfuncs="$funcs random" 38298b9484cSchristosfuncs="$funcs rename" 38398b9484cSchristosfuncs="$funcs rindex" 38498b9484cSchristosfuncs="$funcs setenv" 38598b9484cSchristosfuncs="$funcs snprintf" 38698b9484cSchristosfuncs="$funcs sigsetmask" 38798b9484cSchristosfuncs="$funcs stpcpy" 38898b9484cSchristosfuncs="$funcs stpncpy" 38998b9484cSchristosfuncs="$funcs strcasecmp" 39098b9484cSchristosfuncs="$funcs strchr" 39198b9484cSchristosfuncs="$funcs strdup" 39298b9484cSchristosfuncs="$funcs strncasecmp" 39398b9484cSchristosfuncs="$funcs strndup" 394a2e2270fSchristosfuncs="$funcs strnlen" 39598b9484cSchristosfuncs="$funcs strrchr" 39698b9484cSchristosfuncs="$funcs strstr" 39798b9484cSchristosfuncs="$funcs strtod" 39898b9484cSchristosfuncs="$funcs strtol" 39998b9484cSchristosfuncs="$funcs strtoul" 400837edd6bSchristosfuncs="$funcs strtoll" 401837edd6bSchristosfuncs="$funcs strtoull" 40298b9484cSchristosfuncs="$funcs strverscmp" 40398b9484cSchristosfuncs="$funcs tmpnam" 40498b9484cSchristosfuncs="$funcs vasprintf" 40598b9484cSchristosfuncs="$funcs vfprintf" 40698b9484cSchristosfuncs="$funcs vprintf" 40798b9484cSchristosfuncs="$funcs vsnprintf" 40898b9484cSchristosfuncs="$funcs vsprintf" 40998b9484cSchristosfuncs="$funcs waitpid" 41098b9484cSchristosfuncs="$funcs setproctitle" 41198b9484cSchristos 41298b9484cSchristos# Also in the old function.def file: alloca, vfork, getopt. 41398b9484cSchristos 41498b9484cSchristosvars="sys_errlist sys_nerr sys_siglist" 41598b9484cSchristos 416a2e2270fSchristoscheckfuncs="__fsetlocking canonicalize_file_name dup3 getrlimit getrusage \ 417*7e120ff0Schristos getsysinfo gettimeofday on_exit pipe2 posix_spawn posix_spawnp psignal \ 418*7e120ff0Schristos pstat_getdynamic pstat_getstatic \ 4194b169a6bSchristos realpath setrlimit spawnve spawnvpe strerror strsignal sysconf sysctl \ 420a2e2270fSchristos sysmp table times wait3 wait4" 42198b9484cSchristos 4224b169a6bSchristos# Darwin has sbrk, but it is deprecated and that produces build-time warnings 4234b169a6bSchristos# so do not check for it. 4244b169a6bSchristoscase "${host}" in 4254b169a6bSchristos *-*-darwin*) ;; 4264b169a6bSchristos *) checkfuncs="$checkfuncs sbrk" 4274b169a6bSchristosesac 4284b169a6bSchristos 42998b9484cSchristos# These are neither executed nor required, but they help keep 43098b9484cSchristos# autoheader happy without adding a bunch of text to acconfig.h. 43198b9484cSchristosif test "x" = "y"; then 43298b9484cSchristos AC_CHECK_FUNCS(asprintf atexit \ 43398b9484cSchristos basename bcmp bcopy bsearch bzero \ 43498b9484cSchristos calloc canonicalize_file_name clock \ 43598b9484cSchristos dup3 \ 43698b9484cSchristos ffs __fsetlocking \ 437a2e2270fSchristos getcwd getpagesize getrlimit getrusage getsysinfo gettimeofday \ 43898b9484cSchristos index insque \ 43998b9484cSchristos memchr memcmp memcpy memmem memmove memset mkstemps \ 44098b9484cSchristos on_exit \ 441*7e120ff0Schristos pipe2 posix_spawn posix_spawnp psignal \ 442*7e120ff0Schristos pstat_getdynamic pstat_getstatic putenv \ 44398b9484cSchristos random realpath rename rindex \ 444a2e2270fSchristos sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \ 44598b9484cSchristos stpcpy stpncpy strcasecmp strchr strdup \ 446a2e2270fSchristos strerror strncasecmp strndup strnlen strrchr strsignal strstr strtod \ 447837edd6bSchristos strtol strtoul strtoll strtoull strverscmp sysconf sysctl sysmp \ 44898b9484cSchristos table times tmpnam \ 44998b9484cSchristos vasprintf vfprintf vprintf vsprintf \ 45098b9484cSchristos wait3 wait4 waitpid) 451796c32c9Schristos AC_CHECK_DECLS([basename(char *), ffs, asprintf, vasprintf, snprintf, vsnprintf, strtol, strtoul, strtoll, strtoull, strnlen]) 45298b9484cSchristos AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.]) 45398b9484cSchristos AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.]) 45498b9484cSchristos AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.]) 45598b9484cSchristosfi 45698b9484cSchristos 45798b9484cSchristos# For each of these functions, if the host does not provide the 45898b9484cSchristos# function we want to put FN.o in LIBOBJS, and if the host does 45998b9484cSchristos# provide the function, we want to define HAVE_FN in config.h. 46098b9484cSchristos 46198b9484cSchristossetobjs= 46298b9484cSchristosCHECK= 46398b9484cSchristosif test -n "${with_target_subdir}"; then 46498b9484cSchristos 46598b9484cSchristos # We are being configured as a target library. AC_REPLACE_FUNCS 46698b9484cSchristos # may not work correctly, because the compiler may not be able to 46798b9484cSchristos # link executables. Note that we may still be being configured 46898b9484cSchristos # native. 46998b9484cSchristos 47098b9484cSchristos # If we are being configured for newlib, we know which functions 47198b9484cSchristos # newlib provide and which ones we will be expected to provide. 47298b9484cSchristos 47398b9484cSchristos if test "x${with_newlib}" = "xyes"; then 47498b9484cSchristos AC_LIBOBJ([asprintf]) 47598b9484cSchristos AC_LIBOBJ([basename]) 47698b9484cSchristos AC_LIBOBJ([insque]) 47798b9484cSchristos AC_LIBOBJ([random]) 47898b9484cSchristos AC_LIBOBJ([strdup]) 47998b9484cSchristos AC_LIBOBJ([vasprintf]) 48098b9484cSchristos 48198b9484cSchristos for f in $funcs; do 48298b9484cSchristos case "$f" in 48398b9484cSchristos asprintf | basename | insque | random | strdup | vasprintf) 48498b9484cSchristos ;; 48598b9484cSchristos *) 48698b9484cSchristos n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 48798b9484cSchristos AC_DEFINE_UNQUOTED($n) 48898b9484cSchristos ;; 48998b9484cSchristos esac 49098b9484cSchristos done 49198b9484cSchristos 49298b9484cSchristos # newlib doesnt provide any of the variables in $vars, so we 49398b9484cSchristos # dont have to check them here. 49498b9484cSchristos 49598b9484cSchristos # Of the functions in $checkfuncs, newlib only has strerror. 49698b9484cSchristos AC_DEFINE(HAVE_STRERROR) 49798b9484cSchristos 49898b9484cSchristos setobjs=yes 49998b9484cSchristos 50098b9484cSchristos fi 50198b9484cSchristos 50298b9484cSchristos # If we are being configured for Mingw, we know which functions 50398b9484cSchristos # Mingw provides and which ones we will be expected to provide. 50498b9484cSchristos 50598b9484cSchristos case "${host}" in 50698b9484cSchristos *-*-mingw*) 50798b9484cSchristos AC_LIBOBJ([asprintf]) 50898b9484cSchristos AC_LIBOBJ([basename]) 50998b9484cSchristos AC_LIBOBJ([bcmp]) 51098b9484cSchristos AC_LIBOBJ([bcopy]) 51198b9484cSchristos AC_LIBOBJ([bzero]) 51298b9484cSchristos AC_LIBOBJ([clock]) 51398b9484cSchristos AC_LIBOBJ([ffs]) 51498b9484cSchristos AC_LIBOBJ([getpagesize]) 51598b9484cSchristos AC_LIBOBJ([index]) 51698b9484cSchristos AC_LIBOBJ([insque]) 51798b9484cSchristos AC_LIBOBJ([mempcpy]) 51898b9484cSchristos AC_LIBOBJ([mkstemps]) 51998b9484cSchristos AC_LIBOBJ([random]) 52098b9484cSchristos AC_LIBOBJ([rindex]) 52198b9484cSchristos AC_LIBOBJ([sigsetmask]) 52298b9484cSchristos AC_LIBOBJ([stpcpy]) 52398b9484cSchristos AC_LIBOBJ([stpncpy]) 52498b9484cSchristos AC_LIBOBJ([strndup]) 525a2e2270fSchristos AC_LIBOBJ([strnlen]) 52698b9484cSchristos AC_LIBOBJ([strverscmp]) 52798b9484cSchristos AC_LIBOBJ([vasprintf]) 52898b9484cSchristos AC_LIBOBJ([waitpid]) 52998b9484cSchristos 53098b9484cSchristos for f in $funcs; do 53198b9484cSchristos case "$f" in 532a2e2270fSchristos asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strnlen | strverscmp | vasprintf | waitpid) 53398b9484cSchristos ;; 53498b9484cSchristos *) 53598b9484cSchristos n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 53698b9484cSchristos AC_DEFINE_UNQUOTED($n) 53798b9484cSchristos ;; 53898b9484cSchristos esac 53998b9484cSchristos done 54098b9484cSchristos 54198b9484cSchristos # Mingw doesnt provide any of the variables in $vars, so we 54298b9484cSchristos # dont have to check them here. 54398b9484cSchristos 54498b9484cSchristos # Of the functions in $checkfuncs, Mingw only has strerror. 54598b9484cSchristos AC_DEFINE(HAVE_STRERROR) 54698b9484cSchristos 54798b9484cSchristos setobjs=yes 54898b9484cSchristos ;; 54998b9484cSchristos 55098b9484cSchristos *-*-msdosdjgpp) 55198b9484cSchristos AC_LIBOBJ([vasprintf]) 55298b9484cSchristos AC_LIBOBJ([vsnprintf]) 55398b9484cSchristos AC_LIBOBJ([snprintf]) 55498b9484cSchristos AC_LIBOBJ([asprintf]) 55598b9484cSchristos 55698b9484cSchristos for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \ 55798b9484cSchristos getcwd getpagesize getrusage gettimeofday \ 55898b9484cSchristos index insque memchr memcmp memcpy memmove memset psignal \ 55998b9484cSchristos putenv random rename rindex sbrk setenv stpcpy strcasecmp \ 56098b9484cSchristos strchr strdup strerror strncasecmp strrchr strstr strtod \ 56198b9484cSchristos strtol strtoul sysconf times tmpnam vfprintf vprintf \ 56298b9484cSchristos vsprintf waitpid 56398b9484cSchristos do 56498b9484cSchristos n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 56598b9484cSchristos AC_DEFINE_UNQUOTED($n) 56698b9484cSchristos done 56798b9484cSchristos 56898b9484cSchristos 56998b9484cSchristos setobjs=yes 57098b9484cSchristos ;; 57198b9484cSchristos 57298b9484cSchristos esac 57398b9484cSchristos 57498b9484cSchristoselse 57598b9484cSchristos 57698b9484cSchristos # Not a target library, so we set things up to run the test suite. 57798b9484cSchristos CHECK=really-check 57898b9484cSchristos 57998b9484cSchristosfi 58098b9484cSchristos 58198b9484cSchristosAC_SUBST(CHECK) 58298b9484cSchristosAC_SUBST(target_header_dir) 58398b9484cSchristos 58498b9484cSchristoscase "${host}" in 58598b9484cSchristos *-*-cygwin* | *-*-mingw*) 58698b9484cSchristos AC_DEFINE(HAVE_SYS_ERRLIST) 58798b9484cSchristos AC_DEFINE(HAVE_SYS_NERR) 58898b9484cSchristos ;; 58998b9484cSchristosesac 59098b9484cSchristos 59198b9484cSchristosif test -z "${setobjs}"; then 59298b9484cSchristos case "${host}" in 59398b9484cSchristos 59498b9484cSchristos *-*-vxworks*) 59598b9484cSchristos # Handle VxWorks configuration specially, since on VxWorks the 59698b9484cSchristos # libraries are actually on the target board, not in the file 59798b9484cSchristos # system. 59898b9484cSchristos AC_LIBOBJ([basename]) 59998b9484cSchristos AC_LIBOBJ([getpagesize]) 60098b9484cSchristos AC_LIBOBJ([insque]) 60198b9484cSchristos AC_LIBOBJ([random]) 60298b9484cSchristos AC_LIBOBJ([strcasecmp]) 60398b9484cSchristos AC_LIBOBJ([strncasecmp]) 60498b9484cSchristos AC_LIBOBJ([strdup]) 60598b9484cSchristos AC_LIBOBJ([vfork]) 60698b9484cSchristos AC_LIBOBJ([waitpid]) 60798b9484cSchristos AC_LIBOBJ([vasprintf]) 60898b9484cSchristos for f in $funcs; do 60998b9484cSchristos case "$f" in 61098b9484cSchristos basename | getpagesize | insque | random | strcasecmp) 61198b9484cSchristos ;; 61298b9484cSchristos strncasecmp | strdup | vfork | waitpid | vasprintf) 61398b9484cSchristos ;; 61498b9484cSchristos *) 61598b9484cSchristos n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 61698b9484cSchristos AC_DEFINE_UNQUOTED($n) 61798b9484cSchristos ;; 61898b9484cSchristos esac 61998b9484cSchristos done 62098b9484cSchristos 62198b9484cSchristos # VxWorks doesn't provide any of the variables in $vars, so we 62298b9484cSchristos # don't have to check them here. 62398b9484cSchristos 62498b9484cSchristos # Of the functions in $checkfuncs, VxWorks only has strerror. 62598b9484cSchristos AC_DEFINE(HAVE_STRERROR) 62698b9484cSchristos 62798b9484cSchristos setobjs=yes 62898b9484cSchristos ;; 62998b9484cSchristos 63098b9484cSchristos esac 63198b9484cSchristosfi 63298b9484cSchristos 63398b9484cSchristosif test -z "${setobjs}"; then 63498b9484cSchristos 63598b9484cSchristos case "${host}" in 63698b9484cSchristos 637ba340e45Schristos *-*-android*) 638ba340e45Schristos # On android, getpagesize is defined in unistd.h as a static inline 639ba340e45Schristos # function, which AC_CHECK_FUNCS does not handle properly. 640ba340e45Schristos ac_cv_func_getpagesize=yes 641ba340e45Schristos ;; 642ba340e45Schristos 6434b169a6bSchristos hppa*-*-hpux*) 6444b169a6bSchristos # Replace system snprintf and vsnprintf with libiberty implementations. 6454b169a6bSchristos AC_LIBOBJ([snprintf]) 6464b169a6bSchristos AC_LIBOBJ([vsnprintf]) 6474b169a6bSchristos ;; 6484b169a6bSchristos 64998b9484cSchristos *-*-mingw32*) 65098b9484cSchristos # Under mingw32, sys_nerr and sys_errlist exist, but they are 65198b9484cSchristos # macros, so the test below won't find them. 65298b9484cSchristos libiberty_cv_var_sys_nerr=yes 65398b9484cSchristos libiberty_cv_var_sys_errlist=yes 65498b9484cSchristos ;; 65598b9484cSchristos 65698b9484cSchristos *-*-msdosdjgpp*) 65798b9484cSchristos # vfork and fork are stubs. 65898b9484cSchristos ac_cv_func_vfork_works=no 65998b9484cSchristos ;; 66098b9484cSchristos 66198b9484cSchristos *-*-uwin*) 66298b9484cSchristos # Under some versions of uwin, vfork is notoriously buggy and the test 66398b9484cSchristos # can hang configure; on other versions, vfork exists just as a stub. 66498b9484cSchristos # FIXME: This should be removed once vfork in uwin's runtime is fixed. 66598b9484cSchristos ac_cv_func_vfork_works=no 66698b9484cSchristos # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are 66798b9484cSchristos # macros (actually, these are imported from a DLL, but the end effect 66898b9484cSchristos # is the same), so the test below won't find them. 66998b9484cSchristos libiberty_cv_var_sys_nerr=yes 67098b9484cSchristos libiberty_cv_var_sys_errlist=yes 67198b9484cSchristos ;; 67298b9484cSchristos 67398b9484cSchristos *-*-*vms*) 67498b9484cSchristos # Under VMS, vfork works very different than on Unix. The standard test 67598b9484cSchristos # won't work, and it isn't easily adaptable. It makes more sense to 67698b9484cSchristos # just force it. 67798b9484cSchristos ac_cv_func_vfork_works=yes 67898b9484cSchristos ;; 67998b9484cSchristos 68098b9484cSchristos esac 68198b9484cSchristos 68298b9484cSchristos # We haven't set the list of objects yet. Use the standard autoconf 68398b9484cSchristos # tests. This will only work if the compiler works. 68498b9484cSchristos AC_ISC_POSIX 68598b9484cSchristos AC_REPLACE_FUNCS($funcs) 68698b9484cSchristos libiberty_AC_FUNC_C_ALLOCA 68798b9484cSchristos AC_FUNC_FORK 68898b9484cSchristos if test $ac_cv_func_vfork_works = no; then 68998b9484cSchristos AC_LIBOBJ([vfork]) 69098b9484cSchristos fi 69198b9484cSchristos # We only need _doprnt if we might use it to implement v*printf. 69298b9484cSchristos if test $ac_cv_func_vprintf != yes \ 69398b9484cSchristos || test $ac_cv_func_vfprintf != yes \ 69498b9484cSchristos || test $ac_cv_func_vsprintf != yes; then 69598b9484cSchristos AC_REPLACE_FUNCS(_doprnt) 69698b9484cSchristos else 69798b9484cSchristos AC_CHECK_FUNCS(_doprnt) 69898b9484cSchristos fi 69998b9484cSchristos 70098b9484cSchristos for v in $vars; do 70198b9484cSchristos AC_MSG_CHECKING([for $v]) 70298b9484cSchristos AC_CACHE_VAL(libiberty_cv_var_$v, 7034b169a6bSchristos [AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern int $v [];]],[[if ($v [0]) return 1;]])], 70498b9484cSchristos [eval "libiberty_cv_var_$v=yes"], 70598b9484cSchristos [eval "libiberty_cv_var_$v=no"])]) 70698b9484cSchristos if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then 70798b9484cSchristos AC_MSG_RESULT(yes) 70898b9484cSchristos n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 70998b9484cSchristos AC_DEFINE_UNQUOTED($n) 71098b9484cSchristos else 71198b9484cSchristos AC_MSG_RESULT(no) 71298b9484cSchristos fi 71398b9484cSchristos done 71498b9484cSchristos 71598b9484cSchristos # special check for _system_configuration because AIX <4.3.2 do not 71698b9484cSchristos # contain the `physmem' member. 71798b9484cSchristos AC_MSG_CHECKING([for external symbol _system_configuration]) 71898b9484cSchristos AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/systemcfg.h>]], 71998b9484cSchristos [[double x = _system_configuration.physmem;]])], 72098b9484cSchristos [AC_MSG_RESULT([yes]) 72198b9484cSchristos AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, 72298b9484cSchristos [Define if you have the _system_configuration variable.])], 72398b9484cSchristos [AC_MSG_RESULT([no])]) 72498b9484cSchristos 72598b9484cSchristos AC_CHECK_FUNCS($checkfuncs) 72698b9484cSchristos AC_CHECK_DECLS([basename(char *), ffs, asprintf, vasprintf, snprintf, vsnprintf]) 7274b169a6bSchristos AC_CHECK_DECLS([calloc, getenv, getopt, malloc, realloc]) 7284b169a6bSchristos case "${host}" in 7294b169a6bSchristos *-*-darwin*) ;; # Darwin's sbrk implementation is deprecated. 7304b169a6bSchristos *) AC_CHECK_DECLS([sbrk]);; 7314b169a6bSchristos esac 732837edd6bSchristos AC_CHECK_DECLS([strtol, strtoul, strtoll, strtoull]) 73398b9484cSchristos AC_CHECK_DECLS([strverscmp]) 734796c32c9Schristos AC_CHECK_DECLS([strnlen]) 73598b9484cSchristos libiberty_NEED_DECLARATION(canonicalize_file_name) 73698b9484cSchristosfi 73798b9484cSchristos 73898b9484cSchristos# Figure out which version of pexecute to use. 73998b9484cSchristoscase "${host}" in 74098b9484cSchristos *-*-mingw* | *-*-winnt*) pexecute=pex-win32 ;; 74198b9484cSchristos *-*-msdosdjgpp*) pexecute=pex-djgpp ;; 74298b9484cSchristos *-*-msdos*) pexecute=pex-msdos ;; 74398b9484cSchristos *) pexecute=pex-unix ;; 74498b9484cSchristosesac 74598b9484cSchristosAC_SUBST(pexecute) 74698b9484cSchristos 747*7e120ff0SchristosAC_MSG_CHECKING([for SHA1 HW acceleration support]) 748*7e120ff0SchristosAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 749*7e120ff0Schristos#include <x86intrin.h> 750*7e120ff0Schristos#include <cpuid.h> 751*7e120ff0Schristos 752*7e120ff0Schristos__attribute__((__target__ ("sse4.1,sha"))) 753*7e120ff0Schristosvoid foo (__m128i *buf, unsigned int e, __m128i msg0, __m128i msg1) 754*7e120ff0Schristos{ 755*7e120ff0Schristos __m128i abcd = _mm_loadu_si128 ((const __m128i *) buf); 756*7e120ff0Schristos __m128i e0 = _mm_set_epi32 (e, 0, 0, 0); 757*7e120ff0Schristos abcd = _mm_shuffle_epi32 (abcd, 0x1b); 758*7e120ff0Schristos const __m128i shuf_mask = _mm_set_epi64x (0x0001020304050607ULL, 0x08090a0b0c0d0e0fULL); 759*7e120ff0Schristos abcd = _mm_shuffle_epi8 (abcd, shuf_mask); 760*7e120ff0Schristos e0 = _mm_sha1nexte_epu32 (e0, msg1); 761*7e120ff0Schristos abcd = _mm_sha1rnds4_epu32 (abcd, e0, 0); 762*7e120ff0Schristos msg0 = _mm_sha1msg1_epu32 (msg0, msg1); 763*7e120ff0Schristos msg0 = _mm_sha1msg2_epu32 (msg0, msg1); 764*7e120ff0Schristos msg0 = _mm_xor_si128 (msg0, msg1); 765*7e120ff0Schristos e0 = _mm_add_epi32 (e0, msg0); 766*7e120ff0Schristos e0 = abcd; 767*7e120ff0Schristos _mm_storeu_si128 (buf, abcd); 768*7e120ff0Schristos e = _mm_extract_epi32 (e0, 3); 769*7e120ff0Schristos} 770*7e120ff0Schristos 771*7e120ff0Schristosint bar (void) 772*7e120ff0Schristos{ 773*7e120ff0Schristos unsigned int eax, ebx, ecx, edx; 774*7e120ff0Schristos (void) __get_cpuid; 775*7e120ff0Schristos (void) __get_cpuid_count; 776*7e120ff0Schristos if (__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx) 777*7e120ff0Schristos && (ebx & bit_SHA) != 0 778*7e120ff0Schristos && __get_cpuid (1, &eax, &ebx, &ecx, &edx) 779*7e120ff0Schristos && (ecx & bit_SSE4_1) != 0) 780*7e120ff0Schristos return 1; 781*7e120ff0Schristos return 0; 782*7e120ff0Schristos} 783*7e120ff0Schristos]], [[bar ();]])], 784*7e120ff0Schristos [AC_MSG_RESULT([x86 SHA1]) 785*7e120ff0Schristos AC_DEFINE(HAVE_X86_SHA1_HW_SUPPORT, 1, 786*7e120ff0Schristos [Define if you have x86 SHA1 HW acceleration support.])], 787*7e120ff0Schristos [AC_MSG_RESULT([no])]) 788*7e120ff0Schristos 78998b9484cSchristoslibiberty_AC_FUNC_STRNCMP 79098b9484cSchristos 79198b9484cSchristos# Install a library built with a cross compiler in $(tooldir) rather 79298b9484cSchristos# than $(libdir). 79398b9484cSchristosif test -z "${with_cross_host}"; then 79498b9484cSchristos INSTALL_DEST=libdir 79598b9484cSchristoselse 79698b9484cSchristos INSTALL_DEST=tooldir 79798b9484cSchristosfi 79898b9484cSchristosAC_SUBST(INSTALL_DEST) 79998b9484cSchristos 80098b9484cSchristosm4_pattern_allow(LIBOBJS) 80198b9484cSchristosL="" 80298b9484cSchristosfor l in x $LIBOBJS; do 80398b9484cSchristos case $l in 80498b9484cSchristos x) ;; 80598b9484cSchristos *) L="$L ./$l" ;; 80698b9484cSchristos esac 80798b9484cSchristosdone 80898b9484cSchristosLIBOBJS="$L" 80998b9484cSchristos 81098b9484cSchristosdnl Required by html and install-html 81198b9484cSchristosAC_SUBST(datarootdir) 81298b9484cSchristosAC_SUBST(docdir) 81398b9484cSchristosAC_SUBST(htmldir) 81498b9484cSchristos 81598b9484cSchristos# We need multilib support, but only if configuring for the target. 81698b9484cSchristosAC_CONFIG_FILES([Makefile testsuite/Makefile]) 81798b9484cSchristosAC_CONFIG_COMMANDS([default], 81898b9484cSchristos [[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h 81998b9484cSchristosif test -n "$CONFIG_FILES"; then 82098b9484cSchristos if test -n "${with_target_subdir}"; then 82198b9484cSchristos # FIXME: We shouldn't need to set ac_file 82298b9484cSchristos ac_file=Makefile 82398b9484cSchristos LD="${ORIGINAL_LD_FOR_MULTILIBS}" 82498b9484cSchristos . ${libiberty_topdir}/config-ml.in 82598b9484cSchristos fi 82698b9484cSchristosfi]], 82798b9484cSchristos[[srcdir=${srcdir} 82898b9484cSchristoshost=${host} 82998b9484cSchristostarget=${target} 83098b9484cSchristoswith_target_subdir=${with_target_subdir} 83198b9484cSchristoswith_multisubdir=${with_multisubdir} 83298b9484cSchristosac_configure_args="--enable-multilib ${ac_configure_args}" 83398b9484cSchristosCONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 83498b9484cSchristosORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" 83598b9484cSchristoslibiberty_topdir=${libiberty_topdir} 83698b9484cSchristos]]) 83798b9484cSchristosAC_OUTPUT 838