2 AC_INIT(source/backend.c)
3 AC_CONFIG_AUX_DIR(autoconf)
4 AC_CONFIG_MACRO_DIR([m4])
5 AM_INIT_AUTOMAKE(cloog-parma, 0.16.1)
18 AX_CFLAGS_WARN_ALL(CFLAGS_WARN)
20 dnl Checks for typedefs, structures, and compiler characteristics.
24 dnl Checks for header files.
27 dnl /**************************************************************************
29 dnl **************************************************************************/
31 AX_SUBMODULE(gmp,system,system)
35 if test "x$with_gmp_prefix" != "x"; then
36 CPPFLAGS="-I$with_gmp_prefix/include $CPPFLAGS"
39 if test "$with_gmp_exec_prefix" != "yes" ; then
40 LDFLAGS="-L$with_gmp_exec_prefix/lib $LDFLAGS"
43 AC_CHECK_HEADER(gmp.h,
45 [AC_MSG_ERROR(Can't find gmp headers.)])
49 [AC_MSG_ERROR(Can't find gmp library.)])
50 AC_CHECK_DECLS(mp_get_memory_functions,[],[
51 need_get_memory_functions=true
55 AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS,
56 test x$need_get_memory_functions = xtrue)
58 dnl /**************************************************************************
60 dnl **************************************************************************/
62 AX_SUBMODULE(ppl,system,system)
64 AC_SUBST(PPL_CPPFLAGS)
69 if test "x$with_ppl_prefix" != "x"; then
70 PPL_CPPFLAGS="-I$with_ppl_prefix/include"
72 if test "x$with_ppl_exec_prefix" != "x"; then
73 PPL_LDFLAGS="-L$with_ppl_exec_prefix/lib"
75 PPL_LIBS="-lppl_c -lppl -lgmpxx"
76 SAVE_CPPFLAGS="$CPPFLAGS"
77 CPPFLAGS="$PPL_CPPFLAGS $CPPFLAGS"
78 AC_CHECK_HEADER(ppl_c.h,
80 [AC_MSG_ERROR(Can't find PPL headers.)])
81 CPPFLAGS="$SAVE_CPPFLAGS"
84 dnl /**************************************************************************
85 dnl * Where is CLooG? *
86 dnl **************************************************************************/
88 AX_SUBMODULE(cloog,build|bundled,bundled)
90 AC_SUBST(CLOOG_SRCDIR)
91 AC_SUBST(CLOOG_BUILDDIR)
92 AC_SUBST(CLOOG_CPPFLAGS)
95 CLOOG_SRCDIR="\$(top_srcdir)/cloog-core"
96 CLOOG_BUILDDIR="\$(top_builddir)/cloog-core"
100 case "$cloog_srcdir" in
102 CLOOG_SRCDIR=$cloog_srcdir
105 CLOOG_SRCDIR="\$(top_srcdir)/$cloog_srcdir"
107 case "$with_cloog_builddir" in
109 CLOOG_BUILDDIR=$with_cloog_builddir
112 CLOOG_BUILDDIR="\$(top_builddir)/$with_cloog_builddir"
116 CLOOG_CPPFLAGS="-I$CLOOG_SRCDIR/include -I$CLOOG_BUILDDIR -I$CLOOG_BUILDDIR/include"
117 AM_CONDITIONAL(BUNDLED_CLOOG, test $with_cloog = bundled)
120 AC_DEFINE([CLOOG_INT_GMP], 1, [Use arbitrary precision integers])
124 dnl /**************************************************************************
125 dnl * Substitutions *
126 dnl **************************************************************************/
129 dnl Substitutions to do in Makefile.in.
134 AC_SUBST(exec_prefix)
139 PACKAGE_NAME="cloog-ppl"
140 PACKAGE_CFLAGS="-DCLOOG_INT_GMP=1"
141 AX_CREATE_PKGCONFIG_INFO
143 AC_CONFIG_FILES(Makefile test/Makefile)
144 if test $with_cloog = bundled; then
145 AC_CONFIG_SUBDIRS(cloog-core)
147 AC_CONFIG_COMMANDS_POST([
149 for arg in $ac_configure_args; do
154 old_args="$old_args $arg"
158 ac_configure_args="$old_args --without-isl $cloog_ppl_configure_args"
163 echo " /*-----------------------------------------------*"
164 echo " * CLooG configuration is OK *"
165 echo " *-----------------------------------------------*/"
166 echo "It appears that your system is OK to start CLooG compilation. You need"
167 echo "now to type \"make\". After compilation, you should check CLooG by typing"
168 echo "\"make check\". If no problem occur, you can type \"make uninstall\" if"
169 echo "you are upgrading an old version. Lastly type \"make install\" to install"
170 echo "CLooG on your system (log as root if necessary)."