2 # Copyright (C) 2011-2013, Intel Corporation
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # * Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # * Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in
14 # the documentation and/or other materials provided with the
16 # * Neither the name of Intel Corporation nor the names of its
17 # contributors may be used to endorse or promote products derived
18 # from this software without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
31 # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 # POSSIBILITY OF SUCH DAMAGE.
34 AC_INIT([Cilk Runtime Library], [2.0], [cilk@intel.com])
37 # Needed to define ${target}. Needs to be very early to avoid annoying
38 # warning about calling AC_ARG_PROGRAM before AC_CANONICAL_SYSTEM
40 target_alias=${target_alias-$host_alias}
41 AC_SUBST(target_alias)
42 GCC_LIBSTDCXX_RAW_CXX_FLAGS
43 AM_INIT_AUTOMAKE(foreign no-dist)
47 # Build a DLL on Windows
48 # AC_LIBTOOL_WIN32_DLL
52 # AC_CONFIG_MACRO_DIR([..])
53 AC_CONFIG_FILES([Makefile])
54 AM_ENABLE_MULTILIB(, ..)
57 # Get target configury.
58 . ${srcdir}/configure.tgt
59 if test -n "$UNSUPPORTED"; then
60 AC_MSG_ERROR([Configuration ${target} is unsupported.])
63 if test "${multilib}" = "yes"; then
64 multilib_arg="--enable-multilib"
69 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
70 AC_ARG_ENABLE([version-specific-runtime-libs],
71 AC_HELP_STRING([--enable-version-specific-runtime-libs],
72 [Specify that runtime libraries should be installed in a compi
73 ler-specific directory]),
75 yes) enable_version_specific_runtime_libs=yes ;;
76 no) enable_version_specific_runtime_libs=no ;;
77 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs
80 [enable_version_specific_runtime_libs=no])
81 AC_MSG_RESULT($enable_version_specific_runtime_libs)
84 # Calculate toolexeclibdir
85 # Also toolexecdir, though it's only used in toolexeclibdir
86 case ${enable_version_specific_runtime_libs} in
88 # Need the gcc compiler version to know where to install libraries
89 # and header files if --enable-version-specific-runtime-libs option
91 toolexecdir='$(libdir)/gcc/$(target_alias)'
92 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
95 if test -n "$with_cross_host" &&
96 test x"$with_cross_host" != x"no"; then
97 # Install a library built with a cross compiler in tooldir, not libdir.
98 toolexecdir='$(exec_prefix)/$(target_alias)'
99 toolexeclibdir='$(toolexecdir)/lib'
101 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
102 toolexeclibdir='$(libdir)'
104 multi_os_directory=`$CC -print-multi-os-directory`
105 case $multi_os_directory in
106 .) ;; # Avoid trailing /.
107 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
112 # Set config_dir based on the target. config_dir specifies where to get
113 # target-specific files. The generic implementation is incomplete, but
114 # contains information on what's needed
132 # We have linker scripts for appropriate operating systems
133 linux_linker_script=no
136 linux_linker_script=yes
139 AM_CONDITIONAL(LINUX_LINKER_SCRIPT, test "$linux_linker_script" = "yes")
144 mac_linker_script=yes
147 AM_CONDITIONAL(MAC_LINKER_SCRIPT, test "$mac_linker_script" = "yes")
151 AC_SUBST(toolexecdir)
152 AC_SUBST(toolexeclibdir)
154 AC_SUBST(lt_cv_dlopen_libs)