[MOAB-dev] r3579 - in MOAB/trunk: . doc itaps itaps/igeom itaps/imesh src src/io src/parallel src/parallel/moab test test/dual test/h5file test/io test/obb test/parallel test/perf tools tools/dagmc tools/mbchaco tools/mbcoupler tools/mbperf tools/mbzoltan tools/mcnpmit tools/qvdual

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Mar 10 12:12:47 CST 2010


Author: kraftche
Date: 2010-03-10 12:12:47 -0600 (Wed, 10 Mar 2010)
New Revision: 3579

Modified:
   MOAB/trunk/CMakeLists.txt
   MOAB/trunk/Makefile.am
   MOAB/trunk/configure.ac
   MOAB/trunk/doc/Makefile.am
   MOAB/trunk/doc/user.dox.in
   MOAB/trunk/itaps/Makefile.am
   MOAB/trunk/itaps/igeom/Makefile.am
   MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp
   MOAB/trunk/itaps/imesh/Makefile.am
   MOAB/trunk/moab.make.in
   MOAB/trunk/src/MBBSPTree.cpp
   MOAB/trunk/src/Makefile.am
   MOAB/trunk/src/io/ExoIIUtil.cpp
   MOAB/trunk/src/io/Makefile.am
   MOAB/trunk/src/io/ReadNCDF.cpp
   MOAB/trunk/src/io/ReadSmf.cpp
   MOAB/trunk/src/io/ReadVtk.cpp
   MOAB/trunk/src/io/Tqdcfr.cpp
   MOAB/trunk/src/io/WriteNCDF.cpp
   MOAB/trunk/src/io/WriteSLAC.cpp
   MOAB/trunk/src/io/WriteTemplate.cpp
   MOAB/trunk/src/parallel/MBParallelComm.cpp
   MOAB/trunk/src/parallel/MBProcConfig.cpp
   MOAB/trunk/src/parallel/Makefile.am
   MOAB/trunk/src/parallel/crystal.h
   MOAB/trunk/src/parallel/moab/MBParallelComm.hpp
   MOAB/trunk/src/parallel/moab/MBProcConfig.hpp
   MOAB/trunk/test/MBTest.cpp
   MOAB/trunk/test/Makefile.am
   MOAB/trunk/test/dual/Makefile.am
   MOAB/trunk/test/dual/dual_test.cpp
   MOAB/trunk/test/h5file/Makefile.am
   MOAB/trunk/test/h5file/h5legacy.cpp
   MOAB/trunk/test/h5file/h5regression.cpp
   MOAB/trunk/test/h5file/h5sets_test.cpp
   MOAB/trunk/test/io/Makefile.am
   MOAB/trunk/test/io/cub_file_test.cc
   MOAB/trunk/test/io/exodus_test.cc
   MOAB/trunk/test/io/gmsh_test.cc
   MOAB/trunk/test/io/nastran_test.cc
   MOAB/trunk/test/io/stl_test.cc
   MOAB/trunk/test/obb/Makefile.am
   MOAB/trunk/test/obb/obb_test.cpp
   MOAB/trunk/test/parallel/Makefile.am
   MOAB/trunk/test/parallel/parallel_unit_tests.cpp
   MOAB/trunk/test/parallel/uber_parallel_test.cpp
   MOAB/trunk/test/perf/Makefile.am
   MOAB/trunk/tools/Makefile.am
   MOAB/trunk/tools/dagmc/Makefile.am
   MOAB/trunk/tools/mbchaco/Makefile.am
   MOAB/trunk/tools/mbcoupler/MBCoupler.cpp
   MOAB/trunk/tools/mbcoupler/Makefile.am
   MOAB/trunk/tools/mbperf/Makefile.am
   MOAB/trunk/tools/mbzoltan/MBZoltan.cpp
   MOAB/trunk/tools/mbzoltan/Makefile.am
   MOAB/trunk/tools/mcnpmit/Makefile.am
   MOAB/trunk/tools/mcnpmit/main.cpp
   MOAB/trunk/tools/mcnpmit/mcnpmit.hpp
   MOAB/trunk/tools/qvdual/Makefile.am
Log:
code rearranging part 3 of 5 : source modifications and build system updates

Modified: MOAB/trunk/CMakeLists.txt
===================================================================
--- MOAB/trunk/CMakeLists.txt	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/CMakeLists.txt	2010-03-10 18:12:47 UTC (rev 3579)
@@ -7,7 +7,8 @@
   # Always build tests
   enable_testing()
 
-  include( ${MOAB_SOURCE_DIR}/cmake/GetAcInitVersion.cmake )
+  list (APPEND CMAKE_MODULE_PATH "${MOAB_SOURCE_DIR}/config")
+
   get_ac_init_version()
   set ( MOAB_VERSION_MAJOR  "${MAJOR_VERSION}"  )
   set ( MOAB_VERSION_MINOR  "${MINOR_VERSION}"  )
@@ -23,7 +24,6 @@
     endif ( MOAB_VERSION_MINOR EQUAL 99 )
   endif ( DEFINED PATCH_VERSION )
 
-  set ( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${MOAB_SOURCE_DIR}/cmake" )
   set ( EXECUTABLE_OUTPUT_PATH ${MOAB_BINARY_DIR}/bin CACHE PATH "Path to executables" FORCE )
   set ( LIBRARY_OUTPUT_PATH    ${MOAB_BINARY_DIR}/bin CACHE PATH "Path to libraries"   FORCE )
   mark_as_advanced(
@@ -320,9 +320,6 @@
   file( WRITE ${MOAB_BINARY_DIR}/MBCN_protos.h "" )
 
 # Testing
-  # Point to the input decks for the tests
-  configure_file( ${MOAB_SOURCE_DIR}/cmake/TestingConfig.h.in ${MOAB_BINARY_DIR}/testdir.h )
-
   add_executable( moab_test MBTest.cpp )
   target_link_libraries( moab_test MOAB )
   add_test( TestMOAB ${EXECUTABLE_OUTPUT_PATH}/moab_test -nostress )

Modified: MOAB/trunk/Makefile.am
===================================================================
--- MOAB/trunk/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,98 +1,27 @@
 # Don't require GNU-standard files (Changelog, README, etc.)
 AUTOMAKE_OPTIONS = foreign
-LDADD = $(top_builddir)/libMOAB.la
 
 # Don't loose the autoconf include path
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I config
 
 # Subdirectories to build
-SUBDIRS = 
-if HDF5_FILE
-  SUBDIRS += mhdf
-endif
-if PARALLEL
-  SUBDIRS += parallel
-endif
-SUBDIRS += . test tools doc doxygen 
+SUBDIRS = src test $(itaps_dir) tools doc
 
-BUILT_SOURCES = MBCN_protos.h
-
-# Things to build
-lib_LTLIBRARIES = libMOAB.la 
-
-TESTS = moab_test \
-        homxform_test \
-        scdseq_test \
-        tqdcfr \
-        test_adj \
-        seq_man_test \
-        geom_util_test \
-        xform_test \
-        obb_test \
-	vtk_test \
-	adaptive_kd_tree_tests \
-	bsp_tree_test \
-	file_options_test \
-        kd_tree_test \
-        var_len_test var_len_test_no_template \
-	tag_test \
-	mesh_set_test \
-	cub_file_test \
-	exodus_test \
-        gmsh_test \
-	nastran_test \
-        stl_test \
-        mbcn_test \
-        bsp_tree_poly_test
-#                 merge_test \         # input files no longer exist?
-#                 test_tag_server \    # fails
-
-check_PROGRAMS = $(TESTS) \
-		 kd_tree_tool \
-		 kd_tree_time
-
-#noinst_PROGRAMS = scdseq_timing
-
-
-# Some variables
-DEFS = $(DEFINES) -DIS_BUILDING_MB
-INCLUDES += -I$(top_builddir) 
-
-# The directory in which to install headers
-libMOAB_la_includedir = $(includedir)
-
-
-
-# Conditional sources
-MOAB_EXTRA_SRCS =
-MOAB_EXTRA_HDRS =
-
-if NETCDF_FILE
-  MOAB_EXTRA_SRCS +=  ReadNCDF.cpp  ReadNCDF.hpp \
-                     WriteNCDF.cpp WriteNCDF.hpp \
-                     WriteSLAC.cpp WriteSLAC.hpp 
+if ENABLE_igeom
+  itaps_dir_igeom = itaps
+else
+  itaps_dir_igeom =
 endif
-libMOAB_la_LIBADD = $(NETCDF_LIBS) $(HDF5_LIBS) 
-if HDF5_FILE
-  libMOAB_la_LIBADD += $(top_builddir)/mhdf/libmhdf.la
-  INCLUDES += -I$(srcdir)/mhdf/include
-  MOAB_EXTRA_SRCS += ReadHDF5.cpp ReadHDF5.hpp WriteHDF5.cpp WriteHDF5.hpp
-endif
-if CCMIO_FILE
-  MOAB_EXTRA_SRCS += WriteCCMIO.cpp WriteCCMIO.hpp ReadCCMIO.cpp ReadCCMIO.hpp
-  libMOAB_la_LIBADD += $(CCMIO_LIBS)
-endif
 
-if PARALLEL
-  libMOAB_la_LIBADD += $(top_builddir)/parallel/libMOABpar.la
-  INCLUDES += -I$(srcdir)/parallel
+if ENABLE_imesh
+  itaps_dir = itaps
+else
+  itaps_dir = $(itaps_dir_igeom)
 endif
 
-if HAVE_CGM
-  CPPFLAGS += @CGM_CPPFLAGS@ -DCGM @MOAB_CGM_DEFINES@
-  MOAB_EXTRA_SRCS +=  ReadCGM.cpp  ReadCGM.hpp
-  libMOAB_la_LIBADD += @CGM_LIBS@
-endif
+# Utility target: build but don't run tests
+build-check:
+	$(MAKE) 'TESTS_ENVIRONMENT=: ' check
 
 
 # Automake doesn't seem to have a directory defined for
@@ -124,304 +53,4 @@
 	  sed -e 's/.*options "\(.*\)"/\1/p' -e 'd' | \
 	  sed -e "s/'[[:space:]]'/'\n'/g" >$@
 
-# The list of source files, and any header files that do not need to be installed
-libMOAB_la_SOURCES = \
-  AEntityFactory.cpp \
-  AEntityFactory.hpp \
-  BitTagServer.cpp \
-  BitTagServer.hpp \
-  DualTool.cpp \
-  ElementSequence.hpp \
-  EntitySequence.cpp \
-  EntitySequence.hpp \
-  exodus_order.h \
-  ExoIIUtil.cpp \
-  ExoIIUtil.hpp \
-  FileOptions.cpp \
-  FileOptions.hpp \
-  FileTokenizer.cpp \
-  FileTokenizer.hpp \
-  GeomTopoTool.cpp \
-  GmshUtil.cpp \
-  GmshUtil.hpp \
-  HigherOrderFactory.cpp \
-  HomXform.cpp \
-  MBAdaptiveKDTree.cpp \
-  MBAffineXform.cpp \
-  MBAffineXform.hpp \
-  MBAlloc.cpp \
-  MBAlloc.hpp \
-  MBAxisBox.cpp \
-  MBAxisBox.hpp \
-  MBBSPTree.cpp \
-  MBCN.cpp \
-  MBCNArrays.hpp \
-  MBCartVect.cpp \
-  MBMatrix3.cpp \
-  MBCore.cpp \
-  MBFactory.cpp \
-  MBGeomUtil.cpp \
-  MBInternals.hpp \
-  MBMem.hpp \
-  MBMeshSet.cpp \
-  MBMeshSet.hpp \
-  MBOrientedBox.cpp \
-  MBOrientedBoxTreeTool.cpp \
-  BSPTreePoly.cpp \
-  MBRange.cpp \
-  MBRangeSeqIntersectIter.cpp \
-  MBRangeSeqIntersectIter.hpp \
-  MBReadUtil.cpp \
-  MBReadUtil.hpp \
-  MBReaderWriterSet.cpp \
-  MBSkinner.cpp \
-  MBSysUtil.cpp \
-  MBSysUtil.hpp \
-  MBUtil.cpp \
-  MBWriteUtil.cpp \
-  MBWriteUtil.hpp \
-  MeshSetSequence.cpp \
-  MeshSetSequence.hpp \
-  MeshTopoUtil.cpp \
-  patran_order.h \
-  PolyElementSeq.cpp \
-  PolyElementSeq.hpp \
-  RangeMap.hpp \
-  ReadGmsh.cpp \
-  ReadGmsh.hpp \
-  ReadSms.hpp \
-  ReadSms.cpp \
-  ReadSTL.cpp \
-  ReadSTL.hpp \
-  ReadVtk.cpp \
-  ReadVtk.hpp \
-  ReadSmf.hpp \
-  ReadSmf.cpp \
-  SMF_State.cpp \
-  SMF_State.hpp \
-  ReadIDEAS.cpp \
-  ReadIDEAS.hpp \
-  ReadMCNP5.cpp \
-  ReadMCNP5.hpp \
-  ReadNASTRAN.cpp \
-  ReadNASTRAN.hpp \
-  ReadABAQUS.cpp \
-  ReadABAQUS.hpp \
-  ReadTetGen.cpp \
-  ReadTetGen.hpp \
-  ScdElementData.cpp \
-  ScdElementData.hpp \
-  ScdVertexData.cpp \
-  ScdVertexData.hpp \
-  SequenceData.hpp \
-  SequenceData.cpp \
-  SequenceManager.cpp \
-  SequenceManager.hpp \
-  SparseTagSuperCollection.cpp \
-  SparseTagSuperCollection.hpp \
-  SparseTagCollection.cpp \
-  SparseTagCollection.hpp \
-  StructuredElementSeq.cpp \
-  StructuredElementSeq.hpp \
-  SweptElementData.cpp \
-  SweptElementData.hpp \
-  SweptElementSeq.cpp \
-  SweptElementSeq.hpp \
-  SweptVertexData.cpp \
-  SweptVertexData.hpp \
-  TagCompare.hpp \
-  TagInfo.cpp \
-  TagInfo.hpp \
-  TagServer.cpp \
-  TagServer.hpp \
-  Tqdcfr.cpp \
-  Tqdcfr.hpp \
-  TypeSequenceManager.cpp \
-  TypeSequenceManager.hpp \
-  UnstructuredElemSeq.cpp \
-  UnstructuredElemSeq.hpp \
-  VarLenTag.hpp \
-  VertexSequence.hpp \
-  VertexSequence.cpp \
-  VtkUtil.cpp \
-  VtkUtil.hpp \
-  WriteAns.cpp \
-  WriteAns.hpp \
-  WriteGMV.cpp \
-  WriteGMV.hpp \
-  WriteGmsh.cpp \
-  WriteGmsh.hpp \
-  WriteSTL.cpp \
-  WriteSTL.hpp \
-  WriteTemplate.cpp \
-  WriteVtk.cpp \
-  WriteVtk.hpp \
-  WriteSmf.cpp \
-  WriteSmf.hpp \
-  $(MOAB_EXTRA_SRCS)
-
-#  MBMem.cpp
-
-# The list of header files which are to be installed
-libMOAB_la_include_HEADERS = \
-  DualTool.hpp \
-  ExoIIInterface.hpp \
-  GeomTopoTool.hpp \
-  HigherOrderFactory.hpp \
-  HomXform.hpp \
-  MBAdaptiveKDTree.hpp \
-  MBBSPTree.hpp \
-  MBCN.hpp \
-  MBCN.h \
-  MBCN_FCDefs.h \
-  MBCN_protos.h \
-  MBCartVect.hpp \
-  MBCore.hpp \
-  MBEntityType.h \
-  MBEntityHandle.h \
-  MBError.hpp \
-  MBForward.hpp \
-  MBGeomUtil.hpp \
-  MBInterface.hpp \
-  MBMatrix3.hpp \
-  MBOrientedBox.hpp \
-  MBOrientedBoxTreeTool.hpp \
-  MBParallelConventions.h \
-  BSPTreePoly.hpp \
-  MBRange.hpp \
-  MBReadUtilIface.hpp \
-  MBReaderIface.hpp \
-  MBReaderWriterSet.hpp \
-  MBSkinner.hpp \
-  MBTagConventions.hpp \
-  MBTypes.h \
-  MBUnknownInterface.hpp \
-  MBUtil.hpp \
-  MBWriteUtilIface.hpp \
-  MBWriterIface.hpp \
-  MeshTopoUtil.hpp \
-  WriteTemplate.hpp \
-  $(MOAB_EXTRA_HDRS)
-
-MBCN_protos.h: MBCN.h tools/iMesh/mkprotos.sh
-	$(srcdir)/tools/iMesh/mkprotos.sh MBCN MBCN $< $@ MBCN_FCDefs.h
-
-MBCN_FCDefs.h: iBase_FCDefs.h
-	./config.status MBCN_FCDefs.h
-
-CPPFLAGS += -DSRCDIR=$(srcdir)
-
-# Tests and such
-
-moab_test_SOURCES = MBTest.cpp
-moab_test_DEPENDENCIES = test/mb_big_test.g test/cell1.gen test/cell2.gen $(top_builddir)/libMOAB.la
-
-homxform_test_SOURCES = HomXform.cpp
-homxform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-homxform_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-scdseq_test_SOURCES = scdseq_test.cpp
-scdseq_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#scdseq_timing_SOURCES = scdseq_timing.cpp
-#scdseq_timing_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-tqdcfr_SOURCES = Tqdcfr.cpp
-tqdcfr_CXXFLAGS = -DTEST_TQDCFR $(CXXFLAGS)
-tqdcfr_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_rms_SOURCES = test_rms.cpp
-#test_rms_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#merge_test_SOURCES = merge_test.cpp
-#merge_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_exo_SOURCES = test_exo.cpp
-#test_exo_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_tag_server_SOURCES = TagServer.cpp
-#test_tag_server_CXXFLAGS = -DTEST $(CXXFLAGS)
-#test_tag_server_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-test_adj_SOURCES = test_adj.cpp
-test_adj_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-seq_man_test_SOURCES = TestUtil.hpp TestTypeSequenceManager.cpp 
-
-mesh_set_test_SOURCES = Test_MBMeshSet.cpp TestUtil.hpp
-
-geom_util_test_SOURCES = TestUtil.hpp GeomUtilTests.cpp 
-geom_util_test_DEPENDENCIES = $(geom_util_test_LDADD)
-
-xform_test_SOURCES = MBAffineXform.cpp
-xform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-xform_test_DEPENDENCIES = $(xform_test_LDADD)
-
-obb_test_SOURCES = OBBTest.cpp
-obb_test_DEPENDENCIES = $(obb_test_LDADD)
-
-vtk_test_SOURCES = TestUtil.hpp VtkTest.cpp
-vtk_test_DEPENDENCIES = $(vtk_test_LDADD)
-
-adaptive_kd_tree_tests_SOURCES = adaptive_kd_tree_tests.cpp
-adaptive_kd_tree_tests_DEPENDENCIES = $(adaptive_kd_tree_tests_LDADD)
-
-kd_tree_tool_SOURCES = kd_tree_tool.cpp
-kd_tree_tool_DEPENDENCIES = $(kd_tree_tool_LDADD)
-
-kd_tree_time_SOURCES = kd_tree_time.cpp
-kd_tree_time_DEPENDENCIES = $(kd_tree_time_LDADD)
-
-kd_tree_test_SOURCES = kd_tree_test.cpp
-
-bsp_tree_test_SOURCES = bsp_tree_test.cpp
-
-file_options_test_SOURCES = TestUtil.hpp FileOptions.cpp 
-file_options_test_CPPFLAGS = -DTEST
-file_options_test_LDADD = 
-
-var_len_test_SOURCES = TestUtil.hpp VarLenTagTest.cpp
-var_len_test_no_template_SOURCES = $(var_len_test_SOURCES)
-var_len_test_no_template_CPPFLAGS = -UTEMPLATE_SPECIALIZATION
-
-tag_test_SOURCES = TestUtil.hpp TagTest.cpp
-tag_test_DEPENDENCIES = $(tag_test_LDADD)
-
-cub_file_test_SOURCES = TestUtil.hpp cub_file_test.cc
-cub_file_test_DEPENDENCIES = $(tag_test_LDADD)
-
-exodus_test_SOURCES = TestUtil.hpp exodus_test.cc
-exodus_test_DEPENDENCIES = $(tag_test_LDADD)
-
-gmsh_test_SOURCES = TestUtil.hpp gmsh_test.cc
-gmsh_test_DEPENDENCIES = $(tag_test_LDADD)
-
-nastran_test_SOURCES = TestUtil.hpp nastran_test.cc
-nastran_test_DEPENDENCIES = $(tag_test_LDADD)
-
-stl_test_SOURCES = TestUtil.hpp stl_test.cc
-stl_test_DEPENDENCIES = $(tag_test_LDADD)
-
-mbcn_test_SOURCES = MBCN.hpp MBCN.cpp mbcn_test.cc
-mbcn_test_CPPFLAGS = -DSRCDIR=$(srcdir)  # define anything to work around build issue
-mbcn_test_LDADD = 
-
-bsp_tree_poly_test_SOURCES = bsp_tree_poly_test.cpp
-
-# Other files to clean up (e.g. output from tests)
-DISTCLEANFILES = MBCN_FCDefs.h
-MOSTLYCLEANFILES = dumped_acis.sat tree.h5m moab.config
-
-test/mb_big_test.g: $(top_srcdir)/test/mb_big_test.g.gz
-	$(ZCAT) $(top_srcdir)/test/mb_big_test.g.gz > test/mb_big_test.g
-
-test/cell1.gen: $(top_srcdir)/test/cell1.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell1.gen.gz > test/cell1.gen
-
-test/cell2.gen: $(top_srcdir)/test/cell2.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell2.gen.gz > test/cell2.gen
-
-
-# Utility target: build but don't run tests
-build-check:
-	$(MAKE) 'TESTS_ENVIRONMENT=: ' check
+CLEANFILES = moab.config

Modified: MOAB/trunk/configure.ac
===================================================================
--- MOAB/trunk/configure.ac	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/configure.ac	2010-03-10 18:12:47 UTC (rev 3579)
@@ -2,8 +2,9 @@
 #                           Standard Stuff
 ################################################################################
 AC_INIT(MOAB, 3.99)
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_AUX_DIR([.])
+AC_CONFIG_SRCDIR([moab.make.in])
+AC_CONFIG_MACRO_DIR([config])
+AC_CONFIG_AUX_DIR([config])
 AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE
 
@@ -11,71 +12,11 @@
 
 
 ################################################################################
-#                           iMesh Part 1 of 3
-################################################################################
-
-CONFIGURE_FORTRAN=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_IMESH=yes
- DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --enable-imesh=\"${enableval}\""],
-[enableval=yes] )
-
-case $enableval in
-  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
-    ;;
-  *)
-    AC_MSG_ERROR([Invalid argument to --enable-imesh : $enableval])
-    ;;
-esac
-
-################################################################################
-#                           iGeom Part 1 of 3
-################################################################################
-
-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).])],
-[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
-    ;;
-  no)
-    ENABLE_igeom=no
-    ;;
-  *)
-    AC_MSG_ERROR([Invalid argument to --enable-igeom : $enableval])
-    ;;
-esac
-
-################################################################################
 #                           Compilers
 ################################################################################
 
 EXTRA_GNU_FLAGS='-Wall -pipe'
