AM_INIT_AUTOMAKE([1.9.0])
AC_CHECK_TOOL(AS, as)
+AC_CHECK_TOOL(LD, ld)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_SUBST(LIBGCJ_JAVAFLAGS)
AC_SUBST(LIBGCJ_LD_SYMBOLIC)
-AC_CONFIG_HEADERS([include/config.h gcj/libgcj-config.h])
+# Only use libltdl for non-newlib builds.
+if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
+ AC_LTDL_SHLIBPATH
+fi
+AC_CONFIG_HEADERS([include/config.h gcj/libgcj-config.h])
# See if the user has requested runtime debugging.
LIBGCJDEBUG="disable"
peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
use_xlib_awt=""
use_gtk_awt=""
+use_qt_awt=""
# The default toolkit to use is the first one specified.
TOOLKIT=
AC_SUBST(TOOLKIT)
;;
gtk)
if test "$no_x" = yes; then
- echo "*** xlib peers requested but no X library available" 1>&2
+ echo "*** gtk peers requested but no X library available" 1>&2
exit 1
else
use_gtk_awt=yes
fi
fi
;;
+ qt)
+ if test "$no_x" = yes; then
+ # Perhaps we should admit the possibility of embedded Qt.
+ echo "*** Qt peers requested but no X library available" 1>&2
+ exit 1
+ else
+ use_qt_awt=yes
+ if test -z "$TOOLKIT"; then
+ TOOLKIT=gnu.java.awt.peer.qt.QtToolkit
+ fi
+ fi
+ ;;
no)
use_xlib_awt=
use_gtk_awt=
+ use_qt_awt=
break
;;
*)
AM_CONDITIONAL(XLIB_AWT, test "$use_xlib_awt" = yes)
AM_CONDITIONAL(GTK_AWT, test "$use_gtk_awt" = yes)
+AM_CONDITIONAL(QT_AWT, test "$use_qt_awt" = yes)
# Create standard.omit based on decisions we just made.
cp $srcdir/standard.omit.in standard.omit
if test "$use_gtk_awt" != yes; then
echo gnu/java/awt/peer/gtk >> standard.omit
fi
+if test "$use_qt_awt" != yes; then
+ echo gnu/java/awt/peer/qt >> standard.omit
+fi
if test -z "${with_multisubdir}"; then
builddotdot=.
if test "$use_gtk_awt" != yes; then
ac_configure_args="$ac_configure_args --disable-gtk-peer"
fi
+if test "$use_qt_awt" != yes; then
+ ac_configure_args="$ac_configure_args --disable-qt-peer"
+else
+ # We need this as qt is disabled by default in classpath.
+ ac_configure_args="$ac_configure_args --enable-qt-peer"
+fi
dnl --with-gcj=$GCJ
dnl --with-javah=$GCJH
dnl gjdoc?
TARGET_ECOS="$with_ecos"
)
-supply_backtrace=no
-
PLATFORM_INNER_NAT_HDRS=
case "$TARGET_ECOS" in
no) case "$host" in
# extra LD Flags which are required for targets
case "${host}" in
- *-darwin*)
+*-*-darwin[[0-7]].*)
+ # For now we have to disable it on darwin[8-9] because it slows down
+ # the linking phase. A possible bug in ld?
# on Darwin -single_module speeds up loading of the dynamic libraries.
extra_ldflags_libjava=-Wl,-single_module
;;
fork execvp pipe sigaction ftruncate])
AC_CHECK_FUNCS(inet_aton inet_addr, break)
AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
- AC_CHECK_FUNC(backtrace, [
- case "$host" in
- ia64-*-linux*)
- # Has broken backtrace()
- ;;
- mips*-*-linux*)
- # Has broken backtrace(), but we supply our own.
- if test -d sysdep; then true; else mkdir -p sysdep; fi
- supply_backtrace=yes
- AC_DEFINE(HAVE_BACKTRACE, 1,
- [Define if your platform has a working backtrace() function.])
- ;;
- *)
- AC_DEFINE(HAVE_BACKTRACE, 1,
- [Define if your platform has a working backtrace() function.])
- ;;
- esac
- ], [
- case "$host" in
- *mingw*)
- # Has backtrace() defined in libgcj itself
- AC_DEFINE(HAVE_BACKTRACE, 1,
- [Define if your platform has a working backtrace() function.])
- ;;
- esac
- ])
-
AC_CHECK_LIB(dl, dladdr, [
- if test "x${disable_dladdr}" = "xyes"; then
- #Broken dladdr().
- true
- else
- AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])
- fi
- ])
+ AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])
+
if test x"$build" = x"$host"; then
AC_CHECK_FILES(/proc/self/exe, [
AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])])
AC_DEFINE(HAVE_SCHED_YIELD)
THREADLIBS="$THREADLIBS -lposix4"
THREADSPEC="$THREADSPEC -lposix4"])])])
+
+ AC_CHECK_LIB(rt, clock_gettime, [
+ AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime()])
+ case "$THREADSPEC" in
+ *-lrt*) ;;
+ *)
+ THREADSPEC="$THREADSPEC -lrt"
+ THREADLIBS="$THREADLIBS -lrt"
+ ;;
+ esac])
+
LIBS="$save_LIBS"
# We can save a little space at runtime if the mutex has m_count
AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
fi
fi
-AM_CONDITIONAL(SUPPLY_BACKTRACE, test "$supply_backtrace" = yes)
# Use a semicolon as CLASSPATH separator for MinGW, otherwise a colon.
case $build in
AC_SUBST(toolexecmainlibdir)
AC_SUBST(toolexeclibdir)
+# Determine where the standard .db file is found.
+multi_os_directory=`$CC -print-multi-os-directory`
+case $multi_os_directory in
+ .) dbexecdir='$(libdir)/gcj-$(gcc_version)' ;; # Avoid /.
+ *) dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)' ;;
+esac
+AC_SUBST(dbexecdir)
+
# Determine gcj version number.
gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([[^ ]]*\).*$/\1/p'`
GCJVERSION=$gcjversion
multilib_arg=
fi
+# See if we support thread-local storage.
+GCC_CHECK_TLS
+# Check if linker supports static linking on a per library basis
+LD_START_STATIC_SPEC=
+LD_FINISH_STATIC_SPEC=
+if $LD --help 2>&1 | grep -q -e -call_shared ; then
+ if $LD --help 2>&1 | grep -q -e -non_shared ; then
+ LD_START_STATIC_SPEC='%{static-libgcj:-non_shared}'
+ LD_FINISH_STATIC_SPEC='%{static-libgcj:-call_shared}'
+ fi
+fi
+AC_SUBST(LD_START_STATIC_SPEC)
+AC_SUBST(LD_FINISH_STATIC_SPEC)
here=`${PWDCMD-pwd}`
AC_SUBST(here)