Author: mturk Date: Sat Jul 18 11:53:17 2009 New Revision: 795347 URL: http://svn.apache.org/viewvc?rev=795347&view=rev Log: Use pipe instead %. Windows can have embedded % inside variables
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=795347&r1=795346&r2=795347&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/configure (original) +++ commons/sandbox/runtime/trunk/src/main/native/configure Sat Jul 18 11:53:17 2009 @@ -47,7 +47,7 @@ as="${AS:=gcc}" arflags="${ARFLAGS:=ru}" ranlib="${RANLIB:=ranlib}" -topdir="${TOPDIR:=.}" +topdir="${TOPDIR:=`dirname $0`}" cpp="${CPP:=$cc -E}" ccflags="$CFLAGS" cppopts="$CPPFLAGS" @@ -185,7 +185,7 @@ RCFLAGS=*) rcflags="$a" ; shift ;; * ) cat 1>&2 << EOH -Usage: ./configure [OPTION]... [VAR=VALUE]... +Usage: configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. @@ -211,20 +211,26 @@ SHFLAGS Linker command flags Compiler options: - --with-cc=C Use C compiler instead default one + --with-cc=C Use C compiler instead default one [gcc] - --with-cpp=CPP Use CPP preprocessor instead default one + --with-cpp=CPP Use CPP preprocessor instead default one [gcc -E] - --with-cxx=CC Use C++ compiler instead default one + --with-cxx=CC Use C++ compiler instead default one [g++] Optional features: - --enable-memprotect Enables exception handling code compilation + --enable-64-bit Forces 64-bit code compilation + [platform dependent] + --enable-maintainer-mode Compile code with debug options. [disabled] - --enable-test Enables test code compilation + --enable-memprotect Enables exception handling code compilation [disabled] - --with-java-home=DIR Path to the Java SDK + --enable-native-threads Enables Solaris native threads support + [disabled] + --enable-test Enables test code compilation + [disabled] + --with-java-home=DIR Path to the Java SDK [\$JAVA_HOME environment variable] - --with-java-platorm=DIR Path to the Java platform include + --with-java-platorm=DIR Path to the Java platform include [\$JAVA_HOME/include/platform] Optional packages: @@ -234,7 +240,8 @@ --with-openssl-lib=DIR Path to the OpenSSL toolkit libraries --enable-zlib Enable compilation of Zlib module - [disabled] + [autodetected] + --disable-zlib Disable Zlib module --with-zlib=DIR Path to the Zlib toolkit headers --with-zlib-lib=DIR Path to the Zlib toolkit libraries @@ -383,8 +390,9 @@ else varadds ccflags "-fast -xbuiltin=none -U__MATHERR_ERRNO_DONTCARE -xnolibmopt -xnolibmil" fi - varadds cppopts "-D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=$r" + varadds cppopts "-DSOLARIS2=$r" if [ ".$has_native_threads" = .yes ]; then + varadds ccflags "-mt" varadds cppopts "-DHAS_NATIVE_THREADS" else varadds cppopts "-D_POSIX_PTHREAD_SEMANTICS" @@ -889,39 +897,39 @@ for m in $makefiles do - sed -e "s...@cc@%=$cc%g" \ - -e "s...@cpp@%=$cpp%g" \ - -e "s...@cxx@%=$cxx%g" \ - -e "s...@as@%=$as%g" \ - -e "s...@so@%=$so%g" \ - -e "s...@lib@%=$lib%g" \ - -e "s...@obj@%=$obj%g" \ - -e "s...@exe@%=$exe%g" \ - -e "s...@ar@%=$ar%g" \ - -e "s...@host@%=$host%g" \ - -e "s...@mach@%=$mach%g" \ - -e "s...@bits@%=$bits%g" \ - -e "s...@ranlib@%=$ranlib%g" \ - -e "s...@prefix@%=$prefix%g" \ - -e "s...@libdir@%=$libdir%g" \ - -e "s...@topdir@%=$topdir%g" \ - -e "s...@ccflags@%=$ccflags%g" \ - -e "s...@cppopts@%=$cppopts%g" \ - -e "s...@cxxopts@%=$cxxopts%g" \ - -e "s...@ldflags@%=$ldflags%g" \ - -e "s...@shflags@%=$shflags%g" \ - -e "s...@arflags@%=$arflags%g" \ - -e "s...@sslflags@%=$sslflags%g" \ - -e "s...@rcflags@%=$rcflags%g" \ - -e "s...@includes@%=$includes%g" \ - -e "s...@name@%=$name%g" \ - -e "s...@vmajor@%=$vmajor%g" \ - -e "s...@vminor@%=$vminor%g" \ - -e "s...@vpatch@%=$vpatch%g" \ - -e "s...@platform@%$platform%g" \ - -e "s...@testobjs@%$testobjs%g" \ - -e "s...@modules@%$modules%g" \ - $m.in > $m + sed -e 's|@cc@|'"$cc"'|g' \ + -e 's|@cpp@|'"$cpp"'|g' \ + -e 's|@cxx@|'"$cxx"'|g' \ + -e 's|@as@|'"$as"'|g' \ + -e 's|@so@|'"$so"'|g' \ + -e 's|@lib@|'"$lib"'|g' \ + -e 's|@obj@|'"$obj"'|g' \ + -e 's|@exe@|'"$exe"'|g' \ + -e 's|@ar@|'"$ar"'|g' \ + -e 's|@host@|'"$host"'|g' \ + -e 's|@mach@|'"$mach"'|g' \ + -e 's|@bits@|'"$bits"'|g' \ + -e 's|@ranlib@|'"$ranlib"'|g' \ + -e 's|@prefix@|'"$prefix"'|g' \ + -e 's|@libdir@|'"$libdir"'|g' \ + -e 's|@topdir@|'"$topdir"'|g' \ + -e 's|@ccflags@|'"$ccflags"'|g' \ + -e 's|@cppopts@|'"$cppopts"'|g' \ + -e 's|@cxxopts@|'"$cxxopts"'|g' \ + -e 's|@ldflags@|'"$ldflags"'|g' \ + -e 's|@shflags@|'"$shflags"'|g' \ + -e 's|@arflags@|'"$arflags"'|g' \ + -e 's|@sslflags@|'"$sslflags"'|g' \ + -e 's|@rcflags@|'"$rcflags"'|g' \ + -e 's|@includes@|'"$includes"'|g' \ + -e 's|@name@|'"$name"'|g' \ + -e 's|@vmajor@|'"$vmajor"'|g' \ + -e 's|@vminor@|'"$vminor"'|g' \ + -e 's|@vpatch@|'"$vpatch"'|g' \ + -e 's|@platform@|'"$platform"'|g' \ + -e 's|@testobjs@|'"$testobjs"'|g' \ + -e 's|@modules@|'"$modules"'|g' \ + $topdir/$m.in > $m done echo ""