From 9b923340265cde3803aad087c3ad4cd448b5740d Mon Sep 17 00:00:00 2001
From: "Benjamin S. Kirk" <benjamin.kirk@nasa.gov>
Date: Thu, 14 Feb 2013 08:35:04 -0600
Subject: [PATCH] proper static linking by using NetCDFs pkg-config script

---
 Makefile.in                                          |  1 +
 configure                                            | 12 ++++++++++--
 contrib/Makefile.in                                  |  1 +
 contrib/boost/include/Makefile.in                    |  1 +
 contrib/exodusii/5.22b/exodus/cbind/Makefile.in      |  1 +
 contrib/exodusii/5.22b/nemesis/Makefile.in           |  1 +
 contrib/exodusii/Lib/Makefile.in                     |  1 +
 contrib/fparser/Makefile.in                          |  1 +
 contrib/fparser/extrasrc/Makefile.in                 |  1 +
 contrib/gmv/Makefile.in                              |  1 +
 contrib/gzstream/Makefile.in                         |  1 +
 contrib/laspack/Makefile.in                          |  1 +
 contrib/libHilbert/Makefile.in                       |  1 +
 contrib/metis/Makefile.in                            |  1 +
 contrib/nanoflann/Makefile.in                        |  1 +
 contrib/nemesis/Lib/Makefile.in                      |  1 +
 contrib/netcdf/Lib/Makefile.in                       |  1 +
 contrib/parmetis/Makefile.in                         |  1 +
 contrib/sfcurves/Makefile.in                         |  1 +
 contrib/tecplot/tecio/Makefile.in                    |  1 +
 contrib/tetgen/Makefile.in                           |  1 +
 contrib/triangle/Makefile.in                         |  1 +
 contrib/utils/libmesh-dbg.pc.in                      |  2 +-
 contrib/utils/libmesh-devel.pc.in                    |  2 +-
 contrib/utils/libmesh-oprof.pc.in                    |  2 +-
 contrib/utils/libmesh-opt.pc.in                      |  2 +-
 contrib/utils/libmesh-prof.pc.in                     |  2 +-
 examples/Makefile.in                                 |  1 +
 examples/adaptivity/adaptivity_ex1/Makefile.in       |  1 +
 examples/adaptivity/adaptivity_ex2/Makefile.in       |  1 +
 examples/adaptivity/adaptivity_ex3/Makefile.in       |  1 +
 examples/adaptivity/adaptivity_ex4/Makefile.in       |  1 +
 examples/adaptivity/adaptivity_ex5/Makefile.in       |  1 +
 examples/adjoints/adjoints_ex1/Makefile.in           |  1 +
 examples/adjoints/adjoints_ex2/Makefile.in           |  1 +
 examples/adjoints/adjoints_ex3/Makefile.in           |  1 +
 examples/adjoints/adjoints_ex4/Makefile.in           |  1 +
 examples/adjoints/adjoints_ex5/Makefile.in           |  1 +
 examples/eigenproblems/eigenproblems_ex1/Makefile.in |  1 +
 examples/eigenproblems/eigenproblems_ex2/Makefile.in |  1 +
 examples/eigenproblems/eigenproblems_ex3/Makefile.in |  1 +
 examples/fem_system/fem_system_ex1/Makefile.in       |  1 +
 examples/fem_system/fem_system_ex2/Makefile.in       |  1 +
 examples/introduction/introduction_ex1/Makefile.in   |  1 +
 examples/introduction/introduction_ex2/Makefile.in   |  1 +
 examples/introduction/introduction_ex3/Makefile.in   |  1 +
 examples/introduction/introduction_ex4/Makefile.in   |  1 +
 examples/introduction/introduction_ex5/Makefile.in   |  1 +
 examples/miscellaneous/miscellaneous_ex1/Makefile.in |  1 +
 examples/miscellaneous/miscellaneous_ex2/Makefile.in |  1 +
 examples/miscellaneous/miscellaneous_ex3/Makefile.in |  1 +
 examples/miscellaneous/miscellaneous_ex4/Makefile.in |  1 +
 examples/miscellaneous/miscellaneous_ex5/Makefile.in |  1 +
 examples/miscellaneous/miscellaneous_ex6/Makefile.in |  1 +
 examples/miscellaneous/miscellaneous_ex7/Makefile.in |  1 +
 examples/miscellaneous/miscellaneous_ex8/Makefile.in |  1 +
 examples/reduced_basis/reduced_basis_ex1/Makefile.in |  1 +
 examples/reduced_basis/reduced_basis_ex2/Makefile.in |  1 +
 examples/reduced_basis/reduced_basis_ex3/Makefile.in |  1 +
 examples/reduced_basis/reduced_basis_ex4/Makefile.in |  1 +
 examples/reduced_basis/reduced_basis_ex5/Makefile.in |  1 +
 examples/reduced_basis/reduced_basis_ex6/Makefile.in |  1 +
 examples/reduced_basis/reduced_basis_ex7/Makefile.in |  1 +
 .../solution_transfer_ex1/Makefile.in                |  1 +
 examples/subdomains/subdomains_ex1/Makefile.in       |  1 +
 examples/subdomains/subdomains_ex2/Makefile.in       |  1 +
 .../systems_of_equations_ex1/Makefile.in             |  1 +
 .../systems_of_equations_ex2/Makefile.in             |  1 +
 .../systems_of_equations_ex3/Makefile.in             |  1 +
 .../systems_of_equations_ex4/Makefile.in             |  1 +
 .../systems_of_equations_ex5/Makefile.in             |  1 +
 .../systems_of_equations_ex6/Makefile.in             |  1 +
 examples/transient/transient_ex1/Makefile.in         |  1 +
 examples/transient/transient_ex2/Makefile.in         |  1 +
 examples/vector_fe/vector_fe_ex1/Makefile.in         |  1 +
 examples/vector_fe/vector_fe_ex2/Makefile.in         |  1 +
 examples/vector_fe/vector_fe_ex3/Makefile.in         |  1 +
 include/Makefile.in                                  |  1 +
 include/libmesh/Makefile.in                          |  1 +
 m4/libmesh_optional_packages.m4                      |  6 +++++-
 m4/netcdf.m4                                         |  7 +++++--
 tests/Makefile.in                                    |  1 +
 82 files changed, 99 insertions(+), 10 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index b0878815720..32c8a22dd23 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4125,6 +4125,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/configure b/configure
