dnl Project: libFIRM
dnl File name: configure.in
dnl Purpose:
-dnl Author: Till Riedel, Matthias Braun
+dnl Author: Matthias Braun
dnl CVS-ID: $Id$
dnl Copyright: (c) 2002-2007 University of Karlsruhe
dnl Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
dnl
AC_PREREQ([2.54])
AC_REVISION([$Id$])
-AC_INIT([libfirm],[1.3.0],[firm@info.uni-karlsruhe.de])
+AC_INIT([libfirm],[1.9.0],[firm@ipd.info.uni-karlsruhe.de])
dnl generate the config header file
-AC_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADER([config.h])
AH_TOP([])
[AS_HELP_STRING([--disable-libcore], [disable libcore support])],
[enable_libcore="$enableval"],[enable_libcore="yes"])
-if test "$enable_libcore" = yes; then
- AC_MSG_CHECKING([for libcore])
- LIBS="$LIBS -lcore"
- AC_LINK_IFELSE(
- AC_LANG_PROGRAM([#include <libcore/lc_opts.h>],
- [lc_opts_init("", 0, "", 1, 0)]),
- [],
- [AC_MSG_ERROR(
- [Couldn't build libcore testprogramm. Check config.log for details])])
- AC_DEFINE([WITH_LIBCORE], [], [compile with libcore support])
-fi
AC_SUBST([enable_libcore])
dnl enable ILP solver support
AC_SUBST(enable_external_effects)
+dnl disable backend
+dnl ---------------
+AC_ARG_ENABLE([backend],
+[AS_HELP_STRING([--disable-backend], [disable backends])],
+[enable_backend="$enableval"], [enable_backend="yes"])
+
+AC_SUBST(enable_backend)
+
dnl Checks for programs.
dnl ====================
fi
fi
+dnl check for availability of pkg-config
+PKG_PROG_PKG_CONFIG
+
dnl Checks for header files.
dnl ========================
fi
fi
+if test "$enable_libcore" == "yes"; then
+ PKG_CHECK_MODULES([LIBCORE], [libcore])
+ AC_DEFINE([WITH_LIBCORE], [], [define to 1 to use the libcore])
+fi
+
dnl Checks for typedefs, structures, and compiler characteristics.
dnl ==============================================================
AC_C_CONST
dnl ===============
+dnl Output results
AC_CONFIG_FILES([
Makefile
MakeRules
dnl snip the lower part of config.h and put it to ir/config/firm_config.h
AC_CONFIG_COMMANDS([firm_config.h],
[awk -f ${ac_top_srcdir}/filter.awk < ${ac_top_builddir}config.h > ${ac_top_builddir}ir/config/firm_config.h])
+
+BACKENDS=""
+if test "$enable_backend" == yes; then
+ BACKENDS="arm ia32 mips ppc32"
+fi
+AC_SUBST([BACKENDS])
+
+if test "$BACKENDS"; then
+ AC_CONFIG_FILES([ir/be/Makefile])
+ for backend in $BACKENDS; do
+ AC_CONFIG_FILES([ir/be/$backend/Makefile])
+ done
+fi
+
AC_OUTPUT
dnl output summary of firm configuration
echo ""
echo "firm configuration summary:"
+echo " backends $BACKENDS"
echo " profiling $enable_profile_libfirm"
echo " debug/verifiers $enable_debug_libfirm"
echo " assertions $enable_assert"