2009-10-03 17:10:11 -04:00
|
|
|
AC_PREREQ(2.64)
|
|
|
|
AC_INIT([LTO plugin for ld], 0.1,,[lto-plugin])
|
2010-10-09 05:06:21 +00:00
|
|
|
AC_CANONICAL_SYSTEM
|
2009-10-03 17:10:11 -04:00
|
|
|
GCC_TOPLEV_SUBDIRS
|
2010-05-04 18:58:11 +00:00
|
|
|
AM_INIT_AUTOMAKE([foreign no-dist])
|
2009-10-26 16:05:36 +00:00
|
|
|
AM_MAINTAINER_MODE
|
2014-06-13 16:30:46 +02:00
|
|
|
AC_ARG_WITH(libiberty,
|
|
|
|
[AS_HELP_STRING([--with-libiberty=PATH],
|
|
|
|
[specify the directory where to find libiberty [../libiberty]])],
|
|
|
|
[], with_libiberty=../libiberty)
|
|
|
|
AC_SUBST(with_libiberty)
|
2009-10-03 17:10:11 -04:00
|
|
|
AC_PROG_CC
|
2009-10-27 18:17:13 +00:00
|
|
|
AC_SYS_LARGEFILE
|
2011-08-10 08:48:37 +00:00
|
|
|
ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_lto_plugin_warn_cflags])
|
2014-05-15 09:52:37 +00:00
|
|
|
|
|
|
|
# Check whether -static-libgcc is supported.
|
|
|
|
saved_LDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS -static-libgcc"
|
|
|
|
AC_MSG_CHECKING([for -static-libgcc])
|
|
|
|
AC_LINK_IFELSE([
|
|
|
|
int main() {}], [have_static_libgcc=yes], [have_static_libgcc=no])
|
|
|
|
AC_MSG_RESULT($have_static_libgcc);
|
|
|
|
LDFLAGS="$saved_LDFLAGS"
|
2014-03-17 13:04:12 +00:00
|
|
|
# Need -Wc to get it through libtool.
|
2014-05-15 09:52:37 +00:00
|
|
|
if test "x$have_static_libgcc" = xyes; then
|
|
|
|
ac_lto_plugin_ldflags="-Wc,-static-libgcc"
|
|
|
|
fi
|
2014-03-17 13:04:12 +00:00
|
|
|
AC_SUBST(ac_lto_plugin_ldflags)
|
2014-05-15 09:52:37 +00:00
|
|
|
|
2009-10-03 17:10:11 -04:00
|
|
|
AM_PROG_LIBTOOL
|
2010-12-06 00:50:04 +00:00
|
|
|
ACX_LT_HOST_FLAGS
|
2009-10-03 17:10:11 -04:00
|
|
|
AC_SUBST(target_noncanonical)
|
2010-11-11 13:33:59 +00:00
|
|
|
AC_TYPE_INT64_T
|
2009-10-19 15:11:35 +00:00
|
|
|
AC_TYPE_UINT64_T
|
2010-12-05 08:06:25 +00:00
|
|
|
AC_HEADER_SYS_WAIT
|
2009-10-03 17:10:11 -04:00
|
|
|
AC_CONFIG_FILES(Makefile)
|
2010-11-03 09:14:32 +00:00
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2009-10-03 17:10:11 -04:00
|
|
|
AC_OUTPUT
|