Skip to content

Commit

Permalink
more robust tecplot binary blob handling for static libraries
Browse files Browse the repository at this point in the history
benkirk committed Feb 14, 2013

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 530a642 commit c307b52
Showing 108 changed files with 1,152 additions and 415 deletions.
6 changes: 0 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -18,18 +18,12 @@ AM_CPPFLAGS = -DLIBMESH_IS_COMPILING_ITSELF \

LIBS = $(libmesh_optional_LIBS)

if LIBMESH_ENABLE_TECPLOT
LIBS += @TECPLOT_LIBRARY@
endif

# additional files which must be included in 'make dist'
EXTRA_DIST = reference_elements \
include/include_HEADERS \
include/rebuild_include_HEADERS.sh \
src/libmesh_SOURCES \
src/rebuild_libmesh_SOURCES.sh \
contrib/tecplot/include \
contrib/tecplot/lib \
contrib/tecplot/README \
contrib/bin/strip_dup_incl_paths.pl \
contrib/bin/strip_dup_libs.pl
41 changes: 19 additions & 22 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -57,7 +57,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@LIBMESH_ENABLE_TECPLOT_TRUE@am__append_1 = @TECPLOT_LIBRARY@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/src/libmesh_SOURCES \
$(top_srcdir)/build-aux/config.guess \
@@ -80,21 +79,21 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
COPYING ChangeLog INSTALL NEWS build-aux/config.guess \
build-aux/config.sub build-aux/depcomp build-aux/install-sh \
build-aux/ltmain.sh build-aux/missing build-aux/ylwrap
@LIBMESH_DBG_MODE_TRUE@am__append_2 = libmesh_dbg.la
@LIBMESH_DEVEL_MODE_TRUE@am__append_3 = libmesh_devel.la
@LIBMESH_OPT_MODE_TRUE@am__append_4 = libmesh_opt.la
@LIBMESH_PROF_MODE_TRUE@am__append_5 = libmesh_prof.la
@LIBMESH_OPROF_MODE_TRUE@am__append_6 = libmesh_oprof.la
@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_7 = tests
@LIBMESH_DBG_MODE_TRUE@am__append_1 = libmesh_dbg.la
@LIBMESH_DEVEL_MODE_TRUE@am__append_2 = libmesh_devel.la
@LIBMESH_OPT_MODE_TRUE@am__append_3 = libmesh_opt.la
@LIBMESH_PROF_MODE_TRUE@am__append_4 = libmesh_prof.la
@LIBMESH_OPROF_MODE_TRUE@am__append_5 = libmesh_oprof.la
@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_6 = tests
bin_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_4) $(am__EXEEXT_6)
@LIBMESH_OPT_MODE_TRUE@am__append_8 = $(opt_programs)
@LIBMESH_DEVEL_MODE_TRUE@am__append_9 = $(devel_programs)
@LIBMESH_DBG_MODE_TRUE@am__append_10 = $(dbg_programs)
@LIBMESH_OPT_MODE_TRUE@am__append_7 = $(opt_programs)
@LIBMESH_DEVEL_MODE_TRUE@am__append_8 = $(devel_programs)
@LIBMESH_DBG_MODE_TRUE@am__append_9 = $(dbg_programs)

