[ARM] PR target/79145 Fix xordi3 expander for immediate operands in iWMMXt
[official-gcc.git] / libhsail-rt / configure.ac
blob796e1096df3b0f1334f192827d85e0af5fd2f09a
1 # Starting point copied from libcilkrts:
3 #  @copyright
4 #  Copyright (C) 2011-2013, Intel Corporation
5 #  All rights reserved.
7 #  @copyright
8 #  Redistribution and use in source and binary forms, with or without
9 #  modification, are permitted provided that the following conditions
10 #  are met:
12 #    * Redistributions of source code must retain the above copyright
13 #      notice, this list of conditions and the following disclaimer.
14 #    * Redistributions in binary form must reproduce the above copyright
15 #      notice, this list of conditions and the following disclaimer in
16 #      the documentation and/or other materials provided with the
17 #      distribution.
18 #    * Neither the name of Intel Corporation nor the names of its
19 #      contributors may be used to endorse or promote products derived
20 #      from this software without specific prior written permission.
22 #  @copyright
23 #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 #  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 #  HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 #  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29 #  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
30 #  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
31 #  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 #  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
33 #  WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 #  POSSIBILITY OF SUCH DAMAGE.
36 AC_INIT([phsa HSAIL runtime library], [1.0], [pekka.jaaskelainen@parmance.com])
37 AC_CONFIG_MACRO_DIR([m4])
39 AC_PREREQ([2.64])
41 # Needed to define ${target}.  Needs to be very early to avoid annoying
42 # warning about calling AC_ARG_PROGRAM before AC_CANONICAL_SYSTEM
43 AC_CANONICAL_SYSTEM
44 target_alias=${target_alias-$host_alias}
45 AC_SUBST(target_alias)
46 AM_INIT_AUTOMAKE([1.11.6 foreign no-dist])
48 AM_MAINTAINER_MODE
50 AC_PROG_CC
51 AC_PROG_CXX
52 # AC_PROG_LIBTOOL
53 AC_CONFIG_FILES([Makefile])
55 if test "${multilib}" = "yes"; then
56   multilib_arg="--enable-multilib"
57 else
58   multilib_arg=
61 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
62 AC_ARG_ENABLE([version-specific-runtime-libs],
63   AC_HELP_STRING([--enable-version-specific-runtime-libs],
64                  [Specify that runtime libraries should be installed in a compi
65 ler-specific directory]),
66   [case "$enableval" in
67     yes) enable_version_specific_runtime_libs=yes ;;
68     no)  enable_version_specific_runtime_libs=no ;;
69     *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs
70 ]);;
71    esac],
72   [enable_version_specific_runtime_libs=no])
73 AC_MSG_RESULT($enable_version_specific_runtime_libs)
75 # Calculate toolexeclibdir
76 # Also toolexecdir, though it's only used in toolexeclibdir
77 case ${enable_version_specific_runtime_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_alias)'
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_alias)'
90       toolexeclibdir='$(toolexecdir)/lib'
91     else
92       toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
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 # Set config_dir based on the target.  config_dir specifies where to get
104 # target-specific files.  The generic implementation is incomplete, but
105 # contains information on what's needed
106 case "${target}" in
108   x86_64-*-*)
109     config_dir="x86"
110     ;;
112   i?86-*-*)
113     config_dir="x86"
114     ;;
116   *)
117     config_dir="generic"
118     ;;
120 esac
121 AC_SUBST(config_dir)
123 # We have linker scripts for appropriate operating systems
124 linux_linker_script=no
125 case "${host}" in
126     *-*-linux*)
127         linux_linker_script=yes
128         ;;
129 esac
130 AM_CONDITIONAL(LINUX_LINKER_SCRIPT, test "$linux_linker_script" = "yes")
132 mac_linker_script=no
133 case "${host}" in
134     *-*-apple*)
135         mac_linker_script=yes
136         ;;
137 esac
138 AM_CONDITIONAL(MAC_LINKER_SCRIPT, test "$mac_linker_script" = "yes")
140 AC_LIBTOOL_DLOPEN
141 AM_PROG_LIBTOOL
142 AC_SUBST(toolexecdir)
143 AC_SUBST(toolexeclibdir)
145 AC_CONFIG_HEADER(target-config.h)
147 AC_CHECK_SIZEOF([int])
148 AC_CHECK_SIZEOF([void*])
150 # Must be last
151 AC_OUTPUT