[cgma-dev] r3476 - in cgm/branches/merge-cubit12: . init

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon Jan 25 16:01:12 CST 2010


Author: kraftche
Date: 2010-01-25 16:01:12 -0600 (Mon, 25 Jan 2010)
New Revision: 3476

Modified:
   cgm/branches/merge-cubit12/configure.ac
   cgm/branches/merge-cubit12/init/InitCGMA.cpp
Log:
detect and initialize proprietary CAT code in libcubiti19

Modified: cgm/branches/merge-cubit12/configure.ac
===================================================================
--- cgm/branches/merge-cubit12/configure.ac	2010-01-25 15:39:53 UTC (rev 3475)
+++ cgm/branches/merge-cubit12/configure.ac	2010-01-25 22:01:12 UTC (rev 3476)
@@ -136,6 +136,19 @@
        break],
       [AC_MSG_RESULT(no)])
   done
+
+  if test "x$CUBIT_LIBS" = "xno"; then
+    AC_MSG_ERROR("Cubit library not found in $CUBIT_BIN_DIR")
+  fi
+  
+  # Test for CAT-proprietary code that must be initialized in Cubit12
+  AC_MSG_CHECKING([For AcisTweekToolCAT in ${CUBIT_LIBS}])
+  AC_LINK_IFELSE([AC_LANG_PROGRAM(
+    [class AcisTweakToolCAT{ public: static AcisTweakToolCAT* instance(); };],
+    [AcisTweakToolCAT::instance();])],
+    [CUBIT_CAT_DEFINES=-DACIS_TWEAK_TOOL_CAT; AC_MSG_RESULT([yes])],
+    [CUBIT_CAT_DEFINES=; AC_MSG_RESULT([no])])
+
   LIBS="$old_LIBS"
   LDFLAGS="$old_LDFLAGS"
   LD_LIBRARY_PATH="$old_LD_LIBRARY_PATH"
@@ -146,13 +159,10 @@
   export PATH
   AC_LANG_POP([C++])
   
-  if test "x$CUBIT_LIBS" = "xno"; then
-    AC_MSG_ERROR("Cubit library not found in $CUBIT_BIN_DIR")
-  fi
   CGM_EXT_LIBS="$CGM_EXT_LIBS $CUBIT_LIBS"
   CGM_EXT_LDFLAGS="$CGM_EXT_LDFLAGS $CUBIT_LDFLAGS"
   CGM_EXT_LTFLAGS="$CGM_EXT_LTFLAGS $CUBIT_LTFLAGS"
-  CUBIT_CGM="-DCUBIT_CGM"
+  CUBIT_CGM="-DCUBIT_CGM $CUBIT_CAT_DEFINES"
 dnl  AC_DEFINE( HAVE_ACIS, "Have CGM ACIS Implementation" )
   HAVE_ACIS_DEF=-DHAVE_ACIS
 fi

Modified: cgm/branches/merge-cubit12/init/InitCGMA.cpp
===================================================================
--- cgm/branches/merge-cubit12/init/InitCGMA.cpp	2010-01-25 15:39:53 UTC (rev 3475)
+++ cgm/branches/merge-cubit12/init/InitCGMA.cpp	2010-01-25 22:01:12 UTC (rev 3476)
@@ -31,6 +31,14 @@
   char dummyvar[4096];
 };
 
+#ifdef ACIS_TWEAK_TOOL_CAT
+class AcisTweakToolCAT
+{
+  public:
+    static AcisTweakToolCAT* instance();
+};
+#endif
+
 #elif defined(HAVE_ACIS) 
 #  include "AcisQueryEngine.hpp"
 #  include "AcisModifyEngine.hpp"
@@ -87,6 +95,10 @@
                        // without the complete definition of AcisModifyEngine.
                        // But it shouldn't matter, as ACIS is the default for
                        // Cubit anyway.
+#ifdef ACIS_TWEAK_TOOL_CAT
+  AcisTweakToolCAT::instance();
+#endif
+
 #elif defined(HAVE_ACIS)
   AcisQueryEngine::instance();
   AcisModifyEngine::instance();



More information about the cgma-dev mailing list