[vmkit-commits] [vmkit] r181302 - Get rid of the configure usage of enableval and withval to use the named variable. It improves the readbility

Sylvestre Ledru sylvestre at debian.org
Tue May 7 02:52:41 PDT 2013


Author: sylvestre
Date: Tue May  7 04:52:27 2013
New Revision: 181302

URL: http://llvm.org/viewvc/llvm-project?rev=181302&view=rev
Log:
Get rid of the configure usage of enableval and withval to use the named variable. It improves the readbility
and the maintenance of the build system


Modified:
    vmkit/trunk/autoconf/configure.ac
    vmkit/trunk/configure

Modified: vmkit/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=181302&r1=181301&r2=181302&view=diff
==============================================================================
--- vmkit/trunk/autoconf/configure.ac (original)
+++ vmkit/trunk/autoconf/configure.ac Tue May  7 04:52:27 2013
@@ -172,8 +172,8 @@ dnl ************************************
 AC_ARG_ENABLE(optimized,
               AS_HELP_STRING([--enable-optimized],
                              [Build with all optimization flag enable (default is yes)]),,
-                             enableval=yes)
-case "$enableval" in
+                             enable_optimized=yes)
+case "$enable_optimized" in
   yes) AC_SUBST(OPTIMIZED,[1]) ;;
   no)  AC_SUBST(OPTIMIZED,[0]) ;;
   *) AC_MSG_ERROR([Invalid setting for --enable-optimized. Use "yes" or "no"]) ;;
@@ -182,8 +182,8 @@ esac
 AC_ARG_ENABLE(debug,
               AS_HELP_STRING([--enable-debug],
                              [Build with debug flags (default is no)]),,
-                             enableval=no)
-case "$enableval" in
+                             enable_debug=no)
+case "$enable_debug" in
   yes) AC_SUBST(DEBUG,[1]) ;;
   no)  AC_SUBST(DEBUG,[0]) ;;
   *) AC_MSG_ERROR([Invalid setting for --enable-debug. Use "yes" or "no"]) ;;
@@ -192,9 +192,9 @@ esac
 AC_ARG_ENABLE(assert,
               AS_HELP_STRING([--enable-assert],
                              [Build with assert flags (default is yes)]),,
-                             enableval=yes)
+                             enable_assert=yes)
 
-case "$enableval" in
+case "$enable_assert" in
   yes) AC_SUBST(ASSERT,[1]) ;;
   no)  AC_SUBST(ASSERT,[0]) ;;
   *) AC_MSG_ERROR([Invalid setting for --enable-assert. Use "yes" or "no"]) ;;
@@ -206,7 +206,7 @@ dnl ************************************
 AC_ARG_WITH(llvm-config-path,
        [AS_HELP_STRING(--with-llvm-config-path=path,
            [llvm-config path (use default path)])],
-       [[LLVM_CONFIG=$withval]],
+       [[LLVM_CONFIG=$with_llvm_config_path]],
        [[LLVM_CONFIG="llvm-config"]]
 )
 
@@ -216,7 +216,7 @@ dnl ************************************
 AC_ARG_WITH(clang-path,
        [AS_HELP_STRING(--with-clang-path=path,
            [clang path (use default path)])],
-       [[CLANG_PATH=$withval]],
+       [[CLANG_PATH=$with_clang_path]],
        [[CLANG_PATH="$(LLVM_CONFIG) --bindir"]]
 )
 AC_SUBST([CLANG_PATH])
@@ -227,7 +227,7 @@ dnl ************************************
 AC_ARG_WITH(mmtk-plan,
        [AS_HELP_STRING(--with-mmtk-plan=something,
            [MMTk plan type ('org.mmtk.plan.marksweep.MS')])],
-       [[MMTK_PLAN=$withval]],
+       [[MMTK_PLAN=$with_mmtk_plan]],
        [[MMTK_PLAN=org.mmtk.plan.marksweep.MS]]
 )
 
@@ -245,14 +245,14 @@ classpathversion=0.97.2;
 AC_ARG_WITH(gnu-classpath-libs,
        [AS_HELP_STRING(--with-gnu-classpath-libs=something,
            [GNU CLASSPATH libraries (default is /usr/lib/classpath)])],
-       [[classpathlibs=$withval]],
+       [[classpathlibs=$with_gnu_classpath_libs]],
        [[classpathlibs=/usr/lib/classpath]]
 )
 
 AC_ARG_WITH(gnu-classpath-glibj,
        [AS_HELP_STRING(--with-gnu-classpath-glibj,
            [Build J3 with GNU Classpath install (default is '/usr/share/classpath/glibj.zip')])],
-       [[classpathglibj=$withval]],
+       [[classpathglibj=$with_gnu_classpath_glibj]],
        [[classpathglibj=/usr/share/classpath/glibj.zip]]
 )
 
@@ -267,7 +267,7 @@ dnl ************************************
 AC_ARG_WITH(openjdk-path,
        [AS_HELP_STRING(--with-openjdk-path,
            [Build J3 with OpenJDK JRE install (default is '/usr/lib/java/')])],
-       [[openjdkpath=$withval]],
+       [[openjdkpath=$with_openjdk_path]],
        [[openjdkpath=/usr/lib/java/]]
 )
 
@@ -281,7 +281,7 @@ dnl ************************************
 AC_ARG_WITH(classpath-impl,
        [AS_HELP_STRING(--with-classpath-impl,
            [Build J3 with the specified classpath implementation (default is gnuclasspath)])],
-       [[classpathimpl=$withval]],
+       [[classpathimpl=$with_classpath_impl]],
        [[classpathimpl=gnuclasspath]]
 )
 