index 1ca79e3ae76..aa92fc64991 100755
--- a/configure
+++ b/configure
@@ -646,6 +646,7 @@ GIT_CHECKOUT_TRUE
 BUILD_DEVSTATUS
 GIT_REVISION
 gitquery
+libmesh_pkgconfig_requires
 libmesh_contrib_INCLUDES
 libmesh_optional_LIBS
 libmesh_optional_INCLUDES
@@ -27039,11 +27040,14 @@ $as_echo "---------------------------------------------" >&6; }
 #
 # libmesh_subpackage_arguments is a list of configure arguments
 # that will be passed down to any subpackages that we are nesting.
+#
+# libmesh_pkgconfig_requires is a list of pkgconfig requirements
+# we will add
 libmesh_optional_INCLUDES=""
 libmesh_optional_LIBS=""
 libmesh_contrib_INCLUDES=""
 libmesh_subpackage_arguments=""
-
+libmesh_pkgconfig_requires=""
 
 # --------------------------------------------------------------
 # Allow for disable-optional
@@ -32020,7 +32024,7 @@ $as_echo "<<< Configuring library with NetCDF version 3 support >>>" >&6; }
   	  # pass --disable-netcdf-4 to the subpackage so that we do not require HDF-5
           # note this is maddness - we will run configure in the subdirectory v4, but not use it,
           # so this is nothing more than a hedge against that failing.  we need it to work for
-          # 'make dist' to work'
+          # 'make dist' to work
 	  libmesh_subpackage_arguments="$libmesh_subpackage_arguments --disable-netcdf-4"
 	  ;;
 
@@ -32039,6 +32043,9 @@ $as_echo "#define HAVE_NETCDF 1" >>confdefs.h
 	    libmesh_subpackage_arguments="$libmesh_subpackage_arguments --disable-netcdf-4"
 	  fi
 
+	  # netcdf will install its own pkgconfig script, use this to get proper static linking
+	  libmesh_pkgconfig_requires="netcdf >= 4.2 $libmesh_pkgconfig_requires"
+
 	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NetCDF version 4 support >>>" >&5
 $as_echo "<<< Configuring library with NetCDF version 4 support >>>" >&6; }
 	  ;;
@@ -32837,6 +32844,7 @@ fi
 
 
 
