1 AC_INIT([ppcg], [0.00])
3 AC_CONFIG_MACRO_DIR([m4])
4 AM_INIT_AUTOMAKE([foreign])
5 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
10 AX_SUBMODULE(isl,build|bundled|system,bundled)
11 AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled)
17 ISL_CFLAGS="-I\$(top_srcdir)/isl/include -I\$(top_builddir)/isl/include"
18 ppcg_configure_args="$ppcg_configure_args --with-isl-builddir=../isl"
19 ppcg_configure_args="$ppcg_configure_args --with-isl=build"
22 ISL_BUILDDIR=`echo @abs_builddir@ | $with_isl_builddir/config.status --file=-`
23 ppcg_configure_args="$ppcg_configure_args --with-isl-builddir=$ISL_BUILDDIR"
24 ISL_CFLAGS="-I$isl_srcdir/include -I$ISL_BUILDDIR/include"
25 ISL_LIBS="$with_isl_builddir/libisl.la -lgmp"
28 PKG_CHECK_MODULES([ISL], [isl])
31 AX_SUBMODULE(pet,bundled|system,bundled)
32 AM_CONDITIONAL(BUNDLED_PET, test $with_pet = bundled)
38 PET_CFLAGS="$PET_CFLAGS -I\$(top_srcdir)/pet/include"
41 PKG_CHECK_MODULES([PET], [pet])
45 AC_SUBST(POLYBENCH_DIR)
47 AC_ARG_WITH([polybench],
48 [AS_HELP_STRING([--with-polybench=DIR], [PolyBench location])],
50 if test -f "$with_polybench/utilities/benchmark_list"; then
51 POLYBENCH_DIR=$with_polybench
52 extra_tests="$extra_tests polybench_test.sh"
57 echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h
59 AC_CONFIG_FILES(Makefile)
60 AC_CONFIG_FILES([polybench_test.sh], [chmod +x polybench_test.sh])
61 if test $with_isl = bundled; then
62 AC_CONFIG_SUBDIRS(isl)
64 if test $with_pet = bundled; then
65 AC_CONFIG_SUBDIRS(pet)
67 AC_CONFIG_COMMANDS_POST([
68 dnl pass on arguments to subdir configures, but don't
69 dnl add them to config.status
70 ac_configure_args="$ac_configure_args $ppcg_configure_args"