pass ppcg_scop to generate_*
[ppcg.git] / configure.ac
blob5aae573f47e111f28da9a983d7c8161859cc34ca
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         ppcg_configure_args="$ppcg_configure_args --with-isl=build"
20         ;;
21 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"
26         ;;
27 system)
28         PKG_CHECK_MODULES([ISL], [isl])
29 esac
31 AX_SUBMODULE(pet,bundled|system,bundled)
32 AM_CONDITIONAL(BUNDLED_PET, test $with_pet = bundled)
34 AC_SUBST(PET_CFLAGS)
35 AC_SUBST(PET_LIBS)
36 case "$with_pet" in
37 bundled)
38         PET_CFLAGS="$PET_CFLAGS -I\$(top_srcdir)/pet/include"
39         ;;
40 system)
41         PKG_CHECK_MODULES([PET], [pet])
42         ;;
43 esac
45 AX_DETECT_GIT_HEAD
46 echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h
48 AC_CONFIG_FILES(Makefile)
49 if test $with_isl = bundled; then
50         AC_CONFIG_SUBDIRS(isl)
52 if test $with_pet = bundled; then
53         AC_CONFIG_SUBDIRS(pet)
55 AC_CONFIG_COMMANDS_POST([
56         dnl pass on arguments to subdir configures, but don't
57         dnl add them to config.status
58         ac_configure_args="$ac_configure_args $ppcg_configure_args"
60 AC_OUTPUT