]>
Commit | Line | Data |
---|---|---|
d7f09764 DN |
1 | AC_PREREQ(2.64) |
2 | AC_INIT([LTO plugin for ld], 0.1,,[lto-plugin]) | |
73d5e770 | 3 | AC_CANONICAL_SYSTEM |
d7f09764 | 4 | GCC_TOPLEV_SUBDIRS |
13917ae3 | 5 | AM_INIT_AUTOMAKE([foreign no-dist]) |
03428d41 | 6 | AM_MAINTAINER_MODE |
2a7a8388 TS |
7 | AC_ARG_WITH(libiberty, |
8 | [AS_HELP_STRING([--with-libiberty=PATH], | |
9 | [specify the directory where to find libiberty [../libiberty]])], | |
10 | [], with_libiberty=../libiberty) | |
11 | AC_SUBST(with_libiberty) | |
dcbc9df9 | 12 | AC_USE_SYSTEM_EXTENSIONS |
d7f09764 | 13 | AC_PROG_CC |
4c0f4b0b | 14 | AC_SYS_LARGEFILE |
f3016c47 | 15 | ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_lto_plugin_warn_cflags]) |
a2555c65 RO |
16 | |
17 | # Check whether -static-libgcc is supported. | |
18 | saved_LDFLAGS="$LDFLAGS" | |
19 | LDFLAGS="$LDFLAGS -static-libgcc" | |
20 | AC_MSG_CHECKING([for -static-libgcc]) | |
21 | AC_LINK_IFELSE([ | |
22 | int main() {}], [have_static_libgcc=yes], [have_static_libgcc=no]) | |
23 | AC_MSG_RESULT($have_static_libgcc); | |
24 | LDFLAGS="$saved_LDFLAGS" | |
5523efdf | 25 | # Need -Wc to get it through libtool. |
a2555c65 RO |
26 | if test "x$have_static_libgcc" = xyes; then |
27 | ac_lto_plugin_ldflags="-Wc,-static-libgcc" | |
28 | fi | |
5523efdf | 29 | AC_SUBST(ac_lto_plugin_ldflags) |
a2555c65 | 30 | |
43f4a446 L |
31 | if test x"$host_subdir" = x.; then |
32 | gcc_build_dir=../gcc | |
33 | else | |
34 | gcc_build_dir=../../$host_subdir/gcc | |
35 | fi | |
36 | AC_SUBST(gcc_build_dir) | |
37 | ||
85c64bbe BS |
38 | # Used for constructing correct paths for offload compilers. |
39 | accel_dir_suffix= | |
40 | real_target_noncanonical=${target_noncanonical} | |
41 | if test x"$enable_as_accelerator_for" != x; then | |
42 | accel_dir_suffix=/accel/${target_noncanonical} | |
43 | real_target_noncanonical=${enable_as_accelerator_for} | |
44 | fi | |
45 | AC_SUBST(accel_dir_suffix) | |
46 | AC_SUBST(real_target_noncanonical) | |
47 | ||
d7f09764 | 48 | AM_PROG_LIBTOOL |
7de6ba7a | 49 | ACX_LT_HOST_FLAGS |
d7f09764 | 50 | AC_SUBST(target_noncanonical) |
d19e0f01 | 51 | AC_TYPE_INT64_T |
21750c78 | 52 | AC_TYPE_UINT64_T |
ec692d5f | 53 | AC_HEADER_SYS_WAIT |
d7f09764 | 54 | AC_CONFIG_FILES(Makefile) |
48215350 | 55 | AC_CONFIG_HEADERS(config.h) |
d7f09764 | 56 | AC_OUTPUT |