annotate libhsail-rt/configure.ac @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children 1830386684a0
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 AC_PREREQ([2.64])
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 # Needed to define ${target}. Needs to be very early to avoid annoying
kono
parents:
diff changeset
40 # warning about calling AC_ARG_PROGRAM before AC_CANONICAL_SYSTEM
kono
parents:
diff changeset
41 AC_CANONICAL_SYSTEM
kono
parents:
diff changeset
42 target_alias=${target_alias-$host_alias}
kono
parents:
diff changeset
43 AC_SUBST(target_alias)
kono
parents:
diff changeset
44 AM_INIT_AUTOMAKE([1.11.6 foreign no-dist])
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 AM_MAINTAINER_MODE
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 AC_PROG_CC
kono
parents:
diff changeset
49 AC_PROG_CXX
kono
parents:
diff changeset
50 # AC_PROG_LIBTOOL
kono
parents:
diff changeset
51 AC_CONFIG_FILES([Makefile])
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 if test "${multilib}" = "yes"; then
kono
parents:
diff changeset
54 multilib_arg="--enable-multilib"
kono
parents:
diff changeset
55 else
kono
parents:
diff changeset
56 multilib_arg=
kono
parents:
diff changeset
57 fi
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
kono
parents:
diff changeset
60 AC_ARG_ENABLE([version-specific-runtime-libs],
kono
parents:
diff changeset
61 AC_HELP_STRING([--enable-version-specific-runtime-libs],
kono
parents:
diff changeset
62 [Specify that runtime libraries should be installed in a compi
kono
parents:
diff changeset
63 ler-specific directory]),
kono
parents:
diff changeset
64 [case "$enableval" in
kono
parents:
diff changeset
65 yes) enable_version_specific_runtime_libs=yes ;;
kono
parents:
diff changeset
66 no) enable_version_specific_runtime_libs=no ;;
kono
parents:
diff changeset
67 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs
kono
parents:
diff changeset
68 ]);;
kono
parents:
diff changeset
69 esac],
kono
parents:
diff changeset
70 [enable_version_specific_runtime_libs=no])
kono
parents:
diff changeset
71 AC_MSG_RESULT($enable_version_specific_runtime_libs)
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 # Calculate toolexeclibdir
kono
parents:
diff changeset
74 # Also toolexecdir, though it's only used in toolexeclibdir
kono
parents:
diff changeset
75 case ${enable_version_specific_runtime_libs} in
kono
parents:
diff changeset
76 yes)
kono
parents:
diff changeset
77 # Need the gcc compiler version to know where to install libraries
kono
parents:
diff changeset
78 # and header files if --enable-version-specific-runtime-libs option
kono
parents:
diff changeset
79 # is selected.
kono
parents:
diff changeset
80 toolexecdir='$(libdir)/gcc/$(target_alias)'
kono
parents:
diff changeset
81 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
kono
parents:
diff changeset
82 ;;
kono
parents:
diff changeset
83 no)
kono
parents:
diff changeset
84 if test -n "$with_cross_host" &&
kono
parents:
diff changeset
85 test x"$with_cross_host" != x"no"; then
kono
parents:
diff changeset
86 # Install a library built with a cross compiler in tooldir, not libdir.
kono
parents:
diff changeset
87 toolexecdir='$(exec_prefix)/$(target_alias)'
kono
parents:
diff changeset
88 toolexeclibdir='$(toolexecdir)/lib'
kono
parents:
diff changeset
89 else
kono
parents:
diff changeset
90 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
kono
parents:
diff changeset
91 toolexeclibdir='$(libdir)'
kono
parents:
diff changeset
92 fi
kono
parents:
diff changeset
93 multi_os_directory=`$CC -print-multi-os-directory`
kono
parents:
diff changeset
94 case $multi_os_directory in
kono
parents:
diff changeset
95 .) ;; # Avoid trailing /.
kono
parents:
diff changeset
96 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
kono
parents:
diff changeset
97 esac
kono
parents:
diff changeset
98 ;;
kono
parents:
diff changeset
99 esac
kono
parents:
diff changeset
100
kono
parents:
diff changeset
101 # Set config_dir based on the target. config_dir specifies where to get
kono
parents:
diff changeset
102 # target-specific files. The generic implementation is incomplete, but
kono
parents:
diff changeset
103 # contains information on what's needed
kono
parents:
diff changeset
104 case "${target}" in
kono
parents:
diff changeset
105
kono
parents:
diff changeset
106 x86_64-*-*)
kono
parents:
diff changeset
107 config_dir="x86"
kono
parents:
diff changeset
108 ;;
kono
parents:
diff changeset
109
kono
parents:
diff changeset
110 i?86-*-*)
kono
parents:
diff changeset
111 config_dir="x86"
kono
parents:
diff changeset
112 ;;
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 *)
kono
parents:
diff changeset
115 config_dir="generic"
kono
parents:
diff changeset
116 ;;
kono
parents:
diff changeset
117
kono
parents:
diff changeset
118 esac
kono
parents:
diff changeset
119 AC_SUBST(config_dir)
kono
parents:
diff changeset
120
kono
parents:
diff changeset
121 # We have linker scripts for appropriate operating systems
kono
parents:
diff changeset
122 linux_linker_script=no
kono
parents:
diff changeset
123 case "${host}" in
kono
parents:
diff changeset
124 *-*-linux*)
kono
parents:
diff changeset
125 linux_linker_script=yes
kono
parents:
diff changeset
126 ;;
kono
parents:
diff changeset
127 esac
kono
parents:
diff changeset
128 AM_CONDITIONAL(LINUX_LINKER_SCRIPT, test "$linux_linker_script" = "yes")
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130 mac_linker_script=no
kono
parents:
diff changeset
131 case "${host}" in
kono
parents:
diff changeset
132 *-*-apple*)
kono
parents:
diff changeset
133 mac_linker_script=yes
kono
parents:
diff changeset
134 ;;
kono
parents:
diff changeset
135 esac
kono
parents:
diff changeset
136 AM_CONDITIONAL(MAC_LINKER_SCRIPT, test "$mac_linker_script" = "yes")
kono
parents:
diff changeset
137
kono
parents:
diff changeset
138 AC_LIBTOOL_DLOPEN
kono
parents:
diff changeset
139 AM_PROG_LIBTOOL
kono
parents:
diff changeset
140 AC_SUBST(toolexecdir)
kono
parents:
diff changeset
141 AC_SUBST(toolexeclibdir)
kono
parents:
diff changeset
142
kono
parents:
diff changeset
143 AC_CONFIG_HEADER(target-config.h)
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 AC_CHECK_SIZEOF([int])
kono
parents:
diff changeset
146 AC_CHECK_SIZEOF([void*])
kono
parents:
diff changeset
147
kono
parents:
diff changeset
148 # Determine what GCC version number to use in filesystem paths.
kono
parents:
diff changeset
149 GCC_BASE_VER
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 # Must be last
kono
parents:
diff changeset
152 AC_OUTPUT