aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-08-30 13:08:27 +0000
committerCorinna Vinschen <corinna@vinschen.de>2006-08-30 13:08:27 +0000
commit069e4b1944dc9eade2131d01d0f7ab5b8a634ac0 (patch)
treef0e66f41334a474a41508174eda3db2efcdbc9e7 /libiberty
parentc3a2a8c7ce92dfcbc46ce309ace157e2af2dfff2 (diff)
downloadgdb-069e4b1944dc9eade2131d01d0f7ab5b8a634ac0.zip
gdb-069e4b1944dc9eade2131d01d0f7ab5b8a634ac0.tar.gz
gdb-069e4b1944dc9eade2131d01d0f7ab5b8a634ac0.tar.bz2
* configure.ac: Add case for Mingw as host.
* configure: Regenerate.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rwxr-xr-xlibiberty/configure202
-rw-r--r--libiberty/configure.ac49
3 files changed, 256 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 727b987..506cb8b 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.ac: Add case for Mingw as host.
+ * configure: Regenerate.
+
2006-08-27 Ian Lance Taylor <ian@airs.com>
PR driver/27622
diff --git a/libiberty/configure b/libiberty/configure
index ed7423a..3491102 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5679,6 +5679,208 @@ _ACEOF
fi
+ # If we are being configured for Mingw, we know which functions
+ # Mingw provides and which ones we will be expected to provide.
+
+ case "${host}" in
+ *-*-mingw*)
+ case $LIBOBJS in
+ "asprintf.$ac_objext" | \
+ *" asprintf.$ac_objext" | \
+ "asprintf.$ac_objext "* | \
+ *" asprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "basename.$ac_objext" | \
+ *" basename.$ac_objext" | \
+ "basename.$ac_objext "* | \
+ *" basename.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "bcmp.$ac_objext" | \
+ *" bcmp.$ac_objext" | \
+ "bcmp.$ac_objext "* | \
+ *" bcmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS bcmp.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "bcopy.$ac_objext" | \
+ *" bcopy.$ac_objext" | \
+ "bcopy.$ac_objext "* | \
+ *" bcopy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS bcopy.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "bzero.$ac_objext" | \
+ *" bzero.$ac_objext" | \
+ "bzero.$ac_objext "* | \
+ *" bzero.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS bzero.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "clock.$ac_objext" | \
+ *" clock.$ac_objext" | \
+ "clock.$ac_objext "* | \
+ *" clock.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS clock.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "ffs.$ac_objext" | \
+ *" ffs.$ac_objext" | \
+ "ffs.$ac_objext "* | \
+ *" ffs.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS ffs.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "getpagesize.$ac_objext" | \
+ *" getpagesize.$ac_objext" | \
+ "getpagesize.$ac_objext "* | \
+ *" getpagesize.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "index.$ac_objext" | \
+ *" index.$ac_objext" | \
+ "index.$ac_objext "* | \
+ *" index.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS index.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "insque.$ac_objext" | \
+ *" insque.$ac_objext" | \
+ "insque.$ac_objext "* | \
+ *" insque.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "mempcpy.$ac_objext" | \
+ *" mempcpy.$ac_objext" | \
+ "mempcpy.$ac_objext "* | \
+ *" mempcpy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "mkstemps.$ac_objext" | \
+ *" mkstemps.$ac_objext" | \
+ "mkstemps.$ac_objext "* | \
+ *" mkstemps.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "random.$ac_objext" | \
+ *" random.$ac_objext" | \
+ "random.$ac_objext "* | \
+ *" random.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "rindex.$ac_objext" | \
+ *" rindex.$ac_objext" | \
+ "rindex.$ac_objext "* | \
+ *" rindex.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS rindex.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "sigsetmask.$ac_objext" | \
+ *" sigsetmask.$ac_objext" | \
+ "sigsetmask.$ac_objext "* | \
+ *" sigsetmask.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "stpcpy.$ac_objext" | \
+ *" stpcpy.$ac_objext" | \
+ "stpcpy.$ac_objext "* | \
+ *" stpcpy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "stpncpy.$ac_objext" | \
+ *" stpncpy.$ac_objext" | \
+ "stpncpy.$ac_objext "* | \
+ *" stpncpy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "strndup.$ac_objext" | \
+ *" strndup.$ac_objext" | \
+ "strndup.$ac_objext "* | \
+ *" strndup.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strndup.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "strverscmp.$ac_objext" | \
+ *" strverscmp.$ac_objext" | \
+ "strverscmp.$ac_objext "* | \
+ *" strverscmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "vasprintf.$ac_objext" | \
+ *" vasprintf.$ac_objext" | \
+ "vasprintf.$ac_objext "* | \
+ *" vasprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "waitpid.$ac_objext" | \
+ *" waitpid.$ac_objext" | \
+ "waitpid.$ac_objext "* | \
+ *" waitpid.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
+esac
+
+
+ for f in $funcs; do
+ case "$f" in
+ asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
+ ;;
+ *)
+ n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >>confdefs.h <<_ACEOF
+#define $n 1
+_ACEOF
+
+ ;;
+ esac
+ done
+
+ # Mingw doesnt provide any of the variables in $vars, so we
+ # dont have to check them here.
+
+ # Of the functions in $checkfuncs, Mingw only has strerror.
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRERROR 1
+_ACEOF
+
+
+ setobjs=yes
+ ;;
+
+ esac
+
# We may wish to install the target headers somewhere.
# Check whether --enable-install-libiberty or --disable-install-libiberty was given.
if test "${enable_install_libiberty+set}" = set; then
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 76cf3d5..f9713c2 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -419,6 +419,55 @@ if test -n "${with_target_subdir}"; then
fi
+ # If we are being configured for Mingw, we know which functions
+ # Mingw provides and which ones we will be expected to provide.
+
+ case "${host}" in
+ *-*-mingw*)
+ AC_LIBOBJ([asprintf])
+ AC_LIBOBJ([basename])
+ AC_LIBOBJ([bcmp])
+ AC_LIBOBJ([bcopy])
+ AC_LIBOBJ([bzero])
+ AC_LIBOBJ([clock])
+ AC_LIBOBJ([ffs])
+ AC_LIBOBJ([getpagesize])
+ AC_LIBOBJ([index])
+ AC_LIBOBJ([insque])
+ AC_LIBOBJ([mempcpy])
+ AC_LIBOBJ([mkstemps])
+ AC_LIBOBJ([random])
+ AC_LIBOBJ([rindex])
+ AC_LIBOBJ([sigsetmask])
+ AC_LIBOBJ([stpcpy])
+ AC_LIBOBJ([stpncpy])
+ AC_LIBOBJ([strndup])
+ AC_LIBOBJ([strverscmp])
+ AC_LIBOBJ([vasprintf])
+ AC_LIBOBJ([waitpid])
+
+ for f in $funcs; do
+ case "$f" in
+ asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
+ ;;
+ *)
+ n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($n)
+ ;;
+ esac
+ done
+
+ # Mingw doesnt provide any of the variables in $vars, so we
+ # dont have to check them here.
+
+ # Of the functions in $checkfuncs, Mingw only has strerror.
+ AC_DEFINE(HAVE_STRERROR)
+
+ setobjs=yes
+ ;;
+
+ esac
+
# We may wish to install the target headers somewhere.
AC_ARG_ENABLE(install-libiberty,
[ --enable-install-libiberty Install headers for end users],