Daily bump.
[official-gcc.git] / libgrust / configure.ac
blobd55e698fdd825f2861822bf45d6150a604ff2c7c
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(, ..)
7 fi
9 # Do not delete or change the following two lines.  For why, see
10 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
11 AC_CANONICAL_SYSTEM
12 target_alias=${target_alias-$host_alias}
13 AC_SUBST(target_alias)
15 # Automake should never attempt to rebuild configure
16 AM_MAINTAINER_MODE
18 AM_INIT_AUTOMAKE([1.15.1 foreign no-dist -Wall])
20 # Make sure we don't test executables when making cross-tools.
21 GCC_NO_EXECUTABLES
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.
32 AC_HEADER_STDC
33 AC_HEADER_SYS_WAIT
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"
44 # Check for tools
45 AM_PROG_AR
46 AC_PROG_CC
47 AC_PROG_CXX
48 AM_PROG_AS
49 AC_PROG_MAKE_SET
50 AC_PROG_INSTALL
52 # Enable libtool
53 LT_INIT
55 # target_noncanonical variables...
56 AC_CANONICAL_HOST
57 ACX_NONCANONICAL_HOST
58 ACX_NONCANONICAL_TARGET
59 GCC_TOPLEV_SUBDIRS
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 ],
64 [case "$enableval" in
65  yes) version_specific_libs=yes ;;
66  no)  version_specific_libs=no ;;
67  *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
68  esac],
69 [version_specific_libs=no])
70 AC_MSG_RESULT($version_specific_libs)
72 toolexecdir=no
73 toolexeclibdir=no
75 # Calculate toolexeclibdir
76 # Also toolexecdir, though it's only used in toolexeclibdir
77 case ${version_specific_libs} in
78   yes)
79     # Need the gcc compiler version to know where to install libraries
80     # and header files if --enable-version-specific-runtime-libs option
81     # is selected.
82     toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
83     toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
84     ;;
85   no)
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'
91     else
92       toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
93       toolexeclibdir='$(libdir)'
94     fi
95     multi_os_directory=`$CC -print-multi-os-directory`
96     case $multi_os_directory in
97       .) ;; # Avoid trailing /.
98       *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
99     esac
100     ;;
101 esac
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)/'`!!
110 _EOF
111    sed -f vpsed$$ $ac_file > tmp$$
112    mv tmp$$ $ac_file
113    rm vpsed$$
114    echo 'MULTISUBDIR =' >> $ac_file
115    ml_norecursion=yes
116    AS_UNSET([ml_norecursion])
119 GCC_BASE_VER
121 AC_MSG_NOTICE([libgrust has been configured.])
123 AC_OUTPUT