aboutsummaryrefslogtreecommitdiff
path: root/libiberty/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/configure.in')
-rw-r--r--libiberty/configure.in29
1 files changed, 23 insertions, 6 deletions
diff --git a/libiberty/configure.in b/libiberty/configure.in
index a8dc66fa83c..8a58d12c1e2 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -35,6 +35,7 @@ if test "${srcdir}" = "."; then
else
libiberty_topdir="${srcdir}/.."
fi
+AC_SUBST(libiberty_topdir)
AC_CONFIG_AUX_DIR($libiberty_topdir)
dnl Very limited version of automake's enable-maintainer-mode
@@ -141,18 +142,17 @@ 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 string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.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)
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
libiberty_AC_DECLARE_ERRNO
AC_CHECK_TYPE(uintptr_t, unsigned long)
-
-if test $ac_cv_type_uintptr_t = yes
-then
- AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if you have the \`uintptr_t' type.])
-fi
+# Given the above check, we always have uintptr_t or a fallback
+# definition. So define HAVE_UINTPTR_T in case any imported code
+# relies on it.
+AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if you have the \`uintptr_t' type.])
AC_TYPE_PID_T
@@ -206,6 +206,8 @@ funcs="$funcs waitpid"
vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
+checkfuncs="$checkfuncs realpath canonicalize_file_name"
+checkfuncs="$checkfuncs pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl"
# These are neither executed nor required, but they help keep
# autoheader happy without adding a bunch of text to acconfig.h.
@@ -217,6 +219,8 @@ if test "x" = "y"; then
AC_CHECK_FUNCS(strtod strtol strtoul tmpnam vasprintf vfprintf vprintf)
AC_CHECK_FUNCS(vsprintf waitpid getrusage on_exit psignal strerror strsignal)
AC_CHECK_FUNCS(sysconf times sbrk gettimeofday ffs)
+ AC_CHECK_FUNCS(realpath canonicalize_file_name)
+ AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl)
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])
@@ -422,6 +426,18 @@ if test -z "${setobjs}"; then
AC_MSG_RESULT(no)
fi
done
+
+ # special check for _system_configuration because AIX <4.3.2 do not
+ # contain the `physmem' member.
+ AC_MSG_CHECKING([for external symbol _system_configuration])
+ AC_TRY_COMPILE([#include <sys/systemcfg.h>],
+ [double x = _system_configuration.physmem;],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1,
+ [Define if you have the _system_configuration variable.])],
+ [AC_MSG_RESULT([no])])
+
+ libiberty_NEED_DECLARATION(canonicalize_file_name)
AC_CHECK_FUNCS($checkfuncs)
fi
@@ -455,5 +471,6 @@ with_build_subdir=${with_build_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
libiberty_topdir=${libiberty_topdir}
)