aboutsummaryrefslogtreecommitdiff
path: root/libiberty/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/configure.in')
-rw-r--r--libiberty/configure.in35
1 files changed, 32 insertions, 3 deletions
diff --git a/libiberty/configure.in b/libiberty/configure.in
index fb930e4..0de0f8a 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -5,14 +5,19 @@ AC_INIT(pexecute.c)
dnl We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
-[ --with-target-subdir=SUBDIR Configuring in a subdirectory])
+[ --with-target-subdir=SUBDIR Configuring in a subdirectory for target])
+AC_ARG_WITH(build-subdir,
+[ --with-build-subdir=SUBDIR Configuring in a subdirectory for build])
AC_ARG_WITH(cross-host,
[ --with-cross-host=HOST Configuring with a cross compiler])
AC_ARG_WITH(newlib,
[ --with-newlib Configuring with newlib])
if test "${srcdir}" = "."; then
- if test -z "${with_target_subdir}"; then
+ if test -n "${with_build_subdir}"; then
+ libiberty_topdir="${srcdir}/../.."
+ with_target_subdir=
+ elif test -z "${with_target_subdir}"; then
libiberty_topdir="${srcdir}/.."
else
if test "${with_target_subdir}" != "."; then
@@ -205,6 +210,7 @@ fi
setobjs=
CHECK=
+target_header_dir=
if test -n "${with_target_subdir}"; then
# We are being configured as a target library. AC_REPLACE_FUNCS
@@ -239,6 +245,27 @@ if test -n "${with_target_subdir}"; then
fi
+ # We may wish to install the target headers somewhere.
+ AC_ARG_ENABLE(install-libiberty,
+ [ --enable-install-libiberty Install headers for end users],
+ enable_install_libiberty=$enableval,
+ enable_install_libiberty=no)dnl
+
+ # Option parsed, now set things appropriately.
+ case x"$enable_install_libiberty" in
+ xyes|x)
+ target_header_dir=libiberty
+ ;;
+ xno)
+ target_header_dir=
+ ;;
+ *)
+ # This could be sanity-checked in various ways...
+ target_header_dir="${enable_install_libiberty}"
+ ;;
+ esac
+
+
else
# Not a target library, so we set things up to run the test suite.
@@ -247,6 +274,7 @@ else
fi
AC_SUBST(CHECK)
+AC_SUBST(target_header_dir)
case "${host}" in
*-*-cygwin* | *-*-mingw*)
@@ -394,7 +422,7 @@ AC_SUBST(INSTALL_DEST)
AC_OUTPUT(Makefile testsuite/Makefile,
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then
- if test -n "${with_target_subdir}"; then
+ if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
# FIXME: We shouldn't need to set ac_file
ac_file=Makefile
. ${libiberty_topdir}/config-ml.in
@@ -404,6 +432,7 @@ srcdir=${srcdir}
host=${host}
target=${target}
with_target_subdir=${with_target_subdir}
+with_build_subdir=${with_build_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}