You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2011/10/08 08:00:29 UTC
svn commit: r1180320 - in /commons/sandbox/runtime/trunk/src/main/native:
configure include/acr/config.h
Author: mturk
Date: Sat Oct 8 06:00:29 2011
New Revision: 1180320
URL: http://svn.apache.org/viewvc?rev=1180320&view=rev
Log:
Simplify configure and use i686 instead i386
Modified:
commons/sandbox/runtime/trunk/src/main/native/configure
commons/sandbox/runtime/trunk/src/main/native/include/acr/config.h
Modified: commons/sandbox/runtime/trunk/src/main/native/configure
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=1180320&r1=1180319&r2=1180320&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Sat Oct 8 06:00:29 2011
@@ -44,18 +44,19 @@
# This is a bash script, which works with any reasonable sh.
# Solaris sh is not, so we have to start bash, and call ourselves again.
#
-test "x$1" != "x__running_the_bash_shell@" && \
-(
- `which sh` -c "__bash_a=(_A _B); echo \${__bash_a[*]}" >/dev/null 2>&1
- __need_bash=$?
- test "x$__need_bash" != "x0" && bash $0 __running_the_bash_shell@ "$@"
- test "x$__need_bash" = "x0" && sh $0 __running_the_bash_shell@ "$@"
-)
-
-if [ "x$1" != "x__running_the_bash_shell@" ]; then
- exit
-fi
-shift
+#test "x$1" != "x__running_the_bash_shell@" && \
+#(
+# `which sh` -c "__bash_a=(_A _B); echo \${__bash_a[*]}" >/dev/null 2>&1
+# __need_bash=$?
+# test "x$__need_bash" != "x0" && bash $0 __running_the_bash_shell@ "$@"
+# test "x$__need_bash" = "x0" && sh $0 __running_the_bash_shell@ "$@"
+#)
+#
+#if [ "x$1" != "x__running_the_bash_shell@" ]; then
+# exit
+#fi
+#shift
+#
echo "#!/bin/sh" >config.nice
echo "$0 $*" >>config.nice
chmod +x config.nice
@@ -362,7 +363,6 @@ findgnutool()
getgnutool()
{
-# do_printf 'Checking for %-32s' "$1"
r="`findgnutool $1`"
if [ ".$r" = . ]; then
e="`which $1 2>/dev/null || type $1 2>&1`"
@@ -486,23 +486,23 @@ cctype=`basename $cn`
case "$mach" in
amd64|x86_64 )
mach=x86_64
- test ".$has_32_bit" = .yes && mach=i386
+ test ".$has_32_bit" = .yes && mach=i686
;;
ia64 )
test ".$has_32_bit" = .yes && mach=ia32
;;
i[3-7]86 )
- mach=i386
+ mach=i686
if [ ".$host" = .darwin ]; then
if [ ".$has_32_bit" = .no ]; then
test ".$jvm_64_bit" = .yes && has_64_bit=yes
fi
test ".$has_64_bit" = .yes && mach=x86_64
- test ".$has_32_bit" = .yes && mach=i386
+ test ".$has_32_bit" = .yes && mach=i686
fi
;;
i86pc )
- mach=i386
+ mach=i686
test ".$has_64_bit" = .yes && mach=x86_64
;;
sun4* )
@@ -526,7 +526,7 @@ case "$host-$mach" in
*-*64 )
test ".$bits" = . && bits=64
;;
- *-i386|darwin-ppc )
+ *-i686|darwin-ppc )
test ".$bits" = . && bits=32
;;
esac
@@ -538,7 +538,7 @@ case "$host-$cctype" in
varadds cppopts -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED
varadds ccflags -O3 -Wall -Wundef
varadds ccshare -fPIC
- if [ ".$mach" = .i386 ]; then
+ if [ ".$mach" = .i686 ]; then
varadds ccflags -march=i686
fi
varadds asflags -c -D$mcpu
@@ -557,7 +557,7 @@ case "$host-$cctype" in
varadds cppopts -D_BSD_SOURCE -D_BSD_VISIBLE
varadds ccflags -O3 -Wall
varadds ccshare -fPIC
- if [ ".$mach" = .i386 ]; then
+ if [ ".$mach" = .i686 ]; then
varadds ccflags -march=i686
fi
varadds asflags -c -D$mcpu
@@ -573,7 +573,7 @@ case "$host-$cctype" in
test ".$java_platform_inc" = . && java_platform_inc=$host
;;
linux-cc )
- if [ ".$mach" = .i386 ]; then
+ if [ ".$mach" = .i686 ]; then
varadds ccflags -fast -xbuiltin=%none -U__MATHERR_ERRNO_DONTCARE -xnolibmopt -xnolibmil
fi
varadds cppopts -D_BSD_SOURCE -D_GNU_SOURCE
@@ -686,7 +686,7 @@ case "$host-$cctype" in
fi
varadds ccflags -fvisibility=hidden -fstrict-aliasing
if [ ".$has_zlib_asm" = .yes ]; then
- if [ ".$mach" = .i386 ]; then
+ if [ ".$mach" = .i686 ]; then
varadds cppopts -DASMV
zlib_asm_sources='$(TOPDIR)/srclib/zlib/unix/i686-match.S'
fi
@@ -975,8 +975,7 @@ choke me
char $1 ();
int main() { return $1 (); }
EOF
- rc=`test_compile q`
- echo $rc
+ test_compile q
}
have_function()
@@ -1011,8 +1010,7 @@ EOF
cat >> $cccsrc.c << EOF
int main() {return (int)($1);}
EOF
- rc=`test_compile`
- echo $rc
+ test_compile
}
have_typedef()
@@ -1031,8 +1029,7 @@ EOF
typedef $1 _check_t;
int main() {printf("%d", (int)sizeof(_check_t));return 0;}
EOF
- rc=`test_compile`
- echo $rc
+ test_compile
}
have_strcut_member()
@@ -1047,8 +1044,7 @@ have_strcut_member()
#include <$1.h>
int main () {return (int)offsetof($2, $3);}
EOF
- rc=`test_compile`
- echo $rc
+ test_compile
}
have_thread_local()
@@ -1068,8 +1064,7 @@ extern CPR_THREAD char tls_ea[8];
CPR_THREAD char tls_ea[8]={0};
int main () {printf("%d", tls_i+tls_sa[0]+tls_ea[0]);return 0;}
EOF
- rc=`test_compile z 0`
- echo $rc
+ test_compile z 0
}
have_sem_open()
@@ -1085,8 +1080,7 @@ int main () {sem_open("/x$$x",0,0,0);
if (errno!=ENOSYS)rc=1;printf("%d", rc);return 0;
}
EOF
- rc=`test_compile z 0`
- echo $rc
+ test_compile z 0
}
have_socket()
@@ -1103,8 +1097,7 @@ int main () {
if(socket($1,$2,0)>= 0)rc = 1;printf("%d", rc);return 0;
}
EOF
- rc=`test_compile z 0`
- echo $rc
+ test_compile z 0
}
have_sockopt()
@@ -1130,8 +1123,7 @@ int main () {
return 0;
}
EOF
- rc=`test_compile z 0`
- echo $rc
+ test_compile z 0
}
have_working_getnameinfo()
@@ -1159,24 +1151,21 @@ int main(void) {
printf("%d", rc);return 0;
}
EOF
- rc=`test_compile z 0`
- echo $rc
+ test_compile z 0
}
have_nonblock_inherited()
{
do_printf 'Checking for %-32s' "inherited O_NONBLOCK"
cat $topdir/build/inonblock.c > $cccsrc.c
- rc=`test_compile y`
- echo $rc
+ test_compile y
}
have_tcp_nodelay_inherited()
{
do_printf 'Checking for %-32s' "inherited TCP_NODELAY"
cat $topdir/build/itcpnodelay.c > $cccsrc.c
- rc=`test_compile y`
- echo $rc
+ test_compile y
}
check_sizeof()
@@ -1190,8 +1179,7 @@ check_sizeof()
int main() {printf("%d", (int)sizeof($1));return 0;}
EOF
- rc=`test_compile x $2`
- echo $rc
+ test_compile x $2
}
test_shared
@@ -1213,10 +1201,8 @@ sizeof_voidp=`check_sizeof 'void *' 4`
sizeof_size_t=`check_sizeof size_t 4`
sizeof_off_t=`check_sizeof off_t 0`
sizeof_off64_t=`check_sizeof off64_t 0`
-have_long_double=0
-have_off64_t=0
-test ".$sizeof_long_double" != .0 && have_long_double=1
-test ".$sizeof_off64_t" != .0 && have_off64_t=1
+test $sizeof_long_double -eq 0 && have_long_double=0 || have_long_double=1
+test $sizeof_off64_t -eq 0 && have_off64_t=0 || have_off64_t=1
PS=/
Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr/config.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr/config.h?rev=1180320&r1=1180319&r2=1180320&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr/config.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr/config.h Sat Oct 8 06:00:29 2011
@@ -25,8 +25,8 @@
* DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD.
*/
-#if defined(_I386_)
-# include <acr/config_i386.h>
+#if defined(_I686_)
+# include <acr/config_i686.h>
#elif defined(_IA64_)
# include <acr/config_ia64.h>
#elif defined(_PPC64_)