+# build examples (or not)
+AC_ARG_WITH(examples,
+ AC_HELP_STRING([--with-examples], [Build the examples]),
+ [
+ case "${withval}" in
+ yes) BUILD_EXAMPLES=yes ;;
+ no) BUILD_EXAMPLES=no ;;
+ *) AC_MSG_ERROR(bad value ${withval} for --with-examples) ;;
+ esac],
+ [BUILD_EXAMPLES=no])
+
+AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
+
+# just print out our status
+if test x$BUILD_EXAMPLES = xyes; then
+ AC_MSG_NOTICE(Will locally build example programs)
+else
+ AC_MSG_NOTICE(Will not build examples )
+fi
+
+# use maemo gtk+ specific api (or not)
+AC_ARG_WITH(maemo-gtk,
+ AC_HELP_STRING([--with-maemo-gtk], [Use Maemo GTK+ API]),
+ [
+ case "${withval}" in
+ yes) USE_MAEMO_GTK=yes ;;
+ no) USE_MAEMO_GTK=no ;;
+ *) AC_MSG_ERROR(bad value ${withval} for --with-maemo-gtk) ;;
+ esac],
+ [USE_MAEMO_GTK=yes])
+
+AM_CONDITIONAL(USE_MAEMO_GTK, test "x$USE_MAEMO_GTK" = "xyes")
+
+# just print out our status
+if test x$USE_MAEMO_GTK = xyes; then
+ AC_MSG_NOTICE(Will use Maemo GTK+ specific API)
+ MAEMO_GTK="-DMAEMO_GTK"
+ AC_SUBST(MAEMO_GTK)
+ MAEMO_CHANGES="-DMAEMO_CHANGES"
+ AC_SUBST(MAEMO_CHANGES)
+else
+ AC_MSG_NOTICE(Will not use Maemo GTK+ specific API)
+fi
+
+# build with assertion checks (or not)
+AC_ARG_WITH(asserts,
+ AC_HELP_STRING([--with-asserts], [Build with the assertion checks]),
+ [
+ case "${withval}" in
+ yes) BUILD_WITH_ASSERTS=yes ;;
+ no) BUILD_WITH_ASSERTS=no ;;
+ *) AC_MSG_ERROR(bad value ${withval} for --with-asserts) ;;
+ esac],
+ [BUILD_WITH_ASSERTS=no])
+
+# just print out our status
+if test x$BUILD_WITH_ASSERTS = xyes; then
+ AC_MSG_NOTICE(Will build with assertion checks)
+ ASSERT_CFLAGS=""
+else
+ AC_MSG_NOTICE(Will not build with assertion checks)
+ ASSERT_CFLAGS="-DG_DISABLE_ASSERT"
+fi
+
+# build with relaxed flags or not
+AC_ARG_ENABLE(fatal,
+ AC_HELP_STRING([--enable-fatal], [Build with fatal warnings]),
+ [
+ case "${enableval}" in
+ yes) BUILD_WITH_FATAL=yes ;;
+ no) BUILD_WITH_FATAL=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-fatal) ;;
+ esac],
+ [BUILD_WITH_FATAL=no])
+
+# just print out our status
+if test x$BUILD_WITH_FATAL = xyes; then
+ AC_MSG_NOTICE(Will build with fatal warnings)
+ FATAL_CFLAGS="-Werror"
+else
+ AC_MSG_NOTICE(Will build with non-fatal warnings)
+ FATAL_CFLAGS=""
+fi
+
+# disable deprecated symbols
+AC_ARG_ENABLE(deprecated,
+ [AC_HELP_STRING([--enable-deprecated],
+ [enable use of deprecated symbols [default=yes]])],,
+ [enable_deprecated="yes"])
+
+if test x$enable_deprecated = xno; then
+ DISABLE_DEPRECATED="-DHILDON_DISABLE_DEPRECATED"
+fi
+
+AM_CONDITIONAL([HILDON_DISABLE_DEPRECATED], test "x$enable_deprecated" = "xno")
+
+# Check support (c unit test)
+PKG_CHECK_MODULES(CHECK, check , [BUILD_TESTS="yes"], [BUILD_TESTS="no"])
+AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
+
+CFLAGS="$CFLAGS ${ASSERT_CFLAGS} -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-format ${FATAL_CFLAGS}"
+# -Wno-format due to way translation string are done
+
+### disable deprecated symbols
+EXTRA_CFLAGS="$DISABLE_DEPRECATED"
+AC_SUBST(EXTRA_CFLAGS)
+
+### enable MAEMO platform extensions
+CFLAGS="$CFLAGS $MAEMO_CHANGES $MAEMO_GTK"
+
+# HILDON_OBJ_*