1 AC_INIT([LTO plugin for ld], 0.1,,[lto-plugin])
4 AM_INIT_AUTOMAKE([foreign no-dist])
7 [AS_HELP_STRING([--with-libiberty=PATH],
8 [specify the directory where to find libiberty [../libiberty]])],
9 [], with_libiberty=../libiberty)
10 AC_SUBST(with_libiberty)
11 AC_USE_SYSTEM_EXTENSIONS
14 ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_lto_plugin_warn_cflags])
16 # Check whether -static-libgcc is supported.
17 saved_LDFLAGS="$LDFLAGS"
18 LDFLAGS="$LDFLAGS -static-libgcc"
19 AC_MSG_CHECKING([for -static-libgcc])
20 AC_LINK_IFELSE([AC_LANG_SOURCE([
21 int main() {}])], [have_static_libgcc=yes], [have_static_libgcc=no])
22 AC_MSG_RESULT($have_static_libgcc);
23 LDFLAGS="$saved_LDFLAGS"
24 # Need -Wc to get it through libtool.
25 if test "x$have_static_libgcc" = xyes; then
26 ac_lto_plugin_ldflags="-Wc,-static-libgcc"
28 AC_SUBST(ac_lto_plugin_ldflags)
30 if test x"$host_subdir" = x.; then
33 gcc_build_dir=../../$host_subdir/gcc
35 AC_SUBST(gcc_build_dir)
37 # Used for constructing correct paths for offload compilers.
39 real_target_noncanonical=${target_noncanonical}
40 if test x"$enable_as_accelerator_for" != x; then
41 accel_dir_suffix=/accel/${target_noncanonical}
42 real_target_noncanonical=${enable_as_accelerator_for}
44 AC_SUBST(accel_dir_suffix)
45 AC_SUBST(real_target_noncanonical)
47 # Determine what GCC version number to use in filesystem paths.
52 AC_SUBST(target_noncanonical)
56 AC_CONFIG_FILES(Makefile)
57 AC_CONFIG_HEADERS(config.h)