File: configure.ac

package info (click to toggle)
llvm-toolchain-7 1%3A7.0.1-8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 733,456 kB
  • sloc: cpp: 3,776,651; ansic: 633,271; asm: 350,301; python: 142,716; objc: 107,612; sh: 22,626; lisp: 11,056; perl: 7,999; pascal: 6,742; ml: 5,537; awk: 3,536; makefile: 2,557; cs: 2,027; xml: 841; ruby: 156
file content (153 lines) | stat: -rw-r--r-- 4,482 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
AC_INIT([isl], [0.20], [isl-development@googlegroups.com])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_SUBST(versioninfo)
versioninfo=20:0:1

if test "x$prefix" != "xNONE"; then
	prefix_wd=`cd $prefix && pwd`
	srcdir_wd=`cd $srcdir && pwd`
	wd=`pwd`
	if test "x$prefix_wd" = "x$srcdir_wd"; then
		AC_MSG_ERROR(Installation in source directory not supported)
	fi
	if test "x$prefix_wd" = "x$wd"; then
		AC_MSG_ERROR(Installation in build directory not supported)
	fi
fi

AC_PROG_CC
AC_PROG_CXX

AX_CC_MAXOPT
AX_GCC_WARN_UNUSED_RESULT
AX_C___ATTRIBUTE__

# CXX11FLAGS contains the flags (if any) added by AX_CXX_COMPILE_STDCXX_11
# Original state of CXX and CXXCPP is preserved because CXX11FLAGS
# is only needed for compiling interface/isl_test_cpp
AC_SUBST(CXX11FLAGS)
ac_save_CXX="$CXX"
ac_save_CXXCPP="$CXXCPP"
AX_CXX_COMPILE_STDCXX_11([noext], [optional])
CXX11FLAGS=${CXX#$ac_save_CXX}
CXX="$ac_save_CXX"
CXXCPP="$ac_save_CXXCPP"

AC_PROG_GREP
AC_PROG_LIBTOOL
AC_PROG_SED
AM_PATH_PYTHON([2.5], [], [:])
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])

AC_CHECK_PROG(PERL, perl, perl, [])
AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex, [])
AC_CHECK_PROG(POD2HTML, pod2html, pod2html, [])

AM_CONDITIONAL(GENERATE_DOC, test -n "$PERL" -a -n "$PDFLATEX" -a -n "$POD2HTML")

AX_CREATE_STDINT_H(include/isl/stdint.h)

AC_ARG_WITH([int],
	    [AS_HELP_STRING([--with-int=gmp|imath|imath-32],
			    [Which package to use to represent
				multi-precision integers [default=gmp]])],
	    [], [with_int=gmp])
case "$with_int" in
gmp|imath|imath-32)
	;;
*)
	AC_MSG_ERROR(
	    [bad value ${withval} for --with-int (use gmp, imath or imath-32)])
esac

AC_SUBST(MP_CPPFLAGS)
AC_SUBST(MP_LDFLAGS)
AC_SUBST(MP_LIBS)
case "$with_int" in
gmp)
	AX_DETECT_GMP
	;;
imath|imath-32)
	AX_DETECT_IMATH
	;;
esac
if test "x$with_int" = "ximath-32" -a "x$GCC" = "xyes"; then
	MP_CPPFLAGS="-std=gnu99 $MP_CPPFLAGS"
fi

AM_CONDITIONAL(IMATH_FOR_MP, test x$with_int = ximath -o x$with_int = ximath-32)
AM_CONDITIONAL(GMP_FOR_MP, test x$with_int = xgmp)

AM_CONDITIONAL(HAVE_CXX11, test "x$HAVE_CXX11" = "x1")
AM_CONDITIONAL(SMALL_INT_OPT, test "x$with_int" == "ximath-32")
AS_IF([test "x$with_int" == "ximath-32"], [
	AC_DEFINE([USE_SMALL_INT_OPT], [], [Use small integer optimization])
])

AC_CHECK_DECLS(ffs,[],[],[#include <strings.h>])
AC_CHECK_DECLS(__builtin_ffs,[],[],[])
AC_CHECK_DECLS([_BitScanForward],[],[],[#include <intrin.h>])
if test "x$ac_cv_have_decl_ffs" = xno -a \
		"x$ac_cv_have_decl___builtin_ffs" = xno -a \
		"x$ac_cv_have_decl__BitScanForward" = xno; then
	AC_MSG_ERROR([No ffs implementation found])
fi
AC_CHECK_DECLS([strcasecmp,strncasecmp],[],[],[#include <strings.h>])
AC_CHECK_DECLS([_stricmp,_strnicmp],[],[],[#include <string.h>])
if test "x$ac_cv_have_decl_strcasecmp" = xno -a \
		"x$ac_cv_have_decl__stricmp" = xno; then
	AC_MSG_ERROR([No strcasecmp implementation found])
fi
if test "x$ac_cv_have_decl_strncasecmp" = xno -a \
		"x$ac_cv_have_decl__strnicmp" = xno; then
	AC_MSG_ERROR([No strncasecmp implementation found])
fi
AC_CHECK_DECLS([snprintf,_snprintf],[],[],[#include <stdio.h>])
if test "x$ac_cv_have_decl_snprintf" = xno -a \
		"x$ac_cv_have_decl__snprintf" = xno; then
	AC_MSG_ERROR([No snprintf implementation found])
fi

AX_SUBMODULE(clang,system|no,no)
case "$with_clang" in
system)
	AX_DETECT_CLANG
	;;
esac
AM_CONDITIONAL(HAVE_CLANG, test $with_clang = system)
AM_CONDITIONAL(HAVE_CPP_ISL_H,
    [test $with_clang = system -o -f $srcdir/include/isl/cpp.h])

AX_SET_WARNING_FLAGS

AC_SUBST(WARNING_FLAGS)

PACKAGE_CFLAGS="$MP_CPPFLAGS"
PACKAGE_LDFLAGS="$MP_LDFLAGS"
PACKAGE_LIBS="-lisl $MP_LIBS"
AX_CREATE_PKGCONFIG_INFO

AX_DETECT_GIT_HEAD

AH_BOTTOM([#include <isl_config_post.h>])
AC_CONFIG_HEADERS(isl_config.h)
AC_CONFIG_FILES(isl_srcdir.c)
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(doc/Makefile)
if test $with_clang = system; then
	AC_CONFIG_FILES(interface/Makefile)
fi
AC_CONFIG_FILES([bound_test.sh], [chmod +x bound_test.sh])
AC_CONFIG_FILES([codegen_test.sh], [chmod +x codegen_test.sh])
AC_CONFIG_FILES([pip_test.sh], [chmod +x pip_test.sh])
AC_CONFIG_FILES([flow_test.sh], [chmod +x flow_test.sh])
AC_CONFIG_FILES([schedule_test.sh], [chmod +x schedule_test.sh])
AC_CONFIG_COMMANDS_POST([
	dnl pass on arguments to subdir configures, but don't
	dnl add them to config.status
	ac_configure_args="$ac_configure_args $isl_configure_args"
])
AC_OUTPUT