configure.ac: Simplify the mmap check a bit more.
2006-05-01 Andreas Tobler <a.tobler@schweiz.ch> * configure.ac: Simplify the mmap check a bit more. * configure: Rebuilt. * include/config.h.in: Likewise. From-SVN: r113426
This commit is contained in:
parent
763f45275b
commit
a5dfac10a2
|
@ -1,3 +1,9 @@
|
||||||
|
2006-05-01 Andreas Tobler <a.tobler@schweiz.ch>
|
||||||
|
|
||||||
|
* configure.ac: Simplify the mmap check a bit more.
|
||||||
|
* configure: Rebuilt.
|
||||||
|
* include/config.h.in: Likewise.
|
||||||
|
|
||||||
2006-05-01 Roger Sayle <roger@eyesopen.com>
|
2006-05-01 Roger Sayle <roger@eyesopen.com>
|
||||||
Andrew Haley <aph@redhat.com>
|
Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
|
|
|
@ -9425,6 +9425,7 @@ else
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_func in strerror ioctl select fstat open fsync sleep opendir \
|
for ac_func in strerror ioctl select fstat open fsync sleep opendir \
|
||||||
|
@ -9432,7 +9433,7 @@ for ac_func in strerror ioctl select fstat open fsync sleep opendir \
|
||||||
access stat mkdir rename rmdir unlink realpath utime chmod \
|
access stat mkdir rename rmdir unlink realpath utime chmod \
|
||||||
nl_langinfo setlocale \
|
nl_langinfo setlocale \
|
||||||
inet_pton uname inet_ntoa \
|
inet_pton uname inet_ntoa \
|
||||||
fork execvp pipe sigaction ftruncate
|
fork execvp pipe sigaction ftruncate mmap
|
||||||
do
|
do
|
||||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||||
|
@ -16410,84 +16411,6 @@ _ACEOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# AC_FUNC_MMAP goes to far and checks for mmap fixed, we do only need mmap
|
|
||||||
# at a mmap selected address. See
|
|
||||||
# gnu/java/nio/channels/natFileChannelPosix.cc
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for mmap" >&5
|
|
||||||
echo $ECHO_N "checking for mmap... $ECHO_C" >&6
|
|
||||||
if test "${ac_cv_func_mmap_ok+set}" = set; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
if test x$gcc_no_link = xyes; then
|
|
||||||
{ { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
|
|
||||||
echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
|
|
||||||
{ (exit 1); exit 1; }; }
|
|
||||||
fi
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
/* confdefs.h. */
|
|
||||||
_ACEOF
|
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
mmap((void *)0, 0, PROT_READ, 0, 0, 0);
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|
||||||
(eval $ac_link) 2>conftest.er1
|
|
||||||
ac_status=$?
|
|
||||||
grep -v '^ *+' conftest.er1 >conftest.err
|
|
||||||
rm -f conftest.er1
|
|
||||||
cat conftest.err >&5
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); } &&
|
|
||||||
{ ac_try='test -z "$ac_c_werror_flag"
|
|
||||||
|| test ! -s conftest.err'
|
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
(eval $ac_try) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); }; } &&
|
|
||||||
{ ac_try='test -s conftest$ac_exeext'
|
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
(eval $ac_try) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); }; }; then
|
|
||||||
ac_cv_func_mmap_ok=yes
|
|
||||||
else
|
|
||||||
echo "$as_me: failed program was:" >&5
|
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
|
||||||
|
|
||||||
ac_cv_func_mmap_ok=no
|
|
||||||
fi
|
|
||||||
rm -f conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: result: $ac_cv_func_mmap_ok" >&5
|
|
||||||
echo "${ECHO_T}$ac_cv_func_mmap_ok" >&6
|
|
||||||
if test $ac_cv_func_mmap_ok = yes
|
|
||||||
then
|
|
||||||
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
|
||||||
#define HAVE_MMAP 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
for ac_prog in perl
|
for ac_prog in perl
|
||||||
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.
|
||||||
|
|
|
@ -895,7 +895,7 @@ else
|
||||||
access stat mkdir rename rmdir unlink realpath utime chmod \
|
access stat mkdir rename rmdir unlink realpath utime chmod \
|
||||||
nl_langinfo setlocale \
|
nl_langinfo setlocale \
|
||||||
inet_pton uname inet_ntoa \
|
inet_pton uname inet_ntoa \
|
||||||
fork execvp pipe sigaction ftruncate])
|
fork execvp pipe sigaction ftruncate mmap])
|
||||||
AC_CHECK_FUNCS(inet_aton inet_addr, break)
|
AC_CHECK_FUNCS(inet_aton inet_addr, break)
|
||||||
AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
|
AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
|
||||||
# Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
|
# Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
|
||||||
|
@ -1352,31 +1352,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm tim; tim.t
|
||||||
|
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
|
|
||||||
dnl Check for mmap()
|
|
||||||
# AC_FUNC_MMAP goes to far and checks for mmap fixed, we do only need mmap
|
|
||||||
# at a mmap selected address. See
|
|
||||||
# gnu/java/nio/channels/natFileChannelPosix.cc
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([for mmap])
|
|
||||||
AC_CACHE_VAL(ac_cv_func_mmap_ok,
|
|
||||||
[AC_TRY_LINK(
|
|
||||||
changequote(<<, >>)dnl
|
|
||||||
<<
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
>>,
|
|
||||||
changequote([, ])dnl
|
|
||||||
[mmap((void *)0, 0, PROT_READ, 0, 0, 0);],
|
|
||||||
ac_cv_func_mmap_ok=yes,
|
|
||||||
ac_cv_func_mmap_ok=no)] )
|
|
||||||
AC_MSG_RESULT($ac_cv_func_mmap_ok)
|
|
||||||
if test $ac_cv_func_mmap_ok = yes
|
|
||||||
then
|
|
||||||
AC_DEFINE(HAVE_MMAP, 1, [ Define to 1 if you have a working `mmap' system call w/o fixed address ability.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CHECK_PROGS(PERL, perl, false)
|
AC_CHECK_PROGS(PERL, perl, false)
|
||||||
|
|
||||||
SYSDEP_SOURCES=
|
SYSDEP_SOURCES=
|
||||||
|
|
|
@ -184,8 +184,7 @@
|
||||||
/* Define is you have 'mktime' in <time.h> */
|
/* Define is you have 'mktime' in <time.h> */
|
||||||
#undef HAVE_MKTIME
|
#undef HAVE_MKTIME
|
||||||
|
|
||||||
/* Define to 1 if you have a working `mmap' system call w/o fixed address
|
/* Define to 1 if you have the `mmap' function. */
|
||||||
ability. */
|
|
||||||
#undef HAVE_MMAP
|
#undef HAVE_MMAP
|
||||||
|
|
||||||
/* Define to 1 if you have the <netdb.h> header file. */
|
/* Define to 1 if you have the <netdb.h> header file. */
|
||||||
|
|
Loading…
Reference in New Issue