configure.in (alloca detection): Handle alloca directly for interix.

* configure.in (alloca detection): Handle alloca directly for interix.
        * configure: Rebuilt.

From-SVN: r26635
This commit is contained in:
Donn Terry 1999-04-26 00:40:51 +00:00 committed by Jeff Law
parent ab40f61225
commit 7dd8861714
3 changed files with 87 additions and 40 deletions

View File

@ -1,3 +1,8 @@
Mon Apr 26 01:36:06 1999 Donn Terry (donn@interix.com)
* configure.in (alloca detection): Handle alloca directly for interix.
* configure: Rebuilt.
Sun Apr 25 01:18:21 1999 Mumit Khan <khan@xraylith.wisc.edu>
* choose-temp.c (DIR_SEPARATOR): Use '\\' only for native windows32.

99
libiberty/configure vendored
View File

@ -1835,22 +1835,40 @@ fi
done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
case "${host}" in
*-*-interix)
# On Interix, it wrongly concludes that the MSVC compiler supports alloca.
# (MSVC does on Win32, not on Interix.)
# This should be temporary.
ac_cv_header_alloca_h=no
ac_cv_func_alloca_works=no
ALLOCA=alloca.o
cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
cat >> confdefs.h <<EOF
#define STACK_DIRECTION -1
EOF
;;
*)
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:1842: checking for working alloca.h" >&5
echo "configure:1860: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1847 "configure"
#line 1865 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:1854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@ -1871,12 +1889,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:1875: checking for alloca" >&5
echo "configure:1893: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1880 "configure"
#line 1898 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@ -1904,7 +1922,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@ -1936,12 +1954,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:1940: checking whether alloca needs Cray hooks" >&5
echo "configure:1958: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1945 "configure"
#line 1963 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@ -1966,12 +1984,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1970: checking for $ac_func" >&5
echo "configure:1988: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1975 "configure"
#line 1993 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1994,7 +2012,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2021,7 +2039,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:2025: checking stack direction for C alloca" >&5
echo "configure:2043: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2029,7 +2047,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
#line 2033 "configure"
#line 2051 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@ -2048,7 +2066,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@ -2069,13 +2087,16 @@ EOF
fi
;;
esac
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2074: checking for ANSI C header files" >&5
echo "configure:2095: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2079 "configure"
#line 2100 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -2083,7 +2104,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2100,7 +2121,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2104 "configure"
#line 2125 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -2118,7 +2139,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2122 "configure"
#line 2143 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -2139,7 +2160,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 2143 "configure"
#line 2164 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -2150,7 +2171,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@ -2174,12 +2195,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:2178: checking for pid_t" >&5
echo "configure:2199: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2183 "configure"
#line 2204 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -2208,17 +2229,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
echo "configure:2212: checking for vfork.h" >&5
echo "configure:2233: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2217 "configure"
#line 2238 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2243,18 +2264,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
echo "configure:2247: checking for working vfork" >&5
echo "configure:2268: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
echo "configure:2253: checking for vfork" >&5
echo "configure:2274: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2258 "configure"
#line 2279 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@ -2277,7 +2298,7 @@ vfork();
; return 0; }
EOF
if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@ -2299,7 +2320,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
#line 2303 "configure"
#line 2324 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@ -2394,7 +2415,7 @@ main() {
}
}
EOF
if { (eval echo configure:2398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@ -2421,19 +2442,19 @@ fi
fi
for v in $vars; do
echo $ac_n "checking for $v""... $ac_c" 1>&6
echo "configure:2425: checking for $v" >&5
echo "configure:2446: checking for $v" >&5
if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2430 "configure"
#line 2451 "configure"
#include "confdefs.h"
int *p;
int main() {
extern int $v; p = &$v;
; return 0; }
EOF
if { (eval echo configure:2437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "libiberty_cv_var_$v=yes"
else
@ -2459,12 +2480,12 @@ EOF
for ac_func in $checkfuncs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2463: checking for $ac_func" >&5
echo "configure:2484: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2468 "configure"
#line 2489 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2487,7 +2508,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else

View File

@ -299,7 +299,28 @@ if test -z "${setobjs}"; then
# tests. This will only work if the compiler works.
AC_PROG_CC_WORKS
AC_REPLACE_FUNCS($funcs)
AC_FUNC_ALLOCA
case "${host}" in
*-*-interix)
# On Interix, it wrongly concludes that the MSVC compiler supports alloca.
# (MSVC does on Win32, not on Interix.)
# This should be temporary.
ac_cv_header_alloca_h=no
ac_cv_func_alloca_works=no
ALLOCA=alloca.o
cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
cat >> confdefs.h <<EOF
#define STACK_DIRECTION -1
EOF
;;
*)
AC_FUNC_ALLOCA
;;
esac
AC_FUNC_VFORK
if test $ac_cv_func_vfork_works = no; then
LIBOBJS="$LIBOBJS vfork.o"