+
for ac_func in strerror ioctl select fstat open fsync sleep opendir \
gmtime_r localtime_r readdir_r getpwuid_r getcwd \
access stat mkdir rename rmdir unlink realpath utime chmod \
nl_langinfo setlocale \
inet_pton uname inet_ntoa \
- fork execvp pipe sigaction ftruncate
+ fork execvp pipe sigaction ftruncate mmap
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
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
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
access stat mkdir rename rmdir unlink realpath utime chmod \
nl_langinfo setlocale \
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_HEADERS(execinfo.h unistd.h dlfcn.h)
# Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
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)
SYSDEP_SOURCES=