forked from IITH-Compilers/bullseye
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
159 lines (136 loc) · 4.99 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
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
154
155
156
157
158
AC_PREREQ([2.69])
AC_INIT([bullseye], 1.0)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
# make static linking the default
AM_ENABLE_STATIC
AM_DISABLE_SHARED
AC_ENABLE_STATIC
AC_DISABLE_SHARED
AC_PROG_CC
AC_PROG_CXX
AM_PROG_AR
#LT_INIT
LT_INIT([static],[disable-shared]) # works only if static libraries are available
#LT_INIT([disable-shared])
AX_BOOST_BASE([1.60.0])
AX_BOOST_PROGRAM_OPTIONS
AC_SUBST(CPPFLAGS, "-I$CPLEX_HOME/cplex/include/ -I$CPLEX_HOME/concert/include/")
AC_SUBST(LDFLAGS, "-L$CPLEX_HOME/cplex/lib/x86-64_linux/static_pic/ -L$CPLEX_HOME/concert/lib/x86-64_linux/static_pic/")
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debugging, default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
AX_SUBMODULE(isl,build|bundled|system,bundled)
AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled)
AM_CONDITIONAL(BUILD_ISL, test $with_isl = build)
AC_SUBST(ISL_CFLAGS)
AC_SUBST(ISL_LIBS)
AC_SUBST(ISL_SRCDIR)
AC_SUBST(ISL_BUILDDIR)
AS_CASE([$with_isl] ,
[bundled],[
ISL_CFLAGS="-I\$(top_srcdir)/isl/include -I\$(top_builddir)/isl/include"
ISL_CFLAGS="$ISL_CFLAGS"
ISL_SRCDIR="$srcdir/isl"
ISL_BUILDDIR=isl
bv_configure_args="$bv_configure_args --with-isl-builddir=../isl"
PACKAGE_CFLAGS_ISL='-I${prefix}/include'
],
[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_LIBS="$with_isl_builddir/libisl.la"
PACKAGE_CFLAGS_ISL='-I${prefix}/include'
],
[system],[
PKG_CHECK_MODULES([ISL], [isl])
PACKAGE_CFLAGS_ISL="$ISL_CFLAGS"
]
)
AM_CONDITIONAL(HAVE_ISL_BUILDDIR, test "x$ISL_BUILDDIR" != "x")
AX_SUBMODULE(barvinok,build|bundled|system,bundled)
AM_CONDITIONAL(BUNDLED_BARVINOK, test $with_barvinok = bundled)
AM_CONDITIONAL(BUILD_BARVINOK, test $with_barvinok = build)
AC_SUBST(BARVINOK_CFLAGS)
AC_SUBST(BARVINOK_LIBS)
AC_SUBST(BARVINOK_SRCDIR)
AC_SUBST(BARVINOK_BUILDDIR)
AS_CASE([$with_barvinok],
[bundled], [
BARVINOK_CFLAGS="-I\$(top_srcdir)/barvinok -I\$(top_builddir)/barvinok"
BARVINOK_CFLAGS="$BARVINOK_CFLAGS"
BARVINOK_SRCDIR="$srcdir/barvinok"
BARVINOK_BUILDDIR=barvinok
],
[build], [
BARVINOK_SRCDIR="$barvinok_srcdir"
BARVINOK_CFLAGS="$BARVINOK_CFLAGS"
BARVINOK_BUILDDIR=`echo @abs_builddir@ | $with_BARVINOK_builddir/config.status --file=-`
BARVINOK_CFLAGS="-I$barvinok_srcdir/ -I$BARVINOK_BUILDDIR/"
BARVINOK_LIBS="$with_barvinok_builddir/libisl.la"
],
[system], [
PKG_CHECK_MODULES([BARVINOK], [barvinok])
PACKAGE_CFLAGS_BARVINOK="$BARVINOK_CFLAGS"
]
)
AM_CONDITIONAL(HAVE_BARVINOK_BUILDDIR, test "x$BARVINOK_BUILDDIR" != "x")
AX_SUBMODULE(pet,bundled|build|system,bundled)
AC_SUBST(PET_CFLAGS)
AC_SUBST(PET_LIBS)
AC_SUBST(PET_BUILDDIR)
AS_CASE([$with_pet],
[bundled], [
PET_CFLAGS="-I\$(top_srcdir)/pet/include"
],
[build], [
PET_BUILDDIR=`echo @abs_builddir@ | $with_pet_builddir/config.status --file=-`
PET_CFLAGS="-I$pet_srcdir/include"
],
[system], [
PKG_CHECK_MODULES([PET], [pet])
PACKAGE_CFLAGS_PET="$PET_CFLAGS"
]
)
AM_CONDITIONAL(BUNDLED_PET, test $with_pet = bundled)
AM_CONDITIONAL(BUILD_PET, test $with_pet = build)
# PACKAGE_CFLAGS="$PACKAGE_CFLAGS_ISL $PACKAGE_CFLAGS_BARVINOK $PACKAGE_CFLAGS_PET"
# PACKAGE_LIBS="-lisl -lbarvinok -lpet"
# AX_CREATE_PKGCONFIG_INFO
# copy the example files
AC_CONFIG_LINKS([tests/blink.c:tests/inputs/blink.c])
AC_CONFIG_LINKS([tests/cholesky.c:tests/inputs/cholesky.c])
AC_CONFIG_LINKS([tests/copy.c:tests/inputs/copy.c])
AC_CONFIG_LINKS([tests/multiplication.c:tests/inputs/multiplication.c])
AC_CONFIG_LINKS([tests/stencil.c:tests/inputs/stencil.c])
AC_CONFIG_LINKS([tests/toy.c:tests/inputs/toy.c])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES(Makefile tests/Makefile)
AS_IF([test $with_isl = bundled],[AC_CONFIG_SUBDIRS(isl)])
AS_IF([test $with_barvinok = bundled],[AC_CONFIG_SUBDIRS(barvinok)])
AS_IF([test $with_pet = bundled],[AC_CONFIG_SUBDIRS(pet)])
AC_CONFIG_SUBDIRS(tests)
AC_OUTPUT
echo " /*-----------------------------------------------*"
echo " * Bullseye configuration is OK *"
echo " *-----------------------------------------------*/"
echo "cpp flags in initial flags in CPPFLAGS : $CPPFLAGS"
echo "cpp flags in initial flags in CPLEX_HOME : $CPLEX_HOME"
echo "cpp flags in initial flags in LDFLAGS : $LDFLAGS"
echo "cpp flags in initial flags in ISL_CFLAGS : $ISL_CFLAGS"
echo "cpp flags in initial flags in ISL_LIBS : $ISL_LIBS"
echo "cpp flags in initial flags in BARVINOK_CFLAGS : $BARVINOK_CFLAGS"
echo "cpp flags in initial flags in BARVINOK_LIBS : $BARVINOK_LIBS"
echo "cpp flags in initial flags in PET_CFLAGS : $PET_CFLAGS"
echo "cpp flags in initial flags in PET_LIBS : $PET_LIBS"
echo "cpp flags in initial flags in ac_configure_args : $ac_configure_args"