-FATHOM_CHECK_COMPILERS([yes],[yes],[$CONFIGURE_FORTRAN])
+FATHOM_CHECK_COMPILERS([yes],[yes],[yes])
 AM_CONDITIONAL(PARALLEL,[test "x$WITH_MPI" != "xno"])
 LIBS="-lm"
 
@@ -96,12 +37,10 @@
 
 FATHOM_TEMPLATE_SPECIALIZATION
 FATHOM_TEMPLATE_FUNC_SPECIALIZATION
-DEFINES="$DEFINES $TEMPLATE_SPECIALIZATION $TEMPLATE_FUNC_SPECIALIZATION"
+AM_CPPFLAGS="$AM_CPPFLAGS $TEMPLATE_SPECIALIZATION $TEMPLATE_FUNC_SPECIALIZATION"
 
-if test "xno" != "x$CONFIGURE_FORTRAN"; then
-  if test "x" != "x$FC"; then
-    AC_FC_WRAPPERS
-  fi
+if test "x" != "x$FC"; then
+  AC_FC_WRAPPERS
 fi
 
 
@@ -153,9 +92,58 @@
 
 
 ################################################################################
-#                           iMesh/iGeom Part 2 of 3
+#                           iMesh Part 1 of 2
 ################################################################################
 
+FORCE_IMESH=no
+AC_ARG_ENABLE( [imesh],
+[AC_HELP_STRING([--disable-imesh],[Do no build support for iMesh interface.])],
+[FORCE_IMESH=yes],
+[enableval=yes] )
+
+case $enableval in
+  yes)
+    ENABLE_imesh=yes
+    ;;
+  nofortran|NoFortran|noFORTRAN|NoFORTRAN|Nofortran)
+    AC_MSG_ERROR([Depricated value for --enable-imesh: \"$enableval\".  Try \"FC= F77=\"])
+    ;;
+  no)
+    ENABLE_imesh=no
+    ;;
+  *)
+    AC_MSG_ERROR([Invalid argument to --enable-imesh : $enableval])
+    ;;
+esac
+
+################################################################################
+#                           iGeom Part 1 of 2
+################################################################################
+
+FORCE_IGEOM=no
+AC_ARG_ENABLE( [igeom],
+[AC_HELP_STRING([--enable-igeom],[Build mesh-based iGeom implementation])],
+[FORCE_IGEOM=yes],[enableval=no] )
+
+case $enableval in
+  yes)
+    ENABLE_igeom=yes
+    ;;
+  nofortran|NoFortran|noFORTRAN|NoFORTRAN|Nofortran)
+    AC_MSG_ERROR([Depricated value for --enable-igeom: \"$enableval\".  Try \"FC= F77=\"])
+    ;;
+  no)
+    ENABLE_igeom=no
+    ;;
+  *)
+    AC_MSG_ERROR([Invalid argument to --enable-igeom : $enableval])
+    ;;
+esac
+
+################################################################################
+#                           iMesh/iGeom Part 2 of 2
+################################################################################
+
 # The iMesh 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 
@@ -227,7 +215,7 @@
 ################################################################################
 #                             System Headers
 ################################################################################
-AC_CHECK_HEADER([ieeefp.h],[DEFINES="$DEFINES -DHAVE_IEEEFP_H"] )
+AC_CHECK_HEADER([ieeefp.h],[AM_CPPFLAGS="$AM_CPPFLAGS -DHAVE_IEEEFP_H"] )
 if test "xyes" = "x$enable_debug"; then
   AC_CHECK_HEADER( [valgrind/memcheck.h], [CPPFLAGS="$CPPFLAGS -DVALGRIND"] )
 fi
@@ -245,7 +233,7 @@
 
 FATHOM_CHECK_MPI
 FATHOM_CONFIG_MPI_EXEC
-test "xyes" != "x$WITH_MPI" || DEFINES="$DEFINES -DUSE_MPI"
+test "xyes" != "x$WITH_MPI" || AM_CPPFLAGS="$AM_CPPFLAGS -DUSE_MPI"
 AM_CONDITIONAL(USE_MPI, [test "xno" != "x$WITH_MPI"])
 # Used to generate MBmpi.h
 if test "xyes" = "x$MPI_CXX_HELP_NEEDED"; then
@@ -264,7 +252,7 @@
 if test "xno" = "x$HAVE_HDF5"; then
   AC_MSG_WARN([Support for native HDF5 file format disabled])
 else
-  DEFINES="$DEFINES -DHDF5_FILE"
+  AM_CPPFLAGS="$AM_CPPFLAGS -DHDF5_FILE"
 fi
 AM_CONDITIONAL(HDF5_FILE, [test "xno" != "x$HAVE_HDF5"])
 AM_CPPFLAGS="$HDF5_CPPFLAGS $AM_CPPFLAGS"
@@ -285,7 +273,7 @@
 fi
 AM_CONDITIONAL(PARALLEL_HDF5, [test "xno" != "x$HAVE_HDF5_PARALLEL"])
 if test "xno" != "x$HAVE_HDF5_PARALLEL"; then
-  DEFINES="$DEFINES -DHDF5_PARALLEL"
+  AM_CPPFLAGS="$AM_CPPFLAGS -DHDF5_PARALLEL"
 fi
 
 ################################################################################
@@ -297,7 +285,7 @@
 FATHOM_CHECK_CCMIO
 LDFLAGS="$old_LDFLAGS"
 if test "xno" != "x$HAVE_CCMIO"; then
-  DEFINES="$DEFINES -DCCMIO_FILE"
+  AM_CPPFLAGS="$AM_CPPFLAGS -DCCMIO_FILE"
 fi
 AM_CONDITIONAL(CCMIO_FILE, [test "xno" != "x$HAVE_CCMIO"])
 AM_CPPFLAGS="$CCMIO_CPPFLAGS $AM_CPPFLAGS"
@@ -316,7 +304,7 @@
 if test "xno" = "x$HAVE_NETCDF"; then
   AC_MSG_WARN([Support for ExodusII file format disabled])
 else
-  DEFINES="$DEFINES -DNETCDF_FILE"
+  AM_CPPFLAGS="$AM_CPPFLAGS -DNETCDF_FILE"
 fi
 AM_CONDITIONAL(NETCDF_FILE, [test "xno" != "x$HAVE_NETCDF"])
 AM_CPPFLAGS="$NETCDF_CPPFLAGS $AM_CPPFLAGS"
@@ -947,10 +935,10 @@
     CGM_MAKE=
     AC_CHECK_FILE([${CGM_DIR}/lib/cgm.make],
                   [CGM_MAKE="${CGM_DIR}/lib/cgm.make";
-                   DEFINES="$DEFINES -DCGM"],
+                   AM_CPPFLAGS="$AM_CPPFLAGS -DCGM"],
                   [AC_CHECK_FILE([${CGM_DIR}/cgm.make],
                                  [CGM_MAKE="${CGM_DIR}/cgm.make";
-                   DEFINES="$DEFINES -DCGM"],
+                   AM_CPPFLAGS="$AM_CPPFLAGS -DCGM"],
                                  [AC_MSG_WARN([$CGM_DIR : not a configured CGM]); 
                                   CGM_MISSING=yes])
                   ])
@@ -999,39 +987,8 @@
 AM_CONDITIONAL( HAVE_CGM, [test "x$CGM_MISSING" = "xno"] )
 
 ################################################################################
-#                           iMesh Part 3 of 3 (Babel)
-################################################################################
-if test "x$ENABLE_imesh" = "xyes"; then
-  AC_ARG_WITH(babel, 
-  [AC_HELP_STRING([--with-babel=DIR], [Specify directory containing babel])],
-  [BABEL_DIR=$withval
-   DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-babel=\"${withval}\""
-   ], [BABEL_DIR=no])
-  case "x$BABEL_DIR" in
-    xno)
-      BABEL_DIR=
-      USE_BABEL=no
-      ;;
-    xyes|x)
-      BABEL_DIR=/usr/local
-      AC_CHECK_FILE([${BABEL_DIR}/bin/babel], [USE_BABEL=yes], [USE_BABEL=no])
-      ;;
-    *)
-      AC_CHECK_FILE([${BABEL_DIR}/bin/babel], [USE_BABEL=yes], [USE_BABEL=no])
-      ;;
-  esac
-  AC_SUBST(BABEL_DIR)
-  AC_SUBST(USE_BABEL)
-else
-  USE_BABEL=no
-fi
-AM_CONDITIONAL(USE_BABEL, [test "xno" != "x$USE_BABEL"])
-
-################################################################################
 #                           Output Files
 ################################################################################
-AC_SUBST([INCLUDES])
-AC_SUBST([DEFINES])
 AC_SUBST([AM_CPPFLAGS])
 AM_LDFLAGS="$AM_LDFLAGS $EXPORT_LTFLAGS $EXPORT_LDFLAGS"
 AC_SUBST([AM_LDFLAGS])
@@ -1043,26 +1000,29 @@
 
 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 tools/iMesh/iMesh_FCDefs.h tools/iGeom/iGeom_FCDefs.h])
+AC_CONFIG_HEADERS([src/moab/MBVersion.h 
+                   src/moab/MBEntityHandle.h 
+                   src/parallel/moab/MBmpi_config.h
+                   src/FCDefs.h])
 AC_CONFIG_FILES([Makefile 
-                 moab.make 
-                 testdir.h
-                 parallel/Makefile
-                 mhdf/Makefile
+                 moab.make                  
+                 src/Makefile
+                 src/io/Makefile
+                 src/io/mhdf/Makefile
+                 src/parallel/Makefile
                  test/Makefile
                  test/h5file/Makefile
                  test/dual/Makefile
                  test/obb/Makefile
                  test/perf/Makefile
+                 test/io/Makefile
+                 test/parallel/Makefile
+                 itaps/Makefile
+                 itaps/imesh/Makefile
+                 itaps/imesh/iMesh-Defs.inc
+		 itaps/igeom/Makefile
+                 itaps/igeom/iGeom-Defs.inc
                  tools/Makefile
-                 tools/iMesh/Makefile
-                 tools/iMesh/iMesh-Defs.inc
-                 tools/iMesh/SIDL/iMesh-SIDL-Defs.inc
-                 tools/iMesh/SIDL/Makefile
-                 tools/iMesh/SIDL/common.make
-		 tools/iGeom/Makefile
-                 tools/iGeom/iGeom-Defs.inc
                  tools/mbperf/Makefile
                  tools/mbchaco/Makefile
                  tools/mbcoupler/Makefile
@@ -1072,16 +1032,16 @@
                  tools/qvdual/Makefile
                  tools/dagmc/Makefile
                  doc/Makefile
-                 doxygen/Makefile
+                 doc/user.dox
                  ])
-AC_CONFIG_COMMANDS([MBCN_FCDefs.h],
-  [sed -e "s/FC_FUNC/MBCN_FC_FUNC/" iBase_FCDefs.h >MBCN_FCDefs.h])
+AC_CONFIG_COMMANDS([src/MOAB_FCDefs.h],
+  [sed -e "s/FC_FUNC/MOAB_FC_FUNC/" src/FCDefs.h >src/MOAB_FCDefs.h])
 
 AC_OUTPUT
 
 AC_MSG_RESULT([C:   $CC $CFLAGS $CPPFLAGS])
 AC_MSG_RESULT([C++: $CXX $CXXFLAGS $CPPFLAGS])
-if test "xno" != "x$CONFIGURE_FORTRAN"; then
+if test "x" != "x$FC"; then
   AC_MSG_RESULT([Fortran: $FC $FCFLAGS])
 fi
 

Modified: MOAB/trunk/doc/Makefile.am
===================================================================
--- MOAB/trunk/doc/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/doc/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,2 +1,2 @@
 
-EXTRA_DIST  = MOAB-UG.doc MOAB-performance.doc
+EXTRA_DIST  = MOAB-UG.doc MOAB-performance.doc user.dox

Modified: MOAB/trunk/doc/user.dox.in
===================================================================
--- MOAB/trunk/doc/user.dox.in	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/doc/user.dox.in	2010-03-10 18:12:47 UTC (rev 3579)
@@ -304,26 +304,8 @@
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT                  = ../DualTool.hpp \
-                         ../ExoIIInterface.hpp \
-                         ../HigherOrderFactory.hpp \
-                         ../HomXform.hpp \
-                         ../MBCN.hpp \
-                         ../MBInterface.hpp \
-                         ../MBParallelConventions.h \
-                         ../MBRange.hpp \
-                         ../MBReadUtilIface.hpp \
-                         ../MBReaderIface.hpp \
-                         ../MBReaderWriterSet.hpp \
-                         ../MBSkinner.hpp \
-                         ../MBTagConventions.hpp \
-                         ../MBUnknownInterface.h \
-                         ../MBUtil.hpp \
-                         ../MBWriteUtilIface.hpp \
-                         ../MBWriterIface.hpp \
-                         ../MeshTopoUtil.hpp \
-                         ../ReadWriteDefines.h \
-                         ../WriteTemplate.hpp 
+INPUT                  = @top_srcdir@/src/moab \
+                         @top_srcdir@/src/parallel/moab 
 
 # If the value of the INPUT tag contains directories, you can use the 
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 

Modified: MOAB/trunk/itaps/Makefile.am
===================================================================
--- MOAB/trunk/itaps/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/itaps/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,427 +1,18 @@
-# Don't require GNU-standard files (Changelog, README, etc.)
-AUTOMAKE_OPTIONS = foreign
-LDADD = $(top_builddir)/libMOAB.la
 
-# Don't loose the autoconf include path
-ACLOCAL_AMFLAGS = -I m4
+if ENABLE_imesh
+  imesh_DIR = imesh
+else
+  imesh_DIR = 
+endif 
 
-# Subdirectories to build
-SUBDIRS = 
-if HDF5_FILE
-  SUBDIRS += mhdf
-endif
-if PARALLEL
-  SUBDIRS += parallel
-endif
-SUBDIRS += . test tools doc doxygen 
+if ENABLE_igeom
+  igeom_DIR = igeom
+else
+  igeom_DIR = 
+endif 
 
-BUILT_SOURCES = MBCN_protos.h
+include_HEADERS = iBase.h iBase_f.h
 
-# Things to build
-lib_LTLIBRARIES = libMOAB.la 
+SUBDIRS = $(imesh_DIR) $(igeom_DIR)
 
