+### ILIAD #####################################################################
+AC_ARG_ENABLE([iliad],
+ [AS_HELP_STRING([--enable-iliad],[Compiles Chimara for the iLiad])],
+ [AS_CASE([${enableval}],
+ [yes], [iliad=true],
+ [no], [iliad=false],
+ [AC_MSG_ERROR([bad value ${enableval} for --enable-iliad])]
+ )],
+ [iliad=false]
+)
+
+AM_CONDITIONAL([TARGET_ILIAD], [$TEST "x$iliad" = xtrue])
+
+### BUILD WITHOUT RECENT FILES MANAGER #########################################
+# (to work around a bug on OS X)
+AC_ARG_ENABLE([recent],
+ [AS_HELP_STRING([--disable-recent],[Omit recent files menu (to work around a bug on OS X])],
+ [AS_CASE([${enableval}],
+ [yes], [OPEN_RECENT_MENU_ITEM="<menuitem action=\"recent\"/>"],
+ [no], [OPEN_RECENT_MENU_ITEM="<!-- <menuitem action=\"recent\"/>-->"],
+ [AC_MSG_ERROR([bad value ${enableval} for --enable-recent])]
+ )],
+ [OPEN_RECENT_MENU_ITEM="<menuitem action=\"recent\"/>"]
+)
+AC_SUBST(OPEN_RECENT_MENU_ITEM)
+
+### RPM CONFIGURATION ##########################################################
+# --enable-rpm requires rpm and rpmbuild
+AC_PATH_PROG([RPMBUILD], [rpmbuild], [notfound])
+AC_ARG_ENABLE([rpm],
+ [AS_HELP_STRING([--enable-rpm],[Configure for building RPM package [no] (requires rpm and rpmbuild)])],
+ [AS_CASE([${enableval}],
+ [yes], [AS_IF(
+ [$TEST "x$RPMBUILD" = xnotfound],
+ [AC_MSG_ERROR([rpmbuild is required for --enable-rpm])],
+ [rpm=true])],
+ [no], [rpm=false],
+ [AC_MSG_ERROR([bad value ${enableval} for --enable-rpm])]
+ )],
+ [rpm=false]
+)
+AM_CONDITIONAL([BUILDING_RPM], [$TEST "x$rpm" = xtrue])
+
+### SOUND LIBRARY TO USE ######################################################
+
+AC_ARG_WITH([gstreamer],
+ [AS_HELP_STRING([--without-gstreamer], [Disable GStreamer sound])],
+ [],
+ [with_gstreamer=yes])
+SOUND_MODULE=
+AS_IF([$TEST "x$with_gstreamer" != xno],
+ [AC_DEFINE([GSTREAMER_SOUND], [1], [Define to enable sound support with GStreamer])
+ SOUND_MODULE="gstreamer-0.10 >= 0.10.12"])
+