dnl # Process this with autoconf to create configure
AC_PREREQ(2.59)
-AC_INIT(java/lang/System.java)
+# Still use "libjava" here to placate dejagnu.
+AC_INIT([libjava], [version-unused],, [libjava])
+
+AC_CONFIG_SRCDIR(java/lang/System.java)
# We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
libgcj_basedir=$srcdir/$toprel/./libjava
AC_SUBST(libgcj_basedir)
-AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
-if :; then :; else
- # This overrides the previous occurrence for automake, but not for
- # autoconf, which is exactly what we want.
- AC_CONFIG_AUX_DIR(..)
-fi
-
AC_CANONICAL_SYSTEM
_GCC_TOPLEV_NONCANONICAL_BUILD
_GCC_TOPLEV_NONCANONICAL_TARGET
AC_SUBST(CXXFLAGS)
AC_SUBST(LDFLAGS)
-# version is pulled out to make it a bit easier to change using sed.
-version=0.0.7
-# Still use "libjava" here to placate dejagnu.
-AM_INIT_AUTOMAKE(libjava, $version)
+AM_INIT_AUTOMAKE([1.9.0])
AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(AR, ar)
LIBGCJ_CFLAGS="${libgcj_cflags}"
LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
+LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}"
AC_SUBST(LIBGCJ_CFLAGS)
AC_SUBST(LIBGCJ_CXXFLAGS)
AC_SUBST(LIBGCJ_JAVAFLAGS)
+AC_SUBST(LIBGCJ_LD_SYMBOLIC)
-AM_CONFIG_HEADER(include/config.h gcj/libgcj-config.h)
+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_SUBST(INCLTDL)
AC_SUBST(LIBLTDL)
AC_SUBST(DIRLTDL)
-AM_PROG_LIBTOOL
-AC_CONFIG_SUBDIRS($DIRLTDL)
+AC_PROG_LIBTOOL
+AM_PROG_GCJ
+AM_PROG_CC_C_O
+AC_CONFIG_SUBDIRS(libltdl)
if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
COMPPATH=.
LIBGCJDEBUG="true"
fi])
+# Check for gc debugging. This option is handled both here and in the GC.
+AC_ARG_ENABLE(gc-debug,
+ AS_HELP_STRING([--enable-gc-debug],
+ [include full support for pointer backtracing etc.]),
+[ if test "$enable_gc_debug" = "yes"; then
+ AC_DEFINE(LIBGCJ_GC_DEBUG, 1,
+ [Define if we want to use debug calls into the garbage collector.])
+ fi])
+
# See if the user has the interpreter included.
AC_ARG_ENABLE(interpreter,
AS_HELP_STRING([--enable-interpreter],
AC_SUBST(INTERPRETER)
AC_MSG_CHECKING([for exception model to use])
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
AC_ARG_ENABLE(sjlj-exceptions,
AS_HELP_STRING([--enable-sjlj-exceptions],
[force use of builtin_setjmp for exceptions]),
else
AC_MSG_ERROR([unable to detect exception model])
fi
-AC_LANG_RESTORE
+AC_LANG_POP(C++)
AC_MSG_RESULT($ac_exception_model_name)
# If we are non using SJLJ exceptions, and this host does not have support
TARGET_ECOS="$with_ecos"
)
-EXTRA_CC_FILES=
-AC_SUBST(EXTRA_CC_FILES)
+supply_backtrace=no
-PLATFORMOBJS=
+PLATFORM_INNER_NAT_HDRS=
case "$TARGET_ECOS" in
no) case "$host" in
*mingw*)
PLATFORM=Win32
PLATFORMNET=Win32
- PLATFORMOBJS=win32.lo
PLATFORMH=win32.h
CHECK_FOR_BROKEN_MINGW_LD
;;
*)
PLATFORM=Posix
PLATFORMNET=Posix
- PLATFORMOBJS=posix.lo
PLATFORMH=posix.h
+ PLATFORM_INNER_NAT_HDRS='java/lang/ConcreteProcess$$ProcessManager.h'
;;
esac
;;
PLATFORM=Ecos
PLATFORMNET=NoNet
AC_DEFINE(ECOS, 1, [Define if you're running eCos.])
- PLATFORMOBJS=posix.lo
PLATFORMH=posix.h
;;
esac
-AC_SUBST(PLATFORMOBJS)
-AC_LINK_FILES(include/$PLATFORMH, include/platform.h)
+AC_SUBST(PLATFORM_INNER_NAT_HDRS)
+AC_CONFIG_LINKS(include/platform.h:include/$PLATFORMH)
AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1,
[Define if you have int32_t and uint32_t.]))
AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1,
[Define if you have u_int32_t]))
+AM_CONDITIONAL(USING_WIN32_PLATFORM, test "$PLATFORM" = Win32)
+AM_CONDITIONAL(USING_POSIX_PLATFORM, test "$PLATFORM" = Posix)
+AM_CONDITIONAL(USING_ECOS_PLATFORM, test "$PLATFORM" = Ecos)
+
+case "$host" in
+ *-darwin*) DARWIN_CRT=true ;;
+ *) DARWIN_CRT=false ;;
+esac
+AM_CONDITIONAL(USING_DARWIN_CRT, $DARWIN_CRT)
# These may not be defined in a non-ANS conformant embedded system.
# FIXME: Should these case a runtime exception in that case?
test -d java || mkdir java
test -d java/io || mkdir java/io
test -d gnu || mkdir gnu
-AC_LINK_FILES(java/io/natFile${FILE-${PLATFORM}}.cc, java/io/natFile.cc)
+AC_CONFIG_LINKS(java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc)
# Likewise for ConcreteProcess.java and natConcreteProcess.cc.
test -d java/lang || mkdir java/lang
-AC_LINK_FILES(java/lang/${PLATFORM}Process.java, java/lang/ConcreteProcess.java)
-AC_LINK_FILES(java/lang/nat${PLATFORM}Process.cc, java/lang/natConcreteProcess.cc)
+AC_CONFIG_LINKS(java/lang/ConcreteProcess.java:java/lang/${PLATFORM}Process.java)
+AC_CONFIG_LINKS(java/lang/natConcreteProcess.cc:java/lang/nat${PLATFORM}Process.cc)
# Likewise for natInetAddress.cc and natNetworkInterface.cc.
test -d java/net || mkdir java/net
-AC_LINK_FILES(java/net/natInetAddress${PLATFORMNET}.cc, java/net/natInetAddress.cc)
-AC_LINK_FILES(java/net/natNetworkInterface${PLATFORMNET}.cc, java/net/natNetworkInterface.cc)
+AC_CONFIG_LINKS(java/net/natInetAddress.cc:java/net/natInetAddress${PLATFORMNET}.cc)
+AC_CONFIG_LINKS(java/net/natNetworkInterface.cc:java/net/natNetworkInterface${PLATFORMNET}.cc)
# Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.cc.
test -d gnu/java || mkdir gnu/java
test -d gnu/java/net || mkdir gnu/java/net
-AC_LINK_FILES(gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainSocketImpl.cc)
-AC_LINK_FILES(gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainDatagramSocketImpl.cc)
+AC_CONFIG_LINKS(gnu/java/net/natPlainSocketImpl.cc:gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc)
+AC_CONFIG_LINKS(gnu/java/net/natPlainDatagramSocketImpl.cc:gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc)
# Likewise for natPipeImpl.cc and natSelectorImpl.cc.
test -d gnu/java/nio || mkdir gnu/java/nio
-AC_LINK_FILES(gnu/java/nio/natPipeImpl${PLATFORM}.cc, gnu/java/nio/natPipeImpl.cc)
-AC_LINK_FILES(gnu/java/nio/natSelectorImpl${PLATFORM}.cc, gnu/java/nio/natSelectorImpl.cc)
+AC_CONFIG_LINKS(gnu/java/nio/natPipeImpl.cc:gnu/java/nio/natPipeImpl${PLATFORM}.cc)
+AC_CONFIG_LINKS(gnu/java/nio/natSelectorImpl.cc:gnu/java/nio/natSelectorImpl${PLATFORM}.cc)
test -d gnu/java/nio/channels || mkdir gnu/java/nio/channels
-AC_LINK_FILES(gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc, gnu/java/nio/channels/natFileChannelImpl.cc)
+AC_CONFIG_LINKS(gnu/java/nio/channels/natFileChannelImpl.cc:gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc)
case "${host}" in
*mingw*)
GCLIBS=
GCINCS=
GCDEPS=
-GCOBJS=
GCSPEC=
JC1GCSPEC=
GCTESTSPEC=
GCLIBS=../boehm-gc/libgcjgc_convenience.la
JC1GCSPEC='-fuse-boehm-gc'
GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
-
- # We also want to pick up some cpp flags required when including
- # boehm-config.h. Yuck.
- GCINCS="`cat ../boehm-gc/boehm-cflags`"
- GCOBJS=boehm.lo
+ GCINCS='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
+ GCOBJS=boehm.lo
GCHDR=boehm-gc.h
# The POSIX thread support needs to know this.
AC_DEFINE(HAVE_BOEHM_GC, 1, [Define if Boehm GC in use.])
;;
no)
AC_MSG_RESULT(none)
- GCOBJS=nogc.lo
GCHDR=no-gc.h
;;
*)
- AC_MSG_ERROR(unrecognized collector \"$GC\")
+ AC_MSG_ERROR([unrecognized collector "$GC"])
;;
esac
AC_SUBST(GCLIBS)
AC_SUBST(GCINCS)
AC_SUBST(GCDEPS)
-AC_SUBST(GCOBJS)
AC_SUBST(GCSPEC)
AC_SUBST(JC1GCSPEC)
AC_SUBST(GCTESTSPEC)
-AC_LINK_FILES(include/$GCHDR, include/java-gc.h)
+AC_CONFIG_LINKS(include/java-gc.h:include/$GCHDR)
+AM_CONDITIONAL(USING_BOEHMGC, test "$GC" = boehm)
+AM_CONDITIONAL(USING_NOGC, test "$GC" = no)
AC_MSG_CHECKING([for thread model used by GCC])
no | none | single)
THREADS=none
;;
- posix | pthreads)
+ posix | posix95 | pthreads)
THREADS=posix
case "$host" in
*-*-linux*)
THREADLIBS=
THREADINCS=
THREADDEPS=
-THREADOBJS=
THREADH=
THREADSPEC=
case "$THREADS" in
# the command line. For now, the user must provide the -pthread
# switch to link code compiled with gcj. In future, consider adding
# support for weak references to pthread_* functions ala gthr.h API.
- THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
+ THREADSPEC='%{!pthread: %{!shared: %eUnder this configuration, the user must provide -pthread when linking.}}'
;;
*-*-freebsd*)
# FreeBSD 5 implements a model much closer to other modern UNIX
THREADSPEC=-lpthread
;;
esac
- THREADOBJS=posix-threads.lo
THREADH=posix-threads.h
# MIT pthreads doesn't seem to have the mutexattr functions.
# But for now we don't check for it. We just assume you aren't
;;
win32)
- THREADOBJS=win32-threads.lo
THREADH=win32-threads.h
;;
none)
- THREADOBJS=no-threads.lo
THREADH=no-threads.h
;;
esac
-AC_LINK_FILES(include/$THREADH, include/java-threads.h)
+AC_CONFIG_LINKS(include/java-threads.h:include/$THREADH)
AC_SUBST(THREADLIBS)
AC_SUBST(THREADINCS)
AC_SUBST(THREADDEPS)
-AC_SUBST(THREADOBJS)
AC_SUBST(THREADSPEC)
AC_SUBST(THREADLDFLAGS)
AC_SUBST(THREADCXXFLAGS)
+AM_CONDITIONAL(USING_POSIX_THREADS, test "$THREADS" = posix)
+AM_CONDITIONAL(USING_WIN32_THREADS, test "$THREADS" = win32)
+AM_CONDITIONAL(USING_NO_THREADS, test "$THREADS" = none)
if test -d sysdep; then true; else mkdir sysdep; fi
-AC_LINK_FILES(sysdep/$sysdeps_dir/locks.h, sysdep/locks.h)
+AC_CONFIG_LINKS(sysdep/locks.h:sysdep/$sysdeps_dir/locks.h)
HASH_SYNC_SPEC=
# Hash synchronization is only useful with posix threads right now.
# We're in the tree with gcc, and need to include some of its headers.
GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
+TL_AC_GCC_VERSION([$srcdir/..])
+
# Figure out where generated headers like libgcj-config.h get installed.
-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/$(target_noncanonical)/'${gcc_version}/include
AC_SUBST(tool_include_dir)
-AC_SUBST(gcc_version)
if test "x${with_newlib}" = "xyes"; then
# We are being configured with a cross compiler. AC_REPLACE_FUNCS
mips*-*-linux*)
# Has broken backtrace(), but we supply our own.
if test -d sysdep; then true; else mkdir -p sysdep; fi
- EXTRA_CC_FILES="${EXTRA_CC_FILES} sysdep/dwarf2-backtrace.cc"
+ supply_backtrace=yes
AC_DEFINE(HAVE_BACKTRACE, 1,
[Define if your platform has a working backtrace() function.])
;;
dnl On DU4.0, gethostbyname_r is only declared with -D_REENTRANT
AC_CACHE_CHECK([whether gethostbyname_r declaration requires -D_REENTRANT],
[libjava_cv_gethostbyname_r_needs_reentrant],
- [ AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <netdb.h>],
- [gethostbyname_r("", 0, 0);],
+ [ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]],
+ [[gethostbyname_r("", 0, 0);]])],
[libjava_cv_gethostbyname_r_needs_reentrant=no], [dnl
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
- AC_TRY_COMPILE([#include <netdb.h>], [gethostbyname_r("", 0, 0);],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[gethostbyname_r("", 0, 0);]])],
[libjava_cv_gethostbyname_r_needs_reentrant=yes],
[libjava_cv_gethostbyname_r_needs_reentrant=fail])
CPPFLAGS="$CPPFLAGS_SAVE"
])
- AC_LANG_RESTORE
+ AC_LANG_POP(C++)
])
if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
AC_CACHE_CHECK([for struct hostent_data],
[libjava_cv_struct_hostent_data], [dnl
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
# define _REENTRANT 1
#endif
-#include <netdb.h>], [struct hostent_data data;],
+#include <netdb.h>]], [[struct hostent_data data;]])],
[libjava_cv_struct_hostent_data=yes],
[libjava_cv_struct_hostent_data=no])])
if test "x$libjava_cv_struct_hostent_data" = xyes; then
# We can save a little space at runtime if the mutex has m_count
# or __m_count. This is a nice hack for Linux.
- AC_TRY_COMPILE([#include <pthread.h>], [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[
extern pthread_mutex_t *mutex; int q = mutex->m_count;
- ], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT, 1,
+ ]])], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT, 1,
[Define if pthread_mutex_t has m_count member.]), [
- AC_TRY_COMPILE([#include <pthread.h>], [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[
extern pthread_mutex_t *mutex; int q = mutex->__m_count;
- ], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT, 1,
+ ]])], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT, 1,
[Define if pthread_mutex_t has __m_count member.]))])
fi
AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
fi
fi
+AM_CONDITIONAL(SUPPLY_BACKTRACE, test "$supply_backtrace" = yes)
if test -z "${with_multisubdir}"; then
builddotdot=.
# Create it, so that compile/link tests don't fail
test -f libgcj.spec || touch libgcj.spec
+# Use a semicolon as CLASSPATH separator for MinGW, otherwise a colon.
+case $build in
+ *-mingw32) CLASSPATH_SEPARATOR=';' ;;
+ *) CLASSPATH_SEPARATOR=':' ;;
+esac
+AC_SUBST(CLASSPATH_SEPARATOR)
+
# We must search the source tree for java.lang, since we still don't
# have libgcj.jar nor java/lang/*.class
GCJ_SAVE_CPPFLAGS=$CPPFLAGS
# but we add /dev/null to the input list so that grep will print the
# filename of Configuration.java in case it finds any matches.
if grep @ gnu/classpath/Configuration.java /dev/null; then
- AC_MSG_ERROR([configure.in is missing the substitutions above])
+ AC_MSG_ERROR([configure.ac is missing the substitutions above])
fi
fi
AC_COMPILE_CHECK_SIZEOF(void *)
+AC_C_BIGENDIAN_CROSS
+
ZLIBS=
SYS_ZLIBS=
ZINCS=
AC_SUBST(GCJVERSION)
AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID])
+TL_AC_GXX_INCLUDE_DIR
+
# We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
# On that system, sys/ioctl.h will not include sys/filio.h unless
# BSD_COMP is defined; just including sys/filio.h is simpler.
AC_CHECK_TYPE([ssize_t], [int])
AC_MSG_CHECKING([for in_addr_t])
-AC_TRY_COMPILE([#include <sys/types.h>
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
-#endif], [in_addr_t foo;],
+#endif]], [[in_addr_t foo;]])],
[AC_DEFINE(HAVE_IN_ADDR_T, 1,
[Define to 1 if 'in_addr_t' is defined in sys/types.h or netinet/in.h.])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([whether struct ip_mreq is in netinet/in.h])
-AC_TRY_COMPILE([#include <netinet/in.h>], [struct ip_mreq mreq;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct ip_mreq mreq;]])],
[AC_DEFINE(HAVE_STRUCT_IP_MREQ, 1,
[Define if struct ip_mreq is defined in netinet/in.h.])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([whether struct ipv6_mreq is in netinet/in.h])
-AC_TRY_COMPILE([#include <netinet/in.h>], [struct ipv6_mreq mreq6;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct ipv6_mreq mreq6;]])],
[AC_DEFINE(HAVE_STRUCT_IPV6_MREQ, 1,
[Define if struct ipv6_mreq is defined in netinet/in.h.])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
-AC_TRY_COMPILE([#include <netinet/in.h>], [struct sockaddr_in6 addr6;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct sockaddr_in6 addr6;]])],
[AC_DEFINE(HAVE_INET6, 1,
[Define if inet6 structures are defined in netinet/in.h.])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for socklen_t in sys/socket.h])
-AC_TRY_COMPILE([#define _POSIX_PII_SOCKET
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _POSIX_PII_SOCKET
#include <sys/types.h>
-#include <sys/socket.h>], [socklen_t x = 5;],
+#include <sys/socket.h>]], [[socklen_t x = 5;]])],
[AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define it socklen_t typedef is in sys/socket.h.])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for tm_gmtoff in struct tm])
-AC_TRY_COMPILE([#include <time.h>], [struct tm tim; tim.tm_gmtoff = 0;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm tim; tim.tm_gmtoff = 0;]])],
[AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
dnl when cross-compiling. So instead we make an assumption that
dnl the header file will mention timezone if it exists.
dnl Don't find the win32 function timezone
- AC_TRY_COMPILE([#include <time.h>], [void i(){long z2 = 2*timezone;}],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])],
[AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_CHECKING([for global _timezone variable])
dnl FIXME: As above, don't want link check
- AC_TRY_COMPILE([#include <time.h>], [long z2 = _timezone;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[long z2 = _timezone;]])],
[AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
[Define if your platform has the global _timezone variable.])
AC_MSG_RESULT(yes)],
sparc*-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h
;;
- sh-*-linux* | sh[[34]]*-*-linux*)
- SIGNAL_HANDLER=include/dwarf2-signal.h
+ sh*-*-linux*)
+ SIGNAL_HANDLER=include/sh-signal.h
;;
*mingw*)
SIGNAL_HANDLER=include/win32-signal.h
SIGNAL_HANDLER_AUX=$SIGNAL_HANDLER
fi
-AC_LINK_FILES($SIGNAL_HANDLER $SIGNAL_HANDLER_AUX,
- include/java-signal.h include/java-signal-aux.h)
+AC_CONFIG_LINKS(include/java-signal.h:$SIGNAL_HANDLER
+ include/java-signal-aux.h:$SIGNAL_HANDLER_AUX)
if test "${multilib}" = "yes"; then
multilib_arg="--enable-multilib"
# We get this from the environment.
AC_SUBST(GCJFLAGS)
-AC_OUTPUT(Makefile libgcj.pc libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile,
+AC_CONFIG_FILES([
+Makefile
+libgcj.pc
+libgcj.spec
+libgcj-test.spec
+gnu/classpath/Configuration.java
+gcj/Makefile
+include/Makefile
+testsuite/Makefile
+])
+
+AC_CONFIG_COMMANDS([default],
[# Only add multilib support code if we just rebuilt top-level Makefile.
case " $CONFIG_FILES " in
*" Makefile "*)
ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
;;
esac
-
-# Make subdirectories and `.d' files. Look in both srcdir and
-# builddir for the .java files.
-h=`${PWDCMD-pwd}`
-: > deps.mk
-( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) ;
- find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) | \
- fgrep -v testsuite | \
- sed -e 's/\.java/.d/'\;'s/\.cc/.d/'\;'s/\.c/.d/' | \
- while read f; do
- echo "include $f" >> deps.mk
- test -f $f || {
- d=`echo $f | sed -e 's,/[[^/]]*$,,'`
- if test ! -d $d; then
- $libgcj_basedir/../mkinstalldirs $d
- fi;
- echo > $f
- }
- done
],
srcdir=${srcdir}
host=${host}
CXX="${CXX}"
ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
)
+
+AC_OUTPUT