-TESTS = moab_test \
-        homxform_test \
-        scdseq_test \
-        tqdcfr \
-        test_adj \
-        seq_man_test \
-        geom_util_test \
-        xform_test \
-        obb_test \
-	vtk_test \
-	adaptive_kd_tree_tests \
-	bsp_tree_test \
-	file_options_test \
-        kd_tree_test \
-        var_len_test var_len_test_no_template \
-	tag_test \
-	mesh_set_test \
-	cub_file_test \
-	exodus_test \
-        gmsh_test \
-	nastran_test \
-        stl_test \
-        mbcn_test \
-        bsp_tree_poly_test
-#                 merge_test \         # input files no longer exist?
-#                 test_tag_server \    # fails
-
-check_PROGRAMS = $(TESTS) \
-		 kd_tree_tool \
-		 kd_tree_time
-
-#noinst_PROGRAMS = scdseq_timing
-
-
-# Some variables
-DEFS = $(DEFINES) -DIS_BUILDING_MB
-INCLUDES += -I$(top_builddir) 
-
-# The directory in which to install headers
-libMOAB_la_includedir = $(includedir)
-
-
-
-# Conditional sources
-MOAB_EXTRA_SRCS =
-MOAB_EXTRA_HDRS =
-
-if NETCDF_FILE
-  MOAB_EXTRA_SRCS +=  ReadNCDF.cpp  ReadNCDF.hpp \
-                     WriteNCDF.cpp WriteNCDF.hpp \
-                     WriteSLAC.cpp WriteSLAC.hpp 
-endif
-libMOAB_la_LIBADD = $(NETCDF_LIBS) $(HDF5_LIBS) 
-if HDF5_FILE
-  libMOAB_la_LIBADD += $(top_builddir)/mhdf/libmhdf.la
-  INCLUDES += -I$(srcdir)/mhdf/include
-  MOAB_EXTRA_SRCS += ReadHDF5.cpp ReadHDF5.hpp WriteHDF5.cpp WriteHDF5.hpp
-endif
-if CCMIO_FILE
-  MOAB_EXTRA_SRCS += WriteCCMIO.cpp WriteCCMIO.hpp ReadCCMIO.cpp ReadCCMIO.hpp
-  libMOAB_la_LIBADD += $(CCMIO_LIBS)
-endif
-
-if PARALLEL
-  libMOAB_la_LIBADD += $(top_builddir)/parallel/libMOABpar.la
-  INCLUDES += -I$(srcdir)/parallel
-endif
-
-if HAVE_CGM
-  CPPFLAGS += @CGM_CPPFLAGS@ -DCGM @MOAB_CGM_DEFINES@
-  MOAB_EXTRA_SRCS +=  ReadCGM.cpp  ReadCGM.hpp
-  libMOAB_la_LIBADD += @CGM_LIBS@
-endif
-
-
-# Automake doesn't seem to have a directory defined for
-# platform-dependent data (or include) files. So put 
-# in $(libdir).  Define a $(cfgdir) to get around automake's
-# check that only libraries are going in $(libdir)
-cfgdir = $(libdir)
-cfg_DATA = moab.make moab.config
-
-# By default, moab.make will define these to $(srcdir).  We
-# want to override that during the INSTALL of the file so
-# that the correct values are set (e.g. if someone does 
-# 'make prefix=/foo install', we don't know the correct install
-# directory until we're doing the install.
-install-data-hook:
-	echo "MOAB_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/moab.make
-	echo "MOAB_INCLUDEDIR=${includedir}" >> $(DESTDIR)$(cfgdir)/moab.make
-
-
-# Generate a file to be installed in $libdir containing the configuration
-# options used for this MOAB build.
-# Note: If you modify this, verify that it works correctly for option
-#       values containing spaces.
-# First line: get unformatted data from config.status
-# Second line: extract just the list of options
-# Third line: put individual options on separate lines
-moab.config: config.status Makefile.am
-	./config.status --version | \
-	  sed -e 's/.*options "\(.*\)"/\1/p' -e 'd' | \
-	  sed -e "s/'[[:space:]]'/'\n'/g" >$@
-
-# The list of source files, and any header files that do not need to be installed
-libMOAB_la_SOURCES = \
-  AEntityFactory.cpp \
-  AEntityFactory.hpp \
-  BitTagServer.cpp \
-  BitTagServer.hpp \
-  DualTool.cpp \
-  ElementSequence.hpp \
-  EntitySequence.cpp \
-  EntitySequence.hpp \
-  exodus_order.h \
-  ExoIIUtil.cpp \
-  ExoIIUtil.hpp \
-  FileOptions.cpp \
-  FileOptions.hpp \
-  FileTokenizer.cpp \
-  FileTokenizer.hpp \
-  GeomTopoTool.cpp \
-  GmshUtil.cpp \
-  GmshUtil.hpp \
-  HigherOrderFactory.cpp \
-  HomXform.cpp \
-  MBAdaptiveKDTree.cpp \
-  MBAffineXform.cpp \
-  MBAffineXform.hpp \
-  MBAlloc.cpp \
-  MBAlloc.hpp \
-  MBAxisBox.cpp \
-  MBAxisBox.hpp \
-  MBBSPTree.cpp \
-  MBCN.cpp \
-  MBCNArrays.hpp \
-  MBCartVect.cpp \
-  MBMatrix3.cpp \
-  MBCore.cpp \
-  MBFactory.cpp \
-  MBGeomUtil.cpp \
-  MBInternals.hpp \
-  MBMem.hpp \
-  MBMeshSet.cpp \
-  MBMeshSet.hpp \
-  MBOrientedBox.cpp \
-  MBOrientedBoxTreeTool.cpp \
-  BSPTreePoly.cpp \
-  MBRange.cpp \
-  MBRangeSeqIntersectIter.cpp \
-  MBRangeSeqIntersectIter.hpp \
-  MBReadUtil.cpp \
-  MBReadUtil.hpp \
-  MBReaderWriterSet.cpp \
-  MBSkinner.cpp \
-  MBSysUtil.cpp \
-  MBSysUtil.hpp \
-  MBUtil.cpp \
-  MBWriteUtil.cpp \
-  MBWriteUtil.hpp \
-  MeshSetSequence.cpp \
-  MeshSetSequence.hpp \
-  MeshTopoUtil.cpp \
-  patran_order.h \
-  PolyElementSeq.cpp \
-  PolyElementSeq.hpp \
-  RangeMap.hpp \
-  ReadGmsh.cpp \
-  ReadGmsh.hpp \
-  ReadSms.hpp \
-  ReadSms.cpp \
-  ReadSTL.cpp \
-  ReadSTL.hpp \
-  ReadVtk.cpp \
-  ReadVtk.hpp \
-  ReadSmf.hpp \
-  ReadSmf.cpp \
-  SMF_State.cpp \
-  SMF_State.hpp \
-  ReadIDEAS.cpp \
-  ReadIDEAS.hpp \
-  ReadMCNP5.cpp \
-  ReadMCNP5.hpp \
-  ReadNASTRAN.cpp \
-  ReadNASTRAN.hpp \
-  ReadABAQUS.cpp \
-  ReadABAQUS.hpp \
-  ReadTetGen.cpp \
-  ReadTetGen.hpp \
-  ScdElementData.cpp \
-  ScdElementData.hpp \
-  ScdVertexData.cpp \
-  ScdVertexData.hpp \
-  SequenceData.hpp \
-  SequenceData.cpp \
-  SequenceManager.cpp \
-  SequenceManager.hpp \
-  SparseTagSuperCollection.cpp \
-  SparseTagSuperCollection.hpp \
-  SparseTagCollection.cpp \
-  SparseTagCollection.hpp \
-  StructuredElementSeq.cpp \
-  StructuredElementSeq.hpp \
-  SweptElementData.cpp \
-  SweptElementData.hpp \
-  SweptElementSeq.cpp \
-  SweptElementSeq.hpp \
-  SweptVertexData.cpp \
-  SweptVertexData.hpp \
-  TagCompare.hpp \
-  TagInfo.cpp \
-  TagInfo.hpp \
-  TagServer.cpp \
-  TagServer.hpp \
-  Tqdcfr.cpp \
-  Tqdcfr.hpp \
-  TypeSequenceManager.cpp \
-  TypeSequenceManager.hpp \
-  UnstructuredElemSeq.cpp \
-  UnstructuredElemSeq.hpp \
-  VarLenTag.hpp \
-  VertexSequence.hpp \
-  VertexSequence.cpp \
-  VtkUtil.cpp \
-  VtkUtil.hpp \
-  WriteAns.cpp \
-  WriteAns.hpp \
-  WriteGMV.cpp \
-  WriteGMV.hpp \
-  WriteGmsh.cpp \
-  WriteGmsh.hpp \
-  WriteSTL.cpp \
-  WriteSTL.hpp \
-  WriteTemplate.cpp \
-  WriteVtk.cpp \
-  WriteVtk.hpp \
-  WriteSmf.cpp \
-  WriteSmf.hpp \
-  $(MOAB_EXTRA_SRCS)
-
-#  MBMem.cpp
-
-# The list of header files which are to be installed
-libMOAB_la_include_HEADERS = \
-  DualTool.hpp \
-  ExoIIInterface.hpp \
-  GeomTopoTool.hpp \
-  HigherOrderFactory.hpp \
-  HomXform.hpp \
-  MBAdaptiveKDTree.hpp \
-  MBBSPTree.hpp \
-  MBCN.hpp \
-  MBCN.h \
-  MBCN_FCDefs.h \
-  MBCN_protos.h \
-  MBCartVect.hpp \
-  MBCore.hpp \
-  MBEntityType.h \
-  MBEntityHandle.h \
-  MBError.hpp \
-  MBForward.hpp \
-  MBGeomUtil.hpp \
-  MBInterface.hpp \
-  MBMatrix3.hpp \
-  MBOrientedBox.hpp \
-  MBOrientedBoxTreeTool.hpp \
-  MBParallelConventions.h \
-  BSPTreePoly.hpp \
-  MBRange.hpp \
-  MBReadUtilIface.hpp \
-  MBReaderIface.hpp \
-  MBReaderWriterSet.hpp \
-  MBSkinner.hpp \
-  MBTagConventions.hpp \
-  MBTypes.h \
-  MBUnknownInterface.hpp \
-  MBUtil.hpp \
-  MBWriteUtilIface.hpp \
-  MBWriterIface.hpp \
-  MeshTopoUtil.hpp \
-  WriteTemplate.hpp \
-  $(MOAB_EXTRA_HDRS)
-
-MBCN_protos.h: MBCN.h tools/iMesh/mkprotos.sh
-	$(srcdir)/tools/iMesh/mkprotos.sh MBCN MBCN $< $@ MBCN_FCDefs.h
-
-MBCN_FCDefs.h: iBase_FCDefs.h
-	./config.status MBCN_FCDefs.h
-
-CPPFLAGS += -DSRCDIR=$(srcdir)
-
-# Tests and such
-
-moab_test_SOURCES = MBTest.cpp
-moab_test_DEPENDENCIES = test/mb_big_test.g test/cell1.gen test/cell2.gen $(top_builddir)/libMOAB.la
-
-homxform_test_SOURCES = HomXform.cpp
-homxform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-homxform_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-scdseq_test_SOURCES = scdseq_test.cpp
-scdseq_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#scdseq_timing_SOURCES = scdseq_timing.cpp
-#scdseq_timing_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-tqdcfr_SOURCES = Tqdcfr.cpp
-tqdcfr_CXXFLAGS = -DTEST_TQDCFR $(CXXFLAGS)
-tqdcfr_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_rms_SOURCES = test_rms.cpp
-#test_rms_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#merge_test_SOURCES = merge_test.cpp
-#merge_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_exo_SOURCES = test_exo.cpp
-#test_exo_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_tag_server_SOURCES = TagServer.cpp
-#test_tag_server_CXXFLAGS = -DTEST $(CXXFLAGS)
-#test_tag_server_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-test_adj_SOURCES = test_adj.cpp
-test_adj_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-seq_man_test_SOURCES = TestUtil.hpp TestTypeSequenceManager.cpp 
-
-mesh_set_test_SOURCES = Test_MBMeshSet.cpp TestUtil.hpp
-
-geom_util_test_SOURCES = TestUtil.hpp GeomUtilTests.cpp 
-geom_util_test_DEPENDENCIES = $(geom_util_test_LDADD)
-
-xform_test_SOURCES = MBAffineXform.cpp
-xform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-xform_test_DEPENDENCIES = $(xform_test_LDADD)
-
-obb_test_SOURCES = OBBTest.cpp
-obb_test_DEPENDENCIES = $(obb_test_LDADD)
-
-vtk_test_SOURCES = TestUtil.hpp VtkTest.cpp
-vtk_test_DEPENDENCIES = $(vtk_test_LDADD)
-
-adaptive_kd_tree_tests_SOURCES = adaptive_kd_tree_tests.cpp
-adaptive_kd_tree_tests_DEPENDENCIES = $(adaptive_kd_tree_tests_LDADD)
-
-kd_tree_tool_SOURCES = kd_tree_tool.cpp
-kd_tree_tool_DEPENDENCIES = $(kd_tree_tool_LDADD)
-
-kd_tree_time_SOURCES = kd_tree_time.cpp
-kd_tree_time_DEPENDENCIES = $(kd_tree_time_LDADD)
-
-kd_tree_test_SOURCES = kd_tree_test.cpp
-
-bsp_tree_test_SOURCES = bsp_tree_test.cpp
-
-file_options_test_SOURCES = TestUtil.hpp FileOptions.cpp 
-file_options_test_CPPFLAGS = -DTEST
-file_options_test_LDADD = 
-
-var_len_test_SOURCES = TestUtil.hpp VarLenTagTest.cpp
-var_len_test_no_template_SOURCES = $(var_len_test_SOURCES)
-var_len_test_no_template_CPPFLAGS = -UTEMPLATE_SPECIALIZATION
-
-tag_test_SOURCES = TestUtil.hpp TagTest.cpp
-tag_test_DEPENDENCIES = $(tag_test_LDADD)
-
-cub_file_test_SOURCES = TestUtil.hpp cub_file_test.cc
-cub_file_test_DEPENDENCIES = $(tag_test_LDADD)
-
-exodus_test_SOURCES = TestUtil.hpp exodus_test.cc
-exodus_test_DEPENDENCIES = $(tag_test_LDADD)
-
-gmsh_test_SOURCES = TestUtil.hpp gmsh_test.cc
-gmsh_test_DEPENDENCIES = $(tag_test_LDADD)
-
-nastran_test_SOURCES = TestUtil.hpp nastran_test.cc
-nastran_test_DEPENDENCIES = $(tag_test_LDADD)
-
-stl_test_SOURCES = TestUtil.hpp stl_test.cc
-stl_test_DEPENDENCIES = $(tag_test_LDADD)
-
-mbcn_test_SOURCES = MBCN.hpp MBCN.cpp mbcn_test.cc
-mbcn_test_CPPFLAGS = -DSRCDIR=$(srcdir)  # define anything to work around build issue
-mbcn_test_LDADD = 
-
-bsp_tree_poly_test_SOURCES = bsp_tree_poly_test.cpp
-
-# Other files to clean up (e.g. output from tests)
-DISTCLEANFILES = MBCN_FCDefs.h
-MOSTLYCLEANFILES = dumped_acis.sat tree.h5m moab.config
-
-test/mb_big_test.g: $(top_srcdir)/test/mb_big_test.g.gz
-	$(ZCAT) $(top_srcdir)/test/mb_big_test.g.gz > test/mb_big_test.g
-
-test/cell1.gen: $(top_srcdir)/test/cell1.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell1.gen.gz > test/cell1.gen
-
-test/cell2.gen: $(top_srcdir)/test/cell2.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell2.gen.gz > test/cell2.gen
-
-
-# Utility target: build but don't run tests
-build-check:
-	$(MAKE) 'TESTS_ENVIRONMENT=: ' check
+EXTRA_DIST = mkprotos.sh

Modified: MOAB/trunk/itaps/igeom/Makefile.am
===================================================================
--- MOAB/trunk/itaps/igeom/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/itaps/igeom/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,10 +1,14 @@
-AUTOMAKE_OPTIONS = foreign
 BUILT_SOURCES = iGeom_protos.h
 
-IMESH_DIR = $(top_srcdir)/tools/iMesh
-INCLUDES = -I$(top_srcdir) -I$(top_builddir) -I. -I$(IMESH_DIR)
+AM_CPPFLAGS = -DSRCDIR=$(srcdir) \
+              -I$(top_srcdir)/src \
+              -I$(top_builddir)/src \
+              -I$(top_srcdir)/src/moab \
+              -I$(top_builddir)/src/moab \
+              -I. -I$(srcdir)/.. \
+              -I$(top_srcdir)/itaps/imesh \
+              -I$(top_builddir)/itaps/imesh 
 
-DEFS += $(DEFINES) -DSRCDIR=$(srcdir)
 
 lib_LTLIBRARIES = libiGeomMOAB.la
 
@@ -13,6 +17,7 @@
 #libiGeomMOAB_la_LIBADD = $(top_builddir)/libMOAB.la
 
 libiGeomMOAB_la_SOURCES = \
+        iGeom_MOAB.hpp \
 	iGeom_MOAB.cpp 
 
 libiGeomMOAB_la_include_HEADERS = \
@@ -20,14 +25,18 @@
 	iGeom.h \
 	iGeom_protos.h \
 	iBase_f.h \
-	iGeom_f.h \
-	iGeom_FCDefs.h
+	iGeom_f.h
 
 # stuff for test program
 check_PROGRAMS = testgeom
 testgeom_SOURCES = testgeom.cc
-testgeom_DEPENDENCIES = libiGeomMOAB.la $(IMESH_DIR)/libiMesh.la $(top_builddir)/libMOAB.la
-testgeom_LDADD = libiGeomMOAB.la $(IMESH_DIR)/libiMesh.la $(top_builddir)/libMOAB.la ${MOAB_CXX_LINKFLAGS} ${MOAB_CXX_LIBS}
+testgeom_DEPENDENCIES = libiGeomMOAB.la \
+                        $(top_builddir)/itaps/imesh/libiMesh.la \
+                        $(top_builddir)/src/libMOAB.la 
+testgeom_LDADD = libiGeomMOAB.la \
+                 $(top_builddir)/itaps/imesh/libiMesh.la \
+                 $(top_builddir)/src/libMOAB.la \
+                 ${MOAB_CXX_LINKFLAGS} ${MOAB_CXX_LIBS}
 
 # Automake doesn't seem to have a directory defined for
 # platform-dependent data (or include) files. So put 
@@ -49,5 +58,5 @@
 	echo "MOAB_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
 	echo "IGEOM_LIBS=-L${libdir} -liGeomMOAB" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
 
-iGeom_protos.h: iGeom.h $(top_srcdir)/tools/iMesh/mkprotos.sh Makefile.am
-	$(top_srcdir)/tools/iMesh/mkprotos.sh iGeom MBCN $< $@ iGeom_FCDefs.h
+iGeom_protos.h: iGeom.h $(top_srcdir)/itaps/mkprotos.sh Makefile.am
+	$(top_srcdir)/itaps/mkprotos.sh iGeom MOAB $< $@ MOAB_FCDefs.h

Modified: MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -7,6 +7,8 @@
 #include "MBOrientedBox.hpp"
 #include "MBOrientedBoxTreeTool.hpp"
 #include "MBCartVect.hpp"
+#include <stdlib.h>
+#include <cstring>
 
 iBase_Error iGeom_LAST_ERROR;
 bool i_created = false; // if interface is created

Modified: MOAB/trunk/itaps/imesh/Makefile.am
===================================================================
--- MOAB/trunk/itaps/imesh/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/itaps/imesh/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,39 +1,30 @@
-AUTOMAKE_OPTIONS = foreign
 BUILT_SOURCES = iMesh_protos.h iMeshP_protos.h iMesh_extensions_protos.h
 
-if USE_BABEL
-  babel_DIR = SIDL
-else
-  babel_DIR = 
-endif
+AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
+               -I$(srcdir)/.. \
+               -I$(top_srcdir)/src \
+               -I$(top_builddir)/src \
+               -I$(top_srcdir)/src/moab \
+               -I$(top_builddir)/src/moab 
 
-SUBDIRS = . $(babel_DIR) $(pytaps_DIR)
-
-INCLUDES = -I$(top_srcdir) -I$(top_builddir) -I.
-
-DEFS += $(DEFINES) -DSRCDIR=$(srcdir)
-
 # stuff for c test program
 check_PROGRAMS = testc_cbind
-EXTRA_DIST = brick.vtk quad9.cub mkprotos.sh
+EXTRA_DIST = brick.vtk quad9.cub
 
 libiMesh_la_SOURCES = \
 	iMesh_MOAB.cpp \
 	iMesh_MOAB.hpp
 
 libiMesh_la_include_HEADERS = iMesh.h \
-                             iMesh_extensions.h \
-                             iMesh_extensions_protos.h \
-                             iMesh_f.h \
-                             iMesh_protos.h \
-                             iMesh_FCDefs.h \
-                             iBase.h \
-                             iBase_f.h 
+                              iMesh_extensions.h \
+                              iMesh_extensions_protos.h \
+                              iMesh_f.h \
+                              iMesh_protos.h
 
 if PARALLEL
   libiMesh_la_SOURCES += iMeshP_MOAB.cpp
   libiMesh_la_include_HEADERS += iMeshP.h iMeshP_f.h iMeshP_protos.h
-  INCLUDES += -I$(top_srcdir)/parallel
+  AM_CPPFLAGS += -I$(top_srcdir)/src/parallel -I$(top_srcdir)/src/parallel/moab
 
   check_PROGRAMS += partest # iMeshP_unit_tests
 
@@ -43,8 +34,8 @@
 endif
 
 TESTS = $(check_PROGRAMS)
-LDADD = libiMesh.la $(top_builddir)/libMOAB.la ${MOAB_CXX_LINKFLAGS} ${MOAB_CXX_LIBS}
-TESTDEPS = libiMesh.la $(top_builddir)/libMOAB.la
+LDADD = libiMesh.la $(top_builddir)/src/libMOAB.la ${MOAB_CXX_LINKFLAGS} ${MOAB_CXX_LIBS}
+TESTDEPS = libiMesh.la $(top_builddir)/src/libMOAB.la
 
 testc_cbind_SOURCES = testc_cbind.c
 testc_cbind_DEPENDENCIES = $(TESTDEPS)
@@ -57,7 +48,7 @@
 
 libiMesh_la_includedir = $(includedir)
 
-libiMesh_la_LIBADD = $(top_builddir)/libMOAB.la
+libiMesh_la_LIBADD = $(top_builddir)/src/libMOAB.la
 
 # Automake doesn't seem to have a directory defined for
 # platform-dependent data (or include) files. So put 
@@ -78,11 +69,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 Makefile.am
-	$(srcdir)/mkprotos.sh iMesh MBCN $< $@ iMesh_FCDefs.h
+iMesh_protos.h: iMesh.h ../mkprotos.sh Makefile.am
+	$(srcdir)/../mkprotos.sh iMesh MOAB $< $@ MOAB_FCDefs.h
 
-iMesh_extensions_protos.h: iMesh_extensions.h mkprotos.sh
-	$(srcdir)/mkprotos.sh iMesh MBCN $< $@ iMesh_FCDefs.h
+iMesh_extensions_protos.h: iMesh_extensions.h ../mkprotos.sh
+	$(srcdir)/../mkprotos.sh iMesh MOAB $< $@ MOAB_FCDefs.h
 
-iMeshP_protos.h: iMeshP.h mkprotos.sh
-	$(srcdir)/mkprotos.sh iMeshP MBCN $< $@ iMesh_FCDefs.h
+iMeshP_protos.h: iMeshP.h ../mkprotos.sh
+	$(srcdir)/../mkprotos.sh iMeshP MOAB $< $@ MOAB_FCDefs.h

Modified: MOAB/trunk/moab.make.in
===================================================================
--- MOAB/trunk/moab.make.in	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/moab.make.in	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,5 +1,5 @@
-MOAB_LIBDIR = @abs_builddir@/.libs
-MOAB_INCLUDEDIR = @abs_srcdir@ -I at abs_builddir@
+MOAB_LIBDIR = @abs_builddir@/src/.libs
+MOAB_INCLUDEDIR = @abs_srcdir/src@ -I at abs_builddir/src@
 
 MOAB_CXXFLAGS = @CXXFLAGS@ @AM_CXXFLAGS@
 MOAB_CFLAGS = @CFLAGS@ @AM_CFLAGS@

Modified: MOAB/trunk/src/MBBSPTree.cpp
===================================================================
--- MOAB/trunk/src/MBBSPTree.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/MBBSPTree.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -25,6 +25,7 @@
 #include "BSPTreePoly.hpp"
 
 #include <assert.h>
+#include <string.h>
 #include <algorithm>
 #include <limits>
 

Modified: MOAB/trunk/src/Makefile.am
===================================================================
--- MOAB/trunk/src/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,129 +1,33 @@
-# Don't require GNU-standard files (Changelog, README, etc.)
-AUTOMAKE_OPTIONS = foreign
-LDADD = $(top_builddir)/libMOAB.la
+# Things to build
+lib_LTLIBRARIES = libMOAB.la 
 
-# Don't loose the autoconf include path
-ACLOCAL_AMFLAGS = -I m4
-
 # Subdirectories to build
 SUBDIRS = 
-if HDF5_FILE
-  SUBDIRS += mhdf
-endif
+libMOAB_la_LIBADD = io/libmoabio.la
 if PARALLEL
   SUBDIRS += parallel
+  libMOAB_la_LIBADD += parallel/libMOABpar.la
+  AM_CPPFLAGS += -I$(srcdir)/parallel
 endif
-SUBDIRS += . test tools doc doxygen 
+SUBDIRS += io .
 
 BUILT_SOURCES = MBCN_protos.h
 
-# Things to build
-lib_LTLIBRARIES = libMOAB.la 
-
-TESTS = moab_test \
-        homxform_test \
-        scdseq_test \
-        tqdcfr \
-        test_adj \
-        seq_man_test \
-        geom_util_test \
-        xform_test \
-        obb_test \
-	vtk_test \
-	adaptive_kd_tree_tests \
-	bsp_tree_test \
-	file_options_test \
-        kd_tree_test \
-        var_len_test var_len_test_no_template \
-	tag_test \
-	mesh_set_test \
-	cub_file_test \
-	exodus_test \
-        gmsh_test \
-	nastran_test \
-        stl_test \
-        mbcn_test \
-        bsp_tree_poly_test
-#                 merge_test \         # input files no longer exist?
-#                 test_tag_server \    # fails
-
-check_PROGRAMS = $(TESTS) \
-		 kd_tree_tool \
-		 kd_tree_time
-
-#noinst_PROGRAMS = scdseq_timing
-
-
 # Some variables
-DEFS = $(DEFINES) -DIS_BUILDING_MB
-INCLUDES += -I$(top_builddir) 
+AM_CPPFLAGS += -DIS_BUILDING_MB \
+               -I$(builddir) \
+               -I$(srcdir)/io \
+               -I$(srcdir)/io/moab \
+               -I$(srcdir)/io/mhdf/include \
+               -I$(builddir)/moab \
+               -I$(srcdir)/moab \
+               -I$(srcdir)/parallel/moab \
+               -I$(builddir)/parallel/moab
 
 # The directory in which to install headers
 libMOAB_la_includedir = $(includedir)
 
 
-
-# Conditional sources
-MOAB_EXTRA_SRCS =
-MOAB_EXTRA_HDRS =
-
-if NETCDF_FILE
-  MOAB_EXTRA_SRCS +=  ReadNCDF.cpp  ReadNCDF.hpp \
-                     WriteNCDF.cpp WriteNCDF.hpp \
-                     WriteSLAC.cpp WriteSLAC.hpp 
-endif
-libMOAB_la_LIBADD = $(NETCDF_LIBS) $(HDF5_LIBS) 
-if HDF5_FILE
-  libMOAB_la_LIBADD += $(top_builddir)/mhdf/libmhdf.la
-  INCLUDES += -I$(srcdir)/mhdf/include
-  MOAB_EXTRA_SRCS += ReadHDF5.cpp ReadHDF5.hpp WriteHDF5.cpp WriteHDF5.hpp
-endif
-if CCMIO_FILE
-  MOAB_EXTRA_SRCS += WriteCCMIO.cpp WriteCCMIO.hpp ReadCCMIO.cpp ReadCCMIO.hpp
-  libMOAB_la_LIBADD += $(CCMIO_LIBS)
-endif
-
-if PARALLEL
-  libMOAB_la_LIBADD += $(top_builddir)/parallel/libMOABpar.la
-  INCLUDES += -I$(srcdir)/parallel
-endif
-
-if HAVE_CGM
-  CPPFLAGS += @CGM_CPPFLAGS@ -DCGM @MOAB_CGM_DEFINES@
-  MOAB_EXTRA_SRCS +=  ReadCGM.cpp  ReadCGM.hpp
-  libMOAB_la_LIBADD += @CGM_LIBS@
-endif
-
-
-# Automake doesn't seem to have a directory defined for
-# platform-dependent data (or include) files. So put 
-# in $(libdir).  Define a $(cfgdir) to get around automake's
-# check that only libraries are going in $(libdir)
-cfgdir = $(libdir)
-cfg_DATA = moab.make moab.config
-
-# By default, moab.make will define these to $(srcdir).  We
-# want to override that during the INSTALL of the file so
-# that the correct values are set (e.g. if someone does 
-# 'make prefix=/foo install', we don't know the correct install
-# directory until we're doing the install.
-install-data-hook:
-	echo "MOAB_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/moab.make
-	echo "MOAB_INCLUDEDIR=${includedir}" >> $(DESTDIR)$(cfgdir)/moab.make
-
-
-# Generate a file to be installed in $libdir containing the configuration
-# options used for this MOAB build.
-# Note: If you modify this, verify that it works correctly for option
-#       values containing spaces.
-# First line: get unformatted data from config.status
-# Second line: extract just the list of options
-# Third line: put individual options on separate lines
-moab.config: config.status Makefile.am
-	./config.status --version | \
-	  sed -e 's/.*options "\(.*\)"/\1/p' -e 'd' | \
-	  sed -e "s/'[[:space:]]'/'\n'/g" >$@
-
 # The list of source files, and any header files that do not need to be installed
 libMOAB_la_SOURCES = \
   AEntityFactory.cpp \
