Commit 825b6926 by Zack Weinberg

aclocal.m4 (AC_FUNC_MMAP_ANYWHERE): Completely rewritten.

2001-01-11  Zack Weinberg  <zack@wolery.stanford.edu>

	* aclocal.m4 (AC_FUNC_MMAP_ANYWHERE): Completely rewritten.
	Now defines HAVE_MMAP_DEV_ZERO and/or HAVE_MMAP_ANON depending
	which you have.
	(AC_FUNC_MMAP_FILE): Don't AC_REQUIRE AC_FUNC_MMAP_ANYWHERE.
	* configure.in: Set GGC to ggc-page if any of mmap_dev_zero,
	mmap_anon, and valloc is available.
	* ggc-page.c: Restructure ifdef logic to match new autoconf
	spec.  Don't throw away the test page in init_ggc.

	* configure, config.in: Regenerate.

From-SVN: r38934
parent 099f0f3f
2001-01-11 Zack Weinberg <zack@wolery.stanford.edu>
* aclocal.m4 (AC_FUNC_MMAP_ANYWHERE): Completely rewritten.
Now defines HAVE_MMAP_DEV_ZERO and/or HAVE_MMAP_ANON depending
which you have.
(AC_FUNC_MMAP_FILE): Don't AC_REQUIRE AC_FUNC_MMAP_ANYWHERE.
* configure.in: Set GGC to ggc-page if any of mmap_dev_zero,
mmap_anon, and valloc is available.
* ggc-page.c: Restructure ifdef logic to match new autoconf
spec. Don't throw away the test page in init_ggc.
* configure, config.in: Regenerate.
2001-01-12 Michael Hayes <mhayes@redhat.com> 2001-01-12 Michael Hayes <mhayes@redhat.com>
* loop.h (total_biv_increment): Constify iv_class pointer. * loop.h (total_biv_increment): Constify iv_class pointer.
......
...@@ -737,16 +737,17 @@ AC_SUBST($1)dnl ...@@ -737,16 +737,17 @@ AC_SUBST($1)dnl
# Check whether mmap can map an arbitrary page from /dev/zero or with # Check whether mmap can map an arbitrary page from /dev/zero or with
# MAP_ANONYMOUS, without MAP_FIXED. # MAP_ANONYMOUS, without MAP_FIXED.
AC_DEFUN([AC_FUNC_MMAP_ANYWHERE], AC_DEFUN([AC_FUNC_MMAP_ANYWHERE],
[AC_CHECK_HEADERS(unistd.h) [AC_CHECK_FUNCS(getpagesize)
AC_CHECK_FUNCS(getpagesize) # The test program for the next two tests is the same except for one
AC_CACHE_CHECK(for working mmap which provides zeroed pages anywhere, # set of ifdefs.
ac_cv_func_mmap_anywhere, changequote({{{,}}})dnl
[AC_TRY_RUN([ {{{cat >ct-mmap.inc <<'EOF'
/* Test by Richard Henderson and Alexandre Oliva.
Check whether mmap MAP_ANONYMOUS or mmap from /dev/zero works. */
#include <sys/types.h> #include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <fcntl.h>
#include <signal.h>
#include <setjmp.h>
#include <stdio.h>
#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
# define MAP_ANONYMOUS MAP_ANON # define MAP_ANONYMOUS MAP_ANON
...@@ -793,45 +794,246 @@ AC_CACHE_CHECK(for working mmap which provides zeroed pages anywhere, ...@@ -793,45 +794,246 @@ AC_CACHE_CHECK(for working mmap which provides zeroed pages anywhere,
#endif /* no HAVE_GETPAGESIZE */ #endif /* no HAVE_GETPAGESIZE */
int main() #ifndef MAP_FAILED
{ # define MAP_FAILED -1
char *x;
int fd, pg;
#ifndef MAP_ANONYMOUS
fd = open("/dev/zero", O_RDWR);
if (fd < 0)
exit(1);
#endif #endif
pg = getpagesize(); #undef perror_exit
#ifdef MAP_ANONYMOUS #define perror_exit(str, val) \
x = (char*)mmap(0, pg, PROT_READ|PROT_WRITE, do { perror(str); exit(val); } while (0)
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
/* Some versions of cygwin mmap require that munmap is called with the
same parameters as mmap. GCC expects that this is not the case.
Test for various forms of this problem. Warning - icky signal games. */
static sigset_t unblock_sigsegv;
static jmp_buf r;
static size_t pg;
static int devzero;
static char *
anonmap (size)
size_t size;
{
#ifdef USE_MAP_ANON
return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
#else #else
x = (char*)mmap(0, pg, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
MAP_PRIVATE, devzero, 0);
#endif #endif
if (x == (char *) -1) }
exit(2);
static void
sigsegv (unused)
int unused;
{
sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
longjmp (r, 1);
}
/* Basic functionality test. */
void
test_0 ()
{
char *x = anonmap (pg);
if (x == (char *) MAP_FAILED)
perror_exit("test 0 mmap", 2);
*(int *)x += 1; *(int *)x += 1;
if (munmap(x, pg) < 0) if (munmap(x, pg) < 0)
exit(3); perror_exit("test 0 munmap", 3);
}
/* 1. If we map a 2-page region and unmap its second page, the first page
must remain. */
static void
test_1 ()
{
char *x = anonmap (pg * 2);
if (x == (char *)MAP_FAILED)
perror_exit ("test 1 mmap", 4);
signal (SIGSEGV, sigsegv);
if (setjmp (r))
perror_exit ("test 1 fault", 5);
x[0] = 1;
x[pg] = 1;
if (munmap (x + pg, pg) < 0)
perror_exit ("test 1 munmap 1", 6);
x[0] = 2;
if (setjmp (r) == 0)
{
x[pg] = 1;
perror_exit ("test 1 no fault", 7);
}
if (munmap (x, pg) < 0)
perror_exit ("test 1 munmap 2", 8);
}
/* 2. If we map a 2-page region and unmap its first page, the second
page must remain. */
static void
test_2 ()
{
char *x = anonmap (pg * 2);
if (x == (char *)MAP_FAILED)
perror_exit ("test 2 mmap", 9);
signal (SIGSEGV, sigsegv);
if (setjmp (r))
perror_exit ("test 2 fault", 10);
x[0] = 1;
x[pg] = 1;
if (munmap (x, pg) < 0)
perror_exit ("test 2 munmap 1", 11);
x[pg] = 2;
if (setjmp (r) == 0)
{
x[0] = 1;
perror_exit ("test 2 no fault", 12);
}
if (munmap (x+pg, pg) < 0)
perror_exit ("test 2 munmap 2", 13);
}
/* 3. If we map two adjacent 1-page regions and unmap them both with
one munmap, both must go away.
Getting two adjacent 1-page regions with two mmap calls is slightly
tricky. All OS's tested skip over already-allocated blocks; therefore
we have been careful to unmap all allocated regions in previous tests.
HP/UX allocates pages backward in memory. No OS has yet been observed
to be so perverse as to leave unmapped space between consecutive calls
to mmap. */
static void
test_3 ()
{
char *x, *y, *z;
x = anonmap (pg);
if (x == (char *)MAP_FAILED)
perror_exit ("test 3 mmap 1", 14);
y = anonmap (pg);
if (y == (char *)MAP_FAILED)
perror_exit ("test 3 mmap 2", 15);
if (y != x + pg)
{
if (y == x - pg)
z = y, y = x, x = z;
else
{
fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
(unsigned long)x, (unsigned long)y);
exit (16);
}
}
signal (SIGSEGV, sigsegv);
if (setjmp (r))
perror_exit ("test 3 fault", 17);
x[0] = 1;
y[0] = 1;
if (munmap (x, pg*2) < 0)
perror_exit ("test 3 munmap", 18);
if (setjmp (r) == 0)
{
x[0] = 1;
perror_exit ("test 3 no fault 1", 19);
}
signal (SIGSEGV, sigsegv);
if (setjmp (r) == 0)
{
y[0] = 1;
perror_exit ("test 3 no fault 2", 20);
}
}
int
main ()
{
sigemptyset (&unblock_sigsegv);
sigaddset (&unblock_sigsegv, SIGSEGV);
pg = getpagesize ();
#ifndef USE_MAP_ANON
devzero = open ("/dev/zero", O_RDWR);
if (devzero < 0)
perror_exit ("open /dev/zero", 1);
#endif
test_0();
test_1();
test_2();
test_3();
exit(0); exit(0);
}], ac_cv_func_mmap_anywhere=yes, ac_cv_func_mmap_anywhere=no, }
ac_cv_func_mmap_anywhere=no)]) EOF}}}
if test $ac_cv_func_mmap_anywhere = yes; then changequote([,])dnl
AC_DEFINE(HAVE_MMAP_ANYWHERE, 1,
[Define if mmap can get us zeroed pages without MAP_FIXED.]) AC_CACHE_CHECK(for working mmap from /dev/zero,
ac_cv_func_mmap_dev_zero,
[AC_TRY_RUN(
[#include "ct-mmap.inc"],
ac_cv_func_mmap_dev_zero=yes,
[if test $? -lt 4
then ac_cv_func_mmap_dev_zero=no
else ac_cv_func_mmap_dev_zero=buggy
fi],
# If this is not cygwin, and /dev/zero is a character device, it's probably
# safe to assume it works.
[case "$host_os" in
cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
* ) if test -c /dev/zero
then ac_cv_func_mmap_dev_zero=yes
else ac_cv_func_mmap_dev_zero=no
fi ;;
esac])
])
if test $ac_cv_func_mmap_dev_zero = yes; then
AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1,
[Define if mmap can get us zeroed pages from /dev/zero.])
fi
AC_CACHE_CHECK([for working mmap with MAP_ANON(YMOUS)],
ac_cv_func_mmap_anon,
[AC_TRY_RUN(
[#define USE_MAP_ANON
#include "ct-mmap.inc"],
ac_cv_func_mmap_anon=yes,
[if test $? -lt 4
then ac_cv_func_mmap_anon=no
else ac_cv_func_mmap_anon=buggy
fi],
# Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
# just because it's there. Some SCO Un*xen define it but don't implement it.
ac_cv_func_mmap_anon=no)
])
if test $ac_cv_func_mmap_anon = yes; then
AC_DEFINE(HAVE_MMAP_ANON, 1,
[Define if mmap can get us zeroed pages using MAP_ANON(YMOUS).])
fi fi
rm -f ct-mmap.inc
]) ])
# Check whether mmap can map a plain file, without MAP_FIXED. # Check whether mmap can map a plain file, without MAP_FIXED.
AC_DEFUN([AC_FUNC_MMAP_FILE], AC_DEFUN([AC_FUNC_MMAP_FILE],
[AC_REQUIRE([AC_FUNC_MMAP_ANYWHERE])dnl [AC_CACHE_CHECK(for working mmap of a file, ac_cv_func_mmap_file,
AC_CACHE_CHECK(for working mmap of a file, ac_cv_func_mmap_file,
[# Create a file one thousand bytes long. [# Create a file one thousand bytes long.
for i in 1 2 3 4 5 6 7 8 9 0 for i in 1 2 3 4 5 6 7 8 9 0
do for j in 1 2 3 4 5 6 7 8 9 0 do for j in 1 2 3 4 5 6 7 8 9 0
......
...@@ -330,8 +330,11 @@ ...@@ -330,8 +330,11 @@
/* Define if printf supports %p. */ /* Define if printf supports %p. */
#undef HAVE_PRINTF_PTR #undef HAVE_PRINTF_PTR
/* Define if mmap can get us zeroed pages without MAP_FIXED. */ /* Define if mmap can get us zeroed pages from /dev/zero. */
#undef HAVE_MMAP_ANYWHERE #undef HAVE_MMAP_DEV_ZERO
/* Define if mmap can get us zeroed pages using MAP_ANON(YMOUS). */
#undef HAVE_MMAP_ANON
/* Define if read-only mmap of a plain file works. */ /* Define if read-only mmap of a plain file works. */
#undef HAVE_MMAP_FILE #undef HAVE_MMAP_FILE
......
...@@ -1558,7 +1558,7 @@ for ac_kw in inline __inline__ __inline; do ...@@ -1558,7 +1558,7 @@ for ac_kw in inline __inline__ __inline; do
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
} $ac_kw foo() { } int $ac_kw foo() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
...@@ -1588,7 +1588,7 @@ esac ...@@ -1588,7 +1588,7 @@ esac
# Find some useful tools # Find some useful tools
for ac_prog in gawk mawk nawk awk for ac_prog in mawk gawk nawk awk
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
...@@ -3192,55 +3192,15 @@ EOF ...@@ -3192,55 +3192,15 @@ EOF
fi fi
for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3200: checking for $ac_hdr" >&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 3205 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3210: \"$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*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_func in getpagesize for ac_func in getpagesize
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3239: checking for $ac_func" >&5 echo "configure:3199: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3244 "configure" #line 3204 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -3263,7 +3223,7 @@ $ac_func(); ...@@ -3263,7 +3223,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -3287,23 +3247,15 @@ else ...@@ -3287,23 +3247,15 @@ else
fi fi
done done
echo $ac_n "checking for working mmap which provides zeroed pages anywhere""... $ac_c" 1>&6 # The test program for the next two tests is the same except for one
echo "configure:3292: checking for working mmap which provides zeroed pages anywhere" >&5 # set of ifdefs.
if eval "test \"`echo '$''{'ac_cv_func_mmap_anywhere'+set}'`\" = set"; then cat >ct-mmap.inc <<'EOF'
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_mmap_anywhere=no
else
cat > conftest.$ac_ext <<EOF
#line 3300 "configure"
#include "confdefs.h"
/* Test by Richard Henderson and Alexandre Oliva.
Check whether mmap MAP_ANONYMOUS or mmap from /dev/zero works. */
#include <sys/types.h> #include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <fcntl.h>
#include <signal.h>
#include <setjmp.h>
#include <stdio.h>
#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
# define MAP_ANONYMOUS MAP_ANON # define MAP_ANONYMOUS MAP_ANON
...@@ -3350,59 +3302,289 @@ else ...@@ -3350,59 +3302,289 @@ else
#endif /* no HAVE_GETPAGESIZE */ #endif /* no HAVE_GETPAGESIZE */
int main() #ifndef MAP_FAILED
{ # define MAP_FAILED -1
char *x;
int fd, pg;
#ifndef MAP_ANONYMOUS
fd = open("/dev/zero", O_RDWR);
if (fd < 0)
exit(1);
#endif #endif
pg = getpagesize(); #undef perror_exit
#ifdef MAP_ANONYMOUS #define perror_exit(str, val) \
x = (char*)mmap(0, pg, PROT_READ|PROT_WRITE, do { perror(str); exit(val); } while (0)
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
/* Some versions of cygwin mmap require that munmap is called with the
same parameters as mmap. GCC expects that this is not the case.
Test for various forms of this problem. Warning - icky signal games. */
static sigset_t unblock_sigsegv;
static jmp_buf r;
static size_t pg;
static int devzero;
static char *
anonmap (size)
size_t size;
{
#ifdef USE_MAP_ANON
return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
#else #else
x = (char*)mmap(0, pg, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
MAP_PRIVATE, devzero, 0);
#endif #endif
if (x == (char *) -1) }
exit(2);
static void
sigsegv (unused)
int unused;
{
sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
longjmp (r, 1);
}
/* Basic functionality test. */
void
test_0 ()
{
char *x = anonmap (pg);
if (x == (char *) MAP_FAILED)
perror_exit("test 0 mmap", 2);
*(int *)x += 1; *(int *)x += 1;
if (munmap(x, pg) < 0) if (munmap(x, pg) < 0)
exit(3); perror_exit("test 0 munmap", 3);
}
/* 1. If we map a 2-page region and unmap its second page, the first page
must remain. */
static void
test_1 ()
{
char *x = anonmap (pg * 2);
if (x == (char *)MAP_FAILED)
perror_exit ("test 1 mmap", 4);
signal (SIGSEGV, sigsegv);
if (setjmp (r))
perror_exit ("test 1 fault", 5);
x[0] = 1;
x[pg] = 1;
if (munmap (x + pg, pg) < 0)
perror_exit ("test 1 munmap 1", 6);
x[0] = 2;
if (setjmp (r) == 0)
{
x[pg] = 1;
perror_exit ("test 1 no fault", 7);
}
if (munmap (x, pg) < 0)
perror_exit ("test 1 munmap 2", 8);
}
/* 2. If we map a 2-page region and unmap its first page, the second
page must remain. */
static void
test_2 ()
{
char *x = anonmap (pg * 2);
if (x == (char *)MAP_FAILED)
perror_exit ("test 2 mmap", 9);
signal (SIGSEGV, sigsegv);
if (setjmp (r))
perror_exit ("test 2 fault", 10);
x[0] = 1;
x[pg] = 1;
if (munmap (x, pg) < 0)
perror_exit ("test 2 munmap 1", 11);
x[pg] = 2;
if (setjmp (r) == 0)
{
x[0] = 1;
perror_exit ("test 2 no fault", 12);
}
if (munmap (x+pg, pg) < 0)
perror_exit ("test 2 munmap 2", 13);
}
/* 3. If we map two adjacent 1-page regions and unmap them both with
one munmap, both must go away.
Getting two adjacent 1-page regions with two mmap calls is slightly
tricky. All OS's tested skip over already-allocated blocks; therefore
we have been careful to unmap all allocated regions in previous tests.
HP/UX allocates pages backward in memory. No OS has yet been observed
to be so perverse as to leave unmapped space between consecutive calls
to mmap. */
static void
test_3 ()
{
char *x, *y, *z;
x = anonmap (pg);
if (x == (char *)MAP_FAILED)
perror_exit ("test 3 mmap 1", 14);
y = anonmap (pg);
if (y == (char *)MAP_FAILED)
perror_exit ("test 3 mmap 2", 15);
if (y != x + pg)
{
if (y == x - pg)
z = y, y = x, x = z;
else
{
fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
(unsigned long)x, (unsigned long)y);
exit (16);
}
}
signal (SIGSEGV, sigsegv);
if (setjmp (r))
perror_exit ("test 3 fault", 17);
x[0] = 1;
y[0] = 1;
if (munmap (x, pg*2) < 0)
perror_exit ("test 3 munmap", 18);
if (setjmp (r) == 0)
{
x[0] = 1;
perror_exit ("test 3 no fault 1", 19);
}
signal (SIGSEGV, sigsegv);
if (setjmp (r) == 0)
{
y[0] = 1;
perror_exit ("test 3 no fault 2", 20);
}
}
int
main ()
{
sigemptyset (&unblock_sigsegv);
sigaddset (&unblock_sigsegv, SIGSEGV);
pg = getpagesize ();
#ifndef USE_MAP_ANON
devzero = open ("/dev/zero", O_RDWR);
if (devzero < 0)
perror_exit ("open /dev/zero", 1);
#endif
test_0();
test_1();
test_2();
test_3();
exit(0); exit(0);
} }
EOF EOF
if { (eval echo configure:3383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
echo "configure:3498: checking for working mmap from /dev/zero" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
# If this is not cygwin, and /dev/zero is a character device, it's probably
# safe to assume it works.
case "$host_os" in
cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
* ) if test -c /dev/zero
then ac_cv_func_mmap_dev_zero=yes
else ac_cv_func_mmap_dev_zero=no
fi ;;
esac
else
cat > conftest.$ac_ext <<EOF
#line 3514 "configure"
#include "confdefs.h"
#include "ct-mmap.inc"
EOF
if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_mmap_anywhere=yes ac_cv_func_mmap_dev_zero=yes
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -fr conftest* rm -fr conftest*
ac_cv_func_mmap_anywhere=no if test $? -lt 4
then ac_cv_func_mmap_dev_zero=no
else ac_cv_func_mmap_dev_zero=buggy
fi
fi fi
rm -fr conftest* rm -fr conftest*
fi fi
fi fi
echo "$ac_t""$ac_cv_func_mmap_anywhere" 1>&6 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
if test $ac_cv_func_mmap_anywhere = yes; then if test $ac_cv_func_mmap_dev_zero = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_MMAP_ANYWHERE 1 #define HAVE_MMAP_DEV_ZERO 1
EOF EOF
fi fi
echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
echo "configure:3545: checking for working mmap with MAP_ANON(YMOUS)" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
# Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
# just because it's there. Some SCO Un*xen define it but don't implement it.
ac_cv_func_mmap_anon=no
else
cat > conftest.$ac_ext <<EOF
#line 3555 "configure"
#include "confdefs.h"
#define USE_MAP_ANON
#include "ct-mmap.inc"
EOF
if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_anon=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
if test $? -lt 4
then ac_cv_func_mmap_anon=no
else ac_cv_func_mmap_anon=buggy
fi
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
if test $ac_cv_func_mmap_anon = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_MMAP_ANON 1
EOF
fi
rm -f ct-mmap.inc
echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
echo "configure:3406: checking for working mmap of a file" >&5 echo "configure:3588: checking for working mmap of a file" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3417,7 +3599,7 @@ if test "$cross_compiling" = yes; then ...@@ -3417,7 +3599,7 @@ if test "$cross_compiling" = yes; then
ac_cv_func_mmap_file=no ac_cv_func_mmap_file=no
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3421 "configure" #line 3603 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
...@@ -3454,7 +3636,7 @@ int main() ...@@ -3454,7 +3636,7 @@ int main()
exit(0); exit(0);
} }
EOF EOF
if { (eval echo configure:3458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:3640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_mmap_file=yes ac_cv_func_mmap_file=yes
else else
...@@ -3487,12 +3669,12 @@ for ac_func in bcopy \ ...@@ -3487,12 +3669,12 @@ for ac_func in bcopy \
do do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
echo "configure:3491: checking whether $ac_func is declared" >&5 echo "configure:3673: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3496 "configure" #line 3678 "configure"
#include "confdefs.h" #include "confdefs.h"
#include "gansidecl.h" #include "gansidecl.h"
#include "system.h" #include "system.h"
...@@ -3503,7 +3685,7 @@ char *(*pfn) = (char *(*)) $ac_func ; ...@@ -3503,7 +3685,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif #endif
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes" eval "gcc_cv_have_decl_$ac_func=yes"
else else
...@@ -3596,12 +3778,12 @@ for ac_func in getrlimit setrlimit getrusage ...@@ -3596,12 +3778,12 @@ for ac_func in getrlimit setrlimit getrusage
do do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
echo "configure:3600: checking whether $ac_func is declared" >&5 echo "configure:3782: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3605 "configure" #line 3787 "configure"
#include "confdefs.h" #include "confdefs.h"
#include "gansidecl.h" #include "gansidecl.h"
#include "system.h" #include "system.h"
...@@ -3616,7 +3798,7 @@ char *(*pfn) = (char *(*)) $ac_func ; ...@@ -3616,7 +3798,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif #endif
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes" eval "gcc_cv_have_decl_$ac_func=yes"
else else
...@@ -3659,12 +3841,12 @@ CFLAGS="$saved_CFLAGS" ...@@ -3659,12 +3841,12 @@ CFLAGS="$saved_CFLAGS"
# mkdir takes a single argument on some systems. # mkdir takes a single argument on some systems.
echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
echo "configure:3663: checking if mkdir takes one argument" >&5 echo "configure:3845: checking if mkdir takes one argument" >&5
if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3668 "configure" #line 3850 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
...@@ -3681,7 +3863,7 @@ int main() { ...@@ -3681,7 +3863,7 @@ int main() {
mkdir ("foo", 0); mkdir ("foo", 0);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
gcc_cv_mkdir_takes_one_arg=no gcc_cv_mkdir_takes_one_arg=no
else else
...@@ -3992,7 +4174,7 @@ fi ...@@ -3992,7 +4174,7 @@ fi
echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
echo "configure:3996: checking for strerror in -lcposix" >&5 echo "configure:4178: checking for strerror in -lcposix" >&5
ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -4000,7 +4182,7 @@ else ...@@ -4000,7 +4182,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lcposix $LIBS" LIBS="-lcposix $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4004 "configure" #line 4186 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -4011,7 +4193,7 @@ int main() { ...@@ -4011,7 +4193,7 @@ int main() {
strerror() strerror()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -4034,18 +4216,18 @@ fi ...@@ -4034,18 +4216,18 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:4038: checking for working const" >&5 echo "configure:4220: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4043 "configure" #line 4225 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
/* Ultrix mips cc rejects this. */ /* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x; typedef int charset[2]; const charset x = {0,0};
/* SunOS 4.1.1 cc rejects this. */ /* SunOS 4.1.1 cc rejects this. */
char const *const *ccp; char const *const *ccp;
char **p; char **p;
...@@ -4088,7 +4270,7 @@ ccp = (char const *const *) p; ...@@ -4088,7 +4270,7 @@ ccp = (char const *const *) p;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_const=yes ac_cv_c_const=yes
else else
...@@ -4109,12 +4291,12 @@ EOF ...@@ -4109,12 +4291,12 @@ EOF
fi fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6 echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:4113: checking for off_t" >&5 echo "configure:4295: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4118 "configure" #line 4300 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
...@@ -4142,12 +4324,12 @@ EOF ...@@ -4142,12 +4324,12 @@ EOF
fi fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:4146: checking for size_t" >&5 echo "configure:4328: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4151 "configure" #line 4333 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
...@@ -4177,19 +4359,19 @@ fi ...@@ -4177,19 +4359,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless! # for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:4181: checking for working alloca.h" >&5 echo "configure:4363: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4186 "configure" #line 4368 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <alloca.h> #include <alloca.h>
int main() { int main() {
char *p = alloca(2 * sizeof(int)); void *p = alloca(2 * sizeof(int));
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_alloca_h=yes ac_cv_header_alloca_h=yes
else else
...@@ -4210,12 +4392,12 @@ EOF ...@@ -4210,12 +4392,12 @@ EOF
fi fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6 echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:4214: checking for alloca" >&5 echo "configure:4396: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4219 "configure" #line 4401 "configure"
#include "confdefs.h" #include "confdefs.h"
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -4243,7 +4425,7 @@ int main() { ...@@ -4243,7 +4425,7 @@ int main() {
char *p = (char *) alloca(1); char *p = (char *) alloca(1);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_func_alloca_works=yes ac_cv_func_alloca_works=yes
else else
...@@ -4275,12 +4457,12 @@ EOF ...@@ -4275,12 +4457,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:4279: checking whether alloca needs Cray hooks" >&5 echo "configure:4461: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4284 "configure" #line 4466 "configure"
#include "confdefs.h" #include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2) #if defined(CRAY) && ! defined(CRAY2)
webecray webecray
...@@ -4305,12 +4487,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 ...@@ -4305,12 +4487,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4309: checking for $ac_func" >&5 echo "configure:4491: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4314 "configure" #line 4496 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -4333,7 +4515,7 @@ $ac_func(); ...@@ -4333,7 +4515,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -4360,7 +4542,7 @@ done ...@@ -4360,7 +4542,7 @@ done
fi fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:4364: checking stack direction for C alloca" >&5 echo "configure:4546: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4368,7 +4550,7 @@ else ...@@ -4368,7 +4550,7 @@ else
ac_cv_c_stack_direction=0 ac_cv_c_stack_direction=0
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4372 "configure" #line 4554 "configure"
#include "confdefs.h" #include "confdefs.h"
find_stack_direction () find_stack_direction ()
{ {
...@@ -4387,7 +4569,7 @@ main () ...@@ -4387,7 +4569,7 @@ main ()
exit (find_stack_direction() < 0); exit (find_stack_direction() < 0);
} }
EOF EOF
if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_c_stack_direction=1 ac_cv_c_stack_direction=1
else else
...@@ -4414,17 +4596,17 @@ unistd.h sys/param.h ...@@ -4414,17 +4596,17 @@ unistd.h sys/param.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4418: checking for $ac_hdr" >&5 echo "configure:4600: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4423 "configure" #line 4605 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -4454,12 +4636,12 @@ done ...@@ -4454,12 +4636,12 @@ done
strdup __argz_count __argz_stringify __argz_next strdup __argz_count __argz_stringify __argz_next
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4458: checking for $ac_func" >&5 echo "configure:4640: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4463 "configure" #line 4645 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -4482,7 +4664,7 @@ $ac_func(); ...@@ -4482,7 +4664,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -4511,12 +4693,12 @@ done ...@@ -4511,12 +4693,12 @@ done
for ac_func in stpcpy for ac_func in stpcpy
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4515: checking for $ac_func" >&5 echo "configure:4697: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4520 "configure" #line 4702 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -4539,7 +4721,7 @@ $ac_func(); ...@@ -4539,7 +4721,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -4573,19 +4755,19 @@ EOF ...@@ -4573,19 +4755,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
echo "configure:4577: checking for LC_MESSAGES" >&5 echo "configure:4759: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4582 "configure" #line 4764 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <locale.h> #include <locale.h>
int main() { int main() {
return LC_MESSAGES return LC_MESSAGES
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
am_cv_val_LC_MESSAGES=yes am_cv_val_LC_MESSAGES=yes
else else
...@@ -4606,7 +4788,7 @@ EOF ...@@ -4606,7 +4788,7 @@ EOF
fi fi
fi fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
echo "configure:4610: checking whether NLS is requested" >&5 echo "configure:4792: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given. # Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then if test "${enable_nls+set}" = set; then
enableval="$enable_nls" enableval="$enable_nls"
...@@ -4626,7 +4808,7 @@ fi ...@@ -4626,7 +4808,7 @@ fi
EOF EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
echo "configure:4630: checking whether included gettext is requested" >&5 echo "configure:4812: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given. # Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext" withval="$with_included_gettext"
...@@ -4645,17 +4827,17 @@ fi ...@@ -4645,17 +4827,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
echo "configure:4649: checking for libintl.h" >&5 echo "configure:4831: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4654 "configure" #line 4836 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <libintl.h> #include <libintl.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -4672,19 +4854,19 @@ fi ...@@ -4672,19 +4854,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
echo "configure:4676: checking for gettext in libc" >&5 echo "configure:4858: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4681 "configure" #line 4863 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <libintl.h> #include <libintl.h>
int main() { int main() {
return (int) gettext ("") return (int) gettext ("")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
gt_cv_func_gettext_libc=yes gt_cv_func_gettext_libc=yes
else else
...@@ -4700,7 +4882,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 ...@@ -4700,7 +4882,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
echo "configure:4704: checking for bindtextdomain in -lintl" >&5 echo "configure:4886: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -4708,7 +4890,7 @@ else ...@@ -4708,7 +4890,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS" LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4712 "configure" #line 4894 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -4719,7 +4901,7 @@ int main() { ...@@ -4719,7 +4901,7 @@ int main() {
bindtextdomain() bindtextdomain()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -4735,12 +4917,12 @@ fi ...@@ -4735,12 +4917,12 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
echo "configure:4739: checking for gettext in libintl" >&5 echo "configure:4921: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
echo "configure:4744: checking for gettext in -lintl" >&5 echo "configure:4926: checking for gettext in -lintl" >&5
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -4748,7 +4930,7 @@ else ...@@ -4748,7 +4930,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS" LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4752 "configure" #line 4934 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -4759,7 +4941,7 @@ int main() { ...@@ -4759,7 +4941,7 @@ int main() {
gettext() gettext()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -4798,7 +4980,7 @@ EOF ...@@ -4798,7 +4980,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args. # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2 set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4802: checking for $ac_word" >&5 echo "configure:4984: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4832,12 +5014,12 @@ fi ...@@ -4832,12 +5014,12 @@ fi
for ac_func in dcgettext for ac_func in dcgettext
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4836: checking for $ac_func" >&5 echo "configure:5018: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4841 "configure" #line 5023 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -4860,7 +5042,7 @@ $ac_func(); ...@@ -4860,7 +5042,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:5046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -4887,7 +5069,7 @@ done ...@@ -4887,7 +5069,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args. # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2 set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4891: checking for $ac_word" >&5 echo "configure:5073: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4923,7 +5105,7 @@ fi ...@@ -4923,7 +5105,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4927: checking for $ac_word" >&5 echo "configure:5109: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4955,7 +5137,7 @@ else ...@@ -4955,7 +5137,7 @@ else
fi fi
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4959 "configure" #line 5141 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
...@@ -4963,7 +5145,7 @@ extern int _nl_msg_cat_cntr; ...@@ -4963,7 +5145,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr return _nl_msg_cat_cntr
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
CATOBJEXT=.gmo CATOBJEXT=.gmo
DATADIRNAME=share DATADIRNAME=share
...@@ -4988,7 +5170,7 @@ fi ...@@ -4988,7 +5170,7 @@ fi
if test "$CATOBJEXT" = "NONE"; then if test "$CATOBJEXT" = "NONE"; then
echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
echo "configure:4992: checking whether catgets can be used" >&5 echo "configure:5174: checking whether catgets can be used" >&5
# Check whether --with-catgets or --without-catgets was given. # Check whether --with-catgets or --without-catgets was given.
if test "${with_catgets+set}" = set; then if test "${with_catgets+set}" = set; then
withval="$with_catgets" withval="$with_catgets"
...@@ -5001,7 +5183,7 @@ fi ...@@ -5001,7 +5183,7 @@ fi
if test "$nls_cv_use_catgets" = "yes"; then if test "$nls_cv_use_catgets" = "yes"; then
echo $ac_n "checking for main in -li""... $ac_c" 1>&6 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
echo "configure:5005: checking for main in -li" >&5 echo "configure:5187: checking for main in -li" >&5
ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -5009,14 +5191,14 @@ else ...@@ -5009,14 +5191,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-li $LIBS" LIBS="-li $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5013 "configure" #line 5195 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -5044,12 +5226,12 @@ else ...@@ -5044,12 +5226,12 @@ else
fi fi
echo $ac_n "checking for catgets""... $ac_c" 1>&6 echo $ac_n "checking for catgets""... $ac_c" 1>&6
echo "configure:5048: checking for catgets" >&5 echo "configure:5230: checking for catgets" >&5
if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5053 "configure" #line 5235 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char catgets(); below. */ which can conflict with char catgets(); below. */
...@@ -5072,7 +5254,7 @@ catgets(); ...@@ -5072,7 +5254,7 @@ catgets();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_catgets=yes" eval "ac_cv_func_catgets=yes"
else else
...@@ -5094,7 +5276,7 @@ EOF ...@@ -5094,7 +5276,7 @@ EOF
# Extract the first word of "gencat", so it can be a program name with args. # Extract the first word of "gencat", so it can be a program name with args.
set dummy gencat; ac_word=$2 set dummy gencat; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5098: checking for $ac_word" >&5 echo "configure:5280: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -5130,7 +5312,7 @@ fi ...@@ -5130,7 +5312,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args. # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2 set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5134: checking for $ac_word" >&5 echo "configure:5316: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -5167,7 +5349,7 @@ fi ...@@ -5167,7 +5349,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args. # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2 set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5171: checking for $ac_word" >&5 echo "configure:5353: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -5205,7 +5387,7 @@ fi ...@@ -5205,7 +5387,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5209: checking for $ac_word" >&5 echo "configure:5391: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -5263,7 +5445,7 @@ fi ...@@ -5263,7 +5445,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args. # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2 set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5267: checking for $ac_word" >&5 echo "configure:5449: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -5297,7 +5479,7 @@ fi ...@@ -5297,7 +5479,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args. # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2 set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5301: checking for $ac_word" >&5 echo "configure:5483: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -5336,7 +5518,7 @@ fi ...@@ -5336,7 +5518,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5340: checking for $ac_word" >&5 echo "configure:5522: checking for $ac_word" >&5
if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -5435,7 +5617,7 @@ fi ...@@ -5435,7 +5617,7 @@ fi
LINGUAS= LINGUAS=
else else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
echo "configure:5439: checking for catalogs to be installed" >&5 echo "configure:5621: checking for catalogs to be installed" >&5
if test "x$LINGUAS" = "x"; then if test "x$LINGUAS" = "x"; then
LINGUAS=$ALL_LINGUAS LINGUAS=$ALL_LINGUAS
else else
...@@ -5467,17 +5649,17 @@ echo "configure:5439: checking for catalogs to be installed" >&5 ...@@ -5467,17 +5649,17 @@ echo "configure:5439: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
echo "configure:5471: checking for linux/version.h" >&5 echo "configure:5653: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5476 "configure" #line 5658 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <linux/version.h> #include <linux/version.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:5663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -5552,7 +5734,7 @@ fi ...@@ -5552,7 +5734,7 @@ fi
echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
echo "configure:5556: checking whether windows registry support is requested" >&5 echo "configure:5738: checking whether windows registry support is requested" >&5
if test x$enable_win32_registry != xno; then if test x$enable_win32_registry != xno; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define ENABLE_WIN32_REGISTRY 1 #define ENABLE_WIN32_REGISTRY 1
...@@ -5581,7 +5763,7 @@ esac ...@@ -5581,7 +5763,7 @@ esac
if test x$enable_win32_registry != xno; then if test x$enable_win32_registry != xno; then
echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
echo "configure:5585: checking registry key on windows hosts" >&5 echo "configure:5767: checking registry key on windows hosts" >&5
cat >> confdefs.h <<EOF cat >> confdefs.h <<EOF
#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
EOF EOF
...@@ -5761,7 +5943,7 @@ fi ...@@ -5761,7 +5943,7 @@ fi
# Figure out what assembler we will be using. # Figure out what assembler we will be using.
echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
echo "configure:5765: checking what assembler to use" >&5 echo "configure:5947: checking what assembler to use" >&5
gcc_cv_as= gcc_cv_as=
gcc_cv_gas_major_version= gcc_cv_gas_major_version=
gcc_cv_gas_minor_version= gcc_cv_gas_minor_version=
...@@ -5846,7 +6028,7 @@ fi ...@@ -5846,7 +6028,7 @@ fi
# Figure out what nm we will be using. # Figure out what nm we will be using.
echo $ac_n "checking what nm to use""... $ac_c" 1>&6 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
echo "configure:5850: checking what nm to use" >&5 echo "configure:6032: checking what nm to use" >&5
if test -x nm$host_exeext; then if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext gcc_cv_nm=./nm$host_exeext
elif test x$host = x$target; then elif test x$host = x$target; then
...@@ -5857,7 +6039,7 @@ echo "$ac_t""$gcc_cv_nm" 1>&6 ...@@ -5857,7 +6039,7 @@ echo "$ac_t""$gcc_cv_nm" 1>&6
# Figure out what assembler alignment features are present. # Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:5861: checking assembler alignment features" >&5 echo "configure:6043: checking assembler alignment features" >&5
gcc_cv_as_alignment_features=none gcc_cv_as_alignment_features=none
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
# Gas version 2.6 and later support for .balign and .p2align. # Gas version 2.6 and later support for .balign and .p2align.
...@@ -5905,7 +6087,7 @@ fi ...@@ -5905,7 +6087,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:5909: checking assembler subsection support" >&5 echo "configure:6091: checking assembler subsection support" >&5
gcc_cv_as_subsections=no gcc_cv_as_subsections=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
...@@ -5945,7 +6127,7 @@ fi ...@@ -5945,7 +6127,7 @@ fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
echo "configure:5949: checking assembler weak support" >&5 echo "configure:6131: checking assembler weak support" >&5
gcc_cv_as_weak=no gcc_cv_as_weak=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
...@@ -5968,7 +6150,7 @@ fi ...@@ -5968,7 +6150,7 @@ fi
echo "$ac_t""$gcc_cv_as_weak" 1>&6 echo "$ac_t""$gcc_cv_as_weak" 1>&6
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
echo "configure:5972: checking assembler hidden support" >&5 echo "configure:6154: checking assembler hidden support" >&5
gcc_cv_as_hidden=no gcc_cv_as_hidden=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
...@@ -5994,7 +6176,7 @@ echo "$ac_t""$gcc_cv_as_hidden" 1>&6 ...@@ -5994,7 +6176,7 @@ echo "$ac_t""$gcc_cv_as_hidden" 1>&6
case "$target" in case "$target" in
sparc*-*-*) sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
echo "configure:5998: checking assembler .register pseudo-op support" >&5 echo "configure:6180: checking assembler .register pseudo-op support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -6022,7 +6204,7 @@ EOF ...@@ -6022,7 +6204,7 @@ EOF
fi fi
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
echo "configure:6026: checking assembler supports -relax" >&5 echo "configure:6208: checking assembler supports -relax" >&5
if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -6052,7 +6234,7 @@ EOF ...@@ -6052,7 +6234,7 @@ EOF
case "$tm_file" in case "$tm_file" in
*64*) *64*)
echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6 echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
echo "configure:6056: checking for 64 bit support in assembler ($gcc_cv_as)" >&5 echo "configure:6238: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -6097,7 +6279,7 @@ EOF ...@@ -6097,7 +6279,7 @@ EOF
if test "x$gcc_cv_as_flags64" != xno; then if test "x$gcc_cv_as_flags64" != xno; then
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
echo "configure:6101: checking for assembler offsetable %lo() support" >&5 echo "configure:6283: checking for assembler offsetable %lo() support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -6136,7 +6318,7 @@ EOF ...@@ -6136,7 +6318,7 @@ EOF
i[34567]86-*-*) i[34567]86-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
echo "configure:6140: checking assembler instructions" >&5 echo "configure:6322: checking assembler instructions" >&5
gcc_cv_as_instructions= gcc_cv_as_instructions=
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
...@@ -6165,7 +6347,7 @@ EOF ...@@ -6165,7 +6347,7 @@ EOF
esac esac
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
echo "configure:6169: checking assembler dwarf2 debug_line support" >&5 echo "configure:6351: checking assembler dwarf2 debug_line support" >&5
gcc_cv_as_dwarf2_debug_line=no gcc_cv_as_dwarf2_debug_line=no
# ??? Not all targets support dwarf2 debug_line, even within a version # ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any # of gas. Moreover, we need to emit a valid instruction to trigger any
...@@ -6284,7 +6466,8 @@ if test "${with_gc+set}" = set; then ...@@ -6284,7 +6466,8 @@ if test "${with_gc+set}" = set; then
;; ;;
esac esac
else else
if test $ac_cv_func_mmap_anywhere = yes \ if test $ac_cv_func_mmap_dev_zero = yes \
|| test $ac_cv_func_mmap_anon = yes \
|| test $ac_cv_func_valloc = yes; then || test $ac_cv_func_valloc = yes; then
GGC=ggc-page GGC=ggc-page
else else
...@@ -6338,7 +6521,7 @@ EOF ...@@ -6338,7 +6521,7 @@ EOF
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:6342: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo "configure:6525: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode" enableval="$enable_maintainer_mode"
......
...@@ -1565,7 +1565,8 @@ AC_ARG_WITH(gc, ...@@ -1565,7 +1565,8 @@ AC_ARG_WITH(gc,
AC_MSG_ERROR([$withval is an invalid option to --with-gc]) AC_MSG_ERROR([$withval is an invalid option to --with-gc])
;; ;;
esac], esac],
[if test $ac_cv_func_mmap_anywhere = yes \ [if test $ac_cv_func_mmap_dev_zero = yes \
|| test $ac_cv_func_mmap_anon = yes \
|| test $ac_cv_func_valloc = yes; then || test $ac_cv_func_valloc = yes; then
GGC=ggc-page GGC=ggc-page
else else
......
...@@ -29,16 +29,37 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,16 +29,37 @@ Boston, MA 02111-1307, USA. */
#include "ggc.h" #include "ggc.h"
#include "timevar.h" #include "timevar.h"
#ifdef HAVE_MMAP_ANYWHERE /* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
#include <sys/mman.h> file open. Prefer either to valloc. */
#ifdef HAVE_MMAP_ANON
# undef HAVE_MMAP_DEV_ZERO
# undef HAVE_VALLOC
# include <sys/mman.h>
# ifndef MAP_FAILED
# define MAP_FAILED -1
# endif
# if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
# define MAP_ANONYMOUS MAP_ANON
# endif
# define USING_MMAP
#endif #endif
#ifndef MAP_FAILED #ifdef HAVE_MMAP_DEV_ZERO
#define MAP_FAILED -1 # undef HAVE_VALLOC
# include <sys/mman.h>
# ifndef MAP_FAILED
# define MAP_FAILED -1
# endif
# define USING_MMAP
#endif #endif
#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) #ifdef HAVE_VALLOC
#define MAP_ANONYMOUS MAP_ANON # undef MAP_FAILED
# define MAP_FAILED 0
#endif #endif
/* Stategy: /* Stategy:
...@@ -279,7 +300,7 @@ static struct globals ...@@ -279,7 +300,7 @@ static struct globals
unsigned short context_depth; unsigned short context_depth;
/* A file descriptor open to /dev/zero for reading. */ /* A file descriptor open to /dev/zero for reading. */
#if defined (HAVE_MMAP_ANYWHERE) && !defined(MAP_ANONYMOUS) #if defined (HAVE_MMAP_DEV_ZERO)
int dev_zero_fd; int dev_zero_fd;
#endif #endif
...@@ -445,38 +466,31 @@ debug_print_page_list (order) ...@@ -445,38 +466,31 @@ debug_print_page_list (order)
} }
/* Allocate SIZE bytes of anonymous memory, preferably near PREF, /* Allocate SIZE bytes of anonymous memory, preferably near PREF,
(if non-null). */ (if non-null). The ifdef structure here is intended to cause a
compile error unless exactly one of the HAVE_* is defined. */
static inline char * static inline char *
alloc_anon (pref, size) alloc_anon (pref, size)
char *pref ATTRIBUTE_UNUSED; char *pref ATTRIBUTE_UNUSED;
size_t size; size_t size;
{ {
char *page; #ifdef HAVE_MMAP_ANON
char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE,
#ifdef HAVE_MMAP_ANYWHERE
#ifdef MAP_ANONYMOUS
page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
#else #endif
page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE, #ifdef HAVE_MMAP_DEV_ZERO
char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE, G.dev_zero_fd, 0); MAP_PRIVATE, G.dev_zero_fd, 0);
#endif #endif
if (page == (char *) MAP_FAILED)
{
fputs ("Virtual memory exhausted!\n", stderr);
exit(1);
}
#else
#ifdef HAVE_VALLOC #ifdef HAVE_VALLOC
page = (char *) valloc (size); char *page = (char *) valloc (size);
if (!page) #endif
if (page == (char *) MAP_FAILED)
{ {
fputs ("Virtual memory exhausted!\n", stderr); fputs ("Virtual memory exhausted!\n", stderr);
exit(1); exit(1);
} }
#endif /* HAVE_VALLOC */
#endif /* HAVE_MMAP_ANYWHERE */
/* Remember that we allocated this memory. */ /* Remember that we allocated this memory. */
G.bytes_mapped += size; G.bytes_mapped += size;
...@@ -526,7 +540,7 @@ alloc_page (order) ...@@ -526,7 +540,7 @@ alloc_page (order)
else else
free (p); free (p);
} }
#ifdef HAVE_MMAP_ANYWHERE #ifdef USING_MMAP
else if (entry_size == G.pagesize) else if (entry_size == G.pagesize)
{ {
/* We want just one page. Allocate a bunch of them and put the /* We want just one page. Allocate a bunch of them and put the
...@@ -601,7 +615,7 @@ release_pages () ...@@ -601,7 +615,7 @@ release_pages ()
{ {
page_entry *p, *next; page_entry *p, *next;
#ifdef HAVE_MMAP_ANYWHERE #ifdef USING_MMAP
char *start; char *start;
size_t len; size_t len;
...@@ -628,8 +642,6 @@ release_pages () ...@@ -628,8 +642,6 @@ release_pages ()
G.bytes_mapped -= len; G.bytes_mapped -= len;
} }
#else #else
#ifdef HAVE_VALLOC
for (p = G.free_pages; p; p = next) for (p = G.free_pages; p; p = next)
{ {
next = p->next; next = p->next;
...@@ -637,8 +649,7 @@ release_pages () ...@@ -637,8 +649,7 @@ release_pages ()
G.bytes_mapped -= p->bytes; G.bytes_mapped -= p->bytes;
free (p); free (p);
} }
#endif /* HAVE_VALLOC */ #endif /* USING_MMAP */
#endif /* HAVE_MMAP_ANYWHERE */
G.free_pages = NULL; G.free_pages = NULL;
} }
...@@ -849,7 +860,7 @@ init_ggc () ...@@ -849,7 +860,7 @@ init_ggc ()
G.pagesize = getpagesize(); G.pagesize = getpagesize();
G.lg_pagesize = exact_log2 (G.pagesize); G.lg_pagesize = exact_log2 (G.pagesize);
#if defined (HAVE_MMAP_ANYWHERE) && !defined(MAP_ANONYMOUS) #ifdef HAVE_MMAP_DEV_ZERO
G.dev_zero_fd = open ("/dev/zero", O_RDONLY); G.dev_zero_fd = open ("/dev/zero", O_RDONLY);
if (G.dev_zero_fd == -1) if (G.dev_zero_fd == -1)
abort (); abort ();
...@@ -863,13 +874,14 @@ init_ggc () ...@@ -863,13 +874,14 @@ init_ggc ()
G.allocated_last_gc = GGC_MIN_LAST_ALLOCATED; G.allocated_last_gc = GGC_MIN_LAST_ALLOCATED;
#ifdef HAVE_MMAP_ANYWHERE #ifdef USING_MMAP
/* StunOS has an amazing off-by-one error for the first mmap allocation /* StunOS has an amazing off-by-one error for the first mmap allocation
after fiddling with RLIMIT_STACK. The result, as hard as it is to after fiddling with RLIMIT_STACK. The result, as hard as it is to
believe, is an unaligned page allocation, which would cause us to believe, is an unaligned page allocation, which would cause us to
hork badly if we tried to use it. */ hork badly if we tried to use it. */
{ {
char *p = alloc_anon (NULL, G.pagesize); char *p = alloc_anon (NULL, G.pagesize);
struct page_entry *e;
if ((size_t)p & (G.pagesize - 1)) if ((size_t)p & (G.pagesize - 1))
{ {
/* How losing. Discard this one and try another. If we still /* How losing. Discard this one and try another. If we still
...@@ -879,7 +891,13 @@ init_ggc () ...@@ -879,7 +891,13 @@ init_ggc ()
if ((size_t)p & (G.pagesize - 1)) if ((size_t)p & (G.pagesize - 1))
abort (); abort ();
} }
munmap (p, G.pagesize);
/* We have a good page, might as well hold onto it... */
e = (struct page_entry *) xcalloc (1, sizeof (struct page_entry));
e->bytes = G.pagesize;
e->page = p;
e->next = G.free_pages;
G.free_pages = e;
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment