]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgrust/configure.ac
libgrust: Add libproc_macro and build system
[thirdparty/gcc.git] / libgrust / configure.ac
1 AC_INIT([libgrust], version-unused,,libgrust)
2 AC_CONFIG_SRCDIR(Makefile.am)
3 AC_CONFIG_FILES([Makefile])
4
5 AM_ENABLE_MULTILIB(, ..)
6
7 # Do not delete or change the following two lines. For why, see
8 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
9 AC_CANONICAL_SYSTEM
10 target_alias=${target_alias-$host_alias}
11 AC_SUBST(target_alias)
12
13 # Automake should never attempt to rebuild configure
14 AM_MAINTAINER_MODE
15
16 AM_INIT_AUTOMAKE([1.15.1 foreign no-dist -Wall])
17
18 # Make sure we don't test executables when making cross-tools.
19 GCC_NO_EXECUTABLES
20
21
22 # Add the ability to change LIBTOOL directory
23 GCC_WITH_TOOLEXECLIBDIR
24
25 # Use system specific extensions
26 AC_USE_SYSTEM_EXTENSIONS
27
28
29 # Checks for header files.
30 AC_HEADER_STDC
31 AC_HEADER_SYS_WAIT
32 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h \
33 time.h sys/stat.h wchar.h)
34
35 AC_ARG_ENABLE([werror],
36 [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
37
38 # Add CET specific flags if CET is enabled
39 GCC_CET_FLAGS(CET_FLAGS)
40 XCFLAGS="$XCFLAGS $CET_FLAGS"
41
42 # Check for tools
43 AM_PROG_AR
44 AC_PROG_CC
45 AC_PROG_CXX
46 AM_PROG_AS
47 AC_PROG_MAKE_SET
48 AC_PROG_INSTALL
49
50 # Enable libtool
51 LT_INIT
52
53 # target_noncanonical variables...
54 AC_CANONICAL_HOST
55 ACX_NONCANONICAL_HOST
56 ACX_NONCANONICAL_TARGET
57 GCC_TOPLEV_SUBDIRS
58
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 ],
62 [case "$enableval" in
63 yes) version_specific_libs=yes ;;
64 no) version_specific_libs=no ;;
65 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
66 esac],
67 [version_specific_libs=no])
68 AC_MSG_RESULT($version_specific_libs)
69
70 toolexecdir=no
71 toolexeclibdir=no
72
73 # Calculate toolexeclibdir
74 # Also toolexecdir, though it's only used in toolexeclibdir
75 case ${version_specific_libs} in
76 yes)
77 # Need the gcc compiler version to know where to install libraries
78 # and header files if --enable-version-specific-runtime-libs option
79 # is selected.
80 toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
81 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
82 ;;
83 no)
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'
89 else
90 toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
91 toolexeclibdir='$(libdir)'
92 fi
93 multi_os_directory=`$CC -print-multi-os-directory`
94 case $multi_os_directory in
95 .) ;; # Avoid trailing /.
96 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
97 esac
98 ;;
99 esac
100
101 AC_SUBST(toolexecdir)
102 AC_SUBST(toolexeclibdir)
103
104
105 AC_CONFIG_FILES(AC_FOREACH([DIR], [libproc_macro], [DIR/Makefile ]),
106 [ cat > vpsed$$ << \_EOF
107 s!`test -f '$<' || echo '$(srcdir)/'`!!
108 _EOF
109 sed -f vpsed$$ $ac_file > tmp$$
110 mv tmp$$ $ac_file
111 rm vpsed$$
112 echo 'MULTISUBDIR =' >> $ac_file
113 ml_norecursion=yes
114 AS_UNSET([ml_norecursion])
115 ])
116
117 GCC_BASE_VER
118
119 AC_MSG_NOTICE([libgrust has been configured.])
120
121 AC_OUTPUT