@@ -134,38 +38,31 @@
   ElementSequence.hpp \
   EntitySequence.cpp \
   EntitySequence.hpp \
-  exodus_order.h \
-  ExoIIUtil.cpp \
-  ExoIIUtil.hpp \
   FileOptions.cpp \
   FileOptions.hpp \
-  FileTokenizer.cpp \
-  FileTokenizer.hpp \
   GeomTopoTool.cpp \
-  GmshUtil.cpp \
-  GmshUtil.hpp \
   HigherOrderFactory.cpp \
   HomXform.cpp \
   MBAdaptiveKDTree.cpp \
   MBAffineXform.cpp \
   MBAffineXform.hpp \
-  MBAlloc.cpp \
-  MBAlloc.hpp \
   MBAxisBox.cpp \
   MBAxisBox.hpp \
   MBBSPTree.cpp \
   MBCN.cpp \
   MBCNArrays.hpp \
   MBCartVect.cpp \
+  MBCartVect.hpp \
   MBMatrix3.cpp \
+  MBMatrix3.hpp \
   MBCore.cpp \
   MBFactory.cpp \
   MBGeomUtil.cpp \
   MBInternals.hpp \
-  MBMem.hpp \
   MBMeshSet.cpp \
   MBMeshSet.hpp \
   MBOrientedBox.cpp \
+  MBOrientedBox.hpp \
   MBOrientedBoxTreeTool.cpp \
   BSPTreePoly.cpp \
   MBRange.cpp \
@@ -183,32 +80,8 @@
   MeshSetSequence.cpp \
   MeshSetSequence.hpp \
   MeshTopoUtil.cpp \
-  patran_order.h \
   PolyElementSeq.cpp \
   PolyElementSeq.hpp \
-  RangeMap.hpp \
-  ReadGmsh.cpp \
-  ReadGmsh.hpp \
-  ReadSms.hpp \
-  ReadSms.cpp \
-  ReadSTL.cpp \
-  ReadSTL.hpp \
-  ReadVtk.cpp \
-  ReadVtk.hpp \
-  ReadSmf.hpp \
-  ReadSmf.cpp \
-  SMF_State.cpp \
-  SMF_State.hpp \
-  ReadIDEAS.cpp \
-  ReadIDEAS.hpp \
-  ReadMCNP5.cpp \
-  ReadMCNP5.hpp \
-  ReadNASTRAN.cpp \
-  ReadNASTRAN.hpp \
-  ReadABAQUS.cpp \
-  ReadABAQUS.hpp \
-  ReadTetGen.cpp \
-  ReadTetGen.hpp \
   ScdElementData.cpp \
   ScdElementData.hpp \
   ScdVertexData.cpp \
@@ -234,194 +107,54 @@
   TagInfo.hpp \
   TagServer.cpp \
   TagServer.hpp \
-  Tqdcfr.cpp \
-  Tqdcfr.hpp \
   TypeSequenceManager.cpp \
   TypeSequenceManager.hpp \
   UnstructuredElemSeq.cpp \
   UnstructuredElemSeq.hpp \
   VarLenTag.hpp \
   VertexSequence.hpp \
-  VertexSequence.cpp \
-  VtkUtil.cpp \
-  VtkUtil.hpp \
-  WriteAns.cpp \
-  WriteAns.hpp \
-  WriteGMV.cpp \
-  WriteGMV.hpp \
-  WriteGmsh.cpp \
-  WriteGmsh.hpp \
-  WriteSTL.cpp \
-  WriteSTL.hpp \
-  WriteTemplate.cpp \
-  WriteVtk.cpp \
-  WriteVtk.hpp \
-  WriteSmf.cpp \
-  WriteSmf.hpp \
-  $(MOAB_EXTRA_SRCS)
+  VertexSequence.cpp 
 
-#  MBMem.cpp
-
 # The list of header files which are to be installed
-libMOAB_la_include_HEADERS = \
-  DualTool.hpp \
-  ExoIIInterface.hpp \
-  GeomTopoTool.hpp \
-  HigherOrderFactory.hpp \
-  HomXform.hpp \
-  MBAdaptiveKDTree.hpp \
-  MBBSPTree.hpp \
-  MBCN.hpp \
+nobase_libMOAB_la_include_HEADERS = \
+  moab/DualTool.hpp \
+  moab/GeomTopoTool.hpp \
+  moab/HigherOrderFactory.hpp \
+  moab/HomXform.hpp \
+  moab/MBAdaptiveKDTree.hpp \
+  moab/MBBSPTree.hpp \
+  moab/MBCN.hpp \
+  moab/MBCore.hpp \
+  moab/MBEntityType.h \
+  moab/MBEntityHandle.h \
+  moab/MBError.hpp \
+  moab/MBForward.hpp \
+  moab/MBGeomUtil.hpp \
+  moab/MBInterface.hpp \
+  moab/MBOrientedBoxTreeTool.hpp \
+  moab/BSPTreePoly.hpp \
+  moab/MBRange.hpp \
+  moab/MBReadUtilIface.hpp \
+  moab/MBReaderIface.hpp \
+  moab/MBReaderWriterSet.hpp \
+  moab/MBSkinner.hpp \
+  moab/MBTagConventions.hpp \
+  moab/MBTypes.h \
+  moab/MBUnknownInterface.hpp \
+  moab/MBUtil.hpp \
+  moab/MBWriteUtilIface.hpp \
+  moab/MBWriterIface.hpp \
+  moab/MeshTopoUtil.hpp \
+  moab/RangeMap.hpp \
   MBCN.h \
-  MBCN_FCDefs.h \
-  MBCN_protos.h \
-  MBCartVect.hpp \
-  MBCore.hpp \
-  MBEntityType.h \
-  MBEntityHandle.h \
-  MBError.hpp \
-  MBForward.hpp \
-  MBGeomUtil.hpp \
-  MBInterface.hpp \
-  MBMatrix3.hpp \
-  MBOrientedBox.hpp \
-  MBOrientedBoxTreeTool.hpp \
-  MBParallelConventions.h \
-  BSPTreePoly.hpp \
-  MBRange.hpp \
-  MBReadUtilIface.hpp \
-  MBReaderIface.hpp \
-  MBReaderWriterSet.hpp \
-  MBSkinner.hpp \
-  MBTagConventions.hpp \
-  MBTypes.h \
-  MBUnknownInterface.hpp \
-  MBUtil.hpp \
-  MBWriteUtilIface.hpp \
-  MBWriterIface.hpp \
-  MeshTopoUtil.hpp \
-  WriteTemplate.hpp \
-  $(MOAB_EXTRA_HDRS)
+  MOAB_FCDefs.h \
+  MBCN_protos.h 
 
-MBCN_protos.h: MBCN.h tools/iMesh/mkprotos.sh
-	$(srcdir)/tools/iMesh/mkprotos.sh MBCN MBCN $< $@ MBCN_FCDefs.h
+MBCN_protos.h: MBCN.h $(top_srcdir)/itaps/mkprotos.sh
+	$(top_srcdir)/itaps/mkprotos.sh MBCN MBCN $< $@ MOAB_FCDefs.h
 
-MBCN_FCDefs.h: iBase_FCDefs.h
-	./config.status MBCN_FCDefs.h
 
-CPPFLAGS += -DSRCDIR=$(srcdir)
+MOAB_FCDefs.h: FCDefs.h
+	cd .. && ./config.status src/MOAB_FCDefs.h
 
-# Tests and such
-
-moab_test_SOURCES = MBTest.cpp
-moab_test_DEPENDENCIES = test/mb_big_test.g test/cell1.gen test/cell2.gen $(top_builddir)/libMOAB.la
-
-homxform_test_SOURCES = HomXform.cpp
-homxform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-homxform_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-scdseq_test_SOURCES = scdseq_test.cpp
-scdseq_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#scdseq_timing_SOURCES = scdseq_timing.cpp
-#scdseq_timing_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-tqdcfr_SOURCES = Tqdcfr.cpp
-tqdcfr_CXXFLAGS = -DTEST_TQDCFR $(CXXFLAGS)
-tqdcfr_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_rms_SOURCES = test_rms.cpp
-#test_rms_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#merge_test_SOURCES = merge_test.cpp
-#merge_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_exo_SOURCES = test_exo.cpp
-#test_exo_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_tag_server_SOURCES = TagServer.cpp
-#test_tag_server_CXXFLAGS = -DTEST $(CXXFLAGS)
-#test_tag_server_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-test_adj_SOURCES = test_adj.cpp
-test_adj_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-seq_man_test_SOURCES = TestUtil.hpp TestTypeSequenceManager.cpp 
-
-mesh_set_test_SOURCES = Test_MBMeshSet.cpp TestUtil.hpp
-
-geom_util_test_SOURCES = TestUtil.hpp GeomUtilTests.cpp 
-geom_util_test_DEPENDENCIES = $(geom_util_test_LDADD)
-
-xform_test_SOURCES = MBAffineXform.cpp
-xform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-xform_test_DEPENDENCIES = $(xform_test_LDADD)
-
-obb_test_SOURCES = OBBTest.cpp
-obb_test_DEPENDENCIES = $(obb_test_LDADD)
-
-vtk_test_SOURCES = TestUtil.hpp VtkTest.cpp
-vtk_test_DEPENDENCIES = $(vtk_test_LDADD)
-
-adaptive_kd_tree_tests_SOURCES = adaptive_kd_tree_tests.cpp
-adaptive_kd_tree_tests_DEPENDENCIES = $(adaptive_kd_tree_tests_LDADD)
-
-kd_tree_tool_SOURCES = kd_tree_tool.cpp
-kd_tree_tool_DEPENDENCIES = $(kd_tree_tool_LDADD)
-
-kd_tree_time_SOURCES = kd_tree_time.cpp
-kd_tree_time_DEPENDENCIES = $(kd_tree_time_LDADD)
-
-kd_tree_test_SOURCES = kd_tree_test.cpp
-
-bsp_tree_test_SOURCES = bsp_tree_test.cpp
-
-file_options_test_SOURCES = TestUtil.hpp FileOptions.cpp 
-file_options_test_CPPFLAGS = -DTEST
-file_options_test_LDADD = 
-
-var_len_test_SOURCES = TestUtil.hpp VarLenTagTest.cpp
-var_len_test_no_template_SOURCES = $(var_len_test_SOURCES)
-var_len_test_no_template_CPPFLAGS = -UTEMPLATE_SPECIALIZATION
-
-tag_test_SOURCES = TestUtil.hpp TagTest.cpp
-tag_test_DEPENDENCIES = $(tag_test_LDADD)
-
-cub_file_test_SOURCES = TestUtil.hpp cub_file_test.cc
-cub_file_test_DEPENDENCIES = $(tag_test_LDADD)
-
-exodus_test_SOURCES = TestUtil.hpp exodus_test.cc
-exodus_test_DEPENDENCIES = $(tag_test_LDADD)
-
-gmsh_test_SOURCES = TestUtil.hpp gmsh_test.cc
-gmsh_test_DEPENDENCIES = $(tag_test_LDADD)
-
-nastran_test_SOURCES = TestUtil.hpp nastran_test.cc
-nastran_test_DEPENDENCIES = $(tag_test_LDADD)
-
-stl_test_SOURCES = TestUtil.hpp stl_test.cc
-stl_test_DEPENDENCIES = $(tag_test_LDADD)
-
-mbcn_test_SOURCES = MBCN.hpp MBCN.cpp mbcn_test.cc
-mbcn_test_CPPFLAGS = -DSRCDIR=$(srcdir)  # define anything to work around build issue
-mbcn_test_LDADD = 
-
-bsp_tree_poly_test_SOURCES = bsp_tree_poly_test.cpp
-
-# Other files to clean up (e.g. output from tests)
-DISTCLEANFILES = MBCN_FCDefs.h
-MOSTLYCLEANFILES = dumped_acis.sat tree.h5m moab.config
-
-test/mb_big_test.g: $(top_srcdir)/test/mb_big_test.g.gz
-	$(ZCAT) $(top_srcdir)/test/mb_big_test.g.gz > test/mb_big_test.g
-
-test/cell1.gen: $(top_srcdir)/test/cell1.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell1.gen.gz > test/cell1.gen
-
-test/cell2.gen: $(top_srcdir)/test/cell2.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell2.gen.gz > test/cell2.gen
-
-
-# Utility target: build but don't run tests
-build-check:
-	$(MAKE) 'TESTS_ENVIRONMENT=: ' check
+MOSTLYCLEANFILES = MOAB_FCDefs.h

Modified: MOAB/trunk/src/io/ExoIIUtil.cpp
===================================================================
--- MOAB/trunk/src/io/ExoIIUtil.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/io/ExoIIUtil.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -17,6 +17,7 @@
 #include "MBInternals.hpp"
 #include "MBInterface.hpp"
 #include "MBCN.hpp"
+#include <string.h>
 
 //
 // definitions of ExoII-related static arrays

Modified: MOAB/trunk/src/io/Makefile.am
===================================================================
--- MOAB/trunk/src/io/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/io/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,192 +1,58 @@
-# Don't require GNU-standard files (Changelog, README, etc.)
-AUTOMAKE_OPTIONS = foreign
-LDADD = $(top_builddir)/libMOAB.la
-
-# Don't loose the autoconf include path
-ACLOCAL_AMFLAGS = -I m4
-
 # Subdirectories to build
-SUBDIRS = 
 if HDF5_FILE
-  SUBDIRS += mhdf
+  SUBDIRS = mhdf .
+else
+  SUBDIRS = .
 endif
-if PARALLEL
-  SUBDIRS += parallel
-endif
-SUBDIRS += . test tools doc doxygen 
 
-BUILT_SOURCES = MBCN_protos.h
-
 # Things to build
-lib_LTLIBRARIES = libMOAB.la 
+noinst_LTLIBRARIES = libmoabio.la 
+libmoabio_la_LIBADD = $(NETCDF_LIBS) $(HDF5_LIBS) 
 
-TESTS = moab_test \
-        homxform_test \
-        scdseq_test \
-        tqdcfr \
-        test_adj \
-        seq_man_test \
-        geom_util_test \
-        xform_test \
-        obb_test \
-	vtk_test \
-	adaptive_kd_tree_tests \
-	bsp_tree_test \
-	file_options_test \
-        kd_tree_test \
-        var_len_test var_len_test_no_template \
-	tag_test \
-	mesh_set_test \
-	cub_file_test \
-	exodus_test \
-        gmsh_test \
-	nastran_test \
-        stl_test \
-        mbcn_test \
-        bsp_tree_poly_test
-#                 merge_test \         # input files no longer exist?
-#                 test_tag_server \    # fails
+AM_CPPFLAGS += -DIS_BUILDING_MB \
+               -I..  -I$(srcdir)/.. -I$(srcdir)/../parallel \
+               -I../moab -I$(srcdir)/../moab -I$(srcdir)/../parallel/moab -I$(srcdir)/moab
 
-check_PROGRAMS = $(TESTS) \
-		 kd_tree_tool \
-		 kd_tree_time
-
-#noinst_PROGRAMS = scdseq_timing
-
-
-# Some variables
-DEFS = $(DEFINES) -DIS_BUILDING_MB
-INCLUDES += -I$(top_builddir) 
-
-# The directory in which to install headers
-libMOAB_la_includedir = $(includedir)
-
-
-
-# Conditional sources
-MOAB_EXTRA_SRCS =
-MOAB_EXTRA_HDRS =
-
 if NETCDF_FILE
-  MOAB_EXTRA_SRCS +=  ReadNCDF.cpp  ReadNCDF.hpp \
+  MOAB_NETCDF_SRCS = ReadNCDF.cpp  ReadNCDF.hpp \
                      WriteNCDF.cpp WriteNCDF.hpp \
                      WriteSLAC.cpp WriteSLAC.hpp 
+else
+  MOAB_NETCDF_SRCS =
 endif
-libMOAB_la_LIBADD = $(NETCDF_LIBS) $(HDF5_LIBS) 
+
 if HDF5_FILE
-  libMOAB_la_LIBADD += $(top_builddir)/mhdf/libmhdf.la
-  INCLUDES += -I$(srcdir)/mhdf/include
-  MOAB_EXTRA_SRCS += ReadHDF5.cpp ReadHDF5.hpp WriteHDF5.cpp WriteHDF5.hpp
+  libmoabio_la_LIBADD += mhdf/libmhdf.la
+  MOAB_HDF5_SRCS = ReadHDF5.cpp ReadHDF5.hpp WriteHDF5.cpp WriteHDF5.hpp
+  AM_CPPFLAGS += -I$(srcdir)/mhdf/include
+else
+  MOAB_HDF5_SRCS = 
 endif
 if CCMIO_FILE
-  MOAB_EXTRA_SRCS += WriteCCMIO.cpp WriteCCMIO.hpp ReadCCMIO.cpp ReadCCMIO.hpp
-  libMOAB_la_LIBADD += $(CCMIO_LIBS)
+  MOAB_CCMIO_SRCS = WriteCCMIO.cpp WriteCCMIO.hpp ReadCCMIO.cpp ReadCCMIO.hpp
+  libmoabio_la_LIBADD += $(CCMIO_LIBS)
+else
+  MOAB_CCMIO_SRCS = 
 endif
 
-if PARALLEL
-  libMOAB_la_LIBADD += $(top_builddir)/parallel/libMOABpar.la
-  INCLUDES += -I$(srcdir)/parallel
-endif
-
 if HAVE_CGM
-  CPPFLAGS += @CGM_CPPFLAGS@ -DCGM @MOAB_CGM_DEFINES@
-  MOAB_EXTRA_SRCS +=  ReadCGM.cpp  ReadCGM.hpp
-  libMOAB_la_LIBADD += @CGM_LIBS@
+  AM_CPPFLAGS += @CGM_CPPFLAGS@ -DCGM @MOAB_CGM_DEFINES@
+  MOAB_CGM_SRCS =  ReadCGM.cpp  ReadCGM.hpp
+  libmoabio_la_LIBADD += @CGM_LIBS@
+else
+  MOAB_CGM_SRCS = 
 endif
 
-
-# Automake doesn't seem to have a directory defined for
-# platform-dependent data (or include) files. So put 
-# in $(libdir).  Define a $(cfgdir) to get around automake's
-# check that only libraries are going in $(libdir)
-cfgdir = $(libdir)
-cfg_DATA = moab.make moab.config
-
-# By default, moab.make will define these to $(srcdir).  We
-# want to override that during the INSTALL of the file so
-# that the correct values are set (e.g. if someone does 
-# 'make prefix=/foo install', we don't know the correct install
-# directory until we're doing the install.
-install-data-hook:
-	echo "MOAB_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/moab.make
-	echo "MOAB_INCLUDEDIR=${includedir}" >> $(DESTDIR)$(cfgdir)/moab.make
-
-
-# Generate a file to be installed in $libdir containing the configuration
-# options used for this MOAB build.
-# Note: If you modify this, verify that it works correctly for option
-#       values containing spaces.
-# First line: get unformatted data from config.status
-# Second line: extract just the list of options
-# Third line: put individual options on separate lines
-moab.config: config.status Makefile.am
-	./config.status --version | \
-	  sed -e 's/.*options "\(.*\)"/\1/p' -e 'd' | \
-	  sed -e "s/'[[:space:]]'/'\n'/g" >$@
-
 # The list of source files, and any header files that do not need to be installed
-libMOAB_la_SOURCES = \
-  AEntityFactory.cpp \
-  AEntityFactory.hpp \
-  BitTagServer.cpp \
-  BitTagServer.hpp \
-  DualTool.cpp \
-  ElementSequence.hpp \
-  EntitySequence.cpp \
-  EntitySequence.hpp \
+libmoabio_la_SOURCES = \
   exodus_order.h \
+  patran_order.h \
   ExoIIUtil.cpp \
   ExoIIUtil.hpp \
-  FileOptions.cpp \
-  FileOptions.hpp \
   FileTokenizer.cpp \
   FileTokenizer.hpp \
-  GeomTopoTool.cpp \
   GmshUtil.cpp \
   GmshUtil.hpp \
-  HigherOrderFactory.cpp \
-  HomXform.cpp \
-  MBAdaptiveKDTree.cpp \
-  MBAffineXform.cpp \
-  MBAffineXform.hpp \
-  MBAlloc.cpp \
-  MBAlloc.hpp \
-  MBAxisBox.cpp \
-  MBAxisBox.hpp \
-  MBBSPTree.cpp \
-  MBCN.cpp \
-  MBCNArrays.hpp \
-  MBCartVect.cpp \
-  MBMatrix3.cpp \
-  MBCore.cpp \
-  MBFactory.cpp \
-  MBGeomUtil.cpp \
-  MBInternals.hpp \
-  MBMem.hpp \
-  MBMeshSet.cpp \
-  MBMeshSet.hpp \
-  MBOrientedBox.cpp \
-  MBOrientedBoxTreeTool.cpp \
-  BSPTreePoly.cpp \
-  MBRange.cpp \
-  MBRangeSeqIntersectIter.cpp \
-  MBRangeSeqIntersectIter.hpp \
-  MBReadUtil.cpp \
-  MBReadUtil.hpp \
-  MBReaderWriterSet.cpp \
-  MBSkinner.cpp \
-  MBSysUtil.cpp \
-  MBSysUtil.hpp \
-  MBUtil.cpp \
-  MBWriteUtil.cpp \
-  MBWriteUtil.hpp \
-  MeshSetSequence.cpp \
-  MeshSetSequence.hpp \
-  MeshTopoUtil.cpp \
-  patran_order.h \
-  PolyElementSeq.cpp \
-  PolyElementSeq.hpp \
-  RangeMap.hpp \
   ReadGmsh.cpp \
   ReadGmsh.hpp \
   ReadSms.hpp \
