annotate config/isl.m4 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 # This file is part of GCC.
kono
parents:
diff changeset
2 #
kono
parents:
diff changeset
3 # GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
4 # the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
5 # Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
6 # version.
kono
parents:
diff changeset
7 #
kono
parents:
diff changeset
8 # GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
10 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
11 # for more details.
kono
parents:
diff changeset
12 #
kono
parents:
diff changeset
13 # You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
14 # along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
15 # <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
16 #
kono
parents:
diff changeset
17 # Contributed by Richard Guenther <rguenther@suse.de>
kono
parents:
diff changeset
18 # Based on cloog.m4
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 # ISL_INIT_FLAGS ()
kono
parents:
diff changeset
21 # -------------------------
kono
parents:
diff changeset
22 # Provide configure switches for isl support.
kono
parents:
diff changeset
23 # Initialize isllibs/islinc according to the user input.
kono
parents:
diff changeset
24 AC_DEFUN([ISL_INIT_FLAGS],
kono
parents:
diff changeset
25 [
kono
parents:
diff changeset
26 AC_ARG_WITH([isl-include],
kono
parents:
diff changeset
27 [AS_HELP_STRING(
kono
parents:
diff changeset
28 [--with-isl-include=PATH],
kono
parents:
diff changeset
29 [Specify directory for installed isl include files])])
kono
parents:
diff changeset
30 AC_ARG_WITH([isl-lib],
kono
parents:
diff changeset
31 [AS_HELP_STRING(
kono
parents:
diff changeset
32 [--with-isl-lib=PATH],
kono
parents:
diff changeset
33 [Specify the directory for the installed isl library])])
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 AC_ARG_ENABLE(isl-version-check,
kono
parents:
diff changeset
36 [AS_HELP_STRING(
kono
parents:
diff changeset
37 [--disable-isl-version-check],
kono
parents:
diff changeset
38 [disable check for isl version])],
kono
parents:
diff changeset
39 ENABLE_ISL_CHECK=$enableval,
kono
parents:
diff changeset
40 ENABLE_ISL_CHECK=yes)
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 # Initialize isllibs and islinc.
kono
parents:
diff changeset
43 case $with_isl in
kono
parents:
diff changeset
44 no)
kono
parents:
diff changeset
45 isllibs=
kono
parents:
diff changeset
46 islinc=
kono
parents:
diff changeset
47 ;;
kono
parents:
diff changeset
48 "" | yes)
kono
parents:
diff changeset
49 ;;
kono
parents:
diff changeset
50 *)
kono
parents:
diff changeset
51 isllibs="-L$with_isl/lib"
kono
parents:
diff changeset
52 islinc="-I$with_isl/include"
kono
parents:
diff changeset
53 ;;
kono
parents:
diff changeset
54 esac
kono
parents:
diff changeset
55 if test "x${with_isl_include}" != x ; then
kono
parents:
diff changeset
56 islinc="-I$with_isl_include"
kono
parents:
diff changeset
57 fi
kono
parents:
diff changeset
58 if test "x${with_isl_lib}" != x; then
kono
parents:
diff changeset
59 isllibs="-L$with_isl_lib"
kono
parents:
diff changeset
60 fi
kono
parents:
diff changeset
61 dnl If no --with-isl flag was specified and there is in-tree isl
kono
parents:
diff changeset
62 dnl source, set up flags to use that and skip any version tests
kono
parents:
diff changeset
63 dnl as we cannot run them before building isl.
kono
parents:
diff changeset
64 if test "x${islinc}" = x && test "x${isllibs}" = x \
kono
parents:
diff changeset
65 && test -d ${srcdir}/isl; then
kono
parents:
diff changeset
66 isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
kono
parents:
diff changeset
67 islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
kono
parents:
diff changeset
68 ENABLE_ISL_CHECK=no
kono
parents:
diff changeset
69 AC_MSG_WARN([using in-tree isl, disabling version check])
kono
parents:
diff changeset
70 fi
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 isllibs="${isllibs} -lisl"
kono
parents:
diff changeset
73 ]
kono
parents:
diff changeset
74 )
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
kono
parents:
diff changeset
77 # ----------------------------------------------------
kono
parents:
diff changeset
78 # Provide actions for failed isl detection.
kono
parents:
diff changeset
79 AC_DEFUN([ISL_REQUESTED],
kono
parents:
diff changeset
80 [
kono
parents:
diff changeset
81 AC_REQUIRE([ISL_INIT_FLAGS])
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 if test "x${with_isl}" = xno; then
kono
parents:
diff changeset
84 $2
kono
parents:
diff changeset
85 elif test "x${with_isl}" != x \
kono
parents:
diff changeset
86 || test "x${with_isl_include}" != x \
kono
parents:
diff changeset
87 || test "x${with_isl_lib}" != x ; then
kono
parents:
diff changeset
88 $1
kono
parents:
diff changeset
89 else
kono
parents:
diff changeset
90 $2
kono
parents:
diff changeset
91 fi
kono
parents:
diff changeset
92 ]
kono
parents:
diff changeset
93 )
kono
parents:
diff changeset
94
kono
parents:
diff changeset
95 # ISL_CHECK_VERSION ISL_CHECK_VERSION ()
kono
parents:
diff changeset
96 # ----------------------------------------------------------------
kono
parents:
diff changeset
97 # Test whether isl contains functionality added to the minimum expected version.
kono
parents:
diff changeset
98 AC_DEFUN([ISL_CHECK_VERSION],
kono
parents:
diff changeset
99 [
kono
parents:
diff changeset
100 if test "${ENABLE_ISL_CHECK}" = yes ; then
kono
parents:
diff changeset
101 _isl_saved_CFLAGS=$CFLAGS
kono
parents:
diff changeset
102 _isl_saved_LDFLAGS=$LDFLAGS
kono
parents:
diff changeset
103 _isl_saved_LIBS=$LIBS
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
kono
parents:
diff changeset
106 LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
kono
parents:
diff changeset
107 LIBS="${_isl_saved_LIBS} -lisl -lgmp"
kono
parents:
diff changeset
108
kono
parents:
diff changeset
109 AC_MSG_CHECKING([for isl 0.15 or later])
kono
parents:
diff changeset
110 AC_TRY_LINK([#include <isl/schedule.h>],
kono
parents:
diff changeset
111 [isl_options_set_schedule_serialize_sccs (NULL, 0);],
kono
parents:
diff changeset
112 [gcc_cv_isl=yes],
kono
parents:
diff changeset
113 [gcc_cv_isl=no])
kono
parents:
diff changeset
114 AC_MSG_RESULT([$gcc_cv_isl])
kono
parents:
diff changeset
115
kono
parents:
diff changeset
116 if test "${gcc_cv_isl}" = no ; then
kono
parents:
diff changeset
117 AC_MSG_RESULT([required isl version is 0.15 or later])
kono
parents:
diff changeset
118 fi
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 CFLAGS=$_isl_saved_CFLAGS
kono
parents:
diff changeset
121 LDFLAGS=$_isl_saved_LDFLAGS
kono
parents:
diff changeset
122 LIBS=$_isl_saved_LIBS
kono
parents:
diff changeset
123 fi
kono
parents:
diff changeset
124 ]
kono
parents:
diff changeset
125 )
kono
parents:
diff changeset
126
kono
parents:
diff changeset
127 # ISL_IF_FAILED (ACTION-IF-FAILED)
kono
parents:
diff changeset
128 # ----------------------------------
kono
parents:
diff changeset
129 # Executes ACTION-IF-FAILED, if GRAPHITE was requested and
kono
parents:
diff changeset
130 # the checks failed.
kono
parents:
diff changeset
131 AC_DEFUN([ISL_IF_FAILED],
kono
parents:
diff changeset
132 [
kono
parents:
diff changeset
133 ISL_REQUESTED([graphite_requested=yes], [graphite_requested=no])
kono
parents:
diff changeset
134
kono
parents:
diff changeset
135 if test "${gcc_cv_isl}" = no ; then
kono
parents:
diff changeset
136 isllibs=
kono
parents:
diff changeset
137 islinc=
kono
parents:
diff changeset
138 fi
kono
parents:
diff changeset
139
kono
parents:
diff changeset
140 if test "${graphite_requested}" = yes \
kono
parents:
diff changeset
141 && test "x${isllibs}" = x \
kono
parents:
diff changeset
142 && test "x${islinc}" = x ; then
kono
parents:
diff changeset
143 $1
kono
parents:
diff changeset
144 fi
kono
parents:
diff changeset
145 ]
kono
parents:
diff changeset
146 )