aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2002-03-26 23:29:30 +0000
committerDJ Delorie <dj@redhat.com>2002-03-26 23:29:30 +0000
commitcfed07154c9448b8dd40c8994fc2a03a3f7df090 (patch)
treede1a81902a9c8ff475429de9cfb70685422c390d /libiberty
parent05b4d525a6806877bb801046070904cc19c36b6b (diff)
downloadgdb-cfed07154c9448b8dd40c8994fc2a03a3f7df090.zip
gdb-cfed07154c9448b8dd40c8994fc2a03a3f7df090.tar.gz
gdb-cfed07154c9448b8dd40c8994fc2a03a3f7df090.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/config.table39
-rwxr-xr-xlibiberty/configure39
-rw-r--r--libiberty/configure.in12
4 files changed, 57 insertions, 39 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index f92fef8..6b81d80 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-26 H.J. Lu (hjl@gnu.org)
+
+ * config.table: Support --with-build-subdir.
+ * configure.in: Likewise.
+ * configure: Rebuild.
+
2002-03-18 Stuart Griffith <Stuart_Griffith@credence.com>
* strtod.c (strtod): Increment 8 chars, not 7, when `infinity'
diff --git a/libiberty/config.table b/libiberty/config.table
index fa892c0..6118a9c 100644
--- a/libiberty/config.table
+++ b/libiberty/config.table
@@ -1,3 +1,9 @@
+# Don't build the shared library for build.
+if [ -n "${with_build_subdir}" ]; then
+ enable_shared=no
+fi
+
+frag=
case "${host}" in
rs6000-ibm-aix3.1 | rs6000-ibm-aix)
frag=mh-aix ;;
@@ -8,7 +14,11 @@ case "${host}" in
i[345]86-*-windows*) frag=mh-windows ;;
esac
-frags=$frag
+if [ -n "${frag}" ]; then
+ frags=${libiberty_topdir}/libiberty/config/$frag
+else
+ frags=
+fi
# If they didn't specify --enable-shared, don't generate shared libs.
case "${enable_shared}" in
@@ -18,31 +28,26 @@ case "${enable_shared}" in
*) shared=yes ;;
esac
if [ "${shared}" = "yes" ]; then
+ frag=
case "${host}" in
*-*-cygwin*) ;;
- alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
- arm*-*-*) frags="${frags} ../../config/mh-armpic" ;;
- hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
- i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
+ alpha*-*-linux*) frag=mh-elfalphapic ;;
+ arm*-*-*) frag=mh-armpic ;;
+ hppa*-*-*) frag=mh-papic ;;
+ i[3456]86-*-*) frag=mh-x86pic ;;
powerpc*-*-aix*) ;;
- powerpc*-*-*) frags="${frags} ../../config/mh-ppcpic" ;;
- sparc*-*-*) frags="${frags} ../../config/mh-sparcpic" ;;
- *-*-*) frags="${frags} ../../config/mh-${host_cpu}pic" ;;
+ powerpc*-*-*) frag=mh-ppcpic ;;
+ sparc*-*-*) frag=mh-sparcpic ;;
+ *) frag=mh-${host_cpu}pic ;;
esac
+ if [ -n "${frag}" ]; then
+ frags="${frags} ${libiberty_topdir}/config/${frag}"
+ fi
fi
echo "# Warning: this fragment is automatically generated" > temp-frag
for frag in ${frags}; do
- case ${frag} in
- ../* )
- if [ ${srcdir} = . ]; then
- [ -n "${with_target_subdir}" ] && frag=../${frag}
- [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
- fi
- ;;
- esac
- frag=${srcdir}/${xsrcdir}config/$frag
if [ -f ${frag} ]; then
echo "Appending ${frag} to xhost-mkfrag"
echo "# Following fragment copied from ${frag}" >> temp-frag
diff --git a/libiberty/configure b/libiberty/configure
index e2dd9bf..cbbec35 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -12,7 +12,9 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --with-target-subdir=SUBDIR Configuring in a subdirectory"
+ --with-target-subdir=SUBDIR Configuring in a subdirectory for target"
+ac_help="$ac_help
+ --with-build-subdir=SUBDIR Configuring in a subdirectory for build"
ac_help="$ac_help
--with-cross-host=HOST Configuring with a cross compiler"
ac_help="$ac_help
@@ -40,7 +42,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -155,7 +156,6 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -326,11 +326,6 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -496,16 +491,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -551,6 +542,12 @@ if test "${with_target_subdir+set}" = set; then
:
fi
+# Check whether --with-build-subdir or --without-build-subdir was given.
+if test "${with_build_subdir+set}" = set; then
+ withval="$with_build_subdir"
+ :
+fi
+
# Check whether --with-cross-host or --without-cross-host was given.
if test "${with_cross_host+set}" = set; then
withval="$with_cross_host"
@@ -565,7 +562,10 @@ fi
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
@@ -3672,6 +3672,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}
@@ -3681,7 +3682,7 @@ EOF
cat >> $CONFIG_STATUS <<\EOF
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
diff --git a/libiberty/configure.in b/libiberty/configure.in
index f37fdc7..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
@@ -417,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
@@ -427,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}