diff options
author | Andreas Tobler <a.tobler@schweiz.ch> | 2006-05-01 22:02:27 +0200 |
---|---|---|
committer | Andreas Tobler <andreast@gcc.gnu.org> | 2006-05-01 22:02:27 +0200 |
commit | a5dfac10a2ec09de7b9763226161dfc90a2a259d (patch) | |
tree | 59eda92264b56d60be33d4927a6af5bea2a4c477 /libjava | |
parent | 763f45275b818e0e55fb069c096c5fcfc02865bd (diff) | |
download | gcc-a5dfac10a2ec09de7b9763226161dfc90a2a259d.zip gcc-a5dfac10a2ec09de7b9763226161dfc90a2a259d.tar.gz gcc-a5dfac10a2ec09de7b9763226161dfc90a2a259d.tar.bz2 |
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
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rwxr-xr-x | libjava/configure | 81 | ||||
-rw-r--r-- | libjava/configure.ac | 27 | ||||
-rw-r--r-- | libjava/include/config.h.in | 3 |
4 files changed, 10 insertions, 107 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 61d096a..c002c28 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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> Andrew Haley <aph@redhat.com> diff --git a/libjava/configure b/libjava/configure index 6361ecf..070b010 100755 --- a/libjava/configure +++ b/libjava/configure @@ -9427,12 +9427,13 @@ else + 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 @@ -16410,84 +16411,6 @@ _ACEOF 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. diff --git a/libjava/configure.ac b/libjava/configure.ac index 5732fb2..69f4317 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -895,7 +895,7 @@ else 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 @@ -1352,31 +1352,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm tim; tim.t 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= diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in index 8dcd658..a57dd83 100644 --- a/libjava/include/config.h.in +++ b/libjava/include/config.h.in @@ -184,8 +184,7 @@ /* Define is you have 'mktime' in <time.h> */ #undef HAVE_MKTIME -/* Define to 1 if you have a working `mmap' system call w/o fixed address - ability. */ +/* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP /* Define to 1 if you have the <netdb.h> header file. */ |