@@ -318,8 +318,8 @@ dnl ************************************
 AC_ARG_ENABLE(incinerator,
               AS_HELP_STRING([--enable-incinerator],
                              [Use incinerator to kill stale references in OSGi (default is NO)]),,
-                             enableval=no)
-case "$enableval" in
+                             enable_incinerator=no)
+case "$enable_incinerator" in
   yes) AC_DEFINE(RESET_STALE_REFERENCES,[1]) ;;
   no)  ;; #AC_DEFINE(RESET_STALE_REFERENCES,[0]) ;;
   *) AC_MSG_ERROR([Invalid setting for --enable-incinerator. Use "yes" or "no"]) ;;

Modified: vmkit/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=181302&r1=181301&r2=181302&view=diff
==============================================================================
--- vmkit/trunk/configure (original)
+++ vmkit/trunk/configure Tue May  7 04:52:27 2013
@@ -2494,10 +2494,10 @@ esac
 if test "${enable_optimized+set}" = set; then :
   enableval=$enable_optimized;
 else
-  enableval=yes
+  enable_optimized=yes
 fi
 
-case "$enableval" in
+case "$enable_optimized" in
   yes) OPTIMIZED=1
  ;;
   no)  OPTIMIZED=0
@@ -2509,10 +2509,10 @@ esac
 if test "${enable_debug+set}" = set; then :
   enableval=$enable_debug;
 else
-  enableval=no
+  enable_debug=no
 fi
 
-case "$enableval" in
+case "$enable_debug" in
   yes) DEBUG=1
  ;;
   no)  DEBUG=0
@@ -2524,11 +2524,11 @@ esac
 if test "${enable_assert+set}" = set; then :
   enableval=$enable_assert;
 else
-  enableval=yes
+  enable_assert=yes
 fi
 
 
-case "$enableval" in
+case "$enable_assert" in
   yes) ASSERT=1
  ;;
   no)  ASSERT=0
@@ -2539,7 +2539,7 @@ esac
 
 # Check whether --with-llvm-config-path was given.
 if test "${with_llvm_config_path+set}" = set; then :
-  withval=$with_llvm_config_path; LLVM_CONFIG=$withval
+  withval=$with_llvm_config_path; LLVM_CONFIG=$with_llvm_config_path
 else
   LLVM_CONFIG="llvm-config"
 
@@ -2549,7 +2549,7 @@ fi
 
 # Check whether --with-clang-path was given.
 if test "${with_clang_path+set}" = set; then :
-  withval=$with_clang_path; CLANG_PATH=$withval
+  withval=$with_clang_path; CLANG_PATH=$with_clang_path
 else
   CLANG_PATH="$(LLVM_CONFIG) --bindir"
 
@@ -2560,7 +2560,7 @@ fi
 
 # Check whether --with-mmtk-plan was given.
 if test "${with_mmtk_plan+set}" = set; then :
-  withval=$with_mmtk_plan; MMTK_PLAN=$withval
+  withval=$with_mmtk_plan; MMTK_PLAN=$with_mmtk_plan
 else
   MMTK_PLAN=org.mmtk.plan.marksweep.MS
 
@@ -2578,7 +2578,7 @@ classpathversion=0.97.2;
 
 # Check whether --with-gnu-classpath-libs was given.
 if test "${with_gnu_classpath_libs+set}" = set; then :
-  withval=$with_gnu_classpath_libs; classpathlibs=$withval
+  withval=$with_gnu_classpath_libs; classpathlibs=$with_gnu_classpath_libs
 else
   classpathlibs=/usr/lib/classpath
 
@@ -2588,7 +2588,7 @@ fi
 
 # Check whether --with-gnu-classpath-glibj was given.
 if test "${with_gnu_classpath_glibj+set}" = set; then :
-  withval=$with_gnu_classpath_glibj; classpathglibj=$withval
+  withval=$with_gnu_classpath_glibj; classpathglibj=$with_gnu_classpath_glibj
 else
   classpathglibj=/usr/share/classpath/glibj.zip
 
@@ -2603,7 +2603,7 @@ fi
 
 # Check whether --with-openjdk-path was given.
 if test "${with_openjdk_path+set}" = set; then :
-  withval=$with_openjdk_path; openjdkpath=$withval
+  withval=$with_openjdk_path; openjdkpath=$with_openjdk_path
 else
   openjdkpath=/usr/lib/java/
 
@@ -2617,7 +2617,7 @@ fi
 
 # Check whether --with-classpath-impl was given.
 if test "${with_classpath_impl+set}" = set; then :
-  withval=$with_classpath_impl; classpathimpl=$withval
+  withval=$with_classpath_impl; classpathimpl=$with_classpath_impl
 else
   classpathimpl=gnuclasspath
 
@@ -2903,10 +2903,10 @@ esac
 if test "${enable_incinerator+set}" = set; then :
   enableval=$enable_incinerator;
 else
-  enableval=no
+  enable_incinerator=no
 fi
 
-case "$enableval" in
+case "$enable_incinerator" in
   yes) $as_echo "#define RESET_STALE_REFERENCES 1" >>confdefs.h
  ;;
   no)  ;; #AC_DEFINE(RESET_STALE_REFERENCES,[0]) ;;





More information about the vmkit-commits mailing list