PR tree-optimization/17724
[official-gcc.git] / libjava / acinclude.m4
blob8a9677aa7d364802415d82654b906f315d901cd9
1 m4_include(../config/no-executables.m4)
3 dnl The lines below arrange for aclocal not to bring libtool.m4
4 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
5 dnl to add a definition of LIBTOOL to Makefile.in.
6 m4_include(../libtool.m4)
7 ifelse(yes,no,[
8 AC_DEFUN([AM_PROG_LIBTOOL],)
9 AC_DEFUN([AC_LIBTOOL_DLOPEN],)
10 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],)
11 AC_DEFUN([LT_AC_PROG_GCJ],)
12 AC_SUBST(GCJ)
13 AC_SUBST(LIBTOOL)
15 AC_DEFUN([CHECK_FOR_BROKEN_MINGW_LD],
17 AC_MSG_CHECKING(whether 'ld' is at least 2.13)
18 LD_PROG=`$CC --print-prog-name=ld`
19 LD_VERSION=`$LD_PROG --version`
20 LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
21 LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
22 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
23   LD_OK="ok"
24 else
25   if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
26     LD_OK="ok"
27   fi
29 if test "x$LD_OK" != x; then
30   AC_MSG_RESULT([yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
31 else
32   AC_MSG_RESULT([no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
33   AC_MSG_WARN([ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack...])
34   AC_DEFINE(JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS, 1,
35             [Indicate that linker is not able to 8-byte align static data])
36 fi[]dnl
37 ])# CHECK_FOR_BROKEN_MINGW_LD