1 AC_INIT([ppcg], [0.01], [isl-development@googlegroups.com])
3 AC_CONFIG_MACRO_DIR([m4])
4 AM_INIT_AUTOMAKE([foreign])
5 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
12 if test $HAVE_OPENCL = yes; then
13 extra_tests="$extra_tests opencl_test.sh"
16 AX_SUBMODULE(isl,build|bundled|system,bundled)
17 AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled)
23 ISL_CFLAGS="-I\$(top_srcdir)/isl/include -I\$(top_builddir)/isl/include"
24 ISL_CFLAGS="$ISL_CFLAGS"
25 ppcg_configure_args="$ppcg_configure_args --with-isl-builddir=../isl"
26 ppcg_configure_args="$ppcg_configure_args --with-isl=build"
29 ISL_BUILDDIR=`echo @abs_builddir@ | $with_isl_builddir/config.status --file=-`
30 ppcg_configure_args="$ppcg_configure_args --with-isl-builddir=$ISL_BUILDDIR"
31 ISL_CFLAGS="-I$isl_srcdir/include -I$ISL_BUILDDIR/include"
32 ISL_CFLAGS="$ISL_CFLAGS"
33 ISL_LIBS="$with_isl_builddir/libisl.la"
36 PKG_CHECK_MODULES([ISL], [isl])
39 AX_SUBMODULE(pet,bundled|system,bundled)
40 AM_CONDITIONAL(BUNDLED_PET, test $with_pet = bundled)
46 PET_CFLAGS="$PET_CFLAGS -I\$(top_srcdir)/pet/include"
49 PKG_CHECK_MODULES([PET], [pet])
53 AC_SUBST(POLYBENCH_DIR)
55 AC_ARG_WITH([polybench],
56 [AS_HELP_STRING([--with-polybench=DIR], [PolyBench location])],
58 if test -f "$with_polybench/utilities/benchmark_list"; then
59 POLYBENCH_DIR=$with_polybench
60 extra_tests="$extra_tests polybench_test.sh"
65 echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h
67 AC_CONFIG_FILES(Makefile)
68 AC_CONFIG_FILES([polybench_test.sh], [chmod +x polybench_test.sh])
69 AC_CONFIG_FILES([opencl_test.sh], [chmod +x opencl_test.sh])
70 if test $with_isl = bundled; then
71 AC_CONFIG_SUBDIRS(isl)
73 if test $with_pet = bundled; then
74 AC_CONFIG_SUBDIRS(pet)
76 AC_CONFIG_COMMANDS_POST([
77 dnl pass on arguments to subdir configures, but don't
78 dnl add them to config.status
79 ac_configure_args="$ac_configure_args $ppcg_configure_args"