OSDN Git Service

2006-05-20 Andreas Tobler <a.tobler@schweiz.ch>
[pf3gnuchains/gcc-fork.git] / libjava / configure.ac
index 86359f1..6b97979 100644 (file)
@@ -805,7 +805,7 @@ case "$THREADS" in
        THREADLDFLAGS=-pthread
        THREADSPEC=-lpthread
        ;;
-     alpha*-dec-osf*)
+     alpha*-dec-osf* | hppa*-hp-hpux*)
        THREADCXXFLAGS=-pthread
        # boehm-gc needs some functions from librt, so link that too.
        THREADLIBS='-lpthread -lrt'
@@ -895,11 +895,14 @@ 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) 
+   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_CHECK_LIB(dl, dladdr, [
-       AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])
+       AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])], [
+       AC_CHECK_LIB(dld, dladdr, [
+       AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])])
 
    if test x"$build" = x"$host"; then
      AC_CHECK_FILES(/proc/self/exe, [
@@ -1053,9 +1056,11 @@ else
    if test "$memcpy_found" = no; then
       AC_MSG_ERROR([memcpy is required])
    fi
-
+   # Do an additional check on dld, HP-UX for example has dlopen in libdld.sl
    AC_CHECK_LIB(dl, dlopen, [
-       AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])])
+       AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])], [
+       AC_CHECK_LIB(dld, dlopen, [
+       AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])])])
 
    # Some library-finding code we stole from Tcl.
    #--------------------------------------------------------------------
@@ -1346,7 +1351,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm tim; tim.t
           [AC_MSG_RESULT(no)])])])
 
 AC_FUNC_ALLOCA
-AC_FUNC_MMAP
 
 AC_CHECK_PROGS(PERL, perl, false)
 
@@ -1367,6 +1371,9 @@ case "${host}" in
  hppa*-*-linux*)
     SIGNAL_HANDLER=include/pa-signal.h
     ;;
+ hppa*-hp-hpux*)
+    SIGNAL_HANDLER=include/hppa-signal.h
+    ;;
  ia64-*-linux*)
     SIGNAL_HANDLER=include/dwarf2-signal.h
     ;;