+dnl set heap analyses support
+dnl -------------------------
+AC_MSG_CHECKING([for heapanalysis])
+AC_ARG_ENABLE(heapanalysis, [ --enable-heapanalysis Compile with heap analysis.],
+ [enable_heapanalysis=$enableval], [enable_heapanalysis="no"])
+if test "$enable_heapanalysis" = "no"; then
+ AC_MSG_RESULT([disabled])
+else
+ AC_DEFINE(DO_HEAPANALYSIS)
+ AC_MSG_RESULT([enabled])
+fi
+AC_SUBST(enable_heapanalysis)
+
+dnl disable linking of libiberty parts (xmalloc, xprintf, obstack, ...)
+dnl ----------------------
+AC_ARG_ENABLE(libiberty,
+[ --disable-libiberty disable own libiberty parts],
+[if test "$enableval"=yes; then
+ disable_libiberty=yes
+fi],
+[disable_libiberty=no])
+AC_SUBST(disable_libiberty)
+
+dnl enable Firm hooks
+dnl -------------
+AC_ARG_ENABLE(hooks,
+[ --disable-hooks disable Firm hooks],
+[if test "$enableval" = yes; then
+ AC_DEFINE(FIRM_ENABLE_HOOKS)
+fi],
+AC_DEFINE(FIRM_ENABLE_HOOKS)
+)
+
+dnl enable Firm statistics
+dnl -------------
+AC_ARG_ENABLE(statistics,
+[ --enable-statistics enable Firm statistics],
+[if test "$enableval"=yes; then
+ AC_DEFINE(FIRM_STATISTICS)
+fi])
+AC_SUBST(enable_statistics)
+
+dnl enable libcore debugging support
+dnl --------------------------------
+AC_ARG_ENABLE(libcore,
+[ --enable-libcore enable libcore debugging],
+[if test "$enableval"=yes; then
+ AC_DEFINE(WITH_LIBCORE)
+fi])
+AC_SUBST(enable_libcore)
+
+dnl disable external effects in XML
+dnl -------------------------------
+AC_MSG_CHECKING([for using external effects in xml2])
+AC_ARG_ENABLE(external-effects,
+[ --disable-external-effects disable descriptions of external effects in XML],
+[if test "$enableval"="no"; then
+ enable_external_effects=no
+fi],
+[enable_external_effects=yes])
+AC_SUBST(enable_external_effects)
+if test "$enable_external_effects" == no; then
+ AC_MSG_RESULT([disabled])
+else
+ AC_MSG_RESULT([enabled])
+fi
+dnl check for header and library below