1 AC_INIT([libgrust], version-unused,,libgrust)
2 AC_CONFIG_SRCDIR(Makefile.am)
3 AC_CONFIG_FILES([Makefile])
5 AM_ENABLE_MULTILIB(, ..)
7 # Do not delete or change the following two lines. For why, see
8 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
10 target_alias=${target_alias-$host_alias}
11 AC_SUBST(target_alias)
13 # Automake should never attempt to rebuild configure
16 AM_INIT_AUTOMAKE([1.15.1 foreign no-dist -Wall])
18 # Make sure we don't test executables when making cross-tools.
22 # Add the ability to change LIBTOOL directory
23 GCC_WITH_TOOLEXECLIBDIR
25 # Use system specific extensions
26 AC_USE_SYSTEM_EXTENSIONS
29 # Checks for header files.
32 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h \
33 time.h sys/stat.h wchar.h)
35 AC_ARG_ENABLE([werror],
36 [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
38 # Add CET specific flags if CET is enabled
39 GCC_CET_FLAGS(CET_FLAGS)
40 XCFLAGS="$XCFLAGS $CET_FLAGS"
53 # target_noncanonical variables...
56 ACX_NONCANONICAL_TARGET
59 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
60 AC_ARG_ENABLE(version-specific-runtime-libs,
61 [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
63 yes) version_specific_libs=yes ;;
64 no) version_specific_libs=no ;;
65 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
67 [version_specific_libs=no])
68 AC_MSG_RESULT($version_specific_libs)
73 # Calculate toolexeclibdir
74 # Also toolexecdir, though it's only used in toolexeclibdir
75 case ${version_specific_libs} in
77 # Need the gcc compiler version to know where to install libraries
78 # and header files if --enable-version-specific-runtime-libs option
80 toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
81 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
84 if test -n "$with_cross_host" &&
85 test x"$with_cross_host" != x"no"; then
86 # Install a library built with a cross compiler in tooldir, not libdir.
87 toolexecdir='$(exec_prefix)/$(target_noncanonical)'
88 toolexeclibdir='$(toolexecdir)/lib'
90 toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
91 toolexeclibdir='$(libdir)'
93 multi_os_directory=`$CC -print-multi-os-directory`
94 case $multi_os_directory in
95 .) ;; # Avoid trailing /.
96 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
101 AC_SUBST(toolexecdir)
102 AC_SUBST(toolexeclibdir)
105 AC_CONFIG_FILES(AC_FOREACH([DIR], [libproc_macro], [DIR/Makefile ]),
106 [ cat > vpsed$$ << \_EOF
107 s!`test -f '$<' || echo '$(srcdir)/'`!!
109 sed -f vpsed$$ $ac_file > tmp$$
112 echo 'MULTISUBDIR =' >> $ac_file
114 AS_UNSET([ml_norecursion])
119 AC_MSG_NOTICE([libgrust has been configured.])