###########################################################
# Examples
@LIBMESH_ENABLE_EXAMPLES_TRUE@am__append_11 = examples
@CODE_COVERAGE_ENABLED_TRUE@am__append_12 = src/apps/*.gcda src/apps/*.gcno
@LIBMESH_ENABLE_EXAMPLES_TRUE@am__append_10 = examples
@CODE_COVERAGE_ENABLED_TRUE@am__append_11 = src/apps/*.gcda src/apps/*.gcno
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_rtti.m4 \
@@ -178,7 +177,7 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(datadir)" "$(DESTDIR)$(pkgconfigdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
@LIBMESH_DBG_MODE_TRUE@libmesh_dbg_la_DEPENDENCIES = \
@LIBMESH_DBG_MODE_TRUE@ contrib/libcontrib_dbg.la \
@LIBMESH_DBG_MODE_TRUE@ $(am__DEPENDENCIES_2)
@@ -3981,7 +3980,7 @@ LDFLAGS = @LDFLAGS@
LIBHILBERT_INCLUDE = @LIBHILBERT_INCLUDE@
LIBHILBERT_LIBRARY = @LIBHILBERT_LIBRARY@
LIBOBJS = @LIBOBJS@
LIBS = $(libmesh_optional_LIBS) $(am__append_1)
LIBS = $(libmesh_optional_LIBS)
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -4058,8 +4057,6 @@ TBB_INCLUDE = @TBB_INCLUDE@
TBB_LIBRARY = @TBB_LIBRARY@
TECIO_CPPFLAGS = @TECIO_CPPFLAGS@
TECIO_INCLUDE = @TECIO_INCLUDE@
TECPLOT_INCLUDE = @TECPLOT_INCLUDE@
TECPLOT_LIBRARY = @TECPLOT_LIBRARY@
TETGEN_INCLUDE = @TETGEN_INCLUDE@
TETGEN_LIBRARY = @TETGEN_LIBRARY@
TPETRA_INCLUDES = @TPETRA_INCLUDES@
@@ -4123,6 +4120,7 @@ libmesh_CFLAGS = @libmesh_CFLAGS@
libmesh_CPPFLAGS = @libmesh_CPPFLAGS@
libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
libmesh_installed_LIBS = @libmesh_installed_LIBS@
libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
libmesh_optional_LIBS = @libmesh_optional_LIBS@
libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
@@ -4175,7 +4173,7 @@ vtkversion = @vtkversion@
# test/common/Makefile.in \
# test/comp_ns/Makefile.in \
# test/unit/Makefile.in
SUBDIRS = include contrib $(am__append_7) $(am__append_11)
SUBDIRS = include contrib $(am__append_6) $(am__append_10)
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = $(libmesh_CFLAGS)
@@ -4193,8 +4191,7 @@ AM_CPPFLAGS = -DLIBMESH_IS_COMPILING_ITSELF \
# additional files which must be included in 'make dist'
EXTRA_DIST = reference_elements include/include_HEADERS \
include/rebuild_include_HEADERS.sh src/libmesh_SOURCES \
src/rebuild_libmesh_SOURCES.sh contrib/tecplot/include \
contrib/tecplot/lib contrib/tecplot/README \
src/rebuild_libmesh_SOURCES.sh contrib/tecplot/README \
contrib/bin/strip_dup_incl_paths.pl \
contrib/bin/strip_dup_libs.pl contrib/bin/make_dependencies.pl
nobase_data_DATA = \
@@ -4651,8 +4648,8 @@ libmesh_SOURCES = \
# A convenience library to hold proper libMesh
# objects. This will get appended with any contributed
# sources to create the final library.
lib_LTLIBRARIES = $(am__append_2) $(am__append_3) $(am__append_4) \
$(am__append_5) $(am__append_6)
lib_LTLIBRARIES = $(am__append_1) $(am__append_2) $(am__append_3) \
$(am__append_4) $(am__append_5)
@LIBMESH_DBG_MODE_TRUE@libmesh_dbg_la_SOURCES = $(libmesh_SOURCES)
@LIBMESH_DBG_MODE_TRUE@libmesh_dbg_la_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
@LIBMESH_DBG_MODE_TRUE@libmesh_dbg_la_CXXFLAGS = $(CXXFLAGS_DBG)
@@ -4679,7 +4676,7 @@ lib_LTLIBRARIES = $(am__append_2) $(am__append_3) $(am__append_4) \
@LIBMESH_OPROF_MODE_TRUE@libmesh_oprof_la_CFLAGS = $(CFLAGS_OPROF)
@LIBMESH_OPROF_MODE_TRUE@libmesh_oprof_la_LIBADD = contrib/libcontrib_oprof.la $(LIBS)
bin_SCRIPTS = # empty, append below
CLEANFILES = $(am__append_12)
CLEANFILES = $(am__append_11)

###########################################################
# Utility programs
78 changes: 19 additions & 59 deletions configure
Original file line number Diff line number Diff line change
@@ -646,6 +646,7 @@ GIT_CHECKOUT_TRUE
BUILD_DEVSTATUS
GIT_REVISION
gitquery
libmesh_installed_LIBS
libmesh_pkgconfig_requires
libmesh_contrib_INCLUDES
libmesh_optional_LIBS
@@ -751,8 +752,6 @@ BUILD_METIS_FALSE
BUILD_METIS_TRUE
LIBMESH_ENABLE_TECPLOT_FALSE
LIBMESH_ENABLE_TECPLOT_TRUE
TECPLOT_INCLUDE
TECPLOT_LIBRARY
LIBMESH_ENABLE_TECIO_FALSE
LIBMESH_ENABLE_TECIO_TRUE
TECIO_CPPFLAGS
@@ -1093,7 +1092,6 @@ enable_bzip2
enable_xz
enable_tecio
enable_tecplot
with_tecplot
enable_metis
with_metis
enable_parmetis
@@ -1909,7 +1907,6 @@ Optional Packages:
installed
--with-tbb-lib=PATH Specify the path to Threading Building Blocks
libraries
--with-tecplot=PATH Specify the path where Tecplot is installed
--with-metis=<internal,PETSc>
metis to use. interal: build from contrib. PETSc:
rely on PETSc
@@ -27043,11 +27040,16 @@ $as_echo "---------------------------------------------" >&6; }
#
# libmesh_pkgconfig_requires is a list of pkgconfig requirements
# we will add
#
# libmesh_installed_LIBS are libraries that we install and need to
# link with, usually not needed. presently only for Tecplot's binary
# library blob
libmesh_optional_INCLUDES=""
libmesh_optional_LIBS=""
libmesh_contrib_INCLUDES=""
libmesh_subpackage_arguments=""
libmesh_pkgconfig_requires=""
libmesh_installed_LIBS=""

# --------------------------------------------------------------
# Allow for disable-optional
@@ -30528,66 +30530,27 @@ $as_echo ">>> Not using vendor provided tecio libraries, deferring to source bui
fi


# The Tecplot API is distributed with libmesh, but we want to support external installations
# on platforms we may not have the binaries for...
# The Tecplot API is distributed with libmesh.
if (test $enabletecplot = yes); then

# Check whether --with-tecplot was given.
if test "${with_tecplot+set}" = set; then :
withval=$with_tecplot; withtecplot=$withval
else
withtecplot=no
fi


# unspecified - look in contrib
if test "$withtecplot" = no ; then
# We will check to see if we can actually link against the Tecplot library momentarily,
# now we just see if the file exists, without using AC_CHECK_FILE!
TECPLOT_LIBRARY_PATH=""
if (test -r $top_srcdir/contrib/tecplot/lib/$host/tecio.a) ; then
TECPLOT_LIBRARY_PATH=$top_srcdir/contrib/tecplot/lib/$host
if (test -r $top_srcdir/contrib/tecplot/binary/lib/$host/tecio.a) ; then
TECPLOT_LIBRARY_PATH=$top_srcdir/contrib/tecplot/binary/lib/$host
fi

# Note: AC_CHECK_HEADER seems to fail if the path to the header
# is a relative one, i.e containing ".." in it. We'll work around this
# by setting the relevant path in $CPPFLAGS.
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$top_srcdir/contrib/tecplot/include"

ac_fn_cxx_check_header_mongrel "$LINENO" "TECIO.h" "ac_cv_header_TECIO_h" "$ac_includes_default"
if test "x$ac_cv_header_TECIO_h" = xyes; then :

TECPLOT_INCLUDE_PATH=$top_srcdir/contrib/tecplot/include
TECPLOT_INCLUDE="-I\$(top_srcdir)/contrib/tecplot/include"

fi



# Reset CPPFLAGS
CPPFLAGS="$old_CPPFLAGS"

# And don't step on anybody's toes
unset old_CPPFLAGS

# specified - look there
else
TECPLOT_LIBRARY_PATH=""
if (test -r $withtecplot/lib/tecio.a) ; then
TECPLOT_LIBRARY_PATH=$withtecplot/lib
fi

# To check for TECIO.h, use the CPPFLAGS trick, just in case the
# user specified a relative path for $withtecplot.
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$withtecplot/include"
CPPFLAGS="$CPPFLAGS -I$top_srcdir/contrib/tecplot/binary/include"

ac_fn_cxx_check_header_mongrel "$LINENO" "TECIO.h" "ac_cv_header_TECIO_h" "$ac_includes_default"
if test "x$ac_cv_header_TECIO_h" = xyes; then :

TECPLOT_INCLUDE_PATH=$withtecplot/include
TECPLOT_INCLUDE="-I$withtecplot/include"
TECPLOT_INCLUDE_PATH=$top_srcdir/contrib/tecplot/binary/include
TECPLOT_INCLUDE="-I\$(top_srcdir)/contrib/tecplot/binary/include"

fi

@@ -30598,9 +30561,9 @@ fi

# And don't step on anybody's toes
unset old_CPPFLAGS
fi
fi

if (test -r $TECPLOT_LIBRARY_PATH/tecio.a -a -r $TECPLOT_INCLUDE_PATH/TECIO.h) ; then
if (test -r $TECPLOT_LIBRARY_PATH/tecio.a -a -r $TECPLOT_INCLUDE_PATH/TECIO.h) ; then

#--------------------------------------------------------------------------
# OK, the library and header are there, how about linking with the library?
@@ -30626,9 +30589,6 @@ int ierr = TECEND112 ();
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :

TECPLOT_LIBRARY="\$(top_srcdir)/contrib/tecplot/lib/$host/tecio.a"



$as_echo "#define HAVE_TECPLOT_API 1" >>confdefs.h

@@ -30655,10 +30615,6 @@ int ierr = TECEND ();
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :

TECPLOT_LIBRARY="\$(top_srcdir)/contrib/tecplot/lib/$host/tecio.a"
TECPLOT_INCLUDE=-I$TECPLOT_INCLUDE_PATH



$as_echo "#define HAVE_TECPLOT_API 1" >>confdefs.h

@@ -30683,11 +30639,11 @@ rm -f core conftest.err conftest.$ac_objext \
CPPFLAGS=$save_CPPFLAGS
else
enabletecplot=no
fi
fi

if (test $enabletecplot = yes); then
libmesh_contrib_INCLUDES="$TECPLOT_INCLUDE $libmesh_contrib_INCLUDES"
libmesh_installed_LIBS="$libmesh_installed_LIBS -ltecio_vendor"
fi
if test x$enabletecplot = xyes; then
LIBMESH_ENABLE_TECPLOT_TRUE=
@@ -30697,6 +30653,8 @@ else
LIBMESH_ENABLE_TECPLOT_FALSE=
fi

ac_config_files="$ac_config_files contrib/tecplot/binary/Makefile"

# -------------------------------------------------------------


@@ -32845,6 +32803,7 @@ fi




# Query configuration environment


@@ -34481,6 +34440,7 @@ do
"contrib/sfcurves/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/sfcurves/Makefile" ;;
"contrib/gzstream/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/gzstream/Makefile" ;;
"contrib/tecplot/tecio/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/tecplot/tecio/Makefile" ;;
"contrib/tecplot/binary/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/tecplot/binary/Makefile" ;;
"contrib/metis/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/metis/Makefile" ;;
"contrib/parmetis/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/parmetis/Makefile" ;;
"contrib/tetgen/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/tetgen/Makefile" ;;
11 changes: 6 additions & 5 deletions contrib/Makefile.am
Original file line number Diff line number Diff line change
@@ -109,11 +109,12 @@ endif
# I don't think this actually copies any symbols into
# libcontrib.la because we aren't using them here...
if LIBMESH_ENABLE_TECPLOT
opt_libs += @TECPLOT_LIBRARY@
dbg_libs += @TECPLOT_LIBRARY@
devel_libs += @TECPLOT_LIBRARY@
prof_libs += @TECPLOT_LIBRARY@
oprof_libs += @TECPLOT_LIBRARY@
SUBDIRS += tecplot/binary
opt_libs += tecplot/binary/libtecio.la
dbg_libs += tecplot/binary/libtecio.la
devel_libs += tecplot/binary/libtecio.la
prof_libs += tecplot/binary/libtecio.la
oprof_libs += tecplot/binary/libtecio.la
endif

if LIBMESH_ENABLE_TRIANGLE
Loading

0 comments on commit c307b52

Please sign in to comment.