+
 # Query configuration environment
 
 
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
index 4373950df87..ad50dffdfb8 100644
--- a/contrib/Makefile.in
+++ b/contrib/Makefile.in
@@ -650,6 +650,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/boost/include/Makefile.in b/contrib/boost/include/Makefile.in
index 7021cdb0151..2e83724096a 100644
--- a/contrib/boost/include/Makefile.in
+++ b/contrib/boost/include/Makefile.in
@@ -656,6 +656,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/exodusii/5.22b/exodus/cbind/Makefile.in b/contrib/exodusii/5.22b/exodus/cbind/Makefile.in
index 0ca3658bc6c..303acf999eb 100644
--- a/contrib/exodusii/5.22b/exodus/cbind/Makefile.in
+++ b/contrib/exodusii/5.22b/exodus/cbind/Makefile.in
@@ -2023,6 +2023,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/exodusii/5.22b/nemesis/Makefile.in b/contrib/exodusii/5.22b/nemesis/Makefile.in
index 63b30c71b9a..4cff2cd5524 100644
--- a/contrib/exodusii/5.22b/nemesis/Makefile.in
+++ b/contrib/exodusii/5.22b/nemesis/Makefile.in
@@ -457,6 +457,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/exodusii/Lib/Makefile.in b/contrib/exodusii/Lib/Makefile.in
index 20074ddf86f..559490003ad 100644
--- a/contrib/exodusii/Lib/Makefile.in
+++ b/contrib/exodusii/Lib/Makefile.in
@@ -1148,6 +1148,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/fparser/Makefile.in b/contrib/fparser/Makefile.in
index e5e52097054..92222473b5c 100644
--- a/contrib/fparser/Makefile.in
+++ b/contrib/fparser/Makefile.in
@@ -597,6 +597,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/fparser/extrasrc/Makefile.in b/contrib/fparser/extrasrc/Makefile.in
index 74a5c24ba1b..5806929ec1b 100644
--- a/contrib/fparser/extrasrc/Makefile.in
+++ b/contrib/fparser/extrasrc/Makefile.in
@@ -370,6 +370,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/gmv/Makefile.in b/contrib/gmv/Makefile.in
index 08b60e6490d..5258519fe77 100644
--- a/contrib/gmv/Makefile.in
+++ b/contrib/gmv/Makefile.in
@@ -452,6 +452,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/gzstream/Makefile.in b/contrib/gzstream/Makefile.in
index 6b220d708c4..38d0292cdd1 100644
--- a/contrib/gzstream/Makefile.in
+++ b/contrib/gzstream/Makefile.in
@@ -474,6 +474,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/laspack/Makefile.in b/contrib/laspack/Makefile.in
index 0f255fe3e20..81102d81d58 100644
--- a/contrib/laspack/Makefile.in
+++ b/contrib/laspack/Makefile.in
@@ -512,6 +512,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/libHilbert/Makefile.in b/contrib/libHilbert/Makefile.in
index 398bf925f54..3e38eb5a5a2 100644
--- a/contrib/libHilbert/Makefile.in
+++ b/contrib/libHilbert/Makefile.in
@@ -515,6 +515,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/metis/Makefile.in b/contrib/metis/Makefile.in
index 14b1f0ee259..535bb60393c 100644
--- a/contrib/metis/Makefile.in
+++ b/contrib/metis/Makefile.in
@@ -713,6 +713,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/nanoflann/Makefile.in b/contrib/nanoflann/Makefile.in
index 32a7346dd7b..2c96c0b95d3 100644
--- a/contrib/nanoflann/Makefile.in
+++ b/contrib/nanoflann/Makefile.in
@@ -486,6 +486,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/nemesis/Lib/Makefile.in b/contrib/nemesis/Lib/Makefile.in
index 734e204ffb4..1eafff51c2c 100644
--- a/contrib/nemesis/Lib/Makefile.in
+++ b/contrib/nemesis/Lib/Makefile.in
@@ -612,6 +612,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/netcdf/Lib/Makefile.in b/contrib/netcdf/Lib/Makefile.in
index d41e2dae82d..99708c83794 100644
--- a/contrib/netcdf/Lib/Makefile.in
+++ b/contrib/netcdf/Lib/Makefile.in
@@ -521,6 +521,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/parmetis/Makefile.in b/contrib/parmetis/Makefile.in
index b04d1ed9579..95ee943c53d 100644
--- a/contrib/parmetis/Makefile.in
+++ b/contrib/parmetis/Makefile.in
@@ -603,6 +603,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/sfcurves/Makefile.in b/contrib/sfcurves/Makefile.in
index 20494693358..496bcdf5fda 100644
--- a/contrib/sfcurves/Makefile.in
+++ b/contrib/sfcurves/Makefile.in
@@ -462,6 +462,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/tecplot/tecio/Makefile.in b/contrib/tecplot/tecio/Makefile.in
index 3ddd4f874be..7a673e32443 100644
--- a/contrib/tecplot/tecio/Makefile.in
+++ b/contrib/tecplot/tecio/Makefile.in
@@ -596,6 +596,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/tetgen/Makefile.in b/contrib/tetgen/Makefile.in
index 80d3798d682..14e318e66bd 100644
--- a/contrib/tetgen/Makefile.in
+++ b/contrib/tetgen/Makefile.in
@@ -486,6 +486,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/triangle/Makefile.in b/contrib/triangle/Makefile.in
index 4f8a279a36e..7ea8380a1c1 100644
--- a/contrib/triangle/Makefile.in
+++ b/contrib/triangle/Makefile.in
@@ -486,6 +486,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/contrib/utils/libmesh-dbg.pc.in b/contrib/utils/libmesh-dbg.pc.in
index 9c25d44c95a..4989d640f18 100644
--- a/contrib/utils/libmesh-dbg.pc.in
+++ b/contrib/utils/libmesh-dbg.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: libmesh
 Description: The libMesh Finite Element Library
