Ensure a valid profile is selected 58/25658/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 7 Aug 2014 14:20:38 +0000 (15:20 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 7 Aug 2014 14:20:40 +0000 (15:20 +0100)
[Problem] It was possible to pass any old junk when using --enable-profile and there would be no
          error.
[Cause]   we never actually checked if it matched any of the profiles we support.
[Solutin] Ensure we check all profiles and show an error when the profile does not match any of
          the ones we support.

Change-Id: Ide85946093a06e7dd1f7ef97585a42b1bae71c81

build/tizen/configure.ac

index cf4d542..11627da 100644 (file)
@@ -106,6 +106,11 @@ AC_ARG_ENABLE([profile],
               [enable_profile=$enableval],
               [enable_profile=COMMON])
 
+# Ensure valid profile selected
+if test "x$enable_profile" != "xCOMMON" -a "x$enable_profile" != "xMOBILE" -a "x$enable_profile" != "xLITE" -a "x$enable_profile" != "xWEARABLE" -a "x$enable_profile" != "xTV" -a "x$enable_profile" != "xUBUNTU"; then
+  AC_MSG_ERROR([$enable_profile is an invalid profile])
+fi
+
 AC_ARG_ENABLE(wayland,
               [  --enable-wayland       Build on Wayland],
               enable_wayland=yes,