[MOAB-dev] r3542 - in MOAB/trunk: . tools tools/iGeom tools/iMesh
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Sat Feb 13 07:18:01 CST 2010
Author: kraftche
Date: 2010-02-13 07:18:01 -0600 (Sat, 13 Feb 2010)
New Revision: 3542
Added:
MOAB/trunk/tools/iGeom/iGeom_FCDefs.h.in
MOAB/trunk/tools/iMesh/iMesh_FCDefs.h.in
Modified:
MOAB/trunk/configure.ac
MOAB/trunk/tools/Makefile.am
MOAB/trunk/tools/iGeom/Makefile.am
MOAB/trunk/tools/iMesh/Makefile.am
Log:
Fix iGeom configure & build logic.
o Add missing SUBDIRS entry for tools/iGeom
o Remove redundant configure logic for iMesh & iGeom
o Allow Fortran name mangling to be enabled/disabled separately
for iMesh and iGeom
o Rename FORCE_ENABLE_(IMESH|IGEOM) to FORCE_(IMESH|IGEOM) in
configure.ac because this value indicates that the user explicitly
enabled or *disabled* support for the API.
Modified: MOAB/trunk/configure.ac
===================================================================
--- MOAB/trunk/configure.ac 2010-02-12 07:30:59 UTC (rev 3541)
+++ MOAB/trunk/configure.ac 2010-02-13 13:18:01 UTC (rev 3542)
@@ -15,12 +15,12 @@
################################################################################
CONFIGURE_FORTRAN=no
-FORCE_ENABLE_IMESH=no
+FORCE_IMESH=no
AC_ARG_ENABLE( [imesh],
[AC_HELP_STRING([--enable-imesh(=nofortran)],[Build iMesh interface. If optional
'nofortran' argument is given, support for FORTRAN name mangling will be disabled.])
AC_HELP_STRING([--disable-imesh],[Don't build support for iMesh interface.])],
-[FORCE_ENABLE_IMESH=yes
+[FORCE_IMESH=yes
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --enable-imesh=\"${enableval}\""],
[enableval=yes] )
@@ -28,9 +28,11 @@
yes)
ENABLE_imesh=yes
CONFIGURE_FORTRAN=yes
+ AC_DEFINE([IMESH_FORTRAN],[1],[Fortran-mangle iMesh symbol names])
;;
nofortran|NoFortran|noFORTRAN|NoFORTRAN|Nofortran)
ENABLE_imesh=yes
+ IMESH_FORTRAN=no
;;
no)
ENABLE_imesh=no
@@ -44,18 +46,18 @@
# iGeom Part 1 of 3
################################################################################
-CONFIGURE_FORTRAN=no
-FORCE_ENABLE_IGEOM=no
+FORCE_IGEOM=no
AC_ARG_ENABLE( [igeom],
[AC_HELP_STRING([--enable-igeom(=nofortran)],[Build iGeom interface. If optional
'nofortran' argument is given, support for FORTRAN name mangling will be disabled.])
AC_HELP_STRING([--disable-igeom],[Don't build support for iGeom interface (default).])],
-[enableval="$enableval"],[enableval=no] )
+[FORCE_IGEOM=yes],[enableval=no] )
case $enableval in
yes)
ENABLE_igeom=yes
CONFIGURE_FORTRAN=yes
+ AC_DEFINE([IGEOM_FORTRAN],[1],[Fortran-mangle iGeom symbol names])
;;
nofortran|NoFortran|noFORTRAN|NoFORTRAN|Nofortran)
ENABLE_igeom=yes
@@ -151,7 +153,7 @@
################################################################################
-# iMesh Part 2 of 3
+# iMesh/iGeom Part 2 of 3
################################################################################
# The iMesh option must be checked before configuring the compilers
@@ -161,49 +163,32 @@
AC_MSG_CHECKING([size of MBEntityHandle])
AC_MSG_RESULT([$SIZEOF_MBENTITYHANDLE])
-IMESH_VALID_HANDLE_SIZE=yes
+ITAPS_VALID_HANDLE_SIZE=yes
if test $SIZEOF_VOID_P -ne $SIZEOF_MBENTITYHANDLE; then
- IMESH_VALID_HANDLE_SIZE=no
- AC_MSG_WARN([Cannot build iMesh API because sizeof(MBEntityHandle) != sizeof(void*)])
- if test "x$FORCE_ENABLE_IMESH" = "xno"; then
+ ITAPS_VALID_HANDLE_SIZE=no
+ AC_MSG_WARN([Cannot build iMesh or iGeom API because sizeof(MBEntityHandle) != sizeof(void*)])
+ if test "x$FORCE_IMESH" = "xno"; then
ENABLE_imesh=no
fi
+ if test "x$FORCE_IGEOM" = "xno"; then
+ ENABLE_igeom=no
+ fi
fi
AC_MSG_CHECKING([if iMesh support is to be built])
AC_MSG_RESULT([$ENABLE_imesh])
AM_CONDITIONAL([ENABLE_imesh],[test "xyes" = "x$ENABLE_imesh"])
if test "x$ENABLE_imesh" = "xyes"; then
- if test "x$IMESH_VALID_HANDLE_SIZE" != "xyes"; then
+ if test "x$ITAPS_VALID_HANDLE_SIZE" != "xyes"; then
AC_MSG_ERROR([Cannot build iMesh API with sizeof(MBEntityHandle) != sizeof(void*)])
fi
fi
-################################################################################
-# iGeom Part 2 of 3
-################################################################################
-
-# The iGeom option must be checked before configuring the compilers
-# so that we know if we need Fortran. This stuff has to be done
-# after configuring the compilers so that we know what size of
-# various types are.
-
-AC_MSG_CHECKING([size of MBEntityHandle])
-AC_MSG_RESULT([$SIZEOF_MBENTITYHANDLE])
-IGEOM_VALID_HANDLE_SIZE=yes
-if test $SIZEOF_VOID_P -ne $SIZEOF_MBENTITYHANDLE; then
- IMESH_VALID_HANDLE_SIZE=no
- AC_MSG_WARN([Cannot build iMesh API because sizeof(MBEntityHandle) != sizeof(void*)])
- if test "x$FORCE_ENABLE_IGEOM" = "xno"; then
- ENABLE_igeom=no
- fi
-fi
-
AC_MSG_CHECKING([if iGeom support is to be built])
AC_MSG_RESULT([$ENABLE_igeom])
AM_CONDITIONAL([ENABLE_igeom],[test "xyes" = "x$ENABLE_igeom"])
if test "x$ENABLE_igeom" = "xyes"; then
- if test "x$IGEOM_VALID_HANDLE_SIZE" != "xyes"; then
+ if test "x$ITAPS_VALID_HANDLE_SIZE" != "xyes"; then
AC_MSG_ERROR([Cannot build iGeom API with sizeof(MBEntityHandle) != sizeof(void*)])
fi
fi
@@ -1013,7 +998,7 @@
AC_ARG_VAR([FC], [FORTRAN compiler command])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_HEADERS([MBVersion.h MBEntityHandle.h parallel/MBmpi_config.h])
-AC_CONFIG_HEADERS([iBase_FCDefs.h])
+AC_CONFIG_HEADERS([iBase_FCDefs.h tools/iMesh/iMesh_FCDefs.h tools/iGeom/iGeom_FCDefs.h])
AC_CONFIG_FILES([Makefile
moab.make
testdir.h
Modified: MOAB/trunk/tools/Makefile.am
===================================================================
--- MOAB/trunk/tools/Makefile.am 2010-02-12 07:30:59 UTC (rev 3541)
+++ MOAB/trunk/tools/Makefile.am 2010-02-13 13:18:01 UTC (rev 3542)
@@ -115,7 +115,14 @@
imesh_DIR =
endif
+if ENABLE_igeom
+ igeom_DIR = iGeom
+else
+ igeom_DIR =
+endif
+
SUBDIRS = $(imesh_DIR) \
+ $(igeom_DIR) \
$(mbchaco_DIR) \
$(mbcoupler_DIR) \
$(mbzoltan_DIR) \
Modified: MOAB/trunk/tools/iGeom/Makefile.am
===================================================================
--- MOAB/trunk/tools/iGeom/Makefile.am 2010-02-12 07:30:59 UTC (rev 3541)
+++ MOAB/trunk/tools/iGeom/Makefile.am 2010-02-13 13:18:01 UTC (rev 3542)
@@ -47,8 +47,5 @@
echo "IGEOM_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
echo "MOAB_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
-iGeom_protos.h: iGeom.h mkprotos.sh
- $(srcdir)/mkprotos.sh iGeom MBCN $< $@ MBCN_FCDefs.h
-
-iGeom_FCDefs.h: iBase_FCDefs.h
- cd ../.. && ./config.status tools/iGeom/iGeom_FCDefs.h
\ No newline at end of file
+iGeom_protos.h: iGeom.h mkprotos.sh Makefile.am
+ $(srcdir)/mkprotos.sh iGeom MBCN $< $@ iGeom_FCDefs.h
Added: MOAB/trunk/tools/iGeom/iGeom_FCDefs.h.in
===================================================================
--- MOAB/trunk/tools/iGeom/iGeom_FCDefs.h.in (rev 0)
+++ MOAB/trunk/tools/iGeom/iGeom_FCDefs.h.in 2010-02-13 13:18:01 UTC (rev 3542)
@@ -0,0 +1,7 @@
+
+/* Fortran-mangle iGeom symbol names */
+#undef IGEOM_FORTRAN
+
+#ifdef IGEOM_FORTRAN
+# include "MBCN_FCDefs.h"
+#endif
Modified: MOAB/trunk/tools/iMesh/Makefile.am
===================================================================
--- MOAB/trunk/tools/iMesh/Makefile.am 2010-02-12 07:30:59 UTC (rev 3541)
+++ MOAB/trunk/tools/iMesh/Makefile.am 2010-02-13 13:18:01 UTC (rev 3542)
@@ -77,14 +77,11 @@
echo "IMESH_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iMesh-Defs.inc
echo "MOAB_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iMesh-Defs.inc
-iMesh_protos.h: iMesh.h mkprotos.sh
- $(srcdir)/mkprotos.sh iMesh MBCN $< $@ MBCN_FCDefs.h
+iMesh_protos.h: iMesh.h mkprotos.sh Makefile.am
+ $(srcdir)/mkprotos.sh iMesh MBCN $< $@ iMesh_FCDefs.h
iMesh_extensions_protos.h: iMesh_extensions.h mkprotos.sh
- $(srcdir)/mkprotos.sh iMesh MBCN $< $@ MBCN_FCDefs.h
+ $(srcdir)/mkprotos.sh iMesh MBCN $< $@ iMesh_FCDefs.h
iMeshP_protos.h: iMeshP.h mkprotos.sh
- $(srcdir)/mkprotos.sh iMeshP MBCN $< $@ MBCN_FCDefs.h
-
-iMesh_FCDefs.h: iBase_FCDefs.h
- cd ../.. && ./config.status tools/iMesh/iMesh_FCDefs.h
+ $(srcdir)/mkprotos.sh iMeshP MBCN $< $@ iMesh_FCDefs.h
Added: MOAB/trunk/tools/iMesh/iMesh_FCDefs.h.in
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh_FCDefs.h.in (rev 0)
+++ MOAB/trunk/tools/iMesh/iMesh_FCDefs.h.in 2010-02-13 13:18:01 UTC (rev 3542)
@@ -0,0 +1,7 @@
+
+/* Fortran-mangle iMesh symbol names */
+#undef IMESH_FORTRAN
+
+#ifdef IMESH_FORTRAN
+# include "MBCN_FCDefs.h"
+#endif
More information about the moab-dev
mailing list