[cig-commits] r18064 - cs/autoconf/trunk

brad at geodynamics.org brad at geodynamics.org
Mon Mar 7 14:58:23 PST 2011


Author: brad
Date: 2011-03-07 14:58:23 -0800 (Mon, 07 Mar 2011)
New Revision: 18064

Added:
   cs/autoconf/trunk/cit_cppunit.m4
   cs/autoconf/trunk/cit_netcdf.m4
   cs/autoconf/trunk/cit_proj4.m4
   cs/autoconf/trunk/cit_spatialdata.m4
Log:
Created macros for general PyLith dependencies.

Added: cs/autoconf/trunk/cit_cppunit.m4
===================================================================
--- cs/autoconf/trunk/cit_cppunit.m4	                        (rev 0)
+++ cs/autoconf/trunk/cit_cppunit.m4	2011-03-07 22:58:23 UTC (rev 18064)
@@ -0,0 +1,36 @@
+# -*- Autoconf -*-
+
+
+# ======================================================================
+# Autoconf macros for cppunit.
+# ======================================================================
+
+# ----------------------------------------------------------------------
+# CIT_CPPUNIT_HEADER
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_CPPUNIT_HEADER], [
+  AC_LANG(C++)
+  AC_CHECK_HEADER([cppunit/TestRunner.h], [], [
+    AC_MSG_ERROR([CppUnit header not found; try CPPFLAGS="-I<CppUnit include dir>"])
+  ])dnl
+])dnl CIT_CPPUNIT_HEADER
+
+
+# ----------------------------------------------------------------------
+# CIT_CPPUNIT_LIB
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_CPPUNIT_LIB], [
+  AC_LANG(C++)
+  AC_MSG_CHECKING([for CppUnit::TestRunner in -lcppunit])
+  AC_REQUIRE_CPP
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[#include <cppunit/TestRunner.h>]],
+	             [[CppUnit::TestRunner runner;]])],
+    [AC_MSG_RESULT(yes)],
+    [AC_MSG_RESULT(no)
+     AC_MSG_ERROR([CppUnit library not found; try LDFLAGS="-L<CppUnit lib dir>"])
+  ])dnl
+])dnl CIT_CPPUNIT
+
+
+dnl end of file

Added: cs/autoconf/trunk/cit_netcdf.m4
===================================================================
--- cs/autoconf/trunk/cit_netcdf.m4	                        (rev 0)
+++ cs/autoconf/trunk/cit_netcdf.m4	2011-03-07 22:58:23 UTC (rev 18064)
@@ -0,0 +1,37 @@
+# -*- Autoconf -*-
+
+
+# ======================================================================
+# Autoconf macros for netcdf.
+# ======================================================================
+
+# ----------------------------------------------------------------------
+# CIT_NETCDF_HEADER
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_NETCDF_HEADER], [
+  AC_LANG(C++)
+  AC_CHECK_HEADER([netcdfcpp.h], [], [
+    AC_MSG_ERROR([netcdf C++ header not found; try CPPFLAGS="-I<netcdf include dir>"])
+  ])dnl
+])dnl CIT_NETCDF_HEADER
+
+
+# ----------------------------------------------------------------------
+# CIT_NETCDF_LIB
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_NETCDF_LIB], [
+  AC_LANG(C++)
+  AC_REQUIRE_CPP
+  AC_MSG_CHECKING([for NcFile in -lnetcdfc++])
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[#include <netcdfcpp.h>]],
+	             [[NcFile ncfile("filename");]])],
+    [AC_MSG_RESULT(yes)],
+    [AC_MSG_RESULT(no)
+     AC_MSG_ERROR([netcdfc++ library not found; try LDFLAGS="-L<netcdf lib dir>"])
+    ])dnl
+  ]))
+])dnl CIT_NETCDF_LIB
+
+
+dnl end of file

Added: cs/autoconf/trunk/cit_proj4.m4
===================================================================
--- cs/autoconf/trunk/cit_proj4.m4	                        (rev 0)
+++ cs/autoconf/trunk/cit_proj4.m4	2011-03-07 22:58:23 UTC (rev 18064)
@@ -0,0 +1,30 @@
+# -*- Autoconf -*-
+
+
+# ======================================================================
+# Autoconf macros for Proj4.
+# ======================================================================
+
+# ----------------------------------------------------------------------
+# CIT_PROJ4_HEADER
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_PROJ4_HEADER], [
+  AC_LANG(C)
+  AC_CHECK_HEADER([proj_api.h], [], [
+    AC_MSG_ERROR([Proj4 header not found; try CPPFLAGS="-I<Proj4 include dir>"])
+  ])dnl
+])dnl CIT_PROJ4_HEADER
+
+
+# ----------------------------------------------------------------------
+# CIT_PROJ4_LIB
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_PROJ4_LIB], [
+  AC_LANG(C)
+  AC_CHECK_LIB(proj, pj_init_plus, [],[
+    AC_MSG_ERROR([Proj4 library not found; try LDFLAGS="-L<Proj4 lib dir>"])
+  ])dnl
+])dnl CIT_PROJ4_LIB
+
+
+dnl end of file

Added: cs/autoconf/trunk/cit_spatialdata.m4
===================================================================
--- cs/autoconf/trunk/cit_spatialdata.m4	                        (rev 0)
+++ cs/autoconf/trunk/cit_spatialdata.m4	2011-03-07 22:58:23 UTC (rev 18064)
@@ -0,0 +1,36 @@
+# -*- Autoconf -*-
+
+
+# ======================================================================
+# Autoconf macros for spatialdata.
+# ======================================================================
+
+# ----------------------------------------------------------------------
+# CIT_SPATIALDATA_HEADER
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_SPATIALDATA_HEADER], [
+  AC_LANG(C++)
+  AC_CHECK_HEADER([spatialdata/spatialdb/SpatialDB.hh], [], [
+    AC_MSG_ERROR([SpatialDB header not found; try CPPFLAGS="-I<Spatialdata include dir>"])
+  ])dnl
+])dnl CIT_SPATIALDATA_HEADER
+
+
+# ----------------------------------------------------------------------
+# CIT_SPATIALDATA_LIB
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_SPATIALDATA_LIB], [
+  AC_LANG(C++)
+  AC_REQUIRE_CPP
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[#include <spatialdata/spatialdb/SpatialDB.hh>]
+                      [#include <spatialdata/spatialdb/SimpleDB.hh>]],
+                     [[spatialdata::spatialdb::SimpleDB db;]])],
+    [AC_MSG_RESULT(yes)],
+    [AC_MSG_RESULT(no)
+     AC_MSG_ERROR([Spatialdata library not found; try LDFLAGS="-L<Spatialdata lib dir>"])
+  ])dnl
+])dnl CIT_SPATIALDATA_LIB
+
+
+dnl end of file



More information about the CIG-COMMITS mailing list