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"
26 PKG_CHECK_MODULES([ISL], [isl])
29 AX_SUBMODULE(cloog,build|bundled|system,bundled)
30 AM_CONDITIONAL(BUNDLED_CLOOG, test $with_cloog = bundled)
32 AC_SUBST(CLOOG_LDFLAGS)
33 AC_SUBST(CLOOG_CFLAGS)
35 CLOOG_CFLAGS="-DCLOOG_INT_GMP=1"
38 CLOOG_CFLAGS="$CLOOG_CFLAGS -I\$(top_srcdir)/cloog/include -I\$(top_builddir)/cloog/include"
41 with_cloog_builddir=`echo @abs_builddir@ | $with_cloog_builddir/config.status --file=-`
42 CLOOG_CFLAGS="$CLOOG_CFLAGS -I$cloog_srcdir/include -I$with_cloog_builddir/include"
43 CLOOG_LIBS="$with_cloog_builddir/libcloog-isl.la"
46 if test "x$with_cloog_prefix" != "x"; then
47 CLOOG_CFLAGS="$CLOOG_CFLAGS -I$with_cloog_prefix/include"
49 if test "x$with_cloog_exec_prefix" != "x"; then
50 CLOOG_LDFLAGS="-L$with_cloog_exec_prefix/lib"
52 CLOOG_LIBS="-lcloog-isl"
55 AX_SUBMODULE(pet,bundled|system,bundled)
56 AM_CONDITIONAL(BUNDLED_PET, test $with_pet = bundled)
62 PET_CFLAGS="$PET_CFLAGS -I\$(top_srcdir)/pet/include"
65 PKG_CHECK_MODULES([PET], [pet])
69 AC_CONFIG_FILES(Makefile)
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 if test $with_cloog = bundled; then
77 AC_CONFIG_SUBDIRS(cloog)
79 AC_CONFIG_COMMANDS_POST([
80 dnl pass on arguments to subdir configures, but don't
81 dnl add them to config.status
82 ac_configure_args="$ac_configure_args $ppcg_configure_args"