- gnome) MODEST_PLATFORM=gnome;;
- maemo) MODEST_PLATFORM=maemo;;
- *) MODEST_PLATFORM=${with_platform}
-esac], [MODEST_PLATFORM=gnome
- with_platform=gnome])
+ gnome|maemo|detect) MODEST_PLATFORM=${with_platform};;
+ *) AC_MSG_ERROR([Unknown platform selected]);;
+esac], [MODEST_PLATFORM=detect])
+
+if test "$MODEST_PLATFORM" = "detect"; then
+ MODEST_PLATFORM="$detected_platform"
+ with_platform=$detected_platform
+fi