1 AC_INIT([pet], [0.11.8], [isl-development@googlegroups.com])
2 AC_CONFIG_AUX_DIR([build-aux])
3 AC_CONFIG_MACRO_DIR([m4])
4 AM_INIT_AUTOMAKE([foreign])
5 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
17 AX_SUBMODULE(isl,build|bundled|system,bundled)
18 AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled)
23 AC_SUBST(ISL_BUILDDIR)
26 ISL_CFLAGS="-I\$(top_srcdir)/isl/include -I\$(top_builddir)/isl/include"
27 ISL_CFLAGS="$ISL_CFLAGS"
28 ISL_SRCDIR="$srcdir/isl"
32 ISL_SRCDIR="$isl_srcdir"
33 ISL_BUILDDIR=`echo @abs_builddir@ | $with_isl_builddir/config.status --file=-`
34 ISL_CFLAGS="-I$isl_srcdir/include -I$ISL_BUILDDIR/include"
35 ISL_CFLAGS="$ISL_CFLAGS"
36 ISL_LIBS="$with_isl_builddir/libisl.la"
39 PKG_CHECK_MODULES([ISL], [isl])
40 PACKAGE_CFLAGS_ISL="$ISL_CFLAGS"
42 AM_CONDITIONAL(HAVE_ISL_BUILDDIR, test "x$ISL_BUILDDIR" != "x")
44 AX_SUBMODULE(libyaml,system|no,system)
45 AC_SUBST(LIBYAML_CPPFLAGS)
46 AC_SUBST(LIBYAML_LDFLAGS)
47 if test "x$with_libyaml_prefix" != "x"; then
48 LIBYAML_CPPFLAGS="-I$with_libyaml_prefix/include"
50 if test "x$with_libyaml_exec_prefix" != "x"; then
51 LIBYAML_LDFLAGS="-L$with_libyaml_exec_prefix/lib"
54 if test "$with_libyaml" = "system"; then
55 SAVE_CPPFLAGS=$CPPFLAGS
56 CPPFLAGS="$CPPFLAGS $LIBYAML_CPPFLAGS"
57 AC_CHECK_HEADER([yaml.h],[],[with_libyaml="no"])
58 CPPFLAGS="$SAVE_CPPFLAGS"
61 AC_SUBST(extra_bin_programs)
62 AC_SUBST(extra_noinst_programs)
65 if test "$with_libyaml" != "no"; then
66 extra_bin_programs="pet"
67 extra_noinst_programs="pet_scop_cmp"
68 extra_tests="pet_test.sh"
70 if test "$with_isl" != "system"; then
71 extra_tests="$extra_tests codegen_test.sh"
74 PACKAGE_CFLAGS="$PACKAGE_CFLAGS_ISL"
75 PACKAGE_LIBS="-lpet -lisl"
76 AX_CREATE_PKGCONFIG_INFO
80 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], [$LLVM_CONFIG])
81 AC_CONFIG_HEADERS(config.h)
82 AC_CONFIG_FILES(Makefile)
83 AC_CONFIG_FILES([pet_test.sh], [chmod +x pet_test.sh])
84 AC_CONFIG_FILES([codegen_test.sh], [chmod +x codegen_test.sh])
85 AC_CONFIG_FILES(all.c)
86 if test $with_isl = bundled; then
87 AC_CONFIG_SUBDIRS(isl)
89 AC_CONFIG_COMMANDS_POST([
90 dnl pass on arguments to subdir configures, but don't
91 dnl add them to config.status
92 ac_configure_args="$ac_configure_args --with-clang=system"