AC_SUBST(LIBLTDL)
AC_SUBST(DIRLTDL)
AC_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
AM_PROG_GCJ
AM_PROG_CC_C_O
;;
esac
+LIBMATHSPEC=
+# extra LD Flags which are required for targets
+case "${host}" in
+*-*-darwin*)
+ ;;
+*)
+ LIBMATHSPEC=-lm
+ ;;
+esac
+
# Check for --no-merge-exidx-entries, an ARM-specific linker option.
AC_CACHE_CHECK([for --no-merge-exidx-entries], [libgcj_cv_exidx],
[saved_ldflags="$LDFLAGS"
AC_SUBST(extra_ldflags_libjava)
AC_SUBST(extra_ldflags)
AC_SUBST(LIBSTDCXXSPEC)
+AC_SUBST(LIBMATHSPEC)
AC_SUBST(LIBGCJTESTSPEC)
;;
win32)
;;
- decosf1 | irix | mach | os2 | solaris | dce | vxworks)
+ decosf1 | irix | mach | os2 | dce | vxworks)
AC_MSG_ERROR(thread package $THREADS not yet supported)
;;
*)
AM_ICONV
AM_LC_MESSAGES
AC_STRUCT_TIMEZONE
+ LDLIBICONV=`echo " $LIBICONV " | sed "s/${acl_cv_wl--Wl,}/ /g; s/,/ /g"`
+ AC_SUBST([LDLIBICONV])
AC_CHECK_FUNCS(gethostbyname_r, [
AC_DEFINE(HAVE_GETHOSTBYNAME_R, 1,
if test "$GC" = boehm; then
case "${host}" in
mips-sgi-irix6*)
- # IRIX 6 lacks a N64 libdl.so, but only the N32 (default multilib)
- # libgcj.spec is used, so override here
- SYSTEMSPEC="$SYSTEMSPEC %{!mabi=64:-ldl}"
- ;;
+ # While IRIX 6 has libdl for the O32 and N32 ABIs, the N64 one is
+ # missing. It's unnecessary anyway since dlopen lives in libc.
+ ;;
*-*-darwin*)
- ;;
+ ;;
*)
AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
- ;;
+ ;;
esac
fi
fi
# See if linker supports anonymous version scripts.
AC_CACHE_CHECK([whether ld supports anonymous version scripts],
[libjava_cv_anon_version_script],
- [save_CFLAGS="$CFLAGS"; save_LDFLAGS="$LDFLAGS"
- libjava_cv_anon_version_script=no
- CFLAGS="$CFLAGS -fPIC";
- LDFLAGS="$LDFLAGS -shared -Wl,--version-script,conftest.map"
- echo '{ global: globalsymb*; local: *; };' > conftest.map
- AC_TRY_LINK(void globalsymbol (void) {} void localsymbol (void) {},,
- [libjava_cv_anon_version_script=gnu], [])
- if test x$libjava_cv_anon_version_script = xno; then
- case "$target_os" in
- solaris2*)
- LDFLAGS="$save_LDFLAGS"
- LDFLAGS="$LDFLAGS -shared -Wl,-M,conftest.map"
- # Sun ld doesn't understand wildcards here.
- echo '{ global: globalsymbol; local: *; };' > conftest.map
- AC_TRY_LINK(void globalsymbol (void) {} void localsymbol (void) {},,
- [libjava_cv_anon_version_script=sun], [])
- ;;
- esac
+ [AC_ARG_ENABLE(symvers,
+ AS_HELP_STRING([--disable-symvers],
+ [disable symbol versioning for libjava]),
+ [case "$enableval" in
+ yes) libjava_cv_anon_version_script=yes ;;
+ no) libjava_cv_anon_version_script=no ;;
+ *) AC_MSG_ERROR([Unknown argument to enable/disable symvers]);;
+ esac],
+ [libjava_cv_anon_version_script=yes]
+ )
+ if test x$libjava_cv_anon_version_script = xyes; then
+ save_CFLAGS="$CFLAGS"; save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS -fPIC";
+ LDFLAGS="$LDFLAGS -shared -Wl,--version-script,conftest.map"
+ echo '{ global: globalsymb*; local: *; };' > conftest.map
+ AC_TRY_LINK(void globalsymbol (void) {} void localsymbol (void) {},,
+ [libjava_cv_anon_version_script=gnu],
+ [libjava_cv_anon_version_script=no])
+ if test x$libjava_cv_anon_version_script = xno; then
+ case "$target_os" in
+ solaris2*)
+ LDFLAGS="$save_LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared -Wl,-M,conftest.map"
+ # Sun ld doesn't understand wildcards here.
+ echo '{ global: globalsymbol; local: *; };' > conftest.map
+ AC_TRY_LINK(void globalsymbol (void) {} void localsymbol (void) {},,
+ [libjava_cv_anon_version_script=sun], [])
+ ;;
+ esac
+ fi
+ CFLAGS="$save_CFLAGS"; LDFLAGS="$save_LDFLAGS"
fi
- CFLAGS="$save_CFLAGS"; LDFLAGS="$save_LDFLAGS"
])
AM_CONDITIONAL(ANONVERSCRIPT, test "$libjava_cv_anon_version_script" != no)
AM_CONDITIONAL(ANONVERSCRIPT_GNU, test "$libjava_cv_anon_version_script" = gnu)
# We get this from the environment.
AC_SUBST(GCJFLAGS)
+default_python_dir="/share/gcc-`cat ${srcdir}/../gcc/BASE-VER`/python/libjava"
AC_ARG_WITH([python-dir],
AS_HELP_STRING([--with-python-dir],
[the location to install Python modules. This path should NOT include the prefix.]),
- [with_python_dir=$withval], [with_python_dir=""])
+ [with_python_dir=$withval], [with_python_dir="${default_python_dir}"])
+
+# Needed for installing Python modules during make install.
+python_mod_dir="\${prefix}${with_python_dir}"
+
+# Needed for substituting into aot-compile*
+python_mod_dir_expanded="${expanded_prefix}${with_python_dir}"
-if test "x${with_python_dir}" = "x"
-then
- # Needed for installing Python modules during make install.
- python_mod_dir="\${prefix}/share/python"
- # Needed for substituting into aot-compile*
- python_mod_dir_expanded="${expanded_prefix}/share/python"
-else
- python_mod_dir="\${prefix}${with_python_dir}"
- python_mod_dir_expanded="${expanded_prefix}${with_python_dir}"
-fi
AC_MSG_RESULT(Python modules dir: ${python_mod_dir_expanded});
AC_SUBST(python_mod_dir)
AC_SUBST(python_mod_dir_expanded)