From: ageay Date: Thu, 19 Aug 2004 09:04:41 +0000 (+0000) Subject: Check the compatibility between double CORBA::Double et int CORBA::Long for transfert... X-Git-Tag: BR_GEAY_20041105~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=59dcfa97b543f6dfd438adbcd4f0aa0c2367c623;p=modules%2Fkernel.git Check the compatibility between double CORBA::Double et int CORBA::Long for transfert optimization in src/Communication. --- diff --git a/salome_adm/unix/config_files/check_omniorb.m4 b/salome_adm/unix/config_files/check_omniorb.m4 index c7a9699e3..e5a98efe3 100644 --- a/salome_adm/unix/config_files/check_omniorb.m4 +++ b/salome_adm/unix/config_files/check_omniorb.m4 @@ -226,7 +226,7 @@ then fi fi -AC_LANG_RESTORE +dnl AC_LANG_RESTORE AC_MSG_RESULT(for omniORBpy: $omniORBpy_ok) AC_MSG_RESULT(for omniORB: $omniORB_ok) @@ -234,5 +234,64 @@ AC_MSG_RESULT(for omniORB: $omniORB_ok) # Save cache AC_CACHE_SAVE +dnl AC_LANG_CPLUSPLUS + +CXXFLAGS_old=$CXXFLAGS +CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES" +LIBS_old=$LIBS +LIBS="$LIBS $OMNIORB_LDFLAGS -lomnithread" +AC_MSG_CHECKING(whether we have double and CORBA::Double compatibility) +AC_TRY_RUN( +#include +#include +int main () +{ + CORBA::Double *a=new CORBA::Double(2.5); + double c=2.5; + double *b; + b=(double *)a; + + if( (c==*b) && (sizeof(double)==sizeof(CORBA::Double)) ) + exit(0); + else + exit(1); +} +,DOUBLECOMP="yes",DOUBLECOMP="no") +if test "$DOUBLECOMP" = yes; then + OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -DCOMP_CORBA_DOUBLE" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +AC_MSG_CHECKING(whether we have int and CORBA::Long compatibility) +AC_TRY_RUN( +#include +#include +int main () +{ + CORBA::Long *a=new CORBA::Long(2); + int c=2; + int *b; + b=(int *)a; + + if( (c==*b) && (sizeof(int)==sizeof(CORBA::Long)) ) + exit(0); + else + exit(1); +} +,LONGCOMP="yes",LONGCOMP="no") +if test "$LONGCOMP" = yes; then + OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -DCOMP_CORBA_LONG" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +CXXFLAGS=$CXXFLAGS_old +LIBS=$LIBS_old + +AC_LANG_RESTORE + +AC_SUBST(OMNIORB_CXXFLAGS) + ])dnl dnl