commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r834248 - /commons/sandbox/runtime/trunk/src/main/native/configure
Date Mon, 09 Nov 2009 21:48:01 GMT
Author: mturk
Date: Mon Nov  9 21:48:00 2009
New Revision: 834248

URL: http://svn.apache.org/viewvc?rev=834248&view=rev
Log:
Add multiarch support for configure files

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=834248&r1=834247&r2=834248&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Mon Nov  9 21:48:00 2009
@@ -431,8 +431,8 @@
 mcpu="_`toupper $mach`_"
 case "$host-$cc" in
     linux-gcc )
-        varadds cppopts -DLINUX=2 -D_GNU_SOURCE
-        varadds cppopts -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D$mcpu
+        varadds cppopts -DLINUX=2 -D_GNU_SOURCE -D$mcpu -D__CC$bits
+        varadds cppopts -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED
         varadds ccflags -fPIC -O3 -Wall -g
         varadds asflags -c -fPIC -g -D$mcpu
         varadds ldflags -lrt -lpthread -ldl
@@ -445,8 +445,8 @@
         if [ ".$mach" = .i386 ]; then
             varadds ccflags -fast -xbuiltin=none -U__MATHERR_ERRNO_DONTCARE -xnolibmopt -xnolibmil
         fi
-        varadds cppopts -D_LINUX=2 -D_GNU_SOURCE
-        varadds cppopts -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D$mcpu
+        varadds cppopts -D_LINUX=2 -D_GNU_SOURCE -D$mcpu -D__CC$bits
+        varadds cppopts -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED
         varadds ccflags -xstrconst -xdepend -O -Xa -KPIC
         varadds asflags -c -KPIC -D$mcpu
         varadds ldflags -lpthread -ldl
@@ -459,7 +459,7 @@
         ;;
     darwin-gcc )
         r="`uname -r | sed 's/\.//g'`"
-        varadds cppopts -DDARWIN=$r -D$mcpu
+        varadds cppopts -DDARWIN=$r -D$mcpu -D__CC$bits
         varadds ccflags -fPIC -O3 -g
         varadds asflags -c -fPIC -g -D$mcpu
         varadds ldflags -lpthread -ldl
@@ -477,7 +477,7 @@
             varadds ccflags -fast -xbuiltin=none -U__MATHERR_ERRNO_DONTCARE -xnolibmopt -xnolibmil
             test ".$bits" = .64 && varadds asflags -xarch=amd64
         fi
-        varadds cppopts -DSOLARIS2=$r -D$mcpu
+        varadds cppopts -DSOLARIS2=$r -D$mcpu -D__CC$bits
         if [ ".$has_native_threads" = .yes ]; then
             varadds ccflags -mt
             varadds cppopts -DHAS_NATIVE_THREADS
@@ -495,7 +495,7 @@
         ;;
     hpux-cc    )
         r="`uname -r | sed 's/[A-Z].[0-9]*.//'`"
-        varadds cppopts -D_HPUX_SOURCE -DHPUX11=$r -D$mcpu
+        varadds cppopts -D_HPUX_SOURCE -DHPUX11=$r -D$mcpu -D__CC$bits
         varadds ccflags -Ae +O2 -z +Z
         varadds asflags -c +Z -D$mcpu
         varadds ldflags -lrt -lpthread -ldld -lm
@@ -509,7 +509,7 @@
         varadds asflags -nologo -DWIN32 -DWINNT -D_WIN32 -D$mcpu
         varadds ccflags -nologo -O2 -Ob2 -Oy- -Zi -D_MD -MD -W3
         varadds cppopts -DWIN32 -DWINNT -D_WIN32 -D_WINDOWS -D_WINNT
-        varadds cppopts -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0600 -D$mcpu
+        varadds cppopts -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0600 -D$mcpu -D__CC$bits
         varadds cxxopts -TP
         varadds ldflags kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib
         varadds ldflags shell32.lib rpcrt4.lib user32.lib gdi32.lib userenv.lib wtsapi32.lib
@@ -529,7 +529,7 @@
         ;;
     aix-gcc    )
         r="`uname -v``uname -r`"
-        varadds cppopts -DAIX=$r -U__STR__ -D_THREAD_SAFE -D_USE_IRS -D$mcpu
+        varadds cppopts -DAIX=$r -U__STR__ -D_THREAD_SAFE -D_USE_IRS -D$mcpu -D__CC$bits
         varadds ccflags -fPIC -O2 -g -pthread
         varadds ldflags -lrt -lpthreads -lnsl
         varadds shflags -shared -fPIC -Wl,-soname '-Wl,??@' -Wl,-brtl
@@ -978,6 +978,22 @@
 cat > $topdir/include/acr_config.h << EOF
 /*
  * AUTOMATICALLY GENERATED BY CONFIGURE SCRIPT -- DO NOT EDIT
+ *
+ * This file is here to prevent a file conflict on multiarch systems.
+ */
+
+#if defined(__CC32)
+#include "acr_cc32.h"
+#elif defined(__CC64)
+#include "acr_cc64.h"
+#else
+#error "This package does not work with your architecture"
+#endif
+EOF
+
+cat > $topdir/include/acr_cc$bits.h << EOF
+/*
+ * AUTOMATICALLY GENERATED BY CONFIGURE SCRIPT -- DO NOT EDIT
  */
 #ifndef _ACR_CONFIG_H
 #define _ACR_CONFIG_H
@@ -1055,10 +1071,6 @@
 #define CC_SIZEOF_OFF64_T     $sizeof_off64_t
 #define CC_IS_BIG_ENDIAN      $bige
 
-EOF
-
-cat >> $topdir/include/acr_config.h << EOF
-
 #ifdef __cplusplus
 }
 #endif



Mime
View raw message