Add option to disable the use of private and/or shared memory.
[ppcg.git] / configure.ac
blob43d954e1d534dc9c53648abbfe158eed35e75ea9
1 AC_INIT([ppcg], [0.00])
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
10 AX_SUBMODULE(isl,build|bundled|system,bundled)
11 AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled)
13 AC_SUBST(ISL_CFLAGS)
14 AC_SUBST(ISL_LIBS)
15 case "$with_isl" in
16 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         ;;
20 build)
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         ;;
25 system)
26         PKG_CHECK_MODULES([ISL], [isl])
27 esac
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)
34 AC_SUBST(CLOOG_LIBS)
35 CLOOG_CFLAGS="-DCLOOG_INT_GMP=1"
36 case "$with_cloog" in
37 bundled)
38         CLOOG_CFLAGS="$CLOOG_CFLAGS -I\$(top_srcdir)/cloog/include -I\$(top_builddir)/cloog/include"
39         ;;
40 build)
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"
44         ;;
45 system)
46         if test "x$with_cloog_prefix" != "x"; then
47                 CLOOG_CFLAGS="$CLOOG_CFLAGS -I$with_cloog_prefix/include"
48         fi
49         if test "x$with_cloog_exec_prefix" != "x"; then
50                 CLOOG_LDFLAGS="-L$with_cloog_exec_prefix/lib"
51         fi
52         CLOOG_LIBS="-lcloog-isl"
53 esac
55 AX_SUBMODULE(pet,bundled|system,bundled)
56 AM_CONDITIONAL(BUNDLED_PET, test $with_pet = bundled)
58 AC_SUBST(PET_CFLAGS)
59 AC_SUBST(PET_LIBS)
60 case "$with_pet" in
61 bundled)
62         PET_CFLAGS="$PET_CFLAGS -I\$(top_srcdir)/pet/include"
63         ;;
64 system)
65         PKG_CHECK_MODULES([PET], [pet])
66         ;;
67 esac
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"
84 AC_OUTPUT