-
Notifications
You must be signed in to change notification settings - Fork 9
/
configure.ac
94 lines (83 loc) · 2.4 KB
/
configure.ac
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
AC_INIT([pet], [0.11.6], [[email protected]])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_SUBST(versioninfo)
versioninfo=10:6:0
AC_PROG_CC
AC_PROG_CXX
AC_PROG_GREP
LT_INIT
AC_PROG_SED
AX_DETECT_CLANG
AX_SUBMODULE(isl,build|bundled|system,bundled)
AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled)
AC_SUBST(ISL_CFLAGS)
AC_SUBST(ISL_LIBS)
AC_SUBST(ISL_SRCDIR)
AC_SUBST(ISL_BUILDDIR)
case "$with_isl" in
bundled)
ISL_CFLAGS="-I\$(top_srcdir)/isl/include -I\$(top_builddir)/isl/include"
ISL_CFLAGS="$ISL_CFLAGS"
ISL_SRCDIR="$srcdir/isl"
ISL_BUILDDIR=isl
;;
build)
ISL_SRCDIR="$isl_srcdir"
ISL_BUILDDIR=`echo @abs_builddir@ | $with_isl_builddir/config.status --file=-`
ISL_CFLAGS="-I$isl_srcdir/include -I$ISL_BUILDDIR/include"
ISL_CFLAGS="$ISL_CFLAGS"
ISL_LIBS="$with_isl_builddir/libisl.la"
;;
system)
PKG_CHECK_MODULES([ISL], [isl])
PACKAGE_CFLAGS_ISL="$ISL_CFLAGS"
esac
AM_CONDITIONAL(HAVE_ISL_BUILDDIR, test "x$ISL_BUILDDIR" != "x")
AX_SUBMODULE(libyaml,system|no,system)
AC_SUBST(LIBYAML_CPPFLAGS)
AC_SUBST(LIBYAML_LDFLAGS)
if test "x$with_libyaml_prefix" != "x"; then
LIBYAML_CPPFLAGS="-I$with_libyaml_prefix/include"
fi
if test "x$with_libyaml_exec_prefix" != "x"; then
LIBYAML_LDFLAGS="-L$with_libyaml_exec_prefix/lib"
fi
if test "$with_libyaml" = "system"; then
SAVE_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LIBYAML_CPPFLAGS"
AC_CHECK_HEADER([yaml.h],[],[with_libyaml="no"])
CPPFLAGS="$SAVE_CPPFLAGS"
fi
AC_SUBST(extra_bin_programs)
AC_SUBST(extra_noinst_programs)
AC_SUBST(extra_tests)
if test "$with_libyaml" != "no"; then
extra_bin_programs="pet"
extra_noinst_programs="pet_scop_cmp"
extra_tests="pet_test.sh"
fi
if test "$with_isl" != "system"; then
extra_tests="$extra_tests codegen_test.sh"
fi
PACKAGE_CFLAGS="$PACKAGE_CFLAGS_ISL"
PACKAGE_LIBS="-lpet -lisl"
AX_CREATE_PKGCONFIG_INFO
AX_DETECT_GIT_HEAD
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], [$LLVM_CONFIG])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES([pet_test.sh], [chmod +x pet_test.sh])
AC_CONFIG_FILES([codegen_test.sh], [chmod +x codegen_test.sh])
AC_CONFIG_FILES(all.c)
if test $with_isl = bundled; then
AC_CONFIG_SUBDIRS(isl)
fi
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 --with-clang=system"
])
AC_OUTPUT