@@ -209,40 +75,8 @@
   ReadABAQUS.hpp \
   ReadTetGen.cpp \
   ReadTetGen.hpp \
-  ScdElementData.cpp \
-  ScdElementData.hpp \
-  ScdVertexData.cpp \
-  ScdVertexData.hpp \
-  SequenceData.hpp \
-  SequenceData.cpp \
-  SequenceManager.cpp \
-  SequenceManager.hpp \
-  SparseTagSuperCollection.cpp \
-  SparseTagSuperCollection.hpp \
-  SparseTagCollection.cpp \
-  SparseTagCollection.hpp \
-  StructuredElementSeq.cpp \
-  StructuredElementSeq.hpp \
-  SweptElementData.cpp \
-  SweptElementData.hpp \
-  SweptElementSeq.cpp \
-  SweptElementSeq.hpp \
-  SweptVertexData.cpp \
-  SweptVertexData.hpp \
-  TagCompare.hpp \
-  TagInfo.cpp \
-  TagInfo.hpp \
-  TagServer.cpp \
-  TagServer.hpp \
   Tqdcfr.cpp \
   Tqdcfr.hpp \
-  TypeSequenceManager.cpp \
-  TypeSequenceManager.hpp \
-  UnstructuredElemSeq.cpp \
-  UnstructuredElemSeq.hpp \
-  VarLenTag.hpp \
-  VertexSequence.hpp \
-  VertexSequence.cpp \
   VtkUtil.cpp \
   VtkUtil.hpp \
   WriteAns.cpp \
@@ -254,174 +88,17 @@
   WriteSTL.cpp \
   WriteSTL.hpp \
   WriteTemplate.cpp \
+  WriteTemplate.hpp \
   WriteVtk.cpp \
   WriteVtk.hpp \
   WriteSmf.cpp \
   WriteSmf.hpp \
-  $(MOAB_EXTRA_SRCS)
+  $(MOAB_NETCDF_SRCS) \
+  $(MOAB_HDF5_SRCS) \
+  $(MOAB_CCMIO_SRCS) \
+  $(MOAB_CGM_SRCS)
 
-#  MBMem.cpp
 
-# The list of header files which are to be installed
-libMOAB_la_include_HEADERS = \
-  DualTool.hpp \
-  ExoIIInterface.hpp \
-  GeomTopoTool.hpp \
-  HigherOrderFactory.hpp \
-  HomXform.hpp \
-  MBAdaptiveKDTree.hpp \
-  MBBSPTree.hpp \
-  MBCN.hpp \
-  MBCN.h \
-  MBCN_FCDefs.h \
-  MBCN_protos.h \
-  MBCartVect.hpp \
-  MBCore.hpp \
-  MBEntityType.h \
-  MBEntityHandle.h \
-  MBError.hpp \
-  MBForward.hpp \
-  MBGeomUtil.hpp \
-  MBInterface.hpp \
-  MBMatrix3.hpp \
-  MBOrientedBox.hpp \
-  MBOrientedBoxTreeTool.hpp \
-  MBParallelConventions.h \
-  BSPTreePoly.hpp \
-  MBRange.hpp \
-  MBReadUtilIface.hpp \
-  MBReaderIface.hpp \
-  MBReaderWriterSet.hpp \
-  MBSkinner.hpp \
-  MBTagConventions.hpp \
-  MBTypes.h \
-  MBUnknownInterface.hpp \
-  MBUtil.hpp \
-  MBWriteUtilIface.hpp \
-  MBWriterIface.hpp \
-  MeshTopoUtil.hpp \
-  WriteTemplate.hpp \
-  $(MOAB_EXTRA_HDRS)
+libmoabio_la_includedir = $(includedir)
+nobase_libmoabio_la_include_HEADERS = moab/ExoIIInterface.hpp
 
-MBCN_protos.h: MBCN.h tools/iMesh/mkprotos.sh
-	$(srcdir)/tools/iMesh/mkprotos.sh MBCN MBCN $< $@ MBCN_FCDefs.h
-
-MBCN_FCDefs.h: iBase_FCDefs.h
-	./config.status MBCN_FCDefs.h
-
-CPPFLAGS += -DSRCDIR=$(srcdir)
-
-# Tests and such
-
-moab_test_SOURCES = MBTest.cpp
-moab_test_DEPENDENCIES = test/mb_big_test.g test/cell1.gen test/cell2.gen $(top_builddir)/libMOAB.la
-
-homxform_test_SOURCES = HomXform.cpp
-homxform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-homxform_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-scdseq_test_SOURCES = scdseq_test.cpp
-scdseq_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#scdseq_timing_SOURCES = scdseq_timing.cpp
-#scdseq_timing_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-tqdcfr_SOURCES = Tqdcfr.cpp
-tqdcfr_CXXFLAGS = -DTEST_TQDCFR $(CXXFLAGS)
-tqdcfr_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_rms_SOURCES = test_rms.cpp
-#test_rms_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#merge_test_SOURCES = merge_test.cpp
-#merge_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_exo_SOURCES = test_exo.cpp
-#test_exo_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#test_tag_server_SOURCES = TagServer.cpp
-#test_tag_server_CXXFLAGS = -DTEST $(CXXFLAGS)
-#test_tag_server_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-test_adj_SOURCES = test_adj.cpp
-test_adj_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-seq_man_test_SOURCES = TestUtil.hpp TestTypeSequenceManager.cpp 
-
-mesh_set_test_SOURCES = Test_MBMeshSet.cpp TestUtil.hpp
-
-geom_util_test_SOURCES = TestUtil.hpp GeomUtilTests.cpp 
-geom_util_test_DEPENDENCIES = $(geom_util_test_LDADD)
-
-xform_test_SOURCES = MBAffineXform.cpp
-xform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-xform_test_DEPENDENCIES = $(xform_test_LDADD)
-
-obb_test_SOURCES = OBBTest.cpp
-obb_test_DEPENDENCIES = $(obb_test_LDADD)
-
-vtk_test_SOURCES = TestUtil.hpp VtkTest.cpp
-vtk_test_DEPENDENCIES = $(vtk_test_LDADD)
-
-adaptive_kd_tree_tests_SOURCES = adaptive_kd_tree_tests.cpp
-adaptive_kd_tree_tests_DEPENDENCIES = $(adaptive_kd_tree_tests_LDADD)
-
-kd_tree_tool_SOURCES = kd_tree_tool.cpp
-kd_tree_tool_DEPENDENCIES = $(kd_tree_tool_LDADD)
-
-kd_tree_time_SOURCES = kd_tree_time.cpp
-kd_tree_time_DEPENDENCIES = $(kd_tree_time_LDADD)
-
-kd_tree_test_SOURCES = kd_tree_test.cpp
-
-bsp_tree_test_SOURCES = bsp_tree_test.cpp
-
-file_options_test_SOURCES = TestUtil.hpp FileOptions.cpp 
-file_options_test_CPPFLAGS = -DTEST
-file_options_test_LDADD = 
-
-var_len_test_SOURCES = TestUtil.hpp VarLenTagTest.cpp
-var_len_test_no_template_SOURCES = $(var_len_test_SOURCES)
-var_len_test_no_template_CPPFLAGS = -UTEMPLATE_SPECIALIZATION
-
-tag_test_SOURCES = TestUtil.hpp TagTest.cpp
-tag_test_DEPENDENCIES = $(tag_test_LDADD)
-
-cub_file_test_SOURCES = TestUtil.hpp cub_file_test.cc
-cub_file_test_DEPENDENCIES = $(tag_test_LDADD)
-
-exodus_test_SOURCES = TestUtil.hpp exodus_test.cc
-exodus_test_DEPENDENCIES = $(tag_test_LDADD)
-
-gmsh_test_SOURCES = TestUtil.hpp gmsh_test.cc
-gmsh_test_DEPENDENCIES = $(tag_test_LDADD)
-
-nastran_test_SOURCES = TestUtil.hpp nastran_test.cc
-nastran_test_DEPENDENCIES = $(tag_test_LDADD)
-
-stl_test_SOURCES = TestUtil.hpp stl_test.cc
-stl_test_DEPENDENCIES = $(tag_test_LDADD)
-
-mbcn_test_SOURCES = MBCN.hpp MBCN.cpp mbcn_test.cc
-mbcn_test_CPPFLAGS = -DSRCDIR=$(srcdir)  # define anything to work around build issue
-mbcn_test_LDADD = 
-
-bsp_tree_poly_test_SOURCES = bsp_tree_poly_test.cpp
-
-# Other files to clean up (e.g. output from tests)
-DISTCLEANFILES = MBCN_FCDefs.h
-MOSTLYCLEANFILES = dumped_acis.sat tree.h5m moab.config
-
-test/mb_big_test.g: $(top_srcdir)/test/mb_big_test.g.gz
-	$(ZCAT) $(top_srcdir)/test/mb_big_test.g.gz > test/mb_big_test.g
-
-test/cell1.gen: $(top_srcdir)/test/cell1.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell1.gen.gz > test/cell1.gen
-
-test/cell2.gen: $(top_srcdir)/test/cell2.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell2.gen.gz > test/cell2.gen
-
-
-# Utility target: build but don't run tests
-build-check:
-	$(MAKE) 'TESTS_ENVIRONMENT=: ' check

Modified: MOAB/trunk/src/io/ReadNCDF.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNCDF.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/io/ReadNCDF.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -25,6 +25,7 @@
 #include <string>
 #include <assert.h>
 #include <stdio.h>
+#include <string.h>
 #include <cmath>
 #include <memory>
 #include <sstream>

Modified: MOAB/trunk/src/io/ReadSmf.cpp
===================================================================
--- MOAB/trunk/src/io/ReadSmf.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/io/ReadSmf.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -21,6 +21,7 @@
 
 #include <assert.h>
 #include <stdlib.h>
+#include <string.h>
 #include <iostream>
 
 #include "ReadSmf.hpp"

Modified: MOAB/trunk/src/io/ReadVtk.cpp
===================================================================
--- MOAB/trunk/src/io/ReadVtk.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/io/ReadVtk.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -21,6 +21,7 @@
 
 #include <assert.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "ReadVtk.hpp"
 #include "MBRange.hpp"

Modified: MOAB/trunk/src/io/Tqdcfr.cpp
===================================================================
--- MOAB/trunk/src/io/Tqdcfr.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/io/Tqdcfr.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -35,6 +35,7 @@
 
 #include <sstream>
 #include <assert.h>
+#include <string.h>
 
 const bool debug = false;
 const int ACIS_DIMS[] = {-1, 3, -1, 2, -1, -1, 1, 0, -1, -1};
@@ -2581,13 +2582,14 @@
 // #ifdef TEST_TQDCFR
 #else
 #include "MBCore.hpp"