-Requires:
+Requires: @libmesh_pkgconfig_requires@
 Version: @VERSION@
 Libs: -Wl,-rpath,${libdir} -L${libdir} -lmesh_dbg \
       @libmesh_optional_LIBS@      
diff --git a/contrib/utils/libmesh-devel.pc.in b/contrib/utils/libmesh-devel.pc.in
index 7d44affb0d2..03c75cf7e32 100644
--- a/contrib/utils/libmesh-devel.pc.in
+++ b/contrib/utils/libmesh-devel.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: libmesh
 Description: The libMesh Finite Element Library
-Requires:
+Requires: @libmesh_pkgconfig_requires@
 Version: @VERSION@
 Libs: -Wl,-rpath,${libdir} -L${libdir} -lmesh_devel \
       @libmesh_optional_LIBS@
diff --git a/contrib/utils/libmesh-oprof.pc.in b/contrib/utils/libmesh-oprof.pc.in
index 8e45aecd7b6..efcaf535341 100644
--- a/contrib/utils/libmesh-oprof.pc.in
+++ b/contrib/utils/libmesh-oprof.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: libmesh
 Description: The libMesh Finite Element Library
-Requires:
+Requires: @libmesh_pkgconfig_requires@
 Version: @VERSION@
 Libs: -Wl,-rpath,${libdir} -L${libdir} -lmesh_oprof \
       @libmesh_optional_LIBS@
diff --git a/contrib/utils/libmesh-opt.pc.in b/contrib/utils/libmesh-opt.pc.in
index 17bc75ab298..5b14b1df46b 100644
--- a/contrib/utils/libmesh-opt.pc.in
+++ b/contrib/utils/libmesh-opt.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: libmesh
 Description: The libMesh Finite Element Library
-Requires:
+Requires: @libmesh_pkgconfig_requires@
 Version: @VERSION@
 Libs: -Wl,-rpath,${libdir} -L${libdir} -lmesh_opt \
       @libmesh_optional_LIBS@      
diff --git a/contrib/utils/libmesh-prof.pc.in b/contrib/utils/libmesh-prof.pc.in
index 36ed4ed8a6e..ecc3cf3ef50 100644
--- a/contrib/utils/libmesh-prof.pc.in
+++ b/contrib/utils/libmesh-prof.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: libmesh
 Description: The libMesh Finite Element Library
