[cgma-dev] r1862 - in cgm/trunk: . itaps

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Thu May 29 12:58:25 CDT 2008


Author: kraftche
Date: 2008-05-29 12:58:25 -0500 (Thu, 29 May 2008)
New Revision: 1862

Modified:
   cgm/trunk/configure.in
   cgm/trunk/itaps/iGeom-Defs.inc.in
Log:
configure.in: 
  Clean up CUBIT-related variable definitions

itaps/iGeom-Defs.inc.in: 
  Fix possible empty '-L' flags
  Substitute correct Cubit variables


Modified: cgm/trunk/configure.in
===================================================================
--- cgm/trunk/configure.in	2008-05-29 16:11:59 UTC (rev 1861)
+++ cgm/trunk/configure.in	2008-05-29 17:58:25 UTC (rev 1862)
@@ -57,7 +57,6 @@
 CGM_LIBS_LINK='$(CGM_LIBS_LINK_INTERNAL)'
 CGM_LIBS_FILES='$(CGM_LIBS_FILES_INTERNAL)'
 CGM_LIBS_LTFLAGS=
-CUBIT_LINK=no
 CUBIT_FILE=no
 CUBIT_BIN_DIR=no
 HAVE_ACIS_DEF=
@@ -78,23 +77,17 @@
   CUBIT_LTFLAGS=
   CUBIT_LIBS=no
   if test -d "$CUBIT_DIR/bin"; then
-    CUBIT_LDFLAGS="$CUBIT_LDFLAGS -L$CUBIT_DIR/bin"
-    CUBIT_LTFLAGS="$CUBIT_LTFLAGS -R$CUBIT_DIR/bin"
-    if test -d "$CUBIT_DIR/bin/lib"; then
-      CUBIT_LDFLAGS="$CUBIT_LDFLAGS -L$CUBIT_DIR/bin/lib"
-      CUBIT_LTFLAGS="$CUBIT_LTFLAGS -R$CUBIT_DIR/bin/lib"
-    fi
+    CUBIT_BIN_DIR="$CUBIT_DIR/bin"
+  elif test -d "$CUBIT_DIR/lib"; then
+    CUBIT_BIN_DIR="$CUBIT_DIR/lib"
+  elif test -d "$CUBIT_DIR/libs"; then
+    CUBIT_BIN_DIR="$CUBIT_DIR/libs"
+  else
+    CUBIT_BIN_DIR="$CUBIT_DIR"
   fi
-  if test -d "$CUBIT_DIR/lib"; then
-    CUBIT_LDFLAGS="$CUBIT_LDFLAGS -L$CUBIT_DIR/lib"
-    CUBIT_LTFLAGS="$CUBIT_LTFLAGS -R$CUBIT_DIR/lib"
-  fi
-  if test -d "$CUBIT_DIR/libs"; then
-    CUBIT_LDFLAGS="$CUBIT_LDFLAGS -L$CUBIT_DIR/libs"
-    CUBIT_LTFLAGS="$CUBIT_LTFLAGS -R$CUBIT_DIR/libs"
-  fi
+  CUBIT_LDFLAGS="-L$CUBIT_BIN_DIR"
+  CUBIT_LTFLAGS="-R$CUBIT_BIN_DIR"
 
-  CUBIT_BIN_DIR="$CUBIT_DIR/bin"
   cat >conftest.cc <<EOCUBITCT
 class AcisQueryEngine { public: static AcisQueryEngine* instance_; };
 int main() {
@@ -108,8 +101,8 @@
     num=[`expr X"$file" : X".*cubiti\([0-9][0-9]\)\..*"`]
     if ./libtool --mode=link $CXX $LDFLAGS $CUBIT_LDFLAGS $CUBIT_LTFLAGS -lcubiti$num conftest.cc -o conftest >&5 2>&5; then
       CUBIT_LIBS="-lcubiti$num"
-      CUBIT_FILE=`expr x"$file" : x"$CUBIT_DIR/bin/\(.*\)"`
-      CUBIT_FILE="${CUBIT_DIR}/bin/$CUBIT_FILE"
+      CUBIT_FILE=`expr x"$file" : x"$CUBIT_BIN_DIR/\(.*\)"`
+      CUBIT_FILE="${CUBIT_BIN_DIR}/$CUBIT_FILE"
       AC_MSG_RESULT(yes)
     else
       AC_MSG_RESULT(no)
@@ -128,6 +121,7 @@
   HAVE_ACIS_DEF=-DHAVE_ACIS
 fi
 
+AC_SUBST(CUBIT_BIN_DIR)
 AC_SUBST(CUBIT_LDFLAGS)
 AC_SUBST(CUBIT_LTFLAGS)
 AC_SUBST(CUBIT_LIBS)

Modified: cgm/trunk/itaps/iGeom-Defs.inc.in
===================================================================
--- cgm/trunk/itaps/iGeom-Defs.inc.in	2008-05-29 16:11:59 UTC (rev 1861)
+++ cgm/trunk/itaps/iGeom-Defs.inc.in	2008-05-29 17:58:25 UTC (rev 1862)
@@ -1,17 +1,19 @@
 ACIS_LIB_DIR         = @ACIS_LIB_DIR@
 ACIS_LIBS            = @CGM_ACIS_LIBS@ @ACIS_LIBS@
+ACIS_LINK_FLAGS      = @ACIS_LINK_FLAGS@
 
 CGM_PARALLEL_LIB = @CGM_PARALLEL_LIB@
 
 CGM_LIBS_LINK_INTERNAL =  \
 	$(CGM_LDFLAGS) \
-	-L${ACIS_LIB_DIR} \
-	-L$(CGM_LIBDIR) \
+	${ACIS_LINK_FLAGS} \
 	${ACIS_LIBS} -lcubit_virtual -lcubit_facet -lcubit_facetbool -lcholla ${ACIS_LIBS} -lcubit_geom -lcubit_util \
 	${CGM_PARALLEL_LIB}
 
-CUBIT_BIN_DIR = @CUBIT_BIN_DIR@
-CUBIT_LINK = @CUBIT_LINK@
+CUBIT_LTFLAGS = @CUBIT_LTFLAGS@
+CUBIT_LDFLAGS = @CUBIT_LDFLAGS@
+CUBIT_LIBS = @CUBIT_LIBS@
+CUBIT_LINK = $(CUBIT_LDFLAGS) $(CUBIT_LIBS)
 CUBIT_FILE = @CUBIT_FILE@
 
 CGM_LIBS_LINK = @CGM_LIBS_LINK@




More information about the cgma-dev mailing list