-#include "testdir.h"
+#define STRINGIFY_(A) #A
+#define STRINGIFY(A) STRINGIFY_(A)
 
 int main(int argc, char* argv[])
 {
 
     // Check command line arg
-  const char* file = TEST_DIR "/brick_cubit10.2.cub";
+  const char* file = STRINGIFY(SRCDIR) "/brick_cubit10.2.cub";
   if (argc < 2)
   {
     std::cout << "Usage: tqdcfr <cub_file_name>" << std::endl;

Modified: MOAB/trunk/src/io/WriteNCDF.cpp
===================================================================
--- MOAB/trunk/src/io/WriteNCDF.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/io/WriteNCDF.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -34,6 +34,7 @@
 #include <string>
 #include <vector>
 #include <stdio.h>
+#include <string.h>
 #include <assert.h>
 
 #include "MBInterface.hpp"

Modified: MOAB/trunk/src/io/WriteSLAC.cpp
===================================================================
--- MOAB/trunk/src/io/WriteSLAC.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/io/WriteSLAC.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -34,6 +34,7 @@
 #include <string>
 #include <vector>
 #include <stdio.h>
+#include <string.h>
 #include <iostream>
 #include <assert.h>
 

Modified: MOAB/trunk/src/io/WriteTemplate.cpp
===================================================================
--- MOAB/trunk/src/io/WriteTemplate.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/io/WriteTemplate.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -31,6 +31,7 @@
 #include <string>
 #include <vector>
 #include <stdio.h>
+#include <string.h>
 #include <iostream>
 
 #include "MBInterface.hpp"

Modified: MOAB/trunk/src/parallel/MBParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/MBParallelComm.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/parallel/MBParallelComm.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -29,12 +29,13 @@
 #include <assert.h>
 
 
+
 extern "C" 
 {
+#include "types.h"
 #include "minmax.h"
 #include "gs.h"
 #include "errmem.h"
-#include "types.h"
 #include "sort.h"
 #include "tuple_list.h"
 }

Modified: MOAB/trunk/src/parallel/MBProcConfig.cpp
===================================================================
--- MOAB/trunk/src/parallel/MBProcConfig.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/parallel/MBProcConfig.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -14,11 +14,20 @@
  */
 
 #include "MBProcConfig.hpp"
+extern "C" {
+#ifdef USE_MPI
+#  include "types.h"
+#  include "errmem.h"
+#  include "crystal.h"
+#else
+   struct crystal_data {};
+#endif
+} // extern "C"
 
 //! Constructor
 MBProcConfig::MBProcConfig(MPI_Comm proc_comm) 
     : procComm(proc_comm),
-      crystalInit(false)
+      crystalData(0)
 {
 #ifdef USE_MPI
   int rank, size;
@@ -34,21 +43,24 @@
 
 crystal_data *MBProcConfig::crystal_router(bool construct_if_missing)
 {
-  if (!crystalInit && construct_if_missing)
 #ifdef USE_MPI
-    crystal_init(&crystalData, procComm), crystalInit = true;
-#else
-  ;
+  if (!crystalData && construct_if_missing) {
+    crystalData = new crystal_data;
+    crystal_init(crystalData, procComm);
+  }
 #endif
 
-  return &crystalData;
+  return crystalData;
 }
 
 MBProcConfig::~MBProcConfig() 
 {
+  if (crystalData) {
 #ifdef USE_MPI
-  if (crystalInit) 
-    crystal_free(&crystalData), crystalInit = false;
+    crystal_free(crystalData);
 #endif
+    delete crystalData;
+    crystalData = 0;
+  }
 }
 

Modified: MOAB/trunk/src/parallel/Makefile.am
===================================================================
--- MOAB/trunk/src/parallel/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/parallel/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -8,8 +8,9 @@
 noinst_LTLIBRARIES = libMOABpar.la
          
 # Some variables
-DEFS = $(DEFINES) -DIS_BUILDING_MB -DSRCDIR=$(srcdir)
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir)/../mhdf/inc
+AM_CPPFLAGS += -DIS_BUILDING_MB -DSRCDIR=$(srcdir) \
+               -I$(srcdir)/.. -I.. -I$(srcdir)/../io \
+               -I$(srcdir)/../moab -I../moab  -I$(srcdir)/moab
 
 # The directory in which to install headers
 libMOABpar_la_includedir = $(includedir)
@@ -23,8 +24,6 @@
 # Conditional sources
 MOAB_PARALLEL_SRCS =
 MOAB_PARALLEL_HDRS =
-MOAB_PARALLEL_TEST = 
-MOAB_PARALLEL_CHECK = 
 if PARALLEL
 # The list of source files, and any header files that do not need to be installed
   MOAB_PARALLEL_SRCS += \
@@ -32,6 +31,8 @@
      MBProcConfig.cpp \
      MBParallelData.cpp \
      ReadParallel.cpp \
+     ReadParallel.hpp \
+     crystal.h errmem.h types.h \
      crystal.c errmem.c \
      transfer.c gs.c gs.h tuple_list.c \
      tuple_list.h \
@@ -39,29 +40,20 @@
 
 # The list of header files which are to be installed
   MOAB_PARALLEL_HDRS += \
-     MBmpi.h MBmpi_config.h \
-     MBParallelComm.hpp \
-     MBProcConfig.hpp \
-     MBParallelData.hpp \
-     ReadParallel.hpp \
-     crystal.h errmem.h types.h
+     moab/MBmpi.h \
+     moab/MBmpi_config.h \
+     moab/MBParallelComm.hpp \
+     moab/MBProcConfig.hpp \
+     moab/MBParallelData.hpp \
+     moab/MBParallelConventions.h 
 
-  MOAB_PARALLEL_TEST += pcomm_unit parallel_unit_tests uber_parallel_test scdtest pcomm_serial
-
 if PARALLEL_HDF5
 #  libMOABpar_la_LIBADD = $(top_builddir)/mhdf/libmhdf.la
-  INCLUDES += -I$(top_srcdir)/mhdf/include
+  AM_CPPFLAGS += -I$(srcdir)/../mhdf/inc
   MOAB_PARALLEL_SRCS += WriteHDF5Parallel.cpp 
   MOAB_PARALLEL_HDRS += WriteHDF5Parallel.hpp
-  
-  MOAB_PARALLEL_TEST += parallel_hdf5_test mhdf_parallel parallel_write_test
 endif
 
-  MOAB_PARALLEL_CHECK += mbparallelcomm_test
-  mbparallelcomm_test_SOURCES = mbparallelcomm_test.cpp
-  mbparallelcomm_test_LDADD = $(top_builddir)/libMOAB.la
-  mbparallelcomm_test_DEPENDENCIES = $(mbparallelcomm_test_LDADD)
-
 endif
 
 # The list of source files, and any header files that do not need to be installed
@@ -69,34 +61,5 @@
    $(MOAB_PARALLEL_SRCS)
 
 # The list of header files which are to be installed
-libMOABpar_la_include_HEADERS = \
+nobase_libMOABpar_la_include_HEADERS = \
   $(MOAB_PARALLEL_HDRS)
-
-# Tests and such
-
-check_PROGRAMS = $(MOAB_PARALLEL_CHECK) $(MOAB_PARALLEL_TEST)
-TESTS = $(MOAB_PARALLEL_TEST)
-pcomm_unit_SOURCES = pcomm_unit.cpp
-pcomm_unit_LDADD = $(top_builddir)/libMOAB.la
-parallel_hdf5_test_SOURCES = parallel_hdf5_test.cc
-parallel_hdf5_test_LDADD = ../libMOAB.la
-mhdf_parallel_SOURCES = mhdf_parallel.c
-mhdf_parallel_LDADD = ../mhdf/libmhdf.la
-parallel_unit_tests_SOURCES = parallel_unit_tests.cpp
-parallel_unit_tests_LDADD = ../libMOAB.la
-parallel_write_test_SOURCES = parallel_write_test.cc
-parallel_write_test_LDADD = ../libMOAB.la
-uber_parallel_test_SOURCES = uber_parallel_test.cpp
-uber_parallel_test_LDADD = ../libMOAB.la
-pcomm_serial_SOURCES = pcomm_serial.cpp
-pcomm_serial_LDADD = ../libMOAB.la
-
-scdtest_SOURCES = scdtest.cpp
-scdtest_LDADD = ../libMOAB.la
-
-
-# Other files to clean up (e.g. output from tests)
-MOSTLYCLEANFILES = mhdf_ll.h5m
-
-EXTRA_DIST = ptest.cub
-

Modified: MOAB/trunk/src/parallel/crystal.h
===================================================================
--- MOAB/trunk/src/parallel/crystal.h	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/parallel/crystal.h	2010-03-10 18:12:47 UTC (rev 3579)
@@ -10,7 +10,7 @@
 
 typedef struct { uint n; buffer buf; } crystal_buf;
 
-typedef struct {
+typedef struct crystal_data {
   crystal_buf buffers[3];
   crystal_buf *all, *keep, *send;
   MPI_Comm comm;

Modified: MOAB/trunk/src/parallel/moab/MBParallelComm.hpp
===================================================================
--- MOAB/trunk/src/parallel/moab/MBParallelComm.hpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/parallel/moab/MBParallelComm.hpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -35,6 +35,7 @@
 #include <iostream>
 #include <fstream>
 #include <assert.h>
+#include <stdlib.h>
 #include "math.h"
 #include "MBmpi.h"
 

Modified: MOAB/trunk/src/parallel/moab/MBProcConfig.hpp
===================================================================
--- MOAB/trunk/src/parallel/moab/MBProcConfig.hpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/src/parallel/moab/MBProcConfig.hpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -23,19 +23,14 @@
 
 
 #ifdef USE_MPI
-#include "MBmpi.h"
-extern "C" 
-{
-#include "types.h"
-#include "errmem.h"
-#include "crystal.h"
-}
+#  include "MBmpi.h"
 #else
-typedef int MPI_Comm;
-#define MPI_COMM_WORLD 0
-typedef void* crystal_data;
+  typedef int MPI_Comm;
+# define MPI_COMM_WORLD 0
 #endif
 
+struct crystal_data;
+
 /**\brief Multi-CPU information for parallel MOAB */
 class MBProcConfig {
 public:
@@ -73,12 +68,9 @@
   
     //! number of processors
   unsigned procSize;
-
-    //! whether the crystal router's been initialized or not
-  bool crystalInit;
   
     //! crystal router for this parallel job
-  crystal_data crystalData;
+  crystal_data* crystalData;
   
 };
 

Modified: MOAB/trunk/test/MBTest.cpp
===================================================================
--- MOAB/trunk/test/MBTest.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/MBTest.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -55,8 +55,13 @@
 
 using namespace std;
 
-#include "testdir.h"
-string TestDir( TEST_DIR );
+#define STRINGIFY_(A) #A
+#define STRINGIFY(A) STRINGIFY_(A)
+#ifdef SRCDIR
+string TestDir( STRINGIFY(SRCDIR) );
+#else
+string TestDir( "." );
+#endif
 
 #define CHKERR(A) do { if (MB_SUCCESS != (A)) { \
   std::cerr << "Failure (error code " << (A) << ") at " __FILE__ ":" \
@@ -2856,7 +2861,7 @@
 
 MBErrorCode mb_write_mesh_test(MBInterface *MB)
 {
-  std::string file_name = "test/mb_write.g";
+  std::string file_name = "mb_write.g";
 
     // no need to get lists, write out the whole mesh
   MBErrorCode result = MB->write_mesh(file_name.c_str());
@@ -3228,7 +3233,7 @@
 
 
     // no need to get lists, write out the whole mesh
-  file_name = "test/mb_write2.g";
+  file_name = "mb_write2.g";
   std::vector<MBEntityHandle> output_list;
   output_list.push_back( block_ms );
   output_list.push_back( sideset_ms );
@@ -3846,7 +3851,7 @@
 
   MB->convert_entities(meshset, false, false, true, &function_object);
 
-  file_name = "test/hex_mid_volume_nodes.g";
+  file_name = "hex_mid_volume_nodes.g";
   error = MB->write_mesh(file_name.c_str());
   if (error != MB_SUCCESS)
     return error;
@@ -3879,7 +3884,7 @@
   MB->add_entities(meshset, entities);
   MB->convert_entities(meshset, true, true, true);
 
-  file_name = "test/hex_mid_edge_face_vol_nodes.g";
+  file_name = "hex_mid_edge_face_vol_nodes.g";
   error = MB->write_mesh(file_name.c_str());
   if (error != MB_SUCCESS)
     return error;
@@ -3915,7 +3920,7 @@
   MB->add_entities(meshset, entities);
   MB->convert_entities(meshset, true, false, false);
 
-  file_name = "test/hex_mid_edge_nodes.g";
+  file_name = "hex_mid_edge_nodes.g";
   error = MB->write_mesh(file_name.c_str());
   if (error != MB_SUCCESS)
     return error;
@@ -3956,7 +3961,7 @@
   MB->add_entities(meshset, entities);
   MB->convert_entities(meshset, true, false, false);
 
-  file_name = "test/tet_mid_edge_nodes.g";
+  file_name = "tet_mid_edge_nodes.g";
   error = MB->write_mesh(file_name.c_str());
   if (error != MB_SUCCESS)
     return error;
@@ -3987,7 +3992,7 @@
   MB->add_entities(meshset, entities);
   MB->convert_entities(meshset, false, true, false);
 
-  file_name = "test/tet_mid_face_nodes.g";
+  file_name = "tet_mid_face_nodes.g";
   error = MB->write_mesh(file_name.c_str());
   if (error != MB_SUCCESS)
     return error;
@@ -4022,7 +4027,7 @@
   MB->add_entities(meshset, entities);
   MB->convert_entities(meshset, true, true, false);
 
-  file_name = "test/tet_mid_edge_face_nodes.g";
+  file_name = "tet_mid_edge_face_nodes.g";
   error = MB->write_mesh(file_name.c_str());
   if (error != MB_SUCCESS)
     return error;
@@ -4116,7 +4121,7 @@
   }
 
     // output the skin
-  file_name = "test/tri_mid_edge_face_nodes.g";
+  file_name = "tri_mid_edge_face_nodes.g";
   error = MB->write_mesh(file_name.c_str(), &export_meshset, 1);
   if (error != MB_SUCCESS)
     return error;
@@ -4602,8 +4607,8 @@
   MBErrorCode result;
   MBSkinner MBSkinner_Obj(MB);
 
-  std::string test_files[] = {std::string("test/cell1.gen"),
-                              std::string("test/cell2.gen")};
+  std::string test_files[] = {std::string("cell1.gen"),
+                              std::string("cell2.gen")};
     /*  			      std::string("cell3.gen"),
     			      std::string("cell4.gen"),
 			      std::string("cell5.gen"),
@@ -4698,7 +4703,7 @@
        0 != num_ents) ||
       (MB_SUCCESS == MB->get_number_entities_by_dimension(0, 2, num_ents) &&
        0 != num_ents))
-    result = MB->write_mesh("test/merge_test.ncdf");
+    result = MB->write_mesh("merge_test.ncdf");
   ;
   
 
@@ -4844,7 +4849,7 @@
   clock_t total_start = clock();
 
     //read in a file so you have some data in the database
-  std::string file_name = "test/mb_big_test.g";
+  std::string file_name = "mb_big_test.g";
   error = MB->load_mesh(file_name.c_str(), NULL, 0);
   if (error != MB_SUCCESS)
     return error;
@@ -4953,7 +4958,7 @@
   std::vector<MBEntityHandle> output_list;
   output_list.push_back(mesh_set);
 
-  file_name = "test/mb_stress_out.g";
+  file_name = "mb_stress_out.g";
   error = MB->write_mesh(file_name.c_str(), &output_list[0], output_list.size());
   if (error != MB_SUCCESS)
     return error;

Modified: MOAB/trunk/test/Makefile.am
===================================================================
--- MOAB/trunk/test/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,6 +1,44 @@
+SUBDIRS = dual obb perf io 
+if HDF5_FILE
+  SUBDIRS += h5file
+endif
+if PARALLEL
+  SUBDIRS += parallel
+endif
 
-SUBDIRS = dual h5file obb perf
+LDADD = $(top_builddir)/src/libMOAB.la
 
+AM_CPPFLAGS += -DIS_BUILDING_MB \
+               -DSRCDIR=$(srcdir) \
+               -I$(top_builddir)/src \
+               -I$(top_srcdir)/src \
+               -I$(top_builddir)/src/moab \
+               -I$(top_srcdir)/src/moab
+
+TESTS = moab_test \
+        homxform_test \
+        scdseq_test \
+        test_adj \
+        seq_man_test \
+        geom_util_test \
+        xform_test \
+        obb_test \
+	adaptive_kd_tree_tests \
+	bsp_tree_test \
+	file_options_test \
+        kd_tree_test \
+        var_len_test var_len_test_no_template \
+	tag_test \
+	mesh_set_test \
+        mbcn_test \
+        bsp_tree_poly_test
+#                 merge_test \         # input files no longer exist?
+#                 test_tag_server \    # fails
+
+check_PROGRAMS = $(TESTS) \
+		 kd_tree_tool \
+		 kd_tree_time
+
 EXTRA_DIST  = 125hex.g \
               1hex.g \
               1khex.g \
@@ -9,11 +47,7 @@
               3k-tri-sphere.vtk \
               4k-tri-plane.vtk \
               4tet.g \
-              64bricks_512hex.h5m \
               8hex.g \
-              brick_cubit10.1.cub \
-              brick_cubit10.2.cub \
-              brick_cubit10.cub \
               cell1.gen.gz \
               cell2.gen.gz \
               mb_big_test.g.gz \
@@ -23,14 +57,7 @@
               test.g \
               testquad-cyl.g \
               testquad.g \
-              testtet.g \
-	      v3_dodec.h5m \
-              ho_test.g \
-              test.cub \
-              ho_test.cub \
-	      sample.stl \
-	      gmsh2.msh \
-              test.nas
+              testtet.g 
 
 CLEANFILES = mb_big_test.g \
              cell1.gen \
@@ -46,5 +73,90 @@
                    tet_mid_edge_face_nodes.g \
                    tri_mid_edge_face_nodes.g \
                    mb_stress_out.g \
-                   merge_test.ncdf
+                   merge_test.ncdf \
+                   tree.h5m
 
+# Tests and such
+
+moab_test_SOURCES = MBTest.cpp
+moab_test_DEPENDENCIES = mb_big_test.g cell1.gen cell2.gen $(LDADD)
+
+homxform_test_SOURCES = $(top_srcdir)/src/HomXform.cpp
+homxform_test_CPPFLAGS = -DTEST $(AM_CPPFLAGS) $(CPPFLAGS)
+homxform_test_DEPENDENCIES = $(LDADD)
+
+scdseq_test_SOURCES = scdseq_test.cpp
+scdseq_test_DEPENDENCIES = $(LDADD)
+
+#scdseq_timing_SOURCES = scdseq_timing.cpp
+#scdseq_timing_DEPENDENCIES = $(LDADD)
+
+#merge_test_SOURCES = merge_test.cpp
+#merge_test_DEPENDENCIES = $(LDADD)
+
+#test_exo_SOURCES = test_exo.cpp
+#test_exo_DEPENDENCIES = $(LDADD)
+
+#test_tag_server_SOURCES = $(top_srcdir)/src/TagServer.cpp
+#test_tag_server_CPPFLAGS = -DTEST $(CPPFLAGS)
+#test_tag_server_DEPENDENCIES = $(LDADD)
+
+test_adj_SOURCES = test_adj.cpp
+test_adj_DEPENDENCIES = $(LDADD)
+
+seq_man_test_SOURCES = TestUtil.hpp TestTypeSequenceManager.cpp 
+
+mesh_set_test_SOURCES = Test_MBMeshSet.cpp TestUtil.hpp
+
+geom_util_test_SOURCES = TestUtil.hpp GeomUtilTests.cpp 
+geom_util_test_DEPENDENCIES = $(LDADD)
+
+xform_test_SOURCES = $(top_srcdir)/src/MBAffineXform.cpp
+xform_test_CPPFLAGS = -DTEST $(AM_CPPFLAGS) $(CPPFLAGS)
+xform_test_DEPENDENCIES = $(LDADD)
+
+obb_test_SOURCES = OBBTest.cpp
+obb_test_DEPENDENCIES = $(LDADD)
+
+adaptive_kd_tree_tests_SOURCES = adaptive_kd_tree_tests.cpp
+adaptive_kd_tree_tests_DEPENDENCIES = $(LDADD)
+
+kd_tree_tool_SOURCES = kd_tree_tool.cpp
+kd_tree_tool_DEPENDENCIES = $(LDADD)
+
+kd_tree_time_SOURCES = kd_tree_time.cpp
+kd_tree_time_DEPENDENCIES = $(LDADD)
+
+kd_tree_test_SOURCES = kd_tree_test.cpp
+
+bsp_tree_test_SOURCES = bsp_tree_test.cpp
+
+file_options_test_SOURCES = TestUtil.hpp $(top_srcdir)/src/FileOptions.cpp 
+file_options_test_CPPFLAGS = -DTEST $(AM_CPPFLAGS) $(CPPFLAGS)
+file_options_test_LDADD = 
+
+var_len_test_SOURCES = TestUtil.hpp VarLenTagTest.cpp
+var_len_test_no_template_SOURCES = $(var_len_test_SOURCES)
+var_len_test_no_template_CPPFLAGS = -UTEMPLATE_SPECIALIZATION $(AM_CPPFLAGS) $(CPPFLAGS)
+
+tag_test_SOURCES = TestUtil.hpp TagTest.cpp
+
+mbcn_test_SOURCES = $(top_srcdir)/src/moab/MBCN.hpp \
+                    $(top_srcdir)/src/MBCN.cpp \
+                    mbcn_test.cc
+
+bsp_tree_poly_test_SOURCES = bsp_tree_poly_test.cpp
+
+mb_big_test.g: mb_big_test.g.gz
+	$(ZCAT) $< > $@
+
+cell1.gen: cell1.gen.gz
+	$(ZCAT) $< > $@
+
+cell2.gen: cell2.gen.gz
+	$(ZCAT) $< > $@
+
+
+# Utility target: build but don't run tests
+build-check:
+	$(MAKE) 'TESTS_ENVIRONMENT=: ' check

Modified: MOAB/trunk/test/dual/Makefile.am
===================================================================
--- MOAB/trunk/test/dual/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/dual/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,8 +1,8 @@
 
-DEFS = $(DEFINES)
-INCLUDES += -I$(top_srcdir) -I$(top_builddir)
+AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src \
+               -I$(top_srcdir)/src/moab -I$(top_builddir)/src/moab
 check_PROGRAMS = dual_test
 dual_test_SOURCES = dual_test.cpp
-LDADD = $(top_builddir)/libMOAB.la
-dual_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
+LDADD = $(top_builddir)/src/libMOAB.la
+dual_test_DEPENDENCIES = $(LDADD)
 TESTS = dual_test 

Modified: MOAB/trunk/test/dual/dual_test.cpp
===================================================================
--- MOAB/trunk/test/dual/dual_test.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/dual/dual_test.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -4,7 +4,6 @@
 #include "MBRange.hpp"
 #include "MeshTopoUtil.hpp"
 #include "DualTool.hpp"
-#include "WriteGMV.hpp"
 #include <iostream>
 #include <string>
 
@@ -108,9 +107,6 @@
   }
 
     // write GMV file
-  WriteGMV *wgmv = new WriteGMV(gMB);
-  wgmv->write_file(argv[1], 0, 3);
-  delete wgmv;
-  
+  gMB->write_file( argv[1], "GMV" );
   delete gMB;
 }

Modified: MOAB/trunk/test/h5file/Makefile.am
===================================================================
--- MOAB/trunk/test/h5file/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/h5file/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,15 +1,22 @@
+EXTRA_DIST = v3_dodec.h5m
 
-DEFS = $(DEFINES)
-INCLUDES += -I$(top_srcdir) \
-            -I$(top_srcdir)/mhdf/include \
-            -I$(top_builddir) \
-            -I$(top_srcdir)/parallel \
-	    -I$(top_builddir)/parallel
-
+AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
+               -I.. -I$(srcdir)/.. \
+               -I$(top_srcdir)/src \
+               -I$(top_srcdir)/src/io \
+               -I$(top_srcdir)/src/io/mhdf/include \
+               -I$(top_builddir)/src \
+               -I$(top_srcdir)/src/parallel \
+	       -I$(top_builddir)/src/parallel \
+               -I$(top_srcdir)/src/moab \
+               -I$(top_builddir)/src/moab \
+               -I$(top_srcdir)/src/parallel/moab \
+	       -I$(top_builddir)/src/parallel/moab
+            
 check_PROGRAMS = h5test h5legacy h5varlen h5sets_test h5regression h5partial
 
 TESTS = $(check_PROGRAMS)
-LDADD = $(top_builddir)/libMOAB.la
+LDADD = $(top_builddir)/src/libMOAB.la
 
 h5test_SOURCES = h5file_test.cpp
 h5legacy_SOURCES = h5legacy.cpp

Modified: MOAB/trunk/test/h5file/h5legacy.cpp
===================================================================
--- MOAB/trunk/test/h5file/h5legacy.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/h5file/h5legacy.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,5 +1,4 @@
 #include "MBCore.hpp"
-#include "testdir.h"
 #include "TestUtil.hpp"
 #include "MBRange.hpp"
 
@@ -36,7 +35,7 @@
   MBErrorCode rval;
   
     // load file containing a dodecahedron
-  rval = mb.load_mesh( "../../" TEST_DIR "/v3_dodec.h5m" );
+  rval = mb.load_mesh( STRINGIFY(SRCDIR) "/v3_dodec.h5m" );
   CHECK_ERR(rval);
   
     // get entities from file

Modified: MOAB/trunk/test/h5file/h5regression.cpp
===================================================================
--- MOAB/trunk/test/h5file/h5regression.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/h5file/h5regression.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,5 +1,4 @@
 #include "MBCore.hpp"
-#include "testdir.h"
 #include "TestUtil.hpp"
 #include "MBRange.hpp"
 #include "MBReadUtilIface.hpp"

Modified: MOAB/trunk/test/h5file/h5sets_test.cpp
===================================================================
--- MOAB/trunk/test/h5file/h5sets_test.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/h5file/h5sets_test.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,5 +1,4 @@
 #include "MBCore.hpp"
-#include "testdir.h"
 #include "TestUtil.hpp"
 #include "MBRange.hpp"
 

Modified: MOAB/trunk/test/io/Makefile.am
===================================================================
--- MOAB/trunk/test/io/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/io/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,427 +1,64 @@
-# Don't require GNU-standard files (Changelog, README, etc.)
-AUTOMAKE_OPTIONS = foreign
-LDADD = $(top_builddir)/libMOAB.la
+LDADD = $(top_builddir)/src/libMOAB.la
 
-# Don't loose the autoconf include path
-ACLOCAL_AMFLAGS = -I m4
+EXTRA_DIST = brick_cubit10.1.cub \
+             brick_cubit10.2.cub \
+             brick_cubit10.cub \
+	     gmsh2.msh \
+             ho_test.g \
+             ho_test.cub \
+             test.cub \
+             test.nas \
+	     sample.stl
 
-# Subdirectories to build
-SUBDIRS = 
-if HDF5_FILE
-  SUBDIRS += mhdf
-endif
-if PARALLEL
-  SUBDIRS += parallel
-endif
-SUBDIRS += . test tools doc doxygen 
 
-BUILT_SOURCES = MBCN_protos.h
+AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
+               -I$(builddir) -I.. -I$(srcdir)/.. \
+               -I$(top_builddir)/src \
+               -I$(top_srcdir)/src \
+               -I$(top_srcdir)/src/io \
+               -I$(top_srcdir)/src/parallel \
+               -I$(top_builddir)/src/moab \
+               -I$(top_srcdir)/src/moab \
+               -I$(top_srcdir)/src/io/moab \
+               -I$(top_srcdir)/src/parallel/moab
 
-# Things to build
-lib_LTLIBRARIES = libMOAB.la 
-
-TESTS = moab_test \
-        homxform_test \
-        scdseq_test \
-        tqdcfr \
-        test_adj \
-        seq_man_test \
-        geom_util_test \
-        xform_test \
-        obb_test \
-	vtk_test \
-	adaptive_kd_tree_tests \
-	bsp_tree_test \
-	file_options_test \
-        kd_tree_test \
-        var_len_test var_len_test_no_template \
-	tag_test \
-	mesh_set_test \
-	cub_file_test \
+TESTS = tqdcfr \
+        vtk_test \
+        cub_file_test \
 	exodus_test \
         gmsh_test \
 	nastran_test \
-        stl_test \
-        mbcn_test \
-        bsp_tree_poly_test
-#                 merge_test \         # input files no longer exist?
-#                 test_tag_server \    # fails
+        stl_test 
 
-check_PROGRAMS = $(TESTS) \
-		 kd_tree_tool \
-		 kd_tree_time
+check_PROGRAMS = $(TESTS)
 
-#noinst_PROGRAMS = scdseq_timing
-
-
-# Some variables
-DEFS = $(DEFINES) -DIS_BUILDING_MB
-INCLUDES += -I$(top_builddir) 
-
-# The directory in which to install headers
-libMOAB_la_includedir = $(includedir)
-
-
-
-# Conditional sources
-MOAB_EXTRA_SRCS =
-MOAB_EXTRA_HDRS =
-
-if NETCDF_FILE
-  MOAB_EXTRA_SRCS +=  ReadNCDF.cpp  ReadNCDF.hpp \
-                     WriteNCDF.cpp WriteNCDF.hpp \
-                     WriteSLAC.cpp WriteSLAC.hpp 
-endif
-libMOAB_la_LIBADD = $(NETCDF_LIBS) $(HDF5_LIBS) 
-if HDF5_FILE
-  libMOAB_la_LIBADD += $(top_builddir)/mhdf/libmhdf.la
-  INCLUDES += -I$(srcdir)/mhdf/include
-  MOAB_EXTRA_SRCS += ReadHDF5.cpp ReadHDF5.hpp WriteHDF5.cpp WriteHDF5.hpp
-endif
-if CCMIO_FILE
-  MOAB_EXTRA_SRCS += WriteCCMIO.cpp WriteCCMIO.hpp ReadCCMIO.cpp ReadCCMIO.hpp
-  libMOAB_la_LIBADD += $(CCMIO_LIBS)
-endif
-
-if PARALLEL
-  libMOAB_la_LIBADD += $(top_builddir)/parallel/libMOABpar.la
-  INCLUDES += -I$(srcdir)/parallel
-endif
-
-if HAVE_CGM
-  CPPFLAGS += @CGM_CPPFLAGS@ -DCGM @MOAB_CGM_DEFINES@
-  MOAB_EXTRA_SRCS +=  ReadCGM.cpp  ReadCGM.hpp
-  libMOAB_la_LIBADD += @CGM_LIBS@
-endif
-
-
-# Automake doesn't seem to have a directory defined for
-# platform-dependent data (or include) files. So put 
-# in $(libdir).  Define a $(cfgdir) to get around automake's
-# check that only libraries are going in $(libdir)
-cfgdir = $(libdir)
-cfg_DATA = moab.make moab.config
-
-# By default, moab.make will define these to $(srcdir).  We
-# want to override that during the INSTALL of the file so
-# that the correct values are set (e.g. if someone does 
-# 'make prefix=/foo install', we don't know the correct install
-# directory until we're doing the install.
-install-data-hook:
-	echo "MOAB_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/moab.make
-	echo "MOAB_INCLUDEDIR=${includedir}" >> $(DESTDIR)$(cfgdir)/moab.make
-
-
-# Generate a file to be installed in $libdir containing the configuration
-# options used for this MOAB build.
-# Note: If you modify this, verify that it works correctly for option
-#       values containing spaces.
-# First line: get unformatted data from config.status
-# Second line: extract just the list of options
-# Third line: put individual options on separate lines
-moab.config: config.status Makefile.am
-	./config.status --version | \
-	  sed -e 's/.*options "\(.*\)"/\1/p' -e 'd' | \
-	  sed -e "s/'[[:space:]]'/'\n'/g" >$@
-
-# The list of source files, and any header files that do not need to be installed
-libMOAB_la_SOURCES = \
-  AEntityFactory.cpp \
-  AEntityFactory.hpp \
-  BitTagServer.cpp \
-  BitTagServer.hpp \
-  DualTool.cpp \
-  ElementSequence.hpp \
-  EntitySequence.cpp \
-  EntitySequence.hpp \
-  exodus_order.h \
-  ExoIIUtil.cpp \
-  ExoIIUtil.hpp \
-  FileOptions.cpp \
-  FileOptions.hpp \
-  FileTokenizer.cpp \
-  FileTokenizer.hpp \
-  GeomTopoTool.cpp \
-  GmshUtil.cpp \
-  GmshUtil.hpp \
-  HigherOrderFactory.cpp \
-  HomXform.cpp \
-  MBAdaptiveKDTree.cpp \
-  MBAffineXform.cpp \
-  MBAffineXform.hpp \
-  MBAlloc.cpp \
-  MBAlloc.hpp \
-  MBAxisBox.cpp \
-  MBAxisBox.hpp \
-  MBBSPTree.cpp \
-  MBCN.cpp \
-  MBCNArrays.hpp \
-  MBCartVect.cpp \
-  MBMatrix3.cpp \
-  MBCore.cpp \
-  MBFactory.cpp \
-  MBGeomUtil.cpp \
-  MBInternals.hpp \
-  MBMem.hpp \
-  MBMeshSet.cpp \
-  MBMeshSet.hpp \
-  MBOrientedBox.cpp \
-  MBOrientedBoxTreeTool.cpp \
-  BSPTreePoly.cpp \
-  MBRange.cpp \
-  MBRangeSeqIntersectIter.cpp \
-  MBRangeSeqIntersectIter.hpp \
-  MBReadUtil.cpp \
-  MBReadUtil.hpp \
-  MBReaderWriterSet.cpp \
-  MBSkinner.cpp \
-  MBSysUtil.cpp \
-  MBSysUtil.hpp \
-  MBUtil.cpp \
-  MBWriteUtil.cpp \
-  MBWriteUtil.hpp \
-  MeshSetSequence.cpp \
-  MeshSetSequence.hpp \
-  MeshTopoUtil.cpp \
-  patran_order.h \
-  PolyElementSeq.cpp \
-  PolyElementSeq.hpp \
-  RangeMap.hpp \
-  ReadGmsh.cpp \
-  ReadGmsh.hpp \
-  ReadSms.hpp \
-  ReadSms.cpp \
-  ReadSTL.cpp \
-  ReadSTL.hpp \
-  ReadVtk.cpp \
-  ReadVtk.hpp \
-  ReadSmf.hpp \
-  ReadSmf.cpp \
-  SMF_State.cpp \
-  SMF_State.hpp \
-  ReadIDEAS.cpp \
-  ReadIDEAS.hpp \
-  ReadMCNP5.cpp \
-  ReadMCNP5.hpp \
-  ReadNASTRAN.cpp \
-  ReadNASTRAN.hpp \
-  ReadABAQUS.cpp \
-  ReadABAQUS.hpp \
-  ReadTetGen.cpp \
-  ReadTetGen.hpp \
-  ScdElementData.cpp \
-  ScdElementData.hpp \
-  ScdVertexData.cpp \
-  ScdVertexData.hpp \
-  SequenceData.hpp \
-  SequenceData.cpp \
-  SequenceManager.cpp \
-  SequenceManager.hpp \
-  SparseTagSuperCollection.cpp \
-  SparseTagSuperCollection.hpp \
-  SparseTagCollection.cpp \
-  SparseTagCollection.hpp \
-  StructuredElementSeq.cpp \
-  StructuredElementSeq.hpp \
-  SweptElementData.cpp \
-  SweptElementData.hpp \
-  SweptElementSeq.cpp \
-  SweptElementSeq.hpp \
-  SweptVertexData.cpp \
-  SweptVertexData.hpp \
-  TagCompare.hpp \
-  TagInfo.cpp \
-  TagInfo.hpp \
-  TagServer.cpp \
-  TagServer.hpp \
-  Tqdcfr.cpp \
-  Tqdcfr.hpp \
-  TypeSequenceManager.cpp \
-  TypeSequenceManager.hpp \
-  UnstructuredElemSeq.cpp \
-  UnstructuredElemSeq.hpp \
-  VarLenTag.hpp \
-  VertexSequence.hpp \
-  VertexSequence.cpp \
-  VtkUtil.cpp \
-  VtkUtil.hpp \
-  WriteAns.cpp \
-  WriteAns.hpp \
-  WriteGMV.cpp \
-  WriteGMV.hpp \
-  WriteGmsh.cpp \
-  WriteGmsh.hpp \
-  WriteSTL.cpp \
-  WriteSTL.hpp \
-  WriteTemplate.cpp \
-  WriteVtk.cpp \
-  WriteVtk.hpp \
-  WriteSmf.cpp \
-  WriteSmf.hpp \
-  $(MOAB_EXTRA_SRCS)
-
-#  MBMem.cpp
-
-# The list of header files which are to be installed
-libMOAB_la_include_HEADERS = \
-  DualTool.hpp \
-  ExoIIInterface.hpp \
-  GeomTopoTool.hpp \
-  HigherOrderFactory.hpp \
-  HomXform.hpp \
-  MBAdaptiveKDTree.hpp \
-  MBBSPTree.hpp \
-  MBCN.hpp \
-  MBCN.h \
-  MBCN_FCDefs.h \
-  MBCN_protos.h \
-  MBCartVect.hpp \
-  MBCore.hpp \
-  MBEntityType.h \
-  MBEntityHandle.h \
-  MBError.hpp \
-  MBForward.hpp \
-  MBGeomUtil.hpp \
-  MBInterface.hpp \
-  MBMatrix3.hpp \
-  MBOrientedBox.hpp \
-  MBOrientedBoxTreeTool.hpp \
-  MBParallelConventions.h \
-  BSPTreePoly.hpp \
-  MBRange.hpp \
-  MBReadUtilIface.hpp \
-  MBReaderIface.hpp \
-  MBReaderWriterSet.hpp \
-  MBSkinner.hpp \
-  MBTagConventions.hpp \
-  MBTypes.h \
-  MBUnknownInterface.hpp \
-  MBUtil.hpp \
-  MBWriteUtilIface.hpp \
-  MBWriterIface.hpp \
-  MeshTopoUtil.hpp \
-  WriteTemplate.hpp \
-  $(MOAB_EXTRA_HDRS)
-
-MBCN_protos.h: MBCN.h tools/iMesh/mkprotos.sh
-	$(srcdir)/tools/iMesh/mkprotos.sh MBCN MBCN $< $@ MBCN_FCDefs.h
-
-MBCN_FCDefs.h: iBase_FCDefs.h
-	./config.status MBCN_FCDefs.h
-
-CPPFLAGS += -DSRCDIR=$(srcdir)
-
-# Tests and such
-
-moab_test_SOURCES = MBTest.cpp
-moab_test_DEPENDENCIES = test/mb_big_test.g test/cell1.gen test/cell2.gen $(top_builddir)/libMOAB.la
-
-homxform_test_SOURCES = HomXform.cpp
-homxform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-homxform_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-scdseq_test_SOURCES = scdseq_test.cpp
-scdseq_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-#scdseq_timing_SOURCES = scdseq_timing.cpp
-#scdseq_timing_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
-tqdcfr_SOURCES = Tqdcfr.cpp
+tqdcfr_SOURCES = $(top_srcdir)/src/io/Tqdcfr.cpp
 tqdcfr_CXXFLAGS = -DTEST_TQDCFR $(CXXFLAGS)
-tqdcfr_DEPENDENCIES = $(top_builddir)/libMOAB.la
+tqdcfr_DEPENDENCIES = $(LDADD)
 
 #test_rms_SOURCES = test_rms.cpp
 #test_rms_DEPENDENCIES = $(top_builddir)/libMOAB.la
 
-#merge_test_SOURCES = merge_test.cpp
-#merge_test_DEPENDENCIES = $(top_builddir)/libMOAB.la
-
 #test_exo_SOURCES = test_exo.cpp
 #test_exo_DEPENDENCIES = $(top_builddir)/libMOAB.la
 
-#test_tag_server_SOURCES = TagServer.cpp
-#test_tag_server_CXXFLAGS = -DTEST $(CXXFLAGS)
-#test_tag_server_DEPENDENCIES = $(top_builddir)/libMOAB.la
+vtk_test_SOURCES = $(srcdir)/../TestUtil.hpp VtkTest.cpp
+vtk_test_DEPENDENCIES = $(LDADD)
 
-test_adj_SOURCES = test_adj.cpp
-test_adj_DEPENDENCIES = $(top_builddir)/libMOAB.la
+cub_file_test_SOURCES = $(srcdir)/../TestUtil.hpp cub_file_test.cc
+cub_file_test_DEPENDENCIES = $(LDADD)
 
-seq_man_test_SOURCES = TestUtil.hpp TestTypeSequenceManager.cpp 
+exodus_test_SOURCES = $(srcdir)/../TestUtil.hpp exodus_test.cc
+exodus_test_DEPENDENCIES = $(LDADD)
 
-mesh_set_test_SOURCES = Test_MBMeshSet.cpp TestUtil.hpp
+gmsh_test_SOURCES = $(srcdir)/../TestUtil.hpp gmsh_test.cc
+gmsh_test_DEPENDENCIES = $(LDADD)
 
-geom_util_test_SOURCES = TestUtil.hpp GeomUtilTests.cpp 
-geom_util_test_DEPENDENCIES = $(geom_util_test_LDADD)
+nastran_test_SOURCES = $(srcdir)/../TestUtil.hpp nastran_test.cc
+nastran_test_DEPENDENCIES = $(LDADD)
 
-xform_test_SOURCES = MBAffineXform.cpp
-xform_test_CXXFLAGS = -DTEST $(CXXFLAGS)
-xform_test_DEPENDENCIES = $(xform_test_LDADD)
+stl_test_SOURCES = $(srcdir)/../TestUtil.hpp stl_test.cc
+stl_test_DEPENDENCIES = $(LDADD)
 
-obb_test_SOURCES = OBBTest.cpp
-obb_test_DEPENDENCIES = $(obb_test_LDADD)
+MOSTLYCLEANFILES = dumped_acis.sat 
 
-vtk_test_SOURCES = TestUtil.hpp VtkTest.cpp
-vtk_test_DEPENDENCIES = $(vtk_test_LDADD)
-
-adaptive_kd_tree_tests_SOURCES = adaptive_kd_tree_tests.cpp
-adaptive_kd_tree_tests_DEPENDENCIES = $(adaptive_kd_tree_tests_LDADD)
-
-kd_tree_tool_SOURCES = kd_tree_tool.cpp
-kd_tree_tool_DEPENDENCIES = $(kd_tree_tool_LDADD)
-
-kd_tree_time_SOURCES = kd_tree_time.cpp
-kd_tree_time_DEPENDENCIES = $(kd_tree_time_LDADD)
-
-kd_tree_test_SOURCES = kd_tree_test.cpp
-
-bsp_tree_test_SOURCES = bsp_tree_test.cpp
-
-file_options_test_SOURCES = TestUtil.hpp FileOptions.cpp 
-file_options_test_CPPFLAGS = -DTEST
-file_options_test_LDADD = 
-
-var_len_test_SOURCES = TestUtil.hpp VarLenTagTest.cpp
-var_len_test_no_template_SOURCES = $(var_len_test_SOURCES)
-var_len_test_no_template_CPPFLAGS = -UTEMPLATE_SPECIALIZATION
-
-tag_test_SOURCES = TestUtil.hpp TagTest.cpp
-tag_test_DEPENDENCIES = $(tag_test_LDADD)
-
-cub_file_test_SOURCES = TestUtil.hpp cub_file_test.cc
-cub_file_test_DEPENDENCIES = $(tag_test_LDADD)
-
-exodus_test_SOURCES = TestUtil.hpp exodus_test.cc
-exodus_test_DEPENDENCIES = $(tag_test_LDADD)
-
-gmsh_test_SOURCES = TestUtil.hpp gmsh_test.cc
-gmsh_test_DEPENDENCIES = $(tag_test_LDADD)
-
-nastran_test_SOURCES = TestUtil.hpp nastran_test.cc
-nastran_test_DEPENDENCIES = $(tag_test_LDADD)
-
-stl_test_SOURCES = TestUtil.hpp stl_test.cc
-stl_test_DEPENDENCIES = $(tag_test_LDADD)
-
-mbcn_test_SOURCES = MBCN.hpp MBCN.cpp mbcn_test.cc
-mbcn_test_CPPFLAGS = -DSRCDIR=$(srcdir)  # define anything to work around build issue
-mbcn_test_LDADD = 
-
-bsp_tree_poly_test_SOURCES = bsp_tree_poly_test.cpp
-
-# Other files to clean up (e.g. output from tests)
-DISTCLEANFILES = MBCN_FCDefs.h
-MOSTLYCLEANFILES = dumped_acis.sat tree.h5m moab.config
-
-test/mb_big_test.g: $(top_srcdir)/test/mb_big_test.g.gz
-	$(ZCAT) $(top_srcdir)/test/mb_big_test.g.gz > test/mb_big_test.g
-
-test/cell1.gen: $(top_srcdir)/test/cell1.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell1.gen.gz > test/cell1.gen
-
-test/cell2.gen: $(top_srcdir)/test/cell2.gen.gz
-	$(ZCAT) $(top_srcdir)/test/cell2.gen.gz > test/cell2.gen
-
-
-# Utility target: build but don't run tests
-build-check:
-	$(MAKE) 'TESTS_ENVIRONMENT=: ' check

Modified: MOAB/trunk/test/io/cub_file_test.cc
===================================================================
--- MOAB/trunk/test/io/cub_file_test.cc	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/io/cub_file_test.cc	2010-03-10 18:12:47 UTC (rev 3579)
@@ -76,11 +76,11 @@
  * adjacent corner vertices of the element.
  */
 #ifdef SRCDIR
-static const char input_file_1[] = STRINGIFY(SRCDIR) "/test/test.cub";
-static const char ho_file[] = STRINGIFY(SRCDIR) "/test/ho_test.cub";
+static const char input_file_1[] = STRINGIFY(SRCDIR) "/test.cub";
+static const char ho_file[] = STRINGIFY(SRCDIR) "/ho_test.cub";
 #else
-static const char input_file_1[] = "test/test.cub";
-static const char ho_file[] = "test/ho_test.cub";
+static const char input_file_1[] = "test.cub";
+static const char ho_file[] = "ho_test.cub";
 #endif
 
 void read_file( MBInterface& moab, const char* input_file );

Modified: MOAB/trunk/test/io/exodus_test.cc
===================================================================
--- MOAB/trunk/test/io/exodus_test.cc	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/io/exodus_test.cc	2010-03-10 18:12:47 UTC (rev 3579)
@@ -2,6 +2,7 @@
 #include "MBCore.hpp"
 #include "MBTagConventions.hpp"
 #include "MBCN.hpp"
+#define IS_BUILDING_MB
 #include "ReadNCDF.hpp"
 #include "WriteNCDF.hpp"
 #include "FileOptions.hpp"
@@ -17,9 +18,9 @@
  * adjacent corner vertices of the element.
  */
 #ifdef SRCDIR
-static const char ho_file[] = STRINGIFY(SRCDIR) "/test/ho_test.g";
+static const char ho_file[] = STRINGIFY(SRCDIR) "/ho_test.g";
 #else
-static const char ho_file[] = "test/ho_test.g";
+static const char ho_file[] = "ho_test.g";
 #endif
 
 void read_file( MBInterface& moab, 

Modified: MOAB/trunk/test/io/gmsh_test.cc
===================================================================
--- MOAB/trunk/test/io/gmsh_test.cc	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/io/gmsh_test.cc	2010-03-10 18:12:47 UTC (rev 3579)
@@ -12,9 +12,9 @@
  * Example version 2.0 ASCII input file from Gmsh 2.4 manual.
  */
 #ifdef SRCDIR
-static const char example[] = STRINGIFY(SRCDIR) "/test/gmsh2.msh";
+static const char example[] = STRINGIFY(SRCDIR) "/gmsh2.msh";
 #else
-static const char example[] = "test/gmsh2.msh";
+static const char example[] = "gmsh2.msh";
 #endif
 
 void test_read_nodes();

Modified: MOAB/trunk/test/io/nastran_test.cc
===================================================================
--- MOAB/trunk/test/io/nastran_test.cc	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/io/nastran_test.cc	2010-03-10 18:12:47 UTC (rev 3579)
@@ -2,6 +2,7 @@
 #include "MBCore.hpp"
 #include "MBTagConventions.hpp"
 #include "MBCN.hpp"
+#define IS_BUILDING_MB
 #include "ReadNASTRAN.hpp"
 #include "MBRange.hpp"
 #include "FileOptions.hpp"
@@ -9,9 +10,9 @@
 #include <algorithm>
 
 #ifdef SRCDIR
-static const char example[] = STRINGIFY(SRCDIR) "/test/test.nas";
+static const char example[] = STRINGIFY(SRCDIR) "/test.nas";
 #else
-static const char example[] = "test/test.nas";
+static const char example[] = "test.nas";
 #endif
 
 void read_file( MBInterface& moab, const char* input_file );

Modified: MOAB/trunk/test/io/stl_test.cc
===================================================================
--- MOAB/trunk/test/io/stl_test.cc	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/io/stl_test.cc	2010-03-10 18:12:47 UTC (rev 3579)
@@ -13,9 +13,9 @@
  *  http://people.sc.fsu.edu/~burkardt/data/stla/stla.html
  */
 #ifdef SRCDIR
-static const char sample[] = STRINGIFY(SRCDIR) "/test/sample.stl";
+static const char sample[] = STRINGIFY(SRCDIR) "/sample.stl";
 #else
-static const char sample[] = "test/sample.stl";
+static const char sample[] = "sample.stl";
 #endif
 
 const char* tmp_file = "test.stl";

Modified: MOAB/trunk/test/obb/Makefile.am
===================================================================
--- MOAB/trunk/test/obb/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/obb/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,10 +1,12 @@
 check_PROGRAMS = obb_test obb_time obb_tree_tool
 TESTS = obb_test
 
-DEFS = $(DEFINES)
-INCLUDES += -I$(top_srcdir) -I$(top_builddir)
-LDADD = $(top_builddir)/libMOAB.la
+AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
+               -I$(top_srcdir)/src -I$(top_builddir)/src -I.. \
+               -I$(top_srcdir)/src/moab -I$(top_builddir)/src/moab 
 
+LDADD = $(top_builddir)/src/libMOAB.la
+
 obb_test_SOURCES = obb_test.cpp
 obb_time_SOURCES = obb_time.cpp
 obb_tree_tool_SOURCES = obb_tree_tool.cpp

Modified: MOAB/trunk/test/obb/obb_test.cpp
===================================================================
--- MOAB/trunk/test/obb/obb_test.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/obb/obb_test.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -13,13 +13,14 @@
 #include <cstdio>
 #include <set>
 #include <map>
+#define STRINGIFY_(A) #A
+#define STRINGIFY(A) STRINGIFY_(A)
 
-#include "testdir.h"
 const char* NAME = "obb_test";
-const char* DEFAULT_FILES[] = { "../../" TEST_DIR "/3k-tri-sphere.vtk",
-                                //"../../" TEST_DIR "/4k-tri-plane.vtk",
+const char* DEFAULT_FILES[] = { STRINGIFY(SRCDIR) "/../3k-tri-sphere.vtk",
+                              //  STRINGIFY(SRCDIR) "../4k-tri-plane.vtk",
 #ifdef HDF5_FILE
-                                "../../" TEST_DIR "/3k-tri-cube.h5m",
+                                STRINGIFY(SRCDIR) "/../3k-tri-cube.h5m",
 #endif
                                 0 };
 

Modified: MOAB/trunk/test/parallel/Makefile.am
===================================================================
--- MOAB/trunk/test/parallel/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/parallel/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,102 +1,50 @@
-# Don't require GNU-standard files (Changelog, README, etc.)
-AUTOMAKE_OPTIONS = foreign
+LDADD = $(top_builddir)/src/libMOAB.la
+AM_CPPFLAGS += -DIS_BUILDING_MB \
+               -DSRCDIR=$(srcdir) \
+               -I$(builddir) \
+               -I.. -I$(srcdir)/.. \
+               -I$(top_builddir)/src \
+               -I$(top_srcdir)/src \
+               -I$(top_srcdir)/src/parallel \
+               -I$(top_builddir)/src/moab \
+               -I$(top_srcdir)/src/moab \
+               -I$(top_srcdir)/src/parallel/moab
 
-# Subdirectories to build
-SUBDIRS = 
-
-# Things to build
-noinst_LTLIBRARIES = libMOABpar.la
-         
-# Some variables
-DEFS = $(DEFINES) -DIS_BUILDING_MB -DSRCDIR=$(srcdir)
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir)/../mhdf/inc
-
-# The directory in which to install headers
-libMOABpar_la_includedir = $(includedir)
-
 # Run parallel tests in parallel
 if USE_MPIEXEC
   OLD_ENVIRONMENT := ${TESTS_ENVIRONMENT}
-  TESTS_ENVIRONMENT = ${MPIEXEC} ${MPIEXEC_NP} ${NP} ${OLD_ENVIRONMENT}
+  TESTS_ENVIRONMENT = ${MPIEXEC} ${MPIEXEC_NP} ${NP} ${OLD_ENVIRONMENT} 
 endif
 
-# Conditional sources
-MOAB_PARALLEL_SRCS =
-MOAB_PARALLEL_HDRS =
-MOAB_PARALLEL_TEST = 
-MOAB_PARALLEL_CHECK = 
-if PARALLEL
-# The list of source files, and any header files that do not need to be installed
-  MOAB_PARALLEL_SRCS += \
-     MBParallelComm.cpp \
-     MBProcConfig.cpp \
-     MBParallelData.cpp \
-     ReadParallel.cpp \
-     crystal.c errmem.c \
-     transfer.c gs.c gs.h tuple_list.c \
-     tuple_list.h \
-     sort.c sort.h minmax.h transfer.h sort_imp.c
+TESTS = pcomm_unit \
+        parallel_unit_tests \
+        uber_parallel_test \
+        scdtest \
+        pcomm_serial \
+        $(HDF5_TESTS)
 
-# The list of header files which are to be installed
-  MOAB_PARALLEL_HDRS += \
-     MBmpi.h MBmpi_config.h \
-     MBParallelComm.hpp \
-     MBProcConfig.hpp \
-     MBParallelData.hpp \
-     ReadParallel.hpp \
-     crystal.h errmem.h types.h
-
-  MOAB_PARALLEL_TEST += pcomm_unit parallel_unit_tests uber_parallel_test scdtest pcomm_serial
-
 if PARALLEL_HDF5
-#  libMOABpar_la_LIBADD = $(top_builddir)/mhdf/libmhdf.la
-  INCLUDES += -I$(top_srcdir)/mhdf/include
-  MOAB_PARALLEL_SRCS += WriteHDF5Parallel.cpp 
-  MOAB_PARALLEL_HDRS += WriteHDF5Parallel.hpp
-  
-  MOAB_PARALLEL_TEST += parallel_hdf5_test mhdf_parallel parallel_write_test
+  AM_CPPFLAGS += -I$(top_srcdir)/mhdf/include
+  HDF5_TESTS = parallel_hdf5_test mhdf_parallel parallel_write_test
+else
+  HDF5_TESTS = 
 endif
 
-  MOAB_PARALLEL_CHECK += mbparallelcomm_test
-  mbparallelcomm_test_SOURCES = mbparallelcomm_test.cpp
-  mbparallelcomm_test_LDADD = $(top_builddir)/libMOAB.la
-  mbparallelcomm_test_DEPENDENCIES = $(mbparallelcomm_test_LDADD)
+check_PROGRAMS = $(TESTS) mbparallelcomm_test
 
-endif
-
-# The list of source files, and any header files that do not need to be installed
-libMOABpar_la_SOURCES = \
-   $(MOAB_PARALLEL_SRCS)
-
-# The list of header files which are to be installed
-libMOABpar_la_include_HEADERS = \
-  $(MOAB_PARALLEL_HDRS)
-
-# Tests and such
-
-check_PROGRAMS = $(MOAB_PARALLEL_CHECK) $(MOAB_PARALLEL_TEST)
-TESTS = $(MOAB_PARALLEL_TEST)
 pcomm_unit_SOURCES = pcomm_unit.cpp
-pcomm_unit_LDADD = $(top_builddir)/libMOAB.la
 parallel_hdf5_test_SOURCES = parallel_hdf5_test.cc
-parallel_hdf5_test_LDADD = ../libMOAB.la
 mhdf_parallel_SOURCES = mhdf_parallel.c
-mhdf_parallel_LDADD = ../mhdf/libmhdf.la
 parallel_unit_tests_SOURCES = parallel_unit_tests.cpp
-parallel_unit_tests_LDADD = ../libMOAB.la
 parallel_write_test_SOURCES = parallel_write_test.cc
-parallel_write_test_LDADD = ../libMOAB.la
 uber_parallel_test_SOURCES = uber_parallel_test.cpp
-uber_parallel_test_LDADD = ../libMOAB.la
 pcomm_serial_SOURCES = pcomm_serial.cpp
-pcomm_serial_LDADD = ../libMOAB.la
-
+mbparallelcomm_test_SOURCES = mbparallelcomm_test.cpp
 scdtest_SOURCES = scdtest.cpp
-scdtest_LDADD = ../libMOAB.la
 
-
 # Other files to clean up (e.g. output from tests)
 MOSTLYCLEANFILES = mhdf_ll.h5m
 
-EXTRA_DIST = ptest.cub
-
+EXTRA_DIST = ptest.cub \
+             64bricks_512hex.h5m 
+             

Modified: MOAB/trunk/test/parallel/parallel_unit_tests.cpp
===================================================================
--- MOAB/trunk/test/parallel/parallel_unit_tests.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/parallel/parallel_unit_tests.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -173,9 +173,9 @@
 
   if (!filename) {
 #ifdef SRCDIR
-    filename = STRINGIFY(SRCDIR) "/../test/64bricks_512hex.h5m";
+    filename = STRINGIFY(SRCDIR) "/64bricks_512hex.h5m";
 #else
-    filename = "../test/64bricks_512hex.h5m";
+    filename = "64bricks_512hex.h5m";
 #endif
   }
 

Modified: MOAB/trunk/test/parallel/uber_parallel_test.cpp
===================================================================
--- MOAB/trunk/test/parallel/uber_parallel_test.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/parallel/uber_parallel_test.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -77,9 +77,9 @@
     filename = argv[1];
   else {
 #ifdef SRCDIR
-    filename = STRINGIFY(SRCDIR) "/../test/64bricks_512hex.h5m";
+    filename = STRINGIFY(SRCDIR) "/64bricks_512hex.h5m";
 #else
-    filename = "../test/64bricks_512hex.h5m";
+    filename = "/64bricks_512hex.h5m";
 #endif
   }
   

Modified: MOAB/trunk/test/perf/Makefile.am
===================================================================
--- MOAB/trunk/test/perf/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/test/perf/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,12 +1,11 @@
 
-DEFS = $(DEFINES)
-INCLUDES += -I$(top_srcdir) \
-            -I$(top_srcdir)/mhdf/include \
-            -I$(top_builddir) \
-            -I$(top_srcdir)/tools/iMesh \
-            -I$(top_builddir)/tools/iMesh
+AM_CPPFLAGS += -I$(top_srcdir)/src \
+               -I$(top_srcdir)/src/io/mhdf/include \
+               -I$(top_builddir)/src \
+               -I$(top_srcdir)/src/moab \
+               -I$(top_builddir)/src/moab
             
-LDADD = $(top_builddir)/libMOAB.la
+LDADD = $(top_builddir)/src/libMOAB.la
 
 check_PROGRAMS = perf seqperf adj_time
 noinst_PROGRAMS = point_in_elem

Modified: MOAB/trunk/tools/Makefile.am
===================================================================
--- MOAB/trunk/tools/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,11 +1,15 @@
 AUTOMAKE_OPTIONS = foreign
-DEFS = $(DEFINES)
-INCLUDES += -I$(top_srcdir) \
-            -I$(top_builddir) \
-            -I$(top_srcdir)/parallel \
-            -I$(top_builddir)/parallel
-LDADD = $(top_builddir)/libMOAB.la
+AM_CPPFLAGS += -I$(top_srcdir)/src \
+               -I$(top_builddir)/src \
+               -I$(top_srcdir)/src/parallel \
+               -I$(top_builddir)/src/parallel \
+               -I$(top_srcdir)/src/moab \
+               -I$(top_builddir)/src/moab \
+               -I$(top_srcdir)/src/parallel/moab \
+               -I$(top_builddir)/src/parallel/moab 
 
+LDADD = $(top_builddir)/src/libMOAB.la
+
 # For old (pre 1.10.x) versions of Automake
 docdir = @docdir@
 
@@ -109,21 +113,7 @@
   dagmc_DIR = 
 endif 
 
-if ENABLE_imesh
-  imesh_DIR = iMesh
-else
-  imesh_DIR = 
-endif 
-
-if ENABLE_igeom
-  igeom_DIR = iGeom
-else
-  igeom_DIR = 
-endif 
-
-SUBDIRS = $(imesh_DIR) \
-          $(igeom_DIR) \
-          $(mbchaco_DIR) \
+SUBDIRS = $(mbchaco_DIR) \
           $(mbcoupler_DIR) \
           $(mbzoltan_DIR) \
           $(mbperf_DIR) \
@@ -132,28 +122,28 @@
           $(dagmc_DIR)
 
 mbconvert_SOURCES = convert.cpp
-mbconvert_DEPENDENCIES = $(top_builddir)/libMOAB.la
+mbconvert_DEPENDENCIES = $(LDADD)
 
 mbgsets_SOURCES = gsets.cc
-mbgsets_DEPENDENCIES = $(top_builddir)/libMOAB.la
+mbgsets_DEPENDENCIES = $(LDADD)
 
 hexmodops_SOURCES = makeops.cpp
-hexmodops_DEPENDENCIES = $(top_builddir)/libMOAB.la
+hexmodops_DEPENDENCIES = $(LDADD)
 
 mbsize_SOURCES = measure.cpp measure.hpp size.cpp
-mbsize_DEPENDENCIES = $(top_builddir)/libMOAB.la
+mbsize_DEPENDENCIES = $(LDADD)
 
 mbskin_SOURCES = skin.cpp
-mbskin_DEPENDENCIES = $(top_builddir)/libMOAB.la
+mbskin_DEPENDENCIES = $(LDADD)
 
 mbdepth_SOURCES = depth.cpp
-mbdepth_DEPENDENCIES = $(top_builddir)/libMOAB.la
+mbdepth_DEPENDENCIES = $(LDADD)
 
 spheredecomp_SOURCES = SphereDecomp.hpp SphereDecomp.cpp main.cpp
-spheredecomp_DEPENDENCIES = $(top_builddir)/libMOAB.la
+spheredecomp_DEPENDENCIES = $(LDADD)
 
 mbsurfplot_SOURCES = surfplot.cpp
-mbsurfplot_DEPENDENCIES = $(top_builddir)/libMOAB.la
+mbsurfplot_DEPENDENCIES = $(LDADD)
 
 mbtagprop_SOURCES = parse.cpp parse.hpp propagate_tags.cpp
-mbtagprop_DEPENDENCIES = $(top_builddir)/libMOAB.la
+mbtagprop_DEPENDENCIES = $(LDADD)

Modified: MOAB/trunk/tools/dagmc/Makefile.am
===================================================================
--- MOAB/trunk/tools/dagmc/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/dagmc/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,17 +1,14 @@
-AUTOMAKE_OPTIONS = foreign
+AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src \
+               -I$(top_srcdir)/src/moab -I$(top_builddir)/src/moab
 
-DEFS = $(DEFINES)
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) 
-
 lib_LTLIBRARIES = libdagmc.la
 libdagmc_la_SOURCES = DagMC.cpp
 libdagmc_la_includedir = $(includedir)
 libdagmc_la_include_HEADERS = cubfile.h DagMC.hpp
 
 if HAVE_CGM
-INCLUDES += $(CGM_INCLUDES)
-CPPFLAGS += $(CGM_CPPFLAGS) -DCGM $(MOAB_CGM_DEFINES)
-CXXFLAGS += $(CGM_CXXFLAGS)
+AM_CPPFLAGS += $(CGM_INCLUDES) $(CGM_CPPFLAGS) -DCGM $(MOAB_CGM_DEFINES)
+AM_CXXFLAGS += $(CGM_CXXFLAGS)
 
 if NETCDF_FILE
   noinst_PROGRAMS = update_coords quads_to_tris
@@ -19,8 +16,8 @@
 bin_PROGRAMS = cgm2moab
 cgm2moab_SOURCES = main.cc cubfile.c
 cgm2moab_LDFLAGS = $(CGM_LTFLAGS) $(CGM_LDLFAGS)
-cgm2moab_LDADD = libdagmc.la $(top_builddir)/libMOAB.la $(CGM_LIBS)
-cgm2moab_DEPENDENCIES = libdagmc.la $(top_builddir)/libMOAB.la
+cgm2moab_LDADD = $(LDADD) 
+cgm2moab_DEPENDENCIES = libdagmc.la $(top_builddir)/src/libMOAB.la
 cgm2moabman = cgm2moab.man
 else
 cgm2moabman=
@@ -33,22 +30,18 @@
 CGM_LTFLAGS = @CGM_LTFLAGS@
 CGM_LIBS = @CGM_LIBS@
 
+LDADD = libdagmc.la $(top_builddir)/src/libMOAB.la  $(CGM_LDFLAGS) $(CGM_LIBS)
+
 TESTS = test_geom 
 check_PROGRAMS = $(TESTS) pt_vol_test ray_fire_test
 
 quads_to_tris_SOURCES = quads_to_tris_driver.cpp quads_to_tris.cpp
-quads_to_tris_LDADD = $(top_builddir)/libMOAB.la
+quads_to_tris_LDADD = $(top_builddir)/src/libMOAB.la
 
 test_geom_SOURCES = test_geom.cc
-test_geom_LDADD = libdagmc.la $(top_builddir)/libMOAB.la $(CGM_LTFLAGS)  $(CGM_LDFLAGS) $(CGM_LIBS)
 
-if NETCDF_FILE
-  update_coords_SOURCES = cub2h5m.cc quads_to_tris.cpp quads_to_tris.hpp
-  update_coords_LDADD = libdagmc.la $(top_builddir)/libMOAB.la $(CGM_LTFLAGS) $(CGM_LDFLAGS) $(CGM_LIBS)
-endif
+update_coords_SOURCES = cub2h5m.cc quads_to_tris.cpp quads_to_tris.hpp
 
 pt_vol_test_SOURCES = pt_vol_test.cc
-pt_vol_test_LDADD = libdagmc.la $(top_builddir)/libMOAB.la $(CGM_LTFLAGS)  $(CGM_LDFLAGS) $(CGM_LIBS)
 
 ray_fire_test_SOURCES = ray_fire_test.cc
-ray_fire_test_LDADD = libdagmc.la $(top_builddir)/libMOAB.la $(CGM_LTFLAGS)  $(CGM_LDFLAGS) $(CGM_LIBS)

Modified: MOAB/trunk/tools/mbchaco/Makefile.am
===================================================================
--- MOAB/trunk/tools/mbchaco/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/mbchaco/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,9 +1,7 @@
-AUTOMAKE_OPTIONS = foreign
-
-DEFS = $(DEFINES)
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) $(CHACO_INCLUDES)
+AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src $(CHACO_INCLUDES) \
+               -I$(top_srcdir)/src/moab -I$(top_builddir)/src/moab
 bin_PROGRAMS = mbchaco
 mbchaco_SOURCES = ComputePartition.hpp ComputePartition.cpp main.cpp
-LDADD = $(top_builddir)/libMOAB.la $(CHACO_LIBS)
+LDADD = $(top_builddir)/src/libMOAB.la $(CHACO_LIBS)
 
-mbchaco_DEPENDENCIES = $(top_builddir)/libMOAB.la
+mbchaco_DEPENDENCIES = $(top_builddir)/src/libMOAB.la

Modified: MOAB/trunk/tools/mbcoupler/MBCoupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/MBCoupler.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/mbcoupler/MBCoupler.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -13,6 +13,7 @@
 #include "minmax.h"
 #include "sort.h"
 #include "tuple_list.h"
+#include "crystal.h"
 #include "transfer.h"
 }
 

Modified: MOAB/trunk/tools/mbcoupler/Makefile.am
===================================================================
--- MOAB/trunk/tools/mbcoupler/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/mbcoupler/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,10 +1,13 @@
-AUTOMAKE_OPTIONS = foreign
+AM_CPPFLAGS += -I$(top_srcdir)/src \
+               -I$(top_builddir)/src \
+               -I$(top_srcdir)/src/parallel \
+               -I$(top_srcdir)/src/moab \
+               -I$(top_builddir)/src/moab \
+               -I$(top_srcdir)/src/parallel/moab \
+               -I$(top_srcdir)/test
 
-DEFS = $(DEFINES)
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/parallel
-
 lib_LTLIBRARIES = libmbcoupler.la
-libmbcoupler_la_LIBADD = $(top_builddir)/libMOAB.la
+libmbcoupler_la_LIBADD = $(top_builddir)/src/libMOAB.la
 
 LDADD = libmbcoupler.la 
 
@@ -40,12 +43,12 @@
 findpt_test_SOURCES = findpt_test.cpp
 elem_util_test_SOURCES = ElemUtilTest.cpp
 
-bin_PROGRAMS = 
+noinst_PROGRAMS = 
 if PARALLEL
 #  TESTS += mbcoupler_test
 #  check_PROGRAMS += mbcoupler_test
-  bin_PROGRAMS += mbcoupler_test
+  noinst_PROGRAMS += mbcoupler_test
   mbcoupler_test_SOURCES = mbcoupler_test.cpp
-  INCLUDES += -I$(srcdir)/parallel
+  AM_CPPFLAGS += -I$(srcdir)/parallel
 endif
 

Modified: MOAB/trunk/tools/mbperf/Makefile.am
===================================================================
--- MOAB/trunk/tools/mbperf/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/mbperf/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,16 +1,5 @@
-AUTOMAKE_OPTIONS = foreign
-DEFS = $(DEFINES) -DIS_BUILDING_MB
+LDADD = $(top_builddir)/src/libMOAB.la
 
-LDADD = $(top_builddir)/libMOAB.la
-
-if USE_BABEL
-  babel_includes = -I$(BABEL_DIR)/include
-  babel_progs = mbperf_SIDL
-else
-  babel_includes = 
-  babel_progs = 
-endif
-
 if ENABLE_imesh
   imesh_progs = mbperf_iMesh
 else
@@ -18,21 +7,21 @@
 endif 
 
 
-INCLUDES += -I$(top_srcdir) \
-            -I$(top_builddir) \
-            -I$(top_srcdir)/tools/iMesh \
-            -I$(top_srcdir)/tools/iMesh/SIDL/mserver \
-            -I../iMesh/SIDL/mserver \
-            -I../iMesh \
-            $(babel_includes)
+AM_CPPFLAGS += -DIS_BUILDING_MB \
+            -I$(top_srcdir)/src \
+            -I$(top_builddir)/src \
+            -I$(top_srcdir)/itaps \
+            -I$(top_srcdir)/itaps/imesh \
+            -I$(top_builddir)/itaps \
+            -I$(top_builddir)/itaps/imesh \
+            -I$(top_srcdir)/src/moab \
+            -I$(top_builddir)/src/moab
 
-bin_PROGRAMS = mbperf $(babel_progs) $(imesh_progs)
+bin_PROGRAMS = mbperf $(imesh_progs)
 
 mbperf_SOURCES = mbperf.cpp
-mbperf_SIDL_SOURCES = mbperf_SIDL.cpp
 mbperf_iMesh_SOURCES = mbperf_iMesh.cpp
 
-mbperf_iMesh_LDADD = $(LDADD) ../iMesh/libiMesh.la 
-mbperf_SIDL_LDADD = $(mbperf_iMesh_LDADD) ../iMesh/SIDL/mserver/libiMeshserver.la
+mbperf_iMesh_LDADD = $(LDADD) $(top_builddir)/itaps/imesh/libiMesh.la 
 
 

Modified: MOAB/trunk/tools/mbzoltan/MBZoltan.cpp
===================================================================
--- MOAB/trunk/tools/mbzoltan/MBZoltan.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/mbzoltan/MBZoltan.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -30,7 +30,7 @@
 #include "MBRange.hpp"
 #include "MBWriteUtilIface.hpp"
 #include "MeshTopoUtil.hpp"
-#include "parallel/MBParallelComm.hpp"
+#include "MBParallelComm.hpp"
 #include "MBTagConventions.hpp"
 #include "MBCN.hpp"
 

Modified: MOAB/trunk/tools/mbzoltan/Makefile.am
===================================================================
--- MOAB/trunk/tools/mbzoltan/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/mbzoltan/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,14 +1,15 @@
-AUTOMAKE_OPTIONS = foreign
-DEFS = $(DEFINES) -DIS_BUILDING_MB
+LDADD = $(top_builddir)/src/libMOAB.la $(ZOLTAN_LIB_FLAGS) $(ZOLTAN_LIBS)
 
-LDADD = $(top_builddir)/libMOAB.la $(ZOLTAN_LIB_FLAGS) $(ZOLTAN_LIBS)
-
-INCLUDES += -I$(top_srcdir) \
-            -I$(top_srcdir)/parallel \
-            -I$(top_builddir) \
-            $(ZOLTAN_INC_FLAGS)
+AM_CPPFLAGS += -DIS_BUILDING_MB\
+               -I$(top_srcdir)/src \
+               -I$(top_srcdir)/src/parallel \
+               -I$(top_builddir)/src \
+               -I$(top_srcdir)/src/moab \
+               -I$(top_srcdir)/src/parallel/moab \
+               -I$(top_builddir)/src/moab \
+               $(ZOLTAN_INC_FLAGS)
 bin_PROGRAMS = mbzoltan
 mbzoltan_SOURCES = MBZoltan.cpp MBZoltan.hpp main.cpp
-mbzoltan_DEPENDENCIES = $(top_builddir)/libMOAB.la
+mbzoltan_DEPENDENCIES = $(top_builddir)/src/libMOAB.la
 
 

Modified: MOAB/trunk/tools/mcnpmit/Makefile.am
===================================================================
--- MOAB/trunk/tools/mcnpmit/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/mcnpmit/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,9 +1,9 @@
-AUTOMAKE_OPTIONS = foreign
-DEFS = $(DEFINES)
+LDADD = $(top_builddir)/src/libMOAB.la \
+        $(top_builddir)/tools/mbcoupler/libmbcoupler.la
 
-LDADD = $(top_builddir)/libMOAB.la $(top_builddir)/tools/mbcoupler/libmbcoupler.la
+AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/tools/mbcoupler \
+               -I$(top_srcdir)/src/moab -I$(top_builddir)/src/moab
 
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/tools/mbcoupler
 bin_PROGRAMS = mcnpmit
 mcnpmit_SOURCES = mcnpmit.hpp mcnpmit.cpp main.cpp
-mcnpmit_DEPENDENCIES = $(top_builddir)/libMOAB.la $(top_builddir)/tools/mbcoupler/libmbcoupler.la
+mcnpmit_DEPENDENCIES = ../../src/libMOAB.la ../mbcoupler/libmbcoupler.la

Modified: MOAB/trunk/tools/mcnpmit/main.cpp
===================================================================
--- MOAB/trunk/tools/mcnpmit/main.cpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/mcnpmit/main.cpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -148,10 +148,10 @@
   }
   else {
 
-    MBresult = MBI->create_meshset( MESHSET_SET, meshset );
+    meshset = 0;
+    MBresult = MBI->load_file( CAD_filename.c_str(), &meshset );
     assert( MB_SUCCESS == MBresult );
-    MBresult = MBI->load_file( CAD_filename.c_str(), meshset );
-    assert( MB_SUCCESS == MBresult );
+    assert( 0 != meshset );
 
     MBRange cfd_verts;
     MBresult = MBI->get_entities_by_type( meshset, MBVERTEX, cfd_verts, true);

Modified: MOAB/trunk/tools/mcnpmit/mcnpmit.hpp
===================================================================
--- MOAB/trunk/tools/mcnpmit/mcnpmit.hpp	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/mcnpmit/mcnpmit.hpp	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,4 +1,5 @@
 #include "MBCore.hpp"
+#include "MBRange.hpp"
 #include <iostream>
 #define MCNP mc_instance()
 #define BOXMIN_TAG "BOXMIN_TAG"

Modified: MOAB/trunk/tools/qvdual/Makefile.am
===================================================================
--- MOAB/trunk/tools/qvdual/Makefile.am	2010-03-10 17:44:20 UTC (rev 3578)
+++ MOAB/trunk/tools/qvdual/Makefile.am	2010-03-10 18:12:47 UTC (rev 3579)
@@ -1,7 +1,5 @@
-AUTOMAKE_OPTIONS = foreign
-
-DEFS = $(DEFINES)
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) $(QVDUAL_INCLUDES)
+AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src $(QVDUAL_INCLUDES) \
+               -I$(top_srcdir)/src/moab -I$(top_builddir)/src/moab
 bin_PROGRAMS = qvdual
 qvdual_SOURCES = \
   CropTool.cpp \
@@ -29,9 +27,9 @@
   moc_SheetDiagramPopup.o
 
 
-LDADD = $(extra_depends) $(QVDUAL_LIBS) $(top_builddir)/libMOAB.la 
+LDADD = $(extra_depends) $(QVDUAL_LIBS) $(top_builddir)/src/libMOAB.la 
 AM_LDFLAGS = -R $(VTK_LIB_DIR)
-qvdual_DEPENDENCIES = $(extra_depends) $(top_builddir)/libMOAB.la
+qvdual_DEPENDENCIES = $(extra_depends) $(top_builddir)/src/libMOAB.la
 
 uiQVDual.cpp: uiQVDual.h uiQVDual.ui 
 	$(UIC) -impl uiQVDual.h -o $@ uiQVDual.ui 



More information about the moab-dev mailing list