-Requires:
+Requires: @libmesh_pkgconfig_requires@
 Version: @VERSION@
 Libs: -Wl,-rpath,${libdir} -L${libdir} -lmesh_prof \
       @libmesh_optional_LIBS@
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 62322431884..745576621ea 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -438,6 +438,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adaptivity/adaptivity_ex1/Makefile.in b/examples/adaptivity/adaptivity_ex1/Makefile.in
index c4d649572a4..521c0428a17 100644
--- a/examples/adaptivity/adaptivity_ex1/Makefile.in
+++ b/examples/adaptivity/adaptivity_ex1/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adaptivity/adaptivity_ex2/Makefile.in b/examples/adaptivity/adaptivity_ex2/Makefile.in
index df5f817b61a..d0feaa9b3da 100644
--- a/examples/adaptivity/adaptivity_ex2/Makefile.in
+++ b/examples/adaptivity/adaptivity_ex2/Makefile.in
@@ -531,6 +531,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adaptivity/adaptivity_ex3/Makefile.in b/examples/adaptivity/adaptivity_ex3/Makefile.in
index 92b82094272..a8f608db580 100644
--- a/examples/adaptivity/adaptivity_ex3/Makefile.in
+++ b/examples/adaptivity/adaptivity_ex3/Makefile.in
@@ -523,6 +523,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adaptivity/adaptivity_ex4/Makefile.in b/examples/adaptivity/adaptivity_ex4/Makefile.in
index f0ce9099628..62f03d9e3ff 100644
--- a/examples/adaptivity/adaptivity_ex4/Makefile.in
+++ b/examples/adaptivity/adaptivity_ex4/Makefile.in
@@ -522,6 +522,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adaptivity/adaptivity_ex5/Makefile.in b/examples/adaptivity/adaptivity_ex5/Makefile.in
index 0739a093cd4..cede0bdaad9 100644
--- a/examples/adaptivity/adaptivity_ex5/Makefile.in
+++ b/examples/adaptivity/adaptivity_ex5/Makefile.in
@@ -527,6 +527,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adjoints/adjoints_ex1/Makefile.in b/examples/adjoints/adjoints_ex1/Makefile.in
index d9d801053aa..510fad0babc 100644
--- a/examples/adjoints/adjoints_ex1/Makefile.in
+++ b/examples/adjoints/adjoints_ex1/Makefile.in
@@ -581,6 +581,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adjoints/adjoints_ex2/Makefile.in b/examples/adjoints/adjoints_ex2/Makefile.in
index 630253ca724..1b22cead214 100644
--- a/examples/adjoints/adjoints_ex2/Makefile.in
+++ b/examples/adjoints/adjoints_ex2/Makefile.in
@@ -569,6 +569,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adjoints/adjoints_ex3/Makefile.in b/examples/adjoints/adjoints_ex3/Makefile.in
index 706fc08b33e..cbd1f7ef586 100644
--- a/examples/adjoints/adjoints_ex3/Makefile.in
+++ b/examples/adjoints/adjoints_ex3/Makefile.in
@@ -581,6 +581,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adjoints/adjoints_ex4/Makefile.in b/examples/adjoints/adjoints_ex4/Makefile.in
index cca7688d324..22715568dd7 100644
--- a/examples/adjoints/adjoints_ex4/Makefile.in
+++ b/examples/adjoints/adjoints_ex4/Makefile.in
@@ -581,6 +581,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/adjoints/adjoints_ex5/Makefile.in b/examples/adjoints/adjoints_ex5/Makefile.in
index addd8f84c5f..2a23def8596 100644
--- a/examples/adjoints/adjoints_ex5/Makefile.in
+++ b/examples/adjoints/adjoints_ex5/Makefile.in
@@ -581,6 +581,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/eigenproblems/eigenproblems_ex1/Makefile.in b/examples/eigenproblems/eigenproblems_ex1/Makefile.in
index 0ee5c32bb62..63c2eb03dd1 100644
--- a/examples/eigenproblems/eigenproblems_ex1/Makefile.in
+++ b/examples/eigenproblems/eigenproblems_ex1/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/eigenproblems/eigenproblems_ex2/Makefile.in b/examples/eigenproblems/eigenproblems_ex2/Makefile.in
index 4f556866399..9de9467230b 100644
--- a/examples/eigenproblems/eigenproblems_ex2/Makefile.in
+++ b/examples/eigenproblems/eigenproblems_ex2/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/eigenproblems/eigenproblems_ex3/Makefile.in b/examples/eigenproblems/eigenproblems_ex3/Makefile.in
index 10aee2122e2..65733d414ce 100644
--- a/examples/eigenproblems/eigenproblems_ex3/Makefile.in
+++ b/examples/eigenproblems/eigenproblems_ex3/Makefile.in
@@ -523,6 +523,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/fem_system/fem_system_ex1/Makefile.in b/examples/fem_system/fem_system_ex1/Makefile.in
index f29157c239b..d9da8d059d7 100644
--- a/examples/fem_system/fem_system_ex1/Makefile.in
+++ b/examples/fem_system/fem_system_ex1/Makefile.in
@@ -546,6 +546,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/fem_system/fem_system_ex2/Makefile.in b/examples/fem_system/fem_system_ex2/Makefile.in
index 6d084e151a2..46c5d8bd162 100644
--- a/examples/fem_system/fem_system_ex2/Makefile.in
+++ b/examples/fem_system/fem_system_ex2/Makefile.in
@@ -556,6 +556,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/introduction/introduction_ex1/Makefile.in b/examples/introduction/introduction_ex1/Makefile.in
index 90eece6d62f..6d07fbf01b7 100644
--- a/examples/introduction/introduction_ex1/Makefile.in
+++ b/examples/introduction/introduction_ex1/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/introduction/introduction_ex2/Makefile.in b/examples/introduction/introduction_ex2/Makefile.in
index 8f2fbcf7816..21611c7db6a 100644
--- a/examples/introduction/introduction_ex2/Makefile.in
+++ b/examples/introduction/introduction_ex2/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/introduction/introduction_ex3/Makefile.in b/examples/introduction/introduction_ex3/Makefile.in
index 8d78ea0051c..22bff92c053 100644
--- a/examples/introduction/introduction_ex3/Makefile.in
+++ b/examples/introduction/introduction_ex3/Makefile.in
@@ -527,6 +527,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/introduction/introduction_ex4/Makefile.in b/examples/introduction/introduction_ex4/Makefile.in
index 498d6f5df04..b1783dcb246 100644
--- a/examples/introduction/introduction_ex4/Makefile.in
+++ b/examples/introduction/introduction_ex4/Makefile.in
@@ -527,6 +527,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/introduction/introduction_ex5/Makefile.in b/examples/introduction/introduction_ex5/Makefile.in
index a2a31f0e421..79a5681fe7c 100644
--- a/examples/introduction/introduction_ex5/Makefile.in
+++ b/examples/introduction/introduction_ex5/Makefile.in
@@ -527,6 +527,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/miscellaneous/miscellaneous_ex1/Makefile.in b/examples/miscellaneous/miscellaneous_ex1/Makefile.in
index a9c31588d87..bff2f335059 100644
--- a/examples/miscellaneous/miscellaneous_ex1/Makefile.in
+++ b/examples/miscellaneous/miscellaneous_ex1/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/miscellaneous/miscellaneous_ex2/Makefile.in b/examples/miscellaneous/miscellaneous_ex2/Makefile.in
index ca6776a1254..4c4cdd8b982 100644
--- a/examples/miscellaneous/miscellaneous_ex2/Makefile.in
+++ b/examples/miscellaneous/miscellaneous_ex2/Makefile.in
@@ -522,6 +522,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/miscellaneous/miscellaneous_ex3/Makefile.in b/examples/miscellaneous/miscellaneous_ex3/Makefile.in
index 64d552c64f8..99d5e319193 100644
--- a/examples/miscellaneous/miscellaneous_ex3/Makefile.in
+++ b/examples/miscellaneous/miscellaneous_ex3/Makefile.in
@@ -522,6 +522,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/miscellaneous/miscellaneous_ex4/Makefile.in b/examples/miscellaneous/miscellaneous_ex4/Makefile.in
index 2bd4e5c0755..15d40977f62 100644
--- a/examples/miscellaneous/miscellaneous_ex4/Makefile.in
+++ b/examples/miscellaneous/miscellaneous_ex4/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/miscellaneous/miscellaneous_ex5/Makefile.in b/examples/miscellaneous/miscellaneous_ex5/Makefile.in
index 9fa4acba518..44b34e31583 100644
--- a/examples/miscellaneous/miscellaneous_ex5/Makefile.in
+++ b/examples/miscellaneous/miscellaneous_ex5/Makefile.in
@@ -531,6 +531,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/miscellaneous/miscellaneous_ex6/Makefile.in b/examples/miscellaneous/miscellaneous_ex6/Makefile.in
index d834a00e68f..9c06d17e5a6 100644
--- a/examples/miscellaneous/miscellaneous_ex6/Makefile.in
+++ b/examples/miscellaneous/miscellaneous_ex6/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/miscellaneous/miscellaneous_ex7/Makefile.in b/examples/miscellaneous/miscellaneous_ex7/Makefile.in
index 1041c16e90b..0e03960dccb 100644
--- a/examples/miscellaneous/miscellaneous_ex7/Makefile.in
+++ b/examples/miscellaneous/miscellaneous_ex7/Makefile.in
@@ -550,6 +550,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/miscellaneous/miscellaneous_ex8/Makefile.in b/examples/miscellaneous/miscellaneous_ex8/Makefile.in
index e8394fa8e62..3b449463ef9 100644
--- a/examples/miscellaneous/miscellaneous_ex8/Makefile.in
+++ b/examples/miscellaneous/miscellaneous_ex8/Makefile.in
@@ -546,6 +546,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/reduced_basis/reduced_basis_ex1/Makefile.in b/examples/reduced_basis/reduced_basis_ex1/Makefile.in
index a9162f3d14b..e0158a32a8b 100644
--- a/examples/reduced_basis/reduced_basis_ex1/Makefile.in
+++ b/examples/reduced_basis/reduced_basis_ex1/Makefile.in
@@ -541,6 +541,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/reduced_basis/reduced_basis_ex2/Makefile.in b/examples/reduced_basis/reduced_basis_ex2/Makefile.in
index c0c3ff4ed98..1274b4b7934 100644
--- a/examples/reduced_basis/reduced_basis_ex2/Makefile.in
+++ b/examples/reduced_basis/reduced_basis_ex2/Makefile.in
@@ -541,6 +541,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/reduced_basis/reduced_basis_ex3/Makefile.in b/examples/reduced_basis/reduced_basis_ex3/Makefile.in
index 42339c4d850..8790225f957 100644
--- a/examples/reduced_basis/reduced_basis_ex3/Makefile.in
+++ b/examples/reduced_basis/reduced_basis_ex3/Makefile.in
@@ -541,6 +541,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/reduced_basis/reduced_basis_ex4/Makefile.in b/examples/reduced_basis/reduced_basis_ex4/Makefile.in
index 98c4a072e31..6a96ed1e6e4 100644
--- a/examples/reduced_basis/reduced_basis_ex4/Makefile.in
+++ b/examples/reduced_basis/reduced_basis_ex4/Makefile.in
@@ -546,6 +546,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/reduced_basis/reduced_basis_ex5/Makefile.in b/examples/reduced_basis/reduced_basis_ex5/Makefile.in
index dbb5660ea90..b82e5ae8aac 100644
--- a/examples/reduced_basis/reduced_basis_ex5/Makefile.in
+++ b/examples/reduced_basis/reduced_basis_ex5/Makefile.in
@@ -546,6 +546,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/reduced_basis/reduced_basis_ex6/Makefile.in b/examples/reduced_basis/reduced_basis_ex6/Makefile.in
index 435ba02d888..b7e841e6a71 100644
--- a/examples/reduced_basis/reduced_basis_ex6/Makefile.in
+++ b/examples/reduced_basis/reduced_basis_ex6/Makefile.in
@@ -546,6 +546,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/reduced_basis/reduced_basis_ex7/Makefile.in b/examples/reduced_basis/reduced_basis_ex7/Makefile.in
index 4ad415a5388..9e5a5567417 100644
--- a/examples/reduced_basis/reduced_basis_ex7/Makefile.in
+++ b/examples/reduced_basis/reduced_basis_ex7/Makefile.in
@@ -541,6 +541,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/solution_transfer/solution_transfer_ex1/Makefile.in b/examples/solution_transfer/solution_transfer_ex1/Makefile.in
index 7c63104e9b4..be494703bad 100644
--- a/examples/solution_transfer/solution_transfer_ex1/Makefile.in
+++ b/examples/solution_transfer/solution_transfer_ex1/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/subdomains/subdomains_ex1/Makefile.in b/examples/subdomains/subdomains_ex1/Makefile.in
index 154a5c3fd81..2fd986f3fcf 100644
--- a/examples/subdomains/subdomains_ex1/Makefile.in
+++ b/examples/subdomains/subdomains_ex1/Makefile.in
@@ -527,6 +527,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/subdomains/subdomains_ex2/Makefile.in b/examples/subdomains/subdomains_ex2/Makefile.in
index 71d80f0ace0..7dd6e321872 100644
--- a/examples/subdomains/subdomains_ex2/Makefile.in
+++ b/examples/subdomains/subdomains_ex2/Makefile.in
@@ -527,6 +527,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in
index d3e513e7d7b..87793f70bc6 100644
--- a/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in
+++ b/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in
index 65e18d0c434..4bf68ce8476 100644
--- a/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in
+++ b/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in
@@ -522,6 +522,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in
index 296775049a4..a2098a1735e 100644
--- a/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in
+++ b/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in
index 796dfe6ff52..0b008330909 100644
--- a/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in
+++ b/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in
index a59556da4ee..3d5fd9d9f71 100644
--- a/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in
+++ b/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in
index 3117fe8cacb..e3714590848 100644
--- a/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in
+++ b/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in
@@ -517,6 +517,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/transient/transient_ex1/Makefile.in b/examples/transient/transient_ex1/Makefile.in
index 181388790f5..3e9112f4389 100644
--- a/examples/transient/transient_ex1/Makefile.in
+++ b/examples/transient/transient_ex1/Makefile.in
@@ -527,6 +527,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/transient/transient_ex2/Makefile.in b/examples/transient/transient_ex2/Makefile.in
index 3f06be9e9e5..cac5ac045cc 100644
--- a/examples/transient/transient_ex2/Makefile.in
+++ b/examples/transient/transient_ex2/Makefile.in
@@ -518,6 +518,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/vector_fe/vector_fe_ex1/Makefile.in b/examples/vector_fe/vector_fe_ex1/Makefile.in
index a6fce0d3c29..68d5022dd0a 100644
--- a/examples/vector_fe/vector_fe_ex1/Makefile.in
+++ b/examples/vector_fe/vector_fe_ex1/Makefile.in
@@ -525,6 +525,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/vector_fe/vector_fe_ex2/Makefile.in b/examples/vector_fe/vector_fe_ex2/Makefile.in
index 91a87cf1426..451235e5f56 100644
--- a/examples/vector_fe/vector_fe_ex2/Makefile.in
+++ b/examples/vector_fe/vector_fe_ex2/Makefile.in
@@ -551,6 +551,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/examples/vector_fe/vector_fe_ex3/Makefile.in b/examples/vector_fe/vector_fe_ex3/Makefile.in
index 2000e5d4507..d60eb701960 100644
--- a/examples/vector_fe/vector_fe_ex3/Makefile.in
+++ b/examples/vector_fe/vector_fe_ex3/Makefile.in
@@ -552,6 +552,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/include/Makefile.in b/include/Makefile.in
index a0d9c0031d1..af53a6f615a 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -441,6 +441,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/include/libmesh/Makefile.in b/include/libmesh/Makefile.in
index 263956e86e0..bdd6b780c72 100644
--- a/include/libmesh/Makefile.in
+++ b/include/libmesh/Makefile.in
@@ -382,6 +382,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
diff --git a/m4/libmesh_optional_packages.m4 b/m4/libmesh_optional_packages.m4
index 5365ce23ddd..d58ab9e6a76 100644
--- a/m4/libmesh_optional_packages.m4
+++ b/m4/libmesh_optional_packages.m4
@@ -17,11 +17,14 @@ AC_DEFUN([LIBMESH_CONFIGURE_OPTIONAL_PACKAGES],
 # 
 # libmesh_subpackage_arguments is a list of configure arguments
 # that will be passed down to any subpackages that we are nesting.
+#
+# libmesh_pkgconfig_requires is a list of pkgconfig requirements
+# we will add
 libmesh_optional_INCLUDES=""
 libmesh_optional_LIBS=""
 libmesh_contrib_INCLUDES=""
 libmesh_subpackage_arguments=""
-
+libmesh_pkgconfig_requires=""
 
 # --------------------------------------------------------------
 # Allow for disable-optional
@@ -514,4 +517,5 @@ fi
 AC_SUBST(libmesh_optional_INCLUDES)
 AC_SUBST(libmesh_optional_LIBS)
 AC_SUBST(libmesh_contrib_INCLUDES)
+AC_SUBST(libmesh_pkgconfig_requires)
 ])
