]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Check the compatibility between double CORBA::Double et int CORBA::Long for transfert...
authorageay <ageay>
Thu, 19 Aug 2004 09:04:41 +0000 (09:04 +0000)
committerageay <ageay>
Thu, 19 Aug 2004 09:04:41 +0000 (09:04 +0000)
salome_adm/unix/config_files/check_omniorb.m4

index c7a9699e31edaaa1ce5d3f3fa64a4834873999e1..e5a98efe3a2c68054d940e0672cb4154e1ffda0b 100644 (file)
@@ -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 <stdlib.h>
+#include <CORBA.h>
+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 <stdlib.h>
+#include <CORBA.h>
+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