Use option() to handle configuration variables, so they will show up in the CMake GUI


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@577 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8850a6..62bfb6f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,17 +34,12 @@
 
 message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
 
-if(NOT DEFINED WITH_SIMD)
-  set(WITH_SIMD 1)
-endif()
-
-if(NOT DEFINED WITH_ARITH_ENC)
-  set(WITH_ARITH_ENC 1)
-endif()
-
-if(NOT DEFINED WITH_ARITH_DEC)
-  set(WITH_ARITH_DEC 1)
-endif()
+option(WITH_SIMD "Include SIMD extensions" TRUE)
+option(WITH_ARITH_ENC "Include arithmetic encoding support" TRUE)
+option(WITH_ARITH_DEC "Include arithmetic decoding support" TRUE)
+option(WITH_JPEG7 "Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
+option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
+option(WITH_JAVA "Build Java wrapper for the TurboJPEG/OSS library" FALSE)
 
 if(WITH_ARITH_ENC)
   set(C_ARITH_CODING_SUPPORTED 1)
@@ -60,10 +55,6 @@
   message(STATUS "Arithmetic decoding support disabled")
 endif()
 
-if(NOT DEFINED WITH_JAVA)
-  set(WITH_JAVA 0)
-endif()
-
 if(WITH_JAVA)
   message(STATUS "TurboJPEG/OSS Java wrapper enabled")
 else()
diff --git a/configure.ac b/configure.ac
index 5454181..168f1d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -261,7 +261,7 @@
 
 # SIMD is optional
 AC_ARG_WITH([simd],
-    AC_HELP_STRING([--without-simd],[Omit accelerated SIMD routines.]))
+    AC_HELP_STRING([--without-simd],[Omit SIMD extensions.]))
 if test "x${with_simd}" != "xno"; then
   # Check if we're on a supported CPU
   AC_MSG_CHECKING([if we have SIMD optimisations for cpu type])