Index: trunk/SophyaLib/BaseTools/gnumd5.c
===================================================================
--- trunk/SophyaLib/BaseTools/gnumd5.c	(revision 3172)
+++ trunk/SophyaLib/BaseTools/gnumd5.c	(revision 3203)
@@ -41,5 +41,5 @@
 #define DIM(v) (sizeof(v)/sizeof((v)[0]))
 
-#if SWAP==0
+#if IS_BIG_ENDIAN==1
 #define BIG_ENDIAN_HOST 1
 #endif
@@ -368,5 +368,5 @@
 static
 #endif
-const char * const gnupgext_version = "MD5 ($Revision: 1.5 $)";
+const char * const gnupgext_version = "MD5 ($Revision: 1.6 $)";
 
 static struct {
Index: trunk/SophyaLib/BaseTools/machdefs_mkmf.h
===================================================================
--- trunk/SophyaLib/BaseTools/machdefs_mkmf.h	(revision 3172)
+++ trunk/SophyaLib/BaseTools/machdefs_mkmf.h	(revision 3203)
@@ -1,4 +1,16 @@
 #ifndef MACHDEFS_SEEN
 #define MACHDEFS_SEEN
+
+/* -------------- List of flags (and description) ------------------- 
+  - SO_ARCH64 : select 64 bits architecture (default 32 bits)
+  - SO_NOFPIC  : disable fPIC flag (Position Independent Code) default fPIC enabled 
+  - SO_SASIZET64 : select 64 bits size for array indices (default 32 bits)
+  - SO_BOUNDCHECKING : activate bound checking (in accessing array elements)
+  - SOPHYA_DEBUG : debug flag ( --> if set, SO_BOUNDCHECKING is also set)
+  ------------------------------------------------------------------  */
+
+#ifdef SOPHYA_DEBUG
+#define SO_BOUNDCHECKING
+#endif
 
 /***********************************************************************/
@@ -19,9 +31,4 @@
 #define MACH_HP
 #define OS_HPUX
-#endif
-
-#ifdef __MWERKS__
-#define MACH_POWERMAC
-#define OS_MACOS
 #endif
 
@@ -52,176 +59,59 @@
 #elif defined(powerpc)
 #define MACH_POWERPC
-/*  ---------------------- 
-   $CHECK$ (Reza Jan07) : __i386__ pas defini sur AMD  
-    Il faut affiner ce test, si on veut etre sur 
-    qu'on ait sur un processeur compatible Intel ( / AMD ) 
-  #elif defined(__i386__)    
-  #define MACH_INTEL
-  #else
-  #error Undefined Platform (machine) type with linux in machdefs.h  
--------------------------- */
+elif defined(__i386__)    
+#define MACH_INTEL
+#else
+#define MACH_AMD
+/* $CHECK$ (Reza Avril 2007):  Il faut affiner ce test pour 
+   determiner correctement le type de  processeur        */
 #endif
 #define OS_LINUX
 #endif
 
-
 /***********************************************************************/
 /* Hardware/OS dependent stuff                                         */
 /***********************************************************************/
 
-#if defined(OS_OSF1)
-
-  typedef signed char int_1;
-  typedef unsigned char uint_1;
-  typedef int int_4;
-  typedef unsigned int uint_4;
-  typedef short int_2;
-  typedef unsigned short uint_2;
-  typedef float r_4;
-  typedef double r_8;
-  typedef long long int_8;
-  typedef unsigned long long uint_8;
-
-#define  SWAP 1
-#define  SWAPDEFAUT 1
-
-#elif  defined(OS_HPUX)
-
-  typedef signed char int_1;
-  typedef unsigned char uint_1;
-  typedef int int_4 ;
-  typedef unsigned int uint_4;
-  typedef short int_2;
-  typedef unsigned short uint_2;
-  typedef float r_4;
-  typedef double r_8;
-  typedef long long int_8;
-  typedef unsigned long long uint_8;
-
-#define  SWAP 0
-#define  SWAPDEFAUT   0
-
-
-#elif  defined( OS_AIX )
-
-  typedef signed char int_1;
-  typedef unsigned char uint_1;
-  typedef int int_4;
-  typedef unsigned int uint_4;
-  typedef short int_2;
-  typedef unsigned short uint_2;
-  typedef float r_4;
-  typedef double r_8;
-  typedef long long int_8;
-  typedef unsigned long long uint_8;
-
-#define  SWAP 0
-#define  SWAPDEFAUT   0
-
-/* Check for solaris on intel... */
-#elif  defined( OS_SOLARIS ) && defined( MACH_SUN )
-
-  typedef signed char int_1;
-  typedef unsigned char uint_1;
-  typedef int int_4;
-  typedef unsigned int uint_4;
-  typedef short int_2;
-  typedef unsigned short uint_2;
-  typedef float r_4;
-  typedef double r_8;
-  typedef long long int_8;
-  typedef unsigned long long uint_8;
-
-#define  SWAP 0
-#define  SWAPDEFAUT   0
-
-#elif  defined( OS_IRIX64 )
-
-  typedef signed char int_1;
-  typedef unsigned char uint_1;
-  typedef int int_4;
-  typedef unsigned int uint_4;
-  typedef short int_2;
-  typedef unsigned short uint_2;
-  typedef float r_4;
-  typedef double r_8;
-  typedef long long int_8;
-  typedef unsigned long long uint_8;
-
-#define  SWAP 0
-#define  SWAPDEFAUT   0
-
-/* Check linux on other machines than Intel */
-#elif defined(OS_LINUX)
-/* Sizes OK for PowerPC, Alpha, Intel    */
-/* On Alpha, long is 8 bytes             */
-  typedef signed char int_1;
-  typedef unsigned char uint_1;
-  typedef int int_4;
-  typedef unsigned int uint_4;
-  typedef short int_2;
-  typedef unsigned short uint_2;
-  typedef float r_4;
-  typedef double r_8;
-  typedef long long int_8;
-  typedef unsigned long long uint_8;
-
-#if defined(powerpc) || (__alpha__)
-#define SWAP 0
-#define SWAPDEFAUT 0
-#else
-#define  SWAP 1
-#define  SWAPDEFAUT   1
-#endif
-
-#elif defined(OS_MACOS)
-
-  typedef signed char int_1;
-  typedef unsigned char uint_1;
-  typedef long int_4;
-  typedef unsigned long uint_4;
-  typedef short int_2;
-  typedef unsigned short uint_2;
-  typedef float r_4;
-  typedef double r_8;
-  typedef long long int_8;
-  typedef unsigned long long uint_8;
-
-#define  SWAP 0
-#define  SWAPDEFAUT   0
-
-#elif defined(OS_MACOSX)
-
-  typedef signed char int_1;
-  typedef unsigned char uint_1;
-  typedef int int_4;
-  typedef unsigned int uint_4;
-  typedef short int_2;
-  typedef unsigned short uint_2;
-  typedef float r_4;
-  typedef double r_8;
-  typedef long long int_8;
-  typedef unsigned long long uint_8;
-
-#ifdef MACH_POWERPC
-#define  SWAP 0
-#define  SWAPDEFAUT   0
-#else
-#define  SWAP 1
-#define  SWAPDEFAUT   1
-#endif
-
-#else
-#error  Undefined Machine/OS type in machdefs.h
-#endif
-
-
-
-#if SWAP==1
+/* --------------------------------------------------------------- */
+/* 1/     typedefs for different size integers and floats          */
+/* --------------------------------------------------------------- */
+
+/* --- Avr2007: The following typdefs should be OK for most system */
+/* and compilers:  OSF, Linux, AIX, SGI, MacOSX, Sun, HP           */
+
+typedef signed char int_1;
+typedef unsigned char uint_1;
+typedef short int_2;
+typedef unsigned short uint_2;
+typedef int int_4;
+typedef unsigned int uint_4;
+typedef long long int_8;
+typedef unsigned long long uint_8;
+typedef float r_4;
+typedef double r_8;
+
+/* --------------------------------------------------------------- */
+/* 2/     Endiannes (/ byteswap for different processors)          */
+/* --------------------------------------------------------------- */
+/*  
+    ==> POWERPC, IBMRS, HP_UX, IRIX64, SunSPARC (?) : 
+           BigEndian    ( SWAP=SWAPDEFAUT=0)
+    ==> ALPHA, INTEL, AMD :
+           LittleEndian ( SWAP=SWAPDEFAUT=1)        
+*/                                      
+
+#if defined(MACH_ALPHA) || defined(MACH_INTEL) || defined(MACH_AMD) 
 #define IS_BIG_ENDIAN 0
-#else
+#else 
 #define IS_BIG_ENDIAN 1
 #endif
 
+/* ---- La taille des index des tableaux ---- */
+#ifdef SO_SASIZET64 
+typedef int_8 sa_size_t ;
+#else
+typedef int_4 sa_size_t ;
+#endif
+
 
 /***********************************************************************/
@@ -229,5 +119,4 @@
 /***********************************************************************/
 
-/*    __MWERKS__   : Metrowerks Codewarrior (>= PRO 4)                 */
 /*    __DECCXX     : DEC CXX, version >= 6 is required                 */
 /*    __GNUG__     : GNU C++ 2.8.1, egcs ??                            */
@@ -249,5 +138,4 @@
 /*   ITER_TAG              : use iter_tag for iterator qualifiers in STL   */
 /*   NO_STRSTREAM          : does not have strstream                       */
-/*   NO_EXPLICIT           : does not know about explicit keyword          */
 /*   HAS_IOS_BIN                                                           */
 /*   HAS_IOS_NOCREATE                                                      */
@@ -292,15 +180,4 @@
 /* now the specific things */
 
-#ifdef __MWERKS__
-#define ANSI_TEMPLATES
-#undef  HAS_VEC_NEW
-#define NO_STRSTREAM
-//#define STREAMPOS_IS_CLASS
-#define ITER_TAG
-#define HAS_IOS_BIN 
-#define HAS_IOS_NOCREATE 
-#define HAS_STR_NPOS
-#endif
-
 #ifdef __GNUC__
 #define GCC_VERSION (__GNUC__ * 1000 \
@@ -385,7 +262,4 @@
 #endif
 
-#ifdef NO_EXPLICIT
-#define explicit
-#endif
 
 #ifdef HAS_IOS_BIN
@@ -395,25 +269,4 @@
 #endif
 
-/* Commente par Reza+CMV - Fev 2003 
- ifdef ANSI_IO
- define seekg(p_, m_) rdbuf()->pubseekoff(p_,m_)
- define seekp(p_, m_) rdbuf()->pubseekoff(p_,m_)
- endif
-*/ 
-
-#ifdef __MWERKS__
-//#define hypot(_x_,_y_) sqrt((_x_)*(_x_) + (_y_)*(_y_))
-#define random() (rand()*65538.0 + rand()*2. + rand())
-#define srandom srand
-#define initstate(seed, tab, n) srand(seed)
-#define nice(_x)
-
-#ifdef __cplusplus
-#include <string.h>
-#include <string>
-inline bool operator< (string const& s1, string const& s2)
-{ return (strcmp(s1.c_str(), s2.c_str()) < 0); }
-#endif
-#endif
 
 #ifdef OS_MACOSX
@@ -422,24 +275,4 @@
 #endif
 
-
-/********************************************************/
-/* Outil d'impressions pour debug */
-#define PR(_data_)  {cout<<" "<<#_data_<<" "<<_data_;}
-#define CR {cout<<"\n"<<flush;}
-/* ********************************************************/
-
-/* ---- Activation des flags de debug/bound checking  ----- */
-#ifdef SOPHYA_DEBUG
-#define SO_BOUNDCHECKING
-#endif
-
-/* ---- La taille et les index des tableaux ---- */
-#ifdef SGI_ARCH64
-typedef int_8 sa_size_t ;
-#else
-typedef int_4 sa_size_t ;
-#endif
-
-/* Compatibilite, avant de migrer tout le code en "PLANCK" */
 
 #ifdef __cplusplus
@@ -453,6 +286,5 @@
 /* Please use instead: sopnamsp.h          */
 /*******************************************/
-#define EXPLICIT explicit
-#endif
-
-#endif
+#endif
+
+#endif
Index: trunk/SophyaLib/BaseTools/sophyainit.cc
===================================================================
--- trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 3172)
+++ trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 3203)
@@ -153,5 +153,5 @@
 
 
-#if (!defined(__GNUG__) && !defined(__MWERKS__) && !defined(HPUX))
+#if (!defined(__GNUG__) && !defined(HPUX))
   // pas de bufferisation pour printf   cmv 18/3/97 selon E.A.
   // setvbuf(stdout,NULL,_IOLBF,0); setvbuf(stderr,NULL,_IOLBF,0);
@@ -205,5 +205,9 @@
   #endif
   #ifdef __IBMCPP__
+  #ifdef SO_ARCH64
   compiler = const_cast<char *>("IBM-xlC ") ;
+  #else
+  compiler = const_cast<char *>("IBM-xlC (-q64)") ;
+  #endif
   #endif
   #ifdef __INTEL_COMPILER
@@ -211,12 +215,9 @@
   #endif
   #ifdef __SGICC__
-  #ifdef SGI_ARCH64
+  #ifdef SO_ARCH64
   compiler = const_cast<char *>("SGI-CC (-64) ") ;
   #else
   compiler = const_cast<char *>("SGI-CC ") ;
   #endif
-  #endif
-  #ifdef __MWERKS__
-  compiler = const_cast<char *>("Codewarrior ");
   #endif
 
