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"
21 ISL_BUILDDIR=`echo @abs_builddir@ | $with_isl_builddir/config.status --file=-`
22 ppcg_configure_args="$ppcg_configure_args --with-isl-builddir=$ISL_BUILDDIR"
23 ISL_CFLAGS="-I$isl_srcdir/include -I$ISL_BUILDDIR/include"
24 ISL_LIBS="$with_isl_builddir/libisl.la -lgmp"
27 PKG_CHECK_MODULES([ISL], [isl])
30 AX_SUBMODULE(cloog,build|bundled|system,bundled)
31 AM_CONDITIONAL(BUNDLED_CLOOG, test $with_cloog = bundled)
33 AC_SUBST(CLOOG_LDFLAGS)
34 AC_SUBST(CLOOG_CFLAGS)
36 CLOOG_CFLAGS="-DCLOOG_INT_GMP=1"
39 CLOOG_CFLAGS="$CLOOG_CFLAGS -I\$(top_srcdir)/cloog/include -I\$(top_builddir)/cloog/include"
42 with_cloog_builddir=`echo @abs_builddir@ | $with_cloog_builddir/config.status --file=-`
43 CLOOG_CFLAGS="$CLOOG_CFLAGS -I$cloog_srcdir/include -I$with_cloog_builddir/include"
44 CLOOG_LIBS="$with_cloog_builddir/libcloog-isl.la"
47 if test "x$with_cloog_prefix" != "x"; then
48 CLOOG_CFLAGS="$CLOOG_CFLAGS -I$with_cloog_prefix/include"
50 if test "x$with_cloog_exec_prefix" != "x"; then
51 CLOOG_LDFLAGS="-L$with_cloog_exec_prefix/lib"
53 CLOOG_LIBS="-lcloog-isl"
56 AX_SUBMODULE(pet,bundled|system,bundled)
57 AM_CONDITIONAL(BUNDLED_PET, test $with_pet = bundled)
63 PET_CFLAGS="$PET_CFLAGS -I\$(top_srcdir)/pet/include"
66 PKG_CHECK_MODULES([PET], [pet])
70 AC_CONFIG_FILES(Makefile)
71 if test $with_isl = bundled; then
72 AC_CONFIG_SUBDIRS(isl)
74 if test $with_pet = bundled; then
75 AC_CONFIG_SUBDIRS(pet)
77 if test $with_cloog = bundled; then
78 AC_CONFIG_SUBDIRS(cloog)
80 AC_CONFIG_COMMANDS_POST([
81 dnl pass on arguments to subdir configures, but don't
82 dnl add them to config.status
83 ac_configure_args="$ac_configure_args $ppcg_configure_args"