dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer arg.
[gcc.git] / libjava / configure.in
index 4ca3930034c743b39aa769a39b24bb19df0da850..14ff72569f1f2e3154174054554b626d639e8e54 100644 (file)
@@ -153,6 +153,14 @@ fi
 AC_LANG_RESTORE
 AC_MSG_RESULT($ac_exception_model_name)
 
+# If we are non using SJLJ exceptions, and this host does not have support 
+# for unwinding from a signal handler, enable checked dereferences and divides.
+if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
+  CHECKREFSPEC=-fcheck-references
+  DIVIDESPEC=-fuse-divide-subroutine
+  EXCEPTIONSPEC=
+fi
+
 dnl See if the user wants to disable java.net.  This is the mildly
 dnl ugly way that we admit that target-side configuration sucks.
 AC_ARG_ENABLE(java-net,
@@ -420,7 +428,8 @@ AC_SUBST(THREADOBJS)
 AC_SUBST(THREADSPEC)
 AC_SUBST(THREADLDFLAGS)
 
-AC_LINK_FILES(sysdep/$sysdeps_dir, sysdep)
+if test -d sysdep; then true; else mkdir sysdep; fi
+AC_LINK_FILES(sysdep/$sysdeps_dir/locks.h, sysdep/locks.h)
 
 HASH_SYNC_SPEC=
 # Hash synchronization is only useful with posix threads right now.
@@ -442,12 +451,13 @@ GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
 
 # Figure out where generated headers like libgcj-config.h get installed.
 changequote(,)dnl
-gcc_version_trigger=${srcdir}/../gcc/version.c
+gcc_version_trigger=${libgcj_basedir}/../gcc/version.c
 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
 tool_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include
 changequote([,])dnl
 AC_SUBST(tool_include_dir)
+AC_SUBST(gcc_version)
 
 if test -n "${with_cross_host}"; then
    # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
@@ -485,8 +495,19 @@ else
    AC_CHECK_FUNCS(nl_langinfo setlocale)
    AC_CHECK_FUNCS(inet_aton inet_addr, break)
    AC_CHECK_FUNCS(inet_pton uname inet_ntoa)
-   AC_CHECK_FUNCS(backtrace fork execvp pipe sigaction)
+   AC_CHECK_FUNCS(fork execvp pipe sigaction)
    AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h) 
+   AC_CHECK_FUNC(backtrace, [
+     case "$host" in
+       ia64-*-linux*)
+        # Has broken backtrace()
+        ;;
+       *)
+         AC_DEFINE(HAVE_BACKTRACE)
+        ;;
+     esac
+   ])
+
    AC_CHECK_LIB(dl, dladdr, [
      AC_DEFINE(HAVE_DLADDR)])
    AC_CHECK_FILES(/proc/self/exe, [
@@ -738,6 +759,7 @@ AC_SUBST(ZLIBS)
 AC_SUBST(SYS_ZLIBS)
 AC_SUBST(ZINCS)
 AC_SUBST(DIVIDESPEC)
+AC_SUBST(CHECKREFSPEC)
 AC_SUBST(EXCEPTIONSPEC)
 
 AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
@@ -845,19 +867,25 @@ case "${host}" in
  i?86-*-linux*)
     SIGNAL_HANDLER=include/i386-signal.h
     ;;
- sparc-sun-solaris*)
+ sparc*-sun-solaris*)
     SIGNAL_HANDLER=include/sparc-signal.h
     ;;
 # ia64-*)
 #    SYSDEP_SOURCES=sysdep/ia64.c
 #    test -d sysdep || mkdir sysdep
 #    ;;
+ ia64-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
  powerpc-*-linux*)
     SIGNAL_HANDLER=include/dwarf2-signal.h
     ;;
  alpha*-*-linux*)
     SIGNAL_HANDLER=include/dwarf2-signal.h
     ;;
+ sparc*-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
  *mingw*)
     SIGNAL_HANDLER=include/win32-signal.h
     ;;