diff --git a/m4/netcdf.m4 b/m4/netcdf.m4
index db977d226a9..9aa27bff785 100644
--- a/m4/netcdf.m4
+++ b/m4/netcdf.m4
@@ -30,7 +30,7 @@ AC_DEFUN([CONFIGURE_NETCDF],
   	  # pass --disable-netcdf-4 to the subpackage so that we do not require HDF-5
           # note this is maddness - we will run configure in the subdirectory v4, but not use it,
           # so this is nothing more than a hedge against that failing.  we need it to work for
-          # 'make dist' to work' 
+          # 'make dist' to work 
 	  libmesh_subpackage_arguments="$libmesh_subpackage_arguments --disable-netcdf-4"
 	  ;;
 
@@ -46,7 +46,10 @@ AC_DEFUN([CONFIGURE_NETCDF],
   	    #  pass --disable-netcdf-4 to the subpackage so that we do not require HDF-5
 	    libmesh_subpackage_arguments="$libmesh_subpackage_arguments --disable-netcdf-4"
 	  fi
-								
+	
+	  # netcdf will install its own pkgconfig script, use this to get proper static linking
+	  libmesh_pkgconfig_requires="netcdf >= 4.2 $libmesh_pkgconfig_requires"
+
 	  AC_MSG_RESULT(<<< Configuring library with NetCDF version 4 support >>>)
 	  ;;
 
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 7c200e07153..4883e88e86d 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -581,6 +581,7 @@ libmesh_CXXFLAGS = @libmesh_CXXFLAGS@
 libmesh_contrib_INCLUDES = @libmesh_contrib_INCLUDES@
 libmesh_optional_INCLUDES = @libmesh_optional_INCLUDES@
 libmesh_optional_LIBS = @libmesh_optional_LIBS@
+libmesh_pkgconfig_requires = @libmesh_pkgconfig_requires@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@