Author: mturk Date: Sat Jul 18 11:19:02 2009 New Revision: 795342 URL: http://svn.apache.org/viewvc?rev=795342&view=rev Log: Use yes/no instead true/false
Modified: commons/sandbox/runtime/trunk/src/main/native/configure Modified: commons/sandbox/runtime/trunk/src/main/native/configure URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=795342&r1=795341&r2=795342&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/configure (original) +++ commons/sandbox/runtime/trunk/src/main/native/configure Sat Jul 18 11:19:02 2009 @@ -58,7 +58,7 @@ includes="-I$topdir/include" ssldflags="" modules="" -bige="0" +bige=0 so=".so" lib=".a" exe="" @@ -66,20 +66,20 @@ bits="" java_home="`echo $JAVA_HOME | tr '\\' '/' 2>/dev/null`" java_pinc="" -has_dso_test=false -has_jni=false -has_64_bit=false -has_test=false -has_memprotect=false -has_maintainer_mode=false -has_native_threads=false +has_dso_test=no +has_jni=no +has_64_bit=no +has_test=no +has_memprotect=no +has_maintainer_mode=no +has_native_threads=no is_unix=true -has_openssl=false +has_openssl=no openssl_inc="" openssl_lib="" -has_zlib=false -has_zlib_set=false +has_zlib=no +has_zlib_set=no zlib_inc="" zlib_lib="" cccinc="stdio" @@ -88,21 +88,35 @@ for o do case "$o" in - -*=*) a=`echo "$o" | sed 's/^[-_a-zA-Z0-9]*=//'` - ;; - --enable-*) a=`echo "$o" | sed -e 's/--enable-//' -e 's/-/_/'` - eval has_$a=true - eval has_$a_set=true + --enable-*) + a=`echo "$o" | sed -e 's/--enable-//' -e 's/-/_/'` + case "$a" in + *=* ) + v=`echo "$a" | sed 's/^[_a-zA-Z0-9]*=//'` + a=`echo "$a" | sed 's/=.*//'` + ;; + * ) + v='yes' + ;; + esac + eval has_$a=$v + eval has_$a_set=yes shift continue ;; - --disable-*) a=`echo "$o" | sed -e 's/--disable-//' -e 's/-/_/'` - eval has_$a=false - eval has_$a_set=true + --disable-*) + a=`echo "$o" | sed -e 's/--disable-//' -e 's/-/_/'` + case "$a" in + *=* ) + a=`echo "$a" | sed 's/=.*//'` + ;; + esac + eval has_$a=no + eval has_$a_set=yes shift continue ;; - *=*) a=`echo "$o" | sed 's/^[_a-zA-Z0-9]*=//'` + *=*) a=`echo "$o" | sed 's/^[-_a-zA-Z0-9]*=//'` ;; *) a='' ;; @@ -152,12 +166,12 @@ ;; --with-zlib=* ) zlib_inc="$a" - has_zlib=true + has_zlib=yes shift ;; --with-zlib-lib=* ) zlib_lib="$a" - has_zlib=true + has_zlib=yes shift ;; CC=*) cc="$a" ; shift ;; @@ -287,8 +301,8 @@ host=`(uname -s) 2>/dev/null` || host="unknown" host=`tolower "$host"` -if $has_64_bit; then - bits="64" +if [ ".$has_64_bit" = .yes ]; then + bits=64 fi case "$host" in @@ -315,21 +329,21 @@ case "$mach" in amd64 ) - mach="x86_64" + mach=x86_64 ;; i[3-7]86 ) - mach="i386" + mach=i386 ;; i86pc ) - mach="i386" + mach=i386 ;; sun4* ) - mach="sparc" - bige="1" + mach=sparc + bige=1 ;; 9000/[678][0-9][0-9] ) - mach="parisc" - bige="1" + mach=parisc + bige=1 ;; esac @@ -342,7 +356,7 @@ if [ ".$java_pinc" = . ]; then java_pinc=linux; fi ;; linux-cc ) - if [ ".$mach" = ".i386" ]; then + if [ ".$mach" = .i386 ]; then varadds ccflags "-fast -xbuiltin=none -U__MATHERR_ERRNO_DONTCARE -xnolibmopt -xnolibmil" fi varadds cppopts "-D_LINUX=2 -D_GNU_SOURCE" @@ -359,18 +373,18 @@ varadds cppopts "-DDARWIN=$r" varadds ccflags "-fPIC -O3 -g" varadds ldflags "-lpthread -ldl" - if $has_jni ; then so=".jnilib"; else so=".dynlib"; fi + if [ ".$has_jni" = .yes ]; then so=".jnilib"; else so=".dynlib"; fi varadds shflags '-dynamiclib -flat_namespace -undefined suppress -fPIC -Wl,-dylib_install_name -Wl,\$@' ;; solaris-cc ) r="`uname -r | sed 's/5.//'`" - if [ ".$mach" = ".sparc" ]; then + if [ ".$mach" = .sparc ]; then varadds ccflags "-xarch=sparc" else varadds ccflags "-fast -xbuiltin=none -U__MATHERR_ERRNO_DONTCARE -xnolibmopt -xnolibmil" fi varadds cppopts "-D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=$r" - if $has_native_threads; then + if [ ".$has_native_threads" = .yes ]; then varadds cppopts "-DHAS_NATIVE_THREADS" else varadds cppopts "-D_POSIX_PTHREAD_SEMANTICS" @@ -389,7 +403,7 @@ varadds ccflags "-Ae +O2 -z +Z" varadds ldflags "-lrt -lpthread -ldld" varadds shflags "+Z -b" - if [ ".$mach" = ".parisc" ]; then so=".sl"; fi + if [ ".$mach" = .parisc ]; then so=".sl"; fi if [ ".$java_pinc" = . ]; then java_pinc="hp-ux"; fi ;; windows-cl ) @@ -431,7 +445,7 @@ if [ ".$mach" = ".ia64" ]; then varadds ccflags "-D_IA64_=1" varadds shflags "/MACHINE:IA64" - else + else varadds ccflags "-D_AMD64_=1" varadds shflags "/MACHINE:AMD64" fi @@ -445,7 +459,7 @@ # Common defines varadds cppopts "-D_REENTRANT -D_LARGEFILE64_SOURCE" -if [ ".$bits" = ".64" ]; then +if [ ".$bits" = .64 ]; then varadds cppopts "-D_COMPILE64BIT_SOURCE" fi if [ -d "$topdir/include/arch/$host" ]; then @@ -454,15 +468,15 @@ if $is_unix; then varadds includes "-I$topdir/include/arch/unix" fi -if $has_maintainer_mode; then +if [ ".$has_maintainer_mode" = .yes ]; then varadds cppopts "-DDEBUG -D_DEBUG" else varadds cppopts "-DNDEBUG" fi -if $has_memprotect; then +if [ ".$has_memprotect" = .yes ]; then varadds cppopts "-DACR_ENABLE_SEH" fi -if $has_test; then +if [ ".$has_test" = .yes ]; then varadds cppopts "-DACR_ENABLE_TEST" testobjs='$(TEST_OBJS)' else @@ -470,7 +484,7 @@ fi varadds includes "-I$java_home/include" -if [ -n "$java_pinc" ]; then +if [ ".$java_pinc" != . ]; then if [ -d "$java_home/include/$java_pinc" ]; then varadds includes "-I$java_home/include/$java_pinc" else @@ -481,7 +495,7 @@ test=ctest$$ -if $has_dso_test; then +if [ ".$has_dso_test" = .yes ]; then cat > $test.c << EOF extern int getchar(); int hello() {return getchar();} @@ -538,7 +552,7 @@ #include <$cccinc.h> EOF if [ -n "$2" ]; then - cat >> $test.c << EOF + cat >> $test.c << EOF #include <$2.h> EOF fi @@ -586,7 +600,7 @@ EOF rc=0 co="`$cc $ccflags $cppopts $ldflags $test.c -o $test$exe 2>&1`" - if [ ".$co" = "." ]; then + if [ ".$co" = . ]; then rc=1 else if [ -x $test$exe ]; then @@ -623,7 +637,7 @@ EOF rc=0 co="`$cc $ccflags $cppopts $test.c -o $test$exe 2>&1`" - if [ ".$co" = "." ]; then + if [ ".$co" = . ]; then rc=1 else if [ -x $test$exe ]; then @@ -662,13 +676,13 @@ } sizeof_int=`test_csizeof int` -if [ ".$sizeof_int" = ".0" ]; then +if [ ".$sizeof_int" = .0 ]; then echo "[ERROR] Cannot determine the size of int." 1>&2 exit 1 fi sizeof_wchar=`test_csizeof wchar_t` -if [ ".$sizeof_wchar" = ".0" ]; then +if [ ".$sizeof_wchar" = .0 ]; then echo "[ERROR] Cannot determine the size of wchar_t." 1>&2 exit 1 fi @@ -676,15 +690,15 @@ have_long_long=1 have_long_double=1 sizeof_long_long=`test_csizeof 'long long'` -if [ ".$sizeof_long_long" = ".0" ]; then +if [ ".$sizeof_long_long" = .0 ]; then have_long_long=0 fi sizeof_long_double=`test_csizeof 'long double'` -if [ ".$sizeof_long_double" = ".0" ]; then +if [ ".$sizeof_long_double" = .0 ]; then have_long_double=0 fi -if [ ".$host" = ".windows" ]; then +if [ ".$host" = .windows ]; then have_fileextd=`have_include fileextd` have_ktmw32=`have_include ktmw32` have_aio=0 @@ -697,30 +711,30 @@ have_ktmw32=0 have_off64t=1 sizeof_off64t=`test_csizeof off64_t` - if [ ".$sizeof_off64t" = ".0" ]; then + if [ ".$sizeof_off64t" = .0 ]; then have_off64t=0 fi have_aio=`have_include aio` have_libaio=`have_include libaio` have_windows=0 have_uuid_uuid=`have_include uuid/uuid` - if [ ".$have_uuid_uuid" = ".1" ]; then + if [ ".$have_uuid_uuid" = .1 ]; then ok=`have_library uuid` - if [ ".$ok" = ".1" ]; then + if [ ".$ok" = .1 ]; then varadds ldflags "-luuid" fi fi fi -if [ ".$have_libaio" = ".1" ]; then +if [ ".$have_libaio" = .1 ]; then varadds ldflags "-laio" fi if [ ".$host" = ".linux" ]; then have_selinux=`have_include selinux/selinux` - if [ ".$have_selinux" = ".1" ]; then + if [ ".$have_selinux" = .1 ]; then ok=`have_library selinux` - if [ ".$ok" = ".1" ]; then + if [ ".$ok" = .1 ]; then varadds ldflags "-lselinux" else have_selinux=0 @@ -730,17 +744,17 @@ have_selinux=0 fi -if $has_openssl; then - if [ -n "$openssl_inc" ]; then +if [ ".$has_openssl" = .yes ]; then + if [ ".$openssl_inc" != . ]; then varadds includes "-I$openssl_inc" fi if $is_unix; then - if [ -n "$openssl_lib" ]; then + if [ ".$openssl_lib" != . ]; then varadds sslflags "-L$openssl_lib" fi varadds sslflags "-lssl -lcrypto" else - if [ -n "$openssl_lib" ]; then + if [ ".$openssl_lib" != . ]; then varadds sslflags "/libpath:\"$openssl_lib\"" fi varadds sslflags "libeay32.lib ssleay32.lib" @@ -751,23 +765,23 @@ have_openssl=0 fi -if $has_zlib; then - if [ -n "$zlib_inc" ]; then +if [ ".$has_zlib" = .yes ]; then + if [ ".$zlib_inc" != . ]; then varadds includes "-I$zlib_inc" fi if $is_unix; then - if [ -n "$zlib_lib" ]; then + if [ ".$zlib_lib" != . ]; then varadds ldflags "-L$zlib_lib" varadds ldflags "-lz" else ok=`have_library z zlib` - if [ ".$ok" = ".1" ]; then + if [ ".$ok" = .1 ]; then varadds ldflags "-lz" have_zlib=1 fi fi else - if [ -n "$zlib_lib" ]; then + if [ ".$zlib_lib" != . ]; then varadds ldflags "/libpath:\"$zlib_lib\"" fi varadds ldflags "zlib.lib" @@ -775,10 +789,10 @@ have_zlib=1 else have_zlib=0 - if [ ! $has_zlib_set ]; then + if [ ".$has_zlib_set" = .no ]; then if $is_unix; then ok=`have_library z zlib` - if [ ".$ok" = ".1" ]; then + if [ ".$ok" = .1 ]; then varadds ldflags "-lz" have_zlib=1 fi @@ -863,12 +877,12 @@ #endif /* _CCCONFIG_H */ EOF -if [ ".$host" = ".windows" ]; then +if [ ".$host" = .windows ]; then ok=`have_library bufferoverflowu.lib` - if [ ".$ok" = ".1" ]; then + if [ ".$ok" = .1 ]; then varadds ldflags "bufferoverflowu.lib" fi - if [ ".$have_fileextd" = ".1" ]; then + if [ ".$have_fileextd" = .1 ]; then varadds ldflags "fileextd.lib" fi fi