2 AC_INIT([LTO plugin for ld], 0.1,,[lto-plugin])
5 AM_INIT_AUTOMAKE([foreign no-dist])
9 ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_lto_plugin_warn_cflags])
11 # Check whether -static-libgcc is supported.
12 saved_LDFLAGS="$LDFLAGS"
13 LDFLAGS="$LDFLAGS -static-libgcc"
14 AC_MSG_CHECKING([for -static-libgcc])
16 int main() {}], [have_static_libgcc=yes], [have_static_libgcc=no])
17 AC_MSG_RESULT($have_static_libgcc);
18 LDFLAGS="$saved_LDFLAGS"
19 # Need -Wc to get it through libtool.
20 if test "x$have_static_libgcc" = xyes; then
21 ac_lto_plugin_ldflags="-Wc,-static-libgcc"
23 AC_SUBST(ac_lto_plugin_ldflags)
27 AC_SUBST(target_noncanonical)
31 AC_CONFIG_FILES(Makefile)
32 AC_CONFIG_HEADERS(config.h)