print more understandable error message in case of unbounded arrays
[ppcg.git] / configure.ac
blob321976a2f14cca62c409a0aead664291c8728845
1 AC_INIT([ppcg], [0.01], [isl-development@googlegroups.com])
2 AC_CONFIG_AUX_DIR([.])
3 AC_CONFIG_MACRO_DIR([m4])
4 AM_INIT_AUTOMAKE([foreign])
5 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
7 AC_PROG_CC
8 AC_PROG_LIBTOOL
9 PKG_PROG_PKG_CONFIG
11 AX_SUBMODULE(isl,build|bundled|system,bundled)
12 AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled)
14 AC_SUBST(ISL_CFLAGS)
15 AC_SUBST(ISL_LIBS)
16 case "$with_isl" in
17 bundled)
18         ISL_CFLAGS="-I\$(top_srcdir)/isl/include -I\$(top_builddir)/isl/include"
19         ISL_CFLAGS="$ISL_CFLAGS"
20         ppcg_configure_args="$ppcg_configure_args --with-isl-builddir=../isl"
21         ppcg_configure_args="$ppcg_configure_args --with-isl=build"
22         ;;
23 build)
24         ISL_BUILDDIR=`echo @abs_builddir@ | $with_isl_builddir/config.status --file=-`
25         ppcg_configure_args="$ppcg_configure_args --with-isl-builddir=$ISL_BUILDDIR"
26         ISL_CFLAGS="-I$isl_srcdir/include -I$ISL_BUILDDIR/include"
27         ISL_CFLAGS="$ISL_CFLAGS"
28         ISL_LIBS="$with_isl_builddir/libisl.la"
29         ;;
30 system)
31         PKG_CHECK_MODULES([ISL], [isl])
32 esac
34 AX_SUBMODULE(pet,bundled|system,bundled)
35 AM_CONDITIONAL(BUNDLED_PET, test $with_pet = bundled)
37 AC_SUBST(PET_CFLAGS)
38 AC_SUBST(PET_LIBS)
39 case "$with_pet" in
40 bundled)
41         PET_CFLAGS="$PET_CFLAGS -I\$(top_srcdir)/pet/include"
42         ;;
43 system)
44         PKG_CHECK_MODULES([PET], [pet])
45         ;;
46 esac
48 AC_SUBST(POLYBENCH_DIR)
49 AC_SUBST(extra_tests)
50 AC_ARG_WITH([polybench],
51         [AS_HELP_STRING([--with-polybench=DIR], [PolyBench location])],
52         [
53         if test -f "$with_polybench/utilities/benchmark_list"; then
54                 POLYBENCH_DIR=$with_polybench
55                 extra_tests="$extra_tests polybench_test.sh"
56         fi
57         ])
59 AX_DETECT_GIT_HEAD
60 echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h
62 AC_CONFIG_FILES(Makefile)
63 AC_CONFIG_FILES([polybench_test.sh], [chmod +x polybench_test.sh])
64 if test $with_isl = bundled; then
65         AC_CONFIG_SUBDIRS(isl)
67 if test $with_pet = bundled; then
68         AC_CONFIG_SUBDIRS(pet)
70 AC_CONFIG_COMMANDS_POST([
71         dnl pass on arguments to subdir configures, but don't
72         dnl add them to config.status
73         ac_configure_args="$ac_configure_args $ppcg_configure_args"
75 AC_OUTPUT