1 AC_INIT([libgrust], version-unused,,libgrust)
2 AC_CONFIG_SRCDIR(Makefile.am)
3 AC_CONFIG_FILES([Makefile])
5 if test -n "${with_target_subdir}"; then
6 AM_ENABLE_MULTILIB(, ..)
9 # Do not delete or change the following two lines. For why, see
10 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
12 target_alias=${target_alias-$host_alias}
13 AC_SUBST(target_alias)
15 # Automake should never attempt to rebuild configure
18 AM_INIT_AUTOMAKE([1.15.1 foreign no-dist -Wall])
20 # Make sure we don't test executables when making cross-tools.
24 # Add the ability to change LIBTOOL directory
25 GCC_WITH_TOOLEXECLIBDIR
27 # Use system specific extensions
28 AC_USE_SYSTEM_EXTENSIONS
31 # Checks for header files.
34 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h \
35 time.h sys/stat.h wchar.h)
37 AC_ARG_ENABLE([werror],
38 [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
40 # Add CET specific flags if CET is enabled
41 GCC_CET_FLAGS(CET_FLAGS)
42 XCFLAGS="$XCFLAGS $CET_FLAGS"
55 # target_noncanonical variables...
58 ACX_NONCANONICAL_TARGET
61 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
62 AC_ARG_ENABLE(version-specific-runtime-libs,
63 [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
65 yes) version_specific_libs=yes ;;
66 no) version_specific_libs=no ;;
67 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
69 [version_specific_libs=no])
70 AC_MSG_RESULT($version_specific_libs)
75 # Calculate toolexeclibdir
76 # Also toolexecdir, though it's only used in toolexeclibdir
77 case ${version_specific_libs} in
79 # Need the gcc compiler version to know where to install libraries
80 # and header files if --enable-version-specific-runtime-libs option
82 toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
83 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
86 if test -n "$with_cross_host" &&
87 test x"$with_cross_host" != x"no"; then
88 # Install a library built with a cross compiler in tooldir, not libdir.
89 toolexecdir='$(exec_prefix)/$(target_noncanonical)'
90 toolexeclibdir='$(toolexecdir)/lib'
92 toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
93 toolexeclibdir='$(libdir)'
95 multi_os_directory=`$CC -print-multi-os-directory`
96 case $multi_os_directory in
97 .) ;; # Avoid trailing /.
98 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
103 AC_SUBST(toolexecdir)
104 AC_SUBST(toolexeclibdir)
107 AC_CONFIG_FILES(AC_FOREACH([DIR], [libproc_macro_internal], [DIR/Makefile ]),
108 [ cat > vpsed$$ << \_EOF
109 s!`test -f '$<' || echo '$(srcdir)/'`!!
111 sed -f vpsed$$ $ac_file > tmp$$
114 echo 'MULTISUBDIR =' >> $ac_file
116 AS_UNSET([ml_norecursion])
121 AC_MSG_NOTICE([libgrust has been configured.])