-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Brian Helfrich
committed
Nov 16, 2007
1 parent
8c5fe87
commit 8bd6a24
Showing
8 changed files
with
166 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
|
||
# | ||
# CHECK_CPPUNIT(MINIMUM-VERSION) | ||
# | ||
|
||
AC_DEFUN([CHECK_CPPUNIT], [ | ||
min_version=$1 | ||
AC_ARG_WITH(cppunit-prefix, | ||
AC_HELP_STRING([--with-cppunit-prefix=PREFIX], | ||
[find CppUnit installed under PREFIX]), | ||
cppunit_prefix="$withval", cppunit_prefix="") | ||
AC_ARG_WITH(cppunit-exec-prefix, | ||
AC_HELP_STRING([--with-cppunit-exec-prefix=EPREFIX], | ||
[the exec prefix where CppUnit binaries were installed]), | ||
cppunit_exec_prefix="$withval", cppunit_exec_prefix="") | ||
if test -n "$cppunit_exec_prefix"; then | ||
AC_PATH_PROG(CPPUNIT_CONFIG_SCRIPT, cppunit-config, no, | ||
"$cppunit_exec_prefix/bin") | ||
else | ||
if test -n "$cppunit_prefix"; then | ||
AC_PATH_PROG(CPPUNIT_CONFIG_SCRIPT, cppunit-config, no, | ||
"$cppunit_prefix/bin") | ||
else | ||
AC_PATH_PROG(CPPUNIT_CONFIG_SCRIPT, cppunit-config, no) | ||
fi | ||
fi | ||
if test "$CPPUNIT_CONFIG_SCRIPT" = "no" ; then | ||
echo "*** CppUnit version $min_version or later is required to build the CppUnit test" | ||
echo "*** suite, but it was not found. Either install the latest CppUnit" | ||
echo "*** (http://cppunit.sourceforge.net/), or" | ||
echo "*** adjust your PATH environment variable or use the --with-cppunit-prefix or" | ||
echo "*** --with-cppunit-exec-prefix options so that the cppunit-config script for" | ||
echo "*** your installation can be found, or don't specify the --enable-cppunit-tests" | ||
echo "*** option." | ||
exit -1 | ||
else | ||
# | ||
# Check version | ||
# | ||
AC_MSG_CHECKING(for CppUnit version >= $min_version) | ||
found_lib_version=`$CPPUNIT_CONFIG_SCRIPT --version` | ||
found_major_version=`echo $found_lib_version | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)[[a-z]]*/\1/'` | ||
found_minor_version=`echo $found_lib_version | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)[[a-z]]*/\2/'` | ||
found_micro_version=`echo $found_lib_version | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)[[a-z]]*/\3/'` | ||
min_major_version=`echo "$min_version" | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
min_minor_version=`echo "$min_version" | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
min_micro_version=`echo "$min_version" | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
version_ok=no | ||
if test $found_major_version -gt $min_major_version; then | ||
version_ok=yes | ||
elif test $found_major_version -eq $min_major_version && \ | ||
test $found_minor_version -gt $min_minor_version; then | ||
version_ok=yes | ||
elif test $found_major_version -eq $min_major_version && \ | ||
test $found_minor_version -eq $min_minor_version && \ | ||
test $found_micro_version -ge $min_micro_version; then | ||
version_ok=yes | ||
fi | ||
if test "$version_ok" = "no"; then | ||
AC_MSG_RESULT(no) | ||
echo "*** CppUnit version $min_version or later is required, but an old version" | ||
echo "*** was found ($found_lib_version). Please install the latest CppUnit" | ||
echo "*** (http://cppunit.sourceforge.net/)." | ||
exit -1 | ||
else | ||
AC_MSG_RESULT(yes) | ||
fi | ||
# | ||
# Check libs | ||
# | ||
libs_result=`$CPPUNIT_CONFIG_SCRIPT --libs` | ||
if test "x$libs_result" != "x"; then | ||
AC_SUBST(CPPUNIT_LIBS, "$libs_result") | ||
fi | ||
# | ||
# Check includes | ||
# | ||
includes_result=`$CPPUNIT_CONFIG_SCRIPT --cflags` | ||
if test "x$includes_result" != "x"; then | ||
AC_SUBST(CPPUNIT_CFLAGS, "$includes_result") | ||
fi | ||
fi | ||
]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
SUBDIRS = src | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
INCLUDES = -I../include | ||
|
||
lib_LTLIBRARIES = libHDF5_SimResults.la | ||
|
||
#libHDF5_SimReslts_la_CPPFLAGS = @LOG4CPP_CFLAGS@ @NSPR_CFLAGS@ @ZLIB_CFLAGS@ | ||
libHDF5_SimResults_la_LIBADD = -lhdf5 | ||
libHDF5_SimResults_la_LDFLAGS = -version-info 1:0:0 | ||
|
||
#nanohiveutildir = $(includedir)/NanoHiveUtil | ||
#nanohiveutil_HEADERS = \ | ||
# $(top_builddir)/../include/NanoHiveUtil/CmdLine.h \ | ||
# $(top_builddir)/../include/NanoHiveUtil/ZipUnzip/zip.h | ||
|
||
libHDF5_SimResults_la_SOURCES = \ | ||
HDF5_SimResults.cpp \ | ||
SimResultsDataStore.cpp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
INCLUDES = -I../../include -I.. | ||
|
||
bin_PROGRAMS = hdf5CppUnit | ||
|
||
hdf5CppUnit_SOURCES = CppUnit.cpp ../HDF5_SimResultsTest.cpp | ||
|
||
hdf5CppUnit_CPPFLAGS = @CPPUNIT_CFLAGS@ | ||
hdf5CppUnit_LDFLAGS = -L../.libs | ||
hdf5CppUnit_LDADD = @CPPUNIT_LIBS@ -lHDF5_SimResults -lhdf5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
SUBDIRS = DNA | ||
SUBDIRS = DNA HDF5_SimResults | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters