annotate libhsail-rt/configure.ac @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 # Starting point copied from libcilkrts:
kono
parents:
diff changeset
2 #
kono
parents:
diff changeset
3 # @copyright
kono
parents:
diff changeset
4 # Copyright (C) 2011-2013, Intel Corporation
kono
parents:
diff changeset
5 # All rights reserved.
kono
parents:
diff changeset
6 #
kono
parents:
diff changeset
7 # @copyright
kono
parents:
diff changeset
8 # Redistribution and use in source and binary forms, with or without
kono
parents:
diff changeset
9 # modification, are permitted provided that the following conditions
kono
parents:
diff changeset
10 # are met:
kono
parents:
diff changeset
11 #
kono
parents:
diff changeset
12 # * Redistributions of source code must retain the above copyright
kono
parents:
diff changeset
13 # notice, this list of conditions and the following disclaimer.
kono
parents:
diff changeset
14 # * Redistributions in binary form must reproduce the above copyright
kono
parents:
diff changeset
15 # notice, this list of conditions and the following disclaimer in
kono
parents:
diff changeset
16 # the documentation and/or other materials provided with the
kono
parents:
diff changeset
17 # distribution.
kono
parents:
diff changeset
18 # * Neither the name of Intel Corporation nor the names of its
kono
parents:
diff changeset
19 # contributors may be used to endorse or promote products derived
kono
parents:
diff changeset
20 # from this software without specific prior written permission.
kono
parents:
diff changeset
21 #
kono
parents:
diff changeset
22 # @copyright
kono
parents:
diff changeset
23 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
kono
parents:
diff changeset
24 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
kono
parents:
diff changeset
25 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
kono
parents:
diff changeset
26 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
kono
parents:
diff changeset
27 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
kono
parents:
diff changeset
28 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
kono
parents:
diff changeset
29 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
kono
parents:
diff changeset
30 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
kono
parents:
diff changeset
31 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
kono
parents:
diff changeset
32 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
kono
parents:
diff changeset
33 # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
kono
parents:
diff changeset
34 # POSSIBILITY OF SUCH DAMAGE.
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 AC_INIT([phsa HSAIL runtime library], [1.0], [pekka.jaaskelainen@parmance.com])
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 # Needed to define ${target}. Needs to be very early to avoid annoying
kono
parents:
diff changeset
39 # warning about calling AC_ARG_PROGRAM before AC_CANONICAL_SYSTEM
kono
parents:
diff changeset
40 AC_CANONICAL_SYSTEM
kono
parents:
diff changeset
41 target_alias=${target_alias-$host_alias}
kono
parents:
diff changeset
42 AC_SUBST(target_alias)
kono
parents:
diff changeset
43 AM_INIT_AUTOMAKE([1.11.6 foreign no-dist])
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 AM_MAINTAINER_MODE
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 AC_PROG_CC
kono
parents:
diff changeset
48 AC_PROG_CXX
kono
parents:
diff changeset
49 # AC_PROG_LIBTOOL
kono
parents:
diff changeset
50 AC_CONFIG_FILES([Makefile])
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 if test "${multilib}" = "yes"; then
kono
parents:
diff changeset
53 multilib_arg="--enable-multilib"
kono
parents:
diff changeset
54 else
kono
parents:
diff changeset
55 multilib_arg=
kono
parents:
diff changeset
56 fi
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
kono
parents:
diff changeset
59 AC_ARG_ENABLE([version-specific-runtime-libs],
kono
parents:
diff changeset
60 AC_HELP_STRING([--enable-version-specific-runtime-libs],
kono
parents:
diff changeset
61 [Specify that runtime libraries should be installed in a compi
kono
parents:
diff changeset
62 ler-specific directory]),
kono
parents:
diff changeset
63 [case "$enableval" in
kono
parents:
diff changeset
64 yes) enable_version_specific_runtime_libs=yes ;;
kono
parents:
diff changeset
65 no) enable_version_specific_runtime_libs=no ;;
kono
parents:
diff changeset
66 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs
kono
parents:
diff changeset
67 ]);;
kono
parents:
diff changeset
68 esac],
kono
parents:
diff changeset
69 [enable_version_specific_runtime_libs=no])
kono
parents:
diff changeset
70 AC_MSG_RESULT($enable_version_specific_runtime_libs)
kono
parents:
diff changeset
71
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
72 GCC_WITH_TOOLEXECLIBDIR
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
73
111
kono
parents:
diff changeset
74 # Calculate toolexeclibdir
kono
parents:
diff changeset
75 # Also toolexecdir, though it's only used in toolexeclibdir
kono
parents:
diff changeset
76 case ${enable_version_specific_runtime_libs} in
kono
parents:
diff changeset
77 yes)
kono
parents:
diff changeset
78 # Need the gcc compiler version to know where to install libraries
kono
parents:
diff changeset
79 # and header files if --enable-version-specific-runtime-libs option
kono
parents:
diff changeset
80 # is selected.
kono
parents:
diff changeset
81 toolexecdir='$(libdir)/gcc/$(target_alias)'
kono
parents:
diff changeset
82 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
kono
parents:
diff changeset
83 ;;
kono
parents:
diff changeset
84 no)
kono
parents:
diff changeset
85 if test -n "$with_cross_host" &&
kono
parents:
diff changeset
86 test x"$with_cross_host" != x"no"; then
kono
parents:
diff changeset
87 # Install a library built with a cross compiler in tooldir, not libdir.
kono
parents:
diff changeset
88 toolexecdir='$(exec_prefix)/$(target_alias)'
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
89 case ${with_toolexeclibdir} in
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
90 no)
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
91 toolexeclibdir='$(toolexecdir)/lib'
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
92 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
93 *)
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
94 toolexeclibdir=${with_toolexeclibdir}
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
95 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
96 esac
111
kono
parents:
diff changeset
97 else
kono
parents:
diff changeset
98 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
kono
parents:
diff changeset
99 toolexeclibdir='$(libdir)'
kono
parents:
diff changeset
100 fi
kono
parents:
diff changeset
101 multi_os_directory=`$CC -print-multi-os-directory`
kono
parents:
diff changeset
102 case $multi_os_directory in
kono
parents:
diff changeset
103 .) ;; # Avoid trailing /.
kono
parents:
diff changeset
104 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
kono
parents:
diff changeset
105 esac
kono
parents:
diff changeset
106 ;;
kono
parents:
diff changeset
107 esac
kono
parents:
diff changeset
108
kono
parents:
diff changeset
109 # Set config_dir based on the target. config_dir specifies where to get
kono
parents:
diff changeset
110 # target-specific files. The generic implementation is incomplete, but
kono
parents:
diff changeset
111 # contains information on what's needed
kono
parents:
diff changeset
112 case "${target}" in
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 x86_64-*-*)
kono
parents:
diff changeset
115 config_dir="x86"
kono
parents:
diff changeset
116 ;;
kono
parents:
diff changeset
117
kono
parents:
diff changeset
118 i?86-*-*)
kono
parents:
diff changeset
119 config_dir="x86"
kono
parents:
diff changeset
120 ;;
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 *)
kono
parents:
diff changeset
123 config_dir="generic"
kono
parents:
diff changeset
124 ;;
kono
parents:
diff changeset
125
kono
parents:
diff changeset
126 esac
kono
parents:
diff changeset
127 AC_SUBST(config_dir)
kono
parents:
diff changeset
128
kono
parents:
diff changeset
129 # We have linker scripts for appropriate operating systems
kono
parents:
diff changeset
130 linux_linker_script=no
kono
parents:
diff changeset
131 case "${host}" in
kono
parents:
diff changeset
132 *-*-linux*)
kono
parents:
diff changeset
133 linux_linker_script=yes
kono
parents:
diff changeset
134 ;;
kono
parents:
diff changeset
135 esac
kono
parents:
diff changeset
136 AM_CONDITIONAL(LINUX_LINKER_SCRIPT, test "$linux_linker_script" = "yes")
kono
parents:
diff changeset
137
kono
parents:
diff changeset
138 mac_linker_script=no
kono
parents:
diff changeset
139 case "${host}" in
kono
parents:
diff changeset
140 *-*-apple*)
kono
parents:
diff changeset
141 mac_linker_script=yes
kono
parents:
diff changeset
142 ;;
kono
parents:
diff changeset
143 esac
kono
parents:
diff changeset
144 AM_CONDITIONAL(MAC_LINKER_SCRIPT, test "$mac_linker_script" = "yes")
kono
parents:
diff changeset
145
kono
parents:
diff changeset
146 AC_LIBTOOL_DLOPEN
kono
parents:
diff changeset
147 AM_PROG_LIBTOOL
kono
parents:
diff changeset
148 AC_SUBST(toolexecdir)
kono
parents:
diff changeset
149 AC_SUBST(toolexeclibdir)
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 AC_CONFIG_HEADER(target-config.h)
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 AC_CHECK_SIZEOF([int])
kono
parents:
diff changeset
154 AC_CHECK_SIZEOF([void*])
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 # Determine what GCC version number to use in filesystem paths.
kono
parents:
diff changeset
157 GCC_BASE_VER
kono
parents:
diff changeset
158
kono
parents:
diff changeset
159 # Must be last
kono
parents:
diff changeset
160 AC_OUTPUT