AC_PREREQ([2.54])
AC_REVISION([$Id$])
m4_define([firm_major_version], [1])
-m4_define([firm_minor_version], [12])
-m4_define([firm_micro_version], [2])
+m4_define([firm_minor_version], [17])
+m4_define([firm_micro_version], [0])
m4_define([firm_version],
[firm_major_version.firm_minor_version.firm_micro_version])
AC_INIT([libfirm], [firm_version], [firm@ipd.info.uni-karlsruhe.de])
AC_DEFINE([libfirm_VERSION_MINOR], [firm_minor_version], [Firms minor version number])
AC_DEFINE([libfirm_VERSION_MICRO], [firm_micro_version], [Firms micro version number])
+dnl enable libtool
+LT_INIT([win32-dll])
+
dnl generate the config header file
AC_CONFIG_HEADER([config.h])
dnl keep track of the environment set by the user
-libfirm_conf_env="${CC+CC='$CC'} ${CFLAGS+CFLAGS='$CFLAGS'} ${CPP+CPP='$CPP'} ${CPPFLAGS+CPPFLAGS='$CPPFLAGS'} ${LDFLAGS+LDFLAGS='$LDFLAGS'} ${LIBS+LIBS='$LIBS'}"
+libfirm_conf_env="${CC+CC='$CC'} ${CFLAGS+CFLAGS='$CFLAGS'} ${CPP+CPP='$CPP'} ${CPPFLAGS+CPPFLAGS='$CPPFLAGS'} ${LDFLAGS+LDFLAGS='$LDFLAGS'} ${LIBS+LIBS='$LIBS -lm'}"
AC_SUBST(libfirm_conf_env)
dnl Package options
[AS_HELP_STRING([--disable-debug], [disable verifiers and additional debugging routines])],
[enable_debug_libfirm="$enableval"], [enable_debug_libfirm="yes"])
if test "$enable_debug_libfirm" = yes; then
- FIRMCONFIG_DEBUG_libfirm="#define DEBUG_libfirm"
+ AC_DEFINE([DEBUG_libfirm], [], [define to enable debug mode and checks])
fi
-AC_SUBST([FIRMCONFIG_DEBUG_libfirm])
-AC_SUBST([enable_debug_libfirm])
AC_ARG_ENABLE([assert],
[AS_HELP_STRING([--disable-assert], [disable assertions])],
fi
AC_SUBST([enable_assert])
-dnl disable inlining
-dnl ----------------
-AC_ARG_ENABLE([inlining],
-[AS_HELP_STRING([--disable-inlining], [disable inline C-extension])],
-[enable_inlining="$enableval"], [enable_inlining="yes"])
-
-if test "$enable_inlining" = yes; then
- FIRMCONFIG_USE_INLINING="#define USE_INLINING"
-fi
-AC_SUBST([FIRMCONFIG_USE_INLINING])
-AC_SUBST([enable_inlining])
-
dnl set profiling
dnl -------------
AC_ARG_ENABLE([profile],
AC_SUBST([enable_profile_libfirm])
-dnl set heap analyses support
-dnl -------------------------
-AC_ARG_ENABLE([heapanalysis],
-[AS_HELP_STRING([--enable-heapanalysis], [Compile with heap analysis.])],
-[enable_heapanalysis=$enableval], [enable_heapanalysis="no"])
-
-if test "$enable_heapanalysis" = "yes"; then
- FIRMCONFIG_DO_HEAPANALYSIS="#define DO_HEAPANALYSIS"
-fi
-AC_SUBST([FIRMCONFIG_DO_HEAPANALYSIS])
-AC_SUBST([enable_heapanalysis])
-
-dnl enable Firm hooks
-dnl -------------
-AC_ARG_ENABLE([hooks],
-[AS_HELP_STRING([--disable-hooks], [disable Firm hooks])],
-[enable_hooks="$enableval"], [enable_hooks="yes"])
-
-if test "$enable_hooks" = yes; then
- FIRMCONFIG_FIRM_ENABLE_HOOKS="#define FIRM_ENABLE_HOOKS"
-fi
-AC_SUBST([FIRMCONFIG_FIRM_ENABLE_HOOKS])
-
dnl enable Firm statistics
dnl -------------
AC_ARG_ENABLE([statistics],
if test "$enable_ilp" = yes; then
FIRMCONFIG_WITH_ILP="#define FIRMCONFIG_WITH_ILP"
+ AC_DEFINE([WITH_ILP], [], [enable to build code using ilp solvers])
fi
-AC_SUBST([FIRMCONFIG_WITH_ILP])
-AC_SUBST(enable_ilp)
-
-dnl enable JVM calling from Firm
-dnl --------------------------------
-AC_ARG_ENABLE([jvm],
-[AS_HELP_STRING([--enable-jvm], [enable to call the jvm])],
-[enable_jvm="$enableval"], [enable_jvm="no"])
-
-if test "$enable_jvm" = yes; then
- FIRMCONFIG_WITH_JVM="#define FIRMCONFIG_WITH_JVM"
-fi
-AC_SUBST([FIRMCONFIG_WITH_JVM])
-AC_SUBST(enable_jvm)
-
-dnl enable wchar_t support for identifiers
-dnl --------------------------------
-AC_ARG_ENABLE([wchar_support],
-[AS_HELP_STRING([--enable-wchar-support], [enable wchar_t support for identifiers (needed for java)])],
-[enable_wchar_support="$enableval"], [enable_wchar_support="no"])
-
-if test "$enable_wchar_support" = yes; then
- FIRMCONFIG_FIRM_ENABLE_WCHAR="#define FIRM_ENABLE_WCHAR"
-fi
-AC_SUBST([FIRMCONFIG_FIRM_ENABLE_WCHAR])
-AC_SUBST([enable_wchar_support])
dnl disable backend
dnl ---------------
dnl check for a C compiler
dnl ----------------------
AC_PROG_CC
-AC_PROG_LIBTOOL
AC_PATH_PROGS(PERL, perl perl5)
AC_HEADER_STDC
AC_CHECK_HEADERS([math.h], , AC_MSG_ERROR("math header file not found"))
+AC_CHECK_HEADERS([alloca.h])
dnl Checks for libraries.
dnl =====================
AC_C_BIGENDIAN(,,,)
AC_C_LONG_DOUBLE
-dnl Checks for library functions.
-dnl =============================
-
-dnl check for strerror
-
-AC_CHECK_FUNC(strerror,,
- AC_MSG_ERROR("need strerror function")
-)
-
-dnl we use the gnu extension obstack_printf
-AC_DEFINE([_GNU_SOURCE], [], [we use gnu extensions])
-AC_CHECK_FUNC(strerror,,
- AC_MSG_ERROR("need obstack_printf function")
-)
-
dnl Error messaging
dnl ===============
dnl Output results
AC_CONFIG_FILES([
- firm_config.h
Makefile
ir/Makefile
include/libfirm/Makefile
libfirm.pc
])
+#always do inlining
+AC_DEFINE([INLINE], [inline], [define inline to compiler inline keyword])
+
BACKENDS=""
-if test "$enable_backend" == yes; then
+if test "$enable_backend" = yes; then
BACKENDS="arm ia32 mips ppc32"
fi
AC_SUBST([BACKENDS])
echo " profiling $enable_profile_libfirm"
echo " debug/verifiers $enable_debug_libfirm"
echo " assertions $enable_assert"
-echo " hooks $enable_hooks"
echo " statistics $enable_statistics"
echo " ilp $enable_ilp"
-echo " jvm $enable_jvm"
-echo " wide char support $enable_wchar_support"
echo ""