From a0c9e1215d82dd0198f93a080880332b8f0e0629 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 12:00:28 -0500 Subject: [PATCH 01/41] Kokkos configuration --- include/libmesh_config.h.in | 3 +++ m4/libmesh_optional_packages.m4 | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/libmesh_config.h.in b/include/libmesh_config.h.in index a8318aa5e6..cb279a13bc 100644 --- a/include/libmesh_config.h.in +++ b/include/libmesh_config.h.in @@ -440,6 +440,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define if Kokkos support is enabled in libMesh */ +#undef HAVE_KOKKOS + /* Flag indicating whether the library will be compiled with LASPACK support */ #undef HAVE_LASPACK diff --git a/m4/libmesh_optional_packages.m4 b/m4/libmesh_optional_packages.m4 index 4e4657839f..e99fe1781a 100644 --- a/m4/libmesh_optional_packages.m4 +++ b/m4/libmesh_optional_packages.m4 @@ -863,6 +863,20 @@ AM_CONDITIONAL(LIBMESH_ENABLE_METAPHYSICL, test x$enablemetaphysicl = xyes) +# ------------------------------------------------------------- +# Kokkos -- enables the native Kokkos FE math path +# ------------------------------------------------------------- +ACSM_CONFIGURE_KOKKOS + +AS_IF([test "x$enablekokkos" != "xno"], + [ + libmesh_optional_INCLUDES="$KOKKOS_CPPFLAGS $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$KOKKOS_LDFLAGS $KOKKOS_LIBS $libmesh_optional_LIBS" + ]) +AM_CONDITIONAL(LIBMESH_ENABLE_KOKKOS, test x$enablekokkos = xyes) +# ------------------------------------------------------------- + + AS_IF([test "$enableoptional" != no], [ From ac36db927616f5f22e38c95d8d0f69bdf2ba5d5b Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 13:53:23 -0500 Subject: [PATCH 02/41] Report Kokkos info in config summary --- m4/config_summary.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/m4/config_summary.m4 b/m4/config_summary.m4 index f1ae9b86a1..189ecdf7c8 100644 --- a/m4/config_summary.m4 +++ b/m4/config_summary.m4 @@ -126,6 +126,9 @@ AS_IF([test "x$enableoptional" = "xyes"], AS_ECHO([" gmv.............................. : $enablegmv"]) AS_ECHO([" gzstream......................... : $enablegz"]) AS_ECHO([" hdf5............................. : $enablehdf5"]) + AS_ECHO([" kokkos........................... : $enablekokkos"]) + AS_IF([test "x$enablekokkos" = "xyes"], + [AS_ECHO([" kokkos backend................ : $KOKKOS_BACKEND"])]) AS_ECHO([" laspack.......................... : $enablelaspack"]) AS_ECHO([" libhilbert....................... : $enablelibhilbert"]) AS_ECHO([" metaphysicl...................... : $enablemetaphysicl"]) From c1edcac508a46288f77569a2cee50a163f466c8b Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 12:01:15 -0500 Subject: [PATCH 03/41] Kokkos device plumbing This is a fraction of a commit authored by Rochi; I stripped off the m4 bits so we could just use the updated ACSM versions from the start. --- include/base/libmesh_common.h | 45 ++++++++++++++++++++++--------- include/base/libmesh_exceptions.h | 7 +++++ 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/include/base/libmesh_common.h b/include/base/libmesh_common.h index d907f4a5fe..32f8820b4d 100644 --- a/include/base/libmesh_common.h +++ b/include/base/libmesh_common.h @@ -30,6 +30,10 @@ // The library configuration options #include "libmesh/libmesh_config.h" +// Device compilation support — must be included before assert macros +// so that LIBMESH_DEVICE_ASSERT is available for the Kokkos path. +#include "libmesh/libmesh_device.h" + // Use actual timestamps or constant dummies (to aid ccache) #ifdef LIBMESH_ENABLE_TIMESTAMPS # define LIBMESH_TIME __TIME__ @@ -183,33 +187,33 @@ typedef std::complex COMPLEX; // Helper functions for complex/real numbers // to clean up #ifdef LIBMESH_USE_COMPLEX_NUMBERS elsewhere -template inline T libmesh_real(T a) { return a; } -template inline T libmesh_imag(T /*a*/) { return 0; } -template inline T libmesh_conj(T a) { return a; } +template LIBMESH_DEVICE_INLINE T libmesh_real(T a) { return a; } +template LIBMESH_DEVICE_INLINE T libmesh_imag(T /*a*/) { return 0; } +template LIBMESH_DEVICE_INLINE T libmesh_conj(T a) { return a; } template -inline T libmesh_real(std::complex a) { return std::real(a); } +LIBMESH_DEVICE_INLINE T libmesh_real(std::complex a) { return std::real(a); } template -inline T libmesh_imag(std::complex a) { return std::imag(a); } +LIBMESH_DEVICE_INLINE T libmesh_imag(std::complex a) { return std::imag(a); } template -inline std::complex libmesh_conj(std::complex a) { return std::conj(a); } +LIBMESH_DEVICE_INLINE std::complex libmesh_conj(std::complex a) { return std::conj(a); } // std::isnan() is in as of C++11. template -inline bool libmesh_isnan(T x) { return std::isnan(x); } +LIBMESH_DEVICE_INLINE bool libmesh_isnan(T x) { return std::isnan(x); } template -inline bool libmesh_isnan(std::complex a) +LIBMESH_DEVICE_INLINE bool libmesh_isnan(std::complex a) { return (std::isnan(std::real(a)) || std::isnan(std::imag(a))); } // std::isinf() is in as of C++11. template -inline bool libmesh_isinf(T x) { return std::isinf(x); } +LIBMESH_DEVICE_INLINE bool libmesh_isinf(T x) { return std::isinf(x); } template -inline bool libmesh_isinf(std::complex a) +LIBMESH_DEVICE_INLINE bool libmesh_isinf(std::complex a) { return (std::isinf(std::real(a)) || std::isinf(std::imag(a))); } // Define the value type for unknowns in simulations. @@ -287,7 +291,13 @@ extern bool warned_about_auto_ptr; #endif // The libmesh_assert() macro acts like C's assert(), but throws a -// libmesh_error() (including stack trace, etc) instead of just exiting +// libmesh_error() (including stack trace, etc) instead of just exiting. +// +// In .K translation units (LIBMESH_KOKKOS_COMPILATION defined), +// LIBMESH_DEVICE_ASSERT is provided by libmesh_device.h using +// printf + Kokkos::abort() — device-safe across CUDA/HIP/SYCL. +// The assert macros delegate to it so that both host and device +// code in the same file get assertion checking. #ifdef NDEBUG #define libmesh_assert_msg(asserted, msg) ((void) 0) @@ -299,6 +309,18 @@ extern bool warned_about_auto_ptr; #define libmesh_assert_less_equal_msg(expr1,expr2, msg) ((void) 0) #define libmesh_assert_greater_equal_msg(expr1,expr2, msg) ((void) 0) +#elif defined(LIBMESH_DEVICE_ASSERT) + +// Kokkos compilation: use the device-safe assert from libmesh_device.h. +#define libmesh_assert_msg(asserted, msg) LIBMESH_DEVICE_ASSERT(asserted) +#define libmesh_exceptionless_assert_msg(asserted, msg) LIBMESH_DEVICE_ASSERT(asserted) +#define libmesh_assert_equal_to_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) == (expr2)) +#define libmesh_assert_not_equal_to_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) != (expr2)) +#define libmesh_assert_less_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) < (expr2)) +#define libmesh_assert_greater_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) > (expr2)) +#define libmesh_assert_less_equal_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) <= (expr2)) +#define libmesh_assert_greater_equal_msg(expr1,expr2, msg) LIBMESH_DEVICE_ASSERT((expr1) >= (expr2)) + #else #define libmesh_assertion_types(expr1,expr2) \ @@ -674,7 +696,6 @@ inline Tnew restrict_int (Told oldvar) return oldvar; } - /** * This is a helper variable template for cases when we want to use a default compile-time * error with constexpr-based if conditions. The templating delays the triggering diff --git a/include/base/libmesh_exceptions.h b/include/base/libmesh_exceptions.h index 610c70c881..c3892f8677 100644 --- a/include/base/libmesh_exceptions.h +++ b/include/base/libmesh_exceptions.h @@ -23,6 +23,7 @@ #include "libmesh/libmesh_config.h" #include "libmesh/libmesh_abort.h" +#include "libmesh/libmesh_device.h" #include #include @@ -217,7 +218,13 @@ class TerminationException #ifdef LIBMESH_ENABLE_EXCEPTIONS #define libmesh_noexcept noexcept +#if LIBMESH_IN_DEVICE_CODE +// Kokkos device code does not support C++ exceptions. +#define LIBMESH_THROW(e) do { LIBMESH_DEVICE_ERROR_MSG((e).what()); } while (0) +#else #define LIBMESH_THROW(e) do { throw e; } while (0) +#endif + #define libmesh_rethrow throw #define libmesh_try try #define libmesh_catch(e) catch(e) From 1131b59c7a88ae30d5a7291e3086c45901a68282 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Fri, 8 May 2026 15:04:41 -0600 Subject: [PATCH 04/41] Make vector and tensor value types device-usable --- include/numerics/tensor_tools.h | 36 +++++------ include/numerics/tensor_value.h | 24 ++++--- include/numerics/type_tensor.h | 110 +++++++++++++++++++------------- include/numerics/type_vector.h | 89 ++++++++++++++++---------- include/numerics/vector_value.h | 16 +++-- 5 files changed, 161 insertions(+), 114 deletions(-) diff --git a/include/numerics/tensor_tools.h b/include/numerics/tensor_tools.h index 7617116f10..f183380a84 100644 --- a/include/numerics/tensor_tools.h +++ b/include/numerics/tensor_tools.h @@ -45,92 +45,92 @@ namespace TensorTools // Vector specializations will follow. template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if::value && ScalarTraits::value, typename CompareTypes::supertype>::type inner_product(const T & a, const T2& b) { return a * b; } template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype inner_product(const TypeVector & a, const TypeVector & b) { return a * b; } template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype inner_product(const TypeTensor & a, const TypeTensor & b) { return a.contract(b); } template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype inner_product(const TypeNTensor & a, const TypeNTensor & b) { return a.contract(b); } template -inline +LIBMESH_DEVICE_INLINE auto norm(const T & a) { using std::abs; return abs(a); } template -inline +LIBMESH_DEVICE_INLINE T norm(std::complex a) { using std::abs; return abs(a); } template -inline +LIBMESH_DEVICE_INLINE auto norm(const TypeVector & a) -> decltype(TensorTools::norm(T())) {using std::sqrt; return sqrt(a.norm_sq());} template -inline +LIBMESH_DEVICE_INLINE auto norm(const VectorValue & a) -> decltype(TensorTools::norm(T())) {using std::sqrt; return sqrt(a.norm_sq());} template -inline +LIBMESH_DEVICE_INLINE auto norm(const TypeTensor & a) -> decltype(TensorTools::norm(T())) {using std::sqrt; return sqrt(a.norm_sq());} template -inline +LIBMESH_DEVICE_INLINE auto norm(const TensorValue & a) -> decltype(TensorTools::norm(T())) {using std::sqrt; return sqrt(a.norm_sq());} template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const T & a) -{ using std::norm; return norm(a); } +{ return a * libmesh_conj(a); } template -inline +LIBMESH_DEVICE_INLINE T norm_sq(std::complex a) { using std::norm; return norm(a); } template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const TypeVector & a) {return a.norm_sq();} template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const VectorValue & a) {return a.norm_sq();} template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const TypeTensor & a) {return a.norm_sq();} template -inline +LIBMESH_DEVICE_INLINE auto norm_sq(const TensorValue & a) {return a.norm_sq();} template -inline +LIBMESH_DEVICE_INLINE bool is_zero(const T & a){ return a.is_zero();} // Any tensor-rank-independent code will need to include diff --git a/include/numerics/tensor_value.h b/include/numerics/tensor_value.h index 3a0d680476..c99e0cac00 100644 --- a/include/numerics/tensor_value.h +++ b/include/numerics/tensor_value.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/type_tensor.h" +#include "libmesh/libmesh_device.h" #include "libmesh/libmesh.h" // for pi #ifdef LIBMESH_HAVE_METAPHYSICL @@ -93,12 +94,14 @@ class TensorValue : public TypeTensor * Constructor. Takes 1 row vector for LIBMESH_DIM=1 */ template + LIBMESH_DEVICE_INLINE TensorValue (const TypeVector & vx); /** * Constructor. Takes 2 row vectors for LIBMESH_DIM=2 */ template + LIBMESH_DEVICE_INLINE TensorValue (const TypeVector & vx, const TypeVector & vy); @@ -106,6 +109,7 @@ class TensorValue : public TypeTensor * Constructor. Takes 3 row vectors for LIBMESH_DIM=3 */ template + LIBMESH_DEVICE_INLINE TensorValue (const TypeVector & vx, const TypeVector & vy, const TypeVector & vz); @@ -134,11 +138,11 @@ class TensorValue : public TypeTensor const TypeTensor & p_im); #endif - /** * Assignment-from-scalar operator. Used only to zero out tensors. */ template + LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TensorValue &>::type @@ -211,7 +215,7 @@ typedef NumberTensorValue Tensor; //------------------------------------------------------ // Inline functions template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue () : TypeTensor () { @@ -220,7 +224,7 @@ TensorValue::TensorValue () : template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const T & xx, const T & xy, const T & xz, @@ -237,7 +241,7 @@ TensorValue::TensorValue (const T & xx, template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const Scalar & xx, const Scalar & xy, const Scalar & xz, @@ -257,7 +261,7 @@ TensorValue::TensorValue (const Scalar & xx, template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TensorValue & p) : TypeTensor (p) { @@ -267,7 +271,7 @@ TensorValue::TensorValue (const TensorValue & p) : template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeVector & vx) : TypeTensor (vx) { @@ -277,7 +281,7 @@ TensorValue::TensorValue (const TypeVector & vx) : template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeVector & vx, const TypeVector & vy) : TypeTensor (vx, vy) @@ -288,7 +292,7 @@ TensorValue::TensorValue (const TypeVector & vx, template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeVector & vx, const TypeVector & vy, const TypeVector & vz) : @@ -300,7 +304,7 @@ TensorValue::TensorValue (const TypeVector & vx, template template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeTensor & p) : TypeTensor (p) { @@ -309,7 +313,7 @@ TensorValue::TensorValue (const TypeTensor & p) : #ifdef LIBMESH_USE_COMPLEX_NUMBERS template -inline +LIBMESH_DEVICE_INLINE TensorValue::TensorValue (const TypeTensor & p_re, const TypeTensor & p_im) : TypeTensor (Complex (p_re(0,0), p_im(0,0)), diff --git a/include/numerics/type_tensor.h b/include/numerics/type_tensor.h index 470b745f12..ac6dc14542 100644 --- a/include/numerics/type_tensor.h +++ b/include/numerics/type_tensor.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/libmesh_common.h" +#include "libmesh/libmesh_device.h" #include "libmesh/type_vector.h" // C++ includes @@ -101,13 +102,16 @@ class TypeTensor * many vectors are needed. */ template + LIBMESH_DEVICE_INLINE TypeTensor(const TypeVector & vx); template + LIBMESH_DEVICE_INLINE TypeTensor(const TypeVector & vx, const TypeVector & vy); template + LIBMESH_DEVICE_INLINE TypeTensor(const TypeVector & vx, const TypeVector & vy, const TypeVector & vz); @@ -133,12 +137,14 @@ class TypeTensor /** * Destructor. */ + LIBMESH_DEVICE_INLINE ~TypeTensor(); /** * Assign to this tensor without creating a temporary. */ template + LIBMESH_DEVICE_INLINE void assign (const TypeTensor &); /** @@ -147,6 +153,7 @@ class TypeTensor * \returns A reference to *this. */ template + LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeTensor &>::type @@ -166,11 +173,13 @@ class TypeTensor /** * \returns A proxy for the \f$ i^{th} \f$ column of the tensor. */ + LIBMESH_DEVICE_INLINE ConstTypeTensorColumn slice (const unsigned int i) const; /** * \returns A writable proxy for the \f$ i^{th} \f$ column of the tensor. */ + LIBMESH_DEVICE_INLINE TypeTensorColumn slice (const unsigned int i); /** @@ -181,6 +190,7 @@ class TypeTensor /** * \returns A copy of one column of the tensor as a TypeVector. */ + LIBMESH_DEVICE_INLINE TypeVector column(const unsigned int r) const; /** @@ -210,6 +220,7 @@ class TypeTensor * Add a scaled tensor to this tensor without creating a temporary. */ template + LIBMESH_DEVICE_INLINE void add_scaled (const TypeTensor &, const T &); /** @@ -240,6 +251,7 @@ class TypeTensor * temporary. */ template + LIBMESH_DEVICE_INLINE void subtract_scaled (const TypeTensor &, const T &); /** @@ -265,6 +277,7 @@ class TypeTensor */ template ::value, int>::type = 0> + LIBMESH_DEVICE_INLINE const TypeTensor & operator *= (const Scalar & factor) { for (unsigned int i=0; i + LIBMESH_DEVICE_INLINE typename CompareTypes::supertype contract (const TypeTensor &) const; @@ -339,6 +353,7 @@ class TypeTensor * \returns A copy of the result vector, this tensor is unchanged. */ template + LIBMESH_DEVICE_INLINE TypeVector::supertype> left_multiply (const TypeVector & p) const; @@ -358,6 +373,7 @@ class TypeTensor * * \returns The solution in the \p x vector. */ + LIBMESH_DEVICE_INLINE void solve(const TypeVector & b, TypeVector & x) const; /** @@ -375,6 +391,7 @@ class TypeTensor /** * \returns True if all values in the tensor are zero */ + LIBMESH_DEVICE_INLINE bool is_zero() const; /** @@ -393,11 +410,13 @@ class TypeTensor /** * Set all entries of the tensor to 0. */ + LIBMESH_DEVICE_INLINE void zero(); /** * \returns \p true if two tensors are equal, \p false otherwise. */ + LIBMESH_DEVICE_INLINE bool operator == (const TypeTensor & rhs) const; /** @@ -513,7 +532,7 @@ class ConstTypeTensorColumn //------------------------------------------------------ // Inline functions template -inline +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor () { _coords[0] = {}; @@ -536,7 +555,7 @@ TypeTensor::TypeTensor () template -inline +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor (const T & xx, const T & xy, const T & xz, @@ -582,7 +601,7 @@ TypeTensor::TypeTensor (const T & xx, template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor (const Scalar & xx, const Scalar & xy, const Scalar & xz, @@ -631,7 +650,7 @@ TypeTensor::TypeTensor (const Scalar & xx, template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor (const TypeTensor & p) { // copy the nodes from vector p to me @@ -642,6 +661,7 @@ TypeTensor::TypeTensor (const TypeTensor & p) template template +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor(const TypeVector & vx) { libmesh_assert_equal_to (LIBMESH_DIM, 1); @@ -650,6 +670,7 @@ TypeTensor::TypeTensor(const TypeVector & vx) template template +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor(const TypeVector & vx, const TypeVector & vy) { @@ -666,6 +687,7 @@ TypeTensor::TypeTensor(const TypeVector & vx, template template +LIBMESH_DEVICE_INLINE TypeTensor::TypeTensor(const TypeVector & vx, const TypeVector & vy, const TypeVector & vz) @@ -690,7 +712,7 @@ TypeTensor::TypeTensor(const TypeVector & vx, template -inline +LIBMESH_DEVICE_INLINE TypeTensor::~TypeTensor () { } @@ -699,7 +721,7 @@ TypeTensor::~TypeTensor () template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::assign (const TypeTensor & p) { for (unsigned int i=0; i::assign (const TypeTensor & p) template -inline +LIBMESH_DEVICE_INLINE const T & TypeTensor::operator () (const unsigned int i, const unsigned int j) const { @@ -728,14 +750,14 @@ const T & TypeTensor::operator () (const unsigned int i, template -inline +LIBMESH_DEVICE_INLINE T & TypeTensor::operator () (const unsigned int i, const unsigned int j) { #if LIBMESH_DIM < 3 - libmesh_error_msg_if(i >= LIBMESH_DIM || j >= LIBMESH_DIM, - "ERROR: You are assigning to a tensor component that is out of range for the compiled LIBMESH_DIM!"); + LIBMESH_DEVICE_ERROR_MSG_IF(i >= LIBMESH_DIM || j >= LIBMESH_DIM, + "ERROR: You are assigning to a tensor component that is out of range for the compiled LIBMESH_DIM!"); #endif @@ -747,7 +769,7 @@ T & TypeTensor::operator () (const unsigned int i, template -inline +LIBMESH_DEVICE_INLINE ConstTypeTensorColumn TypeTensor::slice (const unsigned int i) const { @@ -757,7 +779,7 @@ TypeTensor::slice (const unsigned int i) const template -inline +LIBMESH_DEVICE_INLINE TypeTensorColumn TypeTensor::slice (const unsigned int i) { @@ -767,7 +789,7 @@ TypeTensor::slice (const unsigned int i) template -inline +LIBMESH_DEVICE_INLINE TypeVector TypeTensor::row(const unsigned int r) const { @@ -781,7 +803,7 @@ TypeTensor::row(const unsigned int r) const template -inline +LIBMESH_DEVICE_INLINE TypeVector TypeTensor::column(const unsigned int r) const { @@ -796,7 +818,7 @@ TypeTensor::column(const unsigned int r) const template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::supertype> TypeTensor::operator + (const TypeTensor & p) const { @@ -831,7 +853,7 @@ TypeTensor::operator + (const TypeTensor & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeTensor & TypeTensor::operator += (const TypeTensor & p) { this->add (p); @@ -843,7 +865,7 @@ const TypeTensor & TypeTensor::operator += (const TypeTensor & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::add (const TypeTensor & p) { for (unsigned int i=0; i::add (const TypeTensor & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::add_scaled (const TypeTensor & p, const T & factor) { for (unsigned int i=0; i::add_scaled (const TypeTensor & p, const T & factor) template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::supertype> TypeTensor::operator - (const TypeTensor & p) const { @@ -901,7 +923,7 @@ TypeTensor::operator - (const TypeTensor & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeTensor & TypeTensor::operator -= (const TypeTensor & p) { this->subtract (p); @@ -913,7 +935,7 @@ const TypeTensor & TypeTensor::operator -= (const TypeTensor & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::subtract (const TypeTensor & p) { for (unsigned int i=0; i::subtract (const TypeTensor & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::subtract_scaled (const TypeTensor & p, const T & factor) { for (unsigned int i=0; i::subtract_scaled (const TypeTensor & p, const T & factor) template -inline +LIBMESH_DEVICE_INLINE TypeTensor TypeTensor::operator - () const { @@ -967,7 +989,7 @@ TypeTensor TypeTensor::operator - () const template template -inline +LIBMESH_DEVICE_INLINE auto TypeTensor::operator * (const Scalar & factor) const -> typename std::enable_if< ScalarTraits::value, @@ -1003,7 +1025,7 @@ TypeTensor::operator * (const Scalar & factor) const -> typename std::enable_ template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeTensor::supertype>>::type @@ -1015,7 +1037,7 @@ operator * (const Scalar & factor, template template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeTensor::supertype>>::type @@ -1053,7 +1075,7 @@ TypeTensor::operator / (const Scalar & factor) const template -inline +LIBMESH_DEVICE_INLINE TypeTensor TypeTensor::transpose() const { #if LIBMESH_DIM == 1 @@ -1083,7 +1105,7 @@ TypeTensor TypeTensor::transpose() const template -inline +LIBMESH_DEVICE_INLINE TypeTensor TypeTensor::inverse() const { #if LIBMESH_DIM == 1 @@ -1132,7 +1154,7 @@ TypeTensor TypeTensor::inverse() const template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::solve(const TypeVector & b, TypeVector & x) const { #if LIBMESH_DIM == 1 @@ -1183,7 +1205,7 @@ void TypeTensor::solve(const TypeVector & b, TypeVector & x) const template -inline +LIBMESH_DEVICE_INLINE const TypeTensor & TypeTensor::operator /= (const T & factor) { libmesh_assert_not_equal_to (factor, static_cast(0.)); @@ -1199,7 +1221,7 @@ const TypeTensor & TypeTensor::operator /= (const T & factor) template template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeTensor::operator * (const TypeVector & p) const { @@ -1213,7 +1235,7 @@ TypeTensor::operator * (const TypeVector & p) const template template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeTensor::left_multiply (const TypeVector & p) const { @@ -1226,7 +1248,7 @@ TypeTensor::left_multiply (const TypeVector & p) const } template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> operator * (const TypeVector & a, const TypeTensor & b) { @@ -1235,7 +1257,7 @@ operator * (const TypeVector & a, const TypeTensor & b) template template -inline +LIBMESH_DEVICE_INLINE TypeTensor::supertype> TypeTensor::operator * (const TypeTensor & p) const { @@ -1250,7 +1272,7 @@ TypeTensor::operator * (const TypeTensor & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeTensor & TypeTensor::operator *= (const TypeTensor & p) { TypeTensor temp; @@ -1270,7 +1292,7 @@ const TypeTensor & TypeTensor::operator *= (const TypeTensor & p) */ template template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype TypeTensor::contract (const TypeTensor & t) const { @@ -1283,7 +1305,7 @@ TypeTensor::contract (const TypeTensor & t) const template -inline +LIBMESH_DEVICE_INLINE auto TypeTensor::norm() const { using std::sqrt; @@ -1292,7 +1314,7 @@ auto TypeTensor::norm() const template -inline +LIBMESH_DEVICE_INLINE bool TypeTensor::is_zero() const { for (const auto & val : _coords) @@ -1302,7 +1324,7 @@ bool TypeTensor::is_zero() const } template -inline +LIBMESH_DEVICE_INLINE T TypeTensor::det() const { #if LIBMESH_DIM == 1 @@ -1325,7 +1347,7 @@ T TypeTensor::det() const } template -inline +LIBMESH_DEVICE_INLINE T TypeTensor::tr() const { #if LIBMESH_DIM == 1 @@ -1342,7 +1364,7 @@ T TypeTensor::tr() const } template -inline +LIBMESH_DEVICE_INLINE void TypeTensor::zero() { for (unsigned int i=0; i::zero() template -inline +LIBMESH_DEVICE_INLINE auto TypeTensor::norm_sq () const { Real sum = 0.; @@ -1364,7 +1386,7 @@ auto TypeTensor::norm_sq () const template -inline +LIBMESH_DEVICE_INLINE bool TypeTensor::operator == (const TypeTensor & rhs) const { #if LIBMESH_DIM == 1 @@ -1436,7 +1458,7 @@ void TypeTensor::print(std::ostream & os) const } template -inline +LIBMESH_DEVICE_INLINE TypeTensor::supertype> outer_product(const TypeVector & a, const TypeVector & b) { diff --git a/include/numerics/type_vector.h b/include/numerics/type_vector.h index 65bf6c3353..029884a42e 100644 --- a/include/numerics/type_vector.h +++ b/include/numerics/type_vector.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/libmesh_common.h" +#include "libmesh/libmesh_device.h" #include "libmesh/compare_types.h" #include "libmesh/tensor_tools.h" #include "libmesh/int_range.h" @@ -141,12 +142,14 @@ class TypeVector * Assign to this vector without creating a temporary. */ template + LIBMESH_DEVICE_INLINE void assign (const TypeVector &); /** * Assignment-from-scalar operator. Used only to zero out vectors. */ template + LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeVector &>::type @@ -157,12 +160,14 @@ class TypeVector * \returns A const reference to the \f$ i^{th} \f$ entry of the vector. */ const T & operator () (const unsigned int i) const; + LIBMESH_DEVICE_INLINE const T & slice (const unsigned int i) const { return (*this)(i); } /** * \returns A writable reference to the \f$ i^{th} \f$ entry of the vector. */ T & operator () (const unsigned int i); + LIBMESH_DEVICE_INLINE T & slice (const unsigned int i) { return (*this)(i); } /** @@ -192,6 +197,7 @@ class TypeVector * Add a scaled value to this vector without creating a temporary. */ template + LIBMESH_DEVICE_INLINE void add_scaled (const TypeVector &, const T &); /** @@ -222,6 +228,7 @@ class TypeVector * temporary. */ template + LIBMESH_DEVICE_INLINE void subtract_scaled (const TypeVector &, const T &); /** @@ -279,6 +286,7 @@ class TypeVector * \returns The result of TypeVector::operator*(). */ template + LIBMESH_DEVICE_INLINE typename CompareTypes::supertype contract (const TypeVector &) const; @@ -292,6 +300,7 @@ class TypeVector /** * \returns A unit vector in the direction of *this. */ + LIBMESH_DEVICE_INLINE TypeVector unit() const; /** @@ -309,16 +318,19 @@ class TypeVector /** * \returns The L1 norm of the vector */ + LIBMESH_DEVICE_INLINE auto l1_norm() const; /** * \returns True if all values in the vector are zero */ + LIBMESH_DEVICE_INLINE bool is_zero() const; /** * Set all entries of the vector to 0. */ + LIBMESH_DEVICE_INLINE void zero(); /** @@ -342,11 +354,13 @@ class TypeVector * \note For floating point types T, the function \p absolute_fuzzy_equals() * may be a more appropriate choice. */ + LIBMESH_DEVICE_INLINE bool operator == (const TypeVector & rhs) const; /** * \returns !(*this == rhs) */ + LIBMESH_DEVICE_INLINE bool operator != (const TypeVector & rhs) const; /** @@ -425,7 +439,7 @@ class TypeVector // Inline functions template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector () { _coords[0] = {}; @@ -442,7 +456,7 @@ TypeVector::TypeVector () template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector (const T & x, const T & y, const T & z) @@ -467,7 +481,7 @@ TypeVector::TypeVector (const T & x, template template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector (typename std::enable_if::value, const Scalar1>::type & x, @@ -497,7 +511,7 @@ TypeVector::TypeVector (typename template template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector (const Scalar & x, typename std::enable_if::value, @@ -518,7 +532,7 @@ TypeVector::TypeVector (const Scalar & x, template template -inline +LIBMESH_DEVICE_INLINE TypeVector::TypeVector (const TypeVector & p) { // copy the nodes from vector p to me @@ -530,7 +544,7 @@ TypeVector::TypeVector (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::assign (const TypeVector & p) { for (unsigned int i=0; i::assign (const TypeVector & p) template -inline +LIBMESH_DEVICE_INLINE const T & TypeVector::operator () (const unsigned int i) const { libmesh_assert_less (i, LIBMESH_DIM); @@ -551,7 +565,7 @@ const T & TypeVector::operator () (const unsigned int i) const template -inline +LIBMESH_DEVICE_INLINE T & TypeVector::operator () (const unsigned int i) { libmesh_assert_less (i, LIBMESH_DIM); @@ -563,7 +577,7 @@ T & TypeVector::operator () (const unsigned int i) template template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeVector::operator + (const TypeVector & p) const { @@ -589,7 +603,7 @@ TypeVector::operator + (const TypeVector & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeVector & TypeVector::operator += (const TypeVector & p) { this->add (p); @@ -601,7 +615,7 @@ const TypeVector & TypeVector::operator += (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::add (const TypeVector & p) { #if LIBMESH_DIM == 1 @@ -625,7 +639,7 @@ void TypeVector::add (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::add_scaled (const TypeVector & p, const T & factor) { #if LIBMESH_DIM == 1 @@ -649,7 +663,7 @@ void TypeVector::add_scaled (const TypeVector & p, const T & factor) template template -inline +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeVector::operator - (const TypeVector & p) const { @@ -676,7 +690,7 @@ TypeVector::operator - (const TypeVector & p) const template template -inline +LIBMESH_DEVICE_INLINE const TypeVector & TypeVector::operator -= (const TypeVector & p) { this->subtract (p); @@ -688,7 +702,7 @@ const TypeVector & TypeVector::operator -= (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::subtract (const TypeVector & p) { for (unsigned int i=0; i::subtract (const TypeVector & p) template template -inline +LIBMESH_DEVICE_INLINE void TypeVector::subtract_scaled (const TypeVector & p, const T & factor) { for (unsigned int i=0; i::subtract_scaled (const TypeVector & p, const T & factor) template -inline +LIBMESH_DEVICE_INLINE TypeVector TypeVector::operator - () const { @@ -734,7 +748,7 @@ TypeVector TypeVector::operator - () const template template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeVector::supertype>>::type @@ -761,7 +775,7 @@ TypeVector::operator * (const Scalar & factor) const template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeVector::supertype>>::type @@ -774,7 +788,7 @@ operator * (const Scalar & factor, template -inline +LIBMESH_DEVICE_INLINE const TypeVector & TypeVector::operator *= (const T & factor) { #if LIBMESH_DIM == 1 @@ -799,7 +813,7 @@ const TypeVector & TypeVector::operator *= (const T & factor) template template -inline +LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, TypeVector::supertype>>::type @@ -831,7 +845,7 @@ TypeVector::operator / (const Scalar & factor) const template -inline +LIBMESH_DEVICE_INLINE const TypeVector & TypeVector::operator /= (const T & factor) { @@ -848,7 +862,7 @@ TypeVector::operator /= (const T & factor) template template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype TypeVector::operator * (const TypeVector & p) const { @@ -870,7 +884,7 @@ TypeVector::operator * (const TypeVector & p) const template template -inline +LIBMESH_DEVICE_INLINE typename CompareTypes::supertype TypeVector::contract(const TypeVector & p) const { @@ -881,6 +895,7 @@ TypeVector::contract(const TypeVector & p) const template template +LIBMESH_DEVICE_INLINE TypeVector::supertype> TypeVector::cross(const TypeVector & p) const { @@ -904,7 +919,7 @@ TypeVector::cross(const TypeVector & p) const template -inline +LIBMESH_DEVICE_INLINE auto TypeVector::norm() const { using std::sqrt; @@ -914,7 +929,7 @@ auto TypeVector::norm() const template -inline +LIBMESH_DEVICE_INLINE void TypeVector::zero() { for (unsigned int i=0; i::zero() template -inline +LIBMESH_DEVICE_INLINE auto TypeVector::norm_sq() const { #if LIBMESH_DIM == 1 @@ -945,7 +960,7 @@ auto TypeVector::norm_sq() const template -inline +LIBMESH_DEVICE_INLINE bool TypeVector::is_zero() const { for (const auto & val : _coords) @@ -959,6 +974,7 @@ auto TypeVector::l1_norm() const; template +LIBMESH_DEVICE_INLINE auto TypeVector::l1_norm() const { @@ -989,7 +1005,7 @@ bool TypeVector::relative_fuzzy_equals(const TypeVector & rhs, Real tol) c template -inline +LIBMESH_DEVICE_INLINE bool TypeVector::operator == (const TypeVector & rhs) const { #if LIBMESH_DIM == 1 @@ -1011,7 +1027,7 @@ bool TypeVector::operator == (const TypeVector & rhs) const template -inline +LIBMESH_DEVICE_INLINE bool TypeVector::operator != (const TypeVector & rhs) const { return (!(*this == rhs)); @@ -1028,7 +1044,7 @@ bool TypeVector::operator != (const TypeVector & rhs) const // [b0, b1, b2] // [c0, c1, c2] template -inline +LIBMESH_DEVICE_INLINE T triple_product(const TypeVector & a, const TypeVector & b, const TypeVector & c) @@ -1050,7 +1066,7 @@ T triple_product(const TypeVector & a, // to be positive if the vectors are obey the right-hand rule, or // negative for a left-hand orientation. template -inline +LIBMESH_DEVICE_INLINE T solid_angle(const TypeVector & v01, const TypeVector & v02, const TypeVector & v03) @@ -1107,7 +1123,7 @@ TypeVector circumcenter(const TypeVector & p0, * calling b.cross(c).norm_sq(). */ template -inline +LIBMESH_DEVICE_INLINE T cross_norm_sq(const TypeVector & b, const TypeVector & c) { @@ -1128,7 +1144,7 @@ T cross_norm_sq(const TypeVector & b, * Calls cross_norm_sq() and takes the square root of the result. */ template -inline +LIBMESH_DEVICE_INLINE T cross_norm(const TypeVector & b, const TypeVector & c) { @@ -1137,7 +1153,7 @@ T cross_norm(const TypeVector & b, } template -inline +LIBMESH_DEVICE_INLINE TypeVector TypeVector::unit() const { @@ -1199,6 +1215,7 @@ struct CompareTypes, TypeVector> }; template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE TypeVector::supertype> outer_product(const T & a, const TypeVector & b) { @@ -1210,6 +1227,7 @@ outer_product(const T & a, const TypeVector & b) } template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE TypeVector::supertype> outer_product(const TypeVector & a, const T2 & b) { @@ -1240,6 +1258,7 @@ l1_norm_diff(const TypeVector & vec1, const TypeVector & vec2) namespace std { template +LIBMESH_DEVICE_INLINE auto norm(const libMesh::TypeVector & vector) -> decltype(std::norm(T())) { // Yea I agree it's dumb that the standard returns the square of the Euclidean norm diff --git a/include/numerics/vector_value.h b/include/numerics/vector_value.h index c93f17313d..45116e1a73 100644 --- a/include/numerics/vector_value.h +++ b/include/numerics/vector_value.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/type_vector.h" +#include "libmesh/libmesh_device.h" #include "libmesh/compare_types.h" #ifdef LIBMESH_HAVE_METAPHYSICL @@ -124,6 +125,7 @@ class VectorValue : public TypeVector * Assignment-from-scalar operator. Used only to zero out vectors. */ template + LIBMESH_DEVICE_INLINE typename std::enable_if< ScalarTraits::value, VectorValue &>::type @@ -146,7 +148,7 @@ typedef NumberVectorValue Gradient; // Inline functions template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue () : TypeVector () { @@ -154,7 +156,7 @@ VectorValue::VectorValue () : template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const T & x, const T & y, const T & z) : @@ -166,7 +168,7 @@ VectorValue::VectorValue (const T & x, template template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (typename std::enable_if::value, const Scalar1>::type & x, @@ -183,7 +185,7 @@ VectorValue::VectorValue (typename template template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const Scalar & x, typename std::enable_if::value, @@ -194,7 +196,7 @@ VectorValue::VectorValue (const Scalar & x, template template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const VectorValue & p) : TypeVector (p) { @@ -204,7 +206,7 @@ VectorValue::VectorValue (const VectorValue & p) : template template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const TypeVector & p) : TypeVector (p) { @@ -212,7 +214,7 @@ VectorValue::VectorValue (const TypeVector & p) : #ifdef LIBMESH_USE_COMPLEX_NUMBERS template -inline +LIBMESH_DEVICE_INLINE VectorValue::VectorValue (const TypeVector & p_re, const TypeVector & p_im) : TypeVector (Complex (p_re(0), p_im(0)), From 06865da9e137aa35a5fedf3d07c740a22960dc82 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Fri, 8 May 2026 15:04:46 -0600 Subject: [PATCH 05/41] Add Kokkos numerics storage and operator headers --- include/gpu/kokkos_linalg_base.h | 472 ++++++++++++ include/gpu/kokkos_storage.h | 53 ++ include/gpu/kokkos_storage_policy.h | 124 ++++ include/gpu/kokkos_tensor_ops.h | 1033 +++++++++++++++++++++++++++ include/gpu/kokkos_vector_ops.h | 746 +++++++++++++++++++ include/include_HEADERS | 6 + include/libmesh/Makefile.am | 25 +- 7 files changed, 2458 insertions(+), 1 deletion(-) create mode 100644 include/gpu/kokkos_linalg_base.h create mode 100644 include/gpu/kokkos_storage.h create mode 100644 include/gpu/kokkos_storage_policy.h create mode 100644 include/gpu/kokkos_tensor_ops.h create mode 100644 include/gpu/kokkos_vector_ops.h diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h new file mode 100644 index 0000000000..70a634f1f1 --- /dev/null +++ b/include/gpu/kokkos_linalg_base.h @@ -0,0 +1,472 @@ +// libMesh Kokkos compile-time linalg foundation. +// +// This header defines the small access/materialization layer that sits +// underneath richer vector/tensor algebra. It is intentionally limited to +// component access, storage-backed references, and conversion between +// vector-like/tensor-like objects and libMesh semantic types. + +#ifndef LIBMESH_KOKKOS_LINALG_BASE_H +#define LIBMESH_KOKKOS_LINALG_BASE_H + +#include "libmesh/libmesh_common.h" +#include "libmesh/libmesh_device.h" +#include "libmesh/point.h" +#include "libmesh/tensor_value.h" +#include "libmesh/type_tensor.h" +#include "libmesh/type_vector.h" +#include "libmesh/vector_value.h" + +#include +#include + +namespace libMesh::Kokkos +{ + +namespace detail +{ + +template +using remove_cvref_t = + typename std::remove_cv::type>::type; + +template +using remove_ref_t = typename std::remove_reference::type; + +template +using vector_view_value_t = + remove_cvref_t()(0, 0))>; + +template +using tensor_view_value_t = + remove_cvref_t()(0, 0, 0))>; + +} // namespace detail + +template +struct vector_traits; + +template +struct tensor_traits; + +template +struct is_vector_like : std::false_type +{ +}; + +template +struct is_tensor_like : std::false_type +{ +}; + +template +struct is_vector_ref : std::false_type +{ +}; + +template +struct is_tensor_ref : std::false_type +{ +}; + +template +inline constexpr bool is_vector_like_v = is_vector_like>::value; + +template +inline constexpr bool is_tensor_like_v = is_tensor_like>::value; + +template +inline constexpr bool is_vector_ref_v = is_vector_ref>::value; + +template +inline constexpr bool is_tensor_ref_v = is_tensor_ref>::value; + +template +class vector_ref +{ +public: + using view_type = ViewType; + using value_type = detail::vector_view_value_t; + + LIBMESH_DEVICE_INLINE + vector_ref(ViewType view, const unsigned int index) : _view(view), _index(index) {} + + LIBMESH_DEVICE_INLINE + decltype(auto) operator()(const unsigned int component) const + { + return _view(_index, component); + } + + template + LIBMESH_DEVICE_INLINE + void set(const unsigned int component, const Scalar & value) + { + static_assert(std::is_assignable::value, + "Cannot write through a vector_ref built from a read-only view"); + _view(_index, component) = value; + } + + template + LIBMESH_DEVICE_INLINE + void assign(const RightVector & right); + + template + LIBMESH_DEVICE_INLINE + void add(const RightVector & right); + + template + LIBMESH_DEVICE_INLINE + void add_scaled(const RightVector & right, const value_type & factor); + + template + LIBMESH_DEVICE_INLINE + void subtract(const RightVector & right); + + template + LIBMESH_DEVICE_INLINE + void subtract_scaled(const RightVector & right, const value_type & factor); + + LIBMESH_DEVICE_INLINE + void zero(); + + template + LIBMESH_DEVICE_INLINE + auto contract(const RightVector & right) const; + + LIBMESH_DEVICE_INLINE + auto norm() const; + + LIBMESH_DEVICE_INLINE + auto norm_sq() const; + + LIBMESH_DEVICE_INLINE + auto l1_norm() const; + + LIBMESH_DEVICE_INLINE + bool is_zero() const; + + LIBMESH_DEVICE_INLINE + auto unit() const; + + template + LIBMESH_DEVICE_INLINE + auto cross(const RightVector & right) const; + + LIBMESH_DEVICE_INLINE + unsigned int index() const + { + return _index; + } + +private: + ViewType _view; + unsigned int _index; +}; + +template +class tensor_ref +{ +public: + using view_type = ViewType; + using value_type = detail::tensor_view_value_t; + + LIBMESH_DEVICE_INLINE + tensor_ref(ViewType view, const unsigned int index) : _view(view), _index(index) {} + + LIBMESH_DEVICE_INLINE + decltype(auto) operator()(const unsigned int row, const unsigned int col) const + { + return _view(_index, row, col); + } + + template + LIBMESH_DEVICE_INLINE + void set(const unsigned int row, const unsigned int col, const Scalar & value) + { + static_assert(std::is_assignable::value, + "Cannot write through a tensor_ref built from a read-only view"); + _view(_index, row, col) = value; + } + + template + LIBMESH_DEVICE_INLINE + void assign(const RightTensor & right); + + template + LIBMESH_DEVICE_INLINE + void add(const RightTensor & right); + + template + LIBMESH_DEVICE_INLINE + void add_scaled(const RightTensor & right, const value_type & factor); + + template + LIBMESH_DEVICE_INLINE + void subtract(const RightTensor & right); + + template + LIBMESH_DEVICE_INLINE + void subtract_scaled(const RightTensor & right, const value_type & factor); + + LIBMESH_DEVICE_INLINE + void zero(); + + template + LIBMESH_DEVICE_INLINE + auto contract(const RightTensor & right) const; + + LIBMESH_DEVICE_INLINE + auto norm() const; + + LIBMESH_DEVICE_INLINE + auto norm_sq() const; + + LIBMESH_DEVICE_INLINE + bool is_zero() const; + + LIBMESH_DEVICE_INLINE + auto transpose() const; + + LIBMESH_DEVICE_INLINE + auto det(const unsigned int dim = LIBMESH_DIM) const; + + LIBMESH_DEVICE_INLINE + auto tr() const; + + LIBMESH_DEVICE_INLINE + auto inverse(const unsigned int dim = LIBMESH_DIM) const; + + template + LIBMESH_DEVICE_INLINE + void solve(const VectorLike & b, ResultVector & x) const; + + LIBMESH_DEVICE_INLINE + auto row(const unsigned int i) const; + + LIBMESH_DEVICE_INLINE + auto column(const unsigned int i) const; + + template + LIBMESH_DEVICE_INLINE + auto left_multiply(const VectorLike & v) const; + + LIBMESH_DEVICE_INLINE + unsigned int index() const + { + return _index; + } + +private: + ViewType _view; + unsigned int _index; +}; + +template +struct vector_traits> +{ + using value_type = T; + using semantic_type = libMesh::TypeVector; +}; + +template +struct vector_traits> +{ + using value_type = T; + using semantic_type = libMesh::VectorValue; +}; + +template <> +struct vector_traits +{ + using value_type = libMesh::Real; + using semantic_type = libMesh::Point; +}; + +template +struct vector_traits> +{ + using value_type = typename vector_ref::value_type; + using semantic_type = libMesh::TypeVector; +}; + +template +struct is_vector_like> : std::true_type +{ +}; + +template +struct is_vector_like> : std::true_type +{ +}; + +template <> +struct is_vector_like : std::true_type +{ +}; + +template +struct is_vector_like> : std::true_type +{ +}; + +template +struct is_vector_ref> : std::true_type +{ +}; + +template +struct tensor_traits> +{ + using value_type = T; + using semantic_type = libMesh::TypeTensor; +}; + +template +struct tensor_traits> +{ + using value_type = T; + using semantic_type = libMesh::TensorValue; +}; + +template +struct tensor_traits> +{ + using value_type = typename tensor_ref::value_type; + using semantic_type = libMesh::TypeTensor; +}; + +template +struct is_tensor_like> : std::true_type +{ +}; + +template +struct is_tensor_like> : std::true_type +{ +}; + +template +struct is_tensor_like> : std::true_type +{ +}; + +template +struct is_tensor_ref> : std::true_type +{ +}; + +template +using vector_value_type_t = typename vector_traits>::value_type; + +template +using tensor_value_type_t = typename tensor_traits>::value_type; + +template +using vector_semantic_type_t = typename vector_traits>::semantic_type; + +template +using tensor_semantic_type_t = typename tensor_traits>::semantic_type; + +template +LIBMESH_DEVICE_INLINE +decltype(auto) +vector_get_component(const T & v, const unsigned int component) +{ + return v(component); +} + +template +LIBMESH_DEVICE_INLINE +void vector_set_component(T & v, const unsigned int component, const Scalar & value) +{ + v(component) = value; +} + +template +LIBMESH_DEVICE_INLINE +void vector_set_component(vector_ref v, + const unsigned int component, + const Scalar & value) +{ + v.set(component, value); +} + +template +LIBMESH_DEVICE_INLINE +decltype(auto) +tensor_get_component(const T & T_in, const unsigned int row, const unsigned int col) +{ + return T_in(row, col); +} + +template +LIBMESH_DEVICE_INLINE +void tensor_set_component(T & T_out, + const unsigned int row, + const unsigned int col, + const Scalar & value) +{ + T_out(row, col) = value; +} + +template +LIBMESH_DEVICE_INLINE +void tensor_set_component(tensor_ref T_out, + const unsigned int row, + const unsigned int col, + const Scalar & value) +{ + T_out.set(row, col, value); +} + +template +LIBMESH_DEVICE_INLINE +vector_ref> +make_vector_ref(ViewType && view, const unsigned int index) +{ + return vector_ref>(std::forward(view), index); +} + +template +LIBMESH_DEVICE_INLINE +tensor_ref> +make_tensor_ref(ViewType && view, const unsigned int index) +{ + return tensor_ref>(std::forward(view), index); +} + +template +LIBMESH_DEVICE_INLINE +OutputVector materialize_vector(const VectorLike & v) +{ + static_assert(is_vector_like>::value, + "materialize_vector() requires a vector-like input type"); + + OutputVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, component, vector_get_component(v, component)); + + return out; +} + +template +LIBMESH_DEVICE_INLINE +OutputTensor materialize_tensor(const TensorLike & T_in) +{ + static_assert(is_tensor_like>::value, + "materialize_tensor() requires a tensor-like input type"); + + OutputTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T_in, row, col)); + + return out; +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_LINALG_BASE_H diff --git a/include/gpu/kokkos_storage.h b/include/gpu/kokkos_storage.h new file mode 100644 index 0000000000..23e59aabf8 --- /dev/null +++ b/include/gpu/kokkos_storage.h @@ -0,0 +1,53 @@ +// libMesh Kokkos storage helpers for dimension-aware vector/tensor views. + +#ifndef LIBMESH_KOKKOS_STORAGE_H +#define LIBMESH_KOKKOS_STORAGE_H + +#include "libmesh/kokkos_linalg_base.h" + +#include "libmesh/libmesh_common.h" +#include "libmesh/libmesh_device.h" +#include "libmesh/type_tensor.h" +#include "libmesh/type_vector.h" + +namespace libMesh::Kokkos +{ + +template +LIBMESH_DEVICE_INLINE +VectorType load_vector(const ViewType & view, const unsigned int i) +{ + return materialize_vector(make_vector_ref(view, i)); +} + +template +LIBMESH_DEVICE_INLINE +void store_vector(const ViewType & view, const unsigned int i, const VectorType & v) +{ + auto out = make_vector_ref(view, i); + + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + vector_set_component(out, d, vector_get_component(v, d)); +} + +template +LIBMESH_DEVICE_INLINE +TensorType load_tensor(const ViewType & view, const unsigned int i) +{ + return materialize_tensor(make_tensor_ref(view, i)); +} + +template +LIBMESH_DEVICE_INLINE +void store_tensor(const ViewType & view, const unsigned int i, const TensorType & T) +{ + auto out = make_tensor_ref(view, i); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T, row, col)); +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_STORAGE_H diff --git a/include/gpu/kokkos_storage_policy.h b/include/gpu/kokkos_storage_policy.h new file mode 100644 index 0000000000..6bfec5a6df --- /dev/null +++ b/include/gpu/kokkos_storage_policy.h @@ -0,0 +1,124 @@ +// libMesh Kokkos compile-time storage policies for fixed-dimension linalg data. +// +// These policies keep storage selection separate from the linalg algorithms: +// kernels operate on refs/materialized values, while the backend policy chooses +// the underlying Kokkos view layout. + +#ifndef LIBMESH_KOKKOS_STORAGE_POLICY_H +#define LIBMESH_KOKKOS_STORAGE_POLICY_H + +#include "libmesh/libmesh_common.h" + +#define PETSC_SKIP_CXX_COMPLEX_FIX 1 +#include +#undef __CUDACC_VER__ + +#include +#include +#include + +namespace libMesh::Kokkos +{ + +template +struct static_dim_storage_policy +{ + using scalar_type = Scalar; + using layout_type = Layout; + using vector_view = ::Kokkos::View; + using tensor_view = ::Kokkos::View; + + static constexpr const char * + name() + { + return std::is_same::value ? "layoutleft" : + std::is_same::value ? "layoutright" : + "layoutcustom"; + } +}; + +using layout_left_storage_policy = static_dim_storage_policy; +using layout_right_storage_policy = static_dim_storage_policy; +using default_storage_policy = layout_right_storage_policy; + +template +constexpr const char * +storage_policy_name() +{ + return StoragePolicy::name(); +} + +template +inline typename StoragePolicy::vector_view +make_vector_storage(const char * label, const std::size_t n) +{ + return typename StoragePolicy::vector_view(std::string(label), n); +} + +inline default_storage_policy::vector_view +make_vector_storage(const char * label, const std::size_t n) +{ + return make_vector_storage(label, n); +} + +template +inline typename StoragePolicy::tensor_view +make_tensor_storage(const char * label, const std::size_t n) +{ + return typename StoragePolicy::tensor_view(std::string(label), n); +} + +inline default_storage_policy::tensor_view +make_tensor_storage(const char * label, const std::size_t n) +{ + return make_tensor_storage(label, n); +} + +template +inline typename StoragePolicy::vector_view +upload_vector_storage(const std::vector & values, const char * label) +{ + auto d = make_vector_storage(label, values.size()); + auto h = ::Kokkos::create_mirror_view(d); + + for (std::size_t i = 0; i < values.size(); ++i) + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + h(i, component) = values[i](component); + + ::Kokkos::deep_copy(d, h); + return d; +} + +template +inline default_storage_policy::vector_view +upload_vector_storage(const std::vector & values, const char * label) +{ + return upload_vector_storage(values, label); +} + +template +inline typename StoragePolicy::tensor_view +upload_tensor_storage(const std::vector & values, const char * label) +{ + auto d = make_tensor_storage(label, values.size()); + auto h = ::Kokkos::create_mirror_view(d); + + for (std::size_t i = 0; i < values.size(); ++i) + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + h(i, row, col) = values[i](row, col); + + ::Kokkos::deep_copy(d, h); + return d; +} + +template +inline default_storage_policy::tensor_view +upload_tensor_storage(const std::vector & values, const char * label) +{ + return upload_tensor_storage(values, label); +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_STORAGE_POLICY_H diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h new file mode 100644 index 0000000000..a08080405d --- /dev/null +++ b/include/gpu/kokkos_tensor_ops.h @@ -0,0 +1,1033 @@ +// libMesh Kokkos generic tensor operations. +// +// These free functions build tensor algebra on top of the primitive +// access/materialization layer in kokkos_linalg_base.h. They are written +// against tensor-like and vector-like inputs so both libMesh owning types and +// storage-backed refs can participate in the same math. + +#ifndef LIBMESH_KOKKOS_TENSOR_OPS_H +#define LIBMESH_KOKKOS_TENSOR_OPS_H + +#include "libmesh/kokkos_linalg_base.h" +#include "libmesh/kokkos_vector_ops.h" + +#include "libmesh/tensor_tools.h" + +#include + +namespace libMesh::Kokkos +{ + +// Construction and materialization + +template +LIBMESH_DEVICE_INLINE +ResultTensor zero_tensor_value() +{ + ResultTensor out; + out.zero(); + return out; +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) +{ + ResultTensor out; + out.zero(); + + for (unsigned int i = 0; i < dim; ++i) + tensor_set_component(out, i, i, tensor_value_type_t(1)); + + return out; +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor copy_tensor(const TensorLike & T_in) +{ + return materialize_tensor(T_in); +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t copy_tensor(const TensorLike & T_in) +{ + return copy_tensor>(T_in); +} + +// Tensor reductions and predicates + +template +LIBMESH_DEVICE_INLINE +auto tensor_contract(const LeftTensor & left, const RightTensor & right) +{ + static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like left input"); + static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like right input"); + + using sum_type = + detail::remove_cvref_t; + + sum_type sum = sum_type(0); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + sum += tensor_get_component(left, row, col) * tensor_get_component(right, row, col); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_norm_sq(const TensorLike & T_in) +{ + static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); + + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + sum += libMesh::TensorTools::norm_sq(tensor_get_component(T_in, row, col)); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_norm(const TensorLike & T_in) +{ + using std::sqrt; + return sqrt(tensor_norm_sq(T_in)); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_trace(const TensorLike & T_in) +{ + static_assert(is_tensor_like_v, "tensor_trace() requires a tensor-like input"); + + using trace_type = detail::remove_cvref_t; + trace_type sum = trace_type(0); + for (unsigned int i = 0; i < LIBMESH_DIM; ++i) + sum += tensor_get_component(T_in, i, i); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_is_zero(const TensorLike & T_in) +{ + static_assert(is_tensor_like_v, "tensor_is_zero() requires a tensor-like input"); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(T_in, row, col) != tensor_value_type_t(0)) + return false; + + return true; +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_equal(const LeftTensor & left, const RightTensor & right) +{ + static_assert(is_tensor_like_v, "tensor_equal() requires a tensor-like left input"); + static_assert(is_tensor_like_v, "tensor_equal() requires a tensor-like right input"); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) + return false; + + return true; +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_not_equal(const LeftTensor & left, const RightTensor & right) +{ + return !tensor_equal(left, right); +} + +// Tensor arithmetic + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_outer_product(const LeftVector & left, const RightVector & right) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + vector_get_component(left, row) * libmesh_conj(vector_get_component(right, col))); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +libMesh::TypeTensor> +tensor_outer_product(const LeftVector & left, const RightVector & right) +{ + return tensor_outer_product>>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_add(const LeftTensor & left, const RightTensor & right) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_add(const LeftTensor & left, const RightTensor & right) +{ + return tensor_add>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_subtract(const LeftTensor & left, const RightTensor & right) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_subtract(const LeftTensor & left, const RightTensor & right) +{ + return tensor_subtract>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_scale(const Scalar & alpha, const TensorLike & T_in) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_scale(const Scalar & alpha, const TensorLike & T_in) +{ + return tensor_scale>(alpha, T_in); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_divide(const TensorLike & T_in, const Scalar & alpha) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const Scalar & alpha) +{ + return tensor_divide>(T_in, alpha); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +{ + static_assert(is_tensor_like_v, "tensor_determinant() requires a tensor-like input"); + + if (dim == 0) + return tensor_value_type_t(1); + + if (dim == 1) + return tensor_get_component(T_in, 0, 0); + + if (dim == 2) + return tensor_get_component(T_in, 0, 0) * tensor_get_component(T_in, 1, 1) - + tensor_get_component(T_in, 0, 1) * tensor_get_component(T_in, 1, 0); + +#if LIBMESH_DIM > 2 + const auto a00 = tensor_get_component(T_in, 0, 0); + const auto a01 = tensor_get_component(T_in, 0, 1); + const auto a02 = tensor_get_component(T_in, 0, 2); + const auto a10 = tensor_get_component(T_in, 1, 0); + const auto a11 = tensor_get_component(T_in, 1, 1); + const auto a12 = tensor_get_component(T_in, 1, 2); + const auto a20 = tensor_get_component(T_in, 2, 0); + const auto a21 = tensor_get_component(T_in, 2, 1); + const auto a22 = tensor_get_component(T_in, 2, 2); + + return a00 * (a11 * a22 - a12 * a21) - + a01 * (a10 * a22 - a12 * a20) + + a02 * (a10 * a21 - a11 * a20); +#else + libmesh_ignore(T_in); + return tensor_value_type_t(0); +#endif +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +{ + static_assert(is_tensor_like_v, "tensor_inverse() requires a tensor-like input"); + + ResultTensor out; + out.zero(); + + if (dim == 0) + return out; + + if (dim == 1) + { + tensor_set_component(out, 0, 0, tensor_value_type_t(1) / tensor_get_component(T_in, 0, 0)); + return out; + } + + const auto det = tensor_determinant(T_in, dim); + + if (dim == 2) + { + tensor_set_component(out, 0, 0, tensor_get_component(T_in, 1, 1) / det); + tensor_set_component(out, 0, 1, -tensor_get_component(T_in, 0, 1) / det); + tensor_set_component(out, 1, 0, -tensor_get_component(T_in, 1, 0) / det); + tensor_set_component(out, 1, 1, tensor_get_component(T_in, 0, 0) / det); + return out; + } + +#if LIBMESH_DIM > 2 + const auto a00 = tensor_get_component(T_in, 0, 0); + const auto a01 = tensor_get_component(T_in, 0, 1); + const auto a02 = tensor_get_component(T_in, 0, 2); + const auto a10 = tensor_get_component(T_in, 1, 0); + const auto a11 = tensor_get_component(T_in, 1, 1); + const auto a12 = tensor_get_component(T_in, 1, 2); + const auto a20 = tensor_get_component(T_in, 2, 0); + const auto a21 = tensor_get_component(T_in, 2, 1); + const auto a22 = tensor_get_component(T_in, 2, 2); + + tensor_set_component(out, 0, 0, (a11 * a22 - a12 * a21) / det); + tensor_set_component(out, 0, 1, (a02 * a21 - a01 * a22) / det); + tensor_set_component(out, 0, 2, (a01 * a12 - a02 * a11) / det); + tensor_set_component(out, 1, 0, (a12 * a20 - a10 * a22) / det); + tensor_set_component(out, 1, 1, (a00 * a22 - a02 * a20) / det); + tensor_set_component(out, 1, 2, (a02 * a10 - a00 * a12) / det); + tensor_set_component(out, 2, 0, (a10 * a21 - a11 * a20) / det); + tensor_set_component(out, 2, 1, (a01 * a20 - a00 * a21) / det); + tensor_set_component(out, 2, 2, (a00 * a11 - a01 * a10) / det); +#else + libmesh_ignore(T_in); +#endif + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +{ + return tensor_inverse>(T_in, dim); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_transpose(const TensorLike & T_in) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T_in, col, row)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_transpose(const TensorLike & T_in) +{ + return tensor_transpose>(T_in); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + alpha * tensor_get_component(A, row, col) + + beta * tensor_get_component(B, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) +{ + return tensor_linear_combination>(alpha, A, beta, B); +} + +template +LIBMESH_DEVICE_INLINE +ResultTensor tensor_multiply(const LeftTensor & left, const RightTensor & right) +{ + ResultTensor out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + auto value = tensor_get_component(left, row, 0) * tensor_get_component(right, 0, col); + for (unsigned int k = 1; k < LIBMESH_DIM; ++k) + value += tensor_get_component(left, row, k) * tensor_get_component(right, k, col); + tensor_set_component(out, row, col, value); + } + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +tensor_semantic_type_t tensor_multiply(const LeftTensor & left, const RightTensor & right) +{ + return tensor_multiply>(left, right); +} + +// Tensor/vector conversions + +template +LIBMESH_DEVICE_INLINE +ResultVector tensor_row(const TensorLike & T_in, const unsigned int row) +{ + ResultVector out; + out.zero(); + + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + vector_set_component(out, col, tensor_get_component(T_in, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +libMesh::TypeVector> +tensor_row(const TensorLike & T_in, const unsigned int row) +{ + return tensor_row>>(T_in, row); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector tensor_column(const TensorLike & T_in, const unsigned int col) +{ + ResultVector out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + vector_set_component(out, row, tensor_get_component(T_in, row, col)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +libMesh::TypeVector> +tensor_column(const TensorLike & T_in, const unsigned int col) +{ + return tensor_column>>(T_in, col); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector tensor_vector_multiply(const TensorLike & T_in, const VectorLike & v) +{ + ResultVector out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + { + auto value = tensor_get_component(T_in, row, 0) * vector_get_component(v, 0); + for (unsigned int col = 1; col < LIBMESH_DIM; ++col) + value += tensor_get_component(T_in, row, col) * vector_get_component(v, col); + vector_set_component(out, row, value); + } + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t tensor_vector_multiply(const TensorLike & T_in, const VectorLike & v) +{ + return tensor_vector_multiply>(T_in, v); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_tensor_multiply(const VectorLike & v, const TensorLike & T_in) +{ + ResultVector out; + out.zero(); + + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + auto value = vector_get_component(v, 0) * tensor_get_component(T_in, 0, col); + for (unsigned int row = 1; row < LIBMESH_DIM; ++row) + value += vector_get_component(v, row) * tensor_get_component(T_in, row, col); + vector_set_component(out, col, value); + } + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_tensor_multiply(const VectorLike & v, const TensorLike & T_in) +{ + return vector_tensor_multiply>(v, T_in); +} + +// libMesh-like convenience wrappers + +template +LIBMESH_DEVICE_INLINE +auto contract(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v, + decltype(tensor_contract(left, right))> +{ + return tensor_contract(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto norm_sq(const TensorLike & T_in) + -> std::enable_if_t, decltype(tensor_norm_sq(T_in))> +{ + return tensor_norm_sq(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto norm(const TensorLike & T_in) + -> std::enable_if_t, decltype(tensor_norm(T_in))> +{ + return tensor_norm(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto is_zero(const TensorLike & T_in) + -> std::enable_if_t, bool> +{ + return tensor_is_zero(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto outer_product(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v, + libMesh::TypeTensor>> +{ + return tensor_outer_product(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto transpose(const TensorLike & T_in) + -> std::enable_if_t, tensor_semantic_type_t> +{ + return tensor_transpose(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto det(const TensorLike & T_in) + -> std::enable_if_t, decltype(tensor_determinant(T_in))> +{ + return tensor_determinant(T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) + -> std::enable_if_t, tensor_semantic_type_t> +{ + return tensor_inverse(T_in, dim); +} + +template +LIBMESH_DEVICE_INLINE +auto row(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, libMesh::TypeVector>> +{ + return tensor_row(T_in, i); +} + +template +LIBMESH_DEVICE_INLINE +auto column(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, libMesh::TypeVector>> +{ + return tensor_column(T_in, i); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v, + tensor_semantic_type_t> +{ + return tensor_multiply(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const TensorLike & T_in, const VectorLike & v) + -> std::enable_if_t && is_vector_like_v, + vector_semantic_type_t> +{ + return tensor_vector_multiply(T_in, v); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const VectorLike & v, const TensorLike & T_in) + -> std::enable_if_t && is_tensor_like_v, + vector_semantic_type_t> +{ + return vector_tensor_multiply(v, T_in); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::assign(const RightTensor & right) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, row, col, tensor_get_component(right, row, col)); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::add(const RightTensor & right) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, + row, + col, + tensor_get_component(*this, row, col) + tensor_get_component(right, row, col)); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::add_scaled(const RightTensor & right, const value_type & factor) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, + row, + col, + tensor_get_component(*this, row, col) + + factor * tensor_get_component(right, row, col)); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::subtract(const RightTensor & right) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, + row, + col, + tensor_get_component(*this, row, col) - tensor_get_component(right, row, col)); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::subtract_scaled(const RightTensor & right, const value_type & factor) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, + row, + col, + tensor_get_component(*this, row, col) - + factor * tensor_get_component(right, row, col)); +} + +template +LIBMESH_DEVICE_INLINE +void tensor_ref::zero() +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(*this, row, col, value_type(0)); +} + +template +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::contract(const RightTensor & right) const +{ + return tensor_contract(*this, right); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::norm() const +{ + return tensor_norm(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::norm_sq() const +{ + return tensor_norm_sq(*this); +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_ref::is_zero() const +{ + return tensor_is_zero(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::transpose() const +{ + return tensor_transpose(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::det(const unsigned int dim) const +{ + return tensor_determinant(*this, dim); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::tr() const +{ + return tensor_trace(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::inverse(const unsigned int dim) const +{ + return tensor_inverse(*this, dim); +} + +template +template +LIBMESH_DEVICE_INLINE +void tensor_ref::solve(const VectorLike & b, ResultVector & x) const +{ + const auto solution = tensor_vector_multiply>(this->inverse(), b); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(x, component, vector_get_component(solution, component)); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::row(const unsigned int i) const +{ + return tensor_row(*this, i); +} + +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::column(const unsigned int i) const +{ + return tensor_column(*this, i); +} + +template +template +LIBMESH_DEVICE_INLINE +auto tensor_ref::left_multiply(const VectorLike & v) const +{ + return vector_tensor_multiply(v, *this); +} + +// Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. + +template +LIBMESH_DEVICE_INLINE +auto operator-(const TensorLike & T_in) + -> std::enable_if_t && is_tensor_ref_v, + tensor_semantic_type_t> +{ + return tensor_scale(tensor_value_type_t(-1), T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto operator+(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + tensor_semantic_type_t> +{ + return tensor_add(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator-(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + tensor_semantic_type_t> +{ + return tensor_subtract(left, right); +} + +template && !is_tensor_like_v && + is_tensor_like_v && is_tensor_ref_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const Scalar & alpha, const TensorLike & T_in) +{ + return tensor_scale(alpha, T_in); +} + +template && is_tensor_ref_v && + !is_vector_like_v && !is_tensor_like_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const TensorLike & T_in, const Scalar & alpha) +{ + return tensor_scale(alpha, T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto operator/(const TensorLike & T_in, const Scalar & alpha) + -> std::enable_if_t && is_tensor_ref_v && + !is_vector_like_v && !is_tensor_like_v, + tensor_semantic_type_t> +{ + return tensor_divide(T_in, alpha); +} + +template && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const LeftTensor & left, const RightTensor & right) +{ + return tensor_multiply(left, right); +} + +template && is_vector_like_v && + (is_tensor_ref_v || is_vector_ref_v), + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const TensorLike & T_in, const VectorLike & v) +{ + return tensor_vector_multiply(T_in, v); +} + +template && is_tensor_like_v && + (is_vector_ref_v || is_tensor_ref_v), + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const VectorLike & v, const TensorLike & T_in) +{ + return vector_tensor_multiply(v, T_in); +} + +template +LIBMESH_DEVICE_INLINE +auto operator==(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + bool> +{ + return tensor_equal(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator!=(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + bool> +{ + return tensor_not_equal(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator+=(LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + LeftTensor &> +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator-=(LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + LeftTensor &> +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator*=(LeftTensor & left, const Scalar & alpha) + -> std::enable_if_t && is_tensor_ref_v && + !is_vector_like_v && !is_tensor_like_v, + LeftTensor &> +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, row, col, tensor_get_component(left, row, col) * alpha); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator/=(LeftTensor & left, const Scalar & alpha) + -> std::enable_if_t && is_tensor_ref_v && + !is_vector_like_v && !is_tensor_like_v, + LeftTensor &> +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, row, col, tensor_get_component(left, row, col) / alpha); + + return left; +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_TENSOR_OPS_H diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h new file mode 100644 index 0000000000..3fb1406866 --- /dev/null +++ b/include/gpu/kokkos_vector_ops.h @@ -0,0 +1,746 @@ +// libMesh Kokkos generic vector operations. +// +// These free functions build vector algebra on top of the primitive +// access/materialization layer in kokkos_linalg_base.h. They are written +// against vector-like inputs so both libMesh owning types and storage-backed +// refs can participate in the same math. + +#ifndef LIBMESH_KOKKOS_VECTOR_OPS_H +#define LIBMESH_KOKKOS_VECTOR_OPS_H + +#include "libmesh/kokkos_linalg_base.h" + +#include "libmesh/tensor_tools.h" + +#include + +namespace libMesh::Kokkos +{ + +// Construction and materialization + +template +LIBMESH_DEVICE_INLINE +ResultVector zero_vector_value() +{ + ResultVector out; + out.zero(); + return out; +} + +template +LIBMESH_DEVICE_INLINE +ResultVector copy_vector(const VectorLike & v) +{ + return materialize_vector(v); +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t copy_vector(const VectorLike & v) +{ + return copy_vector>(v); +} + +// Reductions and predicates + +template +LIBMESH_DEVICE_INLINE +auto vector_dot(const LeftVector & left, const RightVector & right) +{ + static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); + static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); + + using sum_type = + detail::remove_cvref_t; + + sum_type sum = sum_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += vector_get_component(left, component) * vector_get_component(right, component); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto vector_contract(const LeftVector & left, const RightVector & right) +{ + return vector_dot(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_norm_sq(const VectorLike & v) +{ + static_assert(is_vector_like_v, "vector_norm_sq() requires a vector-like input"); + + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += libMesh::TensorTools::norm_sq(vector_get_component(v, component)); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +auto vector_norm(const VectorLike & v) +{ + using std::sqrt; + return sqrt(vector_norm_sq(v)); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_l1_norm(const VectorLike & v) +{ + static_assert(is_vector_like_v, "vector_l1_norm() requires a vector-like input"); + + using std::abs; + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += abs(vector_get_component(v, component)); + + return sum; +} + +template +LIBMESH_DEVICE_INLINE +bool vector_is_zero(const VectorLike & v) +{ + static_assert(is_vector_like_v, "vector_is_zero() requires a vector-like input"); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if (vector_get_component(v, component) != vector_value_type_t(0)) + return false; + + return true; +} + +template +LIBMESH_DEVICE_INLINE +bool vector_equal(const LeftVector & left, const RightVector & right) +{ + static_assert(is_vector_like_v, "vector_equal() requires a vector-like left input"); + static_assert(is_vector_like_v, "vector_equal() requires a vector-like right input"); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if (vector_get_component(left, component) != vector_get_component(right, component)) + return false; + + return true; +} + +template +LIBMESH_DEVICE_INLINE +bool vector_not_equal(const LeftVector & left, const RightVector & right) +{ + return !vector_equal(left, right); +} + +// Arithmetic + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_add(const LeftVector & left, const RightVector & right) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, + component, + vector_get_component(left, component) + vector_get_component(right, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_add(const LeftVector & left, const RightVector & right) +{ + return vector_add>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_subtract(const LeftVector & left, const RightVector & right) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, + component, + vector_get_component(left, component) - vector_get_component(right, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_subtract(const LeftVector & left, const RightVector & right) +{ + return vector_subtract>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_scale(const Scalar & alpha, const VectorLike & v) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, component, alpha * vector_get_component(v, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_scale(const Scalar & alpha, const VectorLike & v) +{ + return vector_scale>(alpha, v); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_divide(const VectorLike & v, const Scalar & alpha) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, component, vector_get_component(v, component) / alpha); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_divide(const VectorLike & v, const Scalar & alpha) +{ + return vector_divide>(v, alpha); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, + component, + alpha * vector_get_component(a, component) + + beta * vector_get_component(b, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b) +{ + return vector_linear_combination>(alpha, a, beta, b); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b, + const ScalarC & gamma, + const VectorC & c) +{ + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, + component, + alpha * vector_get_component(a, component) + + beta * vector_get_component(b, component) + + gamma * vector_get_component(c, component)); + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b, + const ScalarC & gamma, + const VectorC & c) +{ + return vector_linear_combination>(alpha, a, beta, b, gamma, c); +} + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_unit(const VectorLike & v) +{ + const auto length = vector_norm(v); + libmesh_assert_not_equal_to(length, static_cast(0.)); + return vector_divide(v, length); +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_unit(const VectorLike & v) +{ + return vector_unit>(v); +} + +// Geometry + +template +LIBMESH_DEVICE_INLINE +ResultVector vector_cross(const LeftVector & left, const RightVector & right) +{ + ResultVector out; + out.zero(); + +#if LIBMESH_DIM == 3 + vector_set_component(out, + 0, + vector_get_component(left, 1) * vector_get_component(right, 2) - + vector_get_component(left, 2) * vector_get_component(right, 1)); + vector_set_component(out, + 1, + -vector_get_component(left, 0) * vector_get_component(right, 2) + + vector_get_component(left, 2) * vector_get_component(right, 0)); + vector_set_component(out, + 2, + vector_get_component(left, 0) * vector_get_component(right, 1) - + vector_get_component(left, 1) * vector_get_component(right, 0)); +#else + libmesh_ignore(left); + libmesh_ignore(right); +#endif + + return out; +} + +template ::value, int>::type = 0> +LIBMESH_DEVICE_INLINE +vector_semantic_type_t vector_cross(const LeftVector & left, const RightVector & right) +{ + return vector_cross>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_triple_product(const LeftVector & left, + const MiddleVector & middle, + const RightVector & right) +{ +#if LIBMESH_DIM == 3 + return vector_get_component(left, 0) * + (vector_get_component(middle, 1) * vector_get_component(right, 2) - + vector_get_component(middle, 2) * vector_get_component(right, 1)) - + vector_get_component(left, 1) * + (vector_get_component(middle, 0) * vector_get_component(right, 2) - + vector_get_component(middle, 2) * vector_get_component(right, 0)) + + vector_get_component(left, 2) * + (vector_get_component(middle, 0) * vector_get_component(right, 1) - + vector_get_component(middle, 1) * vector_get_component(right, 0)); +#else + libmesh_ignore(left, middle, right); + using value_type = + detail::remove_cvref_t; + return value_type(0); +#endif +} + +template +LIBMESH_DEVICE_INLINE +auto vector_cross_norm_sq(const LeftVector & left, const RightVector & right) +{ + const auto z = vector_get_component(left, 0) * vector_get_component(right, 1) - + vector_get_component(left, 1) * vector_get_component(right, 0); + +#if LIBMESH_DIM == 3 + const auto x = vector_get_component(left, 1) * vector_get_component(right, 2) - + vector_get_component(left, 2) * vector_get_component(right, 1); + const auto y = vector_get_component(left, 0) * vector_get_component(right, 2) - + vector_get_component(left, 2) * vector_get_component(right, 0); + return x * x + y * y + z * z; +#else + return z * z; +#endif +} + +template +LIBMESH_DEVICE_INLINE +auto vector_solid_angle(const VectorA & v01, const VectorB & v02, const VectorC & v03) +{ + using std::atan; + + const auto norm01 = vector_norm(v01); + const auto norm02 = vector_norm(v02); + const auto norm03 = vector_norm(v03); + const auto tan_half_angle = + vector_triple_product(v01, v02, v03) / + (vector_dot(v01, v02) * norm03 + + vector_dot(v01, v03) * norm02 + + vector_dot(v02, v03) * norm01 + + norm01 * norm02 * norm03); + + return Real(2) * atan(tan_half_angle); +} + +// libMesh-like convenience wrappers + +template +LIBMESH_DEVICE_INLINE +auto contract(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v, + decltype(vector_contract(left, right))> +{ + return vector_contract(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto norm_sq(const VectorLike & v) + -> std::enable_if_t, decltype(vector_norm_sq(v))> +{ + return vector_norm_sq(v); +} + +template +LIBMESH_DEVICE_INLINE +auto norm(const VectorLike & v) + -> std::enable_if_t, decltype(vector_norm(v))> +{ + return vector_norm(v); +} + +template +LIBMESH_DEVICE_INLINE +auto is_zero(const VectorLike & v) + -> std::enable_if_t, bool> +{ + return vector_is_zero(v); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::assign(const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, component, vector_get_component(right, component)); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::add(const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, + component, + vector_get_component(*this, component) + vector_get_component(right, component)); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::add_scaled(const RightVector & right, const value_type & factor) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, + component, + vector_get_component(*this, component) + + factor * vector_get_component(right, component)); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::subtract(const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, + component, + vector_get_component(*this, component) - vector_get_component(right, component)); +} + +template +template +LIBMESH_DEVICE_INLINE +void vector_ref::subtract_scaled(const RightVector & right, const value_type & factor) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, + component, + vector_get_component(*this, component) - + factor * vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void vector_ref::zero() +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(*this, component, value_type(0)); +} + +template +template +LIBMESH_DEVICE_INLINE +auto vector_ref::contract(const RightVector & right) const +{ + return vector_contract(*this, right); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_ref::norm() const +{ + return vector_norm(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_ref::norm_sq() const +{ + return vector_norm_sq(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_ref::l1_norm() const +{ + return vector_l1_norm(*this); +} + +template +LIBMESH_DEVICE_INLINE +bool vector_ref::is_zero() const +{ + return vector_is_zero(*this); +} + +template +LIBMESH_DEVICE_INLINE +auto vector_ref::unit() const +{ + return vector_unit(*this); +} + +template +template +LIBMESH_DEVICE_INLINE +auto vector_ref::cross(const RightVector & right) const +{ + return vector_cross(*this, right); +} + +// Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. + +template +LIBMESH_DEVICE_INLINE +auto operator-(const VectorLike & v) + -> std::enable_if_t && is_vector_ref_v, + vector_semantic_type_t> +{ + return vector_scale(vector_value_type_t(-1), v); +} + +template +LIBMESH_DEVICE_INLINE +auto operator+(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + vector_semantic_type_t> +{ + return vector_add(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator-(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + vector_semantic_type_t> +{ + return vector_subtract(left, right); +} + +template && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const LeftVector & left, const RightVector & right) +{ + return vector_dot(left, right); +} + +template && !is_tensor_like_v && + is_vector_like_v && is_vector_ref_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const Scalar & alpha, const VectorLike & v) +{ + return vector_scale(alpha, v); +} + +template && is_vector_ref_v && + !is_vector_like_v && !is_tensor_like_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator*(const VectorLike & v, const Scalar & alpha) +{ + return vector_scale(alpha, v); +} + +template && is_vector_ref_v && + !is_vector_like_v && !is_tensor_like_v, + int>::type = 0> +LIBMESH_DEVICE_INLINE +auto operator/(const VectorLike & v, const Scalar & alpha) +{ + return vector_divide(v, alpha); +} + +template +LIBMESH_DEVICE_INLINE +auto operator==(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + bool> +{ + return vector_equal(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator!=(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + bool> +{ + return vector_not_equal(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto operator+=(LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + LeftVector &> +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) + vector_get_component(right, component)); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator-=(LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + LeftVector &> +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) - vector_get_component(right, component)); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator*=(LeftVector & left, const Scalar & alpha) + -> std::enable_if_t && is_vector_ref_v && + !is_vector_like_v && !is_tensor_like_v, + LeftVector &> +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, component, vector_get_component(left, component) * alpha); + + return left; +} + +template +LIBMESH_DEVICE_INLINE +auto operator/=(LeftVector & left, const Scalar & alpha) + -> std::enable_if_t && is_vector_ref_v && + !is_vector_like_v && !is_tensor_like_v, + LeftVector &> +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, component, vector_get_component(left, component) / alpha); + + return left; +} + +} // namespace libMesh::Kokkos + +#endif // LIBMESH_KOKKOS_VECTOR_OPS_H diff --git a/include/include_HEADERS b/include/include_HEADERS index 115b473ba2..a08484a308 100644 --- a/include/include_HEADERS +++ b/include/include_HEADERS @@ -28,6 +28,7 @@ include_HEADERS = \ base/libmesh_abort.h \ base/libmesh_base.h \ base/libmesh_common.h \ + base/libmesh_device.h \ base/libmesh_documentation.h \ base/libmesh_exceptions.h \ base/libmesh_logging.h \ @@ -174,6 +175,11 @@ include_HEADERS = \ geom/sphere.h \ geom/stored_range.h \ geom/surface.h \ + gpu/kokkos_linalg_base.h \ + gpu/kokkos_storage.h \ + gpu/kokkos_storage_policy.h \ + gpu/kokkos_tensor_ops.h \ + gpu/kokkos_vector_ops.h \ ghosting/default_coupling.h \ ghosting/ghost_point_neighbors.h \ ghosting/ghosting_functor.h \ diff --git a/include/libmesh/Makefile.am b/include/libmesh/Makefile.am index 7b8880c3a4..25470b1ea0 100644 --- a/include/libmesh/Makefile.am +++ b/include/libmesh/Makefile.am @@ -19,6 +19,7 @@ BUILT_SOURCES = \ libmesh_augment_std_namespace.h \ libmesh_base.h \ libmesh_common.h \ + libmesh_device.h \ libmesh_documentation.h \ libmesh_exceptions.h \ libmesh_logging.h \ @@ -172,6 +173,11 @@ BUILT_SOURCES = \ overlap_coupling.h \ point_neighbor_coupling.h \ sibling_coupling.h \ + kokkos_linalg_base.h \ + kokkos_storage.h \ + kokkos_storage_policy.h \ + kokkos_tensor_ops.h \ + kokkos_vector_ops.h \ abaqus_io.h \ boundary_info.h \ boundary_mesh.h \ @@ -657,6 +663,9 @@ libmesh_base.h: $(top_srcdir)/include/base/libmesh_base.h libmesh_common.h: $(top_srcdir)/include/base/libmesh_common.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +libmesh_device.h: $(top_srcdir)/include/base/libmesh_device.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + libmesh_documentation.h: $(top_srcdir)/include/base/libmesh_documentation.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ @@ -1116,6 +1125,21 @@ point_neighbor_coupling.h: $(top_srcdir)/include/ghosting/point_neighbor_couplin sibling_coupling.h: $(top_srcdir)/include/ghosting/sibling_coupling.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +kokkos_linalg_base.h: $(top_srcdir)/include/gpu/kokkos_linalg_base.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_storage.h: $(top_srcdir)/include/gpu/kokkos_storage.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_storage_policy.h: $(top_srcdir)/include/gpu/kokkos_storage_policy.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_tensor_ops.h: $(top_srcdir)/include/gpu/kokkos_tensor_ops.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_vector_ops.h: $(top_srcdir)/include/gpu/kokkos_vector_ops.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + abaqus_io.h: $(top_srcdir)/include/mesh/abaqus_io.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ @@ -2138,4 +2162,3 @@ xdr_cxx.h: $(top_srcdir)/include/utils/xdr_cxx.h parallel_communicator_specializations: $(top_srcdir)/include/timpi_shims/parallel_communicator_specializations $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ - From 19d3dea22ec8a8e64d14723bc0931c3da8318ea8 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Fri, 8 May 2026 15:04:52 -0600 Subject: [PATCH 06/41] Add Kokkos numerics oracle test infrastructure --- tests/Makefile.am | 42 +- .../kokkos_numerics_oracle_test_utils.h | 90 ++++ .../kokkos_tensor_ops_oracle_fixtures.h | 161 ++++++ .../kokkos_tensor_ops_oracle_runners.h | 482 ++++++++++++++++++ .../kokkos_vector_ops_oracle_fixtures.h | 223 ++++++++ .../kokkos_vector_ops_oracle_runners.h | 327 ++++++++++++ 6 files changed, 1324 insertions(+), 1 deletion(-) create mode 100644 tests/numerics/kokkos_numerics_oracle_test_utils.h create mode 100644 tests/numerics/kokkos_tensor_ops_oracle_fixtures.h create mode 100644 tests/numerics/kokkos_tensor_ops_oracle_runners.h create mode 100644 tests/numerics/kokkos_vector_ops_oracle_fixtures.h create mode 100644 tests/numerics/kokkos_vector_ops_oracle_runners.h diff --git a/tests/Makefile.am b/tests/Makefile.am index c1965e31c6..78cf58c5e4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,6 +7,7 @@ AM_CPPFLAGS = $(libmesh_optional_INCLUDES) -I$(top_builddir)/include \ -DLIBMESH_IS_UNIT_TESTING AM_LDFLAGS = $(libmesh_LDFLAGS) $(libmesh_contrib_LDFLAGS) LIBS = $(libmesh_optional_LIBS) $(CPPUNIT_LIBS) +KOKKOS_TEST_CPPFLAGS = # We might have turned on -Werror and/or paranoid warnings CXXFLAGS_DBG += $(ACSM_ANY_WERROR_FLAG) $(ACSM_ANY_PARANOID_FLAGS) @@ -249,6 +250,26 @@ if LIBMESH_ENABLE_FPARSER endif check_PROGRAMS = # empty, append below +TESTS = + +if LIBMESH_ENABLE_KOKKOS + KOKKOS_TEST_CPPFLAGS += -I$(top_srcdir)/include $(KOKKOS_CPPFLAGS) + + check_PROGRAMS += kokkos_vector_ops_oracle_unit kokkos_tensor_ops_oracle_unit + TESTS += kokkos_vector_ops_oracle_unit kokkos_tensor_ops_oracle_unit + + kokkos_vector_ops_oracle_unit_SOURCES = numerics/kokkos_vector_ops_oracle_test.K + kokkos_vector_ops_oracle_unit_CPPFLAGS = $(AM_CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) + kokkos_vector_ops_oracle_unit_CXXFLAGS = $(AM_CXXFLAGS) $(KOKKOS_CXXFLAGS) + kokkos_vector_ops_oracle_unit_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) + kokkos_vector_ops_oracle_unit_LDADD = $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) + + kokkos_tensor_ops_oracle_unit_SOURCES = numerics/kokkos_tensor_ops_oracle_test.K + kokkos_tensor_ops_oracle_unit_CPPFLAGS = $(AM_CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) + kokkos_tensor_ops_oracle_unit_CXXFLAGS = $(AM_CXXFLAGS) $(KOKKOS_CXXFLAGS) + kokkos_tensor_ops_oracle_unit_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) + kokkos_tensor_ops_oracle_unit_LDADD = $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) +endif # our GLIBC debugging preprocessor flags seem to potentially conflict # with libcppunit binaries. Some cppunit versions work fine for us, @@ -359,9 +380,28 @@ $(top_builddir)/libmesh_oprof.la: FORCE if LIBMESH_ENABLE_CPPUNIT -TESTS = run_unit_tests.sh +TESTS += run_unit_tests.sh endif +# Compile .K translation units with the Kokkos device compiler. +# If KOKKOS_CXX is not the MPI wrapper, configure populates +# $(KOKKOS_MPI_CPPFLAGS) from the wrapper's compile flags so mpi.h and +# any wrapper-provided defines remain visible. +.K.o: + $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(KOKKOS_MPI_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ + -c $< -o $@ + +# Custom link rules so the Kokkos compiler drives the final link step. +kokkos_vector_ops_oracle_unit_LINK = \ + $(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ + $(LDFLAGS) $(kokkos_vector_ops_oracle_unit_LDFLAGS) -o $@ + +kokkos_tensor_ops_oracle_unit_LINK = \ + $(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ + $(LDFLAGS) $(kokkos_tensor_ops_oracle_unit_LDFLAGS) -o $@ + CLEANFILES = cube_mesh.xda \ slit_mesh.xda \ slit_solution.xda \ diff --git a/tests/numerics/kokkos_numerics_oracle_test_utils.h b/tests/numerics/kokkos_numerics_oracle_test_utils.h new file mode 100644 index 0000000000..c25ce2a056 --- /dev/null +++ b/tests/numerics/kokkos_numerics_oracle_test_utils.h @@ -0,0 +1,90 @@ +#ifndef KOKKOS_NUMERICS_ORACLE_TEST_UTILS_H +#define KOKKOS_NUMERICS_ORACLE_TEST_UTILS_H + +#include "libmesh/libmesh.h" + +// Avoid conflicting complex operators between CUDA and PETSc +#define PETSC_SKIP_CXX_COMPLEX_FIX 1 +#include +#undef __CUDACC_VER__ + +#include +#include +#include + +namespace libMeshTest +{ +namespace KokkosOracle +{ + +using libMesh::Real; + +template +inline ::Kokkos::View +upload_objects(const std::vector & values, const char * label) +{ + ::Kokkos::View d(std::string(label), values.size()); + auto h = ::Kokkos::create_mirror_view(d); + for (std::size_t i = 0; i < values.size(); ++i) + h(i) = values[i]; + ::Kokkos::deep_copy(d, h); + return d; +} + +inline int +compare_device_scalars(const ::Kokkos::View & d_values, + const std::vector & ref_values, + const double tol) +{ + auto h_values = ::Kokkos::create_mirror_view(d_values); + ::Kokkos::deep_copy(h_values, d_values); + + int fail = 0; + for (std::size_t i = 0; i < ref_values.size(); ++i) + if (std::fabs(h_values(i) - ref_values[i]) > tol) + ++fail; + + return fail; +} + +template +inline int +compare_device_vectors(const ViewType & d_values, + const std::vector & ref_values, + const double tol) +{ + auto h_values = ::Kokkos::create_mirror_view(d_values); + ::Kokkos::deep_copy(h_values, d_values); + + int fail = 0; + for (std::size_t i = 0; i < ref_values.size(); ++i) + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + if (std::fabs(h_values(i, d) - ref_values[i](d)) > tol) + ++fail; + + return fail; +} + +template +inline int +compare_device_tensors(const ViewType & d_values, + const std::vector & ref_values, + const double tol) +{ + auto h_values = ::Kokkos::create_mirror_view(d_values); + ::Kokkos::deep_copy(h_values, d_values); + + int fail = 0; + for (std::size_t i = 0; i < ref_values.size(); ++i) + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (std::fabs(h_values(i, row, col) - ref_values[i](row, col)) > tol) + ++fail; + + return fail; +} + +} // namespace KokkosOracle +} // namespace libMeshTest + +#endif diff --git a/tests/numerics/kokkos_tensor_ops_oracle_fixtures.h b/tests/numerics/kokkos_tensor_ops_oracle_fixtures.h new file mode 100644 index 0000000000..8a53f37bd8 --- /dev/null +++ b/tests/numerics/kokkos_tensor_ops_oracle_fixtures.h @@ -0,0 +1,161 @@ +#ifndef KOKKOS_TENSOR_OPS_ORACLE_FIXTURES_H +#define KOKKOS_TENSOR_OPS_ORACLE_FIXTURES_H + +#include "libmesh/libmesh.h" +#include "libmesh/point.h" +#include "libmesh/tensor_value.h" +#include "libmesh/type_n_tensor.h" +#include "libmesh/vector_value.h" +#include "gpu/kokkos_tensor_ops.h" +#include "gpu/kokkos_storage.h" +#include "gpu/kokkos_storage_policy.h" + +#include "kokkos_numerics_oracle_test_utils.h" + +#include +#include + +namespace libMeshTest +{ +namespace KokkosTensorOracle +{ + +using libMesh::Real; + +static constexpr double tol = 2.0e-13; + +using oracle_vector = libMesh::TypeVector; +using oracle_tensor = libMesh::TypeTensor; + +inline oracle_vector +make_host_vector(const Real x, const Real y = 0, const Real z = 0) +{ + oracle_vector v; + v.zero(); + v(0) = x; +#if LIBMESH_DIM > 1 + v(1) = y; +#endif +#if LIBMESH_DIM > 2 + v(2) = z; +#endif + return v; +} + +inline oracle_tensor +make_host_tensor(const Real xx, + const Real xy = 0, + const Real xz = 0, + const Real yx = 0, + const Real yy = 0, + const Real yz = 0, + const Real zx = 0, + const Real zy = 0, + const Real zz = 0) +{ + oracle_tensor T; + T.zero(); + T(0, 0) = xx; +#if LIBMESH_DIM > 1 + T(0, 1) = xy; + T(1, 0) = yx; + T(1, 1) = yy; +#endif +#if LIBMESH_DIM > 2 + T(0, 2) = xz; + T(1, 2) = yz; + T(2, 0) = zx; + T(2, 1) = zy; + T(2, 2) = zz; +#endif + return T; +} + +struct tensor_dim_case +{ + oracle_tensor J; + unsigned int dim; + const char * name; +}; + +static const tensor_dim_case dim_cases[] = { + { make_host_tensor(1.7, -0.2, 0.5, + 0.3, 1.1, -0.4, + -0.6, 0.8, 0.9), + 1, + "leading_1d" }, +#if LIBMESH_DIM > 1 + { make_host_tensor(2.5, -0.75, 0.4, + 1.2, 1.8, -0.6, + -0.3, 0.9, 1.4), + 2, + "leading_2d" }, +#endif +#if LIBMESH_DIM > 2 + { make_host_tensor(9.08973348886179e-01, 3.36455579239923e-01, 5.16389236893863e-01, + 9.44156071777472e-01, 1.35610910092516e-01, 1.49881119060538e-02, + 1.15988384086146e-01, 6.79845197685518e-03, 3.77028969454745e-01), + 3, + "leading_3d" } +#endif +}; + +inline oracle_tensor +build_identity_tensor(const unsigned int dim) +{ + oracle_tensor I; + I.zero(); + for (unsigned int i = 0; i < dim; ++i) + I(i, i) = Real(1); + return I; +} + +inline Real +host_leading_determinant(const oracle_tensor & J, const unsigned int dim) +{ + if (dim == 0) + return Real(1); + if (dim == 1) + return J(0, 0); + if (dim == 2) + return J(0, 0) * J(1, 1) - J(0, 1) * J(1, 0); +#if LIBMESH_DIM > 2 + return J.det(); +#else + return Real(0); +#endif +} + +inline oracle_tensor +host_leading_inverse(const oracle_tensor & J, const unsigned int dim) +{ + oracle_tensor inv; + inv.zero(); + + if (dim == 1) + { + inv(0, 0) = Real(1) / J(0, 0); + return inv; + } + + if (dim == 2) + { + const Real det = host_leading_determinant(J, dim); + inv(0, 0) = J(1, 1) / det; + inv(0, 1) = -J(0, 1) / det; + inv(1, 0) = -J(1, 0) / det; + inv(1, 1) = J(0, 0) / det; + return inv; + } + +#if LIBMESH_DIM > 2 + return oracle_tensor(J.inverse()); +#else + return inv; +#endif +} + +} // namespace KokkosTensorOracle +} // namespace libMeshTest + +#endif diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h new file mode 100644 index 0000000000..cad772919a --- /dev/null +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -0,0 +1,482 @@ +#ifndef KOKKOS_TENSOR_OPS_ORACLE_RUNNERS_H +#define KOKKOS_TENSOR_OPS_ORACLE_RUNNERS_H + +#include "kokkos_tensor_ops_oracle_fixtures.h" + +#include +#include + +namespace libMeshTest +{ +namespace KokkosTensorOracle +{ + +template +static int +test_dim_ops() +{ + const unsigned int ncases = sizeof(dim_cases) / sizeof(dim_cases[0]); + + std::vector J_values(ncases); + std::vector dims(ncases); + std::vector ref_det(ncases); + std::vector ref_inv(ncases); + std::vector ref_I(ncases); + std::vector ref_prod_left(ncases); + std::vector ref_prod_right(ncases); + + for (unsigned int c = 0; c < ncases; ++c) + { + const auto & info = dim_cases[c]; + J_values[c] = info.J; + dims[c] = info.dim; + + ref_det[c] = host_leading_determinant(info.J, info.dim); + ref_inv[c] = host_leading_inverse(info.J, info.dim); + ref_I[c] = build_identity_tensor(info.dim); + ref_prod_left[c] = info.J * ref_inv[c]; + ref_prod_right[c] = ref_inv[c] * info.J; + } + + auto d_J = libMesh::Kokkos::upload_tensor_storage(J_values, "tensor_dim_ops_J"); + auto d_dims = libMeshTest::KokkosOracle::upload_objects(dims, "tensor_dim_ops_dim"); + ::Kokkos::View d_det("tensor_dim_ops_det", ncases); + auto d_inv = libMesh::Kokkos::make_tensor_storage("tensor_dim_ops_inv", ncases); + auto d_I = libMesh::Kokkos::make_tensor_storage("tensor_dim_ops_I", ncases); + auto d_prod_left = libMesh::Kokkos::make_tensor_storage("tensor_dim_ops_prod_left", ncases); + auto d_prod_right = libMesh::Kokkos::make_tensor_storage("tensor_dim_ops_prod_right", ncases); + + ::Kokkos::parallel_for( + static_cast(ncases), + KOKKOS_LAMBDA(int c) { + const auto J_ref = libMesh::Kokkos::make_tensor_ref(d_J, c); + const unsigned int dim = d_dims(c); + const Real det = libMesh::Kokkos::tensor_determinant(J_ref, dim); + const auto inv = J_ref.inverse(dim); + const auto I = libMesh::Kokkos::tensor_identity(dim); + const auto prod_left = J_ref * inv; + const auto prod_right = inv * J_ref; + + d_det(c) = det; + libMesh::Kokkos::store_tensor(d_inv, c, inv); + libMesh::Kokkos::store_tensor(d_I, c, I); + libMesh::Kokkos::store_tensor(d_prod_left, c, prod_left); + libMesh::Kokkos::store_tensor(d_prod_right, c, prod_right); + }); + ::Kokkos::fence(); + + return libMeshTest::KokkosOracle::compare_device_scalars(d_det, ref_det, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_inv, ref_inv, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_I, ref_I, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_prod_left, ref_prod_left, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_prod_right, ref_prod_right, tol); +} + +template +static int +test_tensor_ops() +{ + const auto A = make_host_tensor(1.1, -0.4, 0.7, + 0.3, 1.9, -1.2, + -0.8, 0.5, 2.2); + const auto a = make_host_vector(2.0, 3.0, 4.0); + const auto b = make_host_vector(5.0, -6.0, 7.0); + const auto c = make_host_vector(1.25, -0.5, 2.0); + + const auto outer = libMesh::outer_product(a, b); + const auto transpose = A.transpose(); + const auto mix = 1.5 * A - 0.25 * outer; + const auto right = A * c; + const auto left = c * A; + const Real contract = A.contract(outer); + const Real norm = A.norm(); + const auto zero = libMesh::Kokkos::zero_tensor_value(); + + std::vector ref_outer(1, outer); + std::vector ref_transpose(1, transpose); + std::vector ref_mix(1, mix); + std::vector ref_rows(LIBMESH_DIM); + std::vector ref_columns(LIBMESH_DIM); + for (unsigned int i = 0; i < LIBMESH_DIM; ++i) + { + ref_rows[i] = A.row(i); + ref_columns[i] = A.column(i); + } + std::vector ref_right(1, right); + std::vector ref_left(1, left); + std::vector ref_scalars = {contract, norm, zero.is_zero() ? 1.0 : 0.0, A.is_zero() ? 1.0 : 0.0}; + + auto d_A = libMesh::Kokkos::upload_tensor_storage(std::vector{A}, "tensor_ops_A"); + auto d_a = libMesh::Kokkos::upload_vector_storage(std::vector{a}, "tensor_ops_a"); + auto d_b = libMesh::Kokkos::upload_vector_storage(std::vector{b}, "tensor_ops_b"); + auto d_c = libMesh::Kokkos::upload_vector_storage(std::vector{c}, "tensor_ops_c"); + auto d_outer = libMesh::Kokkos::make_tensor_storage("tensor_ops_outer", 1); + auto d_transpose = libMesh::Kokkos::make_tensor_storage("tensor_ops_transpose", 1); + auto d_mix = libMesh::Kokkos::make_tensor_storage("tensor_ops_mix", 1); + auto d_rows = libMesh::Kokkos::make_vector_storage("tensor_ops_rows", LIBMESH_DIM); + auto d_columns = libMesh::Kokkos::make_vector_storage("tensor_ops_columns", LIBMESH_DIM); + auto d_right = libMesh::Kokkos::make_vector_storage("tensor_ops_right", 1); + auto d_left = libMesh::Kokkos::make_vector_storage("tensor_ops_left", 1); + ::Kokkos::View d_scalars("tensor_ops_scalars", 4); + + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + const auto A_ref = libMesh::Kokkos::make_tensor_ref(d_A, 0); + const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); + const auto b_ref = libMesh::Kokkos::make_vector_ref(d_b, 0); + const auto c_ref = libMesh::Kokkos::make_vector_ref(d_c, 0); + const auto outer_d = libMesh::Kokkos::tensor_outer_product(a_ref, b_ref); + const auto transpose_d = A_ref.transpose(); + const auto mix_d = Real(1.5) * A_ref - Real(0.25) * outer_d; + const auto right_d = A_ref * c_ref; + const auto left_d = c_ref * A_ref; + const Real contract_d = A_ref.contract(outer_d); + const Real norm_d = A_ref.norm(); + const bool zero_is_zero_d = libMesh::Kokkos::zero_tensor_value().is_zero(); + const bool A_is_zero_d = A_ref.is_zero(); + + for (unsigned int i = 0; i < LIBMESH_DIM; ++i) + { + libMesh::Kokkos::store_vector(d_rows, i, A_ref.row(i)); + libMesh::Kokkos::store_vector(d_columns, i, A_ref.column(i)); + } + + libMesh::Kokkos::store_tensor(d_outer, 0, outer_d); + libMesh::Kokkos::store_tensor(d_transpose, 0, transpose_d); + libMesh::Kokkos::store_tensor(d_mix, 0, mix_d); + libMesh::Kokkos::store_vector(d_right, 0, right_d); + libMesh::Kokkos::store_vector(d_left, 0, left_d); + d_scalars(0) = contract_d; + d_scalars(1) = norm_d; + d_scalars(2) = zero_is_zero_d ? 1.0 : 0.0; + d_scalars(3) = A_is_zero_d ? 1.0 : 0.0; + }); + ::Kokkos::fence(); + + return libMeshTest::KokkosOracle::compare_device_tensors(d_outer, ref_outer, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_transpose, ref_transpose, tol) + + libMeshTest::KokkosOracle::compare_device_tensors(d_mix, ref_mix, tol) + + libMeshTest::KokkosOracle::compare_device_vectors(d_rows, ref_rows, tol) + + libMeshTest::KokkosOracle::compare_device_vectors(d_columns, ref_columns, tol) + + libMeshTest::KokkosOracle::compare_device_vectors(d_right, ref_right, tol) + + libMeshTest::KokkosOracle::compare_device_vectors(d_left, ref_left, tol) + + libMeshTest::KokkosOracle::compare_device_scalars(d_scalars, ref_scalars, tol); +} + +inline int +test_tensor_host_only_ops() +{ + int fail = 0; + +#if LIBMESH_DIM > 2 + { + libMesh::TensorValue tensor(2., 1., 0., + 1., 2., 1., + 0., 1., 2.); + fail += tensor.is_hpd(/*rel_tol=*/0.) ? 0 : 1; + } + + { + libMesh::TensorValue tensor(1., 0., 0., + 0., 0., 1., + 0., 1., 0.); + fail += tensor.is_hpd() ? 1 : 0; + } + + { + const libMesh::Point x(1., 0., 0.); + const auto R = libMesh::RealTensorValue::extrinsic_rotation_matrix(90., 0., 0.); + const auto rotated = R * x; + fail += (std::fabs(rotated(0)) <= tol) ? 0 : 1; + fail += (std::fabs(rotated(1) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(rotated(2)) <= tol) ? 0 : 1; + + const auto invR = libMesh::RealTensorValue::inverse_extrinsic_rotation_matrix(90., 0., 0.); + const auto unrotated = invR * rotated; + fail += (std::fabs(unrotated(0) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(unrotated(1)) <= tol) ? 0 : 1; + fail += (std::fabs(unrotated(2)) <= tol) ? 0 : 1; + } + + { + const libMesh::Point x(1., 1., 1.); + const auto R = libMesh::RealTensorValue::extrinsic_rotation_matrix(90., 90., 90.); + const auto rotated = R * x; + fail += (std::fabs(rotated(0) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(rotated(1) + 1.) <= tol) ? 0 : 1; + fail += (std::fabs(rotated(2) - 1.) <= tol) ? 0 : 1; + + const auto invR = libMesh::RealTensorValue::inverse_extrinsic_rotation_matrix(90., 90., 90.); + const auto unrotated = invR * rotated; + fail += (std::fabs(unrotated(0) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(unrotated(1) - 1.) <= tol) ? 0 : 1; + fail += (std::fabs(unrotated(2) - 1.) <= tol) ? 0 : 1; + } +#endif + +#ifdef LIBMESH_HAVE_METAPHYSICL + typedef typename MetaPhysicL::ReplaceAlgebraicType< + std::vector>, + typename libMesh::TensorTools::IncrementRank< + typename MetaPhysicL::ValueType>>::type>::type>::type + ReplacedType; + constexpr bool assertion = + std::is_same>>::value; + fail += assertion ? 0 : 1; +#endif + + return fail; +} + +template +static int +test_linalg_foundation_storage_roundtrip() +{ + int fail = 0; + + auto d_vector = libMesh::Kokkos::make_vector_storage("foundation_vector", 1); + auto d_tensor = libMesh::Kokkos::make_tensor_storage("foundation_tensor", 1); + + { + auto h_vector = ::Kokkos::create_mirror_view(d_vector); + auto h_tensor = ::Kokkos::create_mirror_view(d_tensor); + + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + h_vector(0, d) = Real(d + 1) * Real(0.5); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + h_tensor(0, row, col) = Real(10 * row + col + 1) * Real(0.25); + + ::Kokkos::deep_copy(d_vector, h_vector); + ::Kokkos::deep_copy(d_tensor, h_tensor); + } + + const auto vector_in = libMesh::Kokkos::make_vector_ref(d_vector, 0); + const auto tensor_in = libMesh::Kokkos::make_tensor_ref(d_tensor, 0); + + const auto as_point = libMesh::Kokkos::materialize_vector(vector_in); + const auto as_vector_value = + libMesh::Kokkos::materialize_vector>(vector_in); + const auto as_type_vector = + libMesh::Kokkos::materialize_vector>(vector_in); + + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + { + const Real expected = Real(d + 1) * Real(0.5); + fail += (std::fabs(as_point(d) - expected) <= tol) ? 0 : 1; + fail += (std::fabs(as_vector_value(d) - expected) <= tol) ? 0 : 1; + fail += (std::fabs(as_type_vector(d) - expected) <= tol) ? 0 : 1; + } + + const auto as_tensor_value = + libMesh::Kokkos::materialize_tensor>(tensor_in); + const auto as_type_tensor = + libMesh::Kokkos::materialize_tensor>(tensor_in); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + const Real expected = Real(10 * row + col + 1) * Real(0.25); + fail += (std::fabs(as_tensor_value(row, col) - expected) <= tol) ? 0 : 1; + fail += (std::fabs(as_type_tensor(row, col) - expected) <= tol) ? 0 : 1; + } + + auto d_vector_out = libMesh::Kokkos::make_vector_storage("foundation_vector_out", 1); + auto d_tensor_out = libMesh::Kokkos::make_tensor_storage("foundation_tensor_out", 1); + + auto vector_out = libMesh::Kokkos::make_vector_ref(d_vector_out, 0); + auto tensor_out = libMesh::Kokkos::make_tensor_ref(d_tensor_out, 0); + + vector_out.zero(); + vector_out.assign(as_vector_value); + vector_out.add_scaled(as_type_vector, Real(0)); + vector_out.subtract_scaled(as_type_vector, Real(0)); + + tensor_out.zero(); + tensor_out.assign(as_tensor_value); + tensor_out.add_scaled(as_type_tensor, Real(0)); + tensor_out.subtract_scaled(as_type_tensor, Real(0)); + + { + auto h_vector_out = ::Kokkos::create_mirror_view(d_vector_out); + auto h_tensor_out = ::Kokkos::create_mirror_view(d_tensor_out); + ::Kokkos::deep_copy(h_vector_out, d_vector_out); + ::Kokkos::deep_copy(h_tensor_out, d_tensor_out); + + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + fail += (std::fabs(h_vector_out(0, d) - as_vector_value(d)) <= tol) ? 0 : 1; + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + fail += (std::fabs(h_tensor_out(0, row, col) - as_tensor_value(row, col)) <= tol) ? 0 : 1; + } + + return fail; +} + +template +static int +test_mixed_representation_ops() +{ + int fail = 0; + + const auto a = make_host_vector(2.0, 3.0, 4.0); + const auto b = make_host_vector(5.0, -6.0, 7.0); + const auto c = make_host_vector(1.25, -0.5, 2.0); + const auto A = make_host_tensor(1.1, -0.4, 0.7, + 0.3, 1.9, -1.2, + -0.8, 0.5, 2.2); + + auto d_a = libMesh::Kokkos::upload_vector_storage(std::vector{a}, "mixed_ops_a"); + auto d_A = libMesh::Kokkos::upload_tensor_storage(std::vector{A}, "mixed_ops_A"); + + ::Kokkos::View d_scalars("mixed_ops_scalars", 8); + auto d_vectors = libMesh::Kokkos::make_vector_storage("mixed_ops_vectors", 5); + auto d_tensors = libMesh::Kokkos::make_tensor_storage("mixed_ops_tensors", 4); + + const auto ref_dot = a * b; + const auto ref_contract = A.contract(libMesh::outer_product(a, b)); + const auto ref_det = host_leading_determinant(A, LIBMESH_DIM); + const auto ref_right = A * c; + const auto ref_left = A.left_multiply(c); + const auto ref_mix = a + b; + const auto ref_row0 = A.row(0); + const auto ref_col0 = A.column(0); + const auto ref_transpose = A.transpose(); + const auto ref_inverse = host_leading_inverse(A, LIBMESH_DIM); + const auto ref_add = A + ref_transpose; + const auto ref_scaled = 0.5 * A; + const auto ref_trace = A.tr(); + + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); + const auto A_ref = libMesh::Kokkos::make_tensor_ref(d_A, 0); + + const auto mix = a_ref + b; + const auto right = A_ref * c; + const auto left = A_ref.left_multiply(c); + const auto row0 = A_ref.row(0); + const auto col0 = A_ref.column(0); + const auto transpose = A_ref.transpose(); + const auto inverse = A_ref.inverse(); + const auto add = A_ref + ref_transpose; + const auto scaled = Real(0.5) * A_ref; + const auto outer = libMesh::Kokkos::tensor_outer_product(a_ref, b); + + d_scalars(0) = a_ref * b; + d_scalars(1) = A_ref.contract(outer); + d_scalars(2) = A_ref.det(); + d_scalars(3) = (A_ref == A) ? 1.0 : 0.0; + d_scalars(4) = (A_ref != inverse) ? 1.0 : 0.0; + d_scalars(5) = libMesh::Kokkos::vector_equal(row0, ref_row0) ? 1.0 : 0.0; + d_scalars(6) = libMesh::Kokkos::vector_equal(col0, ref_col0) ? 1.0 : 0.0; + d_scalars(7) = A_ref.tr(); + + libMesh::Kokkos::store_vector(d_vectors, 0, right); + libMesh::Kokkos::store_vector(d_vectors, 1, left); + libMesh::Kokkos::store_vector(d_vectors, 2, mix); + libMesh::Kokkos::store_vector(d_vectors, 3, row0); + libMesh::Kokkos::store_vector(d_vectors, 4, col0); + libMesh::Kokkos::store_tensor(d_tensors, 0, transpose); + libMesh::Kokkos::store_tensor(d_tensors, 1, inverse); + libMesh::Kokkos::store_tensor(d_tensors, 2, add); + libMesh::Kokkos::store_tensor(d_tensors, 3, scaled); + }); + ::Kokkos::fence(); + + fail += libMeshTest::KokkosOracle::compare_device_scalars( + d_scalars, + std::vector{ref_dot, ref_contract, ref_det, 1.0, 1.0, 1.0, 1.0, ref_trace}, + tol); + fail += libMeshTest::KokkosOracle::compare_device_vectors( + d_vectors, + std::vector{ref_right, ref_left, ref_mix, ref_row0, ref_col0}, + tol); + fail += libMeshTest::KokkosOracle::compare_device_tensors( + d_tensors, + std::vector{ref_transpose, ref_inverse, ref_add, ref_scaled}, + tol); + + return fail; +} + +inline int +run_all_oracles() +{ + int total_fail = 0; + + const int dim_fail_left = test_dim_ops(); + std::printf("[tensor_dim_kernel_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + dim_fail_left ? "FAIL" : "PASS", + dim_fail_left); + total_fail += dim_fail_left; + + const int dim_fail_right = test_dim_ops(); + std::printf("[tensor_dim_kernel_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + dim_fail_right ? "FAIL" : "PASS", + dim_fail_right); + total_fail += dim_fail_right; + + const int tensor_fail_left = test_tensor_ops(); + std::printf("[tensor_ops_kernel_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + tensor_fail_left ? "FAIL" : "PASS", + tensor_fail_left); + total_fail += tensor_fail_left; + + const int tensor_fail_right = test_tensor_ops(); + std::printf("[tensor_ops_kernel_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + tensor_fail_right ? "FAIL" : "PASS", + tensor_fail_right); + total_fail += tensor_fail_right; + + const int host_fail = test_tensor_host_only_ops(); + std::printf("[tensor_host_ops_oracle] %s (%d failures)\n", + host_fail ? "FAIL" : "PASS", + host_fail); + total_fail += host_fail; + + const int foundation_fail_left = + test_linalg_foundation_storage_roundtrip(); + std::printf("[kokkos_linalg_foundation_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + foundation_fail_left ? "FAIL" : "PASS", + foundation_fail_left); + total_fail += foundation_fail_left; + + const int foundation_fail_right = + test_linalg_foundation_storage_roundtrip(); + std::printf("[kokkos_linalg_foundation_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + foundation_fail_right ? "FAIL" : "PASS", + foundation_fail_right); + total_fail += foundation_fail_right; + + const int mixed_fail_left = test_mixed_representation_ops(); + std::printf("[kokkos_linalg_mixed_representation_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_fail_left ? "FAIL" : "PASS", + mixed_fail_left); + total_fail += mixed_fail_left; + + const int mixed_fail_right = test_mixed_representation_ops(); + std::printf("[kokkos_linalg_mixed_representation_oracle] [%s] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_fail_right ? "FAIL" : "PASS", + mixed_fail_right); + total_fail += mixed_fail_right; + + return total_fail; +} + +} // namespace KokkosTensorOracle +} // namespace libMeshTest + +#endif diff --git a/tests/numerics/kokkos_vector_ops_oracle_fixtures.h b/tests/numerics/kokkos_vector_ops_oracle_fixtures.h new file mode 100644 index 0000000000..5bce52de34 --- /dev/null +++ b/tests/numerics/kokkos_vector_ops_oracle_fixtures.h @@ -0,0 +1,223 @@ +#ifndef KOKKOS_VECTOR_OPS_ORACLE_FIXTURES_H +#define KOKKOS_VECTOR_OPS_ORACLE_FIXTURES_H + +#include "libmesh/libmesh.h" +#include "libmesh/tensor_value.h" +#include "libmesh/type_vector.h" +#include "libmesh/vector_value.h" +#include "gpu/kokkos_vector_ops.h" +#include "gpu/kokkos_storage.h" +#include "gpu/kokkos_storage_policy.h" + +#include "kokkos_numerics_oracle_test_utils.h" + +#include +#include + +namespace libMeshTest +{ +namespace KokkosVectorOracle +{ + +using libMesh::Real; + +static constexpr double tol = 2.0e-13; +static constexpr double unit_tol = 1.0e-14; +static constexpr Real golden_ratio = 1.6180339887498948482; +static constexpr unsigned int solid_angle_results = + 1 + ((LIBMESH_DIM > 1) ? 2u : 0u) + ((LIBMESH_DIM > 2) ? 4u : 0u); +static constexpr unsigned int vector_results = + 11 + ((LIBMESH_DIM > 2) ? 2u : 0u); +static constexpr unsigned int scalar_results = 11 + solid_angle_results; + +template +LIBMESH_DEVICE_INLINE +Vec +make_vector(const Real x, const Real y = 0, const Real z = 0) +{ + Vec v; + v.zero(); + v(0) = x; +#if LIBMESH_DIM > 1 + v(1) = y; +#endif +#if LIBMESH_DIM > 2 + v(2) = z; +#endif + return v; +} + +inline libMesh::TypeVector +as_type_vector(const libMesh::TypeVector & v) +{ + return v; +} + +inline libMesh::TypeVector +as_type_vector(const libMesh::VectorValue & v) +{ + return make_vector>(v(0) +#if LIBMESH_DIM > 1 + , + v(1) +#endif +#if LIBMESH_DIM > 2 + , + v(2) +#endif + ); +} + +template +struct host_oracle +{ + std::vector vectors; + std::vector scalars; +}; + +struct vector_case +{ + const char * name; + Real ax, ay, az; + Real bx, by, bz; + Real cx, cy, cz; +}; + +static const vector_case cases[] = { +#if LIBMESH_DIM >= 1 + { "line_case_a", 2.0, 0.0, 0.0, -3.0, 0.0, 0.0, 0.5, 0.0, 0.0 }, + { "line_case_b", -1.25, 0.0, 0.0, 4.5, 0.0, 0.0, -2.0, 0.0, 0.0 }, +#endif +#if LIBMESH_DIM >= 2 + { "plane_case_a", 2.0, 3.0, 0.0, 5.0, -6.0, 0.0, 1.25, -0.5, 0.0 }, + { "plane_case_b", -1.0, 4.0, 0.0, 0.5, 2.5, 0.0, -3.0, 1.5, 0.0 }, +#endif +#if LIBMESH_DIM >= 3 + { "space_case_a", 2.0, 3.0, 4.0, 5.0, -6.0, 7.0, 1.25, -0.5, 2.0 }, + { "space_case_b", -1.0, 4.0, 0.75, 0.5, 2.5, -3.5, -3.0, 1.5, 2.25 }, +#endif +}; + +template +inline host_oracle +build_host_oracle(const Vec & a, const Vec & b, const Vec & c) +{ + host_oracle result; + result.vectors.reserve(vector_results); + result.scalars.reserve(scalar_results); + + const auto copied = a; + + Vec mix = a + b; + mix -= c; + + Vec scaled = 1.25 * a; + scaled += (-0.5) * b; + scaled += (0.25) * c; + + Vec plus_assign = a; + plus_assign += b; + + Vec minus_assign = a; + minus_assign -= b; + + Vec accum; + accum.zero(); + accum.add_scaled(a, 1.25); + accum.add_scaled(b, -0.5); + accum.subtract_scaled(c, -0.25); + + const auto divided = a / 5.0; + const auto outer_right = libMesh::outer_product(a, 5.0); + const auto outer_left = libMesh::outer_product(5.0, a); + + Vec mult_assign = a; + mult_assign *= 5.0; + + Vec div_assign = a; + div_assign /= 5.0; + + Vec assign_zero = a; + assign_zero = 0.0; + + result.vectors.push_back(copied); + result.vectors.push_back(mix); + result.vectors.push_back(scaled); + result.vectors.push_back(accum); + result.vectors.push_back(plus_assign); + result.vectors.push_back(minus_assign); + result.vectors.push_back(divided); + result.vectors.push_back(outer_right); + result.vectors.push_back(outer_left); + result.vectors.push_back(mult_assign); + result.vectors.push_back(div_assign); + + result.scalars.push_back(a * b); + result.scalars.push_back(a.contract(b)); + result.scalars.push_back(mix.norm()); + result.scalars.push_back(mix.norm_sq()); + result.scalars.push_back(make_vector(0.0, 0.0, 0.0).is_zero() ? 1.0 : 0.0); + result.scalars.push_back(mix.is_zero() ? 1.0 : 0.0); + result.scalars.push_back((a == a) ? 1.0 : 0.0); + result.scalars.push_back((a == b) ? 1.0 : 0.0); + result.scalars.push_back((a != a) ? 1.0 : 0.0); + result.scalars.push_back((a != b) ? 1.0 : 0.0); + result.scalars.push_back(assign_zero.is_zero() ? 1.0 : 0.0); + + const auto xvec = make_vector(1.3); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xvec), + as_type_vector(xvec), + as_type_vector(xvec))); + +#if LIBMESH_DIM > 1 + const auto yvec = make_vector(0.0, 2.7); + const auto xydiag = make_vector(3.1, 3.1); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xvec), + as_type_vector(xvec), + as_type_vector(yvec))); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xvec), + as_type_vector(yvec), + as_type_vector(xydiag))); +#endif + +#if LIBMESH_DIM > 2 + const auto xypdiag = make_vector(0.8, -0.8); + const auto zvec = make_vector(0.0, 0.0, 1.1); + const auto xzdiag = make_vector(0.0, 0.7, 0.7); + const auto icosa1 = make_vector(1.0, golden_ratio, 0.0); + const auto icosa2 = make_vector(-1.0, golden_ratio, 0.0); + const auto icosa3 = make_vector(0.0, 1.0, golden_ratio); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xydiag), + as_type_vector(yvec), + as_type_vector(zvec))); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xvec), + as_type_vector(yvec), + as_type_vector(xzdiag))); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(xypdiag), + as_type_vector(xydiag), + as_type_vector(zvec))); + result.scalars.push_back(libMesh::solid_angle(as_type_vector(icosa1), + as_type_vector(icosa2), + as_type_vector(icosa3))); +#endif + +#if LIBMESH_DIM > 2 + const auto cross = a.cross(b); + auto unit_cross = cross; + if (cross.norm() > unit_tol) + unit_cross = cross.unit(); + + result.vectors.push_back(cross); + result.vectors.push_back(unit_cross); +#endif + + libmesh_assert_equal_to(result.vectors.size(), vector_results); + libmesh_assert_equal_to(result.scalars.size(), scalar_results); + + return result; +} + +} // namespace KokkosVectorOracle +} // namespace libMeshTest + +#endif diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h new file mode 100644 index 0000000000..73fbbe7834 --- /dev/null +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -0,0 +1,327 @@ +#ifndef KOKKOS_VECTOR_OPS_ORACLE_RUNNERS_H +#define KOKKOS_VECTOR_OPS_ORACLE_RUNNERS_H + +#include "kokkos_vector_ops_oracle_fixtures.h" + +#include + +namespace libMeshTest +{ +namespace KokkosVectorOracle +{ + +template +static int +test_vector_ops_case(const vector_case & info) +{ + const auto a = make_vector(info.ax, info.ay, info.az); + const auto b = make_vector(info.bx, info.by, info.bz); + const auto c = make_vector(info.cx, info.cy, info.cz); + + const auto expected = build_host_oracle(a, b, c); + + auto d_a = libMesh::Kokkos::upload_vector_storage(std::vector{a}, "vector_ops_a"); + auto d_b = libMesh::Kokkos::upload_vector_storage(std::vector{b}, "vector_ops_b"); + auto d_c = libMesh::Kokkos::upload_vector_storage(std::vector{c}, "vector_ops_c"); + auto d_vectors = libMesh::Kokkos::make_vector_storage("vector_ops_vectors", vector_results); + ::Kokkos::View d_scalars("vector_ops_scalars", scalar_results); + + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); + const auto b_ref = libMesh::Kokkos::make_vector_ref(d_b, 0); + const auto c_ref = libMesh::Kokkos::make_vector_ref(d_c, 0); + + const Vec copied = libMesh::Kokkos::copy_vector(a_ref); + const Vec mix = libMesh::Kokkos::vector_linear_combination( + Real(1), a_ref, Real(1), b_ref, Real(-1), c_ref); + const Vec scaled = libMesh::Kokkos::vector_linear_combination( + Real(1.25), a_ref, Real(-0.5), b_ref, Real(0.25), c_ref); + const Vec plus_assign = a_ref + b_ref; + const Vec minus_assign = a_ref - b_ref; + const Vec accum = libMesh::Kokkos::vector_linear_combination( + Real(1.25), a_ref, Real(-0.5), b_ref, Real(0.25), c_ref); + const Vec divided = a_ref / Real(5.0); + const Vec outer_right = Real(5.0) * a_ref; + const Vec outer_left = a_ref * Real(5.0); + const Vec mult_assign = a_ref * Real(5.0); + const Vec div_assign = a_ref / Real(5.0); + const Vec assign_zero = libMesh::Kokkos::zero_vector_value(); + + const Real dot = libMesh::Kokkos::vector_dot(a_ref, b_ref); + const Real contract = a_ref.contract(b_ref); + const Real norm = mix.norm(); + const Real norm_sq = mix.norm_sq(); + const Vec zero = libMesh::Kokkos::zero_vector_value(); + + unsigned int vector_offset = 0; + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, copied); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, mix); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, scaled); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, accum); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, plus_assign); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, minus_assign); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, divided); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, outer_right); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, outer_left); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, mult_assign); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, div_assign); + + unsigned int scalar_offset = 0; + d_scalars(scalar_offset++) = a_ref * b_ref; + d_scalars(scalar_offset++) = contract; + d_scalars(scalar_offset++) = norm; + d_scalars(scalar_offset++) = norm_sq; + d_scalars(scalar_offset++) = zero.is_zero() ? 1.0 : 0.0; + d_scalars(scalar_offset++) = mix.is_zero() ? 1.0 : 0.0; + d_scalars(scalar_offset++) = (a_ref == a_ref) ? 1.0 : 0.0; + d_scalars(scalar_offset++) = (a_ref == b_ref) ? 1.0 : 0.0; + d_scalars(scalar_offset++) = (a_ref != a_ref) ? 1.0 : 0.0; + d_scalars(scalar_offset++) = (a_ref != b_ref) ? 1.0 : 0.0; + d_scalars(scalar_offset++) = assign_zero.is_zero() ? 1.0 : 0.0; + + const Vec xvec = make_vector(1.3); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xvec, xvec, xvec); + +#if LIBMESH_DIM > 1 + const Vec yvec = make_vector(0.0, 2.7); + const Vec xydiag = make_vector(3.1, 3.1); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xvec, xvec, yvec); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xvec, yvec, xydiag); +#endif + +#if LIBMESH_DIM > 2 + const Vec xypdiag = make_vector(0.8, -0.8); + const Vec zvec = make_vector(0.0, 0.0, 1.1); + const Vec xzdiag = make_vector(0.0, 0.7, 0.7); + const Vec icosa1 = make_vector(1.0, golden_ratio, 0.0); + const Vec icosa2 = make_vector(-1.0, golden_ratio, 0.0); + const Vec icosa3 = make_vector(0.0, 1.0, golden_ratio); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xydiag, yvec, zvec); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xvec, yvec, xzdiag); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(xypdiag, xydiag, zvec); + d_scalars(scalar_offset++) = libMesh::Kokkos::vector_solid_angle(icosa1, icosa2, icosa3); +#endif + +#if LIBMESH_DIM > 2 + const Vec cross = a_ref.cross(b_ref); + Vec unit_cross = cross; + if (libMesh::Kokkos::vector_norm(cross) > unit_tol) + unit_cross = libMesh::Kokkos::vector_unit(cross); + + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, cross); + libMesh::Kokkos::store_vector(d_vectors, vector_offset++, unit_cross); +#endif + + libmesh_assert_equal_to(vector_offset, vector_results); + libmesh_assert_equal_to(scalar_offset, scalar_results); + }); + ::Kokkos::fence(); + + return libMeshTest::KokkosOracle::compare_device_vectors(d_vectors, expected.vectors, tol) + + libMeshTest::KokkosOracle::compare_device_scalars(d_scalars, expected.scalars, tol); +} + +template +int +run_vector_cases(const char * suite_name) +{ + int fail = 0; + + for (const auto & info : cases) + { + const int f = test_vector_ops_case(info); + std::printf("[%s] [%s] [%s] %s (%d failures)\n", + suite_name, + libMesh::Kokkos::storage_policy_name(), + info.name, + f ? "FAIL" : "PASS", + f); + fail += f; + } + + return fail; +} + +inline int +test_vector_host_only_traits() +{ + int fail = 0; + +#ifdef LIBMESH_HAVE_METAPHYSICL + typedef typename MetaPhysicL::ReplaceAlgebraicType< + std::vector>, + typename libMesh::TensorTools::IncrementRank< + typename MetaPhysicL::ValueType>>::type>::type>::type + ReplacedType; + constexpr bool typevector_assertion = + std::is_same>>::value; + fail += typevector_assertion ? 0 : 1; + + typedef typename MetaPhysicL::ReplaceAlgebraicType< + std::vector>, + typename libMesh::TensorTools::IncrementRank< + typename MetaPhysicL::ValueType>>::type>::type>::type + ReplacedValueType; + constexpr bool vectorvalue_assertion = + std::is_same>>::value; + fail += vectorvalue_assertion ? 0 : 1; +#endif + + return fail; +} + +template +static int +test_mixed_representation_ops() +{ + int fail = 0; + + const auto a = make_vector(2.0, 3.0, 4.0); + const auto b = make_vector(5.0, -6.0, 7.0); + const auto c = make_vector(1.25, -0.5, 2.0); + + auto d_a = libMesh::Kokkos::upload_vector_storage(std::vector{a}, "mixed_vector_a"); + auto d_b = libMesh::Kokkos::upload_vector_storage(std::vector{b}, "mixed_vector_b"); + + auto d_vectors = + libMesh::Kokkos::make_vector_storage("mixed_vector_vectors", (LIBMESH_DIM > 2) ? 5 : 3); + ::Kokkos::View d_scalars("mixed_vector_scalars", (LIBMESH_DIM > 2) ? 7 : 5); + + const auto ref_sum = a + b; + const auto ref_diff = a - b; + const auto ref_scaled = 1.5 * a; + const auto ref_dot = a * b; + const auto ref_contract = a.contract(b); + const auto ref_solid_angle = + libMesh::solid_angle(as_type_vector(a), as_type_vector(b), as_type_vector(c)); + const auto ref_cross_norm_sq = libMesh::cross_norm_sq(as_type_vector(a), as_type_vector(b)); + +#if LIBMESH_DIM > 2 + const auto ref_cross = a.cross(b); + auto ref_unit_cross = ref_cross; + if (ref_cross.norm() > unit_tol) + ref_unit_cross = ref_cross.unit(); +#endif + + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); + const auto b_ref = libMesh::Kokkos::make_vector_ref(d_b, 0); + + const auto sum = a_ref + b; + const auto diff = a - b_ref; + const auto scaled = Real(1.5) * a_ref; + + libMesh::Kokkos::store_vector(d_vectors, 0, sum); + libMesh::Kokkos::store_vector(d_vectors, 1, diff); + libMesh::Kokkos::store_vector(d_vectors, 2, scaled); + + d_scalars(0) = a_ref * b; + d_scalars(1) = b_ref.contract(a); + d_scalars(2) = (a_ref == a) ? 1.0 : 0.0; + d_scalars(3) = (a_ref != b) ? 1.0 : 0.0; + d_scalars(4) = libMesh::Kokkos::vector_solid_angle(a_ref, b, c); + +#if LIBMESH_DIM > 2 + const auto cross = a_ref.cross(b); + Vec unit_cross = cross; + if (libMesh::Kokkos::vector_norm(cross) > unit_tol) + unit_cross = libMesh::Kokkos::vector_unit(cross); + + libMesh::Kokkos::store_vector(d_vectors, 3, cross); + libMesh::Kokkos::store_vector(d_vectors, 4, unit_cross); + d_scalars(5) = libMesh::Kokkos::vector_cross_norm_sq(a_ref, b); + d_scalars(6) = (cross == libMesh::Kokkos::vector_cross(a, b_ref)) ? 1.0 : 0.0; +#endif + }); + ::Kokkos::fence(); + + fail += libMeshTest::KokkosOracle::compare_device_vectors( + d_vectors, + [&]() { + std::vector ref = {ref_sum, ref_diff, ref_scaled}; +#if LIBMESH_DIM > 2 + ref.push_back(ref_cross); + ref.push_back(ref_unit_cross); +#endif + return ref; + }(), + tol); + + fail += libMeshTest::KokkosOracle::compare_device_scalars( + d_scalars, + [&]() { + std::vector ref = {ref_dot, ref_contract, 1.0, 1.0, ref_solid_angle}; +#if LIBMESH_DIM > 2 + ref.push_back(ref_cross_norm_sq); + ref.push_back(1.0); +#endif + return ref; + }(), + tol); + + return fail; +} + +inline int +run_all_oracles() +{ + int total_fail = 0; + + total_fail += run_vector_cases>( + "typevector_kernel_oracle"); + total_fail += run_vector_cases>( + "typevector_kernel_oracle"); + total_fail += run_vector_cases>( + "vectorvalue_kernel_oracle"); + total_fail += run_vector_cases>( + "vectorvalue_kernel_oracle"); + + const int mixed_typevector_left = + test_mixed_representation_ops>(); + std::printf("[vector_mixed_representation_oracle] [%s] [typevector] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_typevector_left ? "FAIL" : "PASS", + mixed_typevector_left); + total_fail += mixed_typevector_left; + + const int mixed_typevector_right = + test_mixed_representation_ops>(); + std::printf("[vector_mixed_representation_oracle] [%s] [typevector] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_typevector_right ? "FAIL" : "PASS", + mixed_typevector_right); + total_fail += mixed_typevector_right; + + const int mixed_vectorvalue_left = + test_mixed_representation_ops>(); + std::printf("[vector_mixed_representation_oracle] [%s] [vectorvalue] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_vectorvalue_left ? "FAIL" : "PASS", + mixed_vectorvalue_left); + total_fail += mixed_vectorvalue_left; + + const int mixed_vectorvalue_right = + test_mixed_representation_ops>(); + std::printf("[vector_mixed_representation_oracle] [%s] [vectorvalue] %s (%d failures)\n", + libMesh::Kokkos::storage_policy_name(), + mixed_vectorvalue_right ? "FAIL" : "PASS", + mixed_vectorvalue_right); + total_fail += mixed_vectorvalue_right; + + const int host_fail = test_vector_host_only_traits(); + std::printf("[vector_host_traits_oracle] %s (%d failures)\n", + host_fail ? "FAIL" : "PASS", + host_fail); + total_fail += host_fail; + + return total_fail; +} + +} // namespace KokkosVectorOracle +} // namespace libMeshTest + +#endif From f93092204fb739c876c428fa63960832f2a3fd77 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Fri, 8 May 2026 15:04:55 -0600 Subject: [PATCH 07/41] Add Kokkos vector and tensor oracle tests --- .../numerics/kokkos_tensor_ops_oracle_test.K | 20 +++++++++++++++++++ .../numerics/kokkos_vector_ops_oracle_test.K | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/numerics/kokkos_tensor_ops_oracle_test.K create mode 100644 tests/numerics/kokkos_vector_ops_oracle_test.K diff --git a/tests/numerics/kokkos_tensor_ops_oracle_test.K b/tests/numerics/kokkos_tensor_ops_oracle_test.K new file mode 100644 index 0000000000..858d477369 --- /dev/null +++ b/tests/numerics/kokkos_tensor_ops_oracle_test.K @@ -0,0 +1,20 @@ +#include "libmesh/libmesh_config.h" +#include "kokkos_tensor_ops_oracle_runners.h" + +int +main(int argc, char ** argv) +{ + Kokkos::initialize(argc, argv); + libMesh::LibMeshInit init(argc, argv); + + const int total_fail = libMeshTest::KokkosTensorOracle::run_all_oracles(); + + Kokkos::finalize(); + + if (total_fail == 0) + std::printf("ALL TESTS PASSED\n"); + else + std::printf("%d TEST(S) FAILED\n", total_fail); + + return total_fail ? 1 : 0; +} diff --git a/tests/numerics/kokkos_vector_ops_oracle_test.K b/tests/numerics/kokkos_vector_ops_oracle_test.K new file mode 100644 index 0000000000..fedc7651ff --- /dev/null +++ b/tests/numerics/kokkos_vector_ops_oracle_test.K @@ -0,0 +1,20 @@ +#include "libmesh/libmesh_config.h" +#include "kokkos_vector_ops_oracle_runners.h" + +int +main(int argc, char ** argv) +{ + Kokkos::initialize(argc, argv); + libMesh::LibMeshInit init(argc, argv); + + const int total_fail = libMeshTest::KokkosVectorOracle::run_all_oracles(); + + Kokkos::finalize(); + + if (total_fail == 0) + std::printf("ALL TESTS PASSED\n"); + else + std::printf("%d TEST(S) FAILED\n", total_fail); + + return total_fail ? 1 : 0; +} From 5608f1d09f512f1ecf8fc553ede4e2eb26b5e7be Mon Sep 17 00:00:00 2001 From: rochi00 Date: Mon, 11 May 2026 15:44:23 -0600 Subject: [PATCH 08/41] Run tensor foundation oracle on device --- .../kokkos_tensor_ops_oracle_runners.h | 103 ++++++++++-------- 1 file changed, 60 insertions(+), 43 deletions(-) diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index cad772919a..07670821ba 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -233,8 +233,6 @@ template static int test_linalg_foundation_storage_roundtrip() { - int fail = 0; - auto d_vector = libMesh::Kokkos::make_vector_storage("foundation_vector", 1); auto d_tensor = libMesh::Kokkos::make_tensor_storage("foundation_tensor", 1); @@ -253,51 +251,64 @@ test_linalg_foundation_storage_roundtrip() ::Kokkos::deep_copy(d_tensor, h_tensor); } - const auto vector_in = libMesh::Kokkos::make_vector_ref(d_vector, 0); - const auto tensor_in = libMesh::Kokkos::make_tensor_ref(d_tensor, 0); - - const auto as_point = libMesh::Kokkos::materialize_vector(vector_in); - const auto as_vector_value = - libMesh::Kokkos::materialize_vector>(vector_in); - const auto as_type_vector = - libMesh::Kokkos::materialize_vector>(vector_in); - - for (unsigned int d = 0; d < LIBMESH_DIM; ++d) - { - const Real expected = Real(d + 1) * Real(0.5); - fail += (std::fabs(as_point(d) - expected) <= tol) ? 0 : 1; - fail += (std::fabs(as_vector_value(d) - expected) <= tol) ? 0 : 1; - fail += (std::fabs(as_type_vector(d) - expected) <= tol) ? 0 : 1; - } + auto d_vector_out = libMesh::Kokkos::make_vector_storage("foundation_vector_out", 1); + auto d_tensor_out = libMesh::Kokkos::make_tensor_storage("foundation_tensor_out", 1); + ::Kokkos::View d_fail("foundation_fail"); - const auto as_tensor_value = - libMesh::Kokkos::materialize_tensor>(tensor_in); - const auto as_type_tensor = - libMesh::Kokkos::materialize_tensor>(tensor_in); + ::Kokkos::parallel_for( + 1, + KOKKOS_LAMBDA(int) { + int local_fail = 0; - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - { - const Real expected = Real(10 * row + col + 1) * Real(0.25); - fail += (std::fabs(as_tensor_value(row, col) - expected) <= tol) ? 0 : 1; - fail += (std::fabs(as_type_tensor(row, col) - expected) <= tol) ? 0 : 1; - } + const auto vector_in = libMesh::Kokkos::make_vector_ref(d_vector, 0); + const auto tensor_in = libMesh::Kokkos::make_tensor_ref(d_tensor, 0); - auto d_vector_out = libMesh::Kokkos::make_vector_storage("foundation_vector_out", 1); - auto d_tensor_out = libMesh::Kokkos::make_tensor_storage("foundation_tensor_out", 1); + const auto as_point = libMesh::Kokkos::materialize_vector(vector_in); + const auto as_vector_value = + libMesh::Kokkos::materialize_vector>(vector_in); + const auto as_type_vector = + libMesh::Kokkos::materialize_vector>(vector_in); - auto vector_out = libMesh::Kokkos::make_vector_ref(d_vector_out, 0); - auto tensor_out = libMesh::Kokkos::make_tensor_ref(d_tensor_out, 0); + for (unsigned int d = 0; d < LIBMESH_DIM; ++d) + { + const Real expected = Real(d + 1) * Real(0.5); + local_fail += (std::fabs(as_point(d) - expected) <= tol) ? 0 : 1; + local_fail += (std::fabs(as_vector_value(d) - expected) <= tol) ? 0 : 1; + local_fail += (std::fabs(as_type_vector(d) - expected) <= tol) ? 0 : 1; + } - vector_out.zero(); - vector_out.assign(as_vector_value); - vector_out.add_scaled(as_type_vector, Real(0)); - vector_out.subtract_scaled(as_type_vector, Real(0)); + const auto as_tensor_value = + libMesh::Kokkos::materialize_tensor>(tensor_in); + const auto as_type_tensor = + libMesh::Kokkos::materialize_tensor>(tensor_in); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + const Real expected = Real(10 * row + col + 1) * Real(0.25); + local_fail += (std::fabs(as_tensor_value(row, col) - expected) <= tol) ? 0 : 1; + local_fail += (std::fabs(as_type_tensor(row, col) - expected) <= tol) ? 0 : 1; + } + + auto vector_out = libMesh::Kokkos::make_vector_ref(d_vector_out, 0); + auto tensor_out = libMesh::Kokkos::make_tensor_ref(d_tensor_out, 0); + + vector_out.zero(); + vector_out.assign(as_vector_value); + vector_out.add_scaled(as_type_vector, Real(0)); + vector_out.subtract_scaled(as_type_vector, Real(0)); + + tensor_out.zero(); + tensor_out.assign(as_tensor_value); + tensor_out.add_scaled(as_type_tensor, Real(0)); + tensor_out.subtract_scaled(as_type_tensor, Real(0)); + + d_fail() = local_fail; + }); + ::Kokkos::fence(); - tensor_out.zero(); - tensor_out.assign(as_tensor_value); - tensor_out.add_scaled(as_type_tensor, Real(0)); - tensor_out.subtract_scaled(as_type_tensor, Real(0)); + int fail = 0; + ::Kokkos::deep_copy(fail, d_fail); { auto h_vector_out = ::Kokkos::create_mirror_view(d_vector_out); @@ -306,11 +317,17 @@ test_linalg_foundation_storage_roundtrip() ::Kokkos::deep_copy(h_tensor_out, d_tensor_out); for (unsigned int d = 0; d < LIBMESH_DIM; ++d) - fail += (std::fabs(h_vector_out(0, d) - as_vector_value(d)) <= tol) ? 0 : 1; + { + const Real expected = Real(d + 1) * Real(0.5); + fail += (std::fabs(h_vector_out(0, d) - expected) <= tol) ? 0 : 1; + } for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - fail += (std::fabs(h_tensor_out(0, row, col) - as_tensor_value(row, col)) <= tol) ? 0 : 1; + { + const Real expected = Real(10 * row + col + 1) * Real(0.25); + fail += (std::fabs(h_tensor_out(0, row, col) - expected) <= tol) ? 0 : 1; + } } return fail; From fa9a372ca87dc1f3e29b877e547f11e8154177dc Mon Sep 17 00:00:00 2001 From: rochi00 Date: Mon, 11 May 2026 16:01:50 -0600 Subject: [PATCH 09/41] Make Point constructors device-callable --- include/geom/point.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/geom/point.h b/include/geom/point.h index a305deea3a..5779675786 100644 --- a/include/geom/point.h +++ b/include/geom/point.h @@ -22,6 +22,7 @@ // Local includes #include "libmesh/hashing.h" +#include "libmesh/libmesh_device.h" #include "libmesh/type_vector.h" namespace libMesh @@ -44,6 +45,7 @@ class Point : public TypeVector * Constructor. By default sets all entries to 0. Gives the point * 0 in \p LIBMESH_DIM dimensions. */ + LIBMESH_DEVICE_INLINE Point (const Real x=0., const Real y=0., const Real z=0.) : @@ -53,11 +55,13 @@ class Point : public TypeVector /** * Trivial copy-constructor. */ + LIBMESH_DEVICE_INLINE Point (const Point & p) = default; /** * Copy-constructor from non-point Typevector. */ + LIBMESH_DEVICE_INLINE Point (const TypeVector & p) : TypeVector (p) {} @@ -65,6 +69,7 @@ class Point : public TypeVector /** * Copy-assignment operator. */ + LIBMESH_DEVICE_INLINE Point& operator=(const Point & p) = default; /** @@ -73,6 +78,7 @@ class Point : public TypeVector template ::value,void>::type> + LIBMESH_DEVICE_INLINE Point (const T x) : TypeVector (x,0,0) {} From 99ff568ec1e7b544b8906623d7b472c5d07bc431 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 07:50:39 -0600 Subject: [PATCH 10/41] Inline tensor equality into constrained operators --- include/gpu/kokkos_tensor_ops.h | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index a08080405d..f251b6d9e4 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -130,28 +130,6 @@ bool tensor_is_zero(const TensorLike & T_in) return true; } -template -LIBMESH_DEVICE_INLINE -bool tensor_equal(const LeftTensor & left, const RightTensor & right) -{ - static_assert(is_tensor_like_v, "tensor_equal() requires a tensor-like left input"); - static_assert(is_tensor_like_v, "tensor_equal() requires a tensor-like right input"); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) - return false; - - return true; -} - -template -LIBMESH_DEVICE_INLINE -bool tensor_not_equal(const LeftTensor & left, const RightTensor & right) -{ - return !tensor_equal(left, right); -} - // Tensor arithmetic template @@ -953,7 +931,12 @@ auto operator==(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), bool> { - return tensor_equal(left, right); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) + return false; + + return true; } template @@ -963,7 +946,7 @@ auto operator!=(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), bool> { - return tensor_not_equal(left, right); + return !(left == right); } template From cb0023a946b6e9f442550428c918d2ee23f1fb56 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 07:52:10 -0600 Subject: [PATCH 11/41] Differentiate leading tensor determinant helper --- include/gpu/kokkos_tensor_ops.h | 13 +++++++------ tests/numerics/kokkos_tensor_ops_oracle_runners.h | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index f251b6d9e4..b124fd212d 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -264,9 +264,10 @@ tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const template LIBMESH_DEVICE_INLINE -auto tensor_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +auto tensor_leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) { - static_assert(is_tensor_like_v, "tensor_determinant() requires a tensor-like input"); + static_assert(is_tensor_like_v, + "tensor_leading_determinant() requires a tensor-like input"); if (dim == 0) return tensor_value_type_t(1); @@ -316,7 +317,7 @@ ResultTensor tensor_inverse(const TensorLike & T_in, const unsigned int dim = LI return out; } - const auto det = tensor_determinant(T_in, dim); + const auto det = tensor_leading_determinant(T_in, dim); if (dim == 2) { @@ -610,9 +611,9 @@ auto transpose(const TensorLike & T_in) template LIBMESH_DEVICE_INLINE auto det(const TensorLike & T_in) - -> std::enable_if_t, decltype(tensor_determinant(T_in))> + -> std::enable_if_t, decltype(T_in.det())> { - return tensor_determinant(T_in); + return T_in.det(); } template @@ -779,7 +780,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::det(const unsigned int dim) const { - return tensor_determinant(*this, dim); + return tensor_leading_determinant(*this, dim); } template diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index 07670821ba..a12cec13ab 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -51,7 +51,7 @@ test_dim_ops() KOKKOS_LAMBDA(int c) { const auto J_ref = libMesh::Kokkos::make_tensor_ref(d_J, c); const unsigned int dim = d_dims(c); - const Real det = libMesh::Kokkos::tensor_determinant(J_ref, dim); + const Real det = J_ref.det(dim); const auto inv = J_ref.inverse(dim); const auto I = libMesh::Kokkos::tensor_identity(dim); const auto prod_left = J_ref * inv; From 9b51cb27f9ccd010c05ee99a74793376505e2271 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 08:08:04 -0600 Subject: [PATCH 12/41] Inline vector equality and remove contract shim --- include/gpu/kokkos_vector_ops.h | 42 ++++--------------- .../kokkos_tensor_ops_oracle_runners.h | 4 +- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 3fb1406866..fffbf789da 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -63,13 +63,6 @@ auto vector_dot(const LeftVector & left, const RightVector & right) return sum; } -template -LIBMESH_DEVICE_INLINE -auto vector_contract(const LeftVector & left, const RightVector & right) -{ - return vector_dot(left, right); -} - template LIBMESH_DEVICE_INLINE auto vector_norm_sq(const VectorLike & v) @@ -122,27 +115,6 @@ bool vector_is_zero(const VectorLike & v) return true; } -template -LIBMESH_DEVICE_INLINE -bool vector_equal(const LeftVector & left, const RightVector & right) -{ - static_assert(is_vector_like_v, "vector_equal() requires a vector-like left input"); - static_assert(is_vector_like_v, "vector_equal() requires a vector-like right input"); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (vector_get_component(left, component) != vector_get_component(right, component)) - return false; - - return true; -} - -template -LIBMESH_DEVICE_INLINE -bool vector_not_equal(const LeftVector & left, const RightVector & right) -{ - return !vector_equal(left, right); -} - // Arithmetic template @@ -447,9 +419,9 @@ template LIBMESH_DEVICE_INLINE auto contract(const LeftVector & left, const RightVector & right) -> std::enable_if_t && is_vector_like_v, - decltype(vector_contract(left, right))> + decltype(vector_dot(left, right))> { - return vector_contract(left, right); + return vector_dot(left, right); } template @@ -544,7 +516,7 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::contract(const RightVector & right) const { - return vector_contract(*this, right); + return vector_dot(*this, right); } template @@ -672,7 +644,11 @@ auto operator==(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), bool> { - return vector_equal(left, right); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if (vector_get_component(left, component) != vector_get_component(right, component)) + return false; + + return true; } template @@ -682,7 +658,7 @@ auto operator!=(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), bool> { - return vector_not_equal(left, right); + return !(left == right); } template diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index a12cec13ab..59aadda6a4 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -389,8 +389,8 @@ test_mixed_representation_ops() d_scalars(2) = A_ref.det(); d_scalars(3) = (A_ref == A) ? 1.0 : 0.0; d_scalars(4) = (A_ref != inverse) ? 1.0 : 0.0; - d_scalars(5) = libMesh::Kokkos::vector_equal(row0, ref_row0) ? 1.0 : 0.0; - d_scalars(6) = libMesh::Kokkos::vector_equal(col0, ref_col0) ? 1.0 : 0.0; + d_scalars(5) = (row0 == ref_row0) ? 1.0 : 0.0; + d_scalars(6) = (col0 == ref_col0) ? 1.0 : 0.0; d_scalars(7) = A_ref.tr(); libMesh::Kokkos::store_vector(d_vectors, 0, right); From 97884587157559c87e4543f223be189c13e73ad9 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 08:19:45 -0600 Subject: [PATCH 13/41] Hide tensor helper API and share in-place Kokkos ops --- include/gpu/kokkos_tensor_ops.h | 756 +++++++++--------- include/gpu/kokkos_vector_ops.h | 127 ++- .../kokkos_tensor_ops_oracle_runners.h | 4 +- 3 files changed, 485 insertions(+), 402 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index b124fd212d..c20ade2661 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -58,386 +58,389 @@ tensor_semantic_type_t copy_tensor(const TensorLike & T_in) return copy_tensor>(T_in); } -// Tensor reductions and predicates +namespace detail +{ -template +template LIBMESH_DEVICE_INLINE -auto tensor_contract(const LeftTensor & left, const RightTensor & right) +auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) { - static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like left input"); - static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like right input"); + static_assert(is_tensor_like_v, + "detail::leading_determinant() requires a tensor-like input"); - using sum_type = - detail::remove_cvref_t; + if (dim == 0) + return tensor_value_type_t(1); - sum_type sum = sum_type(0); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += tensor_get_component(left, row, col) * tensor_get_component(right, row, col); + if (dim == 1) + return tensor_get_component(T_in, 0, 0); - return sum; + if (dim == 2) + return tensor_get_component(T_in, 0, 0) * tensor_get_component(T_in, 1, 1) - + tensor_get_component(T_in, 0, 1) * tensor_get_component(T_in, 1, 0); + +#if LIBMESH_DIM > 2 + const auto a00 = tensor_get_component(T_in, 0, 0); + const auto a01 = tensor_get_component(T_in, 0, 1); + const auto a02 = tensor_get_component(T_in, 0, 2); + const auto a10 = tensor_get_component(T_in, 1, 0); + const auto a11 = tensor_get_component(T_in, 1, 1); + const auto a12 = tensor_get_component(T_in, 1, 2); + const auto a20 = tensor_get_component(T_in, 2, 0); + const auto a21 = tensor_get_component(T_in, 2, 1); + const auto a22 = tensor_get_component(T_in, 2, 2); + + return a00 * (a11 * a22 - a12 * a21) - + a01 * (a10 * a22 - a12 * a20) + + a02 * (a10 * a21 - a11 * a20); +#else + libmesh_ignore(T_in); + return tensor_value_type_t(0); +#endif } -template +template LIBMESH_DEVICE_INLINE -auto tensor_norm_sq(const TensorLike & T_in) +ResultTensor outer_product(const LeftVector & left, const RightVector & right) { - static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); - - using norm_type = detail::remove_cvref_t; + ResultTensor out; + out.zero(); - norm_type sum = norm_type(0); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += libMesh::TensorTools::norm_sq(tensor_get_component(T_in, row, col)); + tensor_set_component(out, + row, + col, + vector_get_component(left, row) * libmesh_conj(vector_get_component(right, col))); - return sum; + return out; } -template +template LIBMESH_DEVICE_INLINE -auto tensor_norm(const TensorLike & T_in) +ResultTensor inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) { - using std::sqrt; - return sqrt(tensor_norm_sq(T_in)); -} + static_assert(is_tensor_like_v, "detail::inverse() requires a tensor-like input"); -template -LIBMESH_DEVICE_INLINE -auto tensor_trace(const TensorLike & T_in) -{ - static_assert(is_tensor_like_v, "tensor_trace() requires a tensor-like input"); + ResultTensor out; + out.zero(); - using trace_type = detail::remove_cvref_t; - trace_type sum = trace_type(0); - for (unsigned int i = 0; i < LIBMESH_DIM; ++i) - sum += tensor_get_component(T_in, i, i); + if (dim == 0) + return out; - return sum; + if (dim == 1) + { + tensor_set_component(out, 0, 0, tensor_value_type_t(1) / tensor_get_component(T_in, 0, 0)); + return out; + } + + const auto det = leading_determinant(T_in, dim); + + if (dim == 2) + { + tensor_set_component(out, 0, 0, tensor_get_component(T_in, 1, 1) / det); + tensor_set_component(out, 0, 1, -tensor_get_component(T_in, 0, 1) / det); + tensor_set_component(out, 1, 0, -tensor_get_component(T_in, 1, 0) / det); + tensor_set_component(out, 1, 1, tensor_get_component(T_in, 0, 0) / det); + return out; + } + +#if LIBMESH_DIM > 2 + const auto a00 = tensor_get_component(T_in, 0, 0); + const auto a01 = tensor_get_component(T_in, 0, 1); + const auto a02 = tensor_get_component(T_in, 0, 2); + const auto a10 = tensor_get_component(T_in, 1, 0); + const auto a11 = tensor_get_component(T_in, 1, 1); + const auto a12 = tensor_get_component(T_in, 1, 2); + const auto a20 = tensor_get_component(T_in, 2, 0); + const auto a21 = tensor_get_component(T_in, 2, 1); + const auto a22 = tensor_get_component(T_in, 2, 2); + + tensor_set_component(out, 0, 0, (a11 * a22 - a12 * a21) / det); + tensor_set_component(out, 0, 1, (a02 * a21 - a01 * a22) / det); + tensor_set_component(out, 0, 2, (a01 * a12 - a02 * a11) / det); + tensor_set_component(out, 1, 0, (a12 * a20 - a10 * a22) / det); + tensor_set_component(out, 1, 1, (a00 * a22 - a02 * a20) / det); + tensor_set_component(out, 1, 2, (a02 * a10 - a00 * a12) / det); + tensor_set_component(out, 2, 0, (a10 * a21 - a11 * a20) / det); + tensor_set_component(out, 2, 1, (a01 * a20 - a00 * a21) / det); + tensor_set_component(out, 2, 2, (a00 * a11 - a01 * a10) / det); +#else + libmesh_ignore(T_in); +#endif + + return out; } -template +template LIBMESH_DEVICE_INLINE -bool tensor_is_zero(const TensorLike & T_in) +ResultTensor transpose(const TensorLike & T_in) { - static_assert(is_tensor_like_v, "tensor_is_zero() requires a tensor-like input"); + ResultTensor out; + out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(T_in, row, col) != tensor_value_type_t(0)) - return false; + tensor_set_component(out, row, col, tensor_get_component(T_in, col, row)); - return true; + return out; } -// Tensor arithmetic - -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_outer_product(const LeftVector & left, const RightVector & right) +ResultTensor multiply(const LeftTensor & left, const RightTensor & right) { ResultTensor out; out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - vector_get_component(left, row) * libmesh_conj(vector_get_component(right, col))); + { + auto value = tensor_get_component(left, row, 0) * tensor_get_component(right, 0, col); + for (unsigned int k = 1; k < LIBMESH_DIM; ++k) + value += tensor_get_component(left, row, k) * tensor_get_component(right, k, col); + tensor_set_component(out, row, col, value); + } return out; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -libMesh::TypeTensor> -tensor_outer_product(const LeftVector & left, const RightVector & right) +ResultVector row(const TensorLike & T_in, const unsigned int row_index) { - return tensor_outer_product>>(left, right); + ResultVector out; + out.zero(); + + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + vector_set_component(out, col, tensor_get_component(T_in, row_index, col)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_add(const LeftTensor & left, const RightTensor & right) +ResultVector column(const TensorLike & T_in, const unsigned int col_index) { - ResultTensor out; + ResultVector out; out.zero(); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); + for (unsigned int row_index = 0; row_index < LIBMESH_DIM; ++row_index) + vector_set_component(out, row_index, tensor_get_component(T_in, row_index, col_index)); return out; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_add(const LeftTensor & left, const RightTensor & right) +ResultVector multiply(const TensorLike & T_in, const VectorLike & v) { - return tensor_add>(left, right); + ResultVector out; + out.zero(); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + { + auto value = tensor_get_component(T_in, row, 0) * vector_get_component(v, 0); + for (unsigned int col = 1; col < LIBMESH_DIM; ++col) + value += tensor_get_component(T_in, row, col) * vector_get_component(v, col); + vector_set_component(out, row, value); + } + + return out; } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_subtract(const LeftTensor & left, const RightTensor & right) +ResultVector multiply(const VectorLike & v, const TensorLike & T_in) { - ResultTensor out; + ResultVector out; out.zero(); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + { + auto value = vector_get_component(v, 0) * tensor_get_component(T_in, 0, col); + for (unsigned int row = 1; row < LIBMESH_DIM; ++row) + value += vector_get_component(v, row) * tensor_get_component(T_in, row, col); + vector_set_component(out, col, value); + } return out; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_subtract(const LeftTensor & left, const RightTensor & right) +void assign_tensor_components(LeftTensor & left, const RightTensor & right) { - return tensor_subtract>(left, right); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, row, col, tensor_get_component(right, row, col)); } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_scale(const Scalar & alpha, const TensorLike & T_in) +void add_tensor_components(LeftTensor & left, const RightTensor & right) { - ResultTensor out; - out.zero(); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); - - return out; + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_scale(const Scalar & alpha, const TensorLike & T_in) +void add_scaled_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) { - return tensor_scale>(alpha, T_in); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) + + factor * tensor_get_component(right, row, col)); } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_divide(const TensorLike & T_in, const Scalar & alpha) +void subtract_tensor_components(LeftTensor & left, const RightTensor & right) { - ResultTensor out; - out.zero(); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); - - return out; + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const Scalar & alpha) +void subtract_scaled_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) { - return tensor_divide>(T_in, alpha); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(left, + row, + col, + tensor_get_component(left, row, col) - + factor * tensor_get_component(right, row, col)); } template LIBMESH_DEVICE_INLINE -auto tensor_leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +void zero_tensor_components(TensorLike & T_in) { - static_assert(is_tensor_like_v, - "tensor_leading_determinant() requires a tensor-like input"); - - if (dim == 0) - return tensor_value_type_t(1); - - if (dim == 1) - return tensor_get_component(T_in, 0, 0); - - if (dim == 2) - return tensor_get_component(T_in, 0, 0) * tensor_get_component(T_in, 1, 1) - - tensor_get_component(T_in, 0, 1) * tensor_get_component(T_in, 1, 0); - -#if LIBMESH_DIM > 2 - const auto a00 = tensor_get_component(T_in, 0, 0); - const auto a01 = tensor_get_component(T_in, 0, 1); - const auto a02 = tensor_get_component(T_in, 0, 2); - const auto a10 = tensor_get_component(T_in, 1, 0); - const auto a11 = tensor_get_component(T_in, 1, 1); - const auto a12 = tensor_get_component(T_in, 1, 2); - const auto a20 = tensor_get_component(T_in, 2, 0); - const auto a21 = tensor_get_component(T_in, 2, 1); - const auto a22 = tensor_get_component(T_in, 2, 2); - - return a00 * (a11 * a22 - a12 * a21) - - a01 * (a10 * a22 - a12 * a20) + - a02 * (a10 * a21 - a11 * a20); -#else - libmesh_ignore(T_in); - return tensor_value_type_t(0); -#endif + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(T_in, row, col, tensor_value_type_t(0)); } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +void scale_tensor_components(TensorLike & T_in, const Scalar & alpha) { - static_assert(is_tensor_like_v, "tensor_inverse() requires a tensor-like input"); - - ResultTensor out; - out.zero(); - - if (dim == 0) - return out; + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) * alpha); +} - if (dim == 1) - { - tensor_set_component(out, 0, 0, tensor_value_type_t(1) / tensor_get_component(T_in, 0, 0)); - return out; - } +template +LIBMESH_DEVICE_INLINE +void divide_tensor_components(TensorLike & T_in, const Scalar & alpha) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) / alpha); +} - const auto det = tensor_leading_determinant(T_in, dim); +} // namespace detail - if (dim == 2) - { - tensor_set_component(out, 0, 0, tensor_get_component(T_in, 1, 1) / det); - tensor_set_component(out, 0, 1, -tensor_get_component(T_in, 0, 1) / det); - tensor_set_component(out, 1, 0, -tensor_get_component(T_in, 1, 0) / det); - tensor_set_component(out, 1, 1, tensor_get_component(T_in, 0, 0) / det); - return out; - } +// Tensor reductions and predicates -#if LIBMESH_DIM > 2 - const auto a00 = tensor_get_component(T_in, 0, 0); - const auto a01 = tensor_get_component(T_in, 0, 1); - const auto a02 = tensor_get_component(T_in, 0, 2); - const auto a10 = tensor_get_component(T_in, 1, 0); - const auto a11 = tensor_get_component(T_in, 1, 1); - const auto a12 = tensor_get_component(T_in, 1, 2); - const auto a20 = tensor_get_component(T_in, 2, 0); - const auto a21 = tensor_get_component(T_in, 2, 1); - const auto a22 = tensor_get_component(T_in, 2, 2); +template +LIBMESH_DEVICE_INLINE +auto tensor_contract(const LeftTensor & left, const RightTensor & right) +{ + static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like left input"); + static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like right input"); - tensor_set_component(out, 0, 0, (a11 * a22 - a12 * a21) / det); - tensor_set_component(out, 0, 1, (a02 * a21 - a01 * a22) / det); - tensor_set_component(out, 0, 2, (a01 * a12 - a02 * a11) / det); - tensor_set_component(out, 1, 0, (a12 * a20 - a10 * a22) / det); - tensor_set_component(out, 1, 1, (a00 * a22 - a02 * a20) / det); - tensor_set_component(out, 1, 2, (a02 * a10 - a00 * a12) / det); - tensor_set_component(out, 2, 0, (a10 * a21 - a11 * a20) / det); - tensor_set_component(out, 2, 1, (a01 * a20 - a00 * a21) / det); - tensor_set_component(out, 2, 2, (a00 * a11 - a01 * a10) / det); -#else - libmesh_ignore(T_in); -#endif + using sum_type = + detail::remove_cvref_t; - return out; -} + sum_type sum = sum_type(0); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + sum += tensor_get_component(left, row, col) * tensor_get_component(right, row, col); -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) -{ - return tensor_inverse>(T_in, dim); + return sum; } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_transpose(const TensorLike & T_in) +auto tensor_norm_sq(const TensorLike & T_in) { - ResultTensor out; - out.zero(); + static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, col, row)); + sum += libMesh::TensorTools::norm_sq(tensor_get_component(T_in, row, col)); - return out; + return sum; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_transpose(const TensorLike & T_in) +auto tensor_norm(const TensorLike & T_in) { - return tensor_transpose>(T_in); + using std::sqrt; + return sqrt(tensor_norm_sq(T_in)); } -template +template LIBMESH_DEVICE_INLINE -ResultTensor tensor_linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) +auto tensor_trace(const TensorLike & T_in) { - ResultTensor out; - out.zero(); + static_assert(is_tensor_like_v, "tensor_trace() requires a tensor-like input"); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - alpha * tensor_get_component(A, row, col) + - beta * tensor_get_component(B, row, col)); + using trace_type = detail::remove_cvref_t; + trace_type sum = trace_type(0); + for (unsigned int i = 0; i < LIBMESH_DIM; ++i) + sum += tensor_get_component(T_in, i, i); - return out; + return sum; } -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) +bool tensor_is_zero(const TensorLike & T_in) { - return tensor_linear_combination>(alpha, A, beta, B); + static_assert(is_tensor_like_v, "tensor_is_zero() requires a tensor-like input"); + + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(T_in, row, col) != tensor_value_type_t(0)) + return false; + + return true; } +// Tensor arithmetic + template LIBMESH_DEVICE_INLINE -ResultTensor tensor_multiply(const LeftTensor & left, const RightTensor & right) +ResultTensor tensor_add(const LeftTensor & left, const RightTensor & right) { ResultTensor out; out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - { - auto value = tensor_get_component(left, row, 0) * tensor_get_component(right, 0, col); - for (unsigned int k = 1; k < LIBMESH_DIM; ++k) - value += tensor_get_component(left, row, k) * tensor_get_component(right, k, col); - tensor_set_component(out, row, col, value); - } + tensor_set_component(out, + row, + col, + tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); return out; } @@ -447,115 +450,124 @@ template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_multiply(const LeftTensor & left, const RightTensor & right) +tensor_semantic_type_t tensor_add(const LeftTensor & left, const RightTensor & right) { - return tensor_multiply>(left, right); + return tensor_add>(left, right); } -// Tensor/vector conversions - -template +template LIBMESH_DEVICE_INLINE -ResultVector tensor_row(const TensorLike & T_in, const unsigned int row) +ResultTensor tensor_subtract(const LeftTensor & left, const RightTensor & right) { - ResultVector out; + ResultTensor out; out.zero(); - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - vector_set_component(out, col, tensor_get_component(T_in, row, col)); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); return out; } template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -libMesh::TypeVector> -tensor_row(const TensorLike & T_in, const unsigned int row) +tensor_semantic_type_t tensor_subtract(const LeftTensor & left, const RightTensor & right) { - return tensor_row>>(T_in, row); + return tensor_subtract>(left, right); } -template +template LIBMESH_DEVICE_INLINE -ResultVector tensor_column(const TensorLike & T_in, const unsigned int col) +ResultTensor tensor_scale(const Scalar & alpha, const TensorLike & T_in) { - ResultVector out; + ResultTensor out; out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - vector_set_component(out, row, tensor_get_component(T_in, row, col)); + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); return out; } template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -libMesh::TypeVector> -tensor_column(const TensorLike & T_in, const unsigned int col) +tensor_semantic_type_t tensor_scale(const Scalar & alpha, const TensorLike & T_in) { - return tensor_column>>(T_in, col); + return tensor_scale>(alpha, T_in); } -template +template LIBMESH_DEVICE_INLINE -ResultVector tensor_vector_multiply(const TensorLike & T_in, const VectorLike & v) +ResultTensor tensor_divide(const TensorLike & T_in, const Scalar & alpha) { - ResultVector out; + ResultTensor out; out.zero(); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - { - auto value = tensor_get_component(T_in, row, 0) * vector_get_component(v, 0); - for (unsigned int col = 1; col < LIBMESH_DIM; ++col) - value += tensor_get_component(T_in, row, col) * vector_get_component(v, col); - vector_set_component(out, row, value); - } + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); return out; } template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -vector_semantic_type_t tensor_vector_multiply(const TensorLike & T_in, const VectorLike & v) +tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const Scalar & alpha) { - return tensor_vector_multiply>(T_in, v); + return tensor_divide>(T_in, alpha); } -template +template LIBMESH_DEVICE_INLINE -ResultVector vector_tensor_multiply(const VectorLike & v, const TensorLike & T_in) +ResultTensor tensor_linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) { - ResultVector out; + ResultTensor out; out.zero(); - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - { - auto value = vector_get_component(v, 0) * tensor_get_component(T_in, 0, col); - for (unsigned int row = 1; row < LIBMESH_DIM; ++row) - value += vector_get_component(v, row) * tensor_get_component(T_in, row, col); - vector_set_component(out, col, value); - } + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + tensor_set_component(out, + row, + col, + alpha * tensor_get_component(A, row, col) + + beta * tensor_get_component(B, row, col)); return out; } template ::value, int>::type = 0> LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_tensor_multiply(const VectorLike & v, const TensorLike & T_in) +tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) { - return vector_tensor_multiply>(v, T_in); + return tensor_linear_combination>(alpha, A, beta, B); } +// Tensor/vector conversions + // libMesh-like convenience wrappers template @@ -591,13 +603,29 @@ auto is_zero(const TensorLike & T_in) return tensor_is_zero(T_in); } +template +LIBMESH_DEVICE_INLINE +auto outer_product(const LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v, ResultTensor> +{ + return detail::outer_product(left, right); +} + template LIBMESH_DEVICE_INLINE auto outer_product(const LeftVector & left, const RightVector & right) -> std::enable_if_t && is_vector_like_v, libMesh::TypeTensor>> { - return tensor_outer_product(left, right); + return outer_product>>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto transpose(const TensorLike & T_in) + -> std::enable_if_t, ResultTensor> +{ + return detail::transpose(T_in); } template @@ -605,7 +633,7 @@ LIBMESH_DEVICE_INLINE auto transpose(const TensorLike & T_in) -> std::enable_if_t, tensor_semantic_type_t> { - return tensor_transpose(T_in); + return transpose>(T_in); } template @@ -616,12 +644,28 @@ auto det(const TensorLike & T_in) return T_in.det(); } +template +LIBMESH_DEVICE_INLINE +auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) + -> std::enable_if_t, ResultTensor> +{ + return detail::inverse(T_in, dim); +} + template LIBMESH_DEVICE_INLINE auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) -> std::enable_if_t, tensor_semantic_type_t> { - return tensor_inverse(T_in, dim); + return inverse>(T_in, dim); +} + +template +LIBMESH_DEVICE_INLINE +auto row(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, ResultVector> +{ + return detail::row(T_in, i); } template @@ -629,7 +673,15 @@ LIBMESH_DEVICE_INLINE auto row(const TensorLike & T_in, const unsigned int i) -> std::enable_if_t, libMesh::TypeVector>> { - return tensor_row(T_in, i); + return row>>(T_in, i); +} + +template +LIBMESH_DEVICE_INLINE +auto column(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, ResultVector> +{ + return detail::column(T_in, i); } template @@ -637,7 +689,15 @@ LIBMESH_DEVICE_INLINE auto column(const TensorLike & T_in, const unsigned int i) -> std::enable_if_t, libMesh::TypeVector>> { - return tensor_column(T_in, i); + return column>>(T_in, i); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v, ResultTensor> +{ + return detail::multiply(left, right); } template @@ -646,7 +706,15 @@ auto multiply(const LeftTensor & left, const RightTensor & right) -> std::enable_if_t && is_tensor_like_v, tensor_semantic_type_t> { - return tensor_multiply(left, right); + return multiply>(left, right); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const TensorLike & T_in, const VectorLike & v) + -> std::enable_if_t && is_vector_like_v, ResultVector> +{ + return detail::multiply(T_in, v); } template @@ -655,7 +723,15 @@ auto multiply(const TensorLike & T_in, const VectorLike & v) -> std::enable_if_t && is_vector_like_v, vector_semantic_type_t> { - return tensor_vector_multiply(T_in, v); + return multiply>(T_in, v); +} + +template +LIBMESH_DEVICE_INLINE +auto multiply(const VectorLike & v, const TensorLike & T_in) + -> std::enable_if_t && is_tensor_like_v, ResultVector> +{ + return detail::multiply(v, T_in); } template @@ -664,7 +740,7 @@ auto multiply(const VectorLike & v, const TensorLike & T_in) -> std::enable_if_t && is_tensor_like_v, vector_semantic_type_t> { - return vector_tensor_multiply(v, T_in); + return multiply>(v, T_in); } template @@ -672,9 +748,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::assign(const RightTensor & right) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, row, col, tensor_get_component(right, row, col)); + detail::assign_tensor_components(*this, right); } template @@ -682,12 +756,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add(const RightTensor & right) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, - row, - col, - tensor_get_component(*this, row, col) + tensor_get_component(right, row, col)); + detail::add_tensor_components(*this, right); } template @@ -695,13 +764,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add_scaled(const RightTensor & right, const value_type & factor) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, - row, - col, - tensor_get_component(*this, row, col) + - factor * tensor_get_component(right, row, col)); + detail::add_scaled_tensor_components(*this, right, factor); } template @@ -709,12 +772,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract(const RightTensor & right) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, - row, - col, - tensor_get_component(*this, row, col) - tensor_get_component(right, row, col)); + detail::subtract_tensor_components(*this, right); } template @@ -722,22 +780,14 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract_scaled(const RightTensor & right, const value_type & factor) { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, - row, - col, - tensor_get_component(*this, row, col) - - factor * tensor_get_component(right, row, col)); + detail::subtract_scaled_tensor_components(*this, right, factor); } template LIBMESH_DEVICE_INLINE void tensor_ref::zero() { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(*this, row, col, value_type(0)); + detail::zero_tensor_components(*this); } template @@ -773,14 +823,14 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::transpose() const { - return tensor_transpose(*this); + return libMesh::Kokkos::transpose(*this); } template LIBMESH_DEVICE_INLINE auto tensor_ref::det(const unsigned int dim) const { - return tensor_leading_determinant(*this, dim); + return detail::leading_determinant(*this, dim); } template @@ -794,7 +844,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::inverse(const unsigned int dim) const { - return tensor_inverse(*this, dim); + return libMesh::Kokkos::inverse(*this, dim); } template @@ -802,7 +852,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::solve(const VectorLike & b, ResultVector & x) const { - const auto solution = tensor_vector_multiply>(this->inverse(), b); + const auto solution = libMesh::Kokkos::multiply>(this->inverse(), b); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) vector_set_component(x, component, vector_get_component(solution, component)); } @@ -811,14 +861,14 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::row(const unsigned int i) const { - return tensor_row(*this, i); + return libMesh::Kokkos::row(*this, i); } template LIBMESH_DEVICE_INLINE auto tensor_ref::column(const unsigned int i) const { - return tensor_column(*this, i); + return libMesh::Kokkos::column(*this, i); } template @@ -826,7 +876,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::left_multiply(const VectorLike & v) const { - return vector_tensor_multiply(v, *this); + return libMesh::Kokkos::multiply(v, *this); } // Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. @@ -900,7 +950,7 @@ template @@ -957,13 +1007,7 @@ auto operator+=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); - + detail::add_tensor_components(left, right); return left; } @@ -974,13 +1018,7 @@ auto operator-=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); - + detail::subtract_tensor_components(left, right); return left; } @@ -991,10 +1029,7 @@ auto operator*=(LeftTensor & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftTensor &> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, row, col, tensor_get_component(left, row, col) * alpha); - + detail::scale_tensor_components(left, alpha); return left; } @@ -1005,10 +1040,7 @@ auto operator/=(LeftTensor & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftTensor &> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, row, col, tensor_get_component(left, row, col) / alpha); - + detail::divide_tensor_components(left, alpha); return left; } diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index fffbf789da..591b4d051b 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -44,6 +44,85 @@ vector_semantic_type_t copy_vector(const VectorLike & v) return copy_vector>(v); } +namespace detail +{ + +template +LIBMESH_DEVICE_INLINE +void assign_vector_components(LeftVector & left, const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, component, vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void add_vector_components(LeftVector & left, const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) + vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void add_scaled_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) + + factor * vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void subtract_vector_components(LeftVector & left, const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) - vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void subtract_scaled_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(left, + component, + vector_get_component(left, component) - + factor * vector_get_component(right, component)); +} + +template +LIBMESH_DEVICE_INLINE +void zero_vector_components(VectorLike & v) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(v, component, vector_value_type_t(0)); +} + +template +LIBMESH_DEVICE_INLINE +void scale_vector_components(VectorLike & v, const Scalar & alpha) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(v, component, vector_get_component(v, component) * alpha); +} + +template +LIBMESH_DEVICE_INLINE +void divide_vector_components(VectorLike & v, const Scalar & alpha) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(v, component, vector_get_component(v, component) / alpha); +} + +} // namespace detail + // Reductions and predicates template @@ -453,8 +532,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::assign(const RightVector & right) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, component, vector_get_component(right, component)); + detail::assign_vector_components(*this, right); } template @@ -462,10 +540,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::add(const RightVector & right) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, - component, - vector_get_component(*this, component) + vector_get_component(right, component)); + detail::add_vector_components(*this, right); } template @@ -473,11 +548,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::add_scaled(const RightVector & right, const value_type & factor) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, - component, - vector_get_component(*this, component) + - factor * vector_get_component(right, component)); + detail::add_scaled_vector_components(*this, right, factor); } template @@ -485,10 +556,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract(const RightVector & right) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, - component, - vector_get_component(*this, component) - vector_get_component(right, component)); + detail::subtract_vector_components(*this, right); } template @@ -496,19 +564,14 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract_scaled(const RightVector & right, const value_type & factor) { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, - component, - vector_get_component(*this, component) - - factor * vector_get_component(right, component)); + detail::subtract_scaled_vector_components(*this, right, factor); } template LIBMESH_DEVICE_INLINE void vector_ref::zero() { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(*this, component, value_type(0)); + detail::zero_vector_components(*this); } template @@ -668,11 +731,7 @@ auto operator+=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, - component, - vector_get_component(left, component) + vector_get_component(right, component)); - + detail::add_vector_components(left, right); return left; } @@ -683,11 +742,7 @@ auto operator-=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, - component, - vector_get_component(left, component) - vector_get_component(right, component)); - + detail::subtract_vector_components(left, right); return left; } @@ -698,9 +753,7 @@ auto operator*=(LeftVector & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftVector &> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, component, vector_get_component(left, component) * alpha); - + detail::scale_vector_components(left, alpha); return left; } @@ -711,9 +764,7 @@ auto operator/=(LeftVector & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftVector &> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, component, vector_get_component(left, component) / alpha); - + detail::divide_vector_components(left, alpha); return left; } diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index 59aadda6a4..de867d59f6 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -126,7 +126,7 @@ test_tensor_ops() const auto a_ref = libMesh::Kokkos::make_vector_ref(d_a, 0); const auto b_ref = libMesh::Kokkos::make_vector_ref(d_b, 0); const auto c_ref = libMesh::Kokkos::make_vector_ref(d_c, 0); - const auto outer_d = libMesh::Kokkos::tensor_outer_product(a_ref, b_ref); + const auto outer_d = libMesh::Kokkos::outer_product(a_ref, b_ref); const auto transpose_d = A_ref.transpose(); const auto mix_d = Real(1.5) * A_ref - Real(0.25) * outer_d; const auto right_d = A_ref * c_ref; @@ -382,7 +382,7 @@ test_mixed_representation_ops() const auto inverse = A_ref.inverse(); const auto add = A_ref + ref_transpose; const auto scaled = Real(0.5) * A_ref; - const auto outer = libMesh::Kokkos::tensor_outer_product(a_ref, b); + const auto outer = libMesh::Kokkos::outer_product(a_ref, b); d_scalars(0) = a_ref * b; d_scalars(1) = A_ref.contract(outer); From 13a88252f9eeba63d26612404c7c66469bac5729 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 08:32:34 -0600 Subject: [PATCH 14/41] Make remaining tensor helpers internal-only --- include/gpu/kokkos_tensor_ops.h | 64 +++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index c20ade2661..c820eacd61 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -354,6 +354,9 @@ void divide_tensor_components(TensorLike & T_in, const Scalar & alpha) } // namespace detail +namespace detail +{ + // Tensor reductions and predicates template @@ -568,31 +571,33 @@ tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, // Tensor/vector conversions +} // namespace detail + // libMesh-like convenience wrappers template LIBMESH_DEVICE_INLINE auto contract(const LeftTensor & left, const RightTensor & right) -> std::enable_if_t && is_tensor_like_v, - decltype(tensor_contract(left, right))> + decltype(detail::tensor_contract(left, right))> { - return tensor_contract(left, right); + return detail::tensor_contract(left, right); } template LIBMESH_DEVICE_INLINE auto norm_sq(const TensorLike & T_in) - -> std::enable_if_t, decltype(tensor_norm_sq(T_in))> + -> std::enable_if_t, decltype(detail::tensor_norm_sq(T_in))> { - return tensor_norm_sq(T_in); + return detail::tensor_norm_sq(T_in); } template LIBMESH_DEVICE_INLINE auto norm(const TensorLike & T_in) - -> std::enable_if_t, decltype(tensor_norm(T_in))> + -> std::enable_if_t, decltype(detail::tensor_norm(T_in))> { - return tensor_norm(T_in); + return detail::tensor_norm(T_in); } template @@ -600,7 +605,7 @@ LIBMESH_DEVICE_INLINE auto is_zero(const TensorLike & T_in) -> std::enable_if_t, bool> { - return tensor_is_zero(T_in); + return detail::tensor_is_zero(T_in); } template @@ -743,6 +748,29 @@ auto multiply(const VectorLike & v, const TensorLike & T_in) return multiply>(v, T_in); } +template +LIBMESH_DEVICE_INLINE +auto linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) + -> std::enable_if_t && is_tensor_like_v, ResultTensor> +{ + return detail::tensor_linear_combination(alpha, A, beta, B); +} + +template +LIBMESH_DEVICE_INLINE +auto linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) + -> std::enable_if_t && is_tensor_like_v, + tensor_semantic_type_t> +{ + return linear_combination>(alpha, A, beta, B); +} + template template LIBMESH_DEVICE_INLINE @@ -795,28 +823,28 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::contract(const RightTensor & right) const { - return tensor_contract(*this, right); + return detail::tensor_contract(*this, right); } template LIBMESH_DEVICE_INLINE auto tensor_ref::norm() const { - return tensor_norm(*this); + return detail::tensor_norm(*this); } template LIBMESH_DEVICE_INLINE auto tensor_ref::norm_sq() const { - return tensor_norm_sq(*this); + return detail::tensor_norm_sq(*this); } template LIBMESH_DEVICE_INLINE bool tensor_ref::is_zero() const { - return tensor_is_zero(*this); + return detail::tensor_is_zero(*this); } template @@ -837,7 +865,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::tr() const { - return tensor_trace(*this); + return detail::tensor_trace(*this); } template @@ -887,7 +915,7 @@ auto operator-(const TensorLike & T_in) -> std::enable_if_t && is_tensor_ref_v, tensor_semantic_type_t> { - return tensor_scale(tensor_value_type_t(-1), T_in); + return detail::tensor_scale(tensor_value_type_t(-1), T_in); } template @@ -897,7 +925,7 @@ auto operator+(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return tensor_add(left, right); + return detail::tensor_add(left, right); } template @@ -907,7 +935,7 @@ auto operator-(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return tensor_subtract(left, right); + return detail::tensor_subtract(left, right); } template @@ -939,7 +967,7 @@ auto operator/(const TensorLike & T_in, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, tensor_semantic_type_t> { - return tensor_divide(T_in, alpha); + return detail::tensor_divide(T_in, alpha); } template Date: Tue, 12 May 2026 09:19:25 -0600 Subject: [PATCH 15/41] Reduce Kokkos algebra wrapper layers --- include/gpu/kokkos_tensor_ops.h | 320 ++++++-------------------------- include/gpu/kokkos_vector_ops.h | 282 +++++++--------------------- 2 files changed, 128 insertions(+), 474 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index c820eacd61..2d94cb5344 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -187,7 +187,7 @@ ResultTensor transpose(const TensorLike & T_in) template LIBMESH_DEVICE_INLINE -ResultTensor multiply(const LeftTensor & left, const RightTensor & right) +ResultTensor multiply_tensors(const LeftTensor & left, const RightTensor & right) { ResultTensor out; out.zero(); @@ -232,7 +232,7 @@ ResultVector column(const TensorLike & T_in, const unsigned int col_index) template LIBMESH_DEVICE_INLINE -ResultVector multiply(const TensorLike & T_in, const VectorLike & v) +ResultVector multiply_tensor_vector(const TensorLike & T_in, const VectorLike & v) { ResultVector out; out.zero(); @@ -250,7 +250,7 @@ ResultVector multiply(const TensorLike & T_in, const VectorLike & v) template LIBMESH_DEVICE_INLINE -ResultVector multiply(const VectorLike & v, const TensorLike & T_in) +ResultVector multiply_vector_tensor(const VectorLike & v, const TensorLike & T_in) { ResultVector out; out.zero(); @@ -275,21 +275,18 @@ void assign_tensor_components(LeftTensor & left, const RightTensor & right) tensor_set_component(left, row, col, tensor_get_component(right, row, col)); } -template +template LIBMESH_DEVICE_INLINE -void add_tensor_components(LeftTensor & left, const RightTensor & right) +void fill_tensor_components(TensorLike & T_in, const Scalar & value) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); + tensor_set_component(T_in, row, col, value); } template LIBMESH_DEVICE_INLINE -void add_scaled_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) +void update_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) @@ -300,38 +297,53 @@ void add_scaled_tensor_components(LeftTensor & left, const RightTensor & right, factor * tensor_get_component(right, row, col)); } -template +template LIBMESH_DEVICE_INLINE -void subtract_tensor_components(LeftTensor & left, const RightTensor & right) +ResultTensor linear_combination(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) { + ResultTensor out; + out.zero(); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, + tensor_set_component(out, row, col, - tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); + alpha * tensor_get_component(A, row, col) + + beta * tensor_get_component(B, row, col)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -void subtract_scaled_tensor_components(LeftTensor & left, const RightTensor & right, const Scalar & factor) +ResultTensor scale_tensor(const Scalar & alpha, const TensorLike & T_in) { + ResultTensor out; + out.zero(); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) - - factor * tensor_get_component(right, row, col)); + tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -void zero_tensor_components(TensorLike & T_in) +ResultTensor divide_tensor(const TensorLike & T_in, const Scalar & alpha) { + ResultTensor out; + out.zero(); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(T_in, row, col, tensor_value_type_t(0)); + tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); + + return out; } template @@ -352,11 +364,6 @@ void divide_tensor_components(TensorLike & T_in, const Scalar & alpha) tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) / alpha); } -} // namespace detail - -namespace detail -{ - // Tensor reductions and predicates template @@ -429,148 +436,6 @@ bool tensor_is_zero(const TensorLike & T_in) return true; } -// Tensor arithmetic - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_add(const LeftTensor & left, const RightTensor & right) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - tensor_get_component(left, row, col) + tensor_get_component(right, row, col)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_add(const LeftTensor & left, const RightTensor & right) -{ - return tensor_add>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_subtract(const LeftTensor & left, const RightTensor & right) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - tensor_get_component(left, row, col) - tensor_get_component(right, row, col)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_subtract(const LeftTensor & left, const RightTensor & right) -{ - return tensor_subtract>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_scale(const Scalar & alpha, const TensorLike & T_in) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_scale(const Scalar & alpha, const TensorLike & T_in) -{ - return tensor_scale>(alpha, T_in); -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_divide(const TensorLike & T_in, const Scalar & alpha) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_divide(const TensorLike & T_in, const Scalar & alpha) -{ - return tensor_divide>(T_in, alpha); -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor tensor_linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - alpha * tensor_get_component(A, row, col) + - beta * tensor_get_component(B, row, col)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -tensor_semantic_type_t tensor_linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) -{ - return tensor_linear_combination>(alpha, A, beta, B); -} - -// Tensor/vector conversions - } // namespace detail // libMesh-like convenience wrappers @@ -697,80 +562,6 @@ auto column(const TensorLike & T_in, const unsigned int i) return column>>(T_in, i); } -template -LIBMESH_DEVICE_INLINE -auto multiply(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v, ResultTensor> -{ - return detail::multiply(left, right); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v, - tensor_semantic_type_t> -{ - return multiply>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const TensorLike & T_in, const VectorLike & v) - -> std::enable_if_t && is_vector_like_v, ResultVector> -{ - return detail::multiply(T_in, v); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const TensorLike & T_in, const VectorLike & v) - -> std::enable_if_t && is_vector_like_v, - vector_semantic_type_t> -{ - return multiply>(T_in, v); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const VectorLike & v, const TensorLike & T_in) - -> std::enable_if_t && is_tensor_like_v, ResultVector> -{ - return detail::multiply(v, T_in); -} - -template -LIBMESH_DEVICE_INLINE -auto multiply(const VectorLike & v, const TensorLike & T_in) - -> std::enable_if_t && is_tensor_like_v, - vector_semantic_type_t> -{ - return multiply>(v, T_in); -} - -template -LIBMESH_DEVICE_INLINE -auto linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) - -> std::enable_if_t && is_tensor_like_v, ResultTensor> -{ - return detail::tensor_linear_combination(alpha, A, beta, B); -} - -template -LIBMESH_DEVICE_INLINE -auto linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) - -> std::enable_if_t && is_tensor_like_v, - tensor_semantic_type_t> -{ - return linear_combination>(alpha, A, beta, B); -} - template template LIBMESH_DEVICE_INLINE @@ -784,7 +575,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add(const RightTensor & right) { - detail::add_tensor_components(*this, right); + detail::update_tensor_components(*this, right, value_type(1)); } template @@ -792,7 +583,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add_scaled(const RightTensor & right, const value_type & factor) { - detail::add_scaled_tensor_components(*this, right, factor); + detail::update_tensor_components(*this, right, factor); } template @@ -800,7 +591,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract(const RightTensor & right) { - detail::subtract_tensor_components(*this, right); + detail::update_tensor_components(*this, right, value_type(-1)); } template @@ -808,14 +599,14 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract_scaled(const RightTensor & right, const value_type & factor) { - detail::subtract_scaled_tensor_components(*this, right, factor); + detail::update_tensor_components(*this, right, -factor); } template LIBMESH_DEVICE_INLINE void tensor_ref::zero() { - detail::zero_tensor_components(*this); + detail::fill_tensor_components(*this, value_type(0)); } template @@ -880,7 +671,8 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::solve(const VectorLike & b, ResultVector & x) const { - const auto solution = libMesh::Kokkos::multiply>(this->inverse(), b); + const auto solution = + detail::multiply_tensor_vector>(this->inverse(), b); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) vector_set_component(x, component, vector_get_component(solution, component)); } @@ -904,7 +696,7 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::left_multiply(const VectorLike & v) const { - return libMesh::Kokkos::multiply(v, *this); + return v * *this; } // Operator-compatible wrappers for storage-backed refs and mixed ref/owning math. @@ -915,7 +707,7 @@ auto operator-(const TensorLike & T_in) -> std::enable_if_t && is_tensor_ref_v, tensor_semantic_type_t> { - return detail::tensor_scale(tensor_value_type_t(-1), T_in); + return detail::scale_tensor>(tensor_value_type_t(-1), T_in); } template @@ -925,7 +717,8 @@ auto operator+(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::tensor_add(left, right); + return detail::linear_combination>( + tensor_value_type_t(1), left, tensor_value_type_t(1), right); } template @@ -935,7 +728,8 @@ auto operator-(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::tensor_subtract(left, right); + return detail::linear_combination>( + tensor_value_type_t(1), left, tensor_value_type_t(-1), right); } template >(alpha, T_in); } template >(alpha, T_in); } template @@ -967,7 +761,7 @@ auto operator/(const TensorLike & T_in, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, tensor_semantic_type_t> { - return detail::tensor_divide(T_in, alpha); + return detail::divide_tensor>(T_in, alpha); } template >(left, right); } template >(T_in, v); } template >(v, T_in); } template @@ -1035,7 +829,7 @@ auto operator+=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - detail::add_tensor_components(left, right); + detail::update_tensor_components(left, right, tensor_value_type_t(1)); return left; } @@ -1046,7 +840,7 @@ auto operator-=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - detail::subtract_tensor_components(left, right); + detail::update_tensor_components(left, right, tensor_value_type_t(-1)); return left; } diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 591b4d051b..2c68a0341f 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -55,19 +55,17 @@ void assign_vector_components(LeftVector & left, const RightVector & right) vector_set_component(left, component, vector_get_component(right, component)); } -template +template LIBMESH_DEVICE_INLINE -void add_vector_components(LeftVector & left, const RightVector & right) +void fill_vector_components(VectorLike & v, const Scalar & value) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, - component, - vector_get_component(left, component) + vector_get_component(right, component)); + vector_set_component(v, component, value); } template LIBMESH_DEVICE_INLINE -void add_scaled_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) +void update_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) vector_set_component(left, @@ -76,33 +74,72 @@ void add_scaled_vector_components(LeftVector & left, const RightVector & right, factor * vector_get_component(right, component)); } -template +template LIBMESH_DEVICE_INLINE -void subtract_vector_components(LeftVector & left, const RightVector & right) +ResultVector linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b) { + ResultVector out; + out.zero(); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, + vector_set_component(out, component, - vector_get_component(left, component) - vector_get_component(right, component)); + alpha * vector_get_component(a, component) + + beta * vector_get_component(b, component)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -void subtract_scaled_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) +ResultVector linear_combination(const ScalarA & alpha, + const VectorA & a, + const ScalarB & beta, + const VectorB & b, + const ScalarC & gamma, + const VectorC & c) { + ResultVector out; + out.zero(); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, + vector_set_component(out, component, - vector_get_component(left, component) - - factor * vector_get_component(right, component)); + alpha * vector_get_component(a, component) + + beta * vector_get_component(b, component) + + gamma * vector_get_component(c, component)); + + return out; } -template +template LIBMESH_DEVICE_INLINE -void zero_vector_components(VectorLike & v) +ResultVector scale_vector(const Scalar & alpha, const VectorLike & v) { + ResultVector out; + out.zero(); + + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + vector_set_component(out, component, alpha * vector_get_component(v, component)); + + return out; +} + +template +LIBMESH_DEVICE_INLINE +ResultVector divide_vector(const VectorLike & v, const Scalar & alpha) +{ + ResultVector out; + out.zero(); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(v, component, vector_value_type_t(0)); + vector_set_component(out, component, vector_get_component(v, component) / alpha); + + return out; } template @@ -194,192 +231,13 @@ bool vector_is_zero(const VectorLike & v) return true; } -// Arithmetic - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_add(const LeftVector & left, const RightVector & right) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - vector_get_component(left, component) + vector_get_component(right, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_add(const LeftVector & left, const RightVector & right) -{ - return vector_add>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_subtract(const LeftVector & left, const RightVector & right) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - vector_get_component(left, component) - vector_get_component(right, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_subtract(const LeftVector & left, const RightVector & right) -{ - return vector_subtract>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_scale(const Scalar & alpha, const VectorLike & v) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, alpha * vector_get_component(v, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_scale(const Scalar & alpha, const VectorLike & v) -{ - return vector_scale>(alpha, v); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_divide(const VectorLike & v, const Scalar & alpha) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, vector_get_component(v, component) / alpha); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_divide(const VectorLike & v, const Scalar & alpha) -{ - return vector_divide>(v, alpha); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - alpha * vector_get_component(a, component) + - beta * vector_get_component(b, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b) -{ - return vector_linear_combination>(alpha, a, beta, b); -} - -template -LIBMESH_DEVICE_INLINE -ResultVector vector_linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b, - const ScalarC & gamma, - const VectorC & c) -{ - ResultVector out; - out.zero(); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - alpha * vector_get_component(a, component) + - beta * vector_get_component(b, component) + - gamma * vector_get_component(c, component)); - - return out; -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b, - const ScalarC & gamma, - const VectorC & c) -{ - return vector_linear_combination>(alpha, a, beta, b, gamma, c); -} - template LIBMESH_DEVICE_INLINE ResultVector vector_unit(const VectorLike & v) { const auto length = vector_norm(v); libmesh_assert_not_equal_to(length, static_cast(0.)); - return vector_divide(v, length); + return detail::divide_vector(v, length); } template LIBMESH_DEVICE_INLINE void vector_ref::add(const RightVector & right) { - detail::add_vector_components(*this, right); + detail::update_vector_components(*this, right, value_type(1)); } template @@ -548,7 +406,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::add_scaled(const RightVector & right, const value_type & factor) { - detail::add_scaled_vector_components(*this, right, factor); + detail::update_vector_components(*this, right, factor); } template @@ -556,7 +414,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract(const RightVector & right) { - detail::subtract_vector_components(*this, right); + detail::update_vector_components(*this, right, value_type(-1)); } template @@ -564,14 +422,14 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract_scaled(const RightVector & right, const value_type & factor) { - detail::subtract_scaled_vector_components(*this, right, factor); + detail::update_vector_components(*this, right, -factor); } template LIBMESH_DEVICE_INLINE void vector_ref::zero() { - detail::zero_vector_components(*this); + detail::fill_vector_components(*this, value_type(0)); } template @@ -633,7 +491,7 @@ auto operator-(const VectorLike & v) -> std::enable_if_t && is_vector_ref_v, vector_semantic_type_t> { - return vector_scale(vector_value_type_t(-1), v); + return detail::scale_vector>(vector_value_type_t(-1), v); } template @@ -643,7 +501,8 @@ auto operator+(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), vector_semantic_type_t> { - return vector_add(left, right); + return detail::linear_combination>( + vector_value_type_t(1), left, vector_value_type_t(1), right); } template @@ -653,7 +512,8 @@ auto operator-(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), vector_semantic_type_t> { - return vector_subtract(left, right); + return detail::linear_combination>( + vector_value_type_t(1), left, vector_value_type_t(-1), right); } template >(alpha, v); } template >(alpha, v); } template >(v, alpha); } template @@ -731,7 +591,7 @@ auto operator+=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - detail::add_vector_components(left, right); + detail::update_vector_components(left, right, vector_value_type_t(1)); return left; } @@ -742,7 +602,7 @@ auto operator-=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - detail::subtract_vector_components(left, right); + detail::update_vector_components(left, right, vector_value_type_t(-1)); return left; } From 8e4d1bc36138a9e8c4cb7d3ece745ff184bed1eb Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 09:42:50 -0600 Subject: [PATCH 16/41] Update vector oracle to use Kokkos ref operators --- tests/numerics/kokkos_vector_ops_oracle_runners.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h index 73fbbe7834..5fcd7e45a5 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_runners.h +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -34,14 +34,11 @@ test_vector_ops_case(const vector_case & info) const auto c_ref = libMesh::Kokkos::make_vector_ref(d_c, 0); const Vec copied = libMesh::Kokkos::copy_vector(a_ref); - const Vec mix = libMesh::Kokkos::vector_linear_combination( - Real(1), a_ref, Real(1), b_ref, Real(-1), c_ref); - const Vec scaled = libMesh::Kokkos::vector_linear_combination( - Real(1.25), a_ref, Real(-0.5), b_ref, Real(0.25), c_ref); + const Vec mix = a_ref + b_ref - c_ref; + const Vec scaled = Real(1.25) * a_ref + Real(-0.5) * b_ref + Real(0.25) * c_ref; const Vec plus_assign = a_ref + b_ref; const Vec minus_assign = a_ref - b_ref; - const Vec accum = libMesh::Kokkos::vector_linear_combination( - Real(1.25), a_ref, Real(-0.5), b_ref, Real(0.25), c_ref); + const Vec accum = Real(1.25) * a_ref + Real(-0.5) * b_ref + Real(0.25) * c_ref; const Vec divided = a_ref / Real(5.0); const Vec outer_right = Real(5.0) * a_ref; const Vec outer_left = a_ref * Real(5.0); From ebdb2eee6edfe7c356565ca35138706f1969fab0 Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 09:48:58 -0600 Subject: [PATCH 17/41] Rename tensor combination kernel --- include/gpu/kokkos_tensor_ops.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 2d94cb5344..71926b92b1 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -299,10 +299,10 @@ void update_tensor_components(LeftTensor & left, const RightTensor & right, cons template LIBMESH_DEVICE_INLINE -ResultTensor linear_combination(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) +ResultTensor combine_tensors(const ScalarA & alpha, + const TensorA & A, + const ScalarB & beta, + const TensorB & B) { ResultTensor out; out.zero(); @@ -717,7 +717,7 @@ auto operator+(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::linear_combination>( + return detail::combine_tensors>( tensor_value_type_t(1), left, tensor_value_type_t(1), right); } @@ -728,7 +728,7 @@ auto operator-(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::linear_combination>( + return detail::combine_tensors>( tensor_value_type_t(1), left, tensor_value_type_t(-1), right); } From d91491314e5fd1c345f967904aed0bcdea3351f7 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 12:02:32 -0500 Subject: [PATCH 18/41] Fixup Kokkos plumbing --- include/base/libmesh_device.h | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 include/base/libmesh_device.h diff --git a/include/base/libmesh_device.h b/include/base/libmesh_device.h new file mode 100644 index 0000000000..f41d4c70b0 --- /dev/null +++ b/include/base/libmesh_device.h @@ -0,0 +1,74 @@ +// The libMesh Finite Element Library. +// Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner + +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. + +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +#ifndef LIBMESH_LIBMESH_DEVICE_H +#define LIBMESH_LIBMESH_DEVICE_H + +// Defines LIBMESH_DEVICE_INLINE, mirroring MetaPhysicL's METAPHYSICL_INLINE +// pattern (metaphysicl_device.h / METAPHYSICL_KOKKOS_COMPILATION). +// +// When compiling a .K translation unit (LIBMESH_KOKKOS_COMPILATION is defined +// by kokkos.mk), this expands to KOKKOS_INLINE_FUNCTION so that annotated +// methods are callable from both host and device code. In all other +// translation units it expands to plain `inline`. +#ifdef LIBMESH_KOKKOS_COMPILATION +# include +# include +# define LIBMESH_DEVICE_INLINE KOKKOS_INLINE_FUNCTION + +// Backend-neutral device-code detection for Kokkos .K translation units. +// This lets error/exception plumbing share a single predicate instead of +// hardcoding per-backend checks in multiple headers. +# if defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__) || defined(__SYCL_DEVICE_ONLY__) +# define LIBMESH_IN_DEVICE_CODE 1 +# else +# define LIBMESH_IN_DEVICE_CODE 0 +# endif + +// Device-safe assert: uses printf (supported on CUDA/HIP) and +// Kokkos::abort() for backend-portable device termination. +// Defined here (not in libmesh_common.h) because Kokkos headers +// are only available in .K translation units. +# ifndef NDEBUG +# define LIBMESH_DEVICE_ASSERT(asserted) \ + do { if (!(asserted)) { \ + printf("libMesh assert failed: %s, file %s, line %d\n", \ + #asserted, __FILE__, __LINE__); \ + ::Kokkos::abort("libmesh_assert failed"); \ + } } while (0) +# else +# define LIBMESH_DEVICE_ASSERT(asserted) ((void) 0) +# endif + +# define LIBMESH_DEVICE_ERROR_MSG(msg) \ + do { \ + printf("libMesh error: %s, file %s, line %d\n", \ + msg, __FILE__, __LINE__); \ + ::Kokkos::abort(msg); \ + } while (0) + +# define LIBMESH_DEVICE_ERROR_MSG_IF(cond, msg) \ + do { if (cond) { LIBMESH_DEVICE_ERROR_MSG(msg); } } while (0) + +#else +# define LIBMESH_DEVICE_INLINE inline +# define LIBMESH_IN_DEVICE_CODE 0 +# define LIBMESH_DEVICE_ERROR_MSG(msg) libmesh_error_msg(msg) +# define LIBMESH_DEVICE_ERROR_MSG_IF(cond, msg) libmesh_error_msg_if(cond, msg) +#endif + +#endif // LIBMESH_LIBMESH_DEVICE_H From efa5a8f923d1f0997be61923e712e7443f9fef0f Mon Sep 17 00:00:00 2001 From: rochi00 Date: Tue, 12 May 2026 10:27:16 -0600 Subject: [PATCH 19/41] Forward libMesh error macros into device code --- include/base/libmesh_common.h | 9 ++++++++- include/base/libmesh_device.h | 2 -- include/base/libmesh_exceptions.h | 4 ++++ include/numerics/type_tensor.h | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/base/libmesh_common.h b/include/base/libmesh_common.h index 32f8820b4d..7e663098df 100644 --- a/include/base/libmesh_common.h +++ b/include/base/libmesh_common.h @@ -309,7 +309,7 @@ extern bool warned_about_auto_ptr; #define libmesh_assert_less_equal_msg(expr1,expr2, msg) ((void) 0) #define libmesh_assert_greater_equal_msg(expr1,expr2, msg) ((void) 0) -#elif defined(LIBMESH_DEVICE_ASSERT) +#elif defined(LIBMESH_KOKKOS_COMPILATION) // Kokkos compilation: use the device-safe assert from libmesh_device.h. #define libmesh_assert_msg(asserted, msg) LIBMESH_DEVICE_ASSERT(asserted) @@ -426,6 +426,12 @@ struct casting_compare { // // The libmesh_terminate() macro prints a message and throws a // TerminationException exception +#if LIBMESH_IN_DEVICE_CODE +#define libmesh_error_msg(msg) \ + do { \ + LIBMESH_DEVICE_ERROR_MSG(msg); \ + } while (0) +#else #define libmesh_error_msg(msg) \ do { \ std::stringstream message_stream; \ @@ -433,6 +439,7 @@ struct casting_compare { libMesh::MacroFunctions::report_error(__FILE__, __LINE__, LIBMESH_DATE, LIBMESH_TIME, message_stream); \ LIBMESH_THROW(libMesh::LogicError(message_stream.str())); \ } while (0) +#endif #define libmesh_error() libmesh_error_msg("") diff --git a/include/base/libmesh_device.h b/include/base/libmesh_device.h index f41d4c70b0..87388289b8 100644 --- a/include/base/libmesh_device.h +++ b/include/base/libmesh_device.h @@ -67,8 +67,6 @@ #else # define LIBMESH_DEVICE_INLINE inline # define LIBMESH_IN_DEVICE_CODE 0 -# define LIBMESH_DEVICE_ERROR_MSG(msg) libmesh_error_msg(msg) -# define LIBMESH_DEVICE_ERROR_MSG_IF(cond, msg) libmesh_error_msg_if(cond, msg) #endif #endif // LIBMESH_LIBMESH_DEVICE_H diff --git a/include/base/libmesh_exceptions.h b/include/base/libmesh_exceptions.h index c3892f8677..8dd8bdde62 100644 --- a/include/base/libmesh_exceptions.h +++ b/include/base/libmesh_exceptions.h @@ -231,7 +231,11 @@ class TerminationException #else +#if LIBMESH_IN_DEVICE_CODE +#define LIBMESH_THROW(e) do { LIBMESH_DEVICE_ERROR_MSG((e).what()); } while (0) +#else #define LIBMESH_THROW(e) do { libMesh::err << e.what(); libMesh::libmesh_abort(); } while (0) +#endif #define libmesh_rethrow #define libmesh_try #define libmesh_catch(e) if (0) diff --git a/include/numerics/type_tensor.h b/include/numerics/type_tensor.h index ac6dc14542..04f4b5bad8 100644 --- a/include/numerics/type_tensor.h +++ b/include/numerics/type_tensor.h @@ -756,8 +756,8 @@ T & TypeTensor::operator () (const unsigned int i, { #if LIBMESH_DIM < 3 - LIBMESH_DEVICE_ERROR_MSG_IF(i >= LIBMESH_DIM || j >= LIBMESH_DIM, - "ERROR: You are assigning to a tensor component that is out of range for the compiled LIBMESH_DIM!"); + libmesh_error_msg_if(i >= LIBMESH_DIM || j >= LIBMESH_DIM, + "ERROR: You are assigning to a tensor component that is out of range for the compiled LIBMESH_DIM!"); #endif From cfd9747288cfb27fe145bd3cde3af1c849c04a2c Mon Sep 17 00:00:00 2001 From: rochi00 Date: Mon, 18 May 2026 09:44:04 -0600 Subject: [PATCH 20/41] Compact Kokkos numerics operator shims --- include/gpu/kokkos_tensor_ops.h | 227 +++++++++++++------------------- include/gpu/kokkos_vector_ops.h | 225 +++++++++++++++---------------- 2 files changed, 197 insertions(+), 255 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 71926b92b1..783cea91b6 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -42,20 +42,17 @@ ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) return out; } -template -LIBMESH_DEVICE_INLINE -ResultTensor copy_tensor(const TensorLike & T_in) -{ - return materialize_tensor(T_in); -} - -template ::value, int>::type = 0> +template LIBMESH_DEVICE_INLINE -tensor_semantic_type_t copy_tensor(const TensorLike & T_in) +auto copy_tensor(const TensorLike & T_in) + -> std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor> { - return copy_tensor>(T_in); + using output_type = std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>; + return materialize_tensor(T_in); } namespace detail @@ -297,71 +294,13 @@ void update_tensor_components(LeftTensor & left, const RightTensor & right, cons factor * tensor_get_component(right, row, col)); } -template -LIBMESH_DEVICE_INLINE -ResultTensor combine_tensors(const ScalarA & alpha, - const TensorA & A, - const ScalarB & beta, - const TensorB & B) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - alpha * tensor_get_component(A, row, col) + - beta * tensor_get_component(B, row, col)); - - return out; -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor scale_tensor(const Scalar & alpha, const TensorLike & T_in) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, alpha * tensor_get_component(T_in, row, col)); - - return out; -} - -template -LIBMESH_DEVICE_INLINE -ResultTensor divide_tensor(const TensorLike & T_in, const Scalar & alpha) -{ - ResultTensor out; - out.zero(); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, row, col) / alpha); - - return out; -} - -template +template LIBMESH_DEVICE_INLINE -void scale_tensor_components(TensorLike & T_in, const Scalar & alpha) +void transform_tensor_components(OutputTensor & out, const InputTensor & in, const TransformOp & op) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) * alpha); -} - -template -LIBMESH_DEVICE_INLINE -void divide_tensor_components(TensorLike & T_in, const Scalar & alpha) -{ - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(T_in, row, col, tensor_get_component(T_in, row, col) / alpha); + tensor_set_component(out, row, col, op(tensor_get_component(in, row, col))); } // Tensor reductions and predicates @@ -473,37 +412,32 @@ auto is_zero(const TensorLike & T_in) return detail::tensor_is_zero(T_in); } -template -LIBMESH_DEVICE_INLINE -auto outer_product(const LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v, ResultTensor> -{ - return detail::outer_product(left, right); -} - -template +template LIBMESH_DEVICE_INLINE auto outer_product(const LeftVector & left, const RightVector & right) -> std::enable_if_t && is_vector_like_v, - libMesh::TypeTensor>> -{ - return outer_product>>(left, right); -} - -template -LIBMESH_DEVICE_INLINE -auto transpose(const TensorLike & T_in) - -> std::enable_if_t, ResultTensor> + std::conditional_t::value, + libMesh::TypeTensor>, + ResultTensor>> { - return detail::transpose(T_in); + using output_type = std::conditional_t::value, + libMesh::TypeTensor>, + ResultTensor>; + return detail::outer_product(left, right); } -template +template LIBMESH_DEVICE_INLINE auto transpose(const TensorLike & T_in) - -> std::enable_if_t, tensor_semantic_type_t> + -> std::enable_if_t, + std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>> { - return transpose>(T_in); + using output_type = std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>; + return detail::transpose(T_in); } template @@ -514,53 +448,61 @@ auto det(const TensorLike & T_in) return T_in.det(); } -template -LIBMESH_DEVICE_INLINE -auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) - -> std::enable_if_t, ResultTensor> -{ - return detail::inverse(T_in, dim); -} - -template +template LIBMESH_DEVICE_INLINE auto inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) - -> std::enable_if_t, tensor_semantic_type_t> + -> std::enable_if_t, + std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>> { - return inverse>(T_in, dim); + using output_type = std::conditional_t::value, + tensor_semantic_type_t, + ResultTensor>; + return detail::inverse(T_in, dim); } -template +template LIBMESH_DEVICE_INLINE auto row(const TensorLike & T_in, const unsigned int i) - -> std::enable_if_t, ResultVector> + -> std::enable_if_t, + std::conditional_t::value, + libMesh::TypeVector>, + ResultVector>> { - return detail::row(T_in, i); + using output_type = std::conditional_t::value, + libMesh::TypeVector>, + ResultVector>; + return detail::row(T_in, i); } -template +template LIBMESH_DEVICE_INLINE -auto row(const TensorLike & T_in, const unsigned int i) - -> std::enable_if_t, libMesh::TypeVector>> +auto column(const TensorLike & T_in, const unsigned int i) + -> std::enable_if_t, + std::conditional_t::value, + libMesh::TypeVector>, + ResultVector>> { - return row>>(T_in, i); + using output_type = std::conditional_t::value, + libMesh::TypeVector>, + ResultVector>; + return detail::column(T_in, i); } -template +template LIBMESH_DEVICE_INLINE -auto column(const TensorLike & T_in, const unsigned int i) - -> std::enable_if_t, ResultVector> -{ - return detail::column(T_in, i); -} +auto operator+=(LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + LeftTensor &>; -template +template LIBMESH_DEVICE_INLINE -auto column(const TensorLike & T_in, const unsigned int i) - -> std::enable_if_t, libMesh::TypeVector>> -{ - return column>>(T_in, i); -} +auto operator-=(LeftTensor & left, const RightTensor & right) + -> std::enable_if_t && is_tensor_like_v && + (is_tensor_ref_v || is_tensor_ref_v), + LeftTensor &>; template template @@ -575,7 +517,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::add(const RightTensor & right) { - detail::update_tensor_components(*this, right, value_type(1)); + libMesh::Kokkos::operator+=(*this, right); } template @@ -591,7 +533,7 @@ template LIBMESH_DEVICE_INLINE void tensor_ref::subtract(const RightTensor & right) { - detail::update_tensor_components(*this, right, value_type(-1)); + libMesh::Kokkos::operator-=(*this, right); } template @@ -707,7 +649,12 @@ auto operator-(const TensorLike & T_in) -> std::enable_if_t && is_tensor_ref_v, tensor_semantic_type_t> { - return detail::scale_tensor>(tensor_value_type_t(-1), T_in); + auto out = copy_tensor>(T_in); + detail::transform_tensor_components( + out, + T_in, + detail::negate_value>{}); + return out; } template @@ -717,8 +664,9 @@ auto operator+(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::combine_tensors>( - tensor_value_type_t(1), left, tensor_value_type_t(1), right); + auto out = copy_tensor>(left); + out += right; + return out; } template @@ -728,8 +676,9 @@ auto operator-(const LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), tensor_semantic_type_t> { - return detail::combine_tensors>( - tensor_value_type_t(1), left, tensor_value_type_t(-1), right); + auto out = copy_tensor>(left); + out -= right; + return out; } template >(alpha, T_in); + return T_in * alpha; } template >(alpha, T_in); + auto out = copy_tensor>(T_in); + detail::transform_tensor_components(out, T_in, detail::scale_value{alpha}); + return out; } template @@ -761,7 +712,9 @@ auto operator/(const TensorLike & T_in, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, tensor_semantic_type_t> { - return detail::divide_tensor>(T_in, alpha); + auto out = copy_tensor>(T_in); + detail::transform_tensor_components(out, T_in, detail::divide_value{alpha}); + return out; } template && !is_tensor_like_v, LeftTensor &> { - detail::scale_tensor_components(left, alpha); + detail::transform_tensor_components(left, left, detail::scale_value{alpha}); return left; } @@ -862,7 +815,7 @@ auto operator/=(LeftTensor & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftTensor &> { - detail::divide_tensor_components(left, alpha); + detail::transform_tensor_components(left, left, detail::divide_value{alpha}); return left; } diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 2c68a0341f..f5f99adaa6 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -28,20 +28,17 @@ ResultVector zero_vector_value() return out; } -template +template LIBMESH_DEVICE_INLINE -ResultVector copy_vector(const VectorLike & v) +auto copy_vector(const VectorLike & v) + -> std::conditional_t::value, + vector_semantic_type_t, + ResultVector> { - return materialize_vector(v); -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t copy_vector(const VectorLike & v) -{ - return copy_vector>(v); + using output_type = std::conditional_t::value, + vector_semantic_type_t, + ResultVector>; + return materialize_vector(v); } namespace detail @@ -74,89 +71,61 @@ void update_vector_components(LeftVector & left, const RightVector & right, cons factor * vector_get_component(right, component)); } -template +template LIBMESH_DEVICE_INLINE -ResultVector linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b) +void transform_vector_components(OutputVector & out, const InputVector & in, const TransformOp & op) { - ResultVector out; - out.zero(); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - alpha * vector_get_component(a, component) + - beta * vector_get_component(b, component)); - - return out; + vector_set_component(out, component, op(vector_get_component(in, component))); } -template -LIBMESH_DEVICE_INLINE -ResultVector linear_combination(const ScalarA & alpha, - const VectorA & a, - const ScalarB & beta, - const VectorB & b, - const ScalarC & gamma, - const VectorC & c) +template +struct negate_value { - ResultVector out; - out.zero(); + LIBMESH_DEVICE_INLINE + auto operator()(const ValueType & value) const + { + return -value; + } +}; - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, - component, - alpha * vector_get_component(a, component) + - beta * vector_get_component(b, component) + - gamma * vector_get_component(c, component)); - - return out; -} - -template -LIBMESH_DEVICE_INLINE -ResultVector scale_vector(const Scalar & alpha, const VectorLike & v) +template +struct scale_value { - ResultVector out; - out.zero(); + const Scalar & alpha; - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, alpha * vector_get_component(v, component)); + LIBMESH_DEVICE_INLINE + auto operator()(const Scalar & value) const -> decltype(value * alpha) + { + return value * alpha; + } - return out; -} + template + LIBMESH_DEVICE_INLINE + auto operator()(const ValueType & value) const -> decltype(value * alpha) + { + return value * alpha; + } +}; -template -LIBMESH_DEVICE_INLINE -ResultVector divide_vector(const VectorLike & v, const Scalar & alpha) +template +struct divide_value { - ResultVector out; - out.zero(); + const Scalar & alpha; - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, vector_get_component(v, component) / alpha); + LIBMESH_DEVICE_INLINE + auto operator()(const Scalar & value) const -> decltype(value / alpha) + { + return value / alpha; + } - return out; -} - -template -LIBMESH_DEVICE_INLINE -void scale_vector_components(VectorLike & v, const Scalar & alpha) -{ - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(v, component, vector_get_component(v, component) * alpha); -} - -template -LIBMESH_DEVICE_INLINE -void divide_vector_components(VectorLike & v, const Scalar & alpha) -{ - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(v, component, vector_get_component(v, component) / alpha); -} + template + LIBMESH_DEVICE_INLINE + auto operator()(const ValueType & value) const -> decltype(value / alpha) + { + return value / alpha; + } +}; } // namespace detail @@ -231,31 +200,36 @@ bool vector_is_zero(const VectorLike & v) return true; } -template +template LIBMESH_DEVICE_INLINE -ResultVector vector_unit(const VectorLike & v) +auto vector_unit(const VectorLike & v) + -> std::conditional_t::value, + vector_semantic_type_t, + ResultVector> { const auto length = vector_norm(v); libmesh_assert_not_equal_to(length, static_cast(0.)); - return detail::divide_vector(v, length); -} - -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_unit(const VectorLike & v) -{ - return vector_unit>(v); + using output_type = std::conditional_t::value, + vector_semantic_type_t, + ResultVector>; + auto out = copy_vector(v); + detail::transform_vector_components(out, v, detail::divide_value{length}); + return out; } // Geometry -template +template LIBMESH_DEVICE_INLINE -ResultVector vector_cross(const LeftVector & left, const RightVector & right) +auto vector_cross(const LeftVector & left, const RightVector & right) + -> std::conditional_t::value, + vector_semantic_type_t, + ResultVector> { - ResultVector out; + using output_type = std::conditional_t::value, + vector_semantic_type_t, + ResultVector>; + output_type out; out.zero(); #if LIBMESH_DIM == 3 @@ -279,16 +253,6 @@ ResultVector vector_cross(const LeftVector & left, const RightVector & right) return out; } -template ::value, int>::type = 0> -LIBMESH_DEVICE_INLINE -vector_semantic_type_t vector_cross(const LeftVector & left, const RightVector & right) -{ - return vector_cross>(left, right); -} - template LIBMESH_DEVICE_INLINE auto vector_triple_product(const LeftVector & left, @@ -385,6 +349,20 @@ auto is_zero(const VectorLike & v) return vector_is_zero(v); } +template +LIBMESH_DEVICE_INLINE +auto operator+=(LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + LeftVector &>; + +template +LIBMESH_DEVICE_INLINE +auto operator-=(LeftVector & left, const RightVector & right) + -> std::enable_if_t && is_vector_like_v && + (is_vector_ref_v || is_vector_ref_v), + LeftVector &>; + template template LIBMESH_DEVICE_INLINE @@ -398,7 +376,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::add(const RightVector & right) { - detail::update_vector_components(*this, right, value_type(1)); + libMesh::Kokkos::operator+=(*this, right); } template @@ -414,7 +392,7 @@ template LIBMESH_DEVICE_INLINE void vector_ref::subtract(const RightVector & right) { - detail::update_vector_components(*this, right, value_type(-1)); + libMesh::Kokkos::operator-=(*this, right); } template @@ -491,7 +469,12 @@ auto operator-(const VectorLike & v) -> std::enable_if_t && is_vector_ref_v, vector_semantic_type_t> { - return detail::scale_vector>(vector_value_type_t(-1), v); + auto out = copy_vector>(v); + detail::transform_vector_components( + out, + v, + detail::negate_value>{}); + return out; } template @@ -501,8 +484,9 @@ auto operator+(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), vector_semantic_type_t> { - return detail::linear_combination>( - vector_value_type_t(1), left, vector_value_type_t(1), right); + auto out = copy_vector>(left); + out += right; + return out; } template @@ -512,8 +496,9 @@ auto operator-(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), vector_semantic_type_t> { - return detail::linear_combination>( - vector_value_type_t(1), left, vector_value_type_t(-1), right); + auto out = copy_vector>(left); + out -= right; + return out; } template >(alpha, v); + return v * alpha; } template >(alpha, v); + auto out = copy_vector>(v); + detail::transform_vector_components(out, v, detail::scale_value{alpha}); + return out; } template >(v, alpha); + auto out = copy_vector>(v); + detail::transform_vector_components(out, v, detail::divide_value{alpha}); + return out; } template @@ -613,7 +602,7 @@ auto operator*=(LeftVector & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftVector &> { - detail::scale_vector_components(left, alpha); + detail::transform_vector_components(left, left, detail::scale_value{alpha}); return left; } @@ -624,7 +613,7 @@ auto operator/=(LeftVector & left, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, LeftVector &> { - detail::divide_vector_components(left, alpha); + detail::transform_vector_components(left, left, detail::divide_value{alpha}); return left; } From b637b0ee9311a19202d877fc73d87fc72795a6a9 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 28 May 2026 16:11:02 -0500 Subject: [PATCH 21/41] More explanation on not requesting GNU extensions With Kokkos we may have device compilers that can't handle them. --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index acc7b706db..6506d01bcf 100644 --- a/configure.ac +++ b/configure.ac @@ -174,6 +174,10 @@ AS_IF([test "x$enablemarch" != "xno"], # flag, for the current compiler, for the user's requested C++ # standards level. Adds the required flag to CXXFLAGS if # one is found. Exits if no acceptable flag is found. +# +# Don't turn on GNU extensions. We don't use them, and with device +# computing we might be using a mix of compilers that don't all +# support them. # -------------------------------------------------------------- ACSM_CXX_COMPILER_STANDARD([2017], [2017], [defaultnoext]) From 78538a032e872900f7898e4c15807ef7c10843af Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Fri, 29 May 2026 13:45:32 -0500 Subject: [PATCH 22/41] We can run Kokkos tests with Kokkos w/o CppUnit --- Makefile.am | 2 +- m4/libmesh_optional_packages.m4 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index dd0ad2ec2a..e7cadb9900 100644 --- a/Makefile.am +++ b/Makefile.am @@ -310,7 +310,7 @@ endif # Make sure we build the library before we test it SUBDIRS += . -if LIBMESH_ENABLE_CPPUNIT +if LIBMESH_ENABLE_TESTS_DIR SUBDIRS += tests endif diff --git a/m4/libmesh_optional_packages.m4 b/m4/libmesh_optional_packages.m4 index e99fe1781a..abf765e7ce 100644 --- a/m4/libmesh_optional_packages.m4 +++ b/m4/libmesh_optional_packages.m4 @@ -876,6 +876,10 @@ AS_IF([test "x$enablekokkos" != "xno"], AM_CONDITIONAL(LIBMESH_ENABLE_KOKKOS, test x$enablekokkos = xyes) # ------------------------------------------------------------- +# ------------------------------------------------------------- +# With either CppUnit or Kokkos we'll have tests to run +# ------------------------------------------------------------- +AM_CONDITIONAL(LIBMESH_ENABLE_TESTS_DIR, test x$enablekokkos = xyes -o x$enablecppunit = xyes) AS_IF([test "$enableoptional" != no], From b3dfcf7373e0829d3a68bcd76e20aa5f801261f7 Mon Sep 17 00:00:00 2001 From: Rochishnu Chowdhury Date: Tue, 26 May 2026 20:37:33 -0600 Subject: [PATCH 23/41] Align Kokkos unit test naming --- tests/Makefile.am | 91 +++++++++++++------ ...nsor_ops_oracle_test.K => driver_kokkos.K} | 9 +- .../numerics/kokkos_vector_ops_oracle_test.K | 20 ---- 3 files changed, 70 insertions(+), 50 deletions(-) rename tests/{numerics/kokkos_tensor_ops_oracle_test.K => driver_kokkos.K} (53%) delete mode 100644 tests/numerics/kokkos_vector_ops_oracle_test.K diff --git a/tests/Makefile.am b/tests/Makefile.am index 78cf58c5e4..06f45a1f4a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -243,6 +243,13 @@ unit_tests_data = $(data) # Why isn't this working automatically? EXTRA_DIST = $(data) +kokkos_unit_test_sources = \ + numerics/kokkos_numerics_oracle_test_utils.h \ + numerics/kokkos_tensor_ops_oracle_fixtures.h \ + numerics/kokkos_tensor_ops_oracle_runners.h \ + numerics/kokkos_vector_ops_oracle_fixtures.h \ + numerics/kokkos_vector_ops_oracle_runners.h +EXTRA_DIST += $(kokkos_unit_test_sources) if LIBMESH_ENABLE_FPARSER unit_tests_sources += \ @@ -255,20 +262,19 @@ TESTS = if LIBMESH_ENABLE_KOKKOS KOKKOS_TEST_CPPFLAGS += -I$(top_srcdir)/include $(KOKKOS_CPPFLAGS) - check_PROGRAMS += kokkos_vector_ops_oracle_unit kokkos_tensor_ops_oracle_unit - TESTS += kokkos_vector_ops_oracle_unit kokkos_tensor_ops_oracle_unit - - kokkos_vector_ops_oracle_unit_SOURCES = numerics/kokkos_vector_ops_oracle_test.K - kokkos_vector_ops_oracle_unit_CPPFLAGS = $(AM_CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) - kokkos_vector_ops_oracle_unit_CXXFLAGS = $(AM_CXXFLAGS) $(KOKKOS_CXXFLAGS) - kokkos_vector_ops_oracle_unit_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) - kokkos_vector_ops_oracle_unit_LDADD = $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) +if LIBMESH_DBG_MODE + check_PROGRAMS += unit_tests-kokkos-dbg + TESTS += unit_tests-kokkos-dbg + unit_tests_kokkos_dbg_SOURCES = + EXTRA_unit_tests_kokkos_dbg_SOURCES = driver_kokkos.K +endif - kokkos_tensor_ops_oracle_unit_SOURCES = numerics/kokkos_tensor_ops_oracle_test.K - kokkos_tensor_ops_oracle_unit_CPPFLAGS = $(AM_CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) - kokkos_tensor_ops_oracle_unit_CXXFLAGS = $(AM_CXXFLAGS) $(KOKKOS_CXXFLAGS) - kokkos_tensor_ops_oracle_unit_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) - kokkos_tensor_ops_oracle_unit_LDADD = $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) +if LIBMESH_OPT_MODE + check_PROGRAMS += unit_tests-kokkos-opt + TESTS += unit_tests-kokkos-opt + unit_tests_kokkos_opt_SOURCES = + EXTRA_unit_tests_kokkos_opt_SOURCES = driver_kokkos.K +endif endif # our GLIBC debugging preprocessor flags seem to potentially conflict @@ -383,24 +389,52 @@ if LIBMESH_ENABLE_CPPUNIT TESTS += run_unit_tests.sh endif -# Compile .K translation units with the Kokkos device compiler. -# If KOKKOS_CXX is not the MPI wrapper, configure populates -# $(KOKKOS_MPI_CPPFLAGS) from the wrapper's compile flags so mpi.h and -# any wrapper-provided defines remain visible. -.K.o: +if LIBMESH_ENABLE_KOKKOS +driver_kokkos_src = driver_kokkos.K +unit_tests_kokkos_dbg_object = unit_tests_kokkos_dbg-driver_kokkos.$(OBJEXT) +unit_tests_kokkos_opt_object = unit_tests_kokkos_opt-driver_kokkos.$(OBJEXT) +unit_tests_kokkos_dbg_depfile = $(DEPDIR)/unit_tests_kokkos_dbg-driver_kokkos.d +unit_tests_kokkos_opt_depfile = $(DEPDIR)/unit_tests_kokkos_opt-driver_kokkos.d +kokkos_unit_test_depfiles = $(unit_tests_kokkos_dbg_depfile) $(unit_tests_kokkos_opt_depfile) +kokkos_unit_test_cleanfiles = $(unit_tests_kokkos_dbg_object) $(unit_tests_kokkos_opt_object) \ + $(kokkos_unit_test_depfiles) \ + unit_tests-kokkos-dbg$(EXEEXT) unit_tests-kokkos-opt$(EXEEXT) + +# Build the Kokkos tests with the same mode-suffixed naming as the +# original libMesh unit test executables, while still compiling with +# the Kokkos device compiler and mode-specific flags. +$(unit_tests_kokkos_dbg_object): $(driver_kokkos_src) + @$(MKDIR_P) $(DEPDIR) $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(KOKKOS_MPI_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ + $(KOKKOS_MPI_CPPFLAGS) $(CPPFLAGS_DBG) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS_DBG) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ + -MMD -MP -MF $(unit_tests_kokkos_dbg_depfile) \ -c $< -o $@ -# Custom link rules so the Kokkos compiler drives the final link step. -kokkos_vector_ops_oracle_unit_LINK = \ - $(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ - $(LDFLAGS) $(kokkos_vector_ops_oracle_unit_LDFLAGS) -o $@ +$(unit_tests_kokkos_opt_object): $(driver_kokkos_src) + @$(MKDIR_P) $(DEPDIR) + $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(KOKKOS_MPI_CPPFLAGS) $(CPPFLAGS_OPT) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS_OPT) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ + -MMD -MP -MF $(unit_tests_kokkos_opt_depfile) \ + -c $< -o $@ -kokkos_tensor_ops_oracle_unit_LINK = \ - $(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ - $(LDFLAGS) $(kokkos_tensor_ops_oracle_unit_LDFLAGS) -o $@ +unit_tests-kokkos-dbg$(EXEEXT): $(unit_tests_kokkos_dbg_object) $(top_builddir)/libmesh_dbg.la + @rm -f $@ + $(AM_V_GEN)$(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ + $(LDFLAGS) $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) -o $@ \ + $(unit_tests_kokkos_dbg_object) \ + $(top_builddir)/libmesh_dbg.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) $(LIBS) + +unit_tests-kokkos-opt$(EXEEXT): $(unit_tests_kokkos_opt_object) $(top_builddir)/libmesh_opt.la + @rm -f $@ + $(AM_V_GEN)$(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ + $(LDFLAGS) $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) -o $@ \ + $(unit_tests_kokkos_opt_object) \ + $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) $(LIBS) + +-include $(kokkos_unit_test_depfiles) +endif CLEANFILES = cube_mesh.xda \ slit_mesh.xda \ @@ -483,7 +517,8 @@ CLEANFILES = cube_mesh.xda \ write_exodus_TRI6.e \ write_exodus_TRI7.e \ write_exodus_TRISHELL3.e \ - smoother.out + smoother.out \ + $(kokkos_unit_test_cleanfiles) # need to link any data files for VPATH builds if LIBMESH_VPATH_BUILD diff --git a/tests/numerics/kokkos_tensor_ops_oracle_test.K b/tests/driver_kokkos.K similarity index 53% rename from tests/numerics/kokkos_tensor_ops_oracle_test.K rename to tests/driver_kokkos.K index 858d477369..e9e22cd54b 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_test.K +++ b/tests/driver_kokkos.K @@ -1,5 +1,8 @@ #include "libmesh/libmesh_config.h" -#include "kokkos_tensor_ops_oracle_runners.h" +#include "numerics/kokkos_tensor_ops_oracle_runners.h" +#include "numerics/kokkos_vector_ops_oracle_runners.h" + +#include int main(int argc, char ** argv) @@ -7,7 +10,9 @@ main(int argc, char ** argv) Kokkos::initialize(argc, argv); libMesh::LibMeshInit init(argc, argv); - const int total_fail = libMeshTest::KokkosTensorOracle::run_all_oracles(); + int total_fail = 0; + total_fail += libMeshTest::KokkosVectorOracle::run_all_oracles(); + total_fail += libMeshTest::KokkosTensorOracle::run_all_oracles(); Kokkos::finalize(); diff --git a/tests/numerics/kokkos_vector_ops_oracle_test.K b/tests/numerics/kokkos_vector_ops_oracle_test.K deleted file mode 100644 index fedc7651ff..0000000000 --- a/tests/numerics/kokkos_vector_ops_oracle_test.K +++ /dev/null @@ -1,20 +0,0 @@ -#include "libmesh/libmesh_config.h" -#include "kokkos_vector_ops_oracle_runners.h" - -int -main(int argc, char ** argv) -{ - Kokkos::initialize(argc, argv); - libMesh::LibMeshInit init(argc, argv); - - const int total_fail = libMeshTest::KokkosVectorOracle::run_all_oracles(); - - Kokkos::finalize(); - - if (total_fail == 0) - std::printf("ALL TESTS PASSED\n"); - else - std::printf("%d TEST(S) FAILED\n", total_fail); - - return total_fail ? 1 : 0; -} From 3b1ff6efa6809b86607bcbc7254d8cb9e93f7614 Mon Sep 17 00:00:00 2001 From: Rochishnu Chowdhury Date: Tue, 9 Jun 2026 17:13:58 -0600 Subject: [PATCH 24/41] Consolidate Kokkos numerics operator helpers --- include/gpu/kokkos_tensor_ops.h | 82 +++++++++++++++--------- include/gpu/kokkos_vector_ops.h | 109 +++++++++++++++++++------------- 2 files changed, 118 insertions(+), 73 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 783cea91b6..940e7edb41 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -58,6 +58,9 @@ auto copy_tensor(const TensorLike & T_in) namespace detail { +// These helpers are shared by the public functions and ref operators so +// Kokkos-backed refs use direct component access without extra materialization. + template LIBMESH_DEVICE_INLINE auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) @@ -182,6 +185,8 @@ ResultTensor transpose(const TensorLike & T_in) return out; } +// Tensor/tensor product operators delegate here for the same direct-access path. + template LIBMESH_DEVICE_INLINE ResultTensor multiply_tensors(const LeftTensor & left, const RightTensor & right) @@ -227,6 +232,8 @@ ResultVector column(const TensorLike & T_in, const unsigned int col_index) return out; } +// Tensor/vector and vector/tensor product operators keep the direct-access path too. + template LIBMESH_DEVICE_INLINE ResultVector multiply_tensor_vector(const TensorLike & T_in, const VectorLike & v) @@ -303,6 +310,28 @@ void transform_tensor_components(OutputTensor & out, const InputTensor & in, con tensor_set_component(out, row, col, op(tensor_get_component(in, row, col))); } +template +LIBMESH_DEVICE_INLINE +ResultTensor transformed_tensor(const TensorLike & T_in, const TransformOp & op) +{ + ResultTensor out; + out.zero(); + transform_tensor_components(out, T_in, op); + return out; +} + +template +LIBMESH_DEVICE_INLINE +bool tensor_equal_impl(const LeftTensor & left, const RightTensor & right) +{ + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) + return false; + + return true; +} + // Tensor reductions and predicates template @@ -379,35 +408,36 @@ bool tensor_is_zero(const TensorLike & T_in) // libMesh-like convenience wrappers -template +template && is_tensor_like_v, + int>::type = 0> LIBMESH_DEVICE_INLINE auto contract(const LeftTensor & left, const RightTensor & right) - -> std::enable_if_t && is_tensor_like_v, - decltype(detail::tensor_contract(left, right))> { return detail::tensor_contract(left, right); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE auto norm_sq(const TensorLike & T_in) - -> std::enable_if_t, decltype(detail::tensor_norm_sq(T_in))> { return detail::tensor_norm_sq(T_in); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE auto norm(const TensorLike & T_in) - -> std::enable_if_t, decltype(detail::tensor_norm(T_in))> { return detail::tensor_norm(T_in); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE -auto is_zero(const TensorLike & T_in) - -> std::enable_if_t, bool> +bool is_zero(const TensorLike & T_in) { return detail::tensor_is_zero(T_in); } @@ -556,28 +586,28 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::contract(const RightTensor & right) const { - return detail::tensor_contract(*this, right); + return libMesh::Kokkos::contract(*this, right); } template LIBMESH_DEVICE_INLINE auto tensor_ref::norm() const { - return detail::tensor_norm(*this); + return libMesh::Kokkos::norm(*this); } template LIBMESH_DEVICE_INLINE auto tensor_ref::norm_sq() const { - return detail::tensor_norm_sq(*this); + return libMesh::Kokkos::norm_sq(*this); } template LIBMESH_DEVICE_INLINE bool tensor_ref::is_zero() const { - return detail::tensor_is_zero(*this); + return libMesh::Kokkos::is_zero(*this); } template @@ -649,12 +679,9 @@ auto operator-(const TensorLike & T_in) -> std::enable_if_t && is_tensor_ref_v, tensor_semantic_type_t> { - auto out = copy_tensor>(T_in); - detail::transform_tensor_components( - out, + return detail::transformed_tensor>( T_in, detail::negate_value>{}); - return out; } template @@ -700,9 +727,9 @@ template >(T_in); - detail::transform_tensor_components(out, T_in, detail::scale_value{alpha}); - return out; + return detail::transformed_tensor>( + T_in, + detail::scale_value{alpha}); } template @@ -712,9 +739,9 @@ auto operator/(const TensorLike & T_in, const Scalar & alpha) !is_vector_like_v && !is_tensor_like_v, tensor_semantic_type_t> { - auto out = copy_tensor>(T_in); - detail::transform_tensor_components(out, T_in, detail::divide_value{alpha}); - return out; + return detail::transformed_tensor>( + T_in, + detail::divide_value{alpha}); } template || is_tensor_ref_v), bool> { - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) - return false; - - return true; + return detail::tensor_equal_impl(left, right); } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index f5f99adaa6..96b1e923e2 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -44,6 +44,26 @@ auto copy_vector(const VectorLike & v) namespace detail { +// These helpers are shared by the public functions and ref operators so +// Kokkos-backed refs use direct component access without extra materialization. + +template +LIBMESH_DEVICE_INLINE +auto vector_dot_impl(const LeftVector & left, const RightVector & right) +{ + static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); + static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); + + using sum_type = + detail::remove_cvref_t; + + sum_type sum = sum_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += vector_get_component(left, component) * vector_get_component(right, component); + + return sum; +} + template LIBMESH_DEVICE_INLINE void assign_vector_components(LeftVector & left, const RightVector & right) @@ -79,6 +99,27 @@ void transform_vector_components(OutputVector & out, const InputVector & in, con vector_set_component(out, component, op(vector_get_component(in, component))); } +template +LIBMESH_DEVICE_INLINE +ResultVector transformed_vector(const VectorLike & v, const TransformOp & op) +{ + ResultVector out; + out.zero(); + transform_vector_components(out, v, op); + return out; +} + +template +LIBMESH_DEVICE_INLINE +bool vector_equal_impl(const LeftVector & left, const RightVector & right) +{ + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if (vector_get_component(left, component) != vector_get_component(right, component)) + return false; + + return true; +} + template struct negate_value { @@ -135,17 +176,7 @@ template LIBMESH_DEVICE_INLINE auto vector_dot(const LeftVector & left, const RightVector & right) { - static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); - static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); - - using sum_type = - detail::remove_cvref_t; - - sum_type sum = sum_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += vector_get_component(left, component) * vector_get_component(right, component); - - return sum; + return detail::vector_dot_impl(left, right); } template @@ -212,9 +243,7 @@ auto vector_unit(const VectorLike & v) using output_type = std::conditional_t::value, vector_semantic_type_t, ResultVector>; - auto out = copy_vector(v); - detail::transform_vector_components(out, v, detail::divide_value{length}); - return out; + return detail::transformed_vector(v, detail::divide_value{length}); } // Geometry @@ -316,35 +345,36 @@ auto vector_solid_angle(const VectorA & v01, const VectorB & v02, const VectorC // libMesh-like convenience wrappers -template +template && is_vector_like_v, + int>::type = 0> LIBMESH_DEVICE_INLINE auto contract(const LeftVector & left, const RightVector & right) - -> std::enable_if_t && is_vector_like_v, - decltype(vector_dot(left, right))> { return vector_dot(left, right); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE auto norm_sq(const VectorLike & v) - -> std::enable_if_t, decltype(vector_norm_sq(v))> { return vector_norm_sq(v); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE auto norm(const VectorLike & v) - -> std::enable_if_t, decltype(vector_norm(v))> { return vector_norm(v); } -template +template , int>::type = 0> LIBMESH_DEVICE_INLINE -auto is_zero(const VectorLike & v) - -> std::enable_if_t, bool> +bool is_zero(const VectorLike & v) { return vector_is_zero(v); } @@ -415,21 +445,21 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::contract(const RightVector & right) const { - return vector_dot(*this, right); + return libMesh::Kokkos::contract(*this, right); } template LIBMESH_DEVICE_INLINE auto vector_ref::norm() const { - return vector_norm(*this); + return libMesh::Kokkos::norm(*this); } template LIBMESH_DEVICE_INLINE auto vector_ref::norm_sq() const { - return vector_norm_sq(*this); + return libMesh::Kokkos::norm_sq(*this); } template @@ -443,7 +473,7 @@ template LIBMESH_DEVICE_INLINE bool vector_ref::is_zero() const { - return vector_is_zero(*this); + return libMesh::Kokkos::is_zero(*this); } template @@ -469,12 +499,9 @@ auto operator-(const VectorLike & v) -> std::enable_if_t && is_vector_ref_v, vector_semantic_type_t> { - auto out = copy_vector>(v); - detail::transform_vector_components( - out, + return detail::transformed_vector>( v, detail::negate_value>{}); - return out; } template @@ -531,9 +558,9 @@ template >(v); - detail::transform_vector_components(out, v, detail::scale_value{alpha}); - return out; + return detail::transformed_vector>( + v, + detail::scale_value{alpha}); } template >(v); - detail::transform_vector_components(out, v, detail::divide_value{alpha}); - return out; + return detail::transformed_vector>( + v, + detail::divide_value{alpha}); } template @@ -556,11 +583,7 @@ auto operator==(const LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), bool> { - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (vector_get_component(left, component) != vector_get_component(right, component)) - return false; - - return true; + return detail::vector_equal_impl(left, right); } template From febca7f12da26845997a65c1d1ff8a1420a68141 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 14:16:39 -0500 Subject: [PATCH 25/41] Re-bootstrap --- Makefile.in | 13 +- aclocal.m4 | 1 + configure | 898 +++++++++++++++++- contrib/Makefile.in | 11 + contrib/capnproto/Makefile.in | 11 + contrib/eigen/gitshim/Makefile.in | 11 + contrib/exodusii/5.22b/exodus/Makefile.in | 11 + contrib/exodusii/5.22b/nemesis/Makefile.in | 11 + contrib/exodusii/Lib/Makefile.in | 11 + contrib/exodusii/v8.11/exodus/Makefile.in | 11 + contrib/exodusii/v8.11/nemesis/Makefile.in | 11 + contrib/fparser/Makefile.in | 11 + contrib/fparser/extrasrc/Makefile.in | 11 + contrib/gmv/Makefile.in | 11 + contrib/gzstream/Makefile.in | 11 + contrib/laspack/Makefile.in | 11 + contrib/libHilbert/Makefile.in | 11 + contrib/metis/Makefile.in | 11 + contrib/nanoflann/Makefile.in | 11 + contrib/nemesis/Lib/Makefile.in | 11 + contrib/netgen/Makefile.in | 11 + contrib/parmetis/Makefile.in | 11 + contrib/poly2tri/modified/Makefile.in | 11 + contrib/qhull/Makefile.in | 11 + contrib/sfcurves/Makefile.in | 11 + contrib/tecplot/binary/Makefile.in | 11 + contrib/tecplot/tecio/Makefile.in | 11 + contrib/tetgen/Makefile.in | 11 + contrib/triangle/Makefile.in | 11 + doc/Makefile.in | 11 + doc/html/Makefile.in | 11 + examples/Makefile.in | 11 + .../adaptivity/adaptivity_ex1/Makefile.in | 11 + .../adaptivity/adaptivity_ex2/Makefile.in | 11 + .../adaptivity/adaptivity_ex3/Makefile.in | 11 + .../adaptivity/adaptivity_ex4/Makefile.in | 11 + .../adaptivity/adaptivity_ex5/Makefile.in | 11 + examples/adjoints/adjoints_ex1/Makefile.in | 11 + examples/adjoints/adjoints_ex2/Makefile.in | 11 + examples/adjoints/adjoints_ex3/Makefile.in | 11 + examples/adjoints/adjoints_ex4/Makefile.in | 11 + examples/adjoints/adjoints_ex5/Makefile.in | 11 + examples/adjoints/adjoints_ex6/Makefile.in | 11 + examples/adjoints/adjoints_ex7/Makefile.in | 11 + .../eigenproblems_ex1/Makefile.in | 11 + .../eigenproblems_ex2/Makefile.in | 11 + .../eigenproblems_ex3/Makefile.in | 11 + .../eigenproblems_ex4/Makefile.in | 11 + .../fem_system/fem_system_ex1/Makefile.in | 11 + .../fem_system/fem_system_ex2/Makefile.in | 11 + .../fem_system/fem_system_ex3/Makefile.in | 11 + .../fem_system/fem_system_ex4/Makefile.in | 11 + .../fem_system/fem_system_ex5/Makefile.in | 11 + .../introduction/introduction_ex1/Makefile.in | 11 + .../introduction/introduction_ex2/Makefile.in | 11 + .../introduction/introduction_ex3/Makefile.in | 11 + .../introduction/introduction_ex4/Makefile.in | 11 + .../introduction/introduction_ex5/Makefile.in | 11 + .../miscellaneous_ex1/Makefile.in | 11 + .../miscellaneous_ex10/Makefile.in | 11 + .../miscellaneous_ex11/Makefile.in | 11 + .../miscellaneous_ex12/Makefile.in | 11 + .../miscellaneous_ex13/Makefile.in | 11 + .../miscellaneous_ex14/Makefile.in | 11 + .../miscellaneous_ex15/Makefile.in | 11 + .../miscellaneous_ex16/Makefile.in | 11 + .../miscellaneous_ex17/Makefile.in | 11 + .../miscellaneous_ex2/Makefile.in | 11 + .../miscellaneous_ex3/Makefile.in | 11 + .../miscellaneous_ex4/Makefile.in | 11 + .../miscellaneous_ex5/Makefile.in | 11 + .../miscellaneous_ex6/Makefile.in | 11 + .../miscellaneous_ex7/Makefile.in | 11 + .../miscellaneous_ex8/Makefile.in | 11 + .../miscellaneous_ex9/Makefile.in | 11 + .../optimization/optimization_ex1/Makefile.in | 11 + .../optimization/optimization_ex2/Makefile.in | 11 + .../reduced_basis_ex1/Makefile.in | 11 + .../reduced_basis_ex2/Makefile.in | 11 + .../reduced_basis_ex3/Makefile.in | 11 + .../reduced_basis_ex4/Makefile.in | 11 + .../reduced_basis_ex5/Makefile.in | 11 + .../reduced_basis_ex6/Makefile.in | 11 + .../reduced_basis_ex7/Makefile.in | 11 + .../solution_transfer_ex1/Makefile.in | 11 + .../subdomains/subdomains_ex1/Makefile.in | 11 + .../subdomains/subdomains_ex2/Makefile.in | 11 + .../subdomains/subdomains_ex3/Makefile.in | 11 + .../systems_of_equations_ex1/Makefile.in | 11 + .../systems_of_equations_ex2/Makefile.in | 11 + .../systems_of_equations_ex3/Makefile.in | 11 + .../systems_of_equations_ex4/Makefile.in | 11 + .../systems_of_equations_ex5/Makefile.in | 11 + .../systems_of_equations_ex6/Makefile.in | 11 + .../systems_of_equations_ex7/Makefile.in | 11 + .../systems_of_equations_ex8/Makefile.in | 11 + .../systems_of_equations_ex9/Makefile.in | 11 + examples/transient/transient_ex1/Makefile.in | 11 + examples/transient/transient_ex2/Makefile.in | 11 + examples/transient/transient_ex3/Makefile.in | 11 + examples/vector_fe/vector_fe_ex1/Makefile.in | 11 + examples/vector_fe/vector_fe_ex10/Makefile.in | 11 + examples/vector_fe/vector_fe_ex2/Makefile.in | 11 + examples/vector_fe/vector_fe_ex3/Makefile.in | 11 + examples/vector_fe/vector_fe_ex4/Makefile.in | 11 + examples/vector_fe/vector_fe_ex5/Makefile.in | 11 + examples/vector_fe/vector_fe_ex6/Makefile.in | 11 + examples/vector_fe/vector_fe_ex7/Makefile.in | 11 + examples/vector_fe/vector_fe_ex8/Makefile.in | 11 + examples/vector_fe/vector_fe_ex9/Makefile.in | 11 + include/Makefile.in | 17 + include/libmesh/Makefile.in | 42 +- tests/Makefile.in | 140 ++- 113 files changed, 2262 insertions(+), 26 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6d16369a4c..b914f63b80 100644 --- a/Makefile.in +++ b/Makefile.in @@ -114,7 +114,7 @@ target_triplet = @target@ @LIBMESH_OPT_MODE_TRUE@am__append_13 = libmesh_opt.la @LIBMESH_PROF_MODE_TRUE@am__append_14 = libmesh_prof.la @LIBMESH_OPROF_MODE_TRUE@am__append_15 = libmesh_oprof.la -@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_16 = tests +@LIBMESH_ENABLE_TESTS_DIR_TRUE@am__append_16 = tests bin_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_4) $(am__EXEEXT_6) \ $(am__EXEEXT_8) @LIBMESH_OPT_MODE_TRUE@am__append_17 = $(opt_programs) @@ -135,6 +135,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -7722,11 +7723,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -7774,6 +7784,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/aclocal.m4 b/aclocal.m4 index 7f0fee71c0..63650f6b04 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1357,6 +1357,7 @@ m4_include([m4/autoconf-submodule/acsm_compiler_flags.m4]) m4_include([m4/autoconf-submodule/acsm_cxx_compiler_standard.m4]) m4_include([m4/autoconf-submodule/acsm_enable_paranoid.m4]) m4_include([m4/autoconf-submodule/acsm_enable_werror.m4]) +m4_include([m4/autoconf-submodule/acsm_kokkos.m4]) m4_include([m4/autoconf-submodule/acsm_mpi.m4]) m4_include([m4/autoconf-submodule/acsm_precision.m4]) m4_include([m4/autoconf-submodule/acsm_scrape_petsc_configure.m4]) diff --git a/configure b/configure index 99949a222a..1828753dd7 100755 --- a/configure +++ b/configure @@ -672,6 +672,22 @@ libmesh_contrib_LDFLAGS libmesh_contrib_INCLUDES libmesh_optional_LIBS libmesh_optional_INCLUDES +LIBMESH_ENABLE_TESTS_DIR_FALSE +LIBMESH_ENABLE_TESTS_DIR_TRUE +LIBMESH_ENABLE_KOKKOS_FALSE +LIBMESH_ENABLE_KOKKOS_TRUE +ACSM_ENABLE_KOKKOS_FALSE +ACSM_ENABLE_KOKKOS_TRUE +KOKKOS_MPI_CPPFLAGS +KOKKOS_LIBS +KOKKOS_LDFLAGS +KOKKOS_CPPFLAGS +KOKKOS_CXX +KOKKOS_BACKEND +ICPX +HIPCC +NVCC +KOKKOS_CXXFLAGS LIBMESH_ENABLE_METAPHYSICL_FALSE LIBMESH_ENABLE_METAPHYSICL_TRUE METAPHYSICL_INCLUDE @@ -1352,6 +1368,11 @@ enable_metaphysicl with_metaphysicl with_metaphysicl_include enable_metaphysicl_required +with_kokkos +with_kokkos_include +with_kokkos_lib +with_kokkos_backend +enable_kokkos_required ' ac_precious_vars='build_alias host_alias @@ -1382,7 +1403,8 @@ VTK_INCLUDE VTK_DIR HDF5_DIR YACC -YFLAGS' +YFLAGS +KOKKOS_CXXFLAGS' # Initialize some variables set by options. @@ -2168,6 +2190,8 @@ Optional Features: --disable-metaphysicl build without MetaPhysicL support --enable-metaphysicl-required Error if MetaPhysicL is not detected by configure + --enable-kokkos-required + Error if Kokkos is not detected by configure Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -2279,6 +2303,13 @@ Optional Packages: internal: build from contrib --with-metaphysicl-include= + --with-kokkos=DIR Enable Kokkos support using the installation at DIR + --with-kokkos-include=DIR + Enable Kokkos support using the headers in DIR + --with-kokkos-lib=DIR Enable Kokkos support using the libraries in DIR + --with-kokkos-backend=BACKEND + cuda|hip|sycl|openmp|serial (default: auto-detect + from KokkosCore_config.h) Some influential environment variables: PETSC_DIR path to PETSc installation @@ -2319,6 +2350,8 @@ Some influential environment variables: YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of '-d' given by some make applications. + KOKKOS_CXXFLAGS + Extra C++ flags for compiling Kokkos sources Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -9235,6 +9268,10 @@ fi # flag, for the current compiler, for the user's requested C++ # standards level. Adds the required flag to CXXFLAGS if # one is found. Exits if no acceptable flag is found. +# +# Don't turn on GNU extensions. We don't use them, and with device +# computing we might be using a mix of compilers that don't all +# support them. # -------------------------------------------------------------- acsm_CXX_STD_MIN="2017" @@ -73169,6 +73206,848 @@ fi +# ------------------------------------------------------------- +# Kokkos -- enables the native Kokkos FE math path +# ------------------------------------------------------------- + + + + + + +# Check whether --with-kokkos was given. +if test ${with_kokkos+y} +then : + withval=$with_kokkos; KOKKOS_DIR="$withval" +else case e in #( + e) KOKKOS_DIR="no" ;; +esac +fi + + + +# Check whether --with-kokkos-include was given. +if test ${with_kokkos_include+y} +then : + withval=$with_kokkos_include; KOKKOS_INCLUDE_DIR="$withval" +else case e in #( + e) KOKKOS_INCLUDE_DIR="$KOKKOS_DIR/include" ;; +esac +fi + + + +# Check whether --with-kokkos-lib was given. +if test ${with_kokkos_lib+y} +then : + withval=$with_kokkos_lib; KOKKOS_LIB_DIR="$withval" +else case e in #( + e) KOKKOS_LIB_DIR="$KOKKOS_DIR/lib" ;; +esac +fi + + + +# Check whether --with-kokkos-backend was given. +if test ${with_kokkos_backend+y} +then : + withval=$with_kokkos_backend; KOKKOS_BACKEND="$withval" +else case e in #( + e) KOKKOS_BACKEND="auto" ;; +esac +fi + + + # Check whether --enable-kokkos-required was given. +if test ${enable_kokkos_required+y} +then : + enableval=$enable_kokkos_required; case "${enableval}" in #( + yes) : + kokkosrequired=yes ;; #( + no) : + kokkosrequired=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-kokkos-required" "$LINENO" 5 ;; +esac +else case e in #( + e) kokkosrequired=no ;; +esac +fi + + + + if test "x$KOKKOS_INCLUDE_DIR" != "xno/include" -a "x$KOKKOS_LIB_DIR" != "xno/lib" +then : + + KOKKOS_CPPFLAGS="${KOKKOS_CPPFLAGS:--DACSM_KOKKOS_COMPILATION -I$KOKKOS_INCLUDE_DIR}" + KOKKOS_LDFLAGS="${KOKKOS_LDFLAGS:--L$KOKKOS_LIB_DIR ${ACSM_RPATHFLAG}${KOKKOS_LIB_DIR}}" + KOKKOS_LIBS="${KOKKOS_LIBS:--lkokkoscore}" + + as_ac_File=`printf "%s\n" "ac_cv_file_$KOKKOS_INCLUDE_DIR/Kokkos_Core.hpp" | sed "$as_sed_sh"` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $KOKKOS_INCLUDE_DIR/Kokkos_Core.hpp" >&5 +printf %s "checking for $KOKKOS_INCLUDE_DIR/Kokkos_Core.hpp... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "$KOKKOS_INCLUDE_DIR/Kokkos_Core.hpp"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi ;; +esac +fi +eval ac_res=\$$as_ac_File + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : + + enablekokkos=yes + libmesh_optional_INCLUDES="$libmesh_optional_INCLUDES -I$KOKKOS_INCLUDE_DIR" + libmesh_optional_LIBS="$libmesh_optional_LIBS -L$KOKKOS_LIB_DIR -lkokkoscore" + + if test "x$KOKKOS_CXX" = "x" +then : + + KOKKOS_CFG="$KOKKOS_INCLUDE_DIR/KokkosCore_config.h" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in #( +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in #( +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + have_kokkos_openmp=no + if test -r "$KOKKOS_CFG" +then : + if grep -F -q '#define KOKKOS_ENABLE_OPENMP' "$KOKKOS_CFG" +then : + have_kokkos_openmp=yes +else case e in #( + e) have_kokkos_openmp=no ;; +esac +fi +fi + + if test "x$KOKKOS_BACKEND" = "xauto" +then : + + if test -r "$KOKKOS_CFG" +then : + + if grep -F -q '#define KOKKOS_ENABLE_CUDA' "$KOKKOS_CFG" +then : + KOKKOS_BACKEND=cuda +else case e in #( + e) if grep -F -q '#define KOKKOS_ENABLE_HIP' "$KOKKOS_CFG" +then : + KOKKOS_BACKEND=hip +else case e in #( + e) if grep -F -q '#define KOKKOS_ENABLE_SYCL' "$KOKKOS_CFG" +then : + KOKKOS_BACKEND=sycl +else case e in #( + e) if test "x$have_kokkos_openmp" = "xyes" +then : + KOKKOS_BACKEND=openmp +else case e in #( + e) KOKKOS_BACKEND=serial ;; +esac +fi ;; +esac +fi ;; +esac +fi ;; +esac +fi + +else case e in #( + e) KOKKOS_BACKEND=serial ;; +esac +fi + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Kokkos backend: $KOKKOS_BACKEND" >&5 +printf "%s\n" "Kokkos backend: $KOKKOS_BACKEND" >&6; } + + case "$KOKKOS_BACKEND" in + cuda) + # Extract the first word of "nvcc", so it can be a program name with args. +set dummy nvcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_NVCC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $NVCC in + [\\/]* | ?:[\\/]*) + ac_cv_path_NVCC="$NVCC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_NVCC="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_NVCC" && ac_cv_path_NVCC="no" + ;; +esac ;; +esac +fi +NVCC=$ac_cv_path_NVCC +if test -n "$NVCC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NVCC" >&5 +printf "%s\n" "$NVCC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + if test "x$NVCC" = "xno" +then : + as_fn_error $? "nvcc not found but Kokkos CUDA backend requested" "$LINENO" 5 +fi + KOKKOS_CXX="$NVCC" + KOKKOS_CXXFLAGS="--forward-unknown-to-host-compiler -x cu $KOKKOS_CXXFLAGS" + KOKKOS_LDFLAGS="--forward-unknown-to-host-compiler $KOKKOS_LDFLAGS" + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Parsing Kokkos defined architectures" >&5 +printf "%s\n" "$as_me: Parsing Kokkos defined architectures" >&6;} + ax_kokkos_arch_lines=`$GREP '^[[:space:]]*#define[[:space:]]\{1,\}KOKKOS_ARCH_[A-Za-z0-9_][A-Za-z0-9_]*' "$KOKKOS_CFG" \ + | $SED -n 's/.*KOKKOS_ARCH_\([A-Za-z0-9_][A-Za-z0-9_]*\).*/\1/p'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_kokkos_arch_lines" >&5 +printf "%s\n" "$ax_kokkos_arch_lines" >&6; } + + ax_cuda_sms= + for t in $ax_kokkos_arch_lines; do + case "$t" in + KEPLER30|KEPLER) ax_cuda_sms="$ax_cuda_sms 30" ;; + KEPLER32) ax_cuda_sms="$ax_cuda_sms 32" ;; + KEPLER35) ax_cuda_sms="$ax_cuda_sms 35" ;; + KEPLER37) ax_cuda_sms="$ax_cuda_sms 37" ;; + MAXWELL|MAXWELL50) ax_cuda_sms="$ax_cuda_sms 50" ;; + MAXWELL52) ax_cuda_sms="$ax_cuda_sms 52" ;; + MAXWELL53) ax_cuda_sms="$ax_cuda_sms 53" ;; + PASCAL|PASCAL60) ax_cuda_sms="$ax_cuda_sms 60" ;; + PASCAL61) ax_cuda_sms="$ax_cuda_sms 61" ;; + VOLTA|VOLTA70) ax_cuda_sms="$ax_cuda_sms 70" ;; + VOLTA72) ax_cuda_sms="$ax_cuda_sms 72" ;; + TURING75) ax_cuda_sms="$ax_cuda_sms 75" ;; + AMPERE|AMPERE80) ax_cuda_sms="$ax_cuda_sms 80" ;; + AMPERE86) ax_cuda_sms="$ax_cuda_sms 86" ;; + ADA89) ax_cuda_sms="$ax_cuda_sms 89" ;; + HOPPER|HOPPER90) ax_cuda_sms="$ax_cuda_sms 90" ;; + BLACKWELL|BLACKWELL100) ax_cuda_sms="$ax_cuda_sms 100" ;; + AMD_GFX*) ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Unknown Kokkos Arch: $t" >&5 +printf "%s\n" "$as_me: WARNING: Unknown Kokkos Arch: $t" >&2;};; + esac + done + + ax_cuda_sms=`printf "%s\n" $ax_cuda_sms | awk '!seenACSM_CONFIGURE_KOKKOS++'` + + if test "x$ax_cuda_sms" != x; then + for sm in $ax_cuda_sms; do + KOKKOS_CXXFLAGS="-gencode=arch=compute_${sm},code=sm_${sm} $KOKKOS_CXXFLAGS" + done + fi + + ;; + hip) + # Extract the first word of "hipcc", so it can be a program name with args. +set dummy hipcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_HIPCC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $HIPCC in + [\\/]* | ?:[\\/]*) + ac_cv_path_HIPCC="$HIPCC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_HIPCC="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_HIPCC" && ac_cv_path_HIPCC="no" + ;; +esac ;; +esac +fi +HIPCC=$ac_cv_path_HIPCC +if test -n "$HIPCC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HIPCC" >&5 +printf "%s\n" "$HIPCC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + if test "x$HIPCC" = "xno" +then : + as_fn_error $? "hipcc not found but Kokkos HIP backend requested" "$LINENO" 5 +fi + KOKKOS_CXX="$HIPCC" + ;; + sycl) + # Extract the first word of "icpx", so it can be a program name with args. +set dummy icpx; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ICPX+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $ICPX in + [\\/]* | ?:[\\/]*) + ac_cv_path_ICPX="$ICPX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ICPX="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ICPX" && ac_cv_path_ICPX="no" + ;; +esac ;; +esac +fi +ICPX=$ac_cv_path_ICPX +if test -n "$ICPX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ICPX" >&5 +printf "%s\n" "$ICPX" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + if test "x$ICPX" = "xno" +then : + as_fn_error $? "icpx not found but Kokkos SYCL backend requested" "$LINENO" 5 +fi + KOKKOS_CXX="$ICPX" + KOKKOS_CXXFLAGS="-fsycl" + KOKKOS_LDFLAGS="-fsycl $KOKKOS_LDFLAGS" + ;; + openmp) + KOKKOS_CXX="${CXX}" + KOKKOS_CXXFLAGS="-x c++ $KOKKOS_CXXFLAGS" + ;; + serial|*) + KOKKOS_CXX="${CXX}" + KOKKOS_CXXFLAGS="-x c++" + ;; + esac + +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using caller-provided KOKKOS_CXX=$KOKKOS_CXX" >&5 +printf "%s\n" "Using caller-provided KOKKOS_CXX=$KOKKOS_CXX" >&6; } ;; +esac +fi + + if test "x$have_kokkos_openmp" = "xyes" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Kokkos compiler supports -fopenmp" >&5 +printf %s "checking whether the Kokkos compiler supports -fopenmp... " >&6; } + + acsm_save_CXX="$CXX" + acsm_save_CXXFLAGS="$CXXFLAGS" + + CXX="$KOKKOS_CXX" + CXXFLAGS="$CXXFLAGS $KOKKOS_CXXFLAGS -fopenmp" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + + std::vector v; + v.push_back(1); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + + KOKKOS_CXXFLAGS="$KOKKOS_CXXFLAGS -fopenmp" + KOKKOS_LDFLAGS="$KOKKOS_LDFLAGS -fopenmp" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CXXFLAGS="$acsm_save_CXXFLAGS" + CXX="$acsm_save_CXX" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + KOKKOS_MPI_CPPFLAGS="" + KOKKOS_MPI_LDFLAGS="" + if test "x$enablempi" = "xyes" && test "x$KOKKOS_CXX" != "x$CXX" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI compile flags to use with KOKKOS_CXX" >&5 +printf %s "checking for MPI compile flags to use with KOKKOS_CXX... " >&6; } + + KOKKOS_MPI_CPPFLAGS=`$CXX -showme:compile 2>/dev/null` + KOKKOS_MPI_LDFLAGS=`$CXX -showme:link 2>/dev/null` + + if test "x$KOKKOS_MPI_CPPFLAGS" = "x" +then : + KOKKOS_MPI_CPPFLAGS=`$CXX -cxx='' -compile_info 2>/dev/null` + KOKKOS_MPI_LDFLAGS=`$CXX -cxx='' -link_info 2>/dev/null` + +fi + + if test "x$KOKKOS_MPI_CPPFLAGS" = "x" +then : + KOKKOS_MPI_CPPFLAGS=`$CXX -show -c test.c 2>/dev/null | sed 's/^^ * //'` + KOKKOS_MPI_LDFLAGS=`$CXX -show -o a.out test.o 2>/dev/null | sed 's/^^ * //'` + +fi + + + STRIPPED_FLAGS="" + for flag in $KOKKOS_MPI_CPPFLAGS; do + case "$flag" in + -O*) # Skip possibly-undesired optimization level + ;; + -std=*) # Skip possibly-incompatible standard + ;; + *) # Append everything else + STRIPPED_FLAGS="$STRIPPED_FLAGS $flag" + ;; + esac + done + KOKKOS_MPI_CPPFLAGS=$STRIPPED_FLAGS + + if test "x$KOKKOS_MPI_CPPFLAGS" = "x" +then : + KOKKOS_MPI_CPPFLAGS="$MPI_INCLUDES" +fi + + if test "x$KOKKOS_MPI_LDFLAGS" = "x" +then : + KOKKOS_MPI_LDFLAGS="$MPI_LDFLAGS" +fi + + if test "x$KOKKOS_MPI_CPPFLAGS" = "x" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none found" >&5 +printf "%s\n" "none found" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $KOKKOS_MPI_CPPFLAGS" >&5 +printf "%s\n" "$KOKKOS_MPI_CPPFLAGS" >&6; } ;; +esac +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI link flags to use with KOKKOS_CXX" >&5 +printf %s "checking for MPI link flags to use with KOKKOS_CXX... " >&6; } + if test "x$KOKKOS_MPI_LDFLAGS" = "x" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +printf "%s\n" "not found" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $KOKKOS_MPI_LDFLAGS" >&5 +printf "%s\n" "$KOKKOS_MPI_LDFLAGS" >&6; } ;; +esac +fi + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Kokkos compiler configuration works" >&5 +printf %s "checking whether the Kokkos compiler configuration works... " >&6; } + acsm_save_CXX="$CXX" + acsm_save_CPPFLAGS="$CPPFLAGS" + acsm_save_CXXFLAGS="$CXXFLAGS" + acsm_save_LDFLAGS="$LDFLAGS" + acsm_save_LIBS="$LIBS" + + CXX="$KOKKOS_CXX" + CPPFLAGS="$CPPFLAGS $KOKKOS_CPPFLAGS $KOKKOS_MPI_CPPFLAGS" + CXXFLAGS="$CXXFLAGS $KOKKOS_CXXFLAGS" + LDFLAGS="$LDFLAGS $KOKKOS_LDFLAGS $KOKKOS_MPI_LDFLAGS" + LIBS="$LIBS $KOKKOS_LIBS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + if test "x$enablempi" = "xyes" +then : + + LDFLAGS="$LDFLAGS $MPI_LDFLAGS" + LIBS="$LIBS $MPI_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + int main(int argc, char ** argv) + { + MPI_Init(&argc, &argv); + Kokkos::initialize(argc, argv); + Kokkos::finalize(); + MPI_Finalize(); + return 0; + } + +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + kokkos_config_works=yes +else case e in #( + e) kokkos_config_works=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +else case e in #( + e) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main(int argc, char ** argv) + { + Kokkos::initialize(argc, argv); + Kokkos::finalize(); + return 0; + } + +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + kokkos_config_works=yes +else case e in #( + e) kokkos_config_works=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ;; +esac +fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + CXX="$acsm_save_CXX" + CPPFLAGS="$acsm_save_CPPFLAGS" + CXXFLAGS="$acsm_save_CXXFLAGS" + LDFLAGS="$acsm_save_LDFLAGS" + LIBS="$acsm_save_LIBS" + + if test "x$kokkos_config_works" = "xyes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + as_fn_error $? "Kokkos compiler/flags failed to compile and link a minimal test program" "$LINENO" 5 ;; +esac +fi + + +printf "%s\n" "#define HAVE_KOKKOS 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Kokkos support >>>" >&5 +printf "%s\n" "<<< Configuring library with Kokkos support >>>" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Kokkos not found at $KOKKOS_INCLUDE_DIR -- disabling Kokkos FE support" >&5 +printf "%s\n" "$as_me: WARNING: Kokkos not found at $KOKKOS_INCLUDE_DIR -- disabling Kokkos FE support" >&2;} + enablekokkos=no + ;; +esac +fi + + +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: <<< Configuring library without Kokkos support >>>" >&5 +printf "%s\n" "$as_me: <<< Configuring library without Kokkos support >>>" >&6;} + enablekokkos=no ;; +esac +fi + + if test "$enablekokkos" = "no" && test "$kokkosrequired" = "yes" +then : + as_fn_error 4 "*** Kokkos was not found, but --enable-kokkos-required was specified." "$LINENO" 5 +fi + + + + + + + + + if test x$enablekokkos = xyes; then + ACSM_ENABLE_KOKKOS_TRUE= + ACSM_ENABLE_KOKKOS_FALSE='#' +else + ACSM_ENABLE_KOKKOS_TRUE='#' + ACSM_ENABLE_KOKKOS_FALSE= +fi + + + +if test "x$enablekokkos" != "xno" +then : + + libmesh_optional_INCLUDES="$KOKKOS_CPPFLAGS $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$KOKKOS_LDFLAGS $KOKKOS_LIBS $libmesh_optional_LIBS" + +fi + if test x$enablekokkos = xyes; then + LIBMESH_ENABLE_KOKKOS_TRUE= + LIBMESH_ENABLE_KOKKOS_FALSE='#' +else + LIBMESH_ENABLE_KOKKOS_TRUE='#' + LIBMESH_ENABLE_KOKKOS_FALSE= +fi + +# ------------------------------------------------------------- + +# ------------------------------------------------------------- +# With either CppUnit or Kokkos we'll have tests to run +# ------------------------------------------------------------- + if test x$enablekokkos = xyes -o x$enablecppunit = xyes; then + LIBMESH_ENABLE_TESTS_DIR_TRUE= + LIBMESH_ENABLE_TESTS_DIR_FALSE='#' +else + LIBMESH_ENABLE_TESTS_DIR_TRUE='#' + LIBMESH_ENABLE_TESTS_DIR_FALSE= +fi + + if test "$enableoptional" != no then : @@ -74615,6 +75494,18 @@ if test -z "${LIBMESH_ENABLE_METAPHYSICL_TRUE}" && test -z "${LIBMESH_ENABLE_MET as_fn_error $? "conditional \"LIBMESH_ENABLE_METAPHYSICL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ACSM_ENABLE_KOKKOS_TRUE}" && test -z "${ACSM_ENABLE_KOKKOS_FALSE}"; then + as_fn_error $? "conditional \"ACSM_ENABLE_KOKKOS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LIBMESH_ENABLE_KOKKOS_TRUE}" && test -z "${LIBMESH_ENABLE_KOKKOS_FALSE}"; then + as_fn_error $? "conditional \"LIBMESH_ENABLE_KOKKOS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LIBMESH_ENABLE_TESTS_DIR_TRUE}" && test -z "${LIBMESH_ENABLE_TESTS_DIR_FALSE}"; then + as_fn_error $? "conditional \"LIBMESH_ENABLE_TESTS_DIR\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GIT_CHECKOUT_TRUE}" && test -z "${GIT_CHECKOUT_FALSE}"; then as_fn_error $? "conditional \"GIT_CHECKOUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -77880,6 +78771,11 @@ fi printf "%s\n" " gmv.............................. : $enablegmv" printf "%s\n" " gzstream......................... : $enablegz" printf "%s\n" " hdf5............................. : $enablehdf5" + printf "%s\n" " kokkos........................... : $enablekokkos" + if test "x$enablekokkos" = "xyes" +then : + printf "%s\n" " kokkos backend................ : $KOKKOS_BACKEND" +fi printf "%s\n" " laspack.......................... : $enablelaspack" printf "%s\n" " libhilbert....................... : $enablelibhilbert" printf "%s\n" " metaphysicl...................... : $enablemetaphysicl" diff --git a/contrib/Makefile.in b/contrib/Makefile.in index eedeba8191..6a09437ad0 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -254,6 +254,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -601,11 +602,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -653,6 +663,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/capnproto/Makefile.in b/contrib/capnproto/Makefile.in index 4076a03dd0..c122d233cb 100644 --- a/contrib/capnproto/Makefile.in +++ b/contrib/capnproto/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -455,11 +456,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -507,6 +517,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/eigen/gitshim/Makefile.in b/contrib/eigen/gitshim/Makefile.in index c9e55dab0f..93d0066877 100644 --- a/contrib/eigen/gitshim/Makefile.in +++ b/contrib/eigen/gitshim/Makefile.in @@ -103,6 +103,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -339,11 +340,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -391,6 +401,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/5.22b/exodus/Makefile.in b/contrib/exodusii/5.22b/exodus/Makefile.in index b6bf6a7bbd..c5ba572ade 100644 --- a/contrib/exodusii/5.22b/exodus/Makefile.in +++ b/contrib/exodusii/5.22b/exodus/Makefile.in @@ -115,6 +115,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -3322,11 +3323,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -3374,6 +3384,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/5.22b/nemesis/Makefile.in b/contrib/exodusii/5.22b/nemesis/Makefile.in index 6b5d1be622..d3b529059f 100644 --- a/contrib/exodusii/5.22b/nemesis/Makefile.in +++ b/contrib/exodusii/5.22b/nemesis/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -401,11 +402,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -453,6 +463,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/Lib/Makefile.in b/contrib/exodusii/Lib/Makefile.in index 7d62c34f08..5a6a76f64a 100644 --- a/contrib/exodusii/Lib/Makefile.in +++ b/contrib/exodusii/Lib/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -1957,11 +1958,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -2009,6 +2019,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/v8.11/exodus/Makefile.in b/contrib/exodusii/v8.11/exodus/Makefile.in index 3e6d824102..868d20d080 100644 --- a/contrib/exodusii/v8.11/exodus/Makefile.in +++ b/contrib/exodusii/v8.11/exodus/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -4250,11 +4251,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -4302,6 +4312,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/exodusii/v8.11/nemesis/Makefile.in b/contrib/exodusii/v8.11/nemesis/Makefile.in index 79921e7f74..4b3a1da1f6 100644 --- a/contrib/exodusii/v8.11/nemesis/Makefile.in +++ b/contrib/exodusii/v8.11/nemesis/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -411,11 +412,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -463,6 +473,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/fparser/Makefile.in b/contrib/fparser/Makefile.in index d264a2a434..08844b0e88 100644 --- a/contrib/fparser/Makefile.in +++ b/contrib/fparser/Makefile.in @@ -122,6 +122,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -869,11 +870,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -921,6 +931,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/fparser/extrasrc/Makefile.in b/contrib/fparser/extrasrc/Makefile.in index 62c2c80e5f..7dd2a449af 100644 --- a/contrib/fparser/extrasrc/Makefile.in +++ b/contrib/fparser/extrasrc/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -341,11 +342,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -393,6 +403,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/gmv/Makefile.in b/contrib/gmv/Makefile.in index 9655b87903..121a5bf31c 100644 --- a/contrib/gmv/Makefile.in +++ b/contrib/gmv/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -396,11 +397,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -448,6 +458,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/gzstream/Makefile.in b/contrib/gzstream/Makefile.in index 076149d8ea..077d45225f 100644 --- a/contrib/gzstream/Makefile.in +++ b/contrib/gzstream/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -448,11 +449,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -500,6 +510,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/laspack/Makefile.in b/contrib/laspack/Makefile.in index 6fd4bc0490..17579d4fe7 100644 --- a/contrib/laspack/Makefile.in +++ b/contrib/laspack/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -506,11 +507,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -558,6 +568,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/libHilbert/Makefile.in b/contrib/libHilbert/Makefile.in index 611d9a259d..ac6dc653aa 100644 --- a/contrib/libHilbert/Makefile.in +++ b/contrib/libHilbert/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -479,11 +480,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -531,6 +541,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/metis/Makefile.in b/contrib/metis/Makefile.in index cb13742cfb..6c6c978900 100644 --- a/contrib/metis/Makefile.in +++ b/contrib/metis/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -1023,11 +1024,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -1075,6 +1085,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/nanoflann/Makefile.in b/contrib/nanoflann/Makefile.in index e7059d4eeb..deab5adb30 100644 --- a/contrib/nanoflann/Makefile.in +++ b/contrib/nanoflann/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -445,11 +446,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -497,6 +507,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/nemesis/Lib/Makefile.in b/contrib/nemesis/Lib/Makefile.in index d766a0ebe3..c3c558aa94 100644 --- a/contrib/nemesis/Lib/Makefile.in +++ b/contrib/nemesis/Lib/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -791,11 +792,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -843,6 +853,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/netgen/Makefile.in b/contrib/netgen/Makefile.in index f25afec5f7..8bd60e5d8e 100644 --- a/contrib/netgen/Makefile.in +++ b/contrib/netgen/Makefile.in @@ -101,6 +101,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -343,11 +344,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -395,6 +405,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/parmetis/Makefile.in b/contrib/parmetis/Makefile.in index a48468ed3a..83e8936a65 100644 --- a/contrib/parmetis/Makefile.in +++ b/contrib/parmetis/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -857,11 +858,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -909,6 +919,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/poly2tri/modified/Makefile.in b/contrib/poly2tri/modified/Makefile.in index f37e5c5cf4..09bbe0a127 100644 --- a/contrib/poly2tri/modified/Makefile.in +++ b/contrib/poly2tri/modified/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -543,11 +544,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -595,6 +605,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/qhull/Makefile.in b/contrib/qhull/Makefile.in index 373ece2ec3..0ecd11f633 100644 --- a/contrib/qhull/Makefile.in +++ b/contrib/qhull/Makefile.in @@ -100,6 +100,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -319,11 +320,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -371,6 +381,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/sfcurves/Makefile.in b/contrib/sfcurves/Makefile.in index 072b519dd2..6683d462fb 100644 --- a/contrib/sfcurves/Makefile.in +++ b/contrib/sfcurves/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -416,11 +417,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -468,6 +478,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/tecplot/binary/Makefile.in b/contrib/tecplot/binary/Makefile.in index d0c555212d..76c0b067a3 100644 --- a/contrib/tecplot/binary/Makefile.in +++ b/contrib/tecplot/binary/Makefile.in @@ -101,6 +101,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -386,11 +387,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -438,6 +448,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/tecplot/tecio/Makefile.in b/contrib/tecplot/tecio/Makefile.in index 31291f2fb4..3459c58329 100644 --- a/contrib/tecplot/tecio/Makefile.in +++ b/contrib/tecplot/tecio/Makefile.in @@ -105,6 +105,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -625,11 +626,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -677,6 +687,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/tetgen/Makefile.in b/contrib/tetgen/Makefile.in index 879845cc2c..e59ecbc5b0 100644 --- a/contrib/tetgen/Makefile.in +++ b/contrib/tetgen/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -431,11 +432,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -483,6 +493,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contrib/triangle/Makefile.in b/contrib/triangle/Makefile.in index 52c9b889a9..2f2b2a9c83 100644 --- a/contrib/triangle/Makefile.in +++ b/contrib/triangle/Makefile.in @@ -106,6 +106,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -426,11 +427,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -478,6 +488,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/Makefile.in b/doc/Makefile.in index be716b953a..47a13886d9 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -99,6 +99,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -349,11 +350,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -401,6 +411,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index e8c4ad1507..733e5c94a9 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -103,6 +103,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -309,11 +310,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -361,6 +371,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/Makefile.in b/examples/Makefile.in index 0af57ba13b..a75cabf615 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -100,6 +100,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -377,11 +378,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -429,6 +439,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex1/Makefile.in b/examples/adaptivity/adaptivity_ex1/Makefile.in index 4ca8177c27..3091ab3672 100644 --- a/examples/adaptivity/adaptivity_ex1/Makefile.in +++ b/examples/adaptivity/adaptivity_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex2/Makefile.in b/examples/adaptivity/adaptivity_ex2/Makefile.in index 571a7535b4..7a4288a695 100644 --- a/examples/adaptivity/adaptivity_ex2/Makefile.in +++ b/examples/adaptivity/adaptivity_ex2/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -486,11 +487,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -538,6 +548,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex3/Makefile.in b/examples/adaptivity/adaptivity_ex3/Makefile.in index ff126ad9be..96e4e85799 100644 --- a/examples/adaptivity/adaptivity_ex3/Makefile.in +++ b/examples/adaptivity/adaptivity_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex4/Makefile.in b/examples/adaptivity/adaptivity_ex4/Makefile.in index 021dba8790..2a2b470a9d 100644 --- a/examples/adaptivity/adaptivity_ex4/Makefile.in +++ b/examples/adaptivity/adaptivity_ex4/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adaptivity/adaptivity_ex5/Makefile.in b/examples/adaptivity/adaptivity_ex5/Makefile.in index 606ddddeaf..8024195b62 100644 --- a/examples/adaptivity/adaptivity_ex5/Makefile.in +++ b/examples/adaptivity/adaptivity_ex5/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -482,11 +483,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -534,6 +544,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex1/Makefile.in b/examples/adjoints/adjoints_ex1/Makefile.in index 8b1c16c3c1..128c9f8d1c 100644 --- a/examples/adjoints/adjoints_ex1/Makefile.in +++ b/examples/adjoints/adjoints_ex1/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -561,11 +562,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -613,6 +623,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex2/Makefile.in b/examples/adjoints/adjoints_ex2/Makefile.in index c40fa8a216..8cddf7755b 100644 --- a/examples/adjoints/adjoints_ex2/Makefile.in +++ b/examples/adjoints/adjoints_ex2/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -529,11 +530,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -581,6 +591,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex3/Makefile.in b/examples/adjoints/adjoints_ex3/Makefile.in index 226cd9b848..783ee416a8 100644 --- a/examples/adjoints/adjoints_ex3/Makefile.in +++ b/examples/adjoints/adjoints_ex3/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -564,11 +565,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -616,6 +626,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex4/Makefile.in b/examples/adjoints/adjoints_ex4/Makefile.in index 5d32a0db4c..52528ba759 100644 --- a/examples/adjoints/adjoints_ex4/Makefile.in +++ b/examples/adjoints/adjoints_ex4/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -564,11 +565,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -616,6 +626,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex5/Makefile.in b/examples/adjoints/adjoints_ex5/Makefile.in index ff7888310e..b4793b0977 100644 --- a/examples/adjoints/adjoints_ex5/Makefile.in +++ b/examples/adjoints/adjoints_ex5/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -564,11 +565,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -616,6 +626,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex6/Makefile.in b/examples/adjoints/adjoints_ex6/Makefile.in index ed6f6e5589..c702382931 100644 --- a/examples/adjoints/adjoints_ex6/Makefile.in +++ b/examples/adjoints/adjoints_ex6/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -529,11 +530,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -581,6 +591,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/adjoints/adjoints_ex7/Makefile.in b/examples/adjoints/adjoints_ex7/Makefile.in index ce63f04fa3..8a565053d0 100644 --- a/examples/adjoints/adjoints_ex7/Makefile.in +++ b/examples/adjoints/adjoints_ex7/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -579,11 +580,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -631,6 +641,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/eigenproblems/eigenproblems_ex1/Makefile.in b/examples/eigenproblems/eigenproblems_ex1/Makefile.in index 5679d9ab4b..98a2d15004 100644 --- a/examples/eigenproblems/eigenproblems_ex1/Makefile.in +++ b/examples/eigenproblems/eigenproblems_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/eigenproblems/eigenproblems_ex2/Makefile.in b/examples/eigenproblems/eigenproblems_ex2/Makefile.in index 893d075752..fc6f75f280 100644 --- a/examples/eigenproblems/eigenproblems_ex2/Makefile.in +++ b/examples/eigenproblems/eigenproblems_ex2/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/eigenproblems/eigenproblems_ex3/Makefile.in b/examples/eigenproblems/eigenproblems_ex3/Makefile.in index 10f4f2524f..7cadde2747 100644 --- a/examples/eigenproblems/eigenproblems_ex3/Makefile.in +++ b/examples/eigenproblems/eigenproblems_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/eigenproblems/eigenproblems_ex4/Makefile.in b/examples/eigenproblems/eigenproblems_ex4/Makefile.in index 7256d0fb70..703cf5a52a 100644 --- a/examples/eigenproblems/eigenproblems_ex4/Makefile.in +++ b/examples/eigenproblems/eigenproblems_ex4/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex1/Makefile.in b/examples/fem_system/fem_system_ex1/Makefile.in index 64d7c0944c..12b3545713 100644 --- a/examples/fem_system/fem_system_ex1/Makefile.in +++ b/examples/fem_system/fem_system_ex1/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -501,11 +502,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -553,6 +563,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex2/Makefile.in b/examples/fem_system/fem_system_ex2/Makefile.in index 258ea038a7..79557ea25f 100644 --- a/examples/fem_system/fem_system_ex2/Makefile.in +++ b/examples/fem_system/fem_system_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -516,11 +517,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -568,6 +578,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex3/Makefile.in b/examples/fem_system/fem_system_ex3/Makefile.in index 3ac9173e07..cd4a6d0498 100644 --- a/examples/fem_system/fem_system_ex3/Makefile.in +++ b/examples/fem_system/fem_system_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -501,11 +502,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -553,6 +563,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex4/Makefile.in b/examples/fem_system/fem_system_ex4/Makefile.in index 7bc0afdd27..691a19212f 100644 --- a/examples/fem_system/fem_system_ex4/Makefile.in +++ b/examples/fem_system/fem_system_ex4/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -501,11 +502,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -553,6 +563,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/fem_system/fem_system_ex5/Makefile.in b/examples/fem_system/fem_system_ex5/Makefile.in index a750a85cd2..a4c9c8b37b 100644 --- a/examples/fem_system/fem_system_ex5/Makefile.in +++ b/examples/fem_system/fem_system_ex5/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -516,11 +517,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -568,6 +578,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex1/Makefile.in b/examples/introduction/introduction_ex1/Makefile.in index 059aca524c..11b429b85f 100644 --- a/examples/introduction/introduction_ex1/Makefile.in +++ b/examples/introduction/introduction_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex2/Makefile.in b/examples/introduction/introduction_ex2/Makefile.in index 5eafbd2ea6..7bf8aceb08 100644 --- a/examples/introduction/introduction_ex2/Makefile.in +++ b/examples/introduction/introduction_ex2/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex3/Makefile.in b/examples/introduction/introduction_ex3/Makefile.in index b198a35977..dccd33df16 100644 --- a/examples/introduction/introduction_ex3/Makefile.in +++ b/examples/introduction/introduction_ex3/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -482,11 +483,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -534,6 +544,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex4/Makefile.in b/examples/introduction/introduction_ex4/Makefile.in index 9b91bf2376..cb810f4100 100644 --- a/examples/introduction/introduction_ex4/Makefile.in +++ b/examples/introduction/introduction_ex4/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -482,11 +483,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -534,6 +544,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/introduction/introduction_ex5/Makefile.in b/examples/introduction/introduction_ex5/Makefile.in index 167e8fe236..12d4648b6d 100644 --- a/examples/introduction/introduction_ex5/Makefile.in +++ b/examples/introduction/introduction_ex5/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -482,11 +483,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -534,6 +544,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex1/Makefile.in b/examples/miscellaneous/miscellaneous_ex1/Makefile.in index 69192044fc..5cdc3f634f 100644 --- a/examples/miscellaneous/miscellaneous_ex1/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex10/Makefile.in b/examples/miscellaneous/miscellaneous_ex10/Makefile.in index 69e9b1ea12..97395bc135 100644 --- a/examples/miscellaneous/miscellaneous_ex10/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex10/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex11/Makefile.in b/examples/miscellaneous/miscellaneous_ex11/Makefile.in index 0659c61e95..59bd0fae49 100644 --- a/examples/miscellaneous/miscellaneous_ex11/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex11/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex12/Makefile.in b/examples/miscellaneous/miscellaneous_ex12/Makefile.in index b637045915..6915436174 100644 --- a/examples/miscellaneous/miscellaneous_ex12/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex12/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex13/Makefile.in b/examples/miscellaneous/miscellaneous_ex13/Makefile.in index 24d2aa8f36..f15bd79ede 100644 --- a/examples/miscellaneous/miscellaneous_ex13/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex13/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex14/Makefile.in b/examples/miscellaneous/miscellaneous_ex14/Makefile.in index c8b6792997..c1a1f71f30 100644 --- a/examples/miscellaneous/miscellaneous_ex14/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex14/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex15/Makefile.in b/examples/miscellaneous/miscellaneous_ex15/Makefile.in index 602253abee..1aeedede6b 100644 --- a/examples/miscellaneous/miscellaneous_ex15/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex15/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex16/Makefile.in b/examples/miscellaneous/miscellaneous_ex16/Makefile.in index e2ea831a5d..36651a03bf 100644 --- a/examples/miscellaneous/miscellaneous_ex16/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex16/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -483,11 +484,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -535,6 +545,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex17/Makefile.in b/examples/miscellaneous/miscellaneous_ex17/Makefile.in index 947fd470e8..e762481431 100644 --- a/examples/miscellaneous/miscellaneous_ex17/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex17/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -482,11 +483,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -534,6 +544,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex2/Makefile.in b/examples/miscellaneous/miscellaneous_ex2/Makefile.in index ebf7c0de30..7821b362d6 100644 --- a/examples/miscellaneous/miscellaneous_ex2/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex3/Makefile.in b/examples/miscellaneous/miscellaneous_ex3/Makefile.in index ce3a6c5eef..afe7aa4eb1 100644 --- a/examples/miscellaneous/miscellaneous_ex3/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex3/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -472,11 +473,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -524,6 +534,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex4/Makefile.in b/examples/miscellaneous/miscellaneous_ex4/Makefile.in index cf769d1eaa..6f53d1f3a4 100644 --- a/examples/miscellaneous/miscellaneous_ex4/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex4/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex5/Makefile.in b/examples/miscellaneous/miscellaneous_ex5/Makefile.in index 86439fbf80..0c1fa0ff8f 100644 --- a/examples/miscellaneous/miscellaneous_ex5/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex5/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -481,11 +482,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -533,6 +543,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex6/Makefile.in b/examples/miscellaneous/miscellaneous_ex6/Makefile.in index 03b75b22e4..7a54d97479 100644 --- a/examples/miscellaneous/miscellaneous_ex6/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex6/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex7/Makefile.in b/examples/miscellaneous/miscellaneous_ex7/Makefile.in index fc6c3bb2c1..c74ad3b3d6 100644 --- a/examples/miscellaneous/miscellaneous_ex7/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex7/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -510,11 +511,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -562,6 +572,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex8/Makefile.in b/examples/miscellaneous/miscellaneous_ex8/Makefile.in index 9a5d763d11..859f76212a 100644 --- a/examples/miscellaneous/miscellaneous_ex8/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex8/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/miscellaneous/miscellaneous_ex9/Makefile.in b/examples/miscellaneous/miscellaneous_ex9/Makefile.in index 39491ee14c..e67f39961a 100644 --- a/examples/miscellaneous/miscellaneous_ex9/Makefile.in +++ b/examples/miscellaneous/miscellaneous_ex9/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -507,11 +508,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -559,6 +569,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/optimization/optimization_ex1/Makefile.in b/examples/optimization/optimization_ex1/Makefile.in index 19e8b21b02..b3d41b3e2f 100644 --- a/examples/optimization/optimization_ex1/Makefile.in +++ b/examples/optimization/optimization_ex1/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/optimization/optimization_ex2/Makefile.in b/examples/optimization/optimization_ex2/Makefile.in index 58379f7426..f0de3b77bb 100644 --- a/examples/optimization/optimization_ex2/Makefile.in +++ b/examples/optimization/optimization_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex1/Makefile.in b/examples/reduced_basis/reduced_basis_ex1/Makefile.in index 08bb048a3e..eec80ac129 100644 --- a/examples/reduced_basis/reduced_basis_ex1/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex1/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -491,11 +492,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -543,6 +553,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex2/Makefile.in b/examples/reduced_basis/reduced_basis_ex2/Makefile.in index 1531d8bac4..3c84bb3252 100644 --- a/examples/reduced_basis/reduced_basis_ex2/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -491,11 +492,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -543,6 +553,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex3/Makefile.in b/examples/reduced_basis/reduced_basis_ex3/Makefile.in index 2e68fbdb00..5fc6aa4932 100644 --- a/examples/reduced_basis/reduced_basis_ex3/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -491,11 +492,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -543,6 +553,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex4/Makefile.in b/examples/reduced_basis/reduced_basis_ex4/Makefile.in index 952a02a977..9a49e6fde6 100644 --- a/examples/reduced_basis/reduced_basis_ex4/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex4/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -496,11 +497,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -548,6 +558,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex5/Makefile.in b/examples/reduced_basis/reduced_basis_ex5/Makefile.in index aa1ac82e45..5518b5b954 100644 --- a/examples/reduced_basis/reduced_basis_ex5/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex5/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -506,11 +507,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -558,6 +568,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex6/Makefile.in b/examples/reduced_basis/reduced_basis_ex6/Makefile.in index 711ce2cd7c..1d7083d073 100644 --- a/examples/reduced_basis/reduced_basis_ex6/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex6/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -496,11 +497,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -548,6 +558,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/reduced_basis/reduced_basis_ex7/Makefile.in b/examples/reduced_basis/reduced_basis_ex7/Makefile.in index a8c5b8e8f8..b63b90a817 100644 --- a/examples/reduced_basis/reduced_basis_ex7/Makefile.in +++ b/examples/reduced_basis/reduced_basis_ex7/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -491,11 +492,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -543,6 +553,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/solution_transfer/solution_transfer_ex1/Makefile.in b/examples/solution_transfer/solution_transfer_ex1/Makefile.in index eb5413afa1..874ef45047 100644 --- a/examples/solution_transfer/solution_transfer_ex1/Makefile.in +++ b/examples/solution_transfer/solution_transfer_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -467,11 +468,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -519,6 +529,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/subdomains/subdomains_ex1/Makefile.in b/examples/subdomains/subdomains_ex1/Makefile.in index 4c70439209..2a9ac2091f 100644 --- a/examples/subdomains/subdomains_ex1/Makefile.in +++ b/examples/subdomains/subdomains_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -482,11 +483,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -534,6 +544,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/subdomains/subdomains_ex2/Makefile.in b/examples/subdomains/subdomains_ex2/Makefile.in index d012fcf105..13450a85e2 100644 --- a/examples/subdomains/subdomains_ex2/Makefile.in +++ b/examples/subdomains/subdomains_ex2/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -482,11 +483,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -534,6 +544,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/subdomains/subdomains_ex3/Makefile.in b/examples/subdomains/subdomains_ex3/Makefile.in index 1c72950400..bde3d5c100 100644 --- a/examples/subdomains/subdomains_ex3/Makefile.in +++ b/examples/subdomains/subdomains_ex3/Makefile.in @@ -111,6 +111,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -476,11 +477,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -528,6 +538,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ 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 0dfd5f7537..3fa4880810 100644 --- a/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +530,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ 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 3bb1c7b702..4f49324d57 100644 --- a/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex2/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -473,11 +474,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -525,6 +535,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ 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 3114286e30..75497c8749 100644 --- a/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex3/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +530,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ 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 6ef5964ca9..07f497d845 100644 --- a/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex4/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +530,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ 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 c978098441..b865ad74a7 100644 --- a/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex5/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +530,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ 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 c1f20ab875..bb078b32dc 100644 --- a/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex6/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +530,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex7/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex7/Makefile.in index cf7937f0de..243c3f106f 100644 --- a/examples/systems_of_equations/systems_of_equations_ex7/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex7/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +536,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex8/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex8/Makefile.in index ab74e5377b..e1657bcf19 100644 --- a/examples/systems_of_equations/systems_of_equations_ex8/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex8/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -512,11 +513,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -564,6 +574,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/systems_of_equations/systems_of_equations_ex9/Makefile.in b/examples/systems_of_equations/systems_of_equations_ex9/Makefile.in index e75743a551..4f8ca2309f 100644 --- a/examples/systems_of_equations/systems_of_equations_ex9/Makefile.in +++ b/examples/systems_of_equations/systems_of_equations_ex9/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -474,11 +475,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -526,6 +536,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/transient/transient_ex1/Makefile.in b/examples/transient/transient_ex1/Makefile.in index 1795ff08d5..65f3a2c217 100644 --- a/examples/transient/transient_ex1/Makefile.in +++ b/examples/transient/transient_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -482,11 +483,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -534,6 +544,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/transient/transient_ex2/Makefile.in b/examples/transient/transient_ex2/Makefile.in index a82bc8ea97..6a48683131 100644 --- a/examples/transient/transient_ex2/Makefile.in +++ b/examples/transient/transient_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -468,11 +469,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -520,6 +530,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/transient/transient_ex3/Makefile.in b/examples/transient/transient_ex3/Makefile.in index dde8778886..016d10b619 100644 --- a/examples/transient/transient_ex3/Makefile.in +++ b/examples/transient/transient_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -516,11 +517,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -568,6 +578,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex1/Makefile.in b/examples/vector_fe/vector_fe_ex1/Makefile.in index cc3f3813dd..00cdc7ab47 100644 --- a/examples/vector_fe/vector_fe_ex1/Makefile.in +++ b/examples/vector_fe/vector_fe_ex1/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -480,11 +481,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -532,6 +542,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex10/Makefile.in b/examples/vector_fe/vector_fe_ex10/Makefile.in index c13261ac5b..45ebc4db46 100644 --- a/examples/vector_fe/vector_fe_ex10/Makefile.in +++ b/examples/vector_fe/vector_fe_ex10/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -491,11 +492,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -543,6 +553,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex2/Makefile.in b/examples/vector_fe/vector_fe_ex2/Makefile.in index f2c9a2bd6d..85b866a356 100644 --- a/examples/vector_fe/vector_fe_ex2/Makefile.in +++ b/examples/vector_fe/vector_fe_ex2/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -506,11 +507,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -558,6 +568,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex3/Makefile.in b/examples/vector_fe/vector_fe_ex3/Makefile.in index 2f5f9d0a6e..884a6fc063 100644 --- a/examples/vector_fe/vector_fe_ex3/Makefile.in +++ b/examples/vector_fe/vector_fe_ex3/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -506,11 +507,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -558,6 +568,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex4/Makefile.in b/examples/vector_fe/vector_fe_ex4/Makefile.in index c659f7d197..fe5d2555af 100644 --- a/examples/vector_fe/vector_fe_ex4/Makefile.in +++ b/examples/vector_fe/vector_fe_ex4/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -506,11 +507,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -558,6 +568,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex5/Makefile.in b/examples/vector_fe/vector_fe_ex5/Makefile.in index be5abe6828..2055b9a497 100644 --- a/examples/vector_fe/vector_fe_ex5/Makefile.in +++ b/examples/vector_fe/vector_fe_ex5/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -493,11 +494,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -545,6 +555,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex6/Makefile.in b/examples/vector_fe/vector_fe_ex6/Makefile.in index f6c2ee175a..fd401fef64 100644 --- a/examples/vector_fe/vector_fe_ex6/Makefile.in +++ b/examples/vector_fe/vector_fe_ex6/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -491,11 +492,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -543,6 +553,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex7/Makefile.in b/examples/vector_fe/vector_fe_ex7/Makefile.in index 63d977adc8..89f0af247f 100644 --- a/examples/vector_fe/vector_fe_ex7/Makefile.in +++ b/examples/vector_fe/vector_fe_ex7/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -491,11 +492,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -543,6 +553,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex8/Makefile.in b/examples/vector_fe/vector_fe_ex8/Makefile.in index 5ec03f065b..796b119803 100644 --- a/examples/vector_fe/vector_fe_ex8/Makefile.in +++ b/examples/vector_fe/vector_fe_ex8/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -491,11 +492,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -543,6 +553,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/examples/vector_fe/vector_fe_ex9/Makefile.in b/examples/vector_fe/vector_fe_ex9/Makefile.in index 2901d49ec7..9b03a2a58b 100644 --- a/examples/vector_fe/vector_fe_ex9/Makefile.in +++ b/examples/vector_fe/vector_fe_ex9/Makefile.in @@ -108,6 +108,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -501,11 +502,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -553,6 +563,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/include/Makefile.in b/include/Makefile.in index 9150cbc85d..d6688f276b 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -102,6 +102,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -382,11 +383,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -434,6 +444,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -639,6 +650,7 @@ include_HEADERS = \ base/libmesh_abort.h \ base/libmesh_base.h \ base/libmesh_common.h \ + base/libmesh_device.h \ base/libmesh_documentation.h \ base/libmesh_exceptions.h \ base/libmesh_logging.h \ @@ -785,6 +797,11 @@ include_HEADERS = \ geom/sphere.h \ geom/stored_range.h \ geom/surface.h \ + gpu/kokkos_linalg_base.h \ + gpu/kokkos_storage.h \ + gpu/kokkos_storage_policy.h \ + gpu/kokkos_tensor_ops.h \ + gpu/kokkos_vector_ops.h \ ghosting/default_coupling.h \ ghosting/ghost_point_neighbors.h \ ghosting/ghosting_functor.h \ diff --git a/include/libmesh/Makefile.in b/include/libmesh/Makefile.in index 1531496c94..be0263422e 100644 --- a/include/libmesh/Makefile.in +++ b/include/libmesh/Makefile.in @@ -120,6 +120,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -311,11 +312,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -363,6 +373,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -534,10 +545,11 @@ EXTRA_DIST = rebuild_makefile.sh BUILT_SOURCES = dirichlet_boundaries.h dof_map.h dof_map_base.h \ dof_object.h factory.h float128_shims.h getpot.h id_types.h \ libmesh.h libmesh_abort.h libmesh_augment_std_namespace.h \ - libmesh_base.h libmesh_common.h libmesh_documentation.h \ - libmesh_exceptions.h libmesh_logging.h libmesh_singleton.h \ - libmesh_version.h multi_predicates.h periodic_boundaries.h \ - periodic_boundary.h periodic_boundary_base.h print_trace.h \ + libmesh_base.h libmesh_common.h libmesh_device.h \ + libmesh_documentation.h libmesh_exceptions.h libmesh_logging.h \ + libmesh_singleton.h libmesh_version.h multi_predicates.h \ + periodic_boundaries.h periodic_boundary.h \ + periodic_boundary_base.h print_trace.h \ reference_counted_object.h reference_counter.h \ single_predicates.h sparsity_pattern.h variable.h \ variant_filter_iterator.h enum_convergence_flags.h \ @@ -584,7 +596,9 @@ BUILT_SOURCES = dirichlet_boundaries.h dof_map.h dof_map_base.h \ remote_elem.h sphere.h stored_range.h surface.h \ default_coupling.h ghost_point_neighbors.h ghosting_functor.h \ non_manifold_coupling.h overlap_coupling.h \ - point_neighbor_coupling.h sibling_coupling.h abaqus_io.h \ + point_neighbor_coupling.h sibling_coupling.h \ + kokkos_linalg_base.h kokkos_storage.h kokkos_storage_policy.h \ + kokkos_tensor_ops.h kokkos_vector_ops.h abaqus_io.h \ boundary_info.h boundary_mesh.h checkpoint_io.h \ distributed_mesh.h dyna_io.h ensight_io.h exodusII_io.h \ exodusII_io_helper.h exodus_header_info.h fro_io.h gmsh_io.h \ @@ -996,6 +1010,9 @@ libmesh_base.h: $(top_srcdir)/include/base/libmesh_base.h libmesh_common.h: $(top_srcdir)/include/base/libmesh_common.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +libmesh_device.h: $(top_srcdir)/include/base/libmesh_device.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + libmesh_documentation.h: $(top_srcdir)/include/base/libmesh_documentation.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ @@ -1455,6 +1472,21 @@ point_neighbor_coupling.h: $(top_srcdir)/include/ghosting/point_neighbor_couplin sibling_coupling.h: $(top_srcdir)/include/ghosting/sibling_coupling.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ +kokkos_linalg_base.h: $(top_srcdir)/include/gpu/kokkos_linalg_base.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_storage.h: $(top_srcdir)/include/gpu/kokkos_storage.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_storage_policy.h: $(top_srcdir)/include/gpu/kokkos_storage_policy.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_tensor_ops.h: $(top_srcdir)/include/gpu/kokkos_tensor_ops.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +kokkos_vector_ops.h: $(top_srcdir)/include/gpu/kokkos_vector_ops.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + abaqus_io.h: $(top_srcdir)/include/mesh/abaqus_io.h $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ diff --git a/tests/Makefile.in b/tests/Makefile.in index 679d9c5524..a831adc866 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -95,25 +95,33 @@ target_triplet = @target@ @LIBMESH_ENABLE_FPARSER_TRUE@ fparser/autodiff.C check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ - $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) + $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \ + $(am__EXEEXT_7) $(am__EXEEXT_8) +TESTS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__append_13) +@LIBMESH_ENABLE_KOKKOS_TRUE@am__append_2 = -I$(top_srcdir)/include $(KOKKOS_CPPFLAGS) +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@am__append_3 = unit_tests-kokkos-dbg +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@am__append_4 = unit_tests-kokkos-dbg +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@am__append_5 = unit_tests-kokkos-opt +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@am__append_6 = unit_tests-kokkos-opt # our GLIBC debugging preprocessor flags seem to potentially conflict # with libcppunit binaries. Some cppunit versions work fine for us, # others segfault and/or hang. By default we will not run # GLIBCXX-debugging builds with cppunit unless specifically # configured to. -@ACSM_ENABLE_GLIBCXX_DEBUGGING_CPPUNIT_TRUE@@ACSM_ENABLE_GLIBCXX_DEBUGGING_TRUE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_2 = unit_tests-dbg -@ACSM_ENABLE_GLIBCXX_DEBUGGING_FALSE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_3 = unit_tests-dbg -@LIBMESH_DEVEL_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_4 = unit_tests-devel -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_PROF_MODE_TRUE@am__append_5 = unit_tests-prof -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPROF_MODE_TRUE@am__append_6 = unit_tests-oprof -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@am__append_7 = unit_tests-opt -@LIBMESH_VPATH_BUILD_TRUE@am__append_8 = .linkstamp +@ACSM_ENABLE_GLIBCXX_DEBUGGING_CPPUNIT_TRUE@@ACSM_ENABLE_GLIBCXX_DEBUGGING_TRUE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_7 = unit_tests-dbg +@ACSM_ENABLE_GLIBCXX_DEBUGGING_FALSE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_8 = unit_tests-dbg +@LIBMESH_DEVEL_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_9 = unit_tests-devel +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_PROF_MODE_TRUE@am__append_10 = unit_tests-prof +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPROF_MODE_TRUE@am__append_11 = unit_tests-oprof +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@am__append_12 = unit_tests-opt +@LIBMESH_ENABLE_CPPUNIT_TRUE@am__append_13 = run_unit_tests.sh +@LIBMESH_VPATH_BUILD_TRUE@am__append_14 = .linkstamp ###################################################################### # # Don't leave code coverage outputs lying around -@CODE_COVERAGE_ENABLED_TRUE@am__append_9 = */*.gcda */*.gcno +@CODE_COVERAGE_ENABLED_TRUE@am__append_15 = */*.gcda */*.gcno subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = \ @@ -123,6 +131,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/m4/autoconf-submodule/acsm_cxx_compiler_standard.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_paranoid.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_enable_werror.m4 \ + $(top_srcdir)/m4/autoconf-submodule/acsm_kokkos.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_mpi.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_precision.m4 \ $(top_srcdir)/m4/autoconf-submodule/acsm_scrape_petsc_configure.m4 \ @@ -182,12 +191,14 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/libmesh_config.h.tmp CONFIG_CLEAN_FILES = run_unit_tests.sh CONFIG_CLEAN_VPATH_FILES = -@ACSM_ENABLE_GLIBCXX_DEBUGGING_CPPUNIT_TRUE@@ACSM_ENABLE_GLIBCXX_DEBUGGING_TRUE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_1 = unit_tests-dbg$(EXEEXT) -@ACSM_ENABLE_GLIBCXX_DEBUGGING_FALSE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_2 = unit_tests-dbg$(EXEEXT) -@LIBMESH_DEVEL_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_3 = unit_tests-devel$(EXEEXT) -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_PROF_MODE_TRUE@am__EXEEXT_4 = unit_tests-prof$(EXEEXT) -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPROF_MODE_TRUE@am__EXEEXT_5 = unit_tests-oprof$(EXEEXT) -@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@am__EXEEXT_6 = unit_tests-opt$(EXEEXT) +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@am__EXEEXT_1 = unit_tests-kokkos-dbg$(EXEEXT) +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@am__EXEEXT_2 = unit_tests-kokkos-opt$(EXEEXT) +@ACSM_ENABLE_GLIBCXX_DEBUGGING_CPPUNIT_TRUE@@ACSM_ENABLE_GLIBCXX_DEBUGGING_TRUE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_3 = unit_tests-dbg$(EXEEXT) +@ACSM_ENABLE_GLIBCXX_DEBUGGING_FALSE@@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_4 = unit_tests-dbg$(EXEEXT) +@LIBMESH_DEVEL_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@am__EXEEXT_5 = unit_tests-devel$(EXEEXT) +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_PROF_MODE_TRUE@am__EXEEXT_6 = unit_tests-prof$(EXEEXT) +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPROF_MODE_TRUE@am__EXEEXT_7 = unit_tests-oprof$(EXEEXT) +@LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@am__EXEEXT_8 = unit_tests-opt$(EXEEXT) am__unit_tests_dbg_SOURCES_DIST = driver.C libmesh_cppunit.h \ stream_redirector.h test_comm.h base/dof_object_test.h \ base/dof_map_test.C base/default_coupling_test.C \ @@ -601,6 +612,14 @@ unit_tests_devel_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(unit_tests_devel_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ +am_unit_tests_kokkos_dbg_OBJECTS = +am__EXTRA_unit_tests_kokkos_dbg_SOURCES_DIST = driver_kokkos.K +unit_tests_kokkos_dbg_OBJECTS = $(am_unit_tests_kokkos_dbg_OBJECTS) +unit_tests_kokkos_dbg_LDADD = $(LDADD) +am_unit_tests_kokkos_opt_OBJECTS = +am__EXTRA_unit_tests_kokkos_opt_SOURCES_DIST = driver_kokkos.K +unit_tests_kokkos_opt_OBJECTS = $(am_unit_tests_kokkos_opt_OBJECTS) +unit_tests_kokkos_opt_LDADD = $(LDADD) am__unit_tests_oprof_SOURCES_DIST = driver.C libmesh_cppunit.h \ stream_redirector.h test_comm.h base/dof_object_test.h \ base/dof_map_test.C base/default_coupling_test.C \ @@ -1876,10 +1895,18 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(unit_tests_dbg_SOURCES) $(unit_tests_devel_SOURCES) \ + $(unit_tests_kokkos_dbg_SOURCES) \ + $(EXTRA_unit_tests_kokkos_dbg_SOURCES) \ + $(unit_tests_kokkos_opt_SOURCES) \ + $(EXTRA_unit_tests_kokkos_opt_SOURCES) \ $(unit_tests_oprof_SOURCES) $(unit_tests_opt_SOURCES) \ $(unit_tests_prof_SOURCES) DIST_SOURCES = $(am__unit_tests_dbg_SOURCES_DIST) \ $(am__unit_tests_devel_SOURCES_DIST) \ + $(unit_tests_kokkos_dbg_SOURCES) \ + $(am__EXTRA_unit_tests_kokkos_dbg_SOURCES_DIST) \ + $(unit_tests_kokkos_opt_SOURCES) \ + $(am__EXTRA_unit_tests_kokkos_opt_SOURCES_DIST) \ $(am__unit_tests_oprof_SOURCES_DIST) \ $(am__unit_tests_opt_SOURCES_DIST) \ $(am__unit_tests_prof_SOURCES_DIST) @@ -2081,11 +2108,20 @@ HDF5_DIR = @HDF5_DIR@ HDF5_LDFLAGS = @HDF5_LDFLAGS@ HDF5_LIBS = @HDF5_LIBS@ HDF5_PREFIX = @HDF5_PREFIX@ +HIPCC = @HIPCC@ +ICPX = @ICPX@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_BACKEND = @KOKKOS_BACKEND@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXX = @KOKKOS_CXX@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +KOKKOS_MPI_CPPFLAGS = @KOKKOS_MPI_CPPFLAGS@ LASPACK_INCLUDE = @LASPACK_INCLUDE@ LASPACK_LIB = @LASPACK_LIB@ LD = @LD@ @@ -2133,6 +2169,7 @@ NODEPRECATEDFLAG = @NODEPRECATEDFLAG@ NOX_INCLUDES = @NOX_INCLUDES@ NOX_LIBS = @NOX_LIBS@ NOX_MAKEFILE_EXPORT = @NOX_MAKEFILE_EXPORT@ +NVCC = @NVCC@ NVTX_INCLUDE = @NVTX_INCLUDE@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -2307,6 +2344,7 @@ AM_CPPFLAGS = $(libmesh_optional_INCLUDES) -I$(top_builddir)/include \ -DLIBMESH_IS_UNIT_TESTING AM_LDFLAGS = $(libmesh_LDFLAGS) $(libmesh_contrib_LDFLAGS) +KOKKOS_TEST_CPPFLAGS = $(am__append_2) unit_tests_sources = driver.C libmesh_cppunit.h stream_redirector.h \ test_comm.h base/dof_object_test.h base/dof_map_test.C \ base/default_coupling_test.C base/getpot_test.C \ @@ -2469,7 +2507,18 @@ data = matrices/geom_1_extraction_op.h5 \ unit_tests_data = $(data) # Why isn't this working automatically? -EXTRA_DIST = $(data) +EXTRA_DIST = $(data) $(kokkos_unit_test_sources) +kokkos_unit_test_sources = \ + numerics/kokkos_numerics_oracle_test_utils.h \ + numerics/kokkos_tensor_ops_oracle_fixtures.h \ + numerics/kokkos_tensor_ops_oracle_runners.h \ + numerics/kokkos_vector_ops_oracle_fixtures.h \ + numerics/kokkos_vector_ops_oracle_runners.h + +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_dbg_SOURCES = +@LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_KOKKOS_TRUE@EXTRA_unit_tests_kokkos_dbg_SOURCES = driver_kokkos.K +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@unit_tests_kokkos_opt_SOURCES = +@LIBMESH_ENABLE_KOKKOS_TRUE@@LIBMESH_OPT_MODE_TRUE@EXTRA_unit_tests_kokkos_opt_SOURCES = driver_kokkos.K @LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@unit_tests_dbg_SOURCES = $(unit_tests_sources) @LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@unit_tests_dbg_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS) @LIBMESH_DBG_MODE_TRUE@@LIBMESH_ENABLE_CPPUNIT_TRUE@unit_tests_dbg_CXXFLAGS = $(CXXFLAGS_DBG) @@ -2500,7 +2549,16 @@ EXTRA_DIST = $(data) @LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@unit_tests_opt_LDADD = $(top_builddir)/libmesh_opt.la @LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@unit_tests_optdir = $(datadir) @LIBMESH_ENABLE_CPPUNIT_TRUE@@LIBMESH_OPT_MODE_TRUE@unit_tests_opt_DATA = $(data) -@LIBMESH_ENABLE_CPPUNIT_TRUE@TESTS = run_unit_tests.sh +@LIBMESH_ENABLE_KOKKOS_TRUE@driver_kokkos_src = driver_kokkos.K +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_dbg_object = unit_tests_kokkos_dbg-driver_kokkos.$(OBJEXT) +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_opt_object = unit_tests_kokkos_opt-driver_kokkos.$(OBJEXT) +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_dbg_depfile = $(DEPDIR)/unit_tests_kokkos_dbg-driver_kokkos.d +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests_kokkos_opt_depfile = $(DEPDIR)/unit_tests_kokkos_opt-driver_kokkos.d +@LIBMESH_ENABLE_KOKKOS_TRUE@kokkos_unit_test_depfiles = $(unit_tests_kokkos_dbg_depfile) $(unit_tests_kokkos_opt_depfile) +@LIBMESH_ENABLE_KOKKOS_TRUE@kokkos_unit_test_cleanfiles = $(unit_tests_kokkos_dbg_object) $(unit_tests_kokkos_opt_object) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(kokkos_unit_test_depfiles) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ unit_tests-kokkos-dbg$(EXEEXT) unit_tests-kokkos-opt$(EXEEXT) + CLEANFILES = cube_mesh.xda slit_mesh.xda slit_solution.xda out.e \ mesh_with_soln.e elemental_from_nodal.e write_elemset_data.e \ write_sideset_data.e write_nodeset_data.e write_edgeset_data.e \ @@ -2534,8 +2592,9 @@ CLEANFILES = cube_mesh.xda slit_mesh.xda slit_solution.xda out.e \ write_exodus_QUADSHELL9.e write_exodus_TET10.e \ write_exodus_TET14.e write_exodus_TET4.e write_exodus_TRI3.e \ write_exodus_TRI6.e write_exodus_TRI7.e \ - write_exodus_TRISHELL3.e smoother.out $(am__append_8) \ - $(am__append_9) + write_exodus_TRISHELL3.e smoother.out \ + $(kokkos_unit_test_cleanfiles) $(am__append_14) \ + $(am__append_15) # need to link any data files for VPATH builds @LIBMESH_VPATH_BUILD_TRUE@BUILT_SOURCES = .linkstamp @@ -3159,6 +3218,14 @@ fparser/unit_tests_devel-autodiff.$(OBJEXT): fparser/$(am__dirstamp) \ unit_tests-devel$(EXEEXT): $(unit_tests_devel_OBJECTS) $(unit_tests_devel_DEPENDENCIES) $(EXTRA_unit_tests_devel_DEPENDENCIES) @rm -f unit_tests-devel$(EXEEXT) $(AM_V_CXXLD)$(unit_tests_devel_LINK) $(unit_tests_devel_OBJECTS) $(unit_tests_devel_LDADD) $(LIBS) + +@LIBMESH_ENABLE_KOKKOS_FALSE@unit_tests-kokkos-dbg$(EXEEXT): $(unit_tests_kokkos_dbg_OBJECTS) $(unit_tests_kokkos_dbg_DEPENDENCIES) $(EXTRA_unit_tests_kokkos_dbg_DEPENDENCIES) +@LIBMESH_ENABLE_KOKKOS_FALSE@ @rm -f unit_tests-kokkos-dbg$(EXEEXT) +@LIBMESH_ENABLE_KOKKOS_FALSE@ $(AM_V_CCLD)$(LINK) $(unit_tests_kokkos_dbg_OBJECTS) $(unit_tests_kokkos_dbg_LDADD) $(LIBS) + +@LIBMESH_ENABLE_KOKKOS_FALSE@unit_tests-kokkos-opt$(EXEEXT): $(unit_tests_kokkos_opt_OBJECTS) $(unit_tests_kokkos_opt_DEPENDENCIES) $(EXTRA_unit_tests_kokkos_opt_DEPENDENCIES) +@LIBMESH_ENABLE_KOKKOS_FALSE@ @rm -f unit_tests-kokkos-opt$(EXEEXT) +@LIBMESH_ENABLE_KOKKOS_FALSE@ $(AM_V_CCLD)$(LINK) $(unit_tests_kokkos_opt_OBJECTS) $(unit_tests_kokkos_opt_LDADD) $(LIBS) base/unit_tests_oprof-dof_map_test.$(OBJEXT): base/$(am__dirstamp) \ base/$(DEPDIR)/$(am__dirstamp) base/unit_tests_oprof-default_coupling_test.$(OBJEXT): \ @@ -14832,6 +14899,41 @@ $(top_builddir)/libmesh_prof.la: FORCE $(top_builddir)/libmesh_oprof.la: FORCE (cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) libmesh_oprof.la) +# Build the Kokkos tests with the same mode-suffixed naming as the +# original libMesh unit test executables, while still compiling with +# the Kokkos device compiler and mode-specific flags. +@LIBMESH_ENABLE_KOKKOS_TRUE@$(unit_tests_kokkos_dbg_object): $(driver_kokkos_src) +@LIBMESH_ENABLE_KOKKOS_TRUE@ @$(MKDIR_P) $(DEPDIR) +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(KOKKOS_MPI_CPPFLAGS) $(CPPFLAGS_DBG) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS_DBG) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ -MMD -MP -MF $(unit_tests_kokkos_dbg_depfile) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ -c $< -o $@ + +@LIBMESH_ENABLE_KOKKOS_TRUE@$(unit_tests_kokkos_opt_object): $(driver_kokkos_src) +@LIBMESH_ENABLE_KOKKOS_TRUE@ @$(MKDIR_P) $(DEPDIR) +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(KOKKOS_CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(KOKKOS_MPI_CPPFLAGS) $(CPPFLAGS_OPT) $(AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_TEST_CPPFLAGS) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS_OPT) $(CXXFLAGS) $(KOKKOS_CXXFLAGS) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ -MMD -MP -MF $(unit_tests_kokkos_opt_depfile) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ -c $< -o $@ + +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests-kokkos-dbg$(EXEEXT): $(unit_tests_kokkos_dbg_object) $(top_builddir)/libmesh_dbg.la +@LIBMESH_ENABLE_KOKKOS_TRUE@ @rm -f $@ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(AM_V_GEN)$(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(LDFLAGS) $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) -o $@ \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(unit_tests_kokkos_dbg_object) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(top_builddir)/libmesh_dbg.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) $(LIBS) + +@LIBMESH_ENABLE_KOKKOS_TRUE@unit_tests-kokkos-opt$(EXEEXT): $(unit_tests_kokkos_opt_object) $(top_builddir)/libmesh_opt.la +@LIBMESH_ENABLE_KOKKOS_TRUE@ @rm -f $@ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(AM_V_GEN)$(LIBTOOL) --tag=CXX --mode=link $(KOKKOS_CXX) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(LDFLAGS) $(AM_LDFLAGS) $(KOKKOS_LDFLAGS) -o $@ \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(unit_tests_kokkos_opt_object) \ +@LIBMESH_ENABLE_KOKKOS_TRUE@ $(top_builddir)/libmesh_opt.la $(KOKKOS_LIBS) $(libmesh_optional_LIBS) $(LIBS) + +@LIBMESH_ENABLE_KOKKOS_TRUE@-include $(kokkos_unit_test_depfiles) + @LIBMESH_VPATH_BUILD_TRUE@.linkstamp: @LIBMESH_VPATH_BUILD_TRUE@ -rm -f solutions && $(LN_S) -f $(srcdir)/solutions . @LIBMESH_VPATH_BUILD_TRUE@ -rm -f meshes && $(LN_S) -f $(srcdir)/meshes . From ec7ab34847a59c34ba1c53accbb5283678df75f4 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 14:29:47 -0500 Subject: [PATCH 26/41] Ignore warnings from Kokkos headers This is necessary for --enable-werror --enable-paranoid-warnings (and possibly just the former?) configurations with Ubuntu 26.4 Kokkos for me. --- include/base/libmesh_device.h | 2 ++ include/gpu/kokkos_storage_policy.h | 2 ++ tests/numerics/kokkos_numerics_oracle_test_utils.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/include/base/libmesh_device.h b/include/base/libmesh_device.h index 87388289b8..f7670328f6 100644 --- a/include/base/libmesh_device.h +++ b/include/base/libmesh_device.h @@ -26,8 +26,10 @@ // methods are callable from both host and device code. In all other // translation units it expands to plain `inline`. #ifdef LIBMESH_KOKKOS_COMPILATION +# include "libmesh/ignore_warnings.h" # include # include +# include "libmesh/restore_warnings.h" # define LIBMESH_DEVICE_INLINE KOKKOS_INLINE_FUNCTION // Backend-neutral device-code detection for Kokkos .K translation units. diff --git a/include/gpu/kokkos_storage_policy.h b/include/gpu/kokkos_storage_policy.h index 6bfec5a6df..d20884eb3a 100644 --- a/include/gpu/kokkos_storage_policy.h +++ b/include/gpu/kokkos_storage_policy.h @@ -10,7 +10,9 @@ #include "libmesh/libmesh_common.h" #define PETSC_SKIP_CXX_COMPLEX_FIX 1 +#include "libmesh/ignore_warnings.h" #include +#include "libmesh/restore_warnings.h" #undef __CUDACC_VER__ #include diff --git a/tests/numerics/kokkos_numerics_oracle_test_utils.h b/tests/numerics/kokkos_numerics_oracle_test_utils.h index c25ce2a056..5f9e42c13b 100644 --- a/tests/numerics/kokkos_numerics_oracle_test_utils.h +++ b/tests/numerics/kokkos_numerics_oracle_test_utils.h @@ -5,7 +5,9 @@ // Avoid conflicting complex operators between CUDA and PETSc #define PETSC_SKIP_CXX_COMPLEX_FIX 1 +#include "libmesh/ignore_warnings.h" #include +#include "libmesh/restore_warnings.h" #undef __CUDACC_VER__ #include From e724f363fa4f5e1f85b1685d1ec3acfa9809b97b Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 14:44:19 -0500 Subject: [PATCH 27/41] Fix for unused `dot` This looks like more of the sort of redundancy I want to get rid of, but I want to get compiling first. --- tests/numerics/kokkos_vector_ops_oracle_fixtures.h | 3 ++- tests/numerics/kokkos_vector_ops_oracle_runners.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/numerics/kokkos_vector_ops_oracle_fixtures.h b/tests/numerics/kokkos_vector_ops_oracle_fixtures.h index 5bce52de34..7fe92e0e06 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_fixtures.h +++ b/tests/numerics/kokkos_vector_ops_oracle_fixtures.h @@ -28,7 +28,7 @@ static constexpr unsigned int solid_angle_results = 1 + ((LIBMESH_DIM > 1) ? 2u : 0u) + ((LIBMESH_DIM > 2) ? 4u : 0u); static constexpr unsigned int vector_results = 11 + ((LIBMESH_DIM > 2) ? 2u : 0u); -static constexpr unsigned int scalar_results = 11 + solid_angle_results; +static constexpr unsigned int scalar_results = 12 + solid_angle_results; template LIBMESH_DEVICE_INLINE @@ -152,6 +152,7 @@ build_host_oracle(const Vec & a, const Vec & b, const Vec & c) result.vectors.push_back(mult_assign); result.vectors.push_back(div_assign); + result.scalars.push_back(a * b); result.scalars.push_back(a * b); result.scalars.push_back(a.contract(b)); result.scalars.push_back(mix.norm()); diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h index 5fcd7e45a5..233cbfed4a 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_runners.h +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -67,6 +67,7 @@ test_vector_ops_case(const vector_case & info) unsigned int scalar_offset = 0; d_scalars(scalar_offset++) = a_ref * b_ref; + d_scalars(scalar_offset++) = dot; d_scalars(scalar_offset++) = contract; d_scalars(scalar_offset++) = norm; d_scalars(scalar_offset++) = norm_sq; From ba1b64dd886d923de9adab3a10efff6924bc99c0 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 15:03:18 -0500 Subject: [PATCH 28/41] Ignore -Wformat-nonliteral in ignore_warnings.h I can't actually trigger this directly yet, but I needed it in MetaPhysicL for indirectly included Kokkos headers (at least for the version in Ubuntu 26.4) there. --- include/utils/ignore_warnings.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/utils/ignore_warnings.h b/include/utils/ignore_warnings.h index fafe71e1dd..7e52438484 100644 --- a/include/utils/ignore_warnings.h +++ b/include/utils/ignore_warnings.h @@ -100,6 +100,8 @@ #pragma GCC diagnostic ignored "-Wcast-function-type" #pragma GCC diagnostic ignored "-Wdeprecated-copy" #pragma GCC diagnostic ignored "-Wclass-memaccess" +// Ignore warnings from Kokkos passing printf formats through char * +#pragma GCC diagnostic ignored "-Wformat-nonliteral" #endif #endif // __GNUC__ && !__INTEL_COMPILER From 5a396ea35bc3647f5f7e6f97c37424f5bd63e4b6 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 15:12:14 -0500 Subject: [PATCH 29/41] Update MetaPhysicL This fixes --enable-werror --enable-paranoid-warnings --enable-kokkos builds for me. --- contrib/metaphysicl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/metaphysicl b/contrib/metaphysicl index d40fd8a6f8..e4bb5f09e8 160000 --- a/contrib/metaphysicl +++ b/contrib/metaphysicl @@ -1 +1 @@ -Subproject commit d40fd8a6f83bf8ba3be29b9e38416ec7e29def36 +Subproject commit e4bb5f09e821c8300f44670df42a549f3c1f4232 From fa37c768b127b8f4ecc0a764f1de0192fe45d591 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 15:54:58 -0500 Subject: [PATCH 30/41] Get rid of vector_get/set_component() "Should I add a layer of indirection to accomplish X" is one of the hardest questions in software, unless X is "nothing". Then it's easy. --- include/gpu/kokkos_linalg_base.h | 32 ++++------------ include/gpu/kokkos_storage.h | 2 +- include/gpu/kokkos_tensor_ops.h | 20 +++++----- include/gpu/kokkos_vector_ops.h | 65 +++++++++++--------------------- 4 files changed, 40 insertions(+), 79 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index 70a634f1f1..a8357a59ba 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -96,6 +96,12 @@ class vector_ref return _view(_index, component); } + LIBMESH_DEVICE_INLINE + decltype(auto) operator()(const unsigned int component) + { + return _view(_index, component); + } + template LIBMESH_DEVICE_INLINE void set(const unsigned int component, const Scalar & value) @@ -366,30 +372,6 @@ using vector_semantic_type_t = typename vector_traits> template using tensor_semantic_type_t = typename tensor_traits>::semantic_type; -template -LIBMESH_DEVICE_INLINE -decltype(auto) -vector_get_component(const T & v, const unsigned int component) -{ - return v(component); -} - -template -LIBMESH_DEVICE_INLINE -void vector_set_component(T & v, const unsigned int component, const Scalar & value) -{ - v(component) = value; -} - -template -LIBMESH_DEVICE_INLINE -void vector_set_component(vector_ref v, - const unsigned int component, - const Scalar & value) -{ - v.set(component, value); -} - template LIBMESH_DEVICE_INLINE decltype(auto) @@ -445,7 +427,7 @@ OutputVector materialize_vector(const VectorLike & v) out.zero(); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, vector_get_component(v, component)); + out(component) = v(component); return out; } diff --git a/include/gpu/kokkos_storage.h b/include/gpu/kokkos_storage.h index 23e59aabf8..95c0661f70 100644 --- a/include/gpu/kokkos_storage.h +++ b/include/gpu/kokkos_storage.h @@ -27,7 +27,7 @@ void store_vector(const ViewType & view, const unsigned int i, const VectorType auto out = make_vector_ref(view, i); for (unsigned int d = 0; d < LIBMESH_DIM; ++d) - vector_set_component(out, d, vector_get_component(v, d)); + out(d) = v(d); } template diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 940e7edb41..a9828b35c3 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -110,7 +110,7 @@ ResultTensor outer_product(const LeftVector & left, const RightVector & right) tensor_set_component(out, row, col, - vector_get_component(left, row) * libmesh_conj(vector_get_component(right, col))); + left(row) * libmesh_conj(right(col))); return out; } @@ -214,7 +214,7 @@ ResultVector row(const TensorLike & T_in, const unsigned int row_index) out.zero(); for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - vector_set_component(out, col, tensor_get_component(T_in, row_index, col)); + out(col) = tensor_get_component(T_in, row_index, col); return out; } @@ -227,7 +227,7 @@ ResultVector column(const TensorLike & T_in, const unsigned int col_index) out.zero(); for (unsigned int row_index = 0; row_index < LIBMESH_DIM; ++row_index) - vector_set_component(out, row_index, tensor_get_component(T_in, row_index, col_index)); + out(row_index) = tensor_get_component(T_in, row_index, col_index); return out; } @@ -243,10 +243,10 @@ ResultVector multiply_tensor_vector(const TensorLike & T_in, const VectorLike & for (unsigned int row = 0; row < LIBMESH_DIM; ++row) { - auto value = tensor_get_component(T_in, row, 0) * vector_get_component(v, 0); + auto value = tensor_get_component(T_in, row, 0) * v(0); for (unsigned int col = 1; col < LIBMESH_DIM; ++col) - value += tensor_get_component(T_in, row, col) * vector_get_component(v, col); - vector_set_component(out, row, value); + value += tensor_get_component(T_in, row, col) * v(col); + out(row) = value; } return out; @@ -261,10 +261,10 @@ ResultVector multiply_vector_tensor(const VectorLike & v, const TensorLike & T_i for (unsigned int col = 0; col < LIBMESH_DIM; ++col) { - auto value = vector_get_component(v, 0) * tensor_get_component(T_in, 0, col); + auto value = v(0) * tensor_get_component(T_in, 0, col); for (unsigned int row = 1; row < LIBMESH_DIM; ++row) - value += vector_get_component(v, row) * tensor_get_component(T_in, row, col); - vector_set_component(out, col, value); + value += v(row) * tensor_get_component(T_in, row, col); + out(col) = value; } return out; @@ -646,7 +646,7 @@ void tensor_ref::solve(const VectorLike & b, ResultVector & x) const const auto solution = detail::multiply_tensor_vector>(this->inverse(), b); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(x, component, vector_get_component(solution, component)); + x(component) = solution(component); } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 96b1e923e2..814144d60f 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -55,11 +55,11 @@ auto vector_dot_impl(const LeftVector & left, const RightVector & right) static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); using sum_type = - detail::remove_cvref_t; + detail::remove_cvref_t; sum_type sum = sum_type(0); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += vector_get_component(left, component) * vector_get_component(right, component); + sum += left(component) * right(component); return sum; } @@ -69,7 +69,7 @@ LIBMESH_DEVICE_INLINE void assign_vector_components(LeftVector & left, const RightVector & right) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, component, vector_get_component(right, component)); + left(component) = right(component); } template @@ -77,7 +77,7 @@ LIBMESH_DEVICE_INLINE void fill_vector_components(VectorLike & v, const Scalar & value) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(v, component, value); + v(component) = value; } template @@ -85,10 +85,7 @@ LIBMESH_DEVICE_INLINE void update_vector_components(LeftVector & left, const RightVector & right, const Scalar & factor) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(left, - component, - vector_get_component(left, component) + - factor * vector_get_component(right, component)); + left(component) = left(component) + factor * right(component); } template @@ -96,7 +93,7 @@ LIBMESH_DEVICE_INLINE void transform_vector_components(OutputVector & out, const InputVector & in, const TransformOp & op) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - vector_set_component(out, component, op(vector_get_component(in, component))); + out(component) = op(in(component)); } template @@ -114,7 +111,7 @@ LIBMESH_DEVICE_INLINE bool vector_equal_impl(const LeftVector & left, const RightVector & right) { for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (vector_get_component(left, component) != vector_get_component(right, component)) + if (left(component) != right(component)) return false; return true; @@ -185,11 +182,11 @@ auto vector_norm_sq(const VectorLike & v) { static_assert(is_vector_like_v, "vector_norm_sq() requires a vector-like input"); - using norm_type = detail::remove_cvref_t; + using norm_type = detail::remove_cvref_t; norm_type sum = norm_type(0); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += libMesh::TensorTools::norm_sq(vector_get_component(v, component)); + sum += libMesh::TensorTools::norm_sq(v(component)); return sum; } @@ -209,11 +206,11 @@ auto vector_l1_norm(const VectorLike & v) static_assert(is_vector_like_v, "vector_l1_norm() requires a vector-like input"); using std::abs; - using norm_type = detail::remove_cvref_t; + using norm_type = detail::remove_cvref_t; norm_type sum = norm_type(0); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += abs(vector_get_component(v, component)); + sum += abs(v(component)); return sum; } @@ -225,7 +222,7 @@ bool vector_is_zero(const VectorLike & v) static_assert(is_vector_like_v, "vector_is_zero() requires a vector-like input"); for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (vector_get_component(v, component) != vector_value_type_t(0)) + if (v(component) != vector_value_type_t(0)) return false; return true; @@ -262,18 +259,9 @@ auto vector_cross(const LeftVector & left, const RightVector & right) out.zero(); #if LIBMESH_DIM == 3 - vector_set_component(out, - 0, - vector_get_component(left, 1) * vector_get_component(right, 2) - - vector_get_component(left, 2) * vector_get_component(right, 1)); - vector_set_component(out, - 1, - -vector_get_component(left, 0) * vector_get_component(right, 2) + - vector_get_component(left, 2) * vector_get_component(right, 0)); - vector_set_component(out, - 2, - vector_get_component(left, 0) * vector_get_component(right, 1) - - vector_get_component(left, 1) * vector_get_component(right, 0)); + out(0) = left(1) * right(2) - left(2) * right(1); + out(1) = -left(0) * right(2) + left(2) * right(0); + out(2) = left(0) * right(1) - left(1) * right(0); #else libmesh_ignore(left); libmesh_ignore(right); @@ -289,19 +277,13 @@ auto vector_triple_product(const LeftVector & left, const RightVector & right) { #if LIBMESH_DIM == 3 - return vector_get_component(left, 0) * - (vector_get_component(middle, 1) * vector_get_component(right, 2) - - vector_get_component(middle, 2) * vector_get_component(right, 1)) - - vector_get_component(left, 1) * - (vector_get_component(middle, 0) * vector_get_component(right, 2) - - vector_get_component(middle, 2) * vector_get_component(right, 0)) + - vector_get_component(left, 2) * - (vector_get_component(middle, 0) * vector_get_component(right, 1) - - vector_get_component(middle, 1) * vector_get_component(right, 0)); + return left(0) * (middle(1) * right(2) - middle(2) * right(1)) - + left(1) * (middle(0) * right(2) - middle(2) * right(0)) + + left(2) * (middle(0) * right(1) - middle(1) * right(0)); #else libmesh_ignore(left, middle, right); using value_type = - detail::remove_cvref_t; + detail::remove_cvref_t; return value_type(0); #endif } @@ -310,14 +292,11 @@ template LIBMESH_DEVICE_INLINE auto vector_cross_norm_sq(const LeftVector & left, const RightVector & right) { - const auto z = vector_get_component(left, 0) * vector_get_component(right, 1) - - vector_get_component(left, 1) * vector_get_component(right, 0); + const auto z = left(0) * right(1) - left(1) * right(0); #if LIBMESH_DIM == 3 - const auto x = vector_get_component(left, 1) * vector_get_component(right, 2) - - vector_get_component(left, 2) * vector_get_component(right, 1); - const auto y = vector_get_component(left, 0) * vector_get_component(right, 2) - - vector_get_component(left, 2) * vector_get_component(right, 0); + const auto x = left(1) * right(2) - left(2) * right(1); + const auto y = left(0) * right(2) - left(2) * right(0); return x * x + y * y + z * z; #else return z * z; From 33f11de104879c2f7d8b4fb5811257d1edc88e3a Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 16:07:46 -0500 Subject: [PATCH 31/41] Remove redundant set() This might become useful again depending on how we change things in the backend, but for now it's redundant with operator(). --- include/gpu/kokkos_linalg_base.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index a8357a59ba..53d4b93ba8 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -102,15 +102,6 @@ class vector_ref return _view(_index, component); } - template - LIBMESH_DEVICE_INLINE - void set(const unsigned int component, const Scalar & value) - { - static_assert(std::is_assignable::value, - "Cannot write through a vector_ref built from a read-only view"); - _view(_index, component) = value; - } - template LIBMESH_DEVICE_INLINE void assign(const RightVector & right); From b413e3735468a9a294329349775b63507b50b91b Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 16:41:23 -0500 Subject: [PATCH 32/41] Remove tensor_get/set_component operator() setters here lets us avoid an indirection layer --- include/gpu/kokkos_linalg_base.h | 37 +-------- include/gpu/kokkos_storage.h | 2 +- include/gpu/kokkos_tensor_ops.h | 127 +++++++++++++++---------------- 3 files changed, 64 insertions(+), 102 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index 53d4b93ba8..504550e517 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -175,13 +175,10 @@ class tensor_ref return _view(_index, row, col); } - template LIBMESH_DEVICE_INLINE - void set(const unsigned int row, const unsigned int col, const Scalar & value) + decltype(auto) operator()(const unsigned int row, const unsigned int col) { - static_assert(std::is_assignable::value, - "Cannot write through a tensor_ref built from a read-only view"); - _view(_index, row, col) = value; + return _view(_index, row, col); } template @@ -363,34 +360,6 @@ using vector_semantic_type_t = typename vector_traits> template using tensor_semantic_type_t = typename tensor_traits>::semantic_type; -template -LIBMESH_DEVICE_INLINE -decltype(auto) -tensor_get_component(const T & T_in, const unsigned int row, const unsigned int col) -{ - return T_in(row, col); -} - -template -LIBMESH_DEVICE_INLINE -void tensor_set_component(T & T_out, - const unsigned int row, - const unsigned int col, - const Scalar & value) -{ - T_out(row, col) = value; -} - -template -LIBMESH_DEVICE_INLINE -void tensor_set_component(tensor_ref T_out, - const unsigned int row, - const unsigned int col, - const Scalar & value) -{ - T_out.set(row, col, value); -} - template LIBMESH_DEVICE_INLINE vector_ref> @@ -435,7 +404,7 @@ OutputTensor materialize_tensor(const TensorLike & T_in) for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, row, col)); + out(row, col) = T_in(row, col); return out; } diff --git a/include/gpu/kokkos_storage.h b/include/gpu/kokkos_storage.h index 95c0661f70..c63baee1f7 100644 --- a/include/gpu/kokkos_storage.h +++ b/include/gpu/kokkos_storage.h @@ -45,7 +45,7 @@ void store_tensor(const ViewType & view, const unsigned int i, const TensorType for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T, row, col)); + out(row, col) = T(row, col); } } // namespace libMesh::Kokkos diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index a9828b35c3..5787e22625 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -37,7 +37,7 @@ ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) out.zero(); for (unsigned int i = 0; i < dim; ++i) - tensor_set_component(out, i, i, tensor_value_type_t(1)); + out(i, i) = tensor_value_type_t(1); return out; } @@ -72,22 +72,22 @@ auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBME return tensor_value_type_t(1); if (dim == 1) - return tensor_get_component(T_in, 0, 0); + return T_in(0, 0); if (dim == 2) - return tensor_get_component(T_in, 0, 0) * tensor_get_component(T_in, 1, 1) - - tensor_get_component(T_in, 0, 1) * tensor_get_component(T_in, 1, 0); + return T_in(0, 0) * T_in(1, 1) - + T_in(0, 1) * T_in(1, 0); #if LIBMESH_DIM > 2 - const auto a00 = tensor_get_component(T_in, 0, 0); - const auto a01 = tensor_get_component(T_in, 0, 1); - const auto a02 = tensor_get_component(T_in, 0, 2); - const auto a10 = tensor_get_component(T_in, 1, 0); - const auto a11 = tensor_get_component(T_in, 1, 1); - const auto a12 = tensor_get_component(T_in, 1, 2); - const auto a20 = tensor_get_component(T_in, 2, 0); - const auto a21 = tensor_get_component(T_in, 2, 1); - const auto a22 = tensor_get_component(T_in, 2, 2); + const auto a00 = T_in(0, 0); + const auto a01 = T_in(0, 1); + const auto a02 = T_in(0, 2); + const auto a10 = T_in(1, 0); + const auto a11 = T_in(1, 1); + const auto a12 = T_in(1, 2); + const auto a20 = T_in(2, 0); + const auto a21 = T_in(2, 1); + const auto a22 = T_in(2, 2); return a00 * (a11 * a22 - a12 * a21) - a01 * (a10 * a22 - a12 * a20) + @@ -107,10 +107,7 @@ ResultTensor outer_product(const LeftVector & left, const RightVector & right) for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, - row, - col, - left(row) * libmesh_conj(right(col))); + out(row, col) = left(row) * libmesh_conj(right(col)); return out; } @@ -129,7 +126,7 @@ ResultTensor inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_D if (dim == 1) { - tensor_set_component(out, 0, 0, tensor_value_type_t(1) / tensor_get_component(T_in, 0, 0)); + out(0, 0) = tensor_value_type_t(1) / T_in(0, 0); return out; } @@ -137,33 +134,33 @@ ResultTensor inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_D if (dim == 2) { - tensor_set_component(out, 0, 0, tensor_get_component(T_in, 1, 1) / det); - tensor_set_component(out, 0, 1, -tensor_get_component(T_in, 0, 1) / det); - tensor_set_component(out, 1, 0, -tensor_get_component(T_in, 1, 0) / det); - tensor_set_component(out, 1, 1, tensor_get_component(T_in, 0, 0) / det); + out(0, 0) = T_in(1, 1) / det; + out(0, 1) = -T_in(0, 1) / det; + out(1, 0) = -T_in(1, 0) / det; + out(1, 1) = T_in(0, 0) / det; return out; } #if LIBMESH_DIM > 2 - const auto a00 = tensor_get_component(T_in, 0, 0); - const auto a01 = tensor_get_component(T_in, 0, 1); - const auto a02 = tensor_get_component(T_in, 0, 2); - const auto a10 = tensor_get_component(T_in, 1, 0); - const auto a11 = tensor_get_component(T_in, 1, 1); - const auto a12 = tensor_get_component(T_in, 1, 2); - const auto a20 = tensor_get_component(T_in, 2, 0); - const auto a21 = tensor_get_component(T_in, 2, 1); - const auto a22 = tensor_get_component(T_in, 2, 2); - - tensor_set_component(out, 0, 0, (a11 * a22 - a12 * a21) / det); - tensor_set_component(out, 0, 1, (a02 * a21 - a01 * a22) / det); - tensor_set_component(out, 0, 2, (a01 * a12 - a02 * a11) / det); - tensor_set_component(out, 1, 0, (a12 * a20 - a10 * a22) / det); - tensor_set_component(out, 1, 1, (a00 * a22 - a02 * a20) / det); - tensor_set_component(out, 1, 2, (a02 * a10 - a00 * a12) / det); - tensor_set_component(out, 2, 0, (a10 * a21 - a11 * a20) / det); - tensor_set_component(out, 2, 1, (a01 * a20 - a00 * a21) / det); - tensor_set_component(out, 2, 2, (a00 * a11 - a01 * a10) / det); + const auto a00 = T_in(0, 0); + const auto a01 = T_in(0, 1); + const auto a02 = T_in(0, 2); + const auto a10 = T_in(1, 0); + const auto a11 = T_in(1, 1); + const auto a12 = T_in(1, 2); + const auto a20 = T_in(2, 0); + const auto a21 = T_in(2, 1); + const auto a22 = T_in(2, 2); + + out(0, 0) = (a11 * a22 - a12 * a21) / det; + out(0, 1) = (a02 * a21 - a01 * a22) / det; + out(0, 2) = (a01 * a12 - a02 * a11) / det; + out(1, 0) = (a12 * a20 - a10 * a22) / det; + out(1, 1) = (a00 * a22 - a02 * a20) / det; + out(1, 2) = (a02 * a10 - a00 * a12) / det; + out(2, 0) = (a10 * a21 - a11 * a20) / det; + out(2, 1) = (a01 * a20 - a00 * a21) / det; + out(2, 2) = (a00 * a11 - a01 * a10) / det; #else libmesh_ignore(T_in); #endif @@ -180,7 +177,7 @@ ResultTensor transpose(const TensorLike & T_in) for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, tensor_get_component(T_in, col, row)); + out(row, col) = T_in(col, row); return out; } @@ -197,10 +194,10 @@ ResultTensor multiply_tensors(const LeftTensor & left, const RightTensor & right for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) { - auto value = tensor_get_component(left, row, 0) * tensor_get_component(right, 0, col); + auto value = left(row, 0) * right(0, col); for (unsigned int k = 1; k < LIBMESH_DIM; ++k) - value += tensor_get_component(left, row, k) * tensor_get_component(right, k, col); - tensor_set_component(out, row, col, value); + value += left(row, k) * right(k, col); + out(row, col) = value; } return out; @@ -214,7 +211,7 @@ ResultVector row(const TensorLike & T_in, const unsigned int row_index) out.zero(); for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - out(col) = tensor_get_component(T_in, row_index, col); + out(col) = T_in(row_index, col); return out; } @@ -227,7 +224,7 @@ ResultVector column(const TensorLike & T_in, const unsigned int col_index) out.zero(); for (unsigned int row_index = 0; row_index < LIBMESH_DIM; ++row_index) - out(row_index) = tensor_get_component(T_in, row_index, col_index); + out(row_index) = T_in(row_index, col_index); return out; } @@ -243,9 +240,9 @@ ResultVector multiply_tensor_vector(const TensorLike & T_in, const VectorLike & for (unsigned int row = 0; row < LIBMESH_DIM; ++row) { - auto value = tensor_get_component(T_in, row, 0) * v(0); + auto value = T_in(row, 0) * v(0); for (unsigned int col = 1; col < LIBMESH_DIM; ++col) - value += tensor_get_component(T_in, row, col) * v(col); + value += T_in(row, col) * v(col); out(row) = value; } @@ -261,9 +258,9 @@ ResultVector multiply_vector_tensor(const VectorLike & v, const TensorLike & T_i for (unsigned int col = 0; col < LIBMESH_DIM; ++col) { - auto value = v(0) * tensor_get_component(T_in, 0, col); + auto value = v(0) * T_in(0, col); for (unsigned int row = 1; row < LIBMESH_DIM; ++row) - value += v(row) * tensor_get_component(T_in, row, col); + value += v(row) * T_in(row, col); out(col) = value; } @@ -276,7 +273,7 @@ void assign_tensor_components(LeftTensor & left, const RightTensor & right) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, row, col, tensor_get_component(right, row, col)); + left(row, col) = right(row, col); } template @@ -285,7 +282,7 @@ void fill_tensor_components(TensorLike & T_in, const Scalar & value) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(T_in, row, col, value); + T_in(row, col) = value; } template @@ -294,11 +291,7 @@ void update_tensor_components(LeftTensor & left, const RightTensor & right, cons { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(left, - row, - col, - tensor_get_component(left, row, col) + - factor * tensor_get_component(right, row, col)); + left(row, col) = left(row, col) + factor * right(row, col); } template @@ -307,7 +300,7 @@ void transform_tensor_components(OutputTensor & out, const InputTensor & in, con { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - tensor_set_component(out, row, col, op(tensor_get_component(in, row, col))); + out(row, col) = op(in(row, col)); } template @@ -326,7 +319,7 @@ bool tensor_equal_impl(const LeftTensor & left, const RightTensor & right) { for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(left, row, col) != tensor_get_component(right, row, col)) + if (left(row, col) != right(row, col)) return false; return true; @@ -342,12 +335,12 @@ auto tensor_contract(const LeftTensor & left, const RightTensor & right) static_assert(is_tensor_like_v, "tensor_contract() requires a tensor-like right input"); using sum_type = - detail::remove_cvref_t; + detail::remove_cvref_t; sum_type sum = sum_type(0); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += tensor_get_component(left, row, col) * tensor_get_component(right, row, col); + sum += left(row, col) * right(row, col); return sum; } @@ -358,12 +351,12 @@ auto tensor_norm_sq(const TensorLike & T_in) { static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); - using norm_type = detail::remove_cvref_t; + using norm_type = detail::remove_cvref_t; norm_type sum = norm_type(0); for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += libMesh::TensorTools::norm_sq(tensor_get_component(T_in, row, col)); + sum += libMesh::TensorTools::norm_sq(T_in(row, col)); return sum; } @@ -382,10 +375,10 @@ auto tensor_trace(const TensorLike & T_in) { static_assert(is_tensor_like_v, "tensor_trace() requires a tensor-like input"); - using trace_type = detail::remove_cvref_t; + using trace_type = detail::remove_cvref_t; trace_type sum = trace_type(0); for (unsigned int i = 0; i < LIBMESH_DIM; ++i) - sum += tensor_get_component(T_in, i, i); + sum += T_in(i, i); return sum; } @@ -398,7 +391,7 @@ bool tensor_is_zero(const TensorLike & T_in) for (unsigned int row = 0; row < LIBMESH_DIM; ++row) for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (tensor_get_component(T_in, row, col) != tensor_value_type_t(0)) + if (T_in(row, col) != tensor_value_type_t(0)) return false; return true; From 0282e5f0eaf017c5d16920ff969d9cd97de344b0 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 17:58:05 -0500 Subject: [PATCH 33/41] Remove redundant is_zero()/zero-init code --- include/gpu/kokkos_tensor_ops.h | 38 +++---------------- include/gpu/kokkos_vector_ops.h | 34 +++-------------- .../kokkos_tensor_ops_oracle_runners.h | 5 ++- .../kokkos_vector_ops_oracle_runners.h | 4 +- 4 files changed, 16 insertions(+), 65 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 5787e22625..4134a40f63 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -20,15 +20,6 @@ namespace libMesh::Kokkos // Construction and materialization -template -LIBMESH_DEVICE_INLINE -ResultTensor zero_tensor_value() -{ - ResultTensor out; - out.zero(); - return out; -} - template LIBMESH_DEVICE_INLINE ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) @@ -383,20 +374,6 @@ auto tensor_trace(const TensorLike & T_in) return sum; } -template -LIBMESH_DEVICE_INLINE -bool tensor_is_zero(const TensorLike & T_in) -{ - static_assert(is_tensor_like_v, "tensor_is_zero() requires a tensor-like input"); - - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - if (T_in(row, col) != tensor_value_type_t(0)) - return false; - - return true; -} - } // namespace detail // libMesh-like convenience wrappers @@ -427,14 +404,6 @@ auto norm(const TensorLike & T_in) return detail::tensor_norm(T_in); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -bool is_zero(const TensorLike & T_in) -{ - return detail::tensor_is_zero(T_in); -} - template LIBMESH_DEVICE_INLINE auto outer_product(const LeftVector & left, const RightVector & right) @@ -600,7 +569,12 @@ template LIBMESH_DEVICE_INLINE bool tensor_ref::is_zero() const { - return libMesh::Kokkos::is_zero(*this); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + if ((*this)(row, col) != value_type(0)) + return false; + + return true; } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 814144d60f..591635f95c 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -19,15 +19,6 @@ namespace libMesh::Kokkos // Construction and materialization -template -LIBMESH_DEVICE_INLINE -ResultVector zero_vector_value() -{ - ResultVector out; - out.zero(); - return out; -} - template LIBMESH_DEVICE_INLINE auto copy_vector(const VectorLike & v) @@ -215,18 +206,6 @@ auto vector_l1_norm(const VectorLike & v) return sum; } -template -LIBMESH_DEVICE_INLINE -bool vector_is_zero(const VectorLike & v) -{ - static_assert(is_vector_like_v, "vector_is_zero() requires a vector-like input"); - - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - if (v(component) != vector_value_type_t(0)) - return false; - - return true; -} template LIBMESH_DEVICE_INLINE @@ -350,13 +329,6 @@ auto norm(const VectorLike & v) return vector_norm(v); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -bool is_zero(const VectorLike & v) -{ - return vector_is_zero(v); -} template LIBMESH_DEVICE_INLINE @@ -452,7 +424,11 @@ template LIBMESH_DEVICE_INLINE bool vector_ref::is_zero() const { - return libMesh::Kokkos::is_zero(*this); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + if ((*this)(component) != value_type(0)) + return false; + + return true; } template diff --git a/tests/numerics/kokkos_tensor_ops_oracle_runners.h b/tests/numerics/kokkos_tensor_ops_oracle_runners.h index de867d59f6..f607978849 100644 --- a/tests/numerics/kokkos_tensor_ops_oracle_runners.h +++ b/tests/numerics/kokkos_tensor_ops_oracle_runners.h @@ -90,7 +90,7 @@ test_tensor_ops() const auto left = c * A; const Real contract = A.contract(outer); const Real norm = A.norm(); - const auto zero = libMesh::Kokkos::zero_tensor_value(); + const oracle_tensor zero; // Via default initialization std::vector ref_outer(1, outer); std::vector ref_transpose(1, transpose); @@ -133,7 +133,8 @@ test_tensor_ops() const auto left_d = c_ref * A_ref; const Real contract_d = A_ref.contract(outer_d); const Real norm_d = A_ref.norm(); - const bool zero_is_zero_d = libMesh::Kokkos::zero_tensor_value().is_zero(); + oracle_tensor default_tensor; // We don't default to uninitialized! + const bool zero_is_zero_d = default_tensor.is_zero(); const bool A_is_zero_d = A_ref.is_zero(); for (unsigned int i = 0; i < LIBMESH_DIM; ++i) diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h index 233cbfed4a..844b34e375 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_runners.h +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -44,13 +44,13 @@ test_vector_ops_case(const vector_case & info) const Vec outer_left = a_ref * Real(5.0); const Vec mult_assign = a_ref * Real(5.0); const Vec div_assign = a_ref / Real(5.0); - const Vec assign_zero = libMesh::Kokkos::zero_vector_value(); const Real dot = libMesh::Kokkos::vector_dot(a_ref, b_ref); const Real contract = a_ref.contract(b_ref); const Real norm = mix.norm(); const Real norm_sq = mix.norm_sq(); - const Vec zero = libMesh::Kokkos::zero_vector_value(); + const Vec zero; // By default initialization + const Vec assign_zero = zero; unsigned int vector_offset = 0; libMesh::Kokkos::store_vector(d_vectors, vector_offset++, copied); From e93fbd5112f87f9a165199a4f9f9598a2e326721 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 18:13:13 -0500 Subject: [PATCH 34/41] Eliminate vector_value_type_t If we had to support arbitrary third-party classes directly this would have been helpful, but we're writing our own shims here. --- include/gpu/kokkos_linalg_base.h | 11 ----------- include/gpu/kokkos_tensor_ops.h | 30 ++++++++++++++++-------------- include/gpu/kokkos_vector_ops.h | 6 +++--- 3 files changed, 19 insertions(+), 28 deletions(-) diff --git a/include/gpu/kokkos_linalg_base.h b/include/gpu/kokkos_linalg_base.h index 504550e517..f37e9d70eb 100644 --- a/include/gpu/kokkos_linalg_base.h +++ b/include/gpu/kokkos_linalg_base.h @@ -257,21 +257,18 @@ class tensor_ref template struct vector_traits> { - using value_type = T; using semantic_type = libMesh::TypeVector; }; template struct vector_traits> { - using value_type = T; using semantic_type = libMesh::VectorValue; }; template <> struct vector_traits { - using value_type = libMesh::Real; using semantic_type = libMesh::Point; }; @@ -310,14 +307,12 @@ struct is_vector_ref> : std::true_type template struct tensor_traits> { - using value_type = T; using semantic_type = libMesh::TypeTensor; }; template struct tensor_traits> { - using value_type = T; using semantic_type = libMesh::TensorValue; }; @@ -348,12 +343,6 @@ struct is_tensor_ref> : std::true_type { }; -template -using vector_value_type_t = typename vector_traits>::value_type; - -template -using tensor_value_type_t = typename tensor_traits>::value_type; - template using vector_semantic_type_t = typename vector_traits>::semantic_type; diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 4134a40f63..df1bdc2ac4 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -28,7 +28,7 @@ ResultTensor tensor_identity(const unsigned int dim = LIBMESH_DIM) out.zero(); for (unsigned int i = 0; i < dim; ++i) - out(i, i) = tensor_value_type_t(1); + out(i, i) = 1; return out; } @@ -54,13 +54,14 @@ namespace detail template LIBMESH_DEVICE_INLINE -auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) +typename TensorLike::value_type +leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBMESH_DIM) { static_assert(is_tensor_like_v, "detail::leading_determinant() requires a tensor-like input"); if (dim == 0) - return tensor_value_type_t(1); + return 1; if (dim == 1) return T_in(0, 0); @@ -85,7 +86,7 @@ auto leading_determinant(const TensorLike & T_in, const unsigned int dim = LIBME a02 * (a10 * a21 - a11 * a20); #else libmesh_ignore(T_in); - return tensor_value_type_t(0); + return 0; #endif } @@ -117,7 +118,8 @@ ResultTensor inverse(const TensorLike & T_in, const unsigned int dim = LIBMESH_D if (dim == 1) { - out(0, 0) = tensor_value_type_t(1) / T_in(0, 0); + using value_type = typename ResultTensor::value_type; + out(0, 0) = value_type(1) / T_in(0, 0); return out; } @@ -409,11 +411,11 @@ LIBMESH_DEVICE_INLINE auto outer_product(const LeftVector & left, const RightVector & right) -> std::enable_if_t && is_vector_like_v, std::conditional_t::value, - libMesh::TypeTensor>, + libMesh::TypeTensor, ResultTensor>> { using output_type = std::conditional_t::value, - libMesh::TypeTensor>, + libMesh::TypeTensor, ResultTensor>; return detail::outer_product(left, right); } @@ -459,11 +461,11 @@ LIBMESH_DEVICE_INLINE auto row(const TensorLike & T_in, const unsigned int i) -> std::enable_if_t, std::conditional_t::value, - libMesh::TypeVector>, + libMesh::TypeVector, ResultVector>> { using output_type = std::conditional_t::value, - libMesh::TypeVector>, + libMesh::TypeVector, ResultVector>; return detail::row(T_in, i); } @@ -473,11 +475,11 @@ LIBMESH_DEVICE_INLINE auto column(const TensorLike & T_in, const unsigned int i) -> std::enable_if_t, std::conditional_t::value, - libMesh::TypeVector>, + libMesh::TypeVector, ResultVector>> { using output_type = std::conditional_t::value, - libMesh::TypeVector>, + libMesh::TypeVector, ResultVector>; return detail::column(T_in, i); } @@ -648,7 +650,7 @@ auto operator-(const TensorLike & T_in) { return detail::transformed_tensor>( T_in, - detail::negate_value>{}); + detail::negate_value{}); } template @@ -771,7 +773,7 @@ auto operator+=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - detail::update_tensor_components(left, right, tensor_value_type_t(1)); + detail::update_tensor_components(left, right, 1); return left; } @@ -782,7 +784,7 @@ auto operator-=(LeftTensor & left, const RightTensor & right) (is_tensor_ref_v || is_tensor_ref_v), LeftTensor &> { - detail::update_tensor_components(left, right, tensor_value_type_t(-1)); + detail::update_tensor_components(left, right, -1); return left; } diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 591635f95c..1ba61ce6b4 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -456,7 +456,7 @@ auto operator-(const VectorLike & v) { return detail::transformed_vector>( v, - detail::negate_value>{}); + detail::negate_value{}); } template @@ -558,7 +558,7 @@ auto operator+=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - detail::update_vector_components(left, right, vector_value_type_t(1)); + detail::update_vector_components(left, right, 1); return left; } @@ -569,7 +569,7 @@ auto operator-=(LeftVector & left, const RightVector & right) (is_vector_ref_v || is_vector_ref_v), LeftVector &> { - detail::update_vector_components(left, right, vector_value_type_t(-1)); + detail::update_vector_components(left, right, -1); return left; } From 1e737d5e232b196bb78a93ed8327dd5aa4821202 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 18:23:23 -0500 Subject: [PATCH 35/41] Clean up Kokkos norm_sq() --- include/gpu/kokkos_tensor_ops.h | 35 +++++++++------------------------ include/gpu/kokkos_vector_ops.h | 31 ++++++++--------------------- 2 files changed, 17 insertions(+), 49 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index df1bdc2ac4..827317cbcd 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -338,28 +338,12 @@ auto tensor_contract(const LeftTensor & left, const RightTensor & right) return sum; } -template -LIBMESH_DEVICE_INLINE -auto tensor_norm_sq(const TensorLike & T_in) -{ - static_assert(is_tensor_like_v, "tensor_norm_sq() requires a tensor-like input"); - - using norm_type = detail::remove_cvref_t; - - norm_type sum = norm_type(0); - for (unsigned int row = 0; row < LIBMESH_DIM; ++row) - for (unsigned int col = 0; col < LIBMESH_DIM; ++col) - sum += libMesh::TensorTools::norm_sq(T_in(row, col)); - - return sum; -} - template LIBMESH_DEVICE_INLINE auto tensor_norm(const TensorLike & T_in) { using std::sqrt; - return sqrt(tensor_norm_sq(T_in)); + return sqrt(T_in.norm_sq()); } template @@ -390,14 +374,6 @@ auto contract(const LeftTensor & left, const RightTensor & right) return detail::tensor_contract(left, right); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -auto norm_sq(const TensorLike & T_in) -{ - return detail::tensor_norm_sq(T_in); -} - template , int>::type = 0> LIBMESH_DEVICE_INLINE @@ -564,7 +540,14 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::norm_sq() const { - return libMesh::Kokkos::norm_sq(*this); + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int row = 0; row < LIBMESH_DIM; ++row) + for (unsigned int col = 0; col < LIBMESH_DIM; ++col) + sum += libMesh::TensorTools::norm_sq((*this)(row, col)); + + return sum; } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 1ba61ce6b4..0457ccec5a 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -167,27 +167,13 @@ auto vector_dot(const LeftVector & left, const RightVector & right) return detail::vector_dot_impl(left, right); } -template -LIBMESH_DEVICE_INLINE -auto vector_norm_sq(const VectorLike & v) -{ - static_assert(is_vector_like_v, "vector_norm_sq() requires a vector-like input"); - - using norm_type = detail::remove_cvref_t; - - norm_type sum = norm_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += libMesh::TensorTools::norm_sq(v(component)); - - return sum; -} template LIBMESH_DEVICE_INLINE auto vector_norm(const VectorLike & v) { using std::sqrt; - return sqrt(vector_norm_sq(v)); + return sqrt(v.norm_sq()); } template @@ -313,13 +299,6 @@ auto contract(const LeftVector & left, const RightVector & right) return vector_dot(left, right); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -auto norm_sq(const VectorLike & v) -{ - return vector_norm_sq(v); -} template , int>::type = 0> @@ -410,7 +389,13 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::norm_sq() const { - return libMesh::Kokkos::norm_sq(*this); + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += libMesh::TensorTools::norm_sq((*this)(component)); + + return sum; } template From 2f2534b191906084ce068a308b37cc7b07541421 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 11 Jun 2026 18:29:12 -0500 Subject: [PATCH 36/41] Clean up Kokkos norm(), l1_norm() --- include/gpu/kokkos_tensor_ops.h | 17 +----- include/gpu/kokkos_vector_ops.h | 54 +++++-------------- .../kokkos_vector_ops_oracle_runners.h | 4 +- 3 files changed, 18 insertions(+), 57 deletions(-) diff --git a/include/gpu/kokkos_tensor_ops.h b/include/gpu/kokkos_tensor_ops.h index 827317cbcd..5b7a2388de 100644 --- a/include/gpu/kokkos_tensor_ops.h +++ b/include/gpu/kokkos_tensor_ops.h @@ -338,13 +338,6 @@ auto tensor_contract(const LeftTensor & left, const RightTensor & right) return sum; } -template -LIBMESH_DEVICE_INLINE -auto tensor_norm(const TensorLike & T_in) -{ - using std::sqrt; - return sqrt(T_in.norm_sq()); -} template LIBMESH_DEVICE_INLINE @@ -374,13 +367,6 @@ auto contract(const LeftTensor & left, const RightTensor & right) return detail::tensor_contract(left, right); } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -auto norm(const TensorLike & T_in) -{ - return detail::tensor_norm(T_in); -} template LIBMESH_DEVICE_INLINE @@ -533,7 +519,8 @@ template LIBMESH_DEVICE_INLINE auto tensor_ref::norm() const { - return libMesh::Kokkos::norm(*this); + using std::sqrt; + return sqrt(this->norm_sq()); } template diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index 0457ccec5a..db2c7967d6 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -168,31 +168,6 @@ auto vector_dot(const LeftVector & left, const RightVector & right) } -template -LIBMESH_DEVICE_INLINE -auto vector_norm(const VectorLike & v) -{ - using std::sqrt; - return sqrt(v.norm_sq()); -} - -template -LIBMESH_DEVICE_INLINE -auto vector_l1_norm(const VectorLike & v) -{ - static_assert(is_vector_like_v, "vector_l1_norm() requires a vector-like input"); - - using std::abs; - using norm_type = detail::remove_cvref_t; - - norm_type sum = norm_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += abs(v(component)); - - return sum; -} - - template LIBMESH_DEVICE_INLINE auto vector_unit(const VectorLike & v) @@ -200,7 +175,7 @@ auto vector_unit(const VectorLike & v) vector_semantic_type_t, ResultVector> { - const auto length = vector_norm(v); + const auto length = v.norm(); libmesh_assert_not_equal_to(length, static_cast(0.)); using output_type = std::conditional_t::value, vector_semantic_type_t, @@ -274,9 +249,9 @@ auto vector_solid_angle(const VectorA & v01, const VectorB & v02, const VectorC { using std::atan; - const auto norm01 = vector_norm(v01); - const auto norm02 = vector_norm(v02); - const auto norm03 = vector_norm(v03); + const auto norm01 = v01.norm(); + const auto norm02 = v02.norm(); + const auto norm03 = v03.norm(); const auto tan_half_angle = vector_triple_product(v01, v02, v03) / (vector_dot(v01, v02) * norm03 + @@ -300,15 +275,6 @@ auto contract(const LeftVector & left, const RightVector & right) } -template , int>::type = 0> -LIBMESH_DEVICE_INLINE -auto norm(const VectorLike & v) -{ - return vector_norm(v); -} - - template LIBMESH_DEVICE_INLINE auto operator+=(LeftVector & left, const RightVector & right) @@ -382,7 +348,8 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::norm() const { - return libMesh::Kokkos::norm(*this); + using std::sqrt; + return sqrt(this->norm_sq()); } template @@ -402,7 +369,14 @@ template LIBMESH_DEVICE_INLINE auto vector_ref::l1_norm() const { - return vector_l1_norm(*this); + using std::abs; + using norm_type = detail::remove_cvref_t; + + norm_type sum = norm_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += abs((*this)(component)); + + return sum; } template diff --git a/tests/numerics/kokkos_vector_ops_oracle_runners.h b/tests/numerics/kokkos_vector_ops_oracle_runners.h index 844b34e375..48f49a9e40 100644 --- a/tests/numerics/kokkos_vector_ops_oracle_runners.h +++ b/tests/numerics/kokkos_vector_ops_oracle_runners.h @@ -105,7 +105,7 @@ test_vector_ops_case(const vector_case & info) #if LIBMESH_DIM > 2 const Vec cross = a_ref.cross(b_ref); Vec unit_cross = cross; - if (libMesh::Kokkos::vector_norm(cross) > unit_tol) + if (cross.norm() > unit_tol) unit_cross = libMesh::Kokkos::vector_unit(cross); libMesh::Kokkos::store_vector(d_vectors, vector_offset++, cross); @@ -226,7 +226,7 @@ test_mixed_representation_ops() #if LIBMESH_DIM > 2 const auto cross = a_ref.cross(b); Vec unit_cross = cross; - if (libMesh::Kokkos::vector_norm(cross) > unit_tol) + if (cross.norm() > unit_tol) unit_cross = libMesh::Kokkos::vector_unit(cross); libMesh::Kokkos::store_vector(d_vectors, 3, cross); From 3a040afe942d4eb0fc942a7fe15901c5d0f23342 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Mon, 15 Jun 2026 15:12:09 -0500 Subject: [PATCH 37/41] Remove vector_dot_impl --- include/gpu/kokkos_vector_ops.h | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/include/gpu/kokkos_vector_ops.h b/include/gpu/kokkos_vector_ops.h index db2c7967d6..48cc01f92e 100644 --- a/include/gpu/kokkos_vector_ops.h +++ b/include/gpu/kokkos_vector_ops.h @@ -38,23 +38,6 @@ namespace detail // These helpers are shared by the public functions and ref operators so // Kokkos-backed refs use direct component access without extra materialization. -template -LIBMESH_DEVICE_INLINE -auto vector_dot_impl(const LeftVector & left, const RightVector & right) -{ - static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); - static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); - - using sum_type = - detail::remove_cvref_t; - - sum_type sum = sum_type(0); - for (unsigned int component = 0; component < LIBMESH_DIM; ++component) - sum += left(component) * right(component); - - return sum; -} - template LIBMESH_DEVICE_INLINE void assign_vector_components(LeftVector & left, const RightVector & right) @@ -164,7 +147,17 @@ template LIBMESH_DEVICE_INLINE auto vector_dot(const LeftVector & left, const RightVector & right) { - return detail::vector_dot_impl(left, right); + static_assert(is_vector_like_v, "vector_dot() requires a vector-like left input"); + static_assert(is_vector_like_v, "vector_dot() requires a vector-like right input"); + + using sum_type = + detail::remove_cvref_t; + + sum_type sum = sum_type(0); + for (unsigned int component = 0; component < LIBMESH_DIM; ++component) + sum += left(component) * right(component); + + return sum; } From ae672da007e9861a4b8e82c0d9f0877913d217c7 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Fri, 17 Jul 2026 14:41:23 -0500 Subject: [PATCH 38/41] Debugging info in test_installed_headers output --- contrib/bin/test_installed_headers.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/bin/test_installed_headers.sh b/contrib/bin/test_installed_headers.sh index 2154bc19c2..53538d03ed 100755 --- a/contrib/bin/test_installed_headers.sh +++ b/contrib/bin/test_installed_headers.sh @@ -55,9 +55,11 @@ if test "$test_CXXFLAGS" = ""; then if test "$PKG_CONFIG" != "no"; then test_CXXFLAGS=$(pkg-config libmesh --cflags) + echo "Using pkg-config CXXFLAGS $test_CXXFLAGS" elif test -x $LIBMESH_CONFIG_PATH/libmesh-config; then test_CXXFLAGS=$($LIBMESH_CONFIG_PATH/libmesh-config --cppflags --cxxflags --include) + echo "Using libmesh-config CXXFLAGS $test_CXXFLAGS" else echo "Cannot query package installation!!" From 5a51db7a3c9d5b40f768bbca9dadb4e67b18db7f Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Fri, 17 Jul 2026 14:47:57 -0500 Subject: [PATCH 39/41] Check for threads before AC_SUBST of *FLAGS Hopefully this fixes the problem when Kokkos yells at us when we configure with OpenMP but then test its header (which we were doing without -fopenmp), as well as any problems downstream from people missing -fopenmp in pkgconfig. --- m4/libmesh_method.m4 | 14 ++++++++++++++ m4/libmesh_optional_packages.m4 | 13 ------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/m4/libmesh_method.m4 b/m4/libmesh_method.m4 index d74471c84a..8f4f7d9ddb 100644 --- a/m4/libmesh_method.m4 +++ b/m4/libmesh_method.m4 @@ -80,6 +80,20 @@ AC_DEFUN([LIBMESH_SET_METHODS], CXXFLAGS_OPROF="$CXXFLAGS_OPROF $SANITIZE_OPROF_FLAGS" CFLAGS_OPROF="$CFLAGS_OPROF $SANITIZE_OPROF_FLAGS" + # ------------------------------------------------------------- + # Choose between TBB, OpenMP, and pthreads thread models. + # The user can control this by configuring with + # + # --with-thread-model={tbb,pthread,auto,none} + # + # where "auto" will try to automatically detect the best possible + # version (see threads.m4). + # + # We do this here so that any openmp flags will get added to CFLAGS + # and CXXFLAGS before we AC_SUBST them. + # ------------------------------------------------------------- + ACX_BEST_THREAD + dnl conditionally compile selected methods for method in ${METHODS}; do AS_CASE("${method}", diff --git a/m4/libmesh_optional_packages.m4 b/m4/libmesh_optional_packages.m4 index abf765e7ce..df1decdfbc 100644 --- a/m4/libmesh_optional_packages.m4 +++ b/m4/libmesh_optional_packages.m4 @@ -314,19 +314,6 @@ AS_IF([test "$enablenvtx" = yes], # -------------------------------------------------------------- -# ------------------------------------------------------------- -# Choose between TBB, OpenMP, and pthreads thread models. -# The user can control this by configuring with -# -# --with-thread-model={tbb,pthread,auto,none} -# -# where "auto" will try to automatically detect the best possible -# version (see threads.m4). -# ------------------------------------------------------------- -ACX_BEST_THREAD - - - # ------------------------------------------------------------- # LASPACK iterative solvers -- enabled unless # --enable-strict-lgpl is specified From e407ddb98860333c5966a55e94130e7f8f40fac5 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Fri, 17 Jul 2026 14:52:09 -0500 Subject: [PATCH 40/41] Re-bootstrap --- configure | 46411 ++++++++++++++++++++++++++-------------------------- 1 file changed, 23206 insertions(+), 23205 deletions(-) diff --git a/configure b/configure index 1828753dd7..fdc994be17 100755 --- a/configure +++ b/configure @@ -852,15 +852,6 @@ LIBMESH_ENABLE_LASPACK_FALSE LIBMESH_ENABLE_LASPACK_TRUE LASPACK_LIB LASPACK_INCLUDE -TBB_INCLUDE -TBB_LIBRARY -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CC -ax_pthread_config -OPENMP_CXXFLAGS -OPENMP_FFLAGS -OPENMP_CFLAGS NVTX_INCLUDE TPETRA_INCLUDES TPETRA_LIBS @@ -1006,6 +997,15 @@ LIBMESH_DBG_MODE_FALSE LIBMESH_DBG_MODE_TRUE LIBMESH_OPT_MODE_FALSE LIBMESH_OPT_MODE_TRUE +TBB_INCLUDE +TBB_LIBRARY +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +ax_pthread_config +OPENMP_CXXFLAGS +OPENMP_FFLAGS +OPENMP_CFLAGS libmesh_CFLAGS libmesh_CXXFLAGS libmesh_CPPFLAGS @@ -1222,6 +1222,12 @@ enable_sanitize enable_fpe_safety enable_coverage with_methods +with_thread_model +enable_openmp +enable_pthreads +enable_tbb +with_tbb +with_tbb_lib enable_werror enable_paranoid_warnings enable_static @@ -1299,12 +1305,6 @@ with_tpetra with_dtk enable_nvtx with_nvtx -with_thread_model -enable_openmp -enable_pthreads -enable_tbb -with_tbb -with_tbb_lib enable_laspack enable_sfc enable_gzstreams @@ -2056,6 +2056,10 @@ Optional Features: turn on sanitizer flags for the given methods --disable-fpe-safety remove FPE-trapping compiler flags --enable-coverage configure code coverage analysis tools + --disable-openmp build without OpenMP support + --disable-pthreads build without POSIX threading (pthreads) support + --disable-tbb build without threading support via Threading + Building Blocks --enable-werror Turn compilation warnings into errors --enable-paranoid-warnings Turn on paranoid compiler warnings @@ -2133,10 +2137,6 @@ Optional Features: --disable-slepc build without SLEPc eigen solver support --disable-trilinos build without Trilinos support --disable-nvtx build without annotation support via NVTX - --disable-openmp build without OpenMP support - --disable-pthreads build without POSIX threading (pthreads) support - --disable-tbb build without threading support via Threading - Building Blocks --disable-laspack build without LASPACK iterative solver support --disable-sfc build without space-filling curves support --disable-gzstreams build without gzstreams compressed I/O support @@ -2217,6 +2217,12 @@ Optional Packages: --with-cxx-std[=ARG] Exact C++ standard year to require --with-methods=METHODS methods used to build libMesh (opt,dbg,devel,prof,oprof) + --with-thread-model=tbb,pthread,openmp,auto,none + Specify the thread model to use + --with-tbb=PATH Specify the path where Threading Building Blocks is + installed + --with-tbb-lib=PATH Specify the path to Threading Building Blocks + libraries --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). @@ -2258,12 +2264,6 @@ Optional Packages: --with-tpetra=PATH Specify the path to Tpetra installation --with-dtk=PATH Specify the path to Dtk installation --with-nvtx=PATH Specify the path where NVTX is installed - --with-thread-model=tbb,pthread,openmp,auto,none - Specify the thread model to use - --with-tbb=PATH Specify the path where Threading Building Blocks is - installed - --with-tbb-lib=PATH Specify the path to Threading Building Blocks - libraries --with-tecio-x11-include=PATH Path to X11 header files. E.g. /usr/include but _not_ /usr/include/X11 @@ -2827,144 +2827,6 @@ fi } # ac_fn_fc_try_link -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (void); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (void); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext ;; -esac -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 ;; -esac -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - # ac_fn_f77_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -3013,11 +2875,11 @@ fi } # ac_fn_f77_try_link -# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. -ac_fn_cxx_check_header_compile () +ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -3031,7 +2893,7 @@ else case e in #( $4 #include <$2> _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( @@ -3046,261 +2908,399 @@ eval ac_res=\$$3 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_cxx_check_header_compile - -# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES -# ---------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_cxx_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_hi=$ac_mid; break -else case e in #( - e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_lo=$ac_mid; break -else case e in #( - e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done -else case e in #( - e) ac_lo= ac_hi= ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_hi=$ac_mid -else case e in #( - e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval (void) { return $2; } -static unsigned long int ulongval (void) { return $2; } -#include -#include -int -main (void) -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO" -then : - echo >>conftest.val; read $3 &5 -printf %s "checking whether $as_decl_name is declared... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - eval ac_save_FLAGS=\$$6 - as_fn_append $6 " $5" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - eval $6=\$ac_save_FLAGS - ;; -esac -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_check_decl +} # ac_fn_c_check_header_compile -# ac_fn_cxx_check_func LINENO FUNC VAR -# ------------------------------------ +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_cxx_check_func () +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (void); below. */ + +#include +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (void); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$3=yes" +else case e in #( + e) eval "$3=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext ;; +esac +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 ;; +esac +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES +# --------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_cxx_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + eval "$3=yes" +else case e in #( + e) eval "$3=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_cxx_check_header_compile + +# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES +# ---------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_cxx_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_hi=$ac_mid; break +else case e in #( + e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_lo=$ac_mid; break +else case e in #( + e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done +else case e in #( + e) ac_lo= ac_hi= ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + ac_hi=$ac_mid +else case e in #( + e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval (void) { return $2; } +static unsigned long int ulongval (void) { return $2; } +#include +#include +int +main (void) +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_run "$LINENO" +then : + echo >>conftest.val; read $3 &5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + eval "$3=yes" +else case e in #( + e) eval "$3=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + ;; +esac +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_check_decl + +# ac_fn_cxx_check_func LINENO FUNC VAR +# ------------------------------------ +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -37200,6 +37200,7 @@ libmesh_CXXFLAGS="$GCOV_FLAGS $libmesh_CXXFLAGS" + # Check whether --with-methods was given. if test ${with_methods+y} then : @@ -37283,1049 +37284,999 @@ printf "%s\n" "<<< Configuring libMesh with methods \"$METHODS\" >>>" >&6; } CXXFLAGS_OPROF="$CXXFLAGS_OPROF $SANITIZE_OPROF_FLAGS" CFLAGS_OPROF="$CFLAGS_OPROF $SANITIZE_OPROF_FLAGS" - for method in ${METHODS}; do - case "${method}" in #( - optimized|opt) : - build_opt=yes ;; #( - debug|dbg) : - build_dbg=yes ;; #( - devel) : - build_devel=yes ;; #( - profiling|pro|prof) : - build_prof=yes ;; #( - oprofile|oprof) : - build_oprof=yes ;; #( - *) : - as_fn_error $? "bad value ${method} for --with-methods" "$LINENO" 5 ;; -esac - done - - if test x$build_opt = xyes; then - LIBMESH_OPT_MODE_TRUE= - LIBMESH_OPT_MODE_FALSE='#' -else - LIBMESH_OPT_MODE_TRUE='#' - LIBMESH_OPT_MODE_FALSE= -fi - - if test x$build_dbg = xyes; then - LIBMESH_DBG_MODE_TRUE= - LIBMESH_DBG_MODE_FALSE='#' -else - LIBMESH_DBG_MODE_TRUE='#' - LIBMESH_DBG_MODE_FALSE= -fi - - if test x$build_devel = xyes; then - LIBMESH_DEVEL_MODE_TRUE= - LIBMESH_DEVEL_MODE_FALSE='#' -else - LIBMESH_DEVEL_MODE_TRUE='#' - LIBMESH_DEVEL_MODE_FALSE= -fi - - if test x$build_prof = xyes; then - LIBMESH_PROF_MODE_TRUE= - LIBMESH_PROF_MODE_FALSE='#' -else - LIBMESH_PROF_MODE_TRUE='#' - LIBMESH_PROF_MODE_FALSE= -fi - - if test x$build_oprof = xyes; then - LIBMESH_OPROF_MODE_TRUE= - LIBMESH_OPROF_MODE_FALSE='#' -else - LIBMESH_OPROF_MODE_TRUE='#' - LIBMESH_OPROF_MODE_FALSE= -fi + # ------------------------------------------------------------- + # Choose between TBB, OpenMP, and pthreads thread models. + # The user can control this by configuring with + # + # --with-thread-model={tbb,pthread,auto,none} + # + # where "auto" will try to automatically detect the best possible + # version (see threads.m4). + # + # We do this here so that any openmp flags will get added to CFLAGS + # and CXXFLAGS before we AC_SUBST them. + # ------------------------------------------------------------- - LIBMESH_PC_IN="" - # set the configuration input file for libmesh.pc - if test x$build_opt = xyes -then : - LIBMESH_PC_IN="contrib/utils/libmesh-opt.pc.in" -elif test x$build_dbg = xyes -then : - LIBMESH_PC_IN="contrib/utils/libmesh-dbg.pc.in" -elif test x$build_devel = xyes -then : - LIBMESH_PC_IN="contrib/utils/libmesh-devel.pc.in" -elif test x$build_prof = xyes -then : - LIBMESH_PC_IN="contrib/utils/libmesh-prof.pc.in" -elif test x$build_oprof = xyes +# Check whether --with-thread-model was given. +if test ${with_thread_model+y} then : - LIBMESH_PC_IN="contrib/utils/libmesh-oprof.pc.in" + withval=$with_thread_model; case "${withval}" in #( + tbb) : + requested_thread_model=tbb ;; #( + pthread) : + requested_thread_model=pthread ;; #( + pthreads) : + requested_thread_model=pthread ;; #( + openmp) : + requested_thread_model=openmp ;; #( + auto) : + requested_thread_model=auto ;; #( + none) : + requested_thread_model=none ;; #( + *) : + as_fn_error $? "bad value ${withval} for --with-thread-model" "$LINENO" 5 ;; +esac +else case e in #( + e) requested_thread_model=auto ;; +esac fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< User requested thread model: $requested_thread_model >>>" >&5 +printf "%s\n" "<<< User requested thread model: $requested_thread_model >>>" >&6; } - - - - - - - - - - - - - - - - - - - - -ac_config_files="$ac_config_files contrib/utils/libmesh.pc:$LIBMESH_PC_IN" - - - - - - # By default we merely enable some warnings, but we can turn those - # into errors (for library code only, not contrib or external code) - # by configuring with --enable-werror - # Check whether --enable-werror was given. -if test ${enable_werror+y} + # Check whether --enable-openmp was given. +if test ${enable_openmp+y} then : - enableval=$enable_werror; case "${enableval}" in #( + enableval=$enable_openmp; case "${enableval}" in #( yes) : - acsm_enablewerror=yes ;; #( + enableopenmp=yes ;; #( no) : - acsm_enablewerror=no ;; #( + enableopenmp=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-openmp" "$LINENO" 5 ;; esac else case e in #( - e) acsm_enablewerror=no ;; + e) enableopenmp=yes ;; esac fi - ACSM_ANY_WERROR_FLAG=$WERROR_FLAGS - if test "x$acsm_enablewerror" != "xyes" + if test "x$enableopenmp" = "xyes" then : - ACSM_ANY_WERROR_FLAG='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are just warnings >>>" >&5 -printf "%s\n" "<<< Compiler warnings are just warnings >>>" >&6; } -else case e in #( - e) as_CACHEVAR=`printf "%s\n" "ax_cv_check_cxxflags__$WERROR_FLAGS" | sed "$as_sed_sh"` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $WERROR_FLAGS" >&5 -printf %s "checking whether C++ compiler accepts $WERROR_FLAGS... " >&6; } -if eval test \${$as_CACHEVAR+y} + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C++ compiler" >&5 +printf %s "checking for OpenMP flag of C++ compiler... " >&6; } +if test ${ax_cv_cxx_openmp+y} then : printf %s "(cached) " >&6 else case e in #( - e) - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $WERROR_FLAGS" + e) saveCXXFLAGS=$CXXFLAGS +ax_cv_cxx_openmp=unknown +# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), +# -qopenmp (icc>=15), -openmp (icc), +# -xopenmp (Sun), -omp (Tru64), +# -qsmp=omp (AIX), +# none +ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" +if test "x$OPENMP_CXXFLAGS" != x; then + ax_openmp_flags="$OPENMP_CXXFLAGS $ax_openmp_flags" +fi +for ax_openmp_flag in $ax_openmp_flags; do + case $ax_openmp_flag in + none) CXXFLAGS=$saveCXX ;; + *) CXXFLAGS="$saveCXXFLAGS $ax_openmp_flag" ;; + esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main (void) +#include + +static void +parallel_fill(int * data, int n) { + int i; +#pragma omp parallel for + for (i = 0; i < n; ++i) + data[i] = i; +} - ; +int +main(void) +{ + int arr[100000]; + omp_set_num_threads(2); + parallel_fill(arr, 100000); return 0; } + _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - eval "$as_CACHEVAR=yes" -else case e in #( - e) eval "$as_CACHEVAR=no" ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags ;; -esac -fi -eval ac_res=\$$as_CACHEVAR - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +if ac_fn_cxx_try_link "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are now errors >>>" >&5 -printf "%s\n" "<<< Compiler warnings are now errors >>>" >&6; } -else case e in #( - e) ACSM_ANY_WERROR_FLAG='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler does not support $WERROR_FLAGS >>>" >&5 -printf "%s\n" "<<< Compiler does not support $WERROR_FLAGS >>>" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are just warnings >>>" >&5 -printf "%s\n" "<<< Compiler warnings are just warnings >>>" >&6; } ;; -esac + ax_cv_cxx_openmp=$ax_openmp_flag; break fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +done +CXXFLAGS=$saveCXXFLAGS ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_openmp" >&5 +printf "%s\n" "$ax_cv_cxx_openmp" >&6; } +if test "x$ax_cv_cxx_openmp" = "xunknown"; then + enableopenmp=no +else + if test "x$ax_cv_cxx_openmp" != "xnone"; then + OPENMP_CXXFLAGS=$ax_cv_cxx_openmp + fi +printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h +fi + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - # By default we merely enable some of the most common compiler - # warnings, but we can turn on as many warnings as we avoid triggering - # (for library code only, not contrib or external code) by configuring - # with --enable-paranoid-warnings - # Check whether --enable-paranoid-warnings was given. -if test ${enable_paranoid_warnings+y} + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C compiler" >&5 +printf %s "checking for OpenMP flag of C compiler... " >&6; } +if test ${ax_cv_c_openmp+y} then : - enableval=$enable_paranoid_warnings; case "${enableval}" in #( - yes) : - acsm_enableparanoid=yes ;; #( - no) : - acsm_enableparanoid=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-paranoid-warnings" "$LINENO" 5 ;; -esac + printf %s "(cached) " >&6 else case e in #( - e) acsm_enableparanoid=no ;; -esac + e) saveCFLAGS=$CFLAGS +ax_cv_c_openmp=unknown +# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), +# -qopenmp (icc>=15), -openmp (icc), +# -xopenmp (Sun), -omp (Tru64), +# -qsmp=omp (AIX), +# none +ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" +if test "x$OPENMP_CFLAGS" != x; then + ax_openmp_flags="$OPENMP_CFLAGS $ax_openmp_flags" fi +for ax_openmp_flag in $ax_openmp_flags; do + case $ax_openmp_flag in + none) CFLAGS=$saveC ;; + *) CFLAGS="$saveCFLAGS $ax_openmp_flag" ;; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - ACSM_ANY_PARANOID_FLAGS=$ACSM_PARANOID_FLAGS - if test "x$acsm_enableparanoid" != "xyes" -then : - ACSM_ANY_PARANOID_FLAGS='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling extra paranoid compiler warnings >>>" >&5 -printf "%s\n" "<<< Disabling extra paranoid compiler warnings >>>" >&6; } -else case e in #( - e) ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $WERROR_FLAGS $PARANOID_FLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +static void +parallel_fill(int * data, int n) +{ + int i; +#pragma omp parallel for + for (i = 0; i < n; ++i) + data[i] = i; +} int -main (void) +main(void) { - - ; + int arr[100000]; + omp_set_num_threads(2); + parallel_fill(arr, 100000); return 0; } + _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Enabled extra paranoid compiler warnings >>>" >&5 -printf "%s\n" "<<< Enabled extra paranoid compiler warnings >>>" >&6; } -else case e in #( - e) ACSM_ANY_PARANOID_FLAGS='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler may not support all of $PARANOID_FLAGS >>>" >&5 -printf "%s\n" "<<< Compiler may not support all of $PARANOID_FLAGS >>>" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling extra paranoid compiler warnings >>>" >&5 -printf "%s\n" "<<< Disabling extra paranoid compiler warnings >>>" >&6; } ;; -esac + ax_cv_c_openmp=$ax_openmp_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +done +CFLAGS=$saveCFLAGS ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_openmp" >&5 +printf "%s\n" "$ax_cv_c_openmp" >&6; } +if test "x$ax_cv_c_openmp" = "xunknown"; then + : +else + if test "x$ax_cv_c_openmp" != "xnone"; then + OPENMP_CFLAGS=$ax_cv_c_openmp + fi +printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h +fi -# -------------------------------------------------------------- -# Test for optional modern C++ features, which libMesh offers shims -# for and/or which libMesh applications may want to selectively use. -# -------------------------------------------------------------- - - have_cxx14_make_unique=no - - # std::make_unique is actually part of the C++14 standard, but some - # compilers might (?) support it via the -std=c++11 flag, or eventually - # with no flag at all. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++14 std::make_unique support" >&5 -printf %s "checking for C++14 std::make_unique support... " >&6; } - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test "x$enablefortran" = "xyes" +then : - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include -int -main (void) -{ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of Fortran 77 compiler" >&5 +printf %s "checking for OpenMP flag of Fortran 77 compiler... " >&6; } +if test ${ax_cv_f77_openmp+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) saveFFLAGS=$FFLAGS +ax_cv_f77_openmp=unknown +# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), +# -qopenmp (icc>=15), -openmp (icc), +# -xopenmp (Sun), -omp (Tru64), +# -qsmp=omp (AIX), +# none +ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" +if test "x$OPENMP_FFLAGS" != x; then + ax_openmp_flags="$OPENMP_FFLAGS $ax_openmp_flags" +fi +for ax_openmp_flag in $ax_openmp_flags; do + case $ax_openmp_flag in + none) FFLAGS=$saveF ;; + *) FFLAGS="$saveFFLAGS $ax_openmp_flag" ;; + esac + cat > conftest.$ac_ext <<_ACEOF - { - // Normally, you would use "auto" on the LHS here to avoid - // repeating the type name, but we are not testing auto here. - std::unique_ptr up = std::make_unique(42); - } // Foo deleted when up goes out of scope +#include - ; +static void +parallel_fill(int * data, int n) +{ + int i; +#pragma omp parallel for + for (i = 0; i < n; ++i) + data[i] = i; +} + +int +main(void) +{ + int arr[100000]; + omp_set_num_threads(2); + parallel_fill(arr, 100000); return 0; } + _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_f77_try_link "$LINENO" then : + ax_cv_f77_openmp=$ax_openmp_flag; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +done +FFLAGS=$saveFFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f77_openmp" >&5 +printf "%s\n" "$ax_cv_f77_openmp" >&6; } +if test "x$ax_cv_f77_openmp" = "xunknown"; then + : +else + if test "x$ax_cv_f77_openmp" != "xnone"; then + OPENMP_FFLAGS=$ax_cv_f77_openmp + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX14_MAKE_UNIQUE 1" >>confdefs.h - - have_cxx14_make_unique=yes +printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - # Reset the flags - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test x$have_cxx14_make_unique == xyes; then - HAVE_CXX14_MAKE_UNIQUE_TRUE= - HAVE_CXX14_MAKE_UNIQUE_FALSE='#' -else - HAVE_CXX14_MAKE_UNIQUE_TRUE='#' - HAVE_CXX14_MAKE_UNIQUE_FALSE= fi + if test "x$OPENMP_CFLAGS" != "x" +then : - - have_cxx11_regex=no - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::regex support" >&5 -printf %s "checking for C++11 std::regex support... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with C OpenMP support >>>" >&5 +printf "%s\n" "<<< Configuring library with C OpenMP support >>>" >&6; } + CFLAGS_OPT="$CFLAGS_OPT $OPENMP_CFLAGS" + CFLAGS_DBG="$CFLAGS_DBG $OPENMP_CFLAGS" + CFLAGS_DEVEL="$CFLAGS_DEVEL $OPENMP_CFLAGS" + CFLAGS_PROF="$CFLAGS_PROF $OPENMP_CFLAGS" + CFLAGS_OPROF="$CFLAGS_OPROF $OPENMP_CFLAGS" - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" +fi - if test "$cross_compiling" = yes + if test "x$OPENMP_FFLAGS" != "x" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Fortran OpenMP support >>>" >&5 +printf "%s\n" "<<< Configuring library with Fortran OpenMP support >>>" >&6; } + FFLAGS="$FFLAGS $OPENMP_FFLAGS" -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include +fi -int -main (void) -{ + if test "x$OPENMP_CXXFLAGS" != "x" +then : - std::regex integer_regex("(\\\\+|-)?[[:digit:]]+"); - std::regex_match("abc", integer_regex); - std::regex_match("123", integer_regex); - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX11_REGEX 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with OpenMP support >>>" >&5 +printf "%s\n" "<<< Configuring library with OpenMP support >>>" >&6; } + CXXFLAGS_OPT="$CXXFLAGS_OPT $OPENMP_CXXFLAGS" + CXXFLAGS_DBG="$CXXFLAGS_DBG $OPENMP_CXXFLAGS" + CXXFLAGS_DEVEL="$CXXFLAGS_DEVEL $OPENMP_CXXFLAGS" + CXXFLAGS_PROF="$CXXFLAGS_PROF $OPENMP_CXXFLAGS" + CXXFLAGS_OPROF="$CXXFLAGS_OPROF $OPENMP_CXXFLAGS" - have_cxx11_regex=yes else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + e) if test "x$requested_thread_model" = "xopenmp" +then : + as_fn_error $? "requested openmp threading model, but C++ compiler does not support openmp." "$LINENO" 5 +fi ;; esac fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +else case e in #( + e) if test "x$requested_thread_model" = "xopenmp" +then : + as_fn_error $? "requested openmp threading model, but --disable-openmp has been specified." "$LINENO" 5 +fi ;; esac fi + found_thread_model=none - # Reset the flags - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - + if test "x$requested_thread_model" = "xpthread" || test "x$requested_thread_model" = "xauto" || test "x$requested_thread_model" = "xopenmp" +then : - if test x$have_cxx11_regex == xyes; then - HAVE_CXX11_REGEX_TRUE= - HAVE_CXX11_REGEX_FALSE='#' -else - HAVE_CXX11_REGEX_TRUE='#' - HAVE_CXX11_REGEX_FALSE= + # Check whether --enable-pthreads was given. +if test ${enable_pthreads+y} +then : + enableval=$enable_pthreads; case "${enableval}" in #( + yes) : + enablepthreads=yes ;; #( + no) : + enablepthreads=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-pthreads" "$LINENO" 5 ;; +esac +else case e in #( + e) enablepthreads=$enableoptional ;; +esac fi + if test "x$enablepthreads" = "xyes" +then : - have_cxx11_thread=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 support" >&5 -printf %s "checking for C++11 support... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" +ax_pthread_ok=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. - #include - #include - #include - void my_thread_func() {} +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +printf %s "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (void); int main (void) { - - thread_local int i; - std::thread t(my_thread_func); - t.join(); - - std::atomic ab1, ab2; - ab1.store(true, std::memory_order_relaxed); - ab2.store(false, std::memory_order_relaxed); - ab1.exchange(ab2); - - std::mutex m; - std::lock_guard lock(m); - - std::atomic_thread_fence(std::memory_order_acquire); - std::atomic_thread_fence(std::memory_order_release); - - // We use this function in one of our unit tests now. - unsigned int n_threads = std::thread::hardware_concurrency(); - +return pthread_join (); ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +printf "%s\n" "$ax_pthread_ok" >&6; } + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). -printf "%s\n" "#define HAVE_CXX11_THREAD 1" >>confdefs.h +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. - have_cxx11_thread=yes +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: - # Reset the flags - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) +case ${host_os} in + solaris*) - if test x$have_cxx11_thread == xyes; then - HAVE_CXX11_THREAD_TRUE= - HAVE_CXX11_THREAD_FALSE='#' -else - HAVE_CXX11_THREAD_TRUE='#' - HAVE_CXX11_THREAD_FALSE= -fi + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + darwin*) + ax_pthread_flags="-pthread $ax_pthread_flags" + ;; +esac - have_cxx11_condition_variable=no +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 support" >&5 -printf %s "checking for C++11 support... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + case $flag in + none) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +printf %s "checking whether pthreads work without any flags... " >&6; } + ;; + -*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 +printf %s "checking whether pthreads work with $flag... " >&6; } + PTHREAD_CFLAGS="$flag" + ;; - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ax_pthread_config+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ax_pthread_config="yes" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - # Test code is from the accepted answer on: - # http://stackoverflow.com/questions/16350473/why-do-i-need-stdcondition-variable - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi ;; +esac +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +printf "%s\n" "$ax_pthread_config" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - #include - #include - #include - #include - #include - bool is_ready = false; - std::mutex m; - std::condition_variable cv; + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; - void - test() - { - std::this_thread::sleep_for(std::chrono::seconds(30)); - std::unique_lock ulock(m); - is_ready = true; - cv.notify_one(); - } + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 +printf %s "checking for the pthreads library -l$flag... " >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; } int main (void) { - - std::thread t(test); - std::unique_lock ulock(m); - while (!is_ready) - { - cv.wait(ulock); - if (!is_ready) - std::cout << "Spurious wake up!\n"; - } - t.join(); - +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX11_CONDITION_VARIABLE 1" >>confdefs.h - - have_cxx11_condition_variable=yes - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac + ax_pthread_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext - # Reset the flags - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +printf "%s\n" "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = xyes; then + break; + fi - if test x$have_cxx11_condition_variable == xyes; then - HAVE_CXX11_CONDITION_VARIABLE_TRUE= - HAVE_CXX11_CONDITION_VARIABLE_FALSE='#' -else - HAVE_CXX11_CONDITION_VARIABLE_TRUE='#' - HAVE_CXX11_CONDITION_VARIABLE_FALSE= + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done fi +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # This is designed to be an exhaustive test of the capabilities of - # the header, as defined by the C++11 standard. We - # don't use all of these in libmesh, but we want application code - # to be able to rely on the value of LIBMESH_HAVE_CXX11_TYPE_TRAITS. - # - # Not all compilers fully implement the header. For example, GCC - # 4.9.1 does not provide the is_trivially_copyable() function, but - # it does provide support for other functions. - # - # See also: - # http://en.cppreference.com/w/cpp/header/type_traits - have_cxx11_type_traits=no - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 support" >&5 -printf %s "checking for C++11 support... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +printf %s "checking for joinable pthread attribute... " >&6; } + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +int +main (void) +{ +int attr = $attr; return attr /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + attr_name=$attr; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 +printf "%s\n" "$attr_name" >&6; } + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - #include - #include +printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $attr_name" >>confdefs.h - // std::enable_if - the return type of the function is only defined if - // T is an integral type. Therefore, it's a *compile* error if you - // try to call it with a non-integral type. - template - typename std::enable_if::value, bool>::type - is_odd (T i) - { - return static_cast(i%2); - } + fi - // std::underlying_type - names the underlying type of an enum - enum e1 {}; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 +printf %s "checking if more special flags are required for pthreads... " >&6; } + flag=no + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + flag="-mt -D_REENTRANT" + fi + ;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 +printf "%s\n" "${flag}" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi - // typedef (named fn_ptr) for a function that takes nothing and returns char. - typedef char (*fn_ptr)(); + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include int main (void) { - - std::cout << std::is_void::value - // << std::is_null_pointer::value // C++14 - // << std::is_literal_type::value // C++17 - << std::is_integral::value - << std::is_floating_point::value - << std::is_array::value - << std::is_enum::value - << std::is_union::value - << std::is_class::value - << std::is_function::value - << std::is_pointer::value - << std::is_lvalue_reference::value - << std::is_rvalue_reference::value - << std::is_member_object_pointer::value - << std::is_fundamental::value - << std::is_arithmetic::value - << std::is_scalar::value - << std::is_object::value - << std::is_compound::value - << std::is_reference::value - << std::is_member_pointer::value - << std::is_const::value - << std::is_volatile::value - << std::is_trivial::value - << std::is_trivially_copyable::value // Not supported by GCC 4.6.3 with -std=c++0x - << std::is_standard_layout::value - << std::is_pod::value - << std::is_empty::value - << std::is_polymorphic::value - << std::is_abstract::value - << std::is_signed::value - << std::is_unsigned::value - << std::is_constructible::value - << std::is_trivially_constructible::value - << std::is_nothrow_constructible::value - << std::is_default_constructible::value - << std::is_trivially_default_constructible::value - << std::is_nothrow_default_constructible::value - << std::is_copy_constructible::value - << std::is_trivially_copy_constructible::value - << std::is_nothrow_copy_constructible::value - << std::is_move_constructible::value - << std::is_trivially_move_constructible::value - << std::is_nothrow_move_constructible::value - << std::is_assignable::value - << std::is_trivially_assignable::value - << std::is_nothrow_assignable::value - << std::is_copy_assignable::value - << std::is_trivially_copy_assignable::value - << std::is_nothrow_copy_assignable::value - << std::is_move_assignable::value - << std::is_trivially_move_assignable::value - << std::is_nothrow_move_assignable::value - << std::is_destructible::value - << std::is_trivially_destructible::value - << std::is_nothrow_destructible::value - << std::has_virtual_destructor::value - << std::alignment_of::value - << std::rank::value - << std::extent::value - << std::is_same::value - << std::is_base_of::value - << std::is_convertible::value - << std::is_same::type>::value // std::remove_cv - << std::is_same::type>::value // std::remove_const - << std::is_same::type>::value // std::remove_volatile - << std::is_same::type>::value // std::add_cv - << std::is_same::type>::value // std::add_const - << std::is_same::type>::value // std::add_volatile - << std::is_same::type>::value // std::remove_reference - << std::is_same::type>::value // std::add_lvalue_reference - << std::is_same::type>::value // std::add_rvalue_reference - << std::is_same::type>::value // std::remove_pointer - << std::is_same::type>::value // std::add_pointer - << std::is_same::type>::value // std::make_signed - << std::is_same::type>::value // std::make_unsigned - << std::is_same::type>::value // std::remove_extent - << std::is_same::type>::value // std::remove_all_extents - << std::is_same::type>::value // std::decay - << is_odd(13) // std::enable_if - << std::is_same::type>::value // std::conditional - << std::is_same::type>::value // std::common_type - << std::is_same::type>::value // std::underlying_type - << std::is_same::type>::value // std::result_of - << std::false_type::value - << std::true_type::value - << std::endl; - - // std::aligned_storage - typedef std::aligned_storage::type aligned_t; - - // std::aligned_union - typedef std::aligned_union::type union_t; - +int i = PTHREAD_PRIO_INHERIT; ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_PTHREAD_PRIO_INHERIT=yes +else case e in #( + e) ax_cv_PTHREAD_PRIO_INHERIT=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h -printf "%s\n" "#define HAVE_CXX11_TYPE_TRAITS 1" >>confdefs.h +fi - have_cxx11_type_traits=yes + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + # More AIX lossage: compile with *_r variant + if test "x$GCC" != xyes; then + case $host_os in + aix*) + case "x/$CC" in #( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in #( + x/*) : + if as_fn_executable_p ${CC}_r +then : + PTHREAD_CC="${CC}_r" +fi ;; #( + *) : + for ac_prog in ${CC}_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PTHREAD_CC+y} +then : + printf %s "(cached) " >&6 else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + e) if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +printf "%s\n" "$PTHREAD_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; #( + *) : ;; esac + ;; + esac + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - # Reset the flags - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - if test x$have_cxx11_type_traits == xyes; then - HAVE_CXX11_TYPE_TRAITS_TRUE= - HAVE_CXX11_TYPE_TRAITS_FALSE='#' -else - HAVE_CXX11_TYPE_TRAITS_TRUE='#' - HAVE_CXX11_TYPE_TRAITS_FALSE= -fi - have_cxx11_inverse_hyperbolic_sine=no - have_cxx11_inverse_hyperbolic_cosine=no - have_cxx11_inverse_hyperbolic_tangent=no +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then - have_cxx11_inverse_hyperbolic_sine_complex=no - have_cxx11_inverse_hyperbolic_cosine_complex=no - have_cxx11_inverse_hyperbolic_tangent_complex=no +printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h - ac_ext=cpp + : +else + ax_pthread_ok=no + +fi +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" - - # Test for asinh - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::asinh support in " >&5 -printf %s "checking for C++11 std::asinh support in ... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main (void) -{ - - double x = std::asinh(1.); - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + if test "x$ax_pthread_ok" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_SINE 1" >>confdefs.h +printf "%s\n" "#define USING_THREADS 1" >>confdefs.h - have_cxx11_inverse_hyperbolic_sine=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with pthread support >>>" >&5 +printf "%s\n" "<<< Configuring library with pthread support >>>" >&6; } + libmesh_optional_INCLUDES="$PTHREAD_CFLAGS $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$PTHREAD_LIBS $libmesh_optional_LIBS" + found_thread_model=pthread else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + e) enablepthreads=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - # Test for acosh - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::acosh support in " >&5 -printf %s "checking for C++11 std::acosh support in ... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include +fi -int -main (void) -{ + if test "x$enablepthreads" = "xno" && test "x$requested_thread_model" = "xpthread" +then : + as_fn_error $? "requested threading model, pthreads, could not be found." "$LINENO" 5 +fi + if test "x$enablepthreads" = "xno" && test "x$requested_thread_model" = "xopenmp" +then : + as_fn_error $? "openmp threading model requested, but required pthread support unavailable." "$LINENO" 5 +fi - double x = std::acosh(1.); +fi - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + if test "x$found_thread_model" = "xnone" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE 1" >>confdefs.h + if test "x$requested_thread_model" = "xtbb" || test "x$requested_thread_model" = "xauto" +then : - have_cxx11_inverse_hyperbolic_cosine=yes + # Check whether --enable-tbb was given. +if test ${enable_tbb+y} +then : + enableval=$enable_tbb; case "${enableval}" in #( + yes) : + enabletbb=yes ;; #( + no) : + enabletbb=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-tbb" "$LINENO" 5 ;; +esac else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + e) enabletbb=$enableoptional ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - # Test for atanh - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::atanh support in " >&5 -printf %s "checking for C++11 std::atanh support in ... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main (void) -{ - double x = std::atanh(0.); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + if test "x$enabletbb" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT 1" >>confdefs.h - - have_cxx11_inverse_hyperbolic_tangent=yes +# Check whether --with-tbb was given. +if test ${with_tbb+y} +then : + withval=$with_tbb; withtbb=$withval else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + e) withtbb=$TBB_DIR ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - # Test for asinh(complex) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::asinh(complex) support in " >&5 -printf %s "checking for C++11 std::asinh(complex) support in ... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -int -main (void) -{ +# Check whether --with-tbb-lib was given. +if test ${with_tbb_lib+y} +then : + withval=$with_tbb_lib; withtbblib=$withval +else case e in #( + e) withtbblib=$TBB_LIB_PATH ;; +esac +fi - std::complex z(0, -2); - std::complex x = std::asinh(z); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + if test "$withtbb" != no then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX 1" >>confdefs.h + if test "x$withtbb" = "x" +then : + withtbb=/usr +fi - have_cxx11_inverse_hyperbolic_sine_complex=yes + case $withtbb in + "~/"*) withtbb=$HOME${withtbb#"~"} ;; + esac + tbb_is_onetbb=no + if test -r $withtbb/include/tbb/version.h +then : + TBB_INCLUDE_PATH=$withtbb/include + tbb_is_onetbb=yes else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + e) if test -r $withtbb/include/tbb/tbb_stddef.h +then : + TBB_INCLUDE_PATH=$withtbb/include +fi ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - # Test for acosh(complex) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::acosh(complex) support in " >&5 -printf %s "checking for C++11 std::acosh(complex) support in ... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include - -int -main (void) -{ + if test "x$withtbblib" != "x" +then : + TBB_LIBS=$withtbblib +else case e in #( + e) TBB_LIBS=$withtbb/lib ;; +esac +fi - std::complex z(0.5, 0); - std::complex x = std::acosh(z); +fi - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + if test "x$TBB_INCLUDE_PATH" != "x" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX 1" >>confdefs.h + TBB_LIBRARY="-L$TBB_LIBS -ltbb -ltbbmalloc" + TBB_INCLUDE=-I$TBB_INCLUDE_PATH - have_cxx11_inverse_hyperbolic_cosine_complex=yes + if test "x$RPATHFLAG" != "x" && test -d $TBB_LIBS +then : + TBB_LIBRARY="${RPATHFLAG}${TBB_LIBS} $TBB_LIBRARY" +fi + if test "x$tbb_is_onetbb" = "xyes" +then : + tbbverfile=$TBB_INCLUDE_PATH/tbb/version.h else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + e) tbbverfile=$TBB_INCLUDE_PATH/tbb/tbb_stddef.h ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - # Test for atanh(complex) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::atanh(complex) support in " >&5 -printf %s "checking for C++11 std::atanh(complex) support in ... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main (void) -{ + tbbmajor=`grep "define TBB_VERSION_MAJOR" $tbbverfile | sed -e "s/#define TBB_VERSION_MAJOR[ ]*//g"` + tbbminor=`grep "define TBB_VERSION_MINOR" $tbbverfile | sed -e "s/#define TBB_VERSION_MINOR[ ]*//g"` - std::complex z(2, 0); - std::complex x = std::atanh(z); +else case e in #( + e) enabletbb=no ;; +esac +fi - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + if test "x$enabletbb" != "xno" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TBB support" >&5 +printf %s "checking for TBB support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - have_cxx11_inverse_hyperbolic_tangent_complex=yes -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + saveCXXFLAGS="$CXXFLAGS" + CXXFLAGS="$saveCXXFLAGS $TBB_INCLUDE" - # Test for erf - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::erf support in " >&5 -printf %s "checking for C++11 std::erf support in ... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main (void) { - double val = std::erf(1.); + tbb::blocked_range r(0, 1); + (void)r.size(); ; return 0; @@ -38334,132 +38285,77 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX11_ERF 1" >>confdefs.h - - have_cxx11_erf=yes + enabletbb=yes else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; + enabletbb=no + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - # Reset the flags - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp + CXXFLAGS=$saveCXXFLAGS + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test x$have_cxx11_inverse_hyperbolic_sine == xyes; then - HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_TRUE= - HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_FALSE='#' -else - HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_TRUE='#' - HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_FALSE= fi - if test x$have_cxx11_inverse_hyperbolic_cosine == xyes; then - HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_TRUE= - HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_FALSE='#' -else - HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_TRUE='#' - HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_FALSE= -fi + if test "x$enabletbb" != "xno" +then : - if test x$have_cxx11_inverse_hyperbolic_tangent == xyes; then - HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_TRUE= - HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_FALSE='#' -else - HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_TRUE='#' - HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_FALSE= -fi +printf "%s\n" "#define DETECTED_TBB_VERSION_MAJOR $tbbmajor" >>confdefs.h - if test x$have_cxx11_inverse_hyperbolic_sine_complex == xyes; then - HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX_TRUE= - HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX_FALSE='#' -else - HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX_TRUE='#' - HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX_FALSE= -fi - if test x$have_cxx11_inverse_hyperbolic_cosine_complex == xyes; then - HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX_TRUE= - HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX_FALSE='#' -else - HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX_TRUE='#' - HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX_FALSE= -fi +printf "%s\n" "#define DETECTED_TBB_VERSION_MINOR $tbbminor" >>confdefs.h - if test x$have_cxx11_inverse_hyperbolic_tangent_complex == xyes; then - HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX_TRUE= - HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX_FALSE='#' -else - HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX_TRUE='#' - HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX_FALSE= -fi + if test "x$tbb_is_onetbb" = "xyes" +then : + +printf "%s\n" "#define HAVE_ONETBB 1" >>confdefs.h - if test x$have_cxx11_erf == xyes; then - HAVE_CXX11_ERF_TRUE= - HAVE_CXX11_ERF_FALSE='#' -else - HAVE_CXX11_ERF_TRUE='#' - HAVE_CXX11_ERF_FALSE= fi - have_cxx17_fallthrough_attribute=no - have_double_underscore_attribute_fallthrough=no - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +printf "%s\n" "#define USING_THREADS 1" >>confdefs.h - # We don't want to use [[fallthrough]] if it generates a compiler warning, so - # turn on -Werror for the test. This way, if a warning is generated it will be - # treated as an error and the test will fail. We also try to make sure as many - # warnings as possible are turned on, so the test has every opportunity to fail. - old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -Werror -Wall -Wextra -pedantic" +printf "%s\n" "#define HAVE_TBB_API 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++17 fallthrough attribute support" >&5 -printf %s "checking for C++17 fallthrough attribute support... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Intel TBB threading support >>>" >&5 +printf "%s\n" "<<< Configuring library with Intel TBB threading support >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 +printf %s "checking for thread local storage (TLS) class... " >&6; } + if test ${ac_cv_tls+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do + case $ax_tls_keyword in #( + none) : + ac_cv_tls=none ; break ;; #( + *) : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main (void) { - - int i=1, j; - switch(i) { - case 0: - j=0; - [[fallthrough]]; - case 1: - j=1; - break; - default: - j=2; - } - (void)j; // Avoid unused variable warning - +static $ax_tls_keyword int bar; ; return 0; @@ -38467,139 +38363,137 @@ main (void) _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - - if test "x$enablecxx11" = "xyes" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_CXX17_FALLTHROUGH_ATTRIBUTE 1" >>confdefs.h - - have_cxx17_fallthrough_attribute=yes - + ac_cv_tls=$ax_tls_keyword ; break else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, but disabled." >&5 -printf "%s\n" "yes, but disabled." >&6; } - -printf "%s\n" "#define HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_BUT_DISABLED 1" >>confdefs.h - - ;; + e) ac_cv_tls=none + ;; esac fi - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; +esac + done + ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - # If standard [[fallthrough]]; didn't work, maybe __attribute__((fallthrough)); - # will. This definitely works for GCC7 but generates an error on - # GCC6. Clang 3.9.0 warns about it, which we also don't want, so - # we are using the -Werror flag when testing again. - if test "x$have_cxx17_fallthrough_attribute" = "xno" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 +printf "%s\n" "$ac_cv_tls" >&6; } + + if test "$ac_cv_tls" != "none" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((fallthrough)) support" >&5 -printf %s "checking for __attribute__ ((fallthrough)) support... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +printf "%s\n" "#define TLS $ac_cv_tls" >>confdefs.h + : +else case e in #( + e) : ;; +esac +fi -int -main (void) -{ - int i=1, j; - switch(i) { - case 0: - j=0; - __attribute__((fallthrough)); - case 1: - j=1; - break; - default: - j=2; - } - (void)j; // Avoid unused variable warning +fi +fi - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + if test "x$enabletbb" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH 1" >>confdefs.h - - have_double_underscore_attribute_fallthrough=yes + libmesh_optional_INCLUDES="$TBB_INCLUDE $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$TBB_LIBRARY $libmesh_optional_LIBS" + found_thread_model=tbb -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + if test "x$enabletbb" = "xno" && test "x$requested_thread_model" = "xtbb" +then : + as_fn_error $? "requested threading model, TBB, could not be found." "$LINENO" 5 fi - # Reset the flags - CXXFLAGS="$old_CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - if test x$have_cxx17_fallthrough_attribute == xyes; then - HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_TRUE= - HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_FALSE='#' -else - HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_TRUE='#' - HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_FALSE= fi - if test x$have_double_underscore_attribute_fallthrough == xyes; then - HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH_TRUE= - HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH_FALSE='#' -else - HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH_TRUE='#' - HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH_FALSE= fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Found thread model: $found_thread_model >>>" >&5 +printf "%s\n" "<<< Found thread model: $found_thread_model >>>" >&6; } -#----------------------------------------------------- -# Initialize libtool. By default, we will build -# only shared libraries on platforms that support them -#----------------------------------------------------- -case `pwd` in - *\ * | *\ *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + for method in ${METHODS}; do + case "${method}" in #( + optimized|opt) : + build_opt=yes ;; #( + debug|dbg) : + build_dbg=yes ;; #( + devel) : + build_devel=yes ;; #( + profiling|pro|prof) : + build_prof=yes ;; #( + oprofile|oprof) : + build_oprof=yes ;; #( + *) : + as_fn_error $? "bad value ${method} for --with-methods" "$LINENO" 5 ;; esac + done + if test x$build_opt = xyes; then + LIBMESH_OPT_MODE_TRUE= + LIBMESH_OPT_MODE_FALSE='#' +else + LIBMESH_OPT_MODE_TRUE='#' + LIBMESH_OPT_MODE_FALSE= +fi + if test x$build_dbg = xyes; then + LIBMESH_DBG_MODE_TRUE= + LIBMESH_DBG_MODE_FALSE='#' +else + LIBMESH_DBG_MODE_TRUE='#' + LIBMESH_DBG_MODE_FALSE= +fi -macro_version='2.5.4' -macro_revision='2.5.4' - + if test x$build_devel = xyes; then + LIBMESH_DEVEL_MODE_TRUE= + LIBMESH_DEVEL_MODE_FALSE='#' +else + LIBMESH_DEVEL_MODE_TRUE='#' + LIBMESH_DEVEL_MODE_FALSE= +fi + if test x$build_prof = xyes; then + LIBMESH_PROF_MODE_TRUE= + LIBMESH_PROF_MODE_FALSE='#' +else + LIBMESH_PROF_MODE_TRUE='#' + LIBMESH_PROF_MODE_FALSE= +fi + if test x$build_oprof = xyes; then + LIBMESH_OPROF_MODE_TRUE= + LIBMESH_OPROF_MODE_FALSE='#' +else + LIBMESH_OPROF_MODE_TRUE='#' + LIBMESH_OPROF_MODE_FALSE= +fi + LIBMESH_PC_IN="" + # set the configuration input file for libmesh.pc + if test x$build_opt = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-opt.pc.in" +elif test x$build_dbg = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-dbg.pc.in" +elif test x$build_devel = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-devel.pc.in" +elif test x$build_prof = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-prof.pc.in" +elif test x$build_oprof = xyes +then : + LIBMESH_PC_IN="contrib/utils/libmesh-oprof.pc.in" +fi @@ -38609,1644 +38503,1334 @@ macro_revision='2.5.4' -ltmain=$ac_aux_dir/ltmain.sh -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -printf %s "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} -case $ECHO in - printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -printf "%s\n" "printf" >&6; } ;; - print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -printf "%s\n" "print -r" >&6; } ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -printf "%s\n" "cat" >&6; } ;; -esac +ac_config_files="$ac_config_files contrib/utils/libmesh.pc:$LIBMESH_PC_IN" + # By default we merely enable some warnings, but we can turn those + # into errors (for library code only, not contrib or external code) + # by configuring with --enable-werror + # Check whether --enable-werror was given. +if test ${enable_werror+y} +then : + enableval=$enable_werror; case "${enableval}" in #( + yes) : + acsm_enablewerror=yes ;; #( + no) : + acsm_enablewerror=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; +esac +else case e in #( + e) acsm_enablewerror=no ;; +esac +fi + ACSM_ANY_WERROR_FLAG=$WERROR_FLAGS + if test "x$acsm_enablewerror" != "xyes" +then : + ACSM_ANY_WERROR_FLAG='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are just warnings >>>" >&5 +printf "%s\n" "<<< Compiler warnings are just warnings >>>" >&6; } +else case e in #( + e) as_CACHEVAR=`printf "%s\n" "ax_cv_check_cxxflags__$WERROR_FLAGS" | sed "$as_sed_sh"` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $WERROR_FLAGS" >&5 +printf %s "checking whether C++ compiler accepts $WERROR_FLAGS... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $WERROR_FLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - printf %s "(cached) " >&6 + eval "$as_CACHEVAR=yes" else case e in #( - e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in #( -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -#( -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + e) eval "$as_CACHEVAR=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags ;; +esac +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are now errors >>>" >&5 +printf "%s\n" "<<< Compiler warnings are now errors >>>" >&6; } +else case e in #( + e) ACSM_ANY_WERROR_FLAG='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler does not support $WERROR_FLAGS >>>" >&5 +printf "%s\n" "<<< Compiler does not support $WERROR_FLAGS >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler warnings are just warnings >>>" >&5 +printf "%s\n" "<<< Compiler warnings are just warnings >>>" >&6; } ;; esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED fi ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - + # By default we merely enable some of the most common compiler + # warnings, but we can turn on as many warnings as we avoid triggering + # (for library code only, not contrib or external code) by configuring + # with --enable-paranoid-warnings + # Check whether --enable-paranoid-warnings was given. +if test ${enable_paranoid_warnings+y} +then : + enableval=$enable_paranoid_warnings; case "${enableval}" in #( + yes) : + acsm_enableparanoid=yes ;; #( + no) : + acsm_enableparanoid=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-paranoid-warnings" "$LINENO" 5 ;; +esac +else case e in #( + e) acsm_enableparanoid=no ;; +esac +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} + ACSM_ANY_PARANOID_FLAGS=$ACSM_PARANOID_FLAGS + if test "x$acsm_enableparanoid" != "xyes" then : - printf %s "(cached) " >&6 + ACSM_ANY_PARANOID_FLAGS='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling extra paranoid compiler warnings >>>" >&5 +printf "%s\n" "<<< Disabling extra paranoid compiler warnings >>>" >&6; } else case e in #( - e) if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in #( -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -#( -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac + e) ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $WERROR_FLAGS $PARANOID_FLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - printf %s "(cached) " >&6 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Enabled extra paranoid compiler warnings >>>" >&5 +printf "%s\n" "<<< Enabled extra paranoid compiler warnings >>>" >&6; } else case e in #( - e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in #( -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -#( -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + e) ACSM_ANY_PARANOID_FLAGS='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiler may not support all of $PARANOID_FLAGS >>>" >&5 +printf "%s\n" "<<< Compiler may not support all of $PARANOID_FLAGS >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Disabling extra paranoid compiler warnings >>>" >&5 +printf "%s\n" "<<< Disabling extra paranoid compiler warnings >>>" >&6; } ;; esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP fi - - fi ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - EGREP_TRADITIONAL=$EGREP - ac_cv_path_EGREP_TRADITIONAL=$EGREP -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -printf %s "checking for fgrep... " >&6; } -if test ${ac_cv_path_FGREP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in fgrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in #( -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -#( -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi +# -------------------------------------------------------------- +# Test for optional modern C++ features, which libMesh offers shims +# for and/or which libMesh applications may want to selectively use. +# -------------------------------------------------------------- - fi ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -printf "%s\n" "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" + have_cxx14_make_unique=no + + # std::make_unique is actually part of the C++14 standard, but some + # compilers might (?) support it via the -std=c++11 flag, or eventually + # with no flag at all. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++14 std::make_unique support" >&5 +printf %s "checking for C++14 std::make_unique support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -test -z "$GREP" && GREP=grep + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include +int +main (void) +{ + { + // Normally, you would use "auto" on the LHS here to avoid + // repeating the type name, but we are not testing auto here. + std::unique_ptr up = std::make_unique(42); + } // Foo deleted when up goes out of scope + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_CXX14_MAKE_UNIQUE 1" >>confdefs.h + have_cxx14_make_unique=yes +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + # Reset the flags + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test x$have_cxx14_make_unique == xyes; then + HAVE_CXX14_MAKE_UNIQUE_TRUE= + HAVE_CXX14_MAKE_UNIQUE_FALSE='#' +else + HAVE_CXX14_MAKE_UNIQUE_TRUE='#' + HAVE_CXX14_MAKE_UNIQUE_FALSE= +fi + have_cxx11_regex=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::regex support" >&5 +printf %s "checking for C++11 std::regex support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" -# Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} + if test "$cross_compiling" = yes then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + else case e in #( - e) with_gnu_ld=no ;; -esac -fi + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw* | *-*-windows*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } -fi -if test ${lt_cv_path_LD+y} + #include + +int +main (void) +{ + + std::regex integer_regex("(\\\\+|-)?[[:digit:]]+"); + std::regex_match("abc", integer_regex); + std::regex_match("123", integer_regex); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_run "$LINENO" then : - printf %s "(cached) " >&6 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_CXX11_REGEX 1" >>confdefs.h + + have_cxx11_regex=yes + else case e in #( - e) if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi -LD=$lt_cv_path_LD -if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + + # Reset the flags + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + if test x$have_cxx11_regex == xyes; then + HAVE_CXX11_REGEX_TRUE= + HAVE_CXX11_REGEX_FALSE='#' else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld + have_cxx11_thread=no + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 support" >&5 +printf %s "checking for C++11 support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + #include + #include + void my_thread_func() {} +int +main (void) +{ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test ${lt_cv_path_NM+y} + thread_local int i; + std::thread t(my_thread_func); + t.join(); + + std::atomic ab1, ab2; + ab1.store(true, std::memory_order_relaxed); + ab2.store(false, std::memory_order_relaxed); + ab1.exchange(ab2); + + std::mutex m; + std::lock_guard lock(m); + + std::atomic_thread_fence(std::memory_order_acquire); + std::atomic_thread_fence(std::memory_order_release); + + // We use this function in one of our unit tests now. + unsigned int n_threads = std::thread::hardware_concurrency(); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - printf %s "(cached) " >&6 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_CXX11_THREAD 1" >>confdefs.h + + have_cxx11_thread=yes + else case e in #( - e) if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw* | windows*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -printf "%s\n" "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi ;; -esac -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -printf "%s\n" "$DUMPBIN" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + # Reset the flags + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi ;; -esac -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -printf "%s\n" "$ac_ct_DUMPBIN" >&6; } + if test x$have_cxx11_thread == xyes; then + HAVE_CXX11_THREAD_TRUE= + HAVE_CXX11_THREAD_FALSE='#' else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + HAVE_CXX11_THREAD_TRUE='#' + HAVE_CXX11_THREAD_FALSE= fi - test -n "$ac_ct_DUMPBIN" && break -done - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi + have_cxx11_condition_variable=no - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 support" >&5 +printf %s "checking for C++11 support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + # Test code is from the accepted answer on: + # http://stackoverflow.com/questions/16350473/why-do-i-need-stdcondition-variable + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + #include + #include + #include + #include + bool is_ready = false; + std::mutex m; + std::condition_variable cv; + void + test() + { + std::this_thread::sleep_for(std::chrono::seconds(30)); + std::unique_lock ulock(m); + is_ready = true; + cv.notify_one(); + } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -printf %s "checking the name lister ($NM) interface... " >&6; } -if test ${lt_cv_nm_interface+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -printf "%s\n" "$lt_cv_nm_interface" >&6; } +int +main (void) +{ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } -fi + std::thread t(test); + std::unique_lock ulock(m); + while (!is_ready) + { + cv.wait(ulock); + if (!is_ready) + std::cout << "Spurious wake up!\n"; + } + t.join(); -# find the maximum length of command line arguments -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -printf %s "checking the maximum length of command line arguments... " >&6; } -if test ${lt_cv_sys_max_cmd_len+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - printf %s "(cached) " >&6 -else case e in #( - e) i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu* | ironclad*) - # Under GNU Hurd and Ironclad, this test is not required because there - # is no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | windows* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; +printf "%s\n" "#define HAVE_CXX11_CONDITION_VARIABLE 1" >>confdefs.h - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; + have_cxx11_condition_variable=yes - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - ;; +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -if test -n "$lt_cv_sys_max_cmd_len"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - + # Reset the flags + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset + if test x$have_cxx11_condition_variable == xyes; then + HAVE_CXX11_CONDITION_VARIABLE_TRUE= + HAVE_CXX11_CONDITION_VARIABLE_FALSE='#' else - lt_unset=false + HAVE_CXX11_CONDITION_VARIABLE_TRUE='#' + HAVE_CXX11_CONDITION_VARIABLE_FALSE= fi + # This is designed to be an exhaustive test of the capabilities of + # the header, as defined by the C++11 standard. We + # don't use all of these in libmesh, but we want application code + # to be able to rely on the value of LIBMESH_HAVE_CXX11_TYPE_TRAITS. + # + # Not all compilers fully implement the header. For example, GCC + # 4.9.1 does not provide the is_trivially_copyable() function, but + # it does provide support for other functions. + # + # See also: + # http://en.cppreference.com/w/cpp/header/type_traits + have_cxx11_type_traits=no - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 support" >&5 +printf %s "checking for C++11 support... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + #include + // std::enable_if - the return type of the function is only defined if + // T is an integral type. Therefore, it's a *compile* error if you + // try to call it with a non-integral type. + template + typename std::enable_if::value, bool>::type + is_odd (T i) + { + return static_cast(i%2); + } + // std::underlying_type - names the underlying type of an enum + enum e1 {}; + // typedef (named fn_ptr) for a function that takes nothing and returns char. + typedef char (*fn_ptr)(); +int +main (void) +{ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -printf %s "checking how to convert $build file names to $host format... " >&6; } -if test ${lt_cv_to_host_file_cmd+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) case $host in - *-*-mingw* ) - case $build in - *-*-mingw* | *-*-windows* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* | *-*-windows* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - ;; -esac -fi + std::cout << std::is_void::value + // << std::is_null_pointer::value // C++14 + // << std::is_literal_type::value // C++17 + << std::is_integral::value + << std::is_floating_point::value + << std::is_array::value + << std::is_enum::value + << std::is_union::value + << std::is_class::value + << std::is_function::value + << std::is_pointer::value + << std::is_lvalue_reference::value + << std::is_rvalue_reference::value + << std::is_member_object_pointer::value + << std::is_fundamental::value + << std::is_arithmetic::value + << std::is_scalar::value + << std::is_object::value + << std::is_compound::value + << std::is_reference::value + << std::is_member_pointer::value + << std::is_const::value + << std::is_volatile::value + << std::is_trivial::value + << std::is_trivially_copyable::value // Not supported by GCC 4.6.3 with -std=c++0x + << std::is_standard_layout::value + << std::is_pod::value + << std::is_empty::value + << std::is_polymorphic::value + << std::is_abstract::value + << std::is_signed::value + << std::is_unsigned::value + << std::is_constructible::value + << std::is_trivially_constructible::value + << std::is_nothrow_constructible::value + << std::is_default_constructible::value + << std::is_trivially_default_constructible::value + << std::is_nothrow_default_constructible::value + << std::is_copy_constructible::value + << std::is_trivially_copy_constructible::value + << std::is_nothrow_copy_constructible::value + << std::is_move_constructible::value + << std::is_trivially_move_constructible::value + << std::is_nothrow_move_constructible::value + << std::is_assignable::value + << std::is_trivially_assignable::value + << std::is_nothrow_assignable::value + << std::is_copy_assignable::value + << std::is_trivially_copy_assignable::value + << std::is_nothrow_copy_assignable::value + << std::is_move_assignable::value + << std::is_trivially_move_assignable::value + << std::is_nothrow_move_assignable::value + << std::is_destructible::value + << std::is_trivially_destructible::value + << std::is_nothrow_destructible::value + << std::has_virtual_destructor::value + << std::alignment_of::value + << std::rank::value + << std::extent::value + << std::is_same::value + << std::is_base_of::value + << std::is_convertible::value + << std::is_same::type>::value // std::remove_cv + << std::is_same::type>::value // std::remove_const + << std::is_same::type>::value // std::remove_volatile + << std::is_same::type>::value // std::add_cv + << std::is_same::type>::value // std::add_const + << std::is_same::type>::value // std::add_volatile + << std::is_same::type>::value // std::remove_reference + << std::is_same::type>::value // std::add_lvalue_reference + << std::is_same::type>::value // std::add_rvalue_reference + << std::is_same::type>::value // std::remove_pointer + << std::is_same::type>::value // std::add_pointer + << std::is_same::type>::value // std::make_signed + << std::is_same::type>::value // std::make_unsigned + << std::is_same::type>::value // std::remove_extent + << std::is_same::type>::value // std::remove_all_extents + << std::is_same::type>::value // std::decay + << is_odd(13) // std::enable_if + << std::is_same::type>::value // std::conditional + << std::is_same::type>::value // std::common_type + << std::is_same::type>::value // std::underlying_type + << std::is_same::type>::value // std::result_of + << std::false_type::value + << std::true_type::value + << std::endl; -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } + // std::aligned_storage + typedef std::aligned_storage::type aligned_t; + // std::aligned_union + typedef std::aligned_union::type union_t; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_CXX11_TYPE_TRAITS 1" >>confdefs.h + + have_cxx11_type_traits=yes -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -printf %s "checking how to convert $build file names to toolchain format... " >&6; } -if test ${lt_cv_to_tool_file_cmd+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* | *-*-windows* ) - case $build in - *-*-mingw* | *-*-windows* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } + # Reset the flags + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test x$have_cxx11_type_traits == xyes; then + HAVE_CXX11_TYPE_TRAITS_TRUE= + HAVE_CXX11_TYPE_TRAITS_FALSE='#' +else + HAVE_CXX11_TYPE_TRAITS_TRUE='#' + HAVE_CXX11_TYPE_TRAITS_FALSE= +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -printf %s "checking for $LD option to reload object files... " >&6; } -if test ${lt_cv_ld_reload_flag+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ld_reload_flag='-r' ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | windows* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac + have_cxx11_inverse_hyperbolic_sine=no + have_cxx11_inverse_hyperbolic_cosine=no + have_cxx11_inverse_hyperbolic_tangent=no + have_cxx11_inverse_hyperbolic_sine_complex=no + have_cxx11_inverse_hyperbolic_cosine_complex=no + have_cxx11_inverse_hyperbolic_tangent_complex=no + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $libmesh_CXXFLAGS" + # Test for asinh + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::asinh support in " >&5 +printf %s "checking for C++11 std::asinh support in ... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include +int +main (void) +{ + double x = std::asinh(1.); -# Extract the first word of "file", so it can be a program name with args. -set dummy file; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_FILECMD+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$FILECMD"; then - ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_FILECMD="file" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":" -fi ;; -esac -fi -FILECMD=$ac_cv_prog_FILECMD -if test -n "$FILECMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 -printf "%s\n" "$FILECMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_SINE 1" >>confdefs.h + + have_cxx11_inverse_hyperbolic_sine=yes + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + # Test for acosh + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::acosh support in " >&5 +printf %s "checking for C++11 std::acosh support in ... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include +int +main (void) +{ + double x = std::acosh(1.); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE 1" >>confdefs.h -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + have_cxx11_inverse_hyperbolic_cosine=yes -fi ;; -esac -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + # Test for atanh + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::atanh support in " >&5 +printf %s "checking for C++11 std::atanh support in ... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} + #include + +int +main (void) +{ + + double x = std::atanh(0.); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi ;; -esac -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; +printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT 1" >>confdefs.h + + have_cxx11_inverse_hyperbolic_tangent=yes + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -test -z "$OBJDUMP" && OBJDUMP=objdump + # Test for asinh(complex) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::asinh(complex) support in " >&5 +printf %s "checking for C++11 std::asinh(complex) support in ... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include +int +main (void) +{ + std::complex z(0, -2); + std::complex x = std::asinh(z); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX 1" >>confdefs.h + have_cxx11_inverse_hyperbolic_sine_complex=yes -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -printf %s "checking how to recognize dependent libraries... " >&6; } -if test ${lt_cv_deplibs_check_method+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -beos*) - lt_cv_deplibs_check_method=pass_all - ;; + # Test for acosh(complex) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::acosh(complex) support in " >&5 +printf %s "checking for C++11 std::acosh(complex) support in ... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='$FILECMD -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; + #include -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; +int +main (void) +{ -mingw* | windows* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; + std::complex z(0.5, 0); + std::complex x = std::acosh(z); -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -freebsd* | dragonfly* | midnightbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=$FILECMD - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; +printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX 1" >>confdefs.h -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; + have_cxx11_inverse_hyperbolic_cosine_complex=yes -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=$FILECMD - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; + # Test for atanh(complex) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::atanh(complex) support in " >&5 +printf %s "checking for C++11 std::atanh(complex) support in ... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; + #include -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; +int +main (void) +{ -*-mlibc) - lt_cv_deplibs_check_method=pass_all - ;; + std::complex z(2, 0); + std::complex x = std::atanh(z); -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=$FILECMD - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; +printf "%s\n" "#define HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX 1" >>confdefs.h -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; + have_cxx11_inverse_hyperbolic_tangent_complex=yes -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; + # Test for erf + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++11 std::erf support in " >&5 +printf %s "checking for C++11 std::erf support in ... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -serenity*) - lt_cv_deplibs_check_method=pass_all - ;; + #include -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; +int +main (void) +{ -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; + double val = std::erf(1.); -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_CXX11_ERF 1" >>confdefs.h + + have_cxx11_erf=yes + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | windows* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown + # Reset the flags + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test x$have_cxx11_inverse_hyperbolic_sine == xyes; then + HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_TRUE= + HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_FALSE='#' +else + HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_TRUE='#' + HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_FALSE= +fi + + if test x$have_cxx11_inverse_hyperbolic_cosine == xyes; then + HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_TRUE= + HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_FALSE='#' +else + HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_TRUE='#' + HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_FALSE= +fi + if test x$have_cxx11_inverse_hyperbolic_tangent == xyes; then + HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_TRUE= + HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_FALSE='#' +else + HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_TRUE='#' + HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_FALSE= +fi + if test x$have_cxx11_inverse_hyperbolic_sine_complex == xyes; then + HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX_TRUE= + HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX_FALSE='#' +else + HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX_TRUE='#' + HAVE_CXX11_INVERSE_HYPERBOLIC_SINE_COMPLEX_FALSE= +fi + if test x$have_cxx11_inverse_hyperbolic_cosine_complex == xyes; then + HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX_TRUE= + HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX_FALSE='#' +else + HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX_TRUE='#' + HAVE_CXX11_INVERSE_HYPERBOLIC_COSINE_COMPLEX_FALSE= +fi + if test x$have_cxx11_inverse_hyperbolic_tangent_complex == xyes; then + HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX_TRUE= + HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX_FALSE='#' +else + HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX_TRUE='#' + HAVE_CXX11_INVERSE_HYPERBOLIC_TANGENT_COMPLEX_FALSE= +fi + if test x$have_cxx11_erf == xyes; then + HAVE_CXX11_ERF_TRUE= + HAVE_CXX11_ERF_FALSE='#' +else + HAVE_CXX11_ERF_TRUE='#' + HAVE_CXX11_ERF_FALSE= +fi + have_cxx17_fallthrough_attribute=no + have_double_underscore_attribute_fallthrough=no + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # We don't want to use [[fallthrough]] if it generates a compiler warning, so + # turn on -Werror for the test. This way, if a warning is generated it will be + # treated as an error and the test will fail. We also try to make sure as many + # warnings as possible are turned on, so the test has every opportunity to fail. + old_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -Werror -Wall -Wextra -pedantic" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++17 fallthrough attribute support" >&5 +printf %s "checking for C++17 fallthrough attribute support... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + int i=1, j; + switch(i) { + case 0: + j=0; + [[fallthrough]]; + case 1: + j=1; + break; + default: + j=2; + } + (void)j; // Avoid unused variable warning + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} + if test "x$enablecxx11" = "xyes" then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi ;; -esac -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_CXX17_FALLTHROUGH_ATTRIBUTE 1" >>confdefs.h + + have_cxx17_fallthrough_attribute=yes -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, but disabled." >&5 +printf "%s\n" "yes, but disabled." >&6; } -fi ;; +printf "%s\n" "#define HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_BUT_DISABLED 1" >>confdefs.h + + ;; esac -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -test -z "$DLLTOOL" && DLLTOOL=dlltool + # If standard [[fallthrough]]; didn't work, maybe __attribute__((fallthrough)); + # will. This definitely works for GCC7 but generates an error on + # GCC6. Clang 3.9.0 warns about it, which we also don't want, so + # we are using the -Werror flag when testing again. + if test "x$have_cxx17_fallthrough_attribute" = "xno" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((fallthrough)) support" >&5 +printf %s "checking for __attribute__ ((fallthrough)) support... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + int i=1, j; + switch(i) { + case 0: + j=0; + __attribute__((fallthrough)); + case 1: + j=1; + break; + default: + j=2; + } + (void)j; // Avoid unused variable warning + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH 1" >>confdefs.h + have_double_underscore_attribute_fallthrough=yes -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -printf %s "checking how to associate runtime and link libraries... " >&6; } -if test ${lt_cv_sharedlib_from_linklib_cmd+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | windows* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + # Reset the flags + CXXFLAGS="$old_CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test x$have_cxx17_fallthrough_attribute == xyes; then + HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_TRUE= + HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_FALSE='#' +else + HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_TRUE='#' + HAVE_CXX17_FALLTHROUGH_ATTRIBUTE_FALSE= +fi + if test x$have_double_underscore_attribute_fallthrough == xyes; then + HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH_TRUE= + HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH_FALSE='#' +else + HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH_TRUE='#' + HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH_FALSE= +fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_RANLIB+y} + + +#----------------------------------------------------- +# Initialize libtool. By default, we will build +# only shared libraries on platforms that support them +#----------------------------------------------------- +case `pwd` in + *\ * | *\ *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.5.4' +macro_revision='2.5.4' + + + + + + + + + + + + + + +ltmain=$ac_aux_dir/ltmain.sh + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +printf %s "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case $ECHO in + printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +printf "%s\n" "printf" >&6; } ;; + print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +printf "%s\n" "print -r" >&6; } ;; + *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +printf "%s\n" "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -40255,45 +39839,83 @@ do */) ;; *) as_dir=$as_dir/ ;; esac + for ac_prog in sed gsed + do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in #( +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS - -fi ;; + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -printf "%s\n" "$RANLIB" >&6; } + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + ac_cv_path_SED=$SED +fi + ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_RANLIB+y} + + + + + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + e) if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( @@ -40301,59 +39923,73 @@ do */) ;; *) as_dir=$as_dir/ ;; esac + for ac_prog in grep ggrep + do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in #( +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS - -fi ;; + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -printf "%s\n" "$ac_ct_RANLIB" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else - RANLIB="$ac_cv_prog_RANLIB" + ac_cv_path_GREP=$GREP +fi + ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( @@ -40361,49 +39997,76 @@ do */) ;; *) as_dir=$as_dir/ ;; esac + for ac_prog in egrep + do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in #( +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done done IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi -fi ;; + fi ;; esac fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + EGREP_TRADITIONAL=$EGREP + ac_cv_path_EGREP_TRADITIONAL=$EGREP - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +printf %s "checking for fgrep... " >&6; } +if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( @@ -40411,128 +40074,188 @@ do */) ;; *) as_dir=$as_dir/ ;; esac + for ac_prog in fgrep + do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in #( +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS - -fi ;; + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + ac_cv_path_FGREP=$FGREP fi - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; + fi ;; esac - AR=$ac_ct_AR - fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +printf "%s\n" "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" -: ${AR=ar} +test -z "$GREP" && GREP=grep -# Use ARFLAGS variable as AR's operation code to sync the variable naming with -# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because that's what people were doing historically (setting -# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS -# variable obsoleted/removed. -test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} -lt_ar_flags=$AR_FLAGS -# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override -# by AR_FLAGS because that was never working and AR_FLAGS is about to die. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -printf %s "checking for archiver @FILE support... " >&6; } -if test ${lt_cv_ar_at_file+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" +# Check whether --with-gnu-ld was given. +if test ${with_gnu_ld+y} then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes +else case e in #( + e) with_gnu_ld=no ;; +esac +fi +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw* | *-*-windows*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 -printf "%s\n" "$lt_cv_ar_at_file" >&6; } -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= +LD=$lt_cv_path_LD +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - archiver_list_spec=$lt_cv_ar_at_file + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld @@ -40540,17 +40263,86 @@ fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test ${lt_cv_path_NM+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM +else + lt_nm_to_check=${ac_tool_prefix}nm + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw* | windows*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +printf "%s\n" "$lt_cv_path_NM" >&6; } +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} +if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + e) if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -40563,7 +40355,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -40574,29 +40366,33 @@ IFS=$as_save_IFS fi ;; esac fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +printf "%s\n" "$DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi + test -n "$DUMPBIN" && break + done fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} +if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. + e) if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -40609,7 +40405,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -40620,17 +40416,21 @@ IFS=$as_save_IFS fi ;; esac fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -40638,401 +40438,358 @@ yes:) printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - STRIP=$ac_ct_STRIP + DUMPBIN=$ac_ct_DUMPBIN fi -else - STRIP="$ac_cv_prog_STRIP" fi -test -z "$STRIP" && STRIP=: - - - - - - - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi -if test -n "$RANLIB"; then - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - +test -z "$NM" && NM=nm +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +printf %s "checking the name lister ($NM) interface... " >&6; } +if test ${lt_cv_nm_interface+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +printf "%s\n" "$lt_cv_nm_interface" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +printf %s "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "no, using $LN_S" >&6; } +fi +# find the maximum length of command line arguments +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +printf %s "checking the maximum length of command line arguments... " >&6; } +if test ${lt_cv_sys_max_cmd_len+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) i=0 + teststring=ABCD + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + gnu* | ironclad*) + # Under GNU Hurd and Ironclad, this test is not required because there + # is no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + cygwin* | mingw* | windows* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + ;; +esac +fi +if test -n "$lt_cv_sys_max_cmd_len"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -printf %s "checking command to parse $NM output from $compiler object... " >&6; } -if test ${lt_cv_sys_global_symbol_pipe+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +printf %s "checking how to convert $build file names to $host format... " >&6; } +if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 else case e in #( - e) -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | windows* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BCDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; + e) case $host in + *-*-mingw* ) + case $build in + *-*-mingw* | *-*-windows* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* | *-*-windows* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; + ;; esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= fi -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw* | windows*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++ or ICC, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(void){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } - cat <<_LT_EOF >> conftest.$ac_ext -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +printf %s "checking how to convert $build file names to toolchain format... " >&6; } +if test ${lt_cv_to_tool_file_cmd+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* | *-*-windows* ) + case $build in + *-*-mingw* | *-*-windows* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac ;; esac fi -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +printf %s "checking for $LD option to reload object files... " >&6; } +if test ${lt_cv_ld_reload_flag+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_ld_reload_flag='-r' ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | windows* | pw32* | cegcc*) + if test yes != "$GCC"; then + reload_cmds=false + fi + ;; + darwin*) + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac @@ -41041,60 +40798,70 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -printf %s "checking for sysroot... " >&6; } -# Check whether --with-sysroot was given. -if test ${with_sysroot+y} +# Extract the first word of "file", so it can be a program name with args. +set dummy file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FILECMD+y} then : - withval=$with_sysroot; + printf %s "(cached) " >&6 else case e in #( - e) with_sysroot=no ;; + e) if test -n "$FILECMD"; then + ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_FILECMD="file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":" +fi ;; esac fi +FILECMD=$ac_cv_prog_FILECMD +if test -n "$FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 +printf "%s\n" "$FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - # Trim trailing / since we'll always append absolute paths and we want - # to avoid //, if only for less confusing output for the user. - lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -printf "%s\n" "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -printf "%s\n" "${lt_sysroot:-no}" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -printf %s "checking for a working dd... " >&6; } -if test ${ac_cv_path_lt_DD+y} +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( - e) printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + e) if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -41103,399 +40870,42 @@ do */) ;; *) as_dir=$as_dir/ ;; esac - for ac_prog in dd - do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi -rm -f conftest.i conftest2.i conftest.out ;; +fi ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -printf "%s\n" "$ac_cv_path_lt_DD" >&6; } +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -printf %s "checking how to truncate binary pipes... " >&6; } -if test ${lt_cv_truncate_bin+y} +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( - e) printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -printf "%s\n" "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -# Check whether --enable-libtool-lock was given. -if test ${enable_libtool_lock+y} -then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `$FILECMD conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `$FILECMD conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `$FILECMD conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `$FILECMD conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `$FILECMD conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `$FILECMD conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `$FILECMD conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*|x86_64-gnu*) - case `$FILECMD conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*|x86_64-gnu*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -printf %s "checking whether the C compiler needs -belf... " >&6; } -if test ${lt_cv_cc_needs_belf+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_cc_needs_belf=yes -else case e in #( - e) lt_cv_cc_needs_belf=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `$FILECMD conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi ;; -esac -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -printf "%s\n" "$MANIFEST_TOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. + e) if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -41508,7 +40918,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -41519,17 +40929,17 @@ IFS=$as_save_IFS fi ;; esac fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) @@ -41537,157 +40947,284 @@ yes:) printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + OBJDUMP=$ac_ct_OBJDUMP fi else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" + OBJDUMP="$ac_cv_prog_OBJDUMP" fi -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test ${lt_cv_path_manifest_tool+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_path_manifest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_manifest_tool=yes - fi - rm -f conftest* ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5 -printf "%s\n" "$lt_cv_path_manifest_tool" >&6; } -if test yes != "$lt_cv_path_manifest_tool"; then - MANIFEST_TOOL=: -fi +test -z "$OBJDUMP" && OBJDUMP=objdump - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi ;; -esac -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -printf "%s\n" "$DSYMUTIL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +printf %s "checking how to recognize dependent libraries... " >&6; } +if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi ;; -esac -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi + e) lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# 'unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'file_magic [[regex]]' -- check by looking for files in library path +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='$FILECMD -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | windows* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly* | midnightbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=$FILECMD + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +*-mlibc) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +serenity*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | windows* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_NMEDIT+y} +if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. + e) if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -41700,7 +41237,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -41711,10 +41248,10 @@ IFS=$as_save_IFS fi ;; esac fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -printf "%s\n" "$NMEDIT" >&6; } +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } @@ -41722,18 +41259,18 @@ fi fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_NMEDIT+y} +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. + e) if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -41746,7 +41283,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" + ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -41757,17 +41294,17 @@ IFS=$as_save_IFS fi ;; esac fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -printf "%s\n" "$ac_ct_NMEDIT" >&6; } +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) @@ -41775,23 +41312,74 @@ yes:) printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - NMEDIT=$ac_ct_NMEDIT + DLLTOOL=$ac_ct_DLLTOOL fi else - NMEDIT="$ac_cv_prog_NMEDIT" + DLLTOOL="$ac_cv_prog_DLLTOOL" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +printf %s "checking how to associate runtime and link libraries... " >&6; } +if test ${lt_cv_sharedlib_from_linklib_cmd+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | windows* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd=$ECHO + ;; +esac + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LIPO+y} +if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. + e) if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -41804,7 +41392,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -41815,10 +41403,10 @@ IFS=$as_save_IFS fi ;; esac fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -printf "%s\n" "$LIPO" >&6; } +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } @@ -41826,18 +41414,18 @@ fi fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_LIPO+y} +if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. + e) if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -41850,7 +41438,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" + ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -41861,17 +41449,17 @@ IFS=$as_save_IFS fi ;; esac fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -printf "%s\n" "$ac_ct_LIPO" >&6; } +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_LIPO" = x; then - LIPO=":" + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -41879,23 +41467,25 @@ yes:) printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - LIPO=$ac_ct_LIPO + RANLIB=$ac_ct_RANLIB fi else - LIPO="$ac_cv_prog_LIPO" + RANLIB="$ac_cv_prog_RANLIB" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL+y} +if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. + e) if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -41908,7 +41498,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -41919,29 +41509,33 @@ IFS=$as_save_IFS fi ;; esac fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -printf "%s\n" "$OTOOL" >&6; } +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL+y} +if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. + e) if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -41954,7 +41548,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" + ac_cv_prog_ac_ct_AR="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -41965,17 +41559,21 @@ IFS=$as_save_IFS fi ;; esac fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -printf "%s\n" "$ac_ct_OTOOL" >&6; } +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" else case $cross_compiling:$ac_tool_warned in yes:) @@ -41983,50 +41581,138 @@ yes:) printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - OTOOL=$ac_ct_OTOOL + AR=$ac_ct_AR fi -else - OTOOL="$ac_cv_prog_OTOOL" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL64+y} +: ${AR=ar} + + + + + + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because that's what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS + + + + + + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +printf %s "checking for archiver @FILE support... " >&6; } +if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + e) lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +printf "%s\n" "$lt_cv_ar_at_file" >&6; } + +if test no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi ;; esac fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -printf "%s\n" "$OTOOL64" >&6; } +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } @@ -42034,18 +41720,18 @@ fi fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL64+y} +if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. + e) if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -42058,7 +41744,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" + ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -42069,17 +41755,17 @@ IFS=$as_save_IFS fi ;; esac fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -printf "%s\n" "$ac_ct_OTOOL64" >&6; } +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" + if test "x$ac_ct_STRIP" = x; then + STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -42087,12 +41773,13 @@ yes:) printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - OTOOL64=$ac_ct_OTOOL64 + STRIP=$ac_ct_STRIP fi else - OTOOL64="$ac_cv_prog_OTOOL64" + STRIP="$ac_cv_prog_STRIP" fi +test -z "$STRIP" && STRIP=: @@ -42100,14 +41787,29 @@ fi +test -z "$RANLIB" && RANLIB=: +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= +if test -n "$RANLIB"; then + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" +fi +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac @@ -42119,255 +41821,16 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -printf %s "checking for -single_module linker flag... " >&6; } -if test ${lt_cv_apple_cc_single_mod+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } - # Feature test to disable chained fixups since it is not - # compatible with '-undefined dynamic_lookup' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -no_fixup_chains linker flag" >&5 -printf %s "checking for -no_fixup_chains linker flag... " >&6; } -if test ${lt_cv_support_no_fixup_chains+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_support_no_fixup_chains=yes -else case e in #( - e) lt_cv_support_no_fixup_chains=no - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_support_no_fixup_chains" >&5 -printf "%s\n" "$lt_cv_support_no_fixup_chains" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -printf %s "checking for -exported_symbols_list linker flag... " >&6; } -if test ${lt_cv_ld_exported_symbols_list+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_ld_exported_symbols_list=yes -else case e in #( - e) lt_cv_ld_exported_symbols_list=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -printf %s "checking for -force_load linker flag... " >&6; } -if test ${lt_cv_ld_force_load+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 - $AR $AR_FLAGS libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main(void) { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -printf "%s\n" "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) - case $MACOSX_DEPLOYMENT_TARGET,$host in - 10.[012],*|,*powerpc*-darwin[5-8]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' - if test yes = "$lt_cv_support_no_fixup_chains"; then - as_fn_append _lt_dar_allow_undefined ' $wl-no_fixup_chains' - fi - ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - _lt_dar_needs_single_mod=no - case $host_os in - rhapsody* | darwin1.*) - _lt_dar_needs_single_mod=yes ;; - darwin*) - # When targeting Mac OS X 10.4 (darwin 8) or later, - # -single_module is the default and -multi_module is unsupported. - # The toolchain on macOS 10.14 (darwin 18) and later cannot - # target any OS version that needs -single_module. - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*-darwin[567].*|10.[0-3],*-darwin[5-9].*|10.[0-3],*-darwin1[0-7].*) - _lt_dar_needs_single_mod=yes ;; - esac - ;; - esac - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done @@ -42376,276 +41839,309 @@ done -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h -fi -func_stripname_cnf () -{ - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; - esac -} # func_stripname_cnf +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Set options -# Check whether --enable-static was given. -if test ${enable_static+y} +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +printf %s "checking command to parse $NM output from $compiler object... " >&6; } +if test ${lt_cv_sys_global_symbol_pipe+y} then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac + printf %s "(cached) " >&6 else case e in #( - e) enable_static=no ;; -esac -fi + e) +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | windows* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test ia64 = "$host_cpu"; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BCDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test ${enable_shared+y} -then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else case e in #( - e) enable_shared=yes ;; +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw* | windows*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; esac -fi - - - - - - +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. + # Also find C++ and __fastcall symbols from MSVC++ or ICC, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" - # Check whether --enable-pic was given. -if test ${enable_pic+y} -then : - enableval=$enable_pic; lt_p=${PACKAGE-default} - case $enableval in - yes|no) pic_mode=$enableval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else case e in #( - e) # Check whether --with-pic was given. -if test ${with_pic+y} -then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else case e in #( - e) pic_mode=default ;; -esac -fi + # Check to see that the pipe works correctly. + pipe_works=no - ;; -esac -fi + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(void){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif +#ifdef __cplusplus +extern "C" { +#endif +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + cat <<_LT_EOF >> conftest.$ac_ext +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif - # Check whether --enable-fast-install was given. -if test ${enable_fast_install+y} -then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS=conftstm.$ac_objext + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 fi - done - IFS=$lt_save_ifs - ;; - esac -else case e in #( - e) enable_fast_install=yes ;; -esac -fi - - - - - - - + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } - # Check whether --enable-aix-soname was given. -if test ${enable_aix_soname+y} -then : - enableval=$enable_aix_soname; case $enableval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --enable-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$enable_aix_soname -else case e in #( - e) # Check whether --with-aix-soname was given. -if test ${with_aix_soname+y} -then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else case e in #( - e) if test ${lt_cv_with_aix_soname+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_with_aix_soname=aix ;; -esac -fi + # Do not use the global_symbol_pipe unless it works. + if test yes = "$pipe_works"; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done ;; esac fi - enable_aix_soname=$lt_cv_with_aix_soname ;; -esac +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +printf "%s\n" "failed" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; } fi - with_aix_soname=$enable_aix_soname - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -printf "%s\n" "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -42676,2370 +42172,1896 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' -test -z "$LN_S" && LN_S="ln -s" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +printf %s "checking for sysroot... " >&6; } +# Check whether --with-sysroot was given. +if test ${with_sysroot+y} +then : + withval=$with_sysroot; +else case e in #( + e) with_sysroot=no ;; +esac +fi +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + # Trim trailing / since we'll always append absolute paths and we want + # to avoid //, if only for less confusing output for the user. + lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +printf "%s\n" "$with_sysroot" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +printf "%s\n" "${lt_sysroot:-no}" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +printf %s "checking for a working dd... " >&6; } +if test ${ac_cv_path_lt_DD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in dd + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST +rm -f conftest.i conftest2.i conftest.out ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +printf "%s\n" "$ac_cv_path_lt_DD" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -printf %s "checking for objdir... " >&6; } -if test ${lt_cv_objdir+y} + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +printf %s "checking how to truncate binary pipes... " >&6; } +if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 else case e in #( - e) rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs + e) printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi -rmdir .libs 2>/dev/null ;; +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -printf "%s\n" "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +printf "%s\n" "$lt_cv_truncate_bin" >&6; } + -printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +# Check whether --enable-libtool-lock was given. +if test ${enable_libtool_lock+y} +then : + enableval=$enable_libtool_lock; +fi +test no = "$enable_libtool_lock" || enable_libtool_lock=yes -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `$FILECMD conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE=32 + ;; + *ELF-64*) + HPUX_IA64_MODE=64 + ;; + esac fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test yes = "$lt_cv_prog_gnu_ld"; then + case `$FILECMD conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `$FILECMD conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC and -# ICC, which need '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o -func_cc_basename $compiler -cc_basename=$func_cc_basename_result +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `$FILECMD conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `$FILECMD conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `$FILECMD conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `$FILECMD conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*|x86_64-gnu*) + case `$FILECMD conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*|x86_64-gnu*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -printf %s "checking for ${ac_tool_prefix}file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -belf" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +printf %s "checking whether the C compiler needs -belf... " >&6; } +if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 else case e in #( - e) case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + e) ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + lt_cv_cc_needs_belf=yes +else case e in #( + e) lt_cv_cc_needs_belf=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } + if test yes != "$lt_cv_cc_needs_belf"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS=$SAVE_CFLAGS + fi ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `$FILECMD conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org +need_locks=$enable_libtool_lock -_LT_EOF - fi ;; - esac - fi - break - fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac ;; +IFS=$as_save_IFS + +fi ;; esac fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +printf "%s\n" "$MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -printf %s "checking for file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else case e in #( - e) case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi + e) if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac ;; +IFS=$as_save_IFS + +fi ;; esac fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi - + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" else - MAGIC_CMD=: + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test ${lt_cv_path_manifest_tool+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_path_manifest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_manifest_tool=yes fi - ;; + rm -f conftest* ;; esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5 +printf "%s\n" "$lt_cv_path_manifest_tool" >&6; } +if test yes != "$lt_cv_path_manifest_tool"; then + MANIFEST_TOOL=: +fi -# Source file extension for C test sources. -ac_ext=c -# Object file extension for compiled C test sources. -objext=o -objext=$objext -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(void){return(0);}' + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi ;; +esac +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +printf "%s\n" "$DSYMUTIL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi ;; +esac +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Allow CC to be a program name with arguments. -compiler=$CC +fi ;; +esac +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +printf "%s\n" "$NMEDIT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* +fi ;; +esac +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +printf "%s\n" "$ac_ct_NMEDIT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LIPO+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -lt_prog_compiler_no_builtin_flag= +fi ;; +esac +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +printf "%s\n" "$LIPO" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test ${lt_cv_prog_compiler_rtti_exceptions+y} +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - ;; + e) if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +printf "%s\n" "$ac_ct_LIPO" >&6; } else - : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi ;; +esac +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +printf "%s\n" "$OTOOL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi ;; +esac +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +printf "%s\n" "$ac_ct_OTOOL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; +fi ;; +esac +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +printf "%s\n" "$OTOOL64" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; +fi ;; +esac +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +printf "%s\n" "$ac_ct_OTOOL64" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - *flang* | ftn | f18* | f95*) - # Flang compiler. - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - *-mlibc) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - serenity*) - ;; - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +printf %s "checking for -single_module linker flag... " >&6; } +if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; + e) lt_cv_apple_cc_single_mod=no + if test -z "$LT_MULTI_MODULE"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} + # Feature test to disable chained fixups since it is not + # compatible with '-undefined dynamic_lookup' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -no_fixup_chains linker flag" >&5 +printf %s "checking for -no_fixup_chains linker flag... " >&6; } +if test ${lt_cv_support_no_fixup_chains+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - + e) save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" then : - printf %s "(cached) " >&6 + lt_cv_support_no_fixup_chains=yes else case e in #( - e) lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - ;; + e) lt_cv_support_no_fixup_chains=no + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= + ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_support_no_fixup_chains" >&5 +printf "%s\n" "$lt_cv_support_no_fixup_chains" >&6; } - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +printf %s "checking for -exported_symbols_list linker flag... " >&6; } +if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - ;; + e) lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + lt_cv_ld_exported_symbols_list=yes +else case e in #( + e) lt_cv_ld_exported_symbols_list=no ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +printf %s "checking for -force_load linker flag... " >&6; } +if test ${lt_cv_ld_force_load+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 + $AR $AR_FLAGS libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main(void) { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +printf "%s\n" "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[012],*|,*powerpc*-darwin[5-8]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' + if test yes = "$lt_cv_support_no_fixup_chains"; then + as_fn_append _lt_dar_allow_undefined ' $wl-no_fixup_chains' + fi + ;; + esac + ;; + esac + if test yes = "$lt_cv_apple_cc_single_mod"; then + _lt_dar_single_mod='$single_module' + fi + _lt_dar_needs_single_mod=no + case $host_os in + rhapsody* | darwin1.*) + _lt_dar_needs_single_mod=yes ;; + darwin*) + # When targeting Mac OS X 10.4 (darwin 8) or later, + # -single_module is the default and -multi_module is unsupported. + # The toolchain on macOS 10.14 (darwin 18) and later cannot + # target any OS version that needs -single_module. + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*-darwin[567].*|10.[0-3],*-darwin[5-9].*|10.[0-3],*-darwin1[0-7].*) + _lt_dar_needs_single_mod=yes ;; + esac + ;; + esac + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + fi + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - ;; -esac +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h +fi -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } - if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi +func_stripname_cnf () +{ + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; + esac +} # func_stripname_cnf +# Set options +# Check whether --enable-static was given. +if test ${enable_static+y} +then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else case e in #( + e) enable_static=no ;; +esac +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - case $host_os in - cygwin* | mingw* | windows* | pw32* | cegcc*) - # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) - with_gnu_ld=yes - ;; - esac - ld_shlibs=yes - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. -_LT_EOF - fi - ;; + enable_dlopen=no - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; + enable_win32_dll=no - cygwin* | mingw* | windows* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - file_list_spec='@' - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi + # Check whether --enable-shared was given. +if test ${enable_shared+y} +then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs ;; + esac +else case e in #( + e) enable_shared=yes ;; +esac +fi - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=no - ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - file_list_spec='@' - ;; - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - case $cc_basename in - tcc*) - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - *-mlibc) - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. + # Check whether --enable-pic was given. +if test ${enable_pic+y} +then : + enableval=$enable_pic; lt_p=${PACKAGE-default} + case $enableval in + yes|no) pic_mode=$enableval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else case e in #( + e) # Check whether --with-pic was given. +if test ${with_pic+y} +then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else case e in #( + e) pic_mode=default ;; +esac +fi + + ;; +esac +fi + -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; + + # Check whether --enable-fast-install was given. +if test ${enable_fast_install+y} +then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs ;; esac +else case e in #( + e) enable_fast_install=yes ;; +esac +fi - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath_+y} + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +printf %s "checking which variant of shared library versioning to provide... " >&6; } + # Check whether --enable-aix-soname was given. +if test ${enable_aix_soname+y} then : - printf %s "(cached) " >&6 + enableval=$enable_aix_soname; case $enableval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --enable-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$enable_aix_soname else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + e) # Check whether --with-aix-soname was given. +if test ${with_aix_soname+y} then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else case e in #( + e) if test ${lt_cv_with_aix_soname+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_with_aix_soname=aix ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - ;; + ;; esac fi - aix_libpath=$lt_cv_aix_libpath_ + enable_aix_soname=$lt_cv_with_aix_soname ;; +esac fi - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib + with_aix_soname=$enable_aix_soname + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +printf "%s\n" "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi fi - ;; + ;; +*) + with_aix_soname=aix + ;; esac -fi - aix_libpath=$lt_cv_aix_libpath_ -fi - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - cygwin* | mingw* | windows* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl* | icl*) - # Native MSVC or ICC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC and ICC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - darwin* | rhapsody*) - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - else - ld_shlibs=no - fi +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain - ;; +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly* | midnightbsd*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -printf %s "checking if $CC understands -b... " >&6; } -if test ${lt_cv_prog_compiler__b+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +printf %s "checking for objdir... " >&6; } +if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 else case e in #( - e) save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_irix_exported_symbol=yes -else case e in #( - e) lt_cv_irix_exported_symbol=no ;; -esac + e) rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS ;; +rmdir .libs 2>/dev/null ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +printf "%s\n" "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - ;; - esac - ;; - *-mlibc) - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - *nto* | *qnx*) - ;; +printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - file_list_spec='@' - ;; - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac - serenity*) - ;; +# Global variables: +ofile=libtool +can_build_shared=yes - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). +libext=a - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; +with_gnu_ld=$lt_cv_prog_gnu_ld - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; +old_CC=$CC +old_CFLAGS=$CFLAGS - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; +func_cc_basename $compiler +cc_basename=$func_cc_basename_result - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +printf %s "checking for ${ac_tool_prefix}file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' +_LT_EOF + fi ;; + esac fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac + break fi - fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -printf "%s\n" "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac ;; +esac +fi +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc+y} +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +printf %s "checking for file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else case e in #( - e) $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no + e) case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; +esac ;; esac +fi +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + else + MAGIC_CMD=: + fi +fi + fi + ;; +esac +# Use C for the default configuration in the libtool script +lt_save_CC=$CC +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +# Source file extension for C test sources. +ac_ext=c +# Object file extension for compiled C test sources. +objext=o +objext=$objext +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" +# Code to be used in simple link tests +lt_simple_link_test_code='int main(void){return(0);}' @@ -45047,63 +44069,527 @@ esac +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} +# Allow CC to be a program name with arguments. +compiler=$CC +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then +lt_prog_compiler_no_builtin_flag= +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test ${lt_cv_prog_compiler_rtti_exceptions+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi +fi + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + if test yes = "$GCC"; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + lt_prog_compiler_pic='-fPIC' + ;; + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='$wl-a ${wl}archive' + ;; + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + *flang* | ftn | f18* | f95*) + # Flang compiler. + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + *-mlibc) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + serenity*) + ;; + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } +if test yes = "$lt_cv_prog_compiler_pic_works"; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi +fi @@ -45115,7 +44601,48 @@ esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_static_works=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } +if test yes = "$lt_cv_prog_compiler_static_works"; then + : +else + lt_prog_compiler_static= +fi @@ -45123,1473 +44650,1537 @@ esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } + if test no = "$hard_links"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + case $host_os in + cygwin* | mingw* | windows* | pw32* | cegcc*) + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. + if test yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) + with_gnu_ld=yes + ;; + esac + ld_shlibs=yes + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. +_LT_EOF + fi + ;; + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | windows* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='$wl--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + file_list_spec='@' + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs=no + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + file_list_spec='@' + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + case $cc_basename in + tcc*) + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + *-mlibc) + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; - - - - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else - can_build_shared=no + ld_shlibs=no fi ;; esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + if test no = "$ld_shlibs"; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; -cygwin* | mingw* | windows* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no + aix[4-9]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - # If user builds GCC with multilib enabled, - # it should just install on $(libdir) - # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. - if test xyes = x"$multilib"; then - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - $install_prog $dir/$dlname $destdir/$dlname~ - chmod a+x $destdir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib $destdir/$dlname'\'' || exit \$?; - fi' - else - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - fi - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | windows* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - *,cl* | *,icl*) - # Native MSVC or ICC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac - case $build_os in - mingw* | windows*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + if test yes = "$GCC"; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; + export_dynamic_flag_spec='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - *) - # Assume MSVC and ICC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; +int +main (void) +{ -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + ;; +esac +fi -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + aix_libpath=$lt_cv_aix_libpath_ +fi -freebsd* | dragonfly* | midnightbsd*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - case $host_cpu in - powerpc64) - # On FreeBSD bi-arch platforms, a different variable is used for 32-bit - # binaries. See . - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int test_pointer_size[sizeof (void *) - 5]; +int +main (void) +{ + + ; + return 0; +} _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - shlibpath_var=LD_LIBRARY_PATH -else case e in #( - e) shlibpath_var=LD_32_LIBRARY_PATH ;; + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - *) - shlibpath_var=LD_LIBRARY_PATH - ;; - esac - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' - sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' - hardcode_into_libs=no - ;; + aix_libpath=$lt_cv_aix_libpath_ +fi -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | windows* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl* | icl*) + # Native MSVC or ICC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC and ICC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; + else + ld_shlibs=no + fi -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + ;; - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; - dynamic_linker='Android linker' - # -rpath works at least for libraries that are not overridden by - # libraries installed in system locations. - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - ;; + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; - # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly* | midnightbsd*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +printf %s "checking if $CC understands -b... " >&6; } +if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + e) lt_cv_prog_compiler__b=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } -int -main (void) -{ +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi - ; - return 0; -} + ;; + esac + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test ${lt_cv_irix_exported_symbol+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : - lt_cv_shlibpath_overrides_runpath=yes -fi + lt_cv_irix_exported_symbol=yes +else case e in #( + e) lt_cv_irix_exported_symbol=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ;; + LDFLAGS=$save_LDFLAGS ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directories which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -serenity*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - dynamic_linker='SerenityOS LibELF' - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + esac + ;; -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + *-mlibc) + ;; -emscripten*) - version_type=none - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - dynamic_linker="Emscripten linker" - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' + *nto* | *qnx*) + ;; - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + else + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + fi + else + ld_shlibs=no fi - lt_prog_compiler_pic='-fPIC' ;; - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: ;; - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= + serenity*) ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; + solaris*) + no_undefined_flag=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; *) - lt_prog_compiler_pic='-fPIC' + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi ;; esac + link_all_deplibs=yes ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. + sunos4*) + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes fi ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='$wl-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='$wl-Bexport' + runpath_var='LD_RUN_PATH' - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no ;; - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' + *) + ld_shlibs=no ;; + esac - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - *flang* | ftn | f18* | f95*) - # Flang compiler. - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac - ;; + fi + fi - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +printf "%s\n" "$ld_shlibs" >&6; } +test no = "$ld_shlibs" && can_build_shared=no - *-mlibc) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; +with_gnu_ld=$with_gnu_ld - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - serenity*) - ;; - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # -# Check to make sure the PIC flag actually works. +# Do we need to explicitly link libc? # -if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - ;; + e) $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi -fi -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi -='-fPIC' - archive_cmds='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' - archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' - archive_cmds_need_lc=no - no_undefined_flag= - ;; -*) - dynamic_linker=no - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH @@ -46687,2396 +46278,1532 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -printf "%s\n" "$hardcode_action" >&6; } -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - mingw* | windows* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - darwin*) - # if libdl is installed we need to link against it - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (void); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dl_dlopen=yes -else case e in #( - e) ac_cv_lib_dl_dlopen=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else case e in #( - e) - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; -esac -fi - ;; - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes -then : - lt_cv_dlopen=shl_load -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -printf %s "checking for shl_load in -ldld... " >&6; } -if test ${ac_cv_lib_dld_shl_load+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (void); -int -main (void) -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dld_shl_load=yes -else case e in #( - e) ac_cv_lib_dld_shl_load=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes -then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else case e in #( - e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : - lt_cv_dlopen=dlopen -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (void); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dl_dlopen=yes -else case e in #( - e) ac_cv_lib_dl_dlopen=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -printf %s "checking for dlopen in -lsvld... " >&6; } -if test ${ac_cv_lib_svld_dlopen+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (void); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_svld_dlopen=yes -else case e in #( - e) ac_cv_lib_svld_dlopen=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes -then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -printf %s "checking for dld_link in -ldld... " >&6; } -if test ${ac_cv_lib_dld_dld_link+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (void); -int -main (void) -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dld_dld_link=yes -else case e in #( - e) ac_cv_lib_dld_dld_link=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes -then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - ;; -esac -fi - ;; -esac -fi - ;; -esac -fi - ;; -esac -fi - ;; -esac -fi - ;; - esac - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -printf %s "checking whether a program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" -#if HAVE_DLFCN_H -#include -#endif -#include -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord (void) __attribute__((visibility("default"))); -#endif -int fnord (void) { return 42; } -int main (void) -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ +if test yes = "$GCC"; then + case $host_os in + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; + esac + case $host_os in + mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary... + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo = "/" $lt_i lt_foo; + } else { + lt_count--; + } + } } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi -rm -fr conftest* +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -printf "%s\n" "$lt_cv_dlopen_self" >&6; } +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -printf %s "checking whether a statically linked program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self_static+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" -#if HAVE_DLFCN_H -#include -#endif -#include +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord (void) __attribute__((visibility("default"))); -#endif - -int fnord (void) { return 42; } -int main (void) -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH else - puts (dlerror ()); + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; esac - else : - # compilation failed - lt_cv_dlopen_self_static=no + shlibpath_var=LIBPATH fi -fi -rm -fr conftest* - - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } - fi + ;; - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac + ;; - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; +cygwin* | mingw* | windows* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + # If user builds GCC with multilib enabled, + # it should just install on $(libdir) + # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. + if test xyes = x"$multilib"; then + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + $install_prog $dir/$dlname $destdir/$dlname~ + chmod a+x $destdir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib $destdir/$dlname'\'' || exit \$?; + fi' + else + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + fi + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | windows* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + *,cl* | *,icl*) + # Native MSVC or ICC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' -striplib= -old_striplib= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -printf %s "checking whether stripping libraries is possible... " >&6; } -if test -z "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - case $host_os in - darwin*) - # FIXME - insert some real tests, host_os isn't really good enough - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + case $build_os in + mingw* | windows*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; - freebsd*) - if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac - fi -fi - - - - - - - - - - - - - # Report what library types will actually be built - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi + *) + # Assume MSVC and ICC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } - - + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -CC=$lt_save_CC +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -printf %s "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test ${ac_cv_prog_CXXCPP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) # Double quotes because $CXX needs to be expanded - for CXXCPP in "$CXX -E" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +freebsd* | dragonfly* | midnightbsd*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + case $host_cpu in + powerpc64) + # On FreeBSD bi-arch platforms, a different variable is used for 32-bit + # binaries. See . + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - Syntax error +int test_pointer_size[sizeof (void *) - 5]; + _ACEOF -if ac_fn_cxx_try_cpp "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - + shlibpath_var=LD_LIBRARY_PATH else case e in #( - e) # Broken: fails on valid input. -continue ;; -esac -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else case e in #( - e) # Passes both tests. -ac_preproc_ok=: -break ;; -esac -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - ;; -esac -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -printf "%s\n" "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : - -else case e in #( - e) # Broken: fails on valid input. -continue ;; -esac -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else case e in #( - e) # Passes both tests. -ac_preproc_ok=: -break ;; -esac -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - -else case e in #( - e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See 'config.log' for more details" "$LINENO" 5; } ;; + e) shlibpath_var=LD_32_LIBRARY_PATH ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + *) + shlibpath_var=LD_LIBRARY_PATH + ;; + esac + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no + ;; -else - _lt_caught_CXX_error=yes -fi +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -reload_flag_CXX=$reload_flag -reload_cmds_CXX=$reload_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; -# Source file extension for C++ test sources. -ac_ext=cpp +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + dynamic_linker='Android linker' + # -rpath works at least for libraries that are not overridden by + # libraries installed in system locations. + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + ;; - # ltmain only uses $CC for tagged configurations so make sure $CC is set. +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ;; +esac +fi + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} + # Ideally, we could use ldconfig to report *all* directories which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; -# Allow CC to be a program name with arguments. -compiler=$CC +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - $as_unset lt_cv_path_LD + need_version=yes fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; - if test yes = "$GXX"; then - # Set up default GNU C++ configuration +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; +rdos*) + dynamic_linker=no + ;; -# Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else case e in #( - e) with_gnu_ld=no ;; -esac -fi +serenity*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw* | *-*-windows*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; esac -elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } -fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -printf "%s\n" "$LD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld +emscripten*) + version_type=none + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + dynamic_linker="Emscripten linker" + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + if test yes = "$GCC"; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + lt_prog_compiler_pic='-fPIC' + ;; + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; - else - GXX=no - with_gnu_ld=no - wlarc= - fi + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; - # PORTME: fill in a description of your system's C++ link characteristics - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_CXX=no - hardcode_direct_absolute_CXX=no - ;; - esac + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; - if test yes = "$GXX"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='$wl-a ${wl}archive' + ;; - export_dynamic_flag_spec_CXX='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - no_undefined_flag_CXX='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath__CXX+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; -int -main (void) -{ + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + *flang* | ftn | f18* | f95*) + # Flang compiler. + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + *-mlibc) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + serenity*) + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac fi + +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } - aix_libpath=$lt_cv_aix_libpath__CXX +if test yes = "$lt_cv_prog_compiler_pic_works"; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no fi - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" +fi - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath__CXX+y} + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + e) lt_cv_prog_compiler_static_works=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } -int -main (void) -{ +if test yes = "$lt_cv_prog_compiler_static_works"; then + : +else + lt_prog_compiler_static= +fi - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - ;; + +='-fPIC' + archive_cmds='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' + archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' + archive_cmds_need_lc=no + no_undefined_flag= + ;; + +*) + dynamic_linker=no + ;; esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi - aix_libpath=$lt_cv_aix_libpath__CXX +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' $wl-bernotok' - allow_undefined_flag_CXX=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - fi - archive_cmds_need_lc_CXX=yes - archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - cygwin* | mingw* | windows* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl* | ,icl* | no,icl*) - # Native MSVC or ICC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_CXX=' ' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=yes - file_list_spec_CXX='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' - enable_shared_with_static_runtimes_CXX=yes - # Don't use ranlib - old_postinstall_cmds_CXX='chmod 644 $oldlib' - postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='$wl--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - file_list_spec_CXX='@' +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - whole_archive_flag_spec_CXX='' - fi - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi - else - ld_shlibs_CXX=no - fi - ;; - os2*) - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_minus_L_CXX=yes - allow_undefined_flag_CXX=unsupported - shrext_cmds=.dll - archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_from_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_CXX=yes - file_list_spec_CXX='@' - ;; - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | dragonfly* | midnightbsd*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs_CXX=no - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='$wl-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " [-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_CXX=yes - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - *-mlibc) - ld_shlibs_CXX=yes - ;; - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='$wl-E' - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - ld_shlibs_CXX=no - fi - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - hardcode_libdir_separator_CXX=: - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - serenity*) - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - output_verbose_link_cmd='func_echo_all' - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - no_undefined_flag_CXX=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' - fi - hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='$wl-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='$wl-z,text' - allow_undefined_flag_CXX='$wl-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='$wl-Bexport' - runpath_var='LD_RUN_PATH' - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" - reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -printf "%s\n" "$ld_shlibs_CXX" >&6; } - test no = "$ld_shlibs_CXX" && can_build_shared=no - GCC_CXX=$GXX - LD_CXX=$LD - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - -L* | -R* | -l*) - # Some compilers place space between "-{L,R,l}" and the path. - # Remove the space. - if test x-L = x"$p" || - test x-R = x"$p" || - test x-l = x"$p"; then - prev=$p - continue - fi - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX=$prev$p - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX=$prev$p - else - postdeps_CXX="${postdeps_CXX} $prev$p" - fi - fi - prev= - ;; - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - if test no = "$pre_test_object_deps_done"; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX=$p - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX=$p - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - *) ;; # Ignore the rest. - esac - done - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; -esac -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi @@ -49094,1621 +47821,2428 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test yes = "$hardcode_automatic"; then + # We can hardcode non-existent directories. + if test no != "$hardcode_direct" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +printf "%s\n" "$hardcode_action" >&6; } +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi + if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + mingw* | windows* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + darwin*) + # if libdl is installed we need to link against it + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (void); +int +main (void) +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dl_dlopen=yes +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else case e in #( + e) + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; +esac +fi - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= + ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes +then : + lt_cv_dlopen=shl_load +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - lt_prog_compiler_pic_CXX='-fPIC' - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (void); +int +main (void) +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dld_shl_load=yes +else case e in #( + e) ac_cv_lib_dld_shl_load=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld +else case e in #( + e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes +then : + lt_cv_dlopen=dlopen +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (void); +int +main (void) +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dl_dlopen=yes +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +printf %s "checking for dlopen in -lsvld... " >&6; } +if test ${ac_cv_lib_svld_dlopen+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_CXX='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (void); +int +main (void) +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_svld_dlopen=yes +else case e in #( + e) ac_cv_lib_svld_dlopen=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes +then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +printf %s "checking for dld_link in -ldld... " >&6; } +if test ${ac_cv_lib_dld_dld_link+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (void); +int +main (void) +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dld_dld_link=yes +else case e in #( + e) ac_cv_lib_dld_dld_link=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes +then : + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld +fi + + ;; +esac +fi + + ;; +esac +fi + + ;; +esac +fi + + ;; +esac +fi + + ;; +esac +fi + + ;; + esac + + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +printf %s "checking whether a program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord (void) __attribute__((visibility("default"))); +#endif + +int fnord (void) { return 42; } +int main (void) +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +printf "%s\n" "$lt_cv_dlopen_self" >&6; } + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +printf %s "checking whether a statically linked program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self_static+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord (void) __attribute__((visibility("default"))); +#endif + +int fnord (void) { return 42; } +int main (void) +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +printf %s "checking whether stripping libraries is possible... " >&6; } +if test -z "$STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; *) - lt_prog_compiler_pic_CXX='-fPIC' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly* | midnightbsd*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *-mlibc) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - serenity*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac fi +fi -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= + + + + + + + + + + + + # Report what library types will actually be built + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +printf %s "checking if libtool supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +printf "%s\n" "$can_build_shared" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +printf %s "checking whether to build shared libraries... " >&6; } + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + + aix[4-9]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi ;; -esac + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$enable_shared" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic_CXX+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +printf %s "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } + + + + +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +CC=$lt_save_CC + + if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +printf %s "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if test ${ac_cv_prog_CXXCPP+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX ;; + e) # Double quotes because $CXX needs to be expanded + for CXXCPP in "$CXX -E" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO" +then : + +else case e in #( + e) # Broken: fails on valid input. +continue ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX +rm -f conftest.err conftest.i conftest.$ac_ext -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works_CXX+y} + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO" then : - printf %s "(cached) " >&6 + # Broken: success on invalid input. +continue else case e in #( - e) lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - ;; + e) # Passes both tests. +ac_preproc_ok=: +break ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + ;; +esac +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +printf "%s\n" "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO" +then : + +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else case e in #( + e) # Passes both tests. +ac_preproc_ok=: +break ;; +esac +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See 'config.log' for more details" "$LINENO" 5; } ;; +esac +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no -if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi +# Source file extension for C++ test sources. +ac_ext=cpp -fi +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_caught_CXX_error"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + # ltmain only uses $CC for tagged configurations so make sure $CC is set. -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works_CXX+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } -if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then - : -else - lt_prog_compiler_static_CXX= -fi +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_CXX+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } +# Allow CC to be a program name with arguments. +compiler=$CC + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_CXX+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + func_cc_basename $compiler +cc_basename=$func_cc_basename_result + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test yes = "$GXX"; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } - if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi + if test yes = "$GXX"; then + # Set up default GNU C++ configuration - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } +# Check whether --with-gnu-ld was given. +if test ${with_gnu_ld+y} +then : + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes +else case e in #( + e) with_gnu_ld=no ;; +esac +fi - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX=$ltdll_cmds - ;; - cygwin* | mingw* | windows* | cegcc*) - case $cc_basename in - cl* | icl*) - exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw* | *-*-windows*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog ;; - esac + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld ;; *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown ;; esac +elif test yes = "$with_gnu_ld"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } +fi +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 -printf "%s\n" "$ld_shlibs_CXX" >&6; } -test no = "$ld_shlibs_CXX" && can_build_shared=no +LD=$lt_cv_path_LD +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld -with_gnu_ld_CXX=$with_gnu_ld -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test yes = "$with_gnu_ld"; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc_CXX+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_CXX=no - else - lt_cv_archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; } - archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX - ;; - esac - fi - ;; -esac + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='$wl' + + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + # PORTME: fill in a description of your system's C++ link characteristics + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix[4-9]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct_CXX=no + hardcode_direct_absolute_CXX=no + ;; + esac + if test yes = "$GXX"; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + export_dynamic_flag_spec_CXX='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + # The "-G" linker flag allows undefined symbols. + no_undefined_flag_CXX='-bernotok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath__CXX+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=/usr/lib:/lib + fi + ;; +esac +fi + aix_libpath=$lt_cv_aix_libpath__CXX +fi + hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath__CXX+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=/usr/lib:/lib + fi + ;; +esac +fi + aix_libpath=$lt_cv_aix_libpath__CXX +fi + hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' $wl-bernotok' + allow_undefined_flag_CXX=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi + archive_cmds_need_lc_CXX=yes + archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + cygwin* | mingw* | windows* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='$wl--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + file_list_spec_CXX='@' + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_CXX='' + fi + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + fi + else + ld_shlibs_CXX=no + fi + ;; + os2*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_minus_L_CXX=yes + allow_undefined_flag_CXX=unsupported + shrext_cmds=.dll + archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_CXX=yes + file_list_spec_CXX='@' + ;; + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | dragonfly* | midnightbsd*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs_CXX=no + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='$wl-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes = "$GXX"; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' + hardcode_libdir_separator_CXX=: + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='$wl-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " [-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object_CXX=yes + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + *-mlibc) + ld_shlibs_CXX=yes + ;; + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='$wl-E' + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + ld_shlibs_CXX=no + fi + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + hardcode_libdir_separator_CXX=: + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' + archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + hardcode_libdir_separator_CXX=: - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes,no = "$GXX,$with_gnu_ld"; then + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + ;; + esac -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + hardcode_libdir_separator_CXX=: -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH + serenity*) + ;; - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; + output_verbose_link_cmd='func_echo_all' -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test yes,no = "$GXX,$with_gnu_ld"; then + no_undefined_flag_CXX=' $wl-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -cygwin* | mingw* | windows* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' + else + # g++ 2.7 appears to require '-G' NOT '-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - # If user builds GCC with multilib enabled, - # it should just install on $(libdir) - # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. - if test xyes = x"$multilib"; then - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - $install_prog $dir/$dlname $destdir/$dlname~ - chmod a+x $destdir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib $destdir/$dlname'\'' || exit \$?; - fi' - else - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - fi - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' + fi - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='$wl-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; - mingw* | windows* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - *,cl* | *,icl*) - # Native MSVC or ICC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='$wl-z,text' + allow_undefined_flag_CXX='$wl-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='$wl-Bexport' + runpath_var='LD_RUN_PATH' - case $build_os in - mingw* | windows*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" + ;; + *) + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; - esac - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; - *) - # Assume MSVC and ICC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +printf "%s\n" "$ld_shlibs_CXX" >&6; } + test no = "$ld_shlibs_CXX" && can_build_shared=no -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + GCC_CXX=$GXX + LD_CXX=$LD -freebsd* | dragonfly* | midnightbsd*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - case $host_cpu in - powerpc64) - # On FreeBSD bi-arch platforms, a different variable is used for 32-bit - # binaries. See . - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int test_pointer_size[sizeof (void *) - 5]; + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - shlibpath_var=LD_LIBRARY_PATH -else case e in #( - e) shlibpath_var=LD_32_LIBRARY_PATH ;; +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - *) - shlibpath_var=LD_LIBRARY_PATH - ;; - esac - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' - sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' - hardcode_into_libs=no - ;; +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + for p in `eval "$output_verbose_link_cmd"`; do + case $prev$p in -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; + -L* | -R* | -l*) + # Some compilers place space between "-{L,R,l}" and the path. + # Remove the space. + if test x-L = x"$p" || + test x-R = x"$p" || + test x-l = x"$p"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test no = "$pre_test_object_deps_done"; then + case $prev in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX=$prev$p + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX=$prev$p + else + postdeps_CXX="${postdeps_CXX} $prev$p" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; + if test no = "$pre_test_object_deps_done"; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX=$p + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX=$p + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + *) ;; # Ignore the rest. - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes + esac + done - dynamic_linker='Android linker' - # -rpath works at least for libraries that are not overridden by - # libraries installed in system locations. - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - ;; + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS - # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; +esac -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ;; +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - # Ideally, we could use ldconfig to report *all* directories which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; -rdos*) - dynamic_linker=no - ;; -serenity*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - dynamic_linker='SerenityOS LibELF' - ;; -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -emscripten*) - version_type=none - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - dynamic_linker="Emscripten linker" - lt_prog_compiler_wl_CXX= + + + + + + + + + + lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= @@ -51057,151 +50591,397 @@ else case e in #( e) lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works_CXX+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works_CXX+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_CXX+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works_CXX+y} + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_CXX+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext + e) lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment + + lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) + (eval "$lt_compile" 2>out/conftest.err) ac_status=$? - cat conftest.err >&5 + cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes fi fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest $RM conftest* ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } -if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac + + + +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } + if test no = "$hard_links"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no + need_locks=no fi -fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX=$ltdll_cmds + ;; + cygwin* | mingw* | windows* | cegcc*) + case $cc_basename in + cl* | icl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +printf "%s\n" "$ld_shlibs_CXX" >&6; } +test no = "$ld_shlibs_CXX" && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + # -# Check to make sure the static flag actually works. +# Do we need to explicitly link libc? # -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works_CXX+y} +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc_CXX+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - ;; + e) $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + -if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then - : -else - lt_prog_compiler_static_CXX= -fi -='-fPIC' - archive_cmds_CXX='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' - archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' - archive_cmds_need_lc_CXX=no - no_undefined_flag_CXX= - ;; -*) - dynamic_linker=no - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH @@ -51237,253 +51017,862 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + + + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | windows* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + # If user builds GCC with multilib enabled, + # it should just install on $(libdir) + # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. + if test xyes = x"$multilib"; then + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + $install_prog $dir/$dlname $destdir/$dlname~ + chmod a+x $destdir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib $destdir/$dlname'\'' || exit \$?; + fi' + else + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + fi + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + + ;; + mingw* | windows* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl* | *,icl*) + # Native MSVC or ICC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' + + case $build_os in + mingw* | windows*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + *) + # Assume MSVC and ICC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test yes = "$hardcode_automatic_CXX"; then +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - # We can hardcode non-existent directories. - if test no != "$hardcode_direct_CXX" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && - test no != "$hardcode_minus_L_CXX"; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink +freebsd* | dragonfly* | midnightbsd*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -printf "%s\n" "$hardcode_action_CXX" >&6; } + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + case $host_cpu in + powerpc64) + # On FreeBSD bi-arch platforms, a different variable is used for 32-bit + # binaries. See . + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int test_pointer_size[sizeof (void *) - 5]; -if test relink = "$hardcode_action_CXX" || - test yes = "$inherit_rpath_CXX"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + shlibpath_var=LD_LIBRARY_PATH +else case e in #( + e) shlibpath_var=LD_32_LIBRARY_PATH ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + *) + shlibpath_var=LD_LIBRARY_PATH + ;; + esac + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no + ;; +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + dynamic_linker='Android linker' + # -rpath works at least for libraries that are not overridden by + # libraries installed in system locations. + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + ;; +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu +int +main (void) +{ -if test -z "$F77" || test no = "$F77"; then - _lt_disable_F77=yes + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ;; +esac fi -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_direct_absolute_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -inherit_rpath_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -reload_flag_F77=$reload_flag -reload_cmds_F77=$reload_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_F77"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - # ltmain only uses $CC for tagged configurations so make sure $CC is set. + # Ideally, we could use ldconfig to report *all* directories which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -# Allow CC to be a program name with arguments. -compiler=$CC +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* +rdos*) + dynamic_linker=no + ;; - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* +serenity*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - compiler_F77=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; - GCC=$G77 - if test -n "$compiler"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; - GCC_F77=$G77 - LD_F77=$LD +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= +emscripten*) + version_type=none + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + dynamic_linker="Emscripten linker" + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= - if test yes = "$GCC"; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' + # C++ specific cases for pic, static, wl, etc. + if test yes = "$GXX"; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' case $host_os in - aix*) + aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_static_CXX='-Bstatic' fi - lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; @@ -51491,353 +51880,335 @@ lt_prog_compiler_static_F77= beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries - lt_prog_compiler_pic_F77='-DDLL_EXPORT' + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' case $host_os in os2*) - lt_prog_compiler_static_F77='$wl-static' + lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; - darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= ;; - haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. - lt_prog_compiler_static_F77= + lt_prog_compiler_static_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi ;; - hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) - # +Z the default ;; *) - lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no - ;; - - *nto* | *qnx*) + *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. - lt_prog_compiler_pic_F77='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi + lt_prog_compiler_pic_CXX='-fPIC -shared' ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl_F77='-Xlinker ' - if test -n "$lt_prog_compiler_pic_F77"; then - lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77" - fi + lt_prog_compiler_pic_CXX='-fPIC' ;; esac else - # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl_F77='-Wl,-Wl,,' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - esac - ;; - - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_F77='$wl-static' + aix[4-9]*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac ;; - *) - lt_prog_compiler_pic_F77='+Z' + mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - *flang* | ftn | f18* | f95*) - # Flang compiler. - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='--shared' - lt_prog_compiler_static_F77='--static' + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly* | midnightbsd*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64, which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl_F77='-Wl,-Wl,,' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' + netbsd* | netbsdelf*-gnu) ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' + *-mlibc) ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + serenity*) ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-qpic' - lt_prog_compiler_static_F77='-qstaticlink' + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac ;; - *) - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; esac ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *-mlibc) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_F77='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_F77='-non_shared' - ;; - - serenity*) - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_F77=no - ;; + lt_prog_compiler_can_build_shared_CXX=no + ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) - lt_prog_compiler_pic_F77= + lt_prog_compiler_pic_CXX= ;; *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic_F77+y} +if test ${lt_cv_prog_compiler_pic_CXX+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 ;; + e) lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_F77" >&6; } -lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # -if test -n "$lt_prog_compiler_pic_F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works_F77+y} +if test -n "$lt_prog_compiler_pic_CXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works_CXX+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_pic_works_F77=no + e) lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" ## exclude from sc_useless_quotes_in_assignment + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -51858,24 +52229,24 @@ else case e in #( $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_F77=yes + lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works_F77" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } -if test yes = "$lt_cv_prog_compiler_pic_works_F77"; then - case $lt_prog_compiler_pic_F77 in +if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then + case $lt_prog_compiler_pic_CXX in "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no fi fi @@ -51887,14 +52258,14 @@ fi # # Check to make sure the static flag actually works. # -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works_F77+y} +if test ${lt_cv_prog_compiler_static_works_CXX+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_static_works_F77=no + e) lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -51907,10 +52278,10 @@ else case e in #( $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_F77=yes + lt_cv_prog_compiler_static_works_CXX=yes fi else - lt_cv_prog_compiler_static_works_F77=yes + lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* @@ -51918,2855 +52289,2238 @@ else case e in #( ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works_F77" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } -if test yes = "$lt_cv_prog_compiler_static_works_F77"; then +if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else - lt_prog_compiler_static_F77= -fi - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_F77+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o_F77=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - ;; -esac + lt_prog_compiler_static_CXX= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_F77" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_F77+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o_F77=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +='-fPIC' + archive_cmds_CXX='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' + archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' + archive_cmds_need_lc_CXX=no + no_undefined_flag_CXX= + ;; - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - ;; +*) + dynamic_linker=no + ;; esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_F77" >&6; } - - - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } +test no = "$dynamic_linker" && can_build_shared=no -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_F77" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } - if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +fi +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag_F77= - always_export_symbols_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - compiler_needs_object_F77=no - enable_shared_with_static_runtimes_F77=no - export_dynamic_flag_spec_F77= - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic_F77=no - hardcode_direct_F77=no - hardcode_direct_absolute_F77=no - hardcode_libdir_flag_spec_F77= - hardcode_libdir_separator_F77= - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - inherit_rpath_F77=no - link_all_deplibs_F77=unknown - module_cmds_F77= - module_expsym_cmds_F77= - old_archive_from_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - thread_safe_flag_spec_F77= - whole_archive_flag_spec_F77= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | windows* | pw32* | cegcc*) - # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) - with_gnu_ld=yes - ;; - esac - - ld_shlibs_F77=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_F77='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH -_LT_EOF - fi - ;; - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='' - ;; - m68k) - archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - ;; - esac - ;; - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - cygwin* | mingw* | windows* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - export_dynamic_flag_spec_F77='$wl--export-all-symbols' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - file_list_spec_F77='@' - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_F77='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - haiku*) - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs_F77=no - ;; - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - shrext_cmds=.dll - archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_from_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_F77=yes - file_list_spec_F77='@' - ;; - interix[3-9]*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir' - export_dynamic_flag_spec_F77='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec_F77= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_F77=yes - ;; - esac - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_F77=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - case $cc_basename in - tcc*) - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_F77='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs_F77=no - fi - ;; - *-mlibc) - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - if test no = "$ld_shlibs_F77"; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_direct_absolute_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - file_list_spec_F77='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_F77=no - hardcode_direct_absolute_F77=no - ;; - esac - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - export_dynamic_flag_spec_F77='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath__F77+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat > conftest.$ac_ext <<_ACEOF - program main - end -_ACEOF -if ac_fn_f77_try_link "$LINENO" -then : - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__F77"; then - lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__F77"; then - lt_cv_aix_libpath__F77=/usr/lib:/lib + + + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test yes = "$hardcode_automatic_CXX"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct_CXX" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && + test no != "$hardcode_minus_L_CXX"; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate fi - ;; -esac +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +printf "%s\n" "$hardcode_action_CXX" >&6; } - aix_libpath=$lt_cv_aix_libpath__F77 +if test relink = "$hardcode_action_CXX" || + test yes = "$inherit_rpath_CXX"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless fi - hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_F77='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath__F77+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat > conftest.$ac_ext <<_ACEOF - program main - end -_ACEOF -if ac_fn_f77_try_link "$LINENO" -then : - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__F77"; then - lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__F77"; then - lt_cv_aix_libpath__F77=/usr/lib:/lib - fi - ;; -esac -fi - aix_libpath=$lt_cv_aix_libpath__F77 -fi - hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' $wl-bernotok' - allow_undefined_flag_F77=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_F77='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - fi - archive_cmds_need_lc_F77=yes - archive_expsym_cmds_F77='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='' - ;; - m68k) - archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - ;; - esac - ;; - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; + fi # test -n "$compiler" - cygwin* | mingw* | windows* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl* | icl*) - # Native MSVC or ICC - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - file_list_spec_F77='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_F77='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true' - enable_shared_with_static_runtimes_F77=yes - exclude_expsyms_F77='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds_F77='chmod 644 $oldlib' - postlink_cmds_F77='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC and ICC wrapper - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes_F77=yes - ;; - esac - ;; + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test yes != "$_lt_caught_CXX_error" - darwin* | rhapsody*) +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - compiler_needs_object_F77=yes - else - whole_archive_flag_spec_F77='' - fi - link_all_deplibs_F77=yes - allow_undefined_flag_F77=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_F77="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_F77="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - else - ld_shlibs_F77=no - fi + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu - ;; +if test -z "$F77" || test no = "$F77"; then + _lt_disable_F77=yes +fi - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_direct_absolute_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +inherit_rpath_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +reload_flag_F77=$reload_flag +reload_cmds_F77=$reload_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; +# Source file extension for f77 test sources. +ac_ext=f - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly* | midnightbsd*) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_disable_F77"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" - hpux9*) - if test yes = "$GCC"; then - archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='$wl-E' - ;; + # ltmain only uses $CC for tagged configurations so make sure $CC is set. - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - hardcode_direct_absolute_F77=yes - export_dynamic_flag_spec_F77='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir' - hardcode_libdir_separator_F77=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - hardcode_direct_absolute_F77=yes - export_dynamic_flag_spec_F77='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat > conftest.$ac_ext <<_ACEOF - subroutine foo - end -_ACEOF -if ac_fn_f77_try_link "$LINENO" -then : - lt_cv_irix_exported_symbol=yes -else case e in #( - e) lt_cv_irix_exported_symbol=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc_F77='no' - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - hardcode_libdir_separator_F77=: - inherit_rpath_F77=yes - link_all_deplibs_F77=yes - ;; +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs_F77=yes - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - ;; - esac - ;; +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - *-mlibc) - ;; +# Allow CC to be a program name with arguments. +compiler=$CC - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + compiler_F77=$CC + func_cc_basename $compiler +cc_basename=$func_cc_basename_result + + GCC=$G77 + if test -n "$compiler"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +printf %s "checking if libtool supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +printf "%s\n" "$can_build_shared" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +printf %s "checking whether to build shared libraries... " >&6; } + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[4-9]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$enable_shared" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +printf %s "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } + + GCC_F77=$G77 + LD_F77=$LD - *nto* | *qnx*) - ;; + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - hardcode_direct_absolute_F77=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir' - export_dynamic_flag_spec_F77='$wl-E' - else - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir' - fi - else - ld_shlibs_F77=no - fi - ;; - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - shrext_cmds=.dll - archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_from_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_F77=yes - file_list_spec_F77='@' - ;; + if test yes = "$GCC"; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*' - archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' fi - archive_cmds_need_lc_F77='no' - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - hardcode_libdir_separator_F77=: + lt_prog_compiler_pic_F77='-fPIC' ;; - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*' - archive_cmds_F77='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - archive_cmds_need_lc_F77='no' - hardcode_libdir_separator_F77=: + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_F77='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + esac ;; - serenity*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. ;; - solaris*) - no_undefined_flag_F77=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds_F77='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds_F77='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds_F77='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_F77='-DDLL_EXPORT' case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec_F77='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' - fi + os2*) + lt_prog_compiler_static_F77='$wl-static' ;; esac - link_all_deplibs_F77=yes ;; - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' ;; - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_F77= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + *) + lt_prog_compiler_pic_F77='-fPIC' ;; esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no ;; - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_F77='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes + lt_prog_compiler_pic_F77=-Kconform_pic fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_F77='$wl-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac - if test yes = "$GCC"; then - archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_F77='-Xlinker ' + if test -n "$lt_prog_compiler_pic_F77"; then + lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77" fi ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='$wl-z,text' - allow_undefined_flag_F77='$wl-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='$wl-R,$libdir' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' else - archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + esac ;; - *) - ld_shlibs_F77=no + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_F77='$wl-static' + ;; + esac ;; - esac - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec_F77='$wl-Blargedynsym' + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' ;; esac - fi - fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 -printf "%s\n" "$ld_shlibs_F77" >&6; } -test no = "$ld_shlibs_F77" && can_build_shared=no - -with_gnu_ld_F77=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='$wl-a ${wl}archive' ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc_F77+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_F77=no - else - lt_cv_archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc_F77" >&6; } - archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77 + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + *flang* | ftn | f18* | f95*) + # Flang compiler. + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='--shared' + lt_prog_compiler_static_F77='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-qpic' + lt_prog_compiler_static_F77='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + esac + ;; + esac + ;; + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + *-mlibc) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' + ;; + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_F77='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + serenity*) + ;; + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic_F77+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_F77" >&6; } +lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works_F77+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_F77=yes + fi + fi + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works_F77" >&6; } +if test yes = "$lt_cv_prog_compiler_pic_works_F77"; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi +fi +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works_F77+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_static_works_F77=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_F77=yes + fi + else + lt_cv_prog_compiler_static_works_F77=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works_F77" >&6; } +if test yes = "$lt_cv_prog_compiler_static_works_F77"; then + : +else + lt_prog_compiler_static_F77= +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_F77+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_c_o_F77=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_F77" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_F77+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_c_o_F77=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_F77" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o_F77" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } + if test no = "$hard_links"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + runpath_var= + allow_undefined_flag_F77= + always_export_symbols_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + compiler_needs_object_F77=no + enable_shared_with_static_runtimes_F77=no + export_dynamic_flag_spec_F77= + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic_F77=no + hardcode_direct_F77=no + hardcode_direct_absolute_F77=no + hardcode_libdir_flag_spec_F77= + hardcode_libdir_separator_F77= + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + inherit_rpath_F77=no + link_all_deplibs_F77=unknown + module_cmds_F77= + module_expsym_cmds_F77= + old_archive_from_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + thread_safe_flag_spec_F77= + whole_archive_flag_spec_F77= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH + case $host_os in + cygwin* | mingw* | windows* | pw32* | cegcc*) + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. + if test yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) + with_gnu_ld=yes + ;; + esac - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; + ld_shlibs_F77=yes -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; esac - shlibpath_var=LIBPATH fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; -cygwin* | mingw* | windows* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - # If user builds GCC with multilib enabled, - # it should just install on $(libdir) - # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. - if test xyes = x"$multilib"; then - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - $install_prog $dir/$dlname $destdir/$dlname~ - chmod a+x $destdir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib $destdir/$dlname'\'' || exit \$?; - fi' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_F77='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' + whole_archive_flag_spec_F77= fi - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes + supports_anon_versioning=no + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - ;; - mingw* | windows* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 - *,cl* | *,icl*) - # Native MSVC or ICC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. - case $build_os in - mingw* | windows*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` +_LT_EOF + fi ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='' + ;; + m68k) + archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + ;; + esac ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ld_shlibs_F77=no fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC and ICC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + cygwin* | mingw* | windows* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + export_dynamic_flag_spec_F77='$wl--export-all-symbols' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + file_list_spec_F77='@' -freebsd* | dragonfly* | midnightbsd*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds_F77='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_F77=no + fi ;; - esac - case $host_cpu in - powerpc64) - # On FreeBSD bi-arch platforms, a different variable is used for 32-bit - # binaries. See . - cat > conftest.$ac_ext <<_ACEOF -int test_pointer_size[sizeof (void *) - 5]; -_ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : - shlibpath_var=LD_LIBRARY_PATH -else case e in #( - e) shlibpath_var=LD_32_LIBRARY_PATH ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - *) - shlibpath_var=LD_LIBRARY_PATH + haiku*) + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs_F77=no ;; - esac - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' - sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' - hardcode_into_libs=no - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + shrext_cmds=.dll + archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_F77=yes + file_list_spec_F77='@' + ;; - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes + interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir' + export_dynamic_flag_spec_F77='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; - dynamic_linker='Android linker' - # -rpath works at least for libraries that are not overridden by - # libraries installed in system locations. - hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' - ;; + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec_F77= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object_F77=yes + ;; + esac + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object_F77=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi - # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" - cat > conftest.$ac_ext <<_ACEOF - program main + case $cc_basename in + tcc*) + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_F77='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs_F77=no + fi + ;; - end -_ACEOF -if ac_fn_f77_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ;; -esac -fi + *-mlibc) + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 - # Ideally, we could use ldconfig to report *all* directories which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no + if test no = "$ld_shlibs_F77"; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; + aix[4-9]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac -rdos*) - dynamic_linker=no - ;; + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -serenity*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - dynamic_linker='SerenityOS LibELF' - ;; + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_direct_absolute_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + file_list_spec_F77='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct_F77=no + hardcode_direct_absolute_F77=no + ;; + esac -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; + if test yes = "$GCC"; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; + export_dynamic_flag_spec_F77='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath__F77+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF + program main -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; + end +_ACEOF +if ac_fn_f77_try_link "$LINENO" +then : -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=/usr/lib:/lib + fi + ;; +esac +fi -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + aix_libpath=$lt_cv_aix_libpath__F77 +fi -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec_F77='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath__F77+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF + program main -emscripten*) - version_type=none - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - dynamic_linker="Emscripten linker" - lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= + end +_ACEOF +if ac_fn_f77_try_link "$LINENO" +then : + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=/usr/lib:/lib + fi + ;; +esac +fi - if test yes = "$GCC"; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' + aix_libpath=$lt_cv_aix_libpath__F77 +fi - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' + hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' $wl-bernotok' + allow_undefined_flag_F77=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_F77='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + fi + archive_cmds_need_lc_F77=yes + archive_expsym_cmds_F77='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$RM -r $output_objdir/$realname.d' + fi fi - lt_prog_compiler_pic_F77='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_F77='-fPIC' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='' ;; m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes ;; esac ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic ;; - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_F77='$wl-static' + cygwin* | mingw* | windows* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl* | icl*) + # Native MSVC or ICC + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + file_list_spec_F77='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds_F77='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true' + enable_shared_with_static_runtimes_F77=yes + exclude_expsyms_F77='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_F77='chmod 644 $oldlib' + postlink_cmds_F77='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC and ICC wrapper + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_F77=yes ;; esac ;; darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_F77= - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - ;; + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + compiler_needs_object_F77=yes + else + whole_archive_flag_spec_F77='' + fi + link_all_deplibs_F77=yes + allow_undefined_flag_F77=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds_F77="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds_F77="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; + else + ld_shlibs_F77=no + fi - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_F77='-fPIC -shared' + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no ;; - *) - lt_prog_compiler_pic_F77='-fPIC' + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no ;; - esac - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl_F77='-Xlinker ' - if test -n "$lt_prog_compiler_pic_F77"; then - lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77" - fi + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly* | midnightbsd*) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' + + hpux9*) + if test yes = "$GCC"; then + archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl_F77='-Wl,-Wl,,' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - esac - ;; - - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_F77='$wl-static' - ;; - esac - ;; + hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='$wl-a ${wl}archive' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='$wl-E' ;; - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + hardcode_direct_absolute_F77=yes + export_dynamic_flag_spec_F77='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - *flang* | ftn | f18* | f95*) - # Flang compiler. - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='--shared' - lt_prog_compiler_static_F77='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl_F77='-Wl,-Wl,,' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-qpic' - lt_prog_compiler_static_F77='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Qoption ld ' + *) + archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' + ia64*) + archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; - *Portland\ Group*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' + *) + archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + hardcode_direct_absolute_F77=yes + export_dynamic_flag_spec_F77='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes ;; esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test ${lt_cv_irix_exported_symbol+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end +_ACEOF +if ac_fn_f77_try_link "$LINENO" +then : + lt_cv_irix_exported_symbol=yes +else case e in #( + e) lt_cv_irix_exported_symbol=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc_F77='no' + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + hardcode_libdir_separator_F77=: + inherit_rpath_F77=yes + link_all_deplibs_F77=yes + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs_F77=yes + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' ;; esac ;; - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' + *-mlibc) ;; - *-mlibc) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no ;; *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_F77='-fPIC -shared' ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + hardcode_direct_absolute_F77=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir' + export_dynamic_flag_spec_F77='$wl-E' + else + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir' + fi + else + ld_shlibs_F77=no + fi ;; - rdos*) - lt_prog_compiler_static_F77='-non_shared' + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + shrext_cmds=.dll + archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_F77=yes + file_list_spec_F77='@' + ;; + + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*' + archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + archive_cmds_need_lc_F77='no' + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*' + archive_cmds_F77='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + archive_cmds_need_lc_F77='no' + hardcode_libdir_separator_F77=: ;; serenity*) ;; solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; + no_undefined_flag_F77=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds_F77='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds_F77='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='$wl' + archive_cmds_F77='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; *) - lt_prog_compiler_wl_F77='-Wl,';; + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + whole_archive_flag_spec_F77='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; esac + link_all_deplibs_F77=yes ;; sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes fi ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='$wl-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='$wl-z,text' + allow_undefined_flag_F77='$wl-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='$wl-R,$libdir' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no ;; *) - lt_prog_compiler_can_build_shared_F77=no + ld_shlibs_F77=no ;; esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic_F77+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_F77" >&6; } -lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec_F77='$wl-Blargedynsym' + ;; + esac + fi + fi -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works_F77+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_F77=yes - fi - fi - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works_F77" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 +printf "%s\n" "$ld_shlibs_F77" >&6; } +test no = "$ld_shlibs_F77" && can_build_shared=no -if test yes = "$lt_cv_prog_compiler_pic_works_F77"; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi +with_gnu_ld_F77=$with_gnu_ld -fi # -# Check to make sure the static flag actually works. +# Do we need to explicitly link libc? # -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works_F77+y} +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc_F77+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_static_works_F77=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_F77=yes - fi - else - lt_cv_prog_compiler_static_works_F77=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - ;; + e) $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_F77=no + else + lt_cv_archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works_F77" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc_F77" >&6; } + archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77 + ;; + esac + fi + ;; +esac -if test yes = "$lt_cv_prog_compiler_static_works_F77"; then - : -else - lt_prog_compiler_static_F77= -fi -='-fPIC' - archive_cmds_F77='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' - archive_expsym_cmds_F77='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' - archive_cmds_need_lc_F77=no - no_undefined_flag_F77= - ;; -*) - dynamic_linker=no - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH @@ -54807,43 +54561,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || - test -n "$runpath_var_F77" || - test yes = "$hardcode_automatic_F77"; then - # We can hardcode non-existent directories. - if test no != "$hardcode_direct_F77" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, F77)" && - test no != "$hardcode_minus_L_F77"; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 -printf "%s\n" "$hardcode_action_F77" >&6; } -if test relink = "$hardcode_action_F77" || - test yes = "$inherit_rpath_F77"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi @@ -54851,346 +54570,856 @@ fi - fi # test -n "$compiler" - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_F77" -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -z "$FC" || test no = "$FC"; then - _lt_disable_FC=yes -fi +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH -archive_cmds_need_lc_FC=no -allow_undefined_flag_FC= -always_export_symbols_FC=no -archive_expsym_cmds_FC= -export_dynamic_flag_spec_FC= -hardcode_direct_FC=no -hardcode_direct_absolute_FC=no -hardcode_libdir_flag_spec_FC= -hardcode_libdir_separator_FC= -hardcode_minus_L_FC=no -hardcode_automatic_FC=no -inherit_rpath_FC=no -module_cmds_FC= -module_expsym_cmds_FC= -link_all_deplibs_FC=unknown -old_archive_cmds_FC=$old_archive_cmds -reload_flag_FC=$reload_flag -reload_cmds_FC=$reload_cmds -no_undefined_flag_FC= -whole_archive_flag_spec_FC= -enable_shared_with_static_runtimes_FC=no + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V -# Object file extension for compiled fc test sources. -objext=o -objext_FC=$objext + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_FC"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; - # ltmain only uses $CC for tagged configurations so make sure $CC is set. +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; +cygwin* | mingw* | windows* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + # If user builds GCC with multilib enabled, + # it should just install on $(libdir) + # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. + if test xyes = x"$multilib"; then + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + $install_prog $dir/$dlname $destdir/$dlname~ + chmod a+x $destdir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib $destdir/$dlname'\'' || exit \$?; + fi' + else + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + fi + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + mingw* | windows* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + *,cl* | *,icl*) + # Native MSVC or ICC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} + case $build_os in + mingw* | windows*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; -# Allow CC to be a program name with arguments. -compiler=$CC + *) + # Assume MSVC and ICC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly* | midnightbsd*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + case $host_cpu in + powerpc64) + # On FreeBSD bi-arch platforms, a different variable is used for 32-bit + # binaries. See . + cat > conftest.$ac_ext <<_ACEOF +int test_pointer_size[sizeof (void *) - 5]; + +_ACEOF +if ac_fn_f77_try_compile "$LINENO" +then : + shlibpath_var=LD_LIBRARY_PATH +else case e in #( + e) shlibpath_var=LD_32_LIBRARY_PATH ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + *) + shlibpath_var=LD_LIBRARY_PATH + ;; + esac + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no + ;; - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; - compiler_FC=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; - if test -n "$compiler"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } + dynamic_linker='Android linker' + # -rpath works at least for libraries that are not overridden by + # libraries installed in system locations. + hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir' + ;; - GCC_FC=$ac_cv_fc_compiler_gnu - LD_FC=$LD +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_FC= -postdep_objects_FC= -predeps_FC= -postdeps_FC= -compiler_lib_search_path_FC= + # Some binutils ld are patched to set DT_RUNPATH + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" + cat > conftest.$ac_ext <<_ACEOF + program main -cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return end -_LT_EOF - - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +_ACEOF +if ac_fn_f77_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ;; esac +fi -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R,l}" and the path. - # Remove the space. - if test x-L = x"$p" || - test x-R = x"$p" || - test x-l = x"$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_FC"; then - compiler_lib_search_path_FC=$prev$p - else - compiler_lib_search_path_FC="${compiler_lib_search_path_FC} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_FC"; then - postdeps_FC=$prev$p - else - postdeps_FC="${postdeps_FC} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - if test no = "$pre_test_object_deps_done"; then - if test -z "$predep_objects_FC"; then - predep_objects_FC=$p - else - predep_objects_FC="$predep_objects_FC $p" - fi - else - if test -z "$postdep_objects_FC"; then - postdep_objects_FC=$p - else - postdep_objects_FC="$postdep_objects_FC $p" - fi - fi - ;; + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - *) ;; # Ignore the rest. + # Ideally, we could use ldconfig to report *all* directories which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi - esac - done + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling FC test program" -fi +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; -# PORTME: override above test on systems where it is broken +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -case " $postdeps_FC " in -*" -lc "*) archive_cmds_need_lc_FC=no ;; -esac - compiler_lib_search_dirs_FC= -if test -n "${compiler_lib_search_path_FC}"; then - compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; +rdos*) + dynamic_linker=no + ;; +serenity*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - lt_prog_compiler_wl_FC= -lt_prog_compiler_pic_FC= -lt_prog_compiler_static_FC= +emscripten*) + version_type=none + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + dynamic_linker="Emscripten linker" + lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= if test yes = "$GCC"; then - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_static_FC='-static' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_static_F77='-Bstatic' fi - lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_pic_F77='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_pic_F77='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. - lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4' + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; esac ;; @@ -55204,10 +55433,10 @@ lt_prog_compiler_static_FC= # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries - lt_prog_compiler_pic_FC='-DDLL_EXPORT' + lt_prog_compiler_pic_F77='-DDLL_EXPORT' case $host_os in os2*) - lt_prog_compiler_static_FC='$wl-static' + lt_prog_compiler_static_F77='$wl-static' ;; esac ;; @@ -55215,13 +55444,13 @@ lt_prog_compiler_static_FC= darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_FC='-fno-common' + lt_prog_compiler_pic_F77='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. - lt_prog_compiler_static_FC= + lt_prog_compiler_static_F77= ;; hpux*) @@ -55233,7 +55462,7 @@ lt_prog_compiler_static_FC= # +Z the default ;; *) - lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; @@ -55246,32 +55475,32 @@ lt_prog_compiler_static_FC= msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. - lt_prog_compiler_can_build_shared_FC=no + lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. - lt_prog_compiler_pic_FC='-fPIC -shared' + lt_prog_compiler_pic_F77='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then - lt_prog_compiler_pic_FC=-Kconform_pic + lt_prog_compiler_pic_F77=-Kconform_pic fi ;; *) - lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_pic_F77='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl_FC='-Xlinker ' - if test -n "$lt_prog_compiler_pic_FC"; then - lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC" + lt_prog_compiler_wl_F77='-Xlinker ' + if test -n "$lt_prog_compiler_pic_F77"; then + lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77" fi ;; esac @@ -55279,25 +55508,25 @@ lt_prog_compiler_static_FC= # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) - lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_wl_F77='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_static_F77='-Bstatic' else - lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp' + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_FC='-fno-common' + lt_prog_compiler_pic_F77='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler - lt_prog_compiler_wl_FC='-Wl,-Wl,,' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' ;; esac ;; @@ -55305,16 +55534,16 @@ lt_prog_compiler_static_FC= mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_FC='-DDLL_EXPORT' + lt_prog_compiler_pic_F77='-DDLL_EXPORT' case $host_os in os2*) - lt_prog_compiler_static_FC='$wl-static' + lt_prog_compiler_static_F77='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in @@ -55322,104 +55551,104 @@ lt_prog_compiler_static_FC= # +Z the default ;; *) - lt_prog_compiler_pic_FC='+Z' + lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_FC='$wl-a ${wl}archive' + lt_prog_compiler_static_F77='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. - lt_prog_compiler_static_FC='-non_shared' + lt_prog_compiler_static_F77='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-static' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' ;; *flang* | ftn | f18* | f95*) # Flang compiler. - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' ;; # Lahey Fortran 8.1. lf95*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='--shared' - lt_prog_compiler_static_FC='--static' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='--shared' + lt_prog_compiler_static_F77='--static' ;; nagfor*) # NAG Fortran compiler - lt_prog_compiler_wl_FC='-Wl,-Wl,,' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fpic' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) - lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. - lt_prog_compiler_static_FC='-non_shared' + lt_prog_compiler_static_F77='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-qpic' - lt_prog_compiler_static_FC='-qstaticlink' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-qpic' + lt_prog_compiler_static_F77='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' ;; *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='-Qoption ld ' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' ;; *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' ;; *Portland\ Group*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fpic' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' ;; esac ;; @@ -55427,83 +55656,83 @@ lt_prog_compiler_static_FC= ;; newsos6) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' ;; *-mlibc) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fPIC' + lt_prog_compiler_static_F77='-static' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. - lt_prog_compiler_pic_FC='-fPIC -shared' + lt_prog_compiler_pic_F77='-fPIC -shared' ;; osf3* | osf4* | osf5*) - lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. - lt_prog_compiler_static_FC='-non_shared' + lt_prog_compiler_static_F77='-non_shared' ;; rdos*) - lt_prog_compiler_static_FC='-non_shared' + lt_prog_compiler_static_F77='-non_shared' ;; serenity*) ;; solaris*) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl_FC='-Qoption ld ';; + lt_prog_compiler_wl_F77='-Qoption ld ';; *) - lt_prog_compiler_wl_FC='-Wl,';; + lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) - lt_prog_compiler_wl_FC='-Qoption ld ' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then - lt_prog_compiler_pic_FC='-Kconform_pic' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_can_build_shared_FC=no + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no ;; uts4*) - lt_prog_compiler_pic_FC='-pic' - lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' ;; *) - lt_prog_compiler_can_build_shared_FC=no + lt_prog_compiler_can_build_shared_F77=no ;; esac fi @@ -55511,40 +55740,40 @@ lt_prog_compiler_static_FC= case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) - lt_prog_compiler_pic_FC= + lt_prog_compiler_pic_F77= ;; *) - lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic_FC+y} +if test ${lt_cv_prog_compiler_pic_F77+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC ;; + e) lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_FC" >&6; } -lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_F77" >&6; } +lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 # # Check to make sure the PIC flag actually works. # -if test -n "$lt_prog_compiler_pic_FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works_FC+y} +if test -n "$lt_prog_compiler_pic_F77"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works_F77+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_pic_works_FC=no + e) lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_FC" ## exclude from sc_useless_quotes_in_assignment + lt_compiler_flag="$lt_prog_compiler_pic_F77" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -55565,24 +55794,24 @@ else case e in #( $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_FC=yes + lt_cv_prog_compiler_pic_works_F77=yes fi fi $RM conftest* ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works_FC" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works_F77" >&6; } -if test yes = "$lt_cv_prog_compiler_pic_works_FC"; then - case $lt_prog_compiler_pic_FC in +if test yes = "$lt_cv_prog_compiler_pic_works_F77"; then + case $lt_prog_compiler_pic_F77 in "" | " "*) ;; - *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else - lt_prog_compiler_pic_FC= - lt_prog_compiler_can_build_shared_FC=no + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no fi fi @@ -55594,14 +55823,14 @@ fi # # Check to make sure the static flag actually works. # -wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\" +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works_FC+y} +if test ${lt_cv_prog_compiler_static_works_F77+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_static_works_FC=no + e) lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -55614,10 +55843,10 @@ else case e in #( $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_FC=yes + lt_cv_prog_compiler_static_works_F77=yes fi else - lt_cv_prog_compiler_static_works_FC=yes + lt_cv_prog_compiler_static_works_F77=yes fi fi $RM -r conftest* @@ -55625,2855 +55854,2375 @@ else case e in #( ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works_FC" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works_F77" >&6; } -if test yes = "$lt_cv_prog_compiler_static_works_FC"; then +if test yes = "$lt_cv_prog_compiler_static_works_F77"; then : else - lt_prog_compiler_static_FC= + lt_prog_compiler_static_F77= fi +='-fPIC' + archive_cmds_F77='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' + archive_expsym_cmds_F77='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' + archive_cmds_need_lc_F77=no + no_undefined_flag_F77= + ;; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_FC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o_FC=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_FC=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - ;; +*) + dynamic_linker=no + ;; esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_FC" >&6; } + +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +fi + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + + + + + + + + + + + + + + + + + + - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_FC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o_FC=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_FC=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_FC" >&6; } -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_FC" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } - if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn + + + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || + test -n "$runpath_var_F77" || + test yes = "$hardcode_automatic_F77"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct_F77" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, F77)" && + test no != "$hardcode_minus_L_F77"; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate fi else - need_locks=no + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 +printf "%s\n" "$hardcode_action_F77" >&6; } +if test relink = "$hardcode_action_F77" || + test yes = "$inherit_rpath_F77"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - runpath_var= - allow_undefined_flag_FC= - always_export_symbols_FC=no - archive_cmds_FC= - archive_expsym_cmds_FC= - compiler_needs_object_FC=no - enable_shared_with_static_runtimes_FC=no - export_dynamic_flag_spec_FC= - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic_FC=no - hardcode_direct_FC=no - hardcode_direct_absolute_FC=no - hardcode_libdir_flag_spec_FC= - hardcode_libdir_separator_FC= - hardcode_minus_L_FC=no - hardcode_shlibpath_var_FC=unsupported - inherit_rpath_FC=no - link_all_deplibs_FC=unknown - module_cmds_FC= - module_expsym_cmds_FC= - old_archive_from_new_cmds_FC= - old_archive_from_expsyms_cmds_FC= - thread_safe_flag_spec_FC= - whole_archive_flag_spec_FC= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_FC= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms_FC='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - case $host_os in - cygwin* | mingw* | windows* | pw32* | cegcc*) - # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) - with_gnu_ld=yes - ;; - esac - ld_shlibs_FC=yes - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' + fi # test -n "$compiler" - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_FC='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_FC=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec_FC= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs_FC=no - cat <<_LT_EOF 1>&2 +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. -_LT_EOF - fi - ;; - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='' - ;; - m68k) - archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - ;; - esac - ;; + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_FC=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs_FC=no - fi - ;; - cygwin* | mingw* | windows* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_FC='-L$libdir' - export_dynamic_flag_spec_FC='$wl--export-all-symbols' - allow_undefined_flag_FC=unsupported - always_export_symbols_FC=no - enable_shared_with_static_runtimes_FC=yes - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - file_list_spec_FC='@' +if test -z "$FC" || test no = "$FC"; then + _lt_disable_FC=yes +fi - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_FC=no - fi - ;; +archive_cmds_need_lc_FC=no +allow_undefined_flag_FC= +always_export_symbols_FC=no +archive_expsym_cmds_FC= +export_dynamic_flag_spec_FC= +hardcode_direct_FC=no +hardcode_direct_absolute_FC=no +hardcode_libdir_flag_spec_FC= +hardcode_libdir_separator_FC= +hardcode_minus_L_FC=no +hardcode_automatic_FC=no +inherit_rpath_FC=no +module_cmds_FC= +module_expsym_cmds_FC= +link_all_deplibs_FC=unknown +old_archive_cmds_FC=$old_archive_cmds +reload_flag_FC=$reload_flag +reload_cmds_FC=$reload_cmds +no_undefined_flag_FC= +whole_archive_flag_spec_FC= +enable_shared_with_static_runtimes_FC=no - haiku*) - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs_FC=no - ;; +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} - os2*) - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - allow_undefined_flag_FC=unsupported - shrext_cmds=.dll - archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_from_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_FC=yes - file_list_spec_FC='@' - ;; +# Object file extension for compiled fc test sources. +objext=o +objext_FC=$objext - interix[3-9]*) - hardcode_direct_FC=no - hardcode_shlibpath_var_FC=no - hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' - export_dynamic_flag_spec_FC='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_FC='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_disable_FC"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec_FC= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_FC=yes - ;; - esac - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_FC='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_FC=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi + # ltmain only uses $CC for tagged configurations so make sure $CC is set. - case $cc_basename in - tcc*) - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_FC='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs_FC=no - fi - ;; - *-mlibc) - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs_FC=no - cat <<_LT_EOF 1>&2 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_FC=no - fi - ;; +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_FC=no - cat <<_LT_EOF 1>&2 +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +# Allow CC to be a program name with arguments. +compiler=$CC -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_FC=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds_FC='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - ;; + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + compiler_FC=$CC + func_cc_basename $compiler +cc_basename=$func_cc_basename_result + + + if test -n "$compiler"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +printf %s "checking if libtool supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +printf "%s\n" "$can_build_shared" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +printf %s "checking whether to build shared libraries... " >&6; } + test no = "$can_build_shared" && enable_shared=no - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_FC=no - fi - ;; + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[4-9]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$enable_shared" >&6; } - if test no = "$ld_shlibs_FC"; then - runpath_var= - hardcode_libdir_flag_spec_FC= - export_dynamic_flag_spec_FC= - whole_archive_flag_spec_FC= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_FC=unsupported - always_export_symbols_FC=yes - archive_expsym_cmds_FC='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_FC=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_FC=unsupported - fi - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +printf %s "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_FC='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no + GCC_FC=$ac_cv_fc_compiler_gnu + LD_FC=$LD - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_FC= +postdep_objects_FC= +predeps_FC= +postdeps_FC= +compiler_lib_search_path_FC= - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - archive_cmds_FC='' - hardcode_direct_FC=yes - hardcode_direct_absolute_FC=yes - hardcode_libdir_separator_FC=':' - link_all_deplibs_FC=yes - file_list_spec_FC='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_FC=no - hardcode_direct_absolute_FC=no - ;; - esac +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_FC=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_FC=yes - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_libdir_separator_FC= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. - export_dynamic_flag_spec_FC='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_FC=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_FC='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath__FC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat > conftest.$ac_ext <<_ACEOF - program main + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no - end -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : + for p in `eval "$output_verbose_link_cmd"`; do + case $prev$p in - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=/usr/lib:/lib - fi - ;; -esac -fi + -L* | -R* | -l*) + # Some compilers place space between "-{L,R,l}" and the path. + # Remove the space. + if test x-L = x"$p" || + test x-R = x"$p" || + test x-l = x"$p"; then + prev=$p + continue + fi - aix_libpath=$lt_cv_aix_libpath__FC -fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test no = "$pre_test_object_deps_done"; then + case $prev in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_FC"; then + compiler_lib_search_path_FC=$prev$p + else + compiler_lib_search_path_FC="${compiler_lib_search_path_FC} $prev$p" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_FC"; then + postdeps_FC=$prev$p + else + postdeps_FC="${postdeps_FC} $prev$p" + fi + fi + prev= + ;; - hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_FC='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag_FC="-z nodefs" - archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath__FC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat > conftest.$ac_ext <<_ACEOF - program main + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi - end -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : + if test no = "$pre_test_object_deps_done"; then + if test -z "$predep_objects_FC"; then + predep_objects_FC=$p + else + predep_objects_FC="$predep_objects_FC $p" + fi + else + if test -z "$postdep_objects_FC"; then + postdep_objects_FC=$p + else + postdep_objects_FC="$postdep_objects_FC $p" + fi + fi + ;; - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=/usr/lib:/lib - fi - ;; -esac -fi + *) ;; # Ignore the rest. - aix_libpath=$lt_cv_aix_libpath__FC + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling FC test program" fi - hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_FC=' $wl-bernotok' - allow_undefined_flag_FC=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_FC='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_FC='$convenience' - fi - archive_cmds_need_lc_FC=yes - archive_expsym_cmds_FC='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken + + +case " $postdeps_FC " in +*" -lc "*) archive_cmds_need_lc_FC=no ;; +esac + compiler_lib_search_dirs_FC= +if test -n "${compiler_lib_search_path_FC}"; then + compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | $SED -e 's! -L! !g' -e 's!^ !!'` +fi + + - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='' - ;; - m68k) - archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - ;; - esac - ;; - bsdi[45]*) - export_dynamic_flag_spec_FC=-rdynamic - ;; - cygwin* | mingw* | windows* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl* | icl*) - # Native MSVC or ICC - hardcode_libdir_flag_spec_FC=' ' - allow_undefined_flag_FC=unsupported - always_export_symbols_FC=yes - file_list_spec_FC='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_FC='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, FC)='true' - enable_shared_with_static_runtimes_FC=yes - exclude_expsyms_FC='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds_FC='chmod 644 $oldlib' - postlink_cmds_FC='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC and ICC wrapper - hardcode_libdir_flag_spec_FC=' ' - allow_undefined_flag_FC=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_FC='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes_FC=yes - ;; - esac - ;; - darwin* | rhapsody*) - archive_cmds_need_lc_FC=no - hardcode_direct_FC=no - hardcode_automatic_FC=yes - hardcode_shlibpath_var_FC=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - compiler_needs_object_FC=yes - else - whole_archive_flag_spec_FC='' - fi - link_all_deplibs_FC=yes - allow_undefined_flag_FC=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_FC="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_FC="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - else - ld_shlibs_FC=no - fi + + + + lt_prog_compiler_wl_FC= +lt_prog_compiler_pic_FC= +lt_prog_compiler_static_FC= + + + if test yes = "$GCC"; then + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_static_FC='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_FC='-Bstatic' + fi + lt_prog_compiler_pic_FC='-fPIC' ;; - dgux*) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_shlibpath_var_FC=no + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_FC='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4' + ;; + esac ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. ;; - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=yes - hardcode_minus_L_FC=yes - hardcode_shlibpath_var_FC=no + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_FC='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_FC='$wl-static' + ;; + esac ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly* | midnightbsd*) - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_FC='-fno-common' ;; - hpux9*) - if test yes = "$GCC"; then - archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' - hardcode_libdir_separator_FC=: - hardcode_direct_FC=yes + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_FC= + ;; - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_FC=yes - export_dynamic_flag_spec_FC='$wl-E' + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_FC='-fPIC' + ;; + esac ;; - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' - hardcode_libdir_separator_FC=: - hardcode_direct_FC=yes - hardcode_direct_absolute_FC=yes - export_dynamic_flag_spec_FC='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_FC=yes - fi + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. ;; - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds_FC='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_FC='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' - hardcode_libdir_separator_FC=: + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_FC=no + enable_shared=no + ;; - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_FC=no - hardcode_shlibpath_var_FC=no - ;; - *) - hardcode_direct_FC=yes - hardcode_direct_absolute_FC=yes - export_dynamic_flag_spec_FC='$wl-E' + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_FC='-fPIC -shared' + ;; - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_FC=yes - ;; - esac + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_FC=-Kconform_pic fi ;; - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat > conftest.$ac_ext <<_ACEOF + *) + lt_prog_compiler_pic_FC='-fPIC' + ;; + esac - subroutine foo - end -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - lt_cv_irix_exported_symbol=yes -else case e in #( - e) lt_cv_irix_exported_symbol=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_FC='-Xlinker ' + if test -n "$lt_prog_compiler_pic_FC"; then + lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_FC='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_FC='-Bstatic' else - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp' fi - archive_cmds_need_lc_FC='no' - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - hardcode_libdir_separator_FC=: - inherit_rpath_FC=yes - link_all_deplibs_FC=yes ;; - linux*) + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_FC='-fno-common' case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs_FC=yes - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; esac ;; - *-mlibc) + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_FC='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_FC='$wl-static' + ;; + esac ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_FC='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_FC='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_FC='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_FC='$wl-a ${wl}archive' ;; - newsos6) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=yes - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - hardcode_libdir_separator_FC=: - hardcode_shlibpath_var_FC=no + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_FC='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_FC='-non_shared' ;; - *nto* | *qnx*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-static' + ;; + *flang* | ftn | f18* | f95*) + # Flang compiler. + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='--shared' + lt_prog_compiler_static_FC='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fpic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_FC='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_FC='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-qpic' + lt_prog_compiler_static_FC='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fpic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + esac + ;; + esac ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - hardcode_direct_absolute_FC=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' - export_dynamic_flag_spec_FC='$wl-E' - else - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' - fi - else - ld_shlibs_FC=no - fi + newsos6) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' ;; - os2*) - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - allow_undefined_flag_FC=unsupported - shrext_cmds=.dll - archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_from_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_FC=yes - file_list_spec_FC='@' + *-mlibc) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' ;; - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*' - archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag_FC=' -expect_unresolved \*' - archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc_FC='no' - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - hardcode_libdir_separator_FC=: + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_FC='-fPIC -shared' ;; - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*' - archive_cmds_FC='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - else - allow_undefined_flag_FC=' -expect_unresolved \*' - archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_FC='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_FC='-rpath $libdir' - fi - archive_cmds_need_lc_FC='no' - hardcode_libdir_separator_FC=: + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_FC='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_FC='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_FC='-non_shared' ;; serenity*) ;; solaris*) - no_undefined_flag_FC=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds_FC='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds_FC='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds_FC='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_shlibpath_var_FC=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl_FC='-Qoption ld ';; *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec_FC='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract' - fi - ;; + lt_prog_compiler_wl_FC='-Wl,';; esac - link_all_deplibs_FC=yes ;; sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_FC='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_direct_FC=yes - hardcode_minus_L_FC=yes - hardcode_shlibpath_var_FC=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_FC='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_FC='$CC -r -o $output$reload_objs' - hardcode_direct_FC=no - ;; - motorola) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_FC=no + lt_prog_compiler_wl_FC='-Qoption ld ' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' ;; - sysv4.3*) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_FC=no - export_dynamic_flag_spec_FC='-Bexport' + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_FC=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_FC=yes + lt_prog_compiler_pic_FC='-Kconform_pic' + lt_prog_compiler_static_FC='-Bstatic' fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_FC='$wl-z,text' - archive_cmds_need_lc_FC=no - hardcode_shlibpath_var_FC=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_FC='$wl-z,text' - allow_undefined_flag_FC='$wl-z,nodefs' - archive_cmds_need_lc_FC=no - hardcode_shlibpath_var_FC=no - hardcode_libdir_flag_spec_FC='$wl-R,$libdir' - hardcode_libdir_separator_FC=':' - link_all_deplibs_FC=yes - export_dynamic_flag_spec_FC='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi + unicos*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_can_build_shared_FC=no ;; uts4*) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_shlibpath_var_FC=no + lt_prog_compiler_pic_FC='-pic' + lt_prog_compiler_static_FC='-Bstatic' ;; *) - ld_shlibs_FC=no + lt_prog_compiler_can_build_shared_FC=no ;; esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec_FC='$wl-Blargedynsym' - ;; - esac - fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_FC" >&5 -printf "%s\n" "$ld_shlibs_FC" >&6; } -test no = "$ld_shlibs_FC" && can_build_shared=no - -with_gnu_ld_FC=$with_gnu_ld - - - - +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_FC= + ;; + *) + lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" + ;; +esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic_FC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_FC" >&6; } +lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC # -# Do we need to explicitly link libc? +# Check to make sure the PIC flag actually works. # -case "x$archive_cmds_need_lc_FC" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_FC=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds_FC in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc_FC+y} +if test -n "$lt_prog_compiler_pic_FC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works_FC+y} then : printf %s "(cached) " >&6 else case e in #( - e) $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_FC - pic_flag=$lt_prog_compiler_pic_FC - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_FC - allow_undefined_flag_FC= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_FC=no - else - lt_cv_archive_cmds_need_lc_FC=yes - fi - allow_undefined_flag_FC=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ;; + e) lt_cv_prog_compiler_pic_works_FC=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_FC" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_FC=yes + fi + fi + $RM conftest* + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_FC" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc_FC" >&6; } - archive_cmds_need_lc_FC=$lt_cv_archive_cmds_need_lc_FC - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works_FC" >&6; } +if test yes = "$lt_cv_prog_compiler_pic_works_FC"; then + case $lt_prog_compiler_pic_FC in + "" | " "*) ;; + *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;; + esac +else + lt_prog_compiler_pic_FC= + lt_prog_compiler_can_build_shared_FC=no +fi +fi +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works_FC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_static_works_FC=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_FC=yes + fi + else + lt_cv_prog_compiler_static_works_FC=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works_FC" >&6; } +if test yes = "$lt_cv_prog_compiler_static_works_FC"; then + : +else + lt_prog_compiler_static_FC= +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_FC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_c_o_FC=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_FC=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_FC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_FC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) lt_cv_prog_compiler_c_o_FC=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_FC=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_FC" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o_FC" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } + if test no = "$hard_links"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; + runpath_var= + allow_undefined_flag_FC= + always_export_symbols_FC=no + archive_cmds_FC= + archive_expsym_cmds_FC= + compiler_needs_object_FC=no + enable_shared_with_static_runtimes_FC=no + export_dynamic_flag_spec_FC= + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic_FC=no + hardcode_direct_FC=no + hardcode_direct_absolute_FC=no + hardcode_libdir_flag_spec_FC= + hardcode_libdir_separator_FC= + hardcode_minus_L_FC=no + hardcode_shlibpath_var_FC=unsupported + inherit_rpath_FC=no + link_all_deplibs_FC=unknown + module_cmds_FC= + module_expsym_cmds_FC= + old_archive_from_new_cmds_FC= + old_archive_from_expsyms_cmds_FC= + thread_safe_flag_spec_FC= + whole_archive_flag_spec_FC= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_FC= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + exclude_expsyms_FC='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + case $host_os in + cygwin* | mingw* | windows* | pw32* | cegcc*) + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. + if test yes != "$GCC"; then + with_gnu_ld=no + fi ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) + with_gnu_ld=yes ;; esac - ;; -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; + ld_shlibs_FC=yes -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi -cygwin* | mingw* | windows* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - # If user builds GCC with multilib enabled, - # it should just install on $(libdir) - # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. - if test xyes = x"$multilib"; then - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - $install_prog $dir/$dlname $destdir/$dlname~ - chmod a+x $destdir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib $destdir/$dlname'\'' || exit \$?; - fi' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_FC='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_FC=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' + whole_archive_flag_spec_FC= fi - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes + supports_anon_versioning=no + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + ld_shlibs_FC=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. +_LT_EOF + fi ;; - mingw* | windows* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='' + ;; + m68k) + archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + ;; + esac ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_FC=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs_FC=no + fi ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - *,cl* | *,icl*) - # Native MSVC or ICC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' + cygwin* | mingw* | windows* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_FC='-L$libdir' + export_dynamic_flag_spec_FC='$wl--export-all-symbols' + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=no + enable_shared_with_static_runtimes_FC=yes + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + file_list_spec_FC='@' - case $build_os in - mingw* | windows*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_FC=no + fi ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + + haiku*) + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs_FC=no ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + + os2*) + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + allow_undefined_flag_FC=unsupported + shrext_cmds=.dll + archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_FC=yes + file_list_spec_FC='@' + ;; + + interix[3-9]*) + hardcode_direct_FC=no + hardcode_shlibpath_var_FC=no + hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' + export_dynamic_flag_spec_FC='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_FC='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec_FC= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object_FC=yes + ;; + esac + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_FC='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object_FC=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_FC='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs_FC=no + fi + ;; + + *-mlibc) + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") ;; - esac - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs_FC=no + cat <<_LT_EOF 1>&2 - *) - # Assume MSVC and ICC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_FC=no + fi + ;; - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_FC=no + cat <<_LT_EOF 1>&2 -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -freebsd* | dragonfly* | midnightbsd*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_FC=no + fi + ;; + esac ;; - esac - case $host_cpu in - powerpc64) - # On FreeBSD bi-arch platforms, a different variable is used for 32-bit - # binaries. See . - cat > conftest.$ac_ext <<_ACEOF -int test_pointer_size[sizeof (void *) - 5]; -_ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - shlibpath_var=LD_LIBRARY_PATH -else case e in #( - e) shlibpath_var=LD_32_LIBRARY_PATH ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + sunos4*) + archive_cmds_FC='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no ;; + *) - shlibpath_var=LD_LIBRARY_PATH + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_FC=no + fi ;; - esac - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' - sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' - hardcode_into_libs=no - ;; + esac -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + if test no = "$ld_shlibs_FC"; then + runpath_var= + hardcode_libdir_flag_spec_FC= + export_dynamic_flag_spec_FC= + whole_archive_flag_spec_FC= fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=yes + archive_expsym_cmds_FC='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_FC=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_FC=unsupported + fi + ;; -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor + aix[4-9]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; + export_symbols_cmds_FC='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - dynamic_linker='Android linker' - # -rpath works at least for libraries that are not overridden by - # libraries installed in system locations. - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - ;; + archive_cmds_FC='' + hardcode_direct_FC=yes + hardcode_direct_absolute_FC=yes + hardcode_libdir_separator_FC=':' + link_all_deplibs_FC=yes + file_list_spec_FC='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct_FC=no + hardcode_direct_absolute_FC=no + ;; + esac -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no + if test yes = "$GCC"; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_FC=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_FC=yes + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_libdir_separator_FC= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi - # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} + export_dynamic_flag_spec_FC='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_FC=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_FC='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath__FC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO" +then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=/usr/lib:/lib + fi + ;; +esac +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi + + hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec_FC='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag_FC="-z nodefs" + archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath__FC+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\"" - cat > conftest.$ac_ext <<_ACEOF + e) cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_fc_try_link "$LINENO" then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : - lt_cv_shlibpath_overrides_runpath=yes -fi + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ;; + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=/usr/lib:/lib + fi + ;; esac fi - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directories which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -serenity*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - dynamic_linker='SerenityOS LibELF' - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -emscripten*) - version_type=none - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - dynamic_linker="Emscripten linker" - lt_prog_compiler_wl_FC= -lt_prog_compiler_pic_FC= -lt_prog_compiler_static_FC= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_static_FC='-static' + aix_libpath=$lt_cv_aix_libpath__FC +fi - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_FC='-Bstatic' + hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_FC=' $wl-bernotok' + allow_undefined_flag_FC=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_FC='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_FC='$convenience' + fi + archive_cmds_need_lc_FC=yes + archive_expsym_cmds_FC='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$RM -r $output_objdir/$realname.d' + fi fi - lt_prog_compiler_pic_FC='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_FC='-fPIC' + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='' ;; m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4' + archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes ;; esac ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. + bsdi[45]*) + export_dynamic_flag_spec_FC=-rdynamic ;; - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_FC='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_FC='$wl-static' + cygwin* | mingw* | windows* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl* | icl*) + # Native MSVC or ICC + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=yes + file_list_spec_FC='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, FC)='true' + enable_shared_with_static_runtimes_FC=yes + exclude_expsyms_FC='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_FC='chmod 644 $oldlib' + postlink_cmds_FC='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC and ICC wrapper + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_FC='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_FC=yes ;; esac ;; darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_FC='-fno-common' - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_FC= - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_FC='-fPIC' - ;; - esac - ;; + archive_cmds_need_lc_FC=no + hardcode_direct_FC=no + hardcode_automatic_FC=yes + hardcode_shlibpath_var_FC=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + compiler_needs_object_FC=yes + else + whole_archive_flag_spec_FC='' + fi + link_all_deplibs_FC=yes + allow_undefined_flag_FC=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds_FC="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds_FC="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + + else + ld_shlibs_FC=no + fi - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_FC=no - enable_shared=no + dgux*) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_shlibpath_var_FC=no ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_FC='-fPIC -shared' + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_FC=-Kconform_pic - fi + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=yes + hardcode_minus_L_FC=yes + hardcode_shlibpath_var_FC=no ;; - *) - lt_prog_compiler_pic_FC='-fPIC' + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly* | midnightbsd*) + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no ;; - esac - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl_FC='-Xlinker ' - if test -n "$lt_prog_compiler_pic_FC"; then - lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC" + hpux9*) + if test yes = "$GCC"; then + archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi + hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' + hardcode_libdir_separator_FC=: + hardcode_direct_FC=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_FC=yes + export_dynamic_flag_spec_FC='$wl-E' ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_FC='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_FC='-Bstatic' + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else - lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp' + archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' + hardcode_libdir_separator_FC=: + hardcode_direct_FC=yes + hardcode_direct_absolute_FC=yes + export_dynamic_flag_spec_FC='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_FC=yes fi ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_FC='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl_FC='-Wl,-Wl,,' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - esac - ;; + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds_FC='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_FC='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' + hardcode_libdir_separator_FC=: - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_FC='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_FC='$wl-static' - ;; - esac - ;; + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_FC=no + hardcode_shlibpath_var_FC=no + ;; + *) + hardcode_direct_FC=yes + hardcode_direct_absolute_FC=yes + export_dynamic_flag_spec_FC='$wl-E' - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_FC='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_FC='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_FC='$wl-a ${wl}archive' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_FC=yes + ;; + esac + fi ;; irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_FC='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_FC='-non_shared' + if test yes = "$GCC"; then + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test ${lt_cv_irix_exported_symbol+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end +_ACEOF +if ac_fn_fc_try_link "$LINENO" +then : + lt_cv_irix_exported_symbol=yes +else case e in #( + e) lt_cv_irix_exported_symbol=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc_FC='no' + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + hardcode_libdir_separator_FC=: + inherit_rpath_FC=yes + link_all_deplibs_FC=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux*) case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-static' - ;; - *flang* | ftn | f18* | f95*) - # Flang compiler. - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='--shared' - lt_prog_compiler_static_FC='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl_FC='-Wl,-Wl,,' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fpic' - lt_prog_compiler_static_FC='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_FC='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_FC='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-qpic' - lt_prog_compiler_static_FC='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fpic' - lt_prog_compiler_static_FC='-Bstatic' - ;; - esac + ld_shlibs_FC=yes + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' ;; esac ;; - newsos6) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' + *-mlibc) ;; - *-mlibc) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_FC='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + ;; + + newsos6) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=yes + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + hardcode_libdir_separator_FC=: + hardcode_shlibpath_var_FC=no ;; *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_FC='-fPIC -shared' ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_FC='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_FC='-non_shared' + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_FC=yes + hardcode_shlibpath_var_FC=no + hardcode_direct_absolute_FC=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' + export_dynamic_flag_spec_FC='$wl-E' + else + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' + fi + else + ld_shlibs_FC=no + fi ;; - rdos*) - lt_prog_compiler_static_FC='-non_shared' + os2*) + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_minus_L_FC=yes + allow_undefined_flag_FC=unsupported + shrext_cmds=.dll + archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_FC=yes + file_list_spec_FC='@' + ;; + + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*' + archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + allow_undefined_flag_FC=' -expect_unresolved \*' + archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + archive_cmds_need_lc_FC='no' + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + hardcode_libdir_separator_FC=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*' + archive_cmds_FC='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + else + allow_undefined_flag_FC=' -expect_unresolved \*' + archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds_FC='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_FC='-rpath $libdir' + fi + archive_cmds_need_lc_FC='no' + hardcode_libdir_separator_FC=: ;; serenity*) ;; solaris*) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl_FC='-Qoption ld ';; + no_undefined_flag_FC=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds_FC='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds_FC='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='$wl' + archive_cmds_FC='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec_FC='-R$libdir' + hardcode_shlibpath_var_FC=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; *) - lt_prog_compiler_wl_FC='-Wl,';; + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + whole_archive_flag_spec_FC='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract' + fi + ;; esac + link_all_deplibs_FC=yes ;; sunos4*) - lt_prog_compiler_wl_FC='-Qoption ld ' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_FC='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_direct_FC=yes + hardcode_minus_L_FC=yes + hardcode_shlibpath_var_FC=no ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' + sysv4) + case $host_vendor in + sni) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_FC='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_FC='$CC -r -o $output$reload_objs' + hardcode_direct_FC=no + ;; + motorola) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_FC=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_FC=no + ;; + + sysv4.3*) + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_FC=no + export_dynamic_flag_spec_FC='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then - lt_prog_compiler_pic_FC='-Kconform_pic' - lt_prog_compiler_static_FC='-Bstatic' + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_FC=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_FC=yes fi ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_FC='$wl-z,text' + archive_cmds_need_lc_FC=no + hardcode_shlibpath_var_FC=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; - unicos*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_can_build_shared_FC=no + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_FC='$wl-z,text' + allow_undefined_flag_FC='$wl-z,nodefs' + archive_cmds_need_lc_FC=no + hardcode_shlibpath_var_FC=no + hardcode_libdir_flag_spec_FC='$wl-R,$libdir' + hardcode_libdir_separator_FC=':' + link_all_deplibs_FC=yes + export_dynamic_flag_spec_FC='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) - lt_prog_compiler_pic_FC='-pic' - lt_prog_compiler_static_FC='-Bstatic' + archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_FC='-L$libdir' + hardcode_shlibpath_var_FC=no ;; *) - lt_prog_compiler_can_build_shared_FC=no + ld_shlibs_FC=no ;; esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_FC= - ;; - *) - lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic_FC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_FC" >&6; } -lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec_FC='$wl-Blargedynsym' + ;; + esac + fi + fi -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works_FC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic_works_FC=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_FC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_FC=yes - fi - fi - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works_FC" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_FC" >&5 +printf "%s\n" "$ld_shlibs_FC" >&6; } +test no = "$ld_shlibs_FC" && can_build_shared=no -if test yes = "$lt_cv_prog_compiler_pic_works_FC"; then - case $lt_prog_compiler_pic_FC in - "" | " "*) ;; - *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;; - esac -else - lt_prog_compiler_pic_FC= - lt_prog_compiler_can_build_shared_FC=no -fi +with_gnu_ld_FC=$with_gnu_ld -fi # -# Check to make sure the static flag actually works. +# Do we need to explicitly link libc? # -wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works_FC+y} +case "x$archive_cmds_need_lc_FC" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_FC=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds_FC in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc_FC+y} then : printf %s "(cached) " >&6 else case e in #( - e) lt_cv_prog_compiler_static_works_FC=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_FC=yes - fi - else - lt_cv_prog_compiler_static_works_FC=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works_FC" >&6; } + e) $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -if test yes = "$lt_cv_prog_compiler_static_works_FC"; then - : -else - lt_prog_compiler_static_FC= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_FC + pic_flag=$lt_prog_compiler_pic_FC + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_FC + allow_undefined_flag_FC= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_FC=no + else + lt_cv_archive_cmds_need_lc_FC=yes + fi + allow_undefined_flag_FC=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ;; +esac fi - - - -='-fPIC' - archive_cmds_FC='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' - archive_expsym_cmds_FC='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' - archive_cmds_need_lc_FC=no - no_undefined_flag_FC= - ;; - -*) - dynamic_linker=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_FC" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc_FC" >&6; } + archive_cmds_need_lc_FC=$lt_cv_archive_cmds_need_lc_FC + ;; + esac + fi ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH @@ -58514,43 +58263,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_FC= -if test -n "$hardcode_libdir_flag_spec_FC" || - test -n "$runpath_var_FC" || - test yes = "$hardcode_automatic_FC"; then - # We can hardcode non-existent directories. - if test no != "$hardcode_direct_FC" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" && - test no != "$hardcode_minus_L_FC"; then - # Linking always hardcodes the temporary library directory. - hardcode_action_FC=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_FC=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_FC=unsupported -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5 -printf "%s\n" "$hardcode_action_FC" >&6; } -if test relink = "$hardcode_action_FC" || - test yes = "$inherit_rpath_FC"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi @@ -58558,1459 +58272,1772 @@ fi - fi # test -n "$compiler" - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_FC" -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; - ac_config_commands="$ac_config_commands libtool" +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; -# Only expand once: +cygwin* | mingw* | windows* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + # If user builds GCC with multilib enabled, + # it should just install on $(libdir) + # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. + if test xyes = x"$multilib"; then + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + $install_prog $dir/$dlname $destdir/$dlname~ + chmod a+x $destdir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib $destdir/$dlname'\'' || exit \$?; + fi' + else + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + fi + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' -# Make the --enable-static setting visible in config header -if test "x$enable_static" = "xyes" -then : + ;; + mingw* | windows* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + *,cl* | *,icl*) + # Native MSVC or ICC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' -printf "%s\n" "#define HAVE_STATIC_LIBS 1" >>confdefs.h + case $build_os in + mingw* | windows*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; -fi + *) + # Assume MSVC and ICC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; -#----------------------------------------------------- -# See if the user requested --enable-all-static -#----------------------------------------------------- +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Check whether --enable-all-static was given. -if test ${enable_all_static+y} -then : - enableval=$enable_all_static; enableallstatic=$enableval -else case e in #( - e) enableallstatic=no ;; -esac -fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - if test "x$enableallstatic" = "xyes" -then : +freebsd* | dragonfly* | midnightbsd*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + case $host_cpu in + powerpc64) + # On FreeBSD bi-arch platforms, a different variable is used for 32-bit + # binaries. See . + cat > conftest.$ac_ext <<_ACEOF +int test_pointer_size[sizeof (void *) - 5]; - if test "x$libmesh_LDFLAGS" != "x" +_ACEOF +if ac_fn_fc_try_compile "$LINENO" then : - - libmesh_LDFLAGS="$libmesh_LDFLAGS -all-static" - + shlibpath_var=LD_LIBRARY_PATH else case e in #( - e) - libmesh_LDFLAGS=-all-static - ;; + e) shlibpath_var=LD_32_LIBRARY_PATH ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; + *) + shlibpath_var=LD_LIBRARY_PATH + ;; + esac + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no + ;; +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; - if test "x$enableallstatic" = "xyes" -then : +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; -printf "%s\n" "#define USE_ALL_STATIC_LIBS 1" >>confdefs.h +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes -fi + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes -fi + dynamic_linker='Android linker' + # -rpath works at least for libraries that are not overridden by + # libraries installed in system locations. + hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' + ;; +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no -#----------------------------------------------------- -# See if shared libraries are enabled, and if so what -# the suffix for them should be. -#----------------------------------------------------- -if test "x$enable_shared" = xyes -then : - os_name=`uname -s` - if test "x$os_name" = "xDarwin" + # Some binutils ld are patched to set DT_RUNPATH + if test ${lt_cv_shlibpath_overrides_runpath+y} then : - LIBMESH_LIBRARY_SUFFIX=.dylib -else case e in #( - e) LIBMESH_LIBRARY_SUFFIX=.so ;; -esac -fi - + printf %s "(cached) " >&6 else case e in #( - e) LIBMESH_LIBRARY_SUFFIX=.a ;; -esac -fi - - - -# -------------------------------------------------------------- -# Release versioning - after we find the C++ compiler -# -------------------------------------------------------------- - + e) lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\"" + cat > conftest.$ac_ext <<_ACEOF + program main - AX_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([^.][^.]*\).*/\1/'` - AX_MINOR_VERSION=`echo "$VERSION" | $SED -n 's/[^.][^.]*.\([^.][^.]*\).*/\1/p'` - if test "x$AX_MINOR_VERSION" = "x" + end +_ACEOF +if ac_fn_fc_try_link "$LINENO" then : - AX_MINOR_VERSION=0 -fi - AX_POINT_VERSION=`echo "$VERSION" | $SED -n 's/[^.][^.]*.[^.][^.]*.\(.*\)/\1/p'` - if test "x$AX_POINT_VERSION" = "x" + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null then : - AX_POINT_VERSION=0 + lt_cv_shlibpath_overrides_runpath=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Major version" >&5 -printf %s "checking Major version... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AX_MAJOR_VERSION" >&5 -printf "%s\n" "$AX_MAJOR_VERSION" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Minor version" >&5 -printf %s "checking Minor version... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AX_MINOR_VERSION" >&5 -printf "%s\n" "$AX_MINOR_VERSION" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Point version" >&5 -printf %s "checking Point version... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AX_POINT_VERSION" >&5 -printf "%s\n" "$AX_POINT_VERSION" >&6; } - - -# Strip any '-pre' suffix from version; our code expects a number -LIBMESH_NUMERIC_POINT_VERSION=`echo "$AX_POINT_VERSION" | $SED 's/-.*//'` - - -printf "%s\n" "#define MAJOR_VERSION $AX_MAJOR_VERSION" >>confdefs.h - - -printf "%s\n" "#define MINOR_VERSION $AX_MINOR_VERSION" >>confdefs.h - - -printf "%s\n" "#define MICRO_VERSION $LIBMESH_NUMERIC_POINT_VERSION" >>confdefs.h - - -printf "%s\n" "#define LIB_VERSION \"$VERSION\"" >>confdefs.h - - -printf "%s\n" "#define LIB_RELEASE \"$BUILD_DEVSTATUS\"" >>confdefs.h - - -printf "%s\n" "#define CXX \"$CXX\"" >>confdefs.h - - -printf "%s\n" "#define IO_COMPATIBILITY_VERSION \"1.7.0\"" >>confdefs.h - - - - -# -------------------------------------------------------------- -# Portable symbolic links -# -------------------------------------------------------------- -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ;; +esac fi -# ------------------------------------------------------------- - -# --------------------------------------------------------------- -# this seems to get done automatically for C++, but not C? -# Required for QHull rules as implemented -# -------------------------------------------------------------- - -# -------------------------------------------------------------- - -# -------------------------------------------------------------- -# parent directories -- portably and without race conditions -# -------------------------------------------------------------- - -# ------------------------------------------------------------- + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath -# -------------------------------------------------------------- -# nice sed that doesn't truncate output -# -------------------------------------------------------------- -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in #( -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -#( -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + # Ideally, we could use ldconfig to report *all* directories which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi -else - ac_cv_path_SED=$SED -fi - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; -# -------------------------------------------------------------- +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; -# ------------------------------------------------------------- -# pkg-config - used to configure installed packages. We can -# use it to query our installed targets, if it exists. -# Otherwise we can fall back to libmesh-config. -# -# Not required to build libmesh, but we can install a config -# file so that users can use 'pkg-config libmesh ...' -# ------------------------------------------------------------- -if test -z "$PKG_CONFIG" -then : - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' ;; -esac ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -printf "%s\n" "$PKG_CONFIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -fi -# ------------------------------------------------------------- +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; +rdos*) + dynamic_linker=no + ;; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler implements namespaces" >&5 -printf %s "checking whether the compiler implements namespaces... " >&6; } -if test ${ac_cv_cxx_namespaces+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +serenity*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -namespace Outer { namespace Inner { int i = 0; }} -int -main (void) -{ -using namespace Outer::Inner; return i; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_cxx_namespaces=yes -else case e in #( - e) ac_cv_cxx_namespaces=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_namespaces" >&5 -printf "%s\n" "$ac_cv_cxx_namespaces" >&6; } -if test "x$ac_cv_cxx_namespaces" = "xyes" -then : +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; -printf "%s\n" "#define HAVE_NAMESPACES /**/" >>confdefs.h +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; -fi +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX options needed to detect all undeclared functions" >&5 -printf %s "checking for $CXX options needed to detect all undeclared functions... " >&6; } -if test ${ac_cv_cxx_undeclared_builtin_options+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_save_CFLAGS=$CFLAGS - ac_cv_cxx_undeclared_builtin_options='cannot detect' - for ac_arg in '' -fno-builtin; do - CFLAGS="$ac_save_CFLAGS $ac_arg" - # This test program should *not* compile successfully. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; -int -main (void) -{ -(void) strchr; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; -else case e in #( - e) # This test program should compile successfully. - # No library function is consistently available on - # freestanding implementations, so test against a dummy - # declaration. Include always-available headers on the - # off chance that they somehow elicit warnings. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -extern void ac_decl (int, char *); +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -int -main (void) -{ -(void) ac_decl (0, (char *) 0); - (void) ac_decl; +emscripten*) + version_type=none + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + dynamic_linker="Emscripten linker" + lt_prog_compiler_wl_FC= +lt_prog_compiler_pic_FC= +lt_prog_compiler_static_FC= - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - if test x"$ac_arg" = x -then : - ac_cv_cxx_undeclared_builtin_options='none needed' -else case e in #( - e) ac_cv_cxx_undeclared_builtin_options=$ac_arg ;; -esac -fi - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done - CFLAGS=$ac_save_CFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_undeclared_builtin_options" >&5 -printf "%s\n" "$ac_cv_cxx_undeclared_builtin_options" >&6; } - case $ac_cv_cxx_undeclared_builtin_options in #( - 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error $? "cannot make $CXX report undeclared builtins -See 'config.log' for more details" "$LINENO" 5; } ;; #( - 'none needed') : - ac_cxx_undeclared_builtin_options='' ;; #( - *) : - ac_cxx_undeclared_builtin_options=$ac_cv_cxx_undeclared_builtin_options ;; -esac + if test yes = "$GCC"; then + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_static_FC='-static' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ------- Configuring compiler features -------" >&5 -printf "%s\n" "------- Configuring compiler features -------" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_FC='-Bstatic' + fi + lt_prog_compiler_pic_FC='-fPIC' + ;; -# Test using the devel mode flags, which should include any -# user-specified flags -libmesh_compiler_features_save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$CXXFLAGS_DEVEL" + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_FC='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_FC='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_FC='$wl-static' + ;; + esac + ;; -# -------------------------------------------------------------- -# Real precision - double by default -# -------------------------------------------------------------- + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_FC='-fno-common' + ;; -# Check whether --enable-singleprecision was given. -if test ${enable_singleprecision+y} -then : - enableval=$enable_singleprecision; enablesingleprecision=$enableval -else case e in #( - e) enablesingleprecision=no ;; -esac -fi + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_FC= + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_FC='-fPIC' + ;; + esac + ;; -# Check whether --enable-tripleprecision was given. -if test ${enable_tripleprecision+y} -then : - enableval=$enable_tripleprecision; enabletripleprecision=$enableval -else case e in #( - e) enabletripleprecision=no ;; -esac -fi + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_FC=no + enable_shared=no + ;; -# Check whether --enable-quadrupleprecision was given. -if test ${enable_quadrupleprecision+y} -then : - enableval=$enable_quadrupleprecision; enablequadrupleprecision=$enableval -else case e in #( - e) enablequadrupleprecision=no ;; -esac -fi + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_FC='-fPIC -shared' + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_FC=-Kconform_pic + fi + ;; -acsm_precision_LIBS="" + *) + lt_prog_compiler_pic_FC='-fPIC' + ;; + esac -if test "x$enablesingleprecision" != "xno" -then : + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_FC='-Xlinker ' + if test -n "$lt_prog_compiler_pic_FC"; then + lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_FC='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_FC='-Bstatic' + else + lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp' + fi + ;; - if test "x$enabletripleprecision" != "xno" -then : - as_fn_error $? "<<< Cannot simultaneously default to single and triple precision >>>" "$LINENO" 5 -elif test "x$enablequadrupleprecision" != "xno" -then : - as_fn_error $? "<<< Cannot simultaneously default to single and quadruple precision >>>" "$LINENO" 5 -else case e in #( - e) + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_FC='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + esac + ;; -printf "%s\n" "#define DEFAULT_SINGLE_PRECISION 1" >>confdefs.h + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_FC='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_FC='$wl-static' + ;; + esac + ;; + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_FC='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_FC='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_FC='$wl-a ${wl}archive' + ;; -printf "%s\n" "#define DEFAULT_SCALAR_TYPE float" >>confdefs.h + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_FC='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_FC='-non_shared' + ;; - enablerealprecision=float - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Default floating point is single precision (float) >>>" >&5 -printf "%s\n" "<<< Default floating point is single precision (float) >>>" >&6; } - ;; -esac -fi + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-static' + ;; + *flang* | ftn | f18* | f95*) + # Flang compiler. + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='--shared' + lt_prog_compiler_static_FC='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fpic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_FC='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_FC='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-qpic' + lt_prog_compiler_static_FC='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + lt_prog_compiler_wl_FC='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fpic' + lt_prog_compiler_static_FC='-Bstatic' + ;; + esac + ;; + esac + ;; -elif test "x$enabletripleprecision" != "xno" -then : + newsos6) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; - if test "x$enablequadrupleprecision" != "xno" -then : - as_fn_error $? "<<< Cannot simultaneously default to single and quadruple precision >>>" "$LINENO" 5 -else case e in #( - e) + *-mlibc) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-fPIC' + lt_prog_compiler_static_FC='-static' + ;; -printf "%s\n" "#define DEFAULT_TRIPLE_PRECISION 1" >>confdefs.h + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_FC='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_FC='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_FC='-non_shared' + ;; -printf "%s\n" "#define DEFAULT_SCALAR_TYPE long double" >>confdefs.h + rdos*) + lt_prog_compiler_static_FC='-non_shared' + ;; - enablerealprecision="long double" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Default floating point is triple precision (long double) >>>" >&5 -printf "%s\n" "<<< Default floating point is triple precision (long double) >>>" >&6; } - ;; -esac -fi + serenity*) + ;; -elif test "x$enablequadrupleprecision" != "xno" -then : + solaris*) + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl_FC='-Qoption ld ';; + *) + lt_prog_compiler_wl_FC='-Wl,';; + esac + ;; + sunos4*) + lt_prog_compiler_wl_FC='-Qoption ld ' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; -printf "%s\n" "#define DEFAULT_QUADRUPLE_PRECISION 1" >>confdefs.h + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_FC='-Kconform_pic' + lt_prog_compiler_static_FC='-Bstatic' + fi + ;; -printf "%s\n" "#define DEFAULT_SCALAR_TYPE boost::multiprecision::float128" >>confdefs.h + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_pic_FC='-KPIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; - enablerealprecision="boost::multiprecision::float128" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Default floating point is quadruple precision (boost::multiprecision::float128) >>>" >&5 -printf "%s\n" "<<< Default floating point is quadruple precision (boost::multiprecision::float128) >>>" >&6; } + unicos*) + lt_prog_compiler_wl_FC='-Wl,' + lt_prog_compiler_can_build_shared_FC=no + ;; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can build a trivial quad precision program" >&5 -printf %s "checking whether we can build a trivial quad precision program... " >&6; } + uts4*) + lt_prog_compiler_pic_FC='-pic' + lt_prog_compiler_static_FC='-Bstatic' + ;; - saveLIBS="$LIBS" - if test "x$ACSM_REAL_GXX" != "x" -then : - acsm_precision_LIBS="-lquadmath" - LIBS="$saveLIBS -lquadmath" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + *) + lt_prog_compiler_can_build_shared_FC=no + ;; + esac + fi - #include - int main(int argc, char **argv) - { - __float128 f = 1; - return isinfq(f); - } +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_FC= + ;; + *) + lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" + ;; +esac -_ACEOF -if ac_fn_cxx_try_link "$LINENO" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic_FC+y} then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - + printf %s "(cached) " >&6 else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - as_fn_error $? "*** Quad precision specified, gcc detected, but quadmath not found." "$LINENO" 5 - enablequadrupleprecision=no - ;; + e) lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -elif test "x$is_intel_icc" != "x" -then : - acsm_precision_LIBS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - int main(int argc, char **argv) - { - _Quad f = 0; - return int(__cosq(f)); - } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_FC" >&6; } +lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC -_ACEOF -if ac_fn_cxx_try_link "$LINENO" +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_FC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works_FC+y} then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - + printf %s "(cached) " >&6 else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - as_fn_error $? "*** Quad precision specified, Intel detected, but mathimf not found." "$LINENO" 5 - enablequadrupleprecision=no - ;; + e) lt_cv_prog_compiler_pic_works_FC=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_FC" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_FC=yes + fi + fi + $RM conftest* + ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works_FC" >&6; } +if test yes = "$lt_cv_prog_compiler_pic_works_FC"; then + case $lt_prog_compiler_pic_FC in + "" | " "*) ;; + *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;; + esac +else + lt_prog_compiler_pic_FC= + lt_prog_compiler_can_build_shared_FC=no fi - LIBS="$saveLIBS" - -else case e in #( - e) - -printf "%s\n" "#define DEFAULT_DOUBLE_PRECISION 1" >>confdefs.h +fi -printf "%s\n" "#define DEFAULT_SCALAR_TYPE double" >>confdefs.h - enablerealprecision="double" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Default floating point is double precision (double) >>>" >&5 -printf "%s\n" "<<< Default floating point is double precision (double) >>>" >&6; } - ;; -esac -fi -libmesh_precision_LIBS="$acsm_precision_LIBS" -# -------------------------------------------------------------- -# Determine support for the C99 "restrict" keyword in the C++ -# compiler. This should place a pound-define statement in the -# config file along the lines of: -# -# #define _libmesh_restrict __restrict -# -# The restrict keyword allows the compiler to make -# certain optimizations which require non-overlapping pointer -# addresses, i.e. in a call to: -# -# foo(int* restrict a, int* restrict b) -# -# the compiler may assume that the memory addresses pointed to -# by a and b do not overlap, and therefore certain low-level -# optimizations can be made. From the Autoconf documentation: -# -# If the C compiler recognizes a variant spelling for the restrict -# keyword (__restrict, __restrict__, or _Restrict), then define restrict -# to that; this is more likely to do the right thing with compilers that -# support language variants where plain restrict is not a -# keyword. Otherwise, if the C compiler recognizes the restrict keyword, -# don't do anything. Otherwise, define restrict to be empty. Thus, -# programs may simply use restrict as if every C compiler supported it; -# for those that do not, the makefile or configuration header defines it -# away. # -# Although support in C++ for the restrict keyword is not required, -# several C++ compilers do accept the keyword. This macro works for -# them, too. +# Check to make sure the static flag actually works. # -# This macro caches 'no' in the ac_cv_c_restrict variable if restrict is -# not supported, and a supported spelling otherwise. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -printf %s "checking for C/C++ restrict keyword... " >&6; } -if test ${ac_cv_c_restrict+y} +wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works_FC+y} then : printf %s "(cached) " >&6 else case e in #( - e) ac_cv_c_restrict=no - # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see: - # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html - # Put 'restrict' last, because C++ lacks it. - for ac_kw in __restrict__ __restrict _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int *int_ptr; - int foo (int_ptr $ac_kw ip) { return ip[0]; } - int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ - int bar (int ip[$ac_kw]) { return ip[0]; } - -int -main (void) -{ -int s[1]; - int *$ac_kw t = s; - t[0] = 0; - return foo (t) + bar (t); - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - ;; + e) lt_cv_prog_compiler_static_works_FC=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_FC=yes + fi + else + lt_cv_prog_compiler_static_works_FC=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -printf "%s\n" "$ac_cv_c_restrict" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works_FC" >&6; } - case $ac_cv_c_restrict in - restrict) ;; - no) printf "%s\n" "#define restrict /**/" >>confdefs.h - ;; - *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h - ;; - esac +if test yes = "$lt_cv_prog_compiler_static_works_FC"; then + : +else + lt_prog_compiler_static_FC= +fi -# -------------------------------------------------------------- -# getpwuid - enabled by default -# Some systems, for example Crays, actually have getpwuid on the head-node -# but (if I understand correctly) a dynamically-linked glibc is not available -# on the backend, which is running a reduced operating system like Compute -# Node Linux. Thus functions like getpwuid cannot be called. This makes -# automatically testing for the existence of getpwuid on the login node -# difficult. If you know that you are on such a system, configure with -# --disable-getpwuid. -# -------------------------------------------------------------- -enablegetpwuid_default=yes +='-fPIC' + archive_cmds_FC='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' + archive_expsym_cmds_FC='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' + archive_cmds_need_lc_FC=no + no_undefined_flag_FC= + ;; -# We can't use getpwuid if pwd.h is not found. - for ac_header in pwd.h -do : - ac_fn_cxx_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" -if test "x$ac_cv_header_pwd_h" = xyes -then : - printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h - have_pwd_h=yes -else case e in #( - e) have_pwd_h=no ;; +*) + dynamic_linker=no + ;; esac -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } +test no = "$dynamic_linker" && can_build_shared=no -done -if test "$have_pwd_h" = no -then : - enablegetpwuid_default=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -# If the user configured with --enable-all-static, certain functions -# like getpwuid cannot be used. You may see warnings like the -# following from the linker: -# warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking -if test "$enableallstatic" = yes -then : - enablegetpwuid_default=no +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -# Let the user override the default (at their own risk). -# Check whether --enable-getpwuid was given. -if test ${enable_getpwuid+y} -then : - enableval=$enable_getpwuid; enablegetpwuid=$enableval -else case e in #( - e) enablegetpwuid=$enablegetpwuid_default ;; -esac +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec -if test "$enablegetpwuid" != no -then : +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH -printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with getpwuid >>>" >&5 -printf "%s\n" "<<< Configuring library with getpwuid >>>" >&6; } -fi -# -------------------------------------------------------------- -# -------------------------------------------------------------- -# C++ exceptions - enabled by default -# -------------------------------------------------------------- -# Check whether --enable-exceptions was given. -if test ${enable_exceptions+y} -then : - enableval=$enable_exceptions; enableexceptions=$enableval -else case e in #( - e) enableexceptions=yes ;; -esac -fi -if test "$enableexceptions" != no -then : -printf "%s\n" "#define ENABLE_EXCEPTIONS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with exception throwing support >>>" >&5 -printf "%s\n" "<<< Configuring library with exception throwing support >>>" >&6; } -fi -# -------------------------------------------------------------- -# -------------------------------------------------------------- -# __TIME__ __DATE__ stamps - enabled by default -# disabling preprocessor timestamps helps compiler caches such -# as ccache to work more effectively. -# -------------------------------------------------------------- -# Check whether --enable-timestamps was given. -if test ${enable_timestamps+y} -then : - enableval=$enable_timestamps; enabletimestamps=$enableval -else case e in #( - e) enabletimestamps=yes ;; -esac -fi -if test "$enabletimestamps" != no -then : -printf "%s\n" "#define ENABLE_TIMESTAMPS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with compile timestamps >>>" >&5 -printf "%s\n" "<<< Configuring library with compile timestamps >>>" >&6; } -fi -# -------------------------------------------------------------- -# -------------------------------------------------------------- -# Check for important type sizes -# -------------------------------------------------------------- -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5 -printf %s "checking size of short int... " >&6; } -if test ${ac_cv_sizeof_short_int+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default" -then : -else case e in #( - e) if test "$ac_cv_type_short_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (short int) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_short_int=0 - fi ;; -esac -fi - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5 -printf "%s\n" "$ac_cv_sizeof_short_int" >&6; } -printf "%s\n" "#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int" >>confdefs.h -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -printf %s "checking size of int... " >&6; } -if test ${ac_cv_sizeof_int+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" -then : -else case e in #( - e) if test "$ac_cv_type_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int=0 - fi ;; -esac -fi - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -printf "%s\n" "$ac_cv_sizeof_int" >&6; } -printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 -printf %s "checking size of unsigned int... " >&6; } -if test ${ac_cv_sizeof_unsigned_int+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default" -then : -else case e in #( - e) if test "$ac_cv_type_unsigned_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned int) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned_int=0 - fi ;; -esac + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_FC= +if test -n "$hardcode_libdir_flag_spec_FC" || + test -n "$runpath_var_FC" || + test yes = "$hardcode_automatic_FC"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct_FC" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" && + test no != "$hardcode_minus_L_FC"; then + # Linking always hardcodes the temporary library directory. + hardcode_action_FC=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_FC=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_FC=unsupported fi - ;; -esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5 +printf "%s\n" "$hardcode_action_FC" >&6; } + +if test relink = "$hardcode_action_FC" || + test yes = "$inherit_rpath_FC"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5 -printf "%s\n" "$ac_cv_sizeof_unsigned_int" >&6; } -printf "%s\n" "#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int" >>confdefs.h -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 -printf %s "checking size of size_t... " >&6; } -if test ${ac_cv_sizeof_size_t+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" -then : -else case e in #( - e) if test "$ac_cv_type_size_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (size_t) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_size_t=0 - fi ;; -esac -fi - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 -printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } + fi # test -n "$compiler" + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_FC" -printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5 -printf %s "checking size of long int... " >&6; } -if test ${ac_cv_sizeof_long_int+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default" -then : -else case e in #( - e) if test "$ac_cv_type_long_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long int) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_int=0 - fi ;; -esac -fi - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5 -printf "%s\n" "$ac_cv_sizeof_long_int" >&6; } -printf "%s\n" "#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int" >>confdefs.h -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 -printf %s "checking size of float... " >&6; } -if test ${ac_cv_sizeof_float+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default" -then : -else case e in #( - e) if test "$ac_cv_type_float" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (float) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_float=0 - fi ;; -esac -fi - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 -printf "%s\n" "$ac_cv_sizeof_float" >&6; } + ac_config_commands="$ac_config_commands libtool" -printf "%s\n" "#define SIZEOF_FLOAT $ac_cv_sizeof_float" >>confdefs.h -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 -printf %s "checking size of double... " >&6; } -if test ${ac_cv_sizeof_double+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default" + +# Only expand once: + + + +# Make the --enable-static setting visible in config header +if test "x$enable_static" = "xyes" then : -else case e in #( - e) if test "$ac_cv_type_double" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (double) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_double=0 - fi ;; -esac -fi - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 -printf "%s\n" "$ac_cv_sizeof_double" >&6; } +printf "%s\n" "#define HAVE_STATIC_LIBS 1" >>confdefs.h -printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h +fi +#----------------------------------------------------- +# See if the user requested --enable-all-static +#----------------------------------------------------- -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -printf %s "checking size of void *... " >&6; } -if test ${ac_cv_sizeof_void_p+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" + # Check whether --enable-all-static was given. +if test ${enable_all_static+y} then : - + enableval=$enable_all_static; enableallstatic=$enableval else case e in #( - e) if test "$ac_cv_type_void_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi ;; -esac -fi - ;; + e) enableallstatic=no ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } - -printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h - - -# Check the size of a function pointer. This is the same -# as a void* on most systems which matter (POSIX). -# It turns out that AC_CHECK_SIZEOF can't do this -# automatically... so we use a kind of hack with the 3rd -# argument to do it. -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of function_pointer" >&5 -printf %s "checking size of function_pointer... " >&6; } -if test ${ac_cv_sizeof_function_pointer+y} + if test "x$enableallstatic" = "xyes" then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (function_pointer))" "ac_cv_sizeof_function_pointer" "typedef void (*function_pointer)(); -" + + if test "x$libmesh_LDFLAGS" != "x" then : + libmesh_LDFLAGS="$libmesh_LDFLAGS -all-static" + else case e in #( - e) if test "$ac_cv_type_function_pointer" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (function_pointer) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_function_pointer=0 - fi ;; -esac -fi - ;; + e) + libmesh_LDFLAGS=-all-static + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_function_pointer" >&5 -printf "%s\n" "$ac_cv_sizeof_function_pointer" >&6; } - -printf "%s\n" "#define SIZEOF_FUNCTION_POINTER $ac_cv_sizeof_function_pointer" >>confdefs.h + if test "x$enableallstatic" = "xyes" +then : -# AC_CHECK_SIZEOF([void(*)(void)]) <-- Does not work! -# -------------------------------------------------------------- -# Check for Run Time Type Identification support -# -------------------------------------------------------------- -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports Run-Time Type Identification" >&5 -printf %s "checking whether the compiler supports Run-Time Type Identification... " >&6; } -if test ${ac_cv_cxx_rtti+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +printf "%s\n" "#define USE_ALL_STATIC_LIBS 1" >>confdefs.h - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -class Base { public : - Base () {} - virtual int f () { return 0; } - }; -class Derived : public Base { public : - Derived () {} - virtual int f () { return 1; } - }; -int -main (void) -{ -Derived d; -Base *ptr = &d; -return typeid (*ptr) == typeid (Derived); +fi - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_cxx_rtti=yes -else case e in #( - e) ac_cv_cxx_rtti=no ;; -esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ;; + +#----------------------------------------------------- +# See if shared libraries are enabled, and if so what +# the suffix for them should be. +#----------------------------------------------------- +if test "x$enable_shared" = xyes +then : + os_name=`uname -s` + if test "x$os_name" = "xDarwin" +then : + LIBMESH_LIBRARY_SUFFIX=.dylib +else case e in #( + e) LIBMESH_LIBRARY_SUFFIX=.so ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_rtti" >&5 -printf "%s\n" "$ac_cv_cxx_rtti" >&6; } -if test "$ac_cv_cxx_rtti" = yes; then - -printf "%s\n" "#define HAVE_RTTI /**/" >>confdefs.h +else case e in #( + e) LIBMESH_LIBRARY_SUFFIX=.a ;; +esac fi - # -------------------------------------------------------------- -# Check for headers +# Release versioning - after we find the C++ compiler # -------------------------------------------------------------- -ac_fn_cxx_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = xyes -then : - printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h -fi -ac_fn_cxx_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes + AX_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([^.][^.]*\).*/\1/'` + AX_MINOR_VERSION=`echo "$VERSION" | $SED -n 's/[^.][^.]*.\([^.][^.]*\).*/\1/p'` + if test "x$AX_MINOR_VERSION" = "x" then : - printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h - + AX_MINOR_VERSION=0 fi - -ac_fn_cxx_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes + AX_POINT_VERSION=`echo "$VERSION" | $SED -n 's/[^.][^.]*.[^.][^.]*.\(.*\)/\1/p'` + if test "x$AX_POINT_VERSION" = "x" then : - printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h - + AX_POINT_VERSION=0 fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Major version" >&5 +printf %s "checking Major version... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AX_MAJOR_VERSION" >&5 +printf "%s\n" "$AX_MAJOR_VERSION" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Minor version" >&5 +printf %s "checking Minor version... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AX_MINOR_VERSION" >&5 +printf "%s\n" "$AX_MINOR_VERSION" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Point version" >&5 +printf %s "checking Point version... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AX_POINT_VERSION" >&5 +printf "%s\n" "$AX_POINT_VERSION" >&6; } -ac_fn_cxx_check_header_compile "$LINENO" "process.h" "ac_cv_header_process_h" "$ac_includes_default" -if test "x$ac_cv_header_process_h" = xyes -then : - printf "%s\n" "#define HAVE_PROCESS_H 1" >>confdefs.h -fi +# Strip any '-pre' suffix from version; our code expects a number +LIBMESH_NUMERIC_POINT_VERSION=`echo "$AX_POINT_VERSION" | $SED 's/-.*//'` -ac_fn_cxx_check_header_compile "$LINENO" "csignal" "ac_cv_header_csignal" "$ac_includes_default" -if test "x$ac_cv_header_csignal" = xyes -then : - printf "%s\n" "#define HAVE_CSIGNAL 1" >>confdefs.h -fi +printf "%s\n" "#define MAJOR_VERSION $AX_MAJOR_VERSION" >>confdefs.h -ac_fn_cxx_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_resource_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h -fi +printf "%s\n" "#define MINOR_VERSION $AX_MINOR_VERSION" >>confdefs.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler has locale" >&5 -printf %s "checking whether the compiler has locale... " >&6; } -if test ${ac_cv_cxx_have_locale+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +printf "%s\n" "#define MICRO_VERSION $LIBMESH_NUMERIC_POINT_VERSION" >>confdefs.h - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include - #ifdef HAVE_NAMESPACES - using namespace std; - #endif +printf "%s\n" "#define LIB_VERSION \"$VERSION\"" >>confdefs.h -int -main (void) -{ - locale loc; - return 0; +printf "%s\n" "#define LIB_RELEASE \"$BUILD_DEVSTATUS\"" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_cxx_have_locale=yes -else case e in #( - e) ac_cv_cxx_have_locale=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_locale" >&5 -printf "%s\n" "$ac_cv_cxx_have_locale" >&6; } -if test "x$ac_cv_cxx_have_locale" = "xyes" -then : +printf "%s\n" "#define CXX \"$CXX\"" >>confdefs.h -printf "%s\n" "#define HAVE_LOCALE /**/" >>confdefs.h -fi +printf "%s\n" "#define IO_COMPATIBILITY_VERSION \"1.7.0\"" >>confdefs.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler has stringstream" >&5 -printf %s "checking whether the compiler has stringstream... " >&6; } -if test ${ac_cv_cxx_have_sstream+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif +# -------------------------------------------------------------- +# Portable symbolic links +# -------------------------------------------------------------- +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +printf %s "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "no, using $LN_S" >&6; } +fi -int -main (void) -{ +# ------------------------------------------------------------- - stringstream message; - message << "Hello"; - return 0; +# --------------------------------------------------------------- +# this seems to get done automatically for C++, but not C? +# Required for QHull rules as implemented +# -------------------------------------------------------------- - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" +# -------------------------------------------------------------- + +# -------------------------------------------------------------- +# parent directories -- portably and without race conditions +# -------------------------------------------------------------- + +# ------------------------------------------------------------- + +# -------------------------------------------------------------- +# nice sed that doesn't truncate output +# -------------------------------------------------------------- +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} then : - ac_cv_cxx_have_sstream=yes + printf %s "(cached) " >&6 else case e in #( - e) ac_cv_cxx_have_sstream=no ;; + e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in #( +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_sstream" >&5 -printf "%s\n" "$ac_cv_cxx_have_sstream" >&6; } -if test "x$ac_cv_cxx_have_sstream" = "xyes" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + +# -------------------------------------------------------------- + + +# ------------------------------------------------------------- +# pkg-config - used to configure installed packages. We can +# use it to query our installed targets, if it exists. +# Otherwise we can fall back to libmesh-config. +# +# Not required to build libmesh, but we can install a config +# file so that users can use 'pkg-config libmesh ...' +# ------------------------------------------------------------- +if test -z "$PKG_CONFIG" +then : + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} then : + printf %s "(cached) " >&6 +else case e in #( + e) case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -printf "%s\n" "#define HAVE_SSTREAM /**/" >>confdefs.h +fi +# ------------------------------------------------------------- -printf "%s\n" "#define HAVE_STRINGSTREAM /**/" >>confdefs.h -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler has strstream" >&5 -printf %s "checking whether the compiler has strstream... " >&6; } -if test ${ac_cv_cxx_have_strstream+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler implements namespaces" >&5 +printf %s "checking whether the compiler implements namespaces... " >&6; } +if test ${ac_cv_cxx_namespaces+y} then : printf %s "(cached) " >&6 else case e in #( e) - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -60019,29 +60046,20 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - #include - #ifdef HAVE_NAMESPACES - using namespace std; - #endif - +namespace Outer { namespace Inner { int i = 0; }} int main (void) { - - strstream message; - message << "Hello"; - return 0; - +using namespace Outer::Inner; return i; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - ac_cv_cxx_have_strstream=yes + ac_cv_cxx_namespaces=yes else case e in #( - e) ac_cv_cxx_have_strstream=no ;; + e) ac_cv_cxx_namespaces=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -60054,310 +60072,360 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_strstream" >&5 -printf "%s\n" "$ac_cv_cxx_have_strstream" >&6; } -if test "x$ac_cv_cxx_have_strstream" = "xyes" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_namespaces" >&5 +printf "%s\n" "$ac_cv_cxx_namespaces" >&6; } +if test "x$ac_cv_cxx_namespaces" = "xyes" then : - -printf "%s\n" "#define HAVE_STRSTREAM /**/" >>confdefs.h - - -printf "%s\n" "#define HAVE_STRINGSTREAM /**/" >>confdefs.h - - -fi - - ;; -esac -fi - - -# Check for GNU libc feenableexcept/fedisableexcept. -ac_fn_cxx_check_header_compile "$LINENO" "fenv.h" "ac_cv_header_fenv_h" "$ac_includes_default" -if test "x$ac_cv_header_fenv_h" = xyes -then : - printf "%s\n" "#define HAVE_FENV_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_NAMESPACES /**/" >>confdefs.h fi -ac_fn_cxx_check_header_compile "$LINENO" "xmmintrin.h" "ac_cv_header_xmmintrin_h" "$ac_includes_default" -if test "x$ac_cv_header_xmmintrin_h" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX options needed to detect all undeclared functions" >&5 +printf %s "checking for $CXX options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_cxx_undeclared_builtin_options+y} then : - printf "%s\n" "#define HAVE_XMMINTRIN_H 1" >>confdefs.h - -fi - - -# See if we can actually compile code using the fe{enable,disable}except functions - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + printf %s "(cached) " >&6 +else case e in #( + e) ac_save_CFLAGS=$CFLAGS + ac_cv_cxx_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main (void) { -feenableexcept(FE_DIVBYZERO | FE_INVALID); +(void) strchr; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - ac_cv_have_feenableexcept=yes -else case e in #( - e) ac_cv_have_feenableexcept=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -if test "x$ac_cv_have_feenableexcept" = "xyes" -then : - -printf "%s\n" "#define HAVE_FEENABLEEXCEPT 1" >>confdefs.h -fi - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include +#include +#include +#include +extern void ac_decl (int, char *); + int main (void) { -fedisableexcept(FE_DIVBYZERO | FE_INVALID); +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - ac_cv_have_fedisableexcept=yes + if test x"$ac_arg" = x +then : + ac_cv_cxx_undeclared_builtin_options='none needed' else case e in #( - e) ac_cv_have_fedisableexcept=no ;; + e) ac_cv_cxx_undeclared_builtin_options=$ac_arg ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -if test "x$ac_cv_have_fedisableexcept" = "xyes" -then : - -printf "%s\n" "#define HAVE_FEDISABLEEXCEPT 1" >>confdefs.h - + break fi - - -# Check if we have new-style signal handlers -ac_fn_check_decl "$LINENO" "sigaction" "ac_cv_have_decl_sigaction" "#include -" "$ac_cxx_undeclared_builtin_options" "CXXFLAGS" -if test "x$ac_cv_have_decl_sigaction" = xyes -then : - ac_have_decl=1 -else case e in #( - e) ac_have_decl=0 ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi -printf "%s\n" "#define HAVE_DECL_SIGACTION $ac_have_decl" >>confdefs.h +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_cxx_undeclared_builtin_options" >&6; } + case $ac_cv_cxx_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CXX report undeclared builtins +See 'config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_cxx_undeclared_builtin_options='' ;; #( + *) : + ac_cxx_undeclared_builtin_options=$ac_cv_cxx_undeclared_builtin_options ;; +esac -# Check for mkdir -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mkdir with two arguments" >&5 -printf %s "checking for mkdir with two arguments... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ------- Configuring compiler features -------" >&5 +printf "%s\n" "------- Configuring compiler features -------" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } - #include - #include -int -main (void) -{ +# Test using the devel mode flags, which should include any +# user-specified flags +libmesh_compiler_features_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS_DEVEL" - mkdir("test-dir", 0); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -printf "%s\n" "#define HAVE_MKDIR /**/" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +# -------------------------------------------------------------- +# Real precision - double by default +# -------------------------------------------------------------- + +# Check whether --enable-singleprecision was given. +if test ${enable_singleprecision+y} +then : + enableval=$enable_singleprecision; enablesingleprecision=$enableval else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ;; + e) enablesingleprecision=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -ac_fn_cxx_check_header_compile "$LINENO" "direct.h" "ac_cv_header_direct_h" "$ac_includes_default" -if test "x$ac_cv_header_direct_h" = xyes -then : - printf "%s\n" "#define HAVE_DIRECT_H 1" >>confdefs.h + +# Check whether --enable-tripleprecision was given. +if test ${enable_tripleprecision+y} +then : + enableval=$enable_tripleprecision; enabletripleprecision=$enableval +else case e in #( + e) enabletripleprecision=no ;; +esac fi -ac_fn_check_decl "$LINENO" "_mkdir" "ac_cv_have_decl__mkdir" " - #include -" "$ac_cxx_undeclared_builtin_options" "CXXFLAGS" -if test "x$ac_cv_have_decl__mkdir" = xyes +# Check whether --enable-quadrupleprecision was given. +if test ${enable_quadrupleprecision+y} then : - ac_have_decl=1 + enableval=$enable_quadrupleprecision; enablequadrupleprecision=$enableval else case e in #( - e) ac_have_decl=0 ;; + e) enablequadrupleprecision=no ;; esac fi -printf "%s\n" "#define HAVE_DECL__MKDIR $ac_have_decl" >>confdefs.h -ac_fn_cxx_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" -if test "x$ac_cv_func_mkstemp" = xyes +acsm_precision_LIBS="" + +if test "x$enablesingleprecision" != "xno" then : - printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h -fi -ac_fn_cxx_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes + if test "x$enabletripleprecision" != "xno" then : - printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h + as_fn_error $? "<<< Cannot simultaneously default to single and triple precision >>>" "$LINENO" 5 +elif test "x$enablequadrupleprecision" != "xno" +then : + as_fn_error $? "<<< Cannot simultaneously default to single and quadruple precision >>>" "$LINENO" 5 +else case e in #( + e) -fi +printf "%s\n" "#define DEFAULT_SINGLE_PRECISION 1" >>confdefs.h -# Check for uname header. -ac_fn_cxx_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_utsname_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h +printf "%s\n" "#define DEFAULT_SCALAR_TYPE float" >>confdefs.h + enablerealprecision=float + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Default floating point is single precision (float) >>>" >&5 +printf "%s\n" "<<< Default floating point is single precision (float) >>>" >&6; } + ;; +esac fi +elif test "x$enabletripleprecision" != "xno" +then : -# Check whether --enable-unordered-containers was given. -if test ${enable_unordered_containers+y} + if test "x$enablequadrupleprecision" != "xno" then : - enableval=$enable_unordered_containers; case "${enableval}" in #( - yes) : - enableunorderedcontainers=yes ;; #( - no) : - as_fn_error $? "libMesh now requires unordered containers" "$LINENO" 5 ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --disable-unordered-containers" "$LINENO" 5 ;; -esac + as_fn_error $? "<<< Cannot simultaneously default to single and quadruple precision >>>" "$LINENO" 5 else case e in #( - e) enableunorderedcontainers=irrelevant ;; + e) + +printf "%s\n" "#define DEFAULT_TRIPLE_PRECISION 1" >>confdefs.h + + +printf "%s\n" "#define DEFAULT_SCALAR_TYPE long double" >>confdefs.h + + enablerealprecision="long double" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Default floating point is triple precision (long double) >>>" >&5 +printf "%s\n" "<<< Default floating point is triple precision (long double) >>>" >&6; } + ;; esac fi - -if test $enableunorderedcontainers != irrelevant +elif test "x$enablequadrupleprecision" != "xno" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable/disable-unordered-containers are now deprecated" >&5 -printf "%s\n" "$as_me: WARNING: --enable/disable-unordered-containers are now deprecated" >&2;} -fi -enableunorderedcontainers=yes -# The following routines, defined in unordered.m4, check to see if -# the compiler can compile programs using the std::unordered -# containers. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::unordered_multimap" >&5 -printf %s "checking whether the compiler supports std::unordered_multimap... " >&6; } -if test ${ac_cv_cxx_unordered_multimap+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +printf "%s\n" "#define DEFAULT_QUADRUPLE_PRECISION 1" >>confdefs.h - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +printf "%s\n" "#define DEFAULT_SCALAR_TYPE boost::multiprecision::float128" >>confdefs.h + + enablerealprecision="boost::multiprecision::float128" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Default floating point is quadruple precision (boost::multiprecision::float128) >>>" >&5 +printf "%s\n" "<<< Default floating point is quadruple precision (boost::multiprecision::float128) >>>" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can build a trivial quad precision program" >&5 +printf %s "checking whether we can build a trivial quad precision program... " >&6; } + + saveLIBS="$LIBS" + if test "x$ACSM_REAL_GXX" != "x" +then : + acsm_precision_LIBS="-lquadmath" + LIBS="$saveLIBS -lquadmath" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int -main (void) -{ - std::unordered_multimap m; - m.insert(std::make_pair(1, 2)); - m.insert(std::make_pair(1, 3)); - if (m.size() != 2) return 1; - std::unordered_multimap::iterator it = m.erase(m.begin()); - m.emplace(1, 4); - m.emplace_hint(m.begin(), 0, 5); + #include + int main(int argc, char **argv) + { + __float128 f = 1; + return isinfq(f); + } - ; - return 0; -} _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_cxx_try_link "$LINENO" then : - ac_cv_cxx_unordered_multimap=yes + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else case e in #( - e) ac_cv_cxx_unordered_multimap=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + as_fn_error $? "*** Quad precision specified, gcc detected, but quadmath not found." "$LINENO" 5 + enablequadrupleprecision=no + ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_unordered_multimap" >&5 -printf "%s\n" "$ac_cv_cxx_unordered_multimap" >&6; } +elif test "x$is_intel_icc" != "x" +then : + acsm_precision_LIBS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -if test "$ac_cv_cxx_unordered_multimap" = "yes" + #include + int main(int argc, char **argv) + { + _Quad f = 0; + return int(__cosq(f)); + } + +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_STD_UNORDERED_MULTIMAP 1" >>confdefs.h +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + as_fn_error $? "*** Quad precision specified, Intel detected, but mathimf not found." "$LINENO" 5 + enablequadrupleprecision=no + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi + LIBS="$saveLIBS" -printf "%s\n" "#define BEST_UNORDERED_MULTIMAP std::unordered_multimap" >>confdefs.h +else case e in #( + e) +printf "%s\n" "#define DEFAULT_DOUBLE_PRECISION 1" >>confdefs.h -printf "%s\n" "#define INCLUDE_UNORDERED_MULTIMAP " >>confdefs.h +printf "%s\n" "#define DEFAULT_SCALAR_TYPE double" >>confdefs.h -else case e in #( - e) as_fn_error $? "libMesh requires a working std::unordered_multimap implementation" "$LINENO" 5 ;; + enablerealprecision="double" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Default floating point is double precision (double) >>>" >&5 +printf "%s\n" "<<< Default floating point is double precision (double) >>>" >&6; } + ;; esac fi +libmesh_precision_LIBS="$acsm_precision_LIBS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::unordered_map" >&5 -printf %s "checking whether the compiler supports std::unordered_map... " >&6; } -if test ${ac_cv_cxx_unordered_map+y} +# -------------------------------------------------------------- +# Determine support for the C99 "restrict" keyword in the C++ +# compiler. This should place a pound-define statement in the +# config file along the lines of: +# +# #define _libmesh_restrict __restrict +# +# The restrict keyword allows the compiler to make +# certain optimizations which require non-overlapping pointer +# addresses, i.e. in a call to: +# +# foo(int* restrict a, int* restrict b) +# +# the compiler may assume that the memory addresses pointed to +# by a and b do not overlap, and therefore certain low-level +# optimizations can be made. From the Autoconf documentation: +# +# If the C compiler recognizes a variant spelling for the restrict +# keyword (__restrict, __restrict__, or _Restrict), then define restrict +# to that; this is more likely to do the right thing with compilers that +# support language variants where plain restrict is not a +# keyword. Otherwise, if the C compiler recognizes the restrict keyword, +# don't do anything. Otherwise, define restrict to be empty. Thus, +# programs may simply use restrict as if every C compiler supported it; +# for those that do not, the makefile or configuration header defines it +# away. +# +# Although support in C++ for the restrict keyword is not required, +# several C++ compilers do accept the keyword. This macro works for +# them, too. +# +# This macro caches 'no' in the ac_cv_c_restrict variable if restrict is +# not supported, and a supported spelling otherwise. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +printf %s "checking for C/C++ restrict keyword... " >&6; } +if test ${ac_cv_c_restrict+y} then : printf %s "(cached) " >&6 else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + e) ac_cv_c_restrict=no + # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see: + # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html + # Put 'restrict' last, because C++ lacks it. + for ac_kw in __restrict__ __restrict _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } + int main (void) { - - std::unordered_map m; - m.insert(std::make_pair(1, 2)); - m.emplace(3, 4); - std::unordered_map::iterator it = m.erase(m.begin()); - m.emplace_hint(m.begin(), 0, 5); +int s[1]; + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); ; return 0; @@ -60365,439 +60433,480 @@ main (void) _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - ac_cv_cxx_unordered_map=yes -else case e in #( - e) ac_cv_cxx_unordered_map=no ;; -esac + ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - ;; + test "$ac_cv_c_restrict" != no && break + done + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_unordered_map" >&5 -printf "%s\n" "$ac_cv_cxx_unordered_map" >&6; } - -if test "$ac_cv_cxx_unordered_map" = "yes" -then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +printf "%s\n" "$ac_cv_c_restrict" >&6; } + case $ac_cv_c_restrict in + restrict) ;; + no) printf "%s\n" "#define restrict /**/" >>confdefs.h + ;; + *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h + ;; + esac -printf "%s\n" "#define HAVE_STD_UNORDERED_MAP 1" >>confdefs.h -printf "%s\n" "#define BEST_UNORDERED_MAP std::unordered_map" >>confdefs.h +# -------------------------------------------------------------- +# getpwuid - enabled by default +# Some systems, for example Crays, actually have getpwuid on the head-node +# but (if I understand correctly) a dynamically-linked glibc is not available +# on the backend, which is running a reduced operating system like Compute +# Node Linux. Thus functions like getpwuid cannot be called. This makes +# automatically testing for the existence of getpwuid on the login node +# difficult. If you know that you are on such a system, configure with +# --disable-getpwuid. +# -------------------------------------------------------------- +enablegetpwuid_default=yes +# We can't use getpwuid if pwd.h is not found. + for ac_header in pwd.h +do : + ac_fn_cxx_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" +if test "x$ac_cv_header_pwd_h" = xyes +then : + printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h + have_pwd_h=yes +else case e in #( + e) have_pwd_h=no ;; +esac +fi -printf "%s\n" "#define INCLUDE_UNORDERED_MAP " >>confdefs.h +done +if test "$have_pwd_h" = no +then : + enablegetpwuid_default=no +fi +# If the user configured with --enable-all-static, certain functions +# like getpwuid cannot be used. You may see warnings like the +# following from the linker: +# warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking +if test "$enableallstatic" = yes +then : + enablegetpwuid_default=no +fi +# Let the user override the default (at their own risk). +# Check whether --enable-getpwuid was given. +if test ${enable_getpwuid+y} +then : + enableval=$enable_getpwuid; enablegetpwuid=$enableval else case e in #( - e) as_fn_error $? "libMesh requires a working std::unordered_map implementation" "$LINENO" 5 ;; + e) enablegetpwuid=$enablegetpwuid_default ;; esac fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::unordered_multiset" >&5 -printf %s "checking whether the compiler supports std::unordered_multiset... " >&6; } -if test ${ac_cv_cxx_unordered_multiset+y} +if test "$enablegetpwuid" != no then : - printf %s "(cached) " >&6 -else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ - std::unordered_multiset s; - s.insert(1); - s.insert(1); - if (s.size() != 2) return 1; - std::unordered_multiset::iterator it = s.erase(s.begin()); - s.emplace(1); - s.emplace_hint(s.begin(), 0); +printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with getpwuid >>>" >&5 +printf "%s\n" "<<< Configuring library with getpwuid >>>" >&6; } + +fi +# -------------------------------------------------------------- + + + +# -------------------------------------------------------------- +# C++ exceptions - enabled by default +# -------------------------------------------------------------- +# Check whether --enable-exceptions was given. +if test ${enable_exceptions+y} then : - ac_cv_cxx_unordered_multiset=yes + enableval=$enable_exceptions; enableexceptions=$enableval else case e in #( - e) ac_cv_cxx_unordered_multiset=no ;; + e) enableexceptions=yes ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_unordered_multiset" >&5 -printf "%s\n" "$ac_cv_cxx_unordered_multiset" >&6; } -if test "$ac_cv_cxx_unordered_multiset" = "yes" +if test "$enableexceptions" != no then : -printf "%s\n" "#define HAVE_STD_UNORDERED_MULTISET 1" >>confdefs.h - +printf "%s\n" "#define ENABLE_EXCEPTIONS 1" >>confdefs.h -printf "%s\n" "#define BEST_UNORDERED_MULTISET std::unordered_multiset" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with exception throwing support >>>" >&5 +printf "%s\n" "<<< Configuring library with exception throwing support >>>" >&6; } +fi +# -------------------------------------------------------------- -printf "%s\n" "#define INCLUDE_UNORDERED_MULTISET " >>confdefs.h +# -------------------------------------------------------------- +# __TIME__ __DATE__ stamps - enabled by default +# disabling preprocessor timestamps helps compiler caches such +# as ccache to work more effectively. +# -------------------------------------------------------------- +# Check whether --enable-timestamps was given. +if test ${enable_timestamps+y} +then : + enableval=$enable_timestamps; enabletimestamps=$enableval else case e in #( - e) as_fn_error $? "libMesh requires a working std::unordered_multiset implementation" "$LINENO" 5 ;; + e) enabletimestamps=yes ;; esac fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::unordered_set" >&5 -printf %s "checking whether the compiler supports std::unordered_set... " >&6; } -if test ${ac_cv_cxx_unordered_set+y} +if test "$enabletimestamps" != no then : - printf %s "(cached) " >&6 -else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ - std::unordered_set s; - s.insert(1); - s.insert(2); - std::unordered_set::iterator it = s.erase(s.begin()); - s.emplace(3); - s.emplace_hint(s.begin(), 0); +printf "%s\n" "#define ENABLE_TIMESTAMPS 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with compile timestamps >>>" >&5 +printf "%s\n" "<<< Configuring library with compile timestamps >>>" >&6; } + +fi +# -------------------------------------------------------------- + + + +# -------------------------------------------------------------- +# Check for important type sizes +# -------------------------------------------------------------- +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5 +printf %s "checking size of short int... " >&6; } +if test ${ac_cv_sizeof_short_int+y} then : - ac_cv_cxx_unordered_set=yes + printf %s "(cached) " >&6 else case e in #( - e) ac_cv_cxx_unordered_set=no ;; + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_short_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (short int) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_short_int=0 + fi ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_unordered_set" >&5 -printf "%s\n" "$ac_cv_cxx_unordered_set" >&6; } - -if test "$ac_cv_cxx_unordered_set" = "yes" -then : - - -printf "%s\n" "#define HAVE_STD_UNORDERED_SET 1" >>confdefs.h +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5 +printf "%s\n" "$ac_cv_sizeof_short_int" >&6; } -printf "%s\n" "#define BEST_UNORDERED_SET std::unordered_set" >>confdefs.h +printf "%s\n" "#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int" >>confdefs.h -printf "%s\n" "#define INCLUDE_UNORDERED_SET " >>confdefs.h +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +printf %s "checking size of int... " >&6; } +if test ${ac_cv_sizeof_int+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +then : else case e in #( - e) as_fn_error $? "libMesh requires a working std::unordered_set implementation" "$LINENO" 5 ;; + e) if test "$ac_cv_type_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (int) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int=0 + fi ;; +esac +fi + ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +printf "%s\n" "$ac_cv_sizeof_int" >&6; } -# libMesh also requires C++11 std::hash. +printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::hash" >&5 -printf %s "checking whether the compiler supports std::hash... " >&6; } -if test ${ac_cv_cxx_hash+y} + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 +printf %s "checking size of unsigned int... " >&6; } +if test ${ac_cv_sizeof_unsigned_int+y} then : printf %s "(cached) " >&6 else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - -int -main (void) -{ - - std::hash m; - std::size_t hashed = m(12345); - std::hash m2; - std::size_t hashed2 = m2(std::string("foo")); - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default" then : - ac_cv_cxx_hash=yes + else case e in #( - e) ac_cv_cxx_hash=no ;; + e) if test "$ac_cv_type_unsigned_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (unsigned int) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_unsigned_int=0 + fi ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_hash" >&5 -printf "%s\n" "$ac_cv_cxx_hash" >&6; } - -if test "$ac_cv_cxx_hash" = "yes" -then : - - -printf "%s\n" "#define HAVE_STD_HASH 1" >>confdefs.h +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5 +printf "%s\n" "$ac_cv_sizeof_unsigned_int" >&6; } -printf "%s\n" "#define BEST_HASH std::hash" >>confdefs.h +printf "%s\n" "#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int" >>confdefs.h -printf "%s\n" "#define INCLUDE_HASH " >>confdefs.h +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +printf %s "checking size of size_t... " >&6; } +if test ${ac_cv_sizeof_size_t+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" +then : else case e in #( - e) as_fn_error $? "libMesh requires a working std::hash implementation" "$LINENO" 5 ;; + e) if test "$ac_cv_type_size_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (size_t) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_size_t=0 + fi ;; esac fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } -# C++11 provides std::hash and std::hash -# implementations, but we keep these defines around for backward -# compatibility. +printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h -printf "%s\n" "#define DEFINE_HASH_STRING /**/" >>confdefs.h +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5 +printf %s "checking size of long int... " >&6; } +if test ${ac_cv_sizeof_long_int+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_long_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long int) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_int=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5 +printf "%s\n" "$ac_cv_sizeof_long_int" >&6; } -printf "%s\n" "#define DEFINE_HASH_POINTERS /**/" >>confdefs.h +printf "%s\n" "#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int" >>confdefs.h - ac_cv_cxx_dlopen=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -printf %s "checking for library containing dlopen... " >&6; } -if test ${ac_cv_search_dlopen+y} +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 +printf %s "checking size of float... " >&6; } +if test ${ac_cv_sizeof_float+y} then : printf %s "(cached) " >&6 else case e in #( - e) ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -namespace conftest { - extern "C" int dlopen (); -} -int -main (void) -{ -return conftest::dlopen (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dl dld -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_cxx_try_link "$LINENO" -then : - ac_cv_search_dlopen=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_dlopen+y} -then : - break -fi -done -if test ${ac_cv_search_dlopen+y} + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default" then : else case e in #( - e) ac_cv_search_dlopen=no ;; -esac -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS ;; + e) if test "$ac_cv_type_float" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (float) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_float=0 + fi ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -printf "%s\n" "$ac_cv_search_dlopen" >&6; } -ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - ac_cv_cxx_dlopen=yes -else case e in #( - e) ac_cv_cxx_dlopen=no ;; + ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 +printf "%s\n" "$ac_cv_sizeof_float" >&6; } - if test "x$enableallstatic" = "xyes" -then : - ac_cv_cxx_dlopen=no -fi - - if test "x$ac_cv_cxx_dlopen" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the c++ compiler supports dlopen/dlsym/dlclose" >&5 -printf %s "checking whether the c++ compiler supports dlopen/dlsym/dlclose... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +printf "%s\n" "#define SIZEOF_FLOAT $ac_cv_sizeof_float" >>confdefs.h - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 +printf %s "checking size of double... " >&6; } +if test ${ac_cv_sizeof_double+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default" +then : - #include // NULL - #include +else case e in #( + e) if test "$ac_cv_type_double" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (double) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_double=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 +printf "%s\n" "$ac_cv_sizeof_double" >&6; } -int -main (void) -{ - // Try all possible ways of naming libraries. dlopen() will search - // in system-dependent paths if these names do not contain forward - // slashes. - const unsigned n_names = 2; - const char * lib_names[n_names] = {"libm.so", "libm.dylib"}; - // To catch the output of dlopen - void * handle = NULL; +printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h - for (unsigned i=0; i= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +printf %s "checking size of void *... " >&6; } +if test ${ac_cv_sizeof_void_p+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" +then : - if (!handle) - return 1; +else case e in #( + e) if test "$ac_cv_type_void_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } - // dlsym() returns the address of the code or data location - // specified by the null-terminated character string symbol. - void * address = dlsym(handle, "cos"); - if (!address) - return 1; - /* int closed_ok = */ dlclose(handle); +printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" +# Check the size of a function pointer. This is the same +# as a void* on most systems which matter (POSIX). +# It turns out that AC_CHECK_SIZEOF can't do this +# automatically... so we use a kind of hack with the 3rd +# argument to do it. +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of function_pointer" >&5 +printf %s "checking size of function_pointer... " >&6; } +if test ${ac_cv_sizeof_function_pointer+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (function_pointer))" "ac_cv_sizeof_function_pointer" "typedef void (*function_pointer)(); +" then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - ac_cv_cxx_dlopen=yes else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ac_cv_cxx_dlopen=no - ;; + e) if test "$ac_cv_type_function_pointer" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (function_pointer) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_function_pointer=0 + fi ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - + ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_function_pointer" >&5 +printf "%s\n" "$ac_cv_sizeof_function_pointer" >&6; } -if test "$ac_cv_cxx_dlopen" = yes -then : -printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h +printf "%s\n" "#define SIZEOF_FUNCTION_POINTER $ac_cv_sizeof_function_pointer" >>confdefs.h -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GCC C++ ABI name demangling" >&5 -printf %s "checking whether the compiler supports GCC C++ ABI name demangling... " >&6; } -if test ${ac_cv_cxx_gcc_abi_demangle+y} +# AC_CHECK_SIZEOF([void(*)(void)]) <-- Does not work! + +# -------------------------------------------------------------- +# Check for Run Time Type Identification support +# -------------------------------------------------------------- +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports Run-Time Type Identification" >&5 +printf %s "checking whether the compiler supports Run-Time Type Identification... " >&6; } +if test ${ac_cv_cxx_rtti+y} then : printf %s "(cached) " >&6 else case e in #( @@ -60810,22 +60919,22 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - #include - #include - #include - template class A {}; +#include +class Base { public : + Base () {} + virtual int f () { return 0; } + }; +class Derived : public Base { public : + Derived () {} + virtual int f () { return 1; } + }; int main (void) { - - A instance; - int status = 0; - char* c_name = 0; - c_name = abi::__cxa_demangle(typeid(instance).name(), 0, 0, &status); - std::string name(c_name); - return name == "A"; +Derived d; +Base *ptr = &d; +return typeid (*ptr) == typeid (Derived); ; return 0; @@ -60833,9 +60942,9 @@ main (void) _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - ac_cv_cxx_gcc_abi_demangle=yes + ac_cv_cxx_rtti=yes else case e in #( - e) ac_cv_cxx_gcc_abi_demangle=no ;; + e) ac_cv_cxx_rtti=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -60848,22 +60957,70 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_gcc_abi_demangle" >&5 -printf "%s\n" "$ac_cv_cxx_gcc_abi_demangle" >&6; } -if test "x$ac_cv_cxx_gcc_abi_demangle" = "xyes" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_rtti" >&5 +printf "%s\n" "$ac_cv_cxx_rtti" >&6; } +if test "$ac_cv_cxx_rtti" = yes; then + +printf "%s\n" "#define HAVE_RTTI /**/" >>confdefs.h + +fi + + + + +# -------------------------------------------------------------- +# Check for headers +# -------------------------------------------------------------- +ac_fn_cxx_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = xyes then : + printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h -printf "%s\n" "#define HAVE_GCC_ABI_DEMANGLE 1" >>confdefs.h +fi + +ac_fn_cxx_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the c++ compiler supports glibc backtrace" >&5 -printf %s "checking whether the c++ compiler supports glibc backtrace... " >&6; } -if test ${ac_cv_cxx_glibc_backtrace+y} +ac_fn_cxx_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi + +ac_fn_cxx_check_header_compile "$LINENO" "process.h" "ac_cv_header_process_h" "$ac_includes_default" +if test "x$ac_cv_header_process_h" = xyes +then : + printf "%s\n" "#define HAVE_PROCESS_H 1" >>confdefs.h + +fi + +ac_fn_cxx_check_header_compile "$LINENO" "csignal" "ac_cv_header_csignal" "$ac_includes_default" +if test "x$ac_cv_header_csignal" = xyes +then : + printf "%s\n" "#define HAVE_CSIGNAL 1" >>confdefs.h + +fi + +ac_fn_cxx_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_resource_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler has locale" >&5 +printf %s "checking whether the compiler has locale... " >&6; } +if test ${ac_cv_cxx_have_locale+y} then : printf %s "(cached) " >&6 else case e in #( e) + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -60872,13 +61029,18 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include + #ifdef HAVE_NAMESPACES + using namespace std; + #endif + int main (void) { -void *addresses[10]; -int size = backtrace(addresses, 10); -char** strings = backtrace_symbols(addresses, size); + + locale loc; + return 0; ; return 0; @@ -60886,9 +61048,9 @@ char** strings = backtrace_symbols(addresses, size); _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - ac_cv_cxx_glibc_backtrace=yes + ac_cv_cxx_have_locale=yes else case e in #( - e) ac_cv_cxx_glibc_backtrace=no ;; + e) ac_cv_cxx_have_locale=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -60901,82 +61063,44 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_glibc_backtrace" >&5 -printf "%s\n" "$ac_cv_cxx_glibc_backtrace" >&6; } -if test "x$ac_cv_cxx_glibc_backtrace" = "xyes" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_locale" >&5 +printf "%s\n" "$ac_cv_cxx_have_locale" >&6; } +if test "x$ac_cv_cxx_have_locale" = "xyes" then : -printf "%s\n" "#define HAVE_GLIBC_BACKTRACE 1" >>confdefs.h +printf "%s\n" "#define HAVE_LOCALE /**/" >>confdefs.h fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler has stringstream" >&5 +printf %s "checking whether the compiler has stringstream... " >&6; } +if test ${ac_cv_cxx_have_sstream+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) - - -# See if this compiler has a broken errno_t in a very specific -# situation (this is not common). - - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if errno.h can be wrapped in namespace" >&5 -printf %s "checking if errno.h can be wrapped in namespace... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - namespace Foo { - #include - } - #include +#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif int main (void) { - - ; + stringstream message; + message << "Hello"; return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - errno_t_works=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - if test "x$errno_t_works" = "xno" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if workaround fixes the issue" >&5 -printf %s "checking if workaround fixes the issue... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include // the fix - namespace Foo { - #include - } - #include - -int -main (void) -{ - ; return 0; @@ -60984,2920 +61108,2848 @@ main (void) _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - - typedef_errno_t_fixes_issue=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - + ac_cv_cxx_have_sstream=yes else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + e) ac_cv_cxx_have_sstream=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi - - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - if test "x$errno_t_works" = "xno" && test "x$typedef_errno_t_fixes_issue" = "xyes" -then : - -printf "%s\n" "#define COMPILER_HAS_BROKEN_ERRNO_T 1" >>confdefs.h - + ;; +esac fi - - if test "x$errno_t_works" = "xno" && test "x$typedef_errno_t_fixes_issue" = "x" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_sstream" >&5 +printf "%s\n" "$ac_cv_cxx_have_sstream" >&6; } +if test "x$ac_cv_cxx_have_sstream" = "xyes" then : - as_fn_error $? "Cannot work around errno.h inclusion issue. This compiler will most likely not be able to build libmesh correctly." "$LINENO" 5 -fi - - - -# Restore original CXXFLAGS for now -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CXXFLAGS="$libmesh_compiler_features_save_CXXFLAGS" - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ----- Done configuring compiler features ----" >&5 -printf "%s\n" "----- Done configuring compiler features ----" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } - - - - -# -------------------------------------------------------------- -# The AC_SUBST(foo) command creates an output variable from a shell -# variable. This command also causes AC_OUTPUT to replace all -# instances of @VAR@ with the value of the shell variable VAR in the -# output files (e.g. one or more Makefiles). -# -------------------------------------------------------------- - - - - - - - - - - - - - - +printf "%s\n" "#define HAVE_SSTREAM /**/" >>confdefs.h +printf "%s\n" "#define HAVE_STRINGSTREAM /**/" >>confdefs.h -# -------------------------------------------------------------- -# This is a special test for the mpCC (IBM) compiler. -# mpCC fails the AC_LANG tests. Set the compiler to -# mpCC if it is there instead of xlC, but only do this -# _after_ configure is finished using CXX! -# -------------------------------------------------------------- -if test "$CXX" = xlC_r -then : - # Extract the first word of "mpCC_r", so it can be a program name with args. -set dummy mpCC_r; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPCXX+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) if test -n "$MPCXX"; then - ac_cv_prog_MPCXX="$MPCXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_MPCXX="mpCC_r" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_MPCXX" && ac_cv_prog_MPCXX="$CXX" -fi ;; -esac -fi -MPCXX=$ac_cv_prog_MPCXX -if test -n "$MPCXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPCXX" >&5 -printf "%s\n" "$MPCXX" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - CXX=$MPCXX - if test "$CXX" = mpCC_r -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using $CXX instead of xlC_r to compile C++ >>>" >&5 -printf "%s\n" "<<< Using $CXX instead of xlC_r to compile C++ >>>" >&6; } -fi - -fi - -if test "$CXX" = xlC -then : - - # Extract the first word of "mpCC", so it can be a program name with args. -set dummy mpCC; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPCXX+y} + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler has strstream" >&5 +printf %s "checking whether the compiler has strstream... " >&6; } +if test ${ac_cv_cxx_have_strstream+y} then : printf %s "(cached) " >&6 else case e in #( - e) if test -n "$MPCXX"; then - ac_cv_prog_MPCXX="$MPCXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_MPCXX="mpCC" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_MPCXX" && ac_cv_prog_MPCXX="$CXX" -fi ;; -esac -fi -MPCXX=$ac_cv_prog_MPCXX -if test -n "$MPCXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPCXX" >&5 -printf "%s\n" "$MPCXX" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - CXX=$MPCXX - if test "$CXX" = mpCC -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using $CXX instead of xlC to compile C++ >>>" >&5 -printf "%s\n" "<<< Using $CXX instead of xlC to compile C++ >>>" >&6; } -fi - -fi -# -------------------------------------------------------------- - - -# -------------------------------------------------------------- -# Get the source tree directory -# -------------------------------------------------------------- -PWD=`pwd` - - + e) + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# -------------------------------------------------------------- -# configure parts of the libmesh core -# -------------------------------------------------------------- + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ----- Configuring core library features -----" >&5 -printf "%s\n" "----- Configuring core library features -----" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } + #include + #ifdef HAVE_NAMESPACES + using namespace std; + #endif +int +main (void) +{ -# ------------------------------------------------------------- -# gdb backtrace command -- default "gdb" -# -# Note: if you want to completely disable GDB backtraces, configure -# libmesh with --without-gdb-command. -# ------------------------------------------------------------- + strstream message; + message << "Hello"; + return 0; -# Check whether --with-gdb-command was given. -if test ${with_gdb_command+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - withval=$with_gdb_command; gdb_command="$withval" + ac_cv_cxx_have_strstream=yes else case e in #( - e) gdb_command="no" ;; + e) ac_cv_cxx_have_strstream=no ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -printf "%s\n" "#define GDB_COMMAND \"$gdb_command\"" >>confdefs.h - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring gdb command... \"$gdb_command\"" >&5 -printf "%s\n" "configuring gdb command... \"$gdb_command\"" >&6; } -# ------------------------------------------------------------- - - - -# -------------------------------------------------------------- -# The --enable/disable-unique-ptr is now deprecated and a warning -# message is printed if you attempt to use it. -# -------------------------------------------------------------- -# Check whether --enable-unique-ptr was given. -if test ${enable_unique_ptr+y} -then : - enableval=$enable_unique_ptr; enableuniqueptr=$enableval -else case e in #( - e) enableuniqueptr=irrelevant ;; + ;; esac fi - - -if test "$enableuniqueptr" != irrelevant +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_strstream" >&5 +printf "%s\n" "$ac_cv_cxx_have_strstream" >&6; } +if test "x$ac_cv_cxx_have_strstream" = "xyes" then : - enableuniqueptr=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable/disable-unique-ptr are now deprecated" >&5 -printf "%s\n" "$as_me: WARNING: --enable/disable-unique-ptr are now deprecated" >&2;} - -fi - -# Keep #define and Makefile variables around for backwards compatibility. +printf "%s\n" "#define HAVE_STRSTREAM /**/" >>confdefs.h -printf "%s\n" "#define ENABLE_UNIQUE_PTR 1" >>confdefs.h -# -------------------------------------------------------------- +printf "%s\n" "#define HAVE_STRINGSTREAM /**/" >>confdefs.h -# -------------------------------------------------------------- -# library warnings - enable by default -# -------------------------------------------------------------- -# Check whether --enable-warnings was given. -if test ${enable_warnings+y} -then : - enableval=$enable_warnings; enablewarnings=$enableval -else case e in #( - e) enablewarnings=yes ;; -esac fi - - -if test "$enablewarnings" != yes -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> INFO: Disabling library warnings <<<" >&5 -printf "%s\n" ">>> INFO: Disabling library warnings <<<" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring library without warnings <<<" >&5 -printf "%s\n" ">>> Configuring library without warnings <<<" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with warnings >>>" >&5 -printf "%s\n" "<<< Configuring library with warnings >>>" >&6; } - -printf "%s\n" "#define ENABLE_WARNINGS 1" >>confdefs.h - ;; esac fi -# -------------------------------------------------------------- - - -# -------------------------------------------------------------- -# library deprecated code - enable by default -# -------------------------------------------------------------- -# Check whether --enable-deprecated was given. -if test ${enable_deprecated+y} -then : - enableval=$enable_deprecated; enabledeprecated=$enableval -else case e in #( - e) enabledeprecated=yes ;; -esac -fi - -if test "$enabledeprecated" != yes +# Check for GNU libc feenableexcept/fedisableexcept. +ac_fn_cxx_check_header_compile "$LINENO" "fenv.h" "ac_cv_header_fenv_h" "$ac_includes_default" +if test "x$ac_cv_header_fenv_h" = xyes then : + printf "%s\n" "#define HAVE_FENV_H 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> INFO: Disabling library deprecated code <<<" >&5 -printf "%s\n" ">>> INFO: Disabling library deprecated code <<<" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring library without deprecated code support <<<" >&5 -printf "%s\n" ">>> Configuring library without deprecated code support <<<" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with deprecated code support >>>" >&5 -printf "%s\n" "<<< Configuring library with deprecated code support >>>" >&6; } - -printf "%s\n" "#define ENABLE_DEPRECATED 1" >>confdefs.h - - ;; -esac fi -# -------------------------------------------------------------- - -# -------------------------------------------------------------- -# forward declared enumerations - this is now required -# -------------------------------------------------------------- -# Check whether --enable-forward-declare-enums was given. -if test ${enable_forward_declare_enums+y} +ac_fn_cxx_check_header_compile "$LINENO" "xmmintrin.h" "ac_cv_header_xmmintrin_h" "$ac_includes_default" +if test "x$ac_cv_header_xmmintrin_h" = xyes then : - enableval=$enable_forward_declare_enums; enablefwdenums=$enableval -else case e in #( - e) enablefwdenums=irrelevant ;; -esac -fi - + printf "%s\n" "#define HAVE_XMMINTRIN_H 1" >>confdefs.h -if test "$enablefwdenums" != irrelevant -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable/disable-forward-declare-enums is now deprecated" >&5 -printf "%s\n" "$as_me: WARNING: --enable/disable-forward-declare-enums is now deprecated" >&2;} fi -enablefwdenums=yes - -# -------------------------------------------------------------- +# See if we can actually compile code using the fe{enable,disable}except functions -# -------------------------------------------------------------- -# blocked matrix/vector storage - disabled by default. -# See http://sourceforge.net/mailarchive/forum.php?thread_name=B4613A7D-0033-43C7-A9DF-5A801217A097%40nasa.gov&forum_name=libmesh-devel -# -------------------------------------------------------------- -# Check whether --enable-blocked-storage was given. -if test ${enable_blocked_storage+y} +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +feenableexcept(FE_DIVBYZERO | FE_INVALID); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableval=$enable_blocked_storage; enableblockedstorage=$enableval + ac_cv_have_feenableexcept=yes else case e in #( - e) enableblockedstorage=no ;; + e) ac_cv_have_feenableexcept=no ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -if test "$enableblockedstorage" != no +if test "x$ac_cv_have_feenableexcept" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to use blocked storage data structures >>>" >&5 -printf "%s\n" "<<< Configuring library to use blocked storage data structures >>>" >&6; } - -printf "%s\n" "#define ENABLE_BLOCKED_STORAGE 1" >>confdefs.h - +printf "%s\n" "#define HAVE_FEENABLEEXCEPT 1" >>confdefs.h fi -# -------------------------------------------------------------- - -# -------------------------------------------------------------- -# legacy include paths - disabled by default -# -------------------------------------------------------------- -# Check whether --enable-legacy-include-paths was given. -if test ${enable_legacy_include_paths+y} +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +fedisableexcept(FE_DIVBYZERO | FE_INVALID); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableval=$enable_legacy_include_paths; enablelegacyincludepaths=$enableval + ac_cv_have_fedisableexcept=yes else case e in #( - e) enablelegacyincludepaths=no ;; + e) ac_cv_have_fedisableexcept=no ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - -if test "$enablelegacyincludepaths" != no +if test "x$ac_cv_have_fedisableexcept" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> WARNING: using a legacy option <<<" >&5 -printf "%s\n" ">>> WARNING: using a legacy option <<<" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring library to dump old header paths into include args <<<" >&5 -printf "%s\n" ">>> Configuring library to dump old header paths into include args <<<" >&6; } +printf "%s\n" "#define HAVE_FEDISABLEEXCEPT 1" >>confdefs.h -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to require \`\`include \"libmesh/etc.h\"'' style >>>" >&5 -printf "%s\n" "<<< Configuring library to require \`\`include \"libmesh/etc.h\"'' style >>>" >&6; } ;; -esac fi -# -------------------------------------------------------------- -# -------------------------------------------------------------- -# legacy "using namespace libMesh" - disabled by default -# -------------------------------------------------------------- -# Check whether --enable-legacy-using-namespace was given. -if test ${enable_legacy_using_namespace+y} +# Check if we have new-style signal handlers +ac_fn_check_decl "$LINENO" "sigaction" "ac_cv_have_decl_sigaction" "#include +" "$ac_cxx_undeclared_builtin_options" "CXXFLAGS" +if test "x$ac_cv_have_decl_sigaction" = xyes then : - enableval=$enable_legacy_using_namespace; enablelegacyusingnamespace=$enableval + ac_have_decl=1 else case e in #( - e) enablelegacyusingnamespace=no ;; + e) ac_have_decl=0 ;; esac fi +printf "%s\n" "#define HAVE_DECL_SIGACTION $ac_have_decl" >>confdefs.h -if test "$enablelegacyusingnamespace" != no -then : +# Check for mkdir +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mkdir with two arguments" >&5 +printf %s "checking for mkdir with two arguments... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> WARNING: using a legacy option <<<" >&5 -printf "%s\n" ">>> WARNING: using a legacy option <<<" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring library to dump names into global namespace <<<" >&5 -printf "%s\n" ">>> Configuring library to dump names into global namespace <<<" >&6; } + #include + #include +int +main (void) +{ -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to keep names in libMesh namespace >>>" >&5 -printf "%s\n" "<<< Configuring library to keep names in libMesh namespace >>>" >&6; } + mkdir("test-dir", 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : -printf "%s\n" "#define REQUIRE_SEPARATE_NAMESPACE 1" >>confdefs.h +printf "%s\n" "#define HAVE_MKDIR /**/" >>confdefs.h - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; esac fi -# -------------------------------------------------------------- - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_fn_cxx_check_header_compile "$LINENO" "direct.h" "ac_cv_header_direct_h" "$ac_includes_default" +if test "x$ac_cv_header_direct_h" = xyes +then : + printf "%s\n" "#define HAVE_DIRECT_H 1" >>confdefs.h +fi -# ------------------------------------------------------------- -# size of boundary_id_type -- default 2 bytes -# ------------------------------------------------------------- +ac_fn_check_decl "$LINENO" "_mkdir" "ac_cv_have_decl__mkdir" " + #include -# Check whether --with-boundary_id_bytes was given. -if test ${with_boundary_id_bytes+y} +" "$ac_cxx_undeclared_builtin_options" "CXXFLAGS" +if test "x$ac_cv_have_decl__mkdir" = xyes then : - withval=$with_boundary_id_bytes; boundary_bytes="$withval" + ac_have_decl=1 else case e in #( - e) boundary_bytes=2 ;; + e) ac_have_decl=0 ;; esac fi +printf "%s\n" "#define HAVE_DECL__MKDIR $ac_have_decl" >>confdefs.h -case "$boundary_bytes" in #( - 1) : - -printf "%s\n" "#define BOUNDARY_ID_BYTES 1" >>confdefs.h - ;; #( - 2) : - -printf "%s\n" "#define BOUNDARY_ID_BYTES 2" >>confdefs.h - ;; #( - 4) : - -printf "%s\n" "#define BOUNDARY_ID_BYTES 4" >>confdefs.h - ;; #( - 8) : - -printf "%s\n" "#define BOUNDARY_ID_BYTES 8" >>confdefs.h - ;; #( - *) : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> unrecognized boundary_id size: $boundary_bytes - configuring size...2" >&5 -printf "%s\n" ">>> unrecognized boundary_id size: $boundary_bytes - configuring size...2" >&6; } +ac_fn_cxx_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes +then : + printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h -printf "%s\n" "#define BOUNDARY_ID_BYTES 2" >>confdefs.h +fi +ac_fn_cxx_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes +then : + printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h - boundary_bytes=2 - ;; -esac +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of boundary_id... $boundary_bytes" >&5 -printf "%s\n" "configuring size of boundary_id... $boundary_bytes" >&6; } -# ------------------------------------------------------------- +# Check for uname header. +ac_fn_cxx_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_utsname_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h +fi -# ------------------------------------------------------------- -# size of dof_id_type -- default 4 bytes -# -# We delay AC_DEFINE(DOF_ID_BYTES, etc) until later so we can -# double-check PETSc compatibility first. -# ------------------------------------------------------------- -# Check whether --with-dof_id_bytes was given. -if test ${with_dof_id_bytes+y} +# Check whether --enable-unordered-containers was given. +if test ${enable_unordered_containers+y} then : - withval=$with_dof_id_bytes; dof_bytes="$withval" - dof_bytes_setting="explicit" + enableval=$enable_unordered_containers; case "${enableval}" in #( + yes) : + enableunorderedcontainers=yes ;; #( + no) : + as_fn_error $? "libMesh now requires unordered containers" "$LINENO" 5 ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --disable-unordered-containers" "$LINENO" 5 ;; +esac else case e in #( - e) dof_bytes=4 - dof_bytes_setting="implicit" ;; + e) enableunorderedcontainers=irrelevant ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested size of dof_id... $dof_bytes" >&5 -printf "%s\n" "requested size of dof_id... $dof_bytes" >&6; } -# ------------------------------------------------------------- +if test $enableunorderedcontainers != irrelevant +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable/disable-unordered-containers are now deprecated" >&5 +printf "%s\n" "$as_me: WARNING: --enable/disable-unordered-containers are now deprecated" >&2;} +fi +enableunorderedcontainers=yes +# The following routines, defined in unordered.m4, check to see if +# the compiler can compile programs using the std::unordered +# containers. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::unordered_multimap" >&5 +printf %s "checking whether the compiler supports std::unordered_multimap... " >&6; } +if test ${ac_cv_cxx_unordered_multimap+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# ------------------------------------------------------------- -# size of processor_id_type -- default 4 bytes -# ------------------------------------------------------------- + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ -# Check whether --with-processor_id_bytes was given. -if test ${with_processor_id_bytes+y} + std::unordered_multimap m; + m.insert(std::make_pair(1, 2)); + m.insert(std::make_pair(1, 3)); + if (m.size() != 2) return 1; + std::unordered_multimap::iterator it = m.erase(m.begin()); + m.emplace(1, 4); + m.emplace_hint(m.begin(), 0, 5); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - withval=$with_processor_id_bytes; processor_bytes="$withval" + ac_cv_cxx_unordered_multimap=yes else case e in #( - e) processor_bytes=4 ;; + e) ac_cv_cxx_unordered_multimap=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_unordered_multimap" >&5 +printf "%s\n" "$ac_cv_cxx_unordered_multimap" >&6; } +if test "$ac_cv_cxx_unordered_multimap" = "yes" +then : -case "$processor_bytes" in #( - 1) : -printf "%s\n" "#define PROCESSOR_ID_BYTES 1" >>confdefs.h - ;; #( - 2) : +printf "%s\n" "#define HAVE_STD_UNORDERED_MULTIMAP 1" >>confdefs.h -printf "%s\n" "#define PROCESSOR_ID_BYTES 2" >>confdefs.h - ;; #( - 4) : -printf "%s\n" "#define PROCESSOR_ID_BYTES 4" >>confdefs.h - ;; #( - 8) : +printf "%s\n" "#define BEST_UNORDERED_MULTIMAP std::unordered_multimap" >>confdefs.h -printf "%s\n" "#define PROCESSOR_ID_BYTES 8" >>confdefs.h - ;; #( - *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> unrecognized processor_id size: $processor_bytes - configuring size...4" >&5 -printf "%s\n" ">>> unrecognized processor_id size: $processor_bytes - configuring size...4" >&6; } +printf "%s\n" "#define INCLUDE_UNORDERED_MULTIMAP " >>confdefs.h -printf "%s\n" "#define PROCESSOR_ID_BYTES 4" >>confdefs.h - processor_bytes=4 - ;; +else case e in #( + e) as_fn_error $? "libMesh requires a working std::unordered_multimap implementation" "$LINENO" 5 ;; esac +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of processor_id... $processor_bytes" >&5 -printf "%s\n" "configuring size of processor_id... $processor_bytes" >&6; } -# ------------------------------------------------------------- +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::unordered_map" >&5 +printf %s "checking whether the compiler supports std::unordered_map... " >&6; } +if test ${ac_cv_cxx_unordered_map+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# ------------------------------------------------------------- -# size of subdomain_id_type -- default 2 bytes -# ------------------------------------------------------------- + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ -# Check whether --with-subdomain_id_bytes was given. -if test ${with_subdomain_id_bytes+y} + std::unordered_map m; + m.insert(std::make_pair(1, 2)); + m.emplace(3, 4); + std::unordered_map::iterator it = m.erase(m.begin()); + m.emplace_hint(m.begin(), 0, 5); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - withval=$with_subdomain_id_bytes; subdomain_bytes="$withval" + ac_cv_cxx_unordered_map=yes else case e in #( - e) subdomain_bytes=2 ;; + e) ac_cv_cxx_unordered_map=no ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_unordered_map" >&5 +printf "%s\n" "$ac_cv_cxx_unordered_map" >&6; } -case "$subdomain_bytes" in #( - 1) : +if test "$ac_cv_cxx_unordered_map" = "yes" +then : -printf "%s\n" "#define SUBDOMAIN_ID_BYTES 1" >>confdefs.h - ;; #( - 2) : -printf "%s\n" "#define SUBDOMAIN_ID_BYTES 2" >>confdefs.h - ;; #( - 4) : +printf "%s\n" "#define HAVE_STD_UNORDERED_MAP 1" >>confdefs.h -printf "%s\n" "#define SUBDOMAIN_ID_BYTES 4" >>confdefs.h - ;; #( - 8) : -printf "%s\n" "#define SUBDOMAIN_ID_BYTES 8" >>confdefs.h - ;; #( - *) : +printf "%s\n" "#define BEST_UNORDERED_MAP std::unordered_map" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> unrecognized subdomain_id size: $subdomain_bytes - configuring size...2" >&5 -printf "%s\n" ">>> unrecognized subdomain_id size: $subdomain_bytes - configuring size...2" >&6; } -printf "%s\n" "#define SUBDOMAIN_ID_BYTES 2" >>confdefs.h +printf "%s\n" "#define INCLUDE_UNORDERED_MAP " >>confdefs.h - subdomain_bytes=2 - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of subdomain_id... $subdomain_bytes" >&5 -printf "%s\n" "configuring size of subdomain_id... $subdomain_bytes" >&6; } -# ------------------------------------------------------------- +else case e in #( + e) as_fn_error $? "libMesh requires a working std::unordered_map implementation" "$LINENO" 5 ;; +esac +fi -# ------------------------------------------------------------- -# Allow user to specify --enable-everything -# -# This flag will cause all (non-conflicting) options to be -# enabled for the purposes of configuration. For example, by -# performance logging is off by default, however -# --enable-everything will change it to be on by default. -# -# Note specific flags will override --enable-everything for -# that particular package, i.e. -# ./configure --enable-everything --disable-perflog -# -# ------------------------------------------------------------- -# Check whether --enable-everything was given. -if test ${enable_everything+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::unordered_multiset" >&5 +printf %s "checking whether the compiler supports std::unordered_multiset... " >&6; } +if test ${ac_cv_cxx_unordered_multiset+y} then : - enableval=$enable_everything; enableeverything=$enableval + printf %s "(cached) " >&6 else case e in #( - e) enableeverything=no ;; -esac -fi - + e) + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + std::unordered_multiset s; + s.insert(1); + s.insert(1); + if (s.size() != 2) return 1; + std::unordered_multiset::iterator it = s.erase(s.begin()); + s.emplace(1); + s.emplace_hint(s.begin(), 0); -# ------------------------------------------------------------- -# unique_id -- disable by default -# ------------------------------------------------------------- -# Check whether --enable-unique-id was given. -if test ${enable_unique_id+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableval=$enable_unique_id; case "${enableval}" in #( - yes) : - enableuniqueid=yes ;; #( - no) : - enableuniqueid=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-unique-id" "$LINENO" 5 ;; -esac + ac_cv_cxx_unordered_multiset=yes else case e in #( - e) enableuniqueid=$enableeverything ;; + e) ac_cv_cxx_unordered_multiset=no ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_unordered_multiset" >&5 +printf "%s\n" "$ac_cv_cxx_unordered_multiset" >&6; } -if test "$enableuniqueid" = yes +if test "$ac_cv_cxx_unordered_multiset" = "yes" then : -printf "%s\n" "#define ENABLE_UNIQUE_ID 1" >>confdefs.h +printf "%s\n" "#define HAVE_STD_UNORDERED_MULTISET 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with unique id support >>>" >&5 -printf "%s\n" "<<< Configuring library with unique id support >>>" >&6; } -fi -# ------------------------------------------------------------- +printf "%s\n" "#define BEST_UNORDERED_MULTISET std::unordered_multiset" >>confdefs.h +printf "%s\n" "#define INCLUDE_UNORDERED_MULTISET " >>confdefs.h -# ------------------------------------------------------------- -# size of unique_id_type -- default 8 bytes -# ------------------------------------------------------------- -# Check whether --with-unique_id_bytes was given. -if test ${with_unique_id_bytes+y} -then : - withval=$with_unique_id_bytes; unique_bytes="$withval" else case e in #( - e) unique_bytes=8 ;; + e) as_fn_error $? "libMesh requires a working std::unordered_multiset implementation" "$LINENO" 5 ;; esac fi -case "$unique_bytes" in #( - 1) : - -printf "%s\n" "#define UNIQUE_ID_BYTES 1" >>confdefs.h - ;; #( - 2) : - -printf "%s\n" "#define UNIQUE_ID_BYTES 2" >>confdefs.h - ;; #( - 4) : - -printf "%s\n" "#define UNIQUE_ID_BYTES 4" >>confdefs.h - ;; #( - 8) : - -printf "%s\n" "#define UNIQUE_ID_BYTES 8" >>confdefs.h - ;; #( - *) : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> unrecognized unique_id size: $unique_bytes - configuring size...8" >&5 -printf "%s\n" ">>> unrecognized unique_id size: $unique_bytes - configuring size...8" >&6; } - -printf "%s\n" "#define UNIQUE_ID_BYTES 8" >>confdefs.h - - unique_bytes=8 - ;; -esac -if test "$enableuniqueid" = yes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::unordered_set" >&5 +printf %s "checking whether the compiler supports std::unordered_set... " >&6; } +if test ${ac_cv_cxx_unordered_set+y} then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of unique_id... $unique_bytes" >&5 -printf "%s\n" "configuring size of unique_id... $unique_bytes" >&6; } -fi -# ------------------------------------------------------------- + printf %s "(cached) " >&6 +else case e in #( + e) + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + std::unordered_set s; + s.insert(1); + s.insert(2); + std::unordered_set::iterator it = s.erase(s.begin()); + s.emplace(3); + s.emplace_hint(s.begin(), 0); -# -------------------------------------------------------------- -# Write stack trace output files on error() - disabled by default -# -------------------------------------------------------------- -# Check whether --enable-tracefiles was given. -if test ${enable_tracefiles+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableval=$enable_tracefiles; enabletracefiles=$enableval + ac_cv_cxx_unordered_set=yes else case e in #( - e) enabletracefiles=$enableeverything ;; + e) ac_cv_cxx_unordered_set=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_unordered_set" >&5 +printf "%s\n" "$ac_cv_cxx_unordered_set" >&6; } - -if test "$enabletracefiles" != no +if test "$ac_cv_cxx_unordered_set" = "yes" then : -printf "%s\n" "#define ENABLE_TRACEFILES 1" >>confdefs.h +printf "%s\n" "#define HAVE_STD_UNORDERED_SET 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with stack trace file support >>>" >&5 -printf "%s\n" "<<< Configuring library with stack trace file support >>>" >&6; } -fi -# -------------------------------------------------------------- +printf "%s\n" "#define BEST_UNORDERED_SET std::unordered_set" >>confdefs.h + + +printf "%s\n" "#define INCLUDE_UNORDERED_SET " >>confdefs.h -# ------------------------------------------------------------- -# AMR -- enabled by default -# ------------------------------------------------------------- -# Check whether --enable-amr was given. -if test ${enable_amr+y} -then : - enableval=$enable_amr; enableamr=$enableval else case e in #( - e) enableamr=yes ;; + e) as_fn_error $? "libMesh requires a working std::unordered_set implementation" "$LINENO" 5 ;; esac fi -if test "$enableamr" != no -then : +# libMesh also requires C++11 std::hash. -printf "%s\n" "#define ENABLE_AMR 1" >>confdefs.h +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports std::hash" >&5 +printf %s "checking whether the compiler supports std::hash... " >&6; } +if test ${ac_cv_cxx_hash+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with AMR support >>>" >&5 -printf "%s\n" "<<< Configuring library with AMR support >>>" >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -# ------------------------------------------------------------- + #include + #include +int +main (void) +{ + std::hash m; + std::size_t hashed = m(12345); + std::hash m2; + std::size_t hashed2 = m2(std::string("foo")); -# ------------------------------------------------------------- -# Variational smoother -- enabled by default -# ------------------------------------------------------------- -# Check whether --enable-vsmoother was given. -if test ${enable_vsmoother+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableval=$enable_vsmoother; enablevsmoother=$enableval + ac_cv_cxx_hash=yes else case e in #( - e) enablevsmoother=yes ;; + e) ac_cv_cxx_hash=no ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_hash" >&5 +printf "%s\n" "$ac_cv_cxx_hash" >&6; } -if test "$enablevsmoother" != no +if test "$ac_cv_cxx_hash" = "yes" then : -printf "%s\n" "#define ENABLE_VSMOOTHER 1" >>confdefs.h +printf "%s\n" "#define HAVE_STD_HASH 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with variational smoother support >>>" >&5 -printf "%s\n" "<<< Configuring library with variational smoother support >>>" >&6; } -fi -# ------------------------------------------------------------- +printf "%s\n" "#define BEST_HASH std::hash" >>confdefs.h +printf "%s\n" "#define INCLUDE_HASH " >>confdefs.h + -# ------------------------------------------------------------- -# Periodic BCs -- enabled by default -# ------------------------------------------------------------- -# Check whether --enable-periodic was given. -if test ${enable_periodic+y} -then : - enableval=$enable_periodic; enableperiodic=$enableval else case e in #( - e) enableperiodic=yes ;; + e) as_fn_error $? "libMesh requires a working std::hash implementation" "$LINENO" 5 ;; esac fi -if test "$enableperiodic" != no -then : +# C++11 provides std::hash and std::hash +# implementations, but we keep these defines around for backward +# compatibility. -printf "%s\n" "#define ENABLE_PERIODIC 1" >>confdefs.h +printf "%s\n" "#define DEFINE_HASH_STRING /**/" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with periodic BC support >>>" >&5 -printf "%s\n" "<<< Configuring library with periodic BC support >>>" >&6; } -fi -# ------------------------------------------------------------- +printf "%s\n" "#define DEFINE_HASH_POINTERS /**/" >>confdefs.h -# ------------------------------------------------------------- -# Dirichlet BC constraints -- enabled by default -# ------------------------------------------------------------- -# Check whether --enable-dirichlet was given. -if test ${enable_dirichlet+y} + ac_cv_cxx_dlopen=no + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +printf %s "checking for library containing dlopen... " >&6; } +if test ${ac_cv_search_dlopen+y} then : - enableval=$enable_dirichlet; enabledirichlet=$enableval + printf %s "(cached) " >&6 else case e in #( - e) enabledirichlet=yes ;; + e) ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +namespace conftest { + extern "C" int dlopen (); +} +int +main (void) +{ +return conftest::dlopen (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dl dld +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_cxx_try_link "$LINENO" +then : + ac_cv_search_dlopen=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_dlopen+y} +then : + break +fi +done +if test ${ac_cv_search_dlopen+y} +then : + +else case e in #( + e) ac_cv_search_dlopen=no ;; +esac +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 +printf "%s\n" "$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + ac_cv_cxx_dlopen=yes +else case e in #( + e) ac_cv_cxx_dlopen=no ;; esac fi -if test "$enabledirichlet" != no + if test "x$enableallstatic" = "xyes" then : + ac_cv_cxx_dlopen=no +fi + if test "x$ac_cv_cxx_dlopen" = "xyes" +then : -printf "%s\n" "#define ENABLE_DIRICHLET 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the c++ compiler supports dlopen/dlsym/dlclose" >&5 +printf %s "checking whether the c++ compiler supports dlopen/dlsym/dlclose... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Dirichlet constraint support >>>" >&5 -printf "%s\n" "<<< Configuring library with Dirichlet constraint support >>>" >&6; } -fi -# ------------------------------------------------------------- + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include // NULL + #include +int +main (void) +{ -# ------------------------------------------------------------- -# NodeConstraints -- disabled by default -# ------------------------------------------------------------- -# Check whether --enable-nodeconstraint was given. -if test ${enable_nodeconstraint+y} -then : - enableval=$enable_nodeconstraint; enablenodeconstraint=$enableval -else case e in #( - e) enablenodeconstraint=$enableeverything ;; -esac -fi + // Try all possible ways of naming libraries. dlopen() will search + // in system-dependent paths if these names do not contain forward + // slashes. + const unsigned n_names = 2; + const char * lib_names[n_names] = {"libm.so", "libm.dylib"}; + // To catch the output of dlopen + void * handle = NULL; -if test "$enablenodeconstraint" != no -then : + for (unsigned i=0; i>confdefs.h + if (!handle) + return 1; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with node constraints support >>>" >&5 -printf "%s\n" "<<< Configuring library with node constraints support >>>" >&6; } + // dlsym() returns the address of the code or data location + // specified by the null-terminated character string symbol. + void * address = dlsym(handle, "cos"); -fi -# ------------------------------------------------------------- + if (!address) + return 1; + /* int closed_ok = */ dlclose(handle); + return 0; -# ------------------------------------------------------------- -# Mesh == ParallelMesh -- disabled by default for max compatibility -# This flag is old/deprecated -# ------------------------------------------------------------- -# Check whether --enable-parmesh was given. -if test ${enable_parmesh+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - enableval=$enable_parmesh; enableparmesh=$enableval + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_cxx_dlopen=yes + else case e in #( - e) enableparmesh=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_cxx_dlopen=no + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "$enabledistmesh" != no -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< --enable-parmesh is deprecated; use --enable-distmesh >>>" >&5 -printf "%s\n" "<<< --enable-parmesh is deprecated; use --enable-distmesh >>>" >&6; } fi -# ------------------------------------------------------------- -# ------------------------------------------------------------- -# Mesh == DistributedMesh -- disabled by default for max -# compatibility, so DistributedMesh must be chosen manually -# ------------------------------------------------------------- -# Check whether --enable-distmesh was given. -if test ${enable_distmesh+y} + +if test "$ac_cv_cxx_dlopen" = yes then : - enableval=$enable_distmesh; enabledistmesh=$enableval -else case e in #( - e) enabledistmesh=$enableparmesh ;; -esac -fi +printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h + +fi -if test "$enabledistmesh" != no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GCC C++ ABI name demangling" >&5 +printf %s "checking whether the compiler supports GCC C++ ABI name demangling... " >&6; } +if test ${ac_cv_cxx_gcc_abi_demangle+y} then : + printf %s "(cached) " >&6 +else case e in #( + e) + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -printf "%s\n" "#define ENABLE_PARMESH 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Defaulting library to DistributedMesh >>>" >&5 -printf "%s\n" "<<< Defaulting library to DistributedMesh >>>" >&6; } + #include + #include + #include + template class A {}; -fi -# ------------------------------------------------------------- -# +int +main (void) +{ -# ------------------------------------------------------------- -# size of mapvector/chunked_mapvector nodes -- default 1 object -# ------------------------------------------------------------- + A instance; + int status = 0; + char* c_name = 0; + c_name = abi::__cxa_demangle(typeid(instance).name(), 0, 0, &status); + std::string name(c_name); + return name == "A"; -# Check whether --with-mapvector_chunk_size was given. -if test ${with_mapvector_chunk_size+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - withval=$with_mapvector_chunk_size; mapvector_chunk_size="$withval" + ac_cv_cxx_gcc_abi_demangle=yes else case e in #( - e) mapvector_chunk_size=1 ;; + e) ac_cv_cxx_gcc_abi_demangle=no ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_gcc_abi_demangle" >&5 +printf "%s\n" "$ac_cv_cxx_gcc_abi_demangle" >&6; } +if test "x$ac_cv_cxx_gcc_abi_demangle" = "xyes" +then : +printf "%s\n" "#define HAVE_GCC_ABI_DEMANGLE 1" >>confdefs.h -printf "%s\n" "#define MAPVECTOR_CHUNK_SIZE $mapvector_chunk_size" >>confdefs.h - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of mapvector chunks: $mapvector_chunk_size" >&5 -printf "%s\n" "configuring size of mapvector chunks: $mapvector_chunk_size" >&6; } - +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the c++ compiler supports glibc backtrace" >&5 +printf %s "checking whether the c++ compiler supports glibc backtrace... " >&6; } +if test ${ac_cv_cxx_glibc_backtrace+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +void *addresses[10]; +int size = backtrace(addresses, 10); +char** strings = backtrace_symbols(addresses, size); -# ------------------------------------------------------------- -# Ghosted instead of Serial local vectors -- enabled by default -# ------------------------------------------------------------- -# Check whether --enable-ghosted was given. -if test ${enable_ghosted+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableval=$enable_ghosted; enableghosted=$enableval + ac_cv_cxx_glibc_backtrace=yes else case e in #( - e) enableghosted=yes ;; + e) ac_cv_cxx_glibc_backtrace=no ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -if test "$enableghosted" != no + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_glibc_backtrace" >&5 +printf "%s\n" "$ac_cv_cxx_glibc_backtrace" >&6; } +if test "x$ac_cv_cxx_glibc_backtrace" = "xyes" then : - -printf "%s\n" "#define ENABLE_GHOSTED 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to use ghosted local vectors >>>" >&5 -printf "%s\n" "<<< Configuring library to use ghosted local vectors >>>" >&6; } +printf "%s\n" "#define HAVE_GLIBC_BACKTRACE 1" >>confdefs.h fi -# ------------------------------------------------------------- -# ------------------------------------------------------------- -# Store node valence for use with subdivision surface finite -# elements -- enabled by default -# ------------------------------------------------------------- -# Check whether --enable-node-valence was given. -if test ${enable_node_valence+y} -then : - enableval=$enable_node_valence; enablenodevalence=$enableval -else case e in #( - e) enablenodevalence=yes ;; -esac -fi +# See if this compiler has a broken errno_t in a very specific +# situation (this is not common). -if test "$enablenodevalence" != no -then : + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -printf "%s\n" "#define ENABLE_NODE_VALENCE 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if errno.h can be wrapped in namespace" >&5 +printf %s "checking if errno.h can be wrapped in namespace... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to store node valence >>>" >&5 -printf "%s\n" "<<< Configuring library to store node valence >>>" >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -# ------------------------------------------------------------- + namespace Foo { + #include + } + #include +int +main (void) +{ -# ------------------------------------------------------------- -# 1D or 1D/2D only -- disabled by default -# ------------------------------------------------------------- -# Check whether --enable-1D-only was given. -if test ${enable_1D_only+y} + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableval=$enable_1D_only; enable1D=$enableval + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else case e in #( - e) enable1D=no ;; + e) + errno_t_works=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + if test "x$errno_t_works" = "xno" +then : -# Check whether --enable-2D-only was given. -if test ${enable_2D_only+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if workaround fixes the issue" >&5 +printf %s "checking if workaround fixes the issue... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include // the fix + namespace Foo { + #include + } + #include + +int +main (void) +{ + + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableval=$enable_2D_only; enable2D=$enableval + + typedef_errno_t_fixes_issue=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else case e in #( - e) enable2D=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -if test "$enable2D" != no -then : + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -printf "%s\n" "#define DIM 2" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library for 1D/2D meshes only >>>" >&5 -printf "%s\n" "<<< Configuring library for 1D/2D meshes only >>>" >&6; } -elif test "$enable1D" != no + if test "x$errno_t_works" = "xno" && test "x$typedef_errno_t_fixes_issue" = "xyes" then : -printf "%s\n" "#define DIM 1" >>confdefs.h +printf "%s\n" "#define COMPILER_HAS_BROKEN_ERRNO_T 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library for 1D meshes only >>>" >&5 -printf "%s\n" "<<< Configuring library for 1D meshes only >>>" >&6; } -else case e in #( - e) -printf "%s\n" "#define DIM 3" >>confdefs.h - ;; -esac fi -# ------------------------------------------------------------- - - -# ------------------------------------------------------------- -# higher order shapes -- enabled by default -# ------------------------------------------------------------- -# Check whether --enable-pfem was given. -if test ${enable_pfem+y} + if test "x$errno_t_works" = "xno" && test "x$typedef_errno_t_fixes_issue" = "x" then : - enableval=$enable_pfem; enablepfem=$enableval -else case e in #( - e) enablepfem=yes ;; -esac + as_fn_error $? "Cannot work around errno.h inclusion issue. This compiler will most likely not be able to build libmesh correctly." "$LINENO" 5 fi -if test "$enablepfem" != no -then : - -printf "%s\n" "#define ENABLE_HIGHER_ORDER_SHAPES 1" >>confdefs.h +# Restore original CXXFLAGS for now +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with higher order p-FEM shapes >>>" >&5 -printf "%s\n" "<<< Configuring library with higher order p-FEM shapes >>>" >&6; } +CXXFLAGS="$libmesh_compiler_features_save_CXXFLAGS" -fi -# ------------------------------------------------------------- +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ----- Done configuring compiler features ----" >&5 +printf "%s\n" "----- Done configuring compiler features ----" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } -# ------------------------------------------------------------- -# Infinite Elements -- disabled by default -# ------------------------------------------------------------- -# Check whether --enable-ifem was given. -if test ${enable_ifem+y} -then : - enableval=$enable_ifem; enableifem=$enableval -else case e in #( - e) enableifem=$enableeverything ;; -esac -fi +# -------------------------------------------------------------- +# The AC_SUBST(foo) command creates an output variable from a shell +# variable. This command also causes AC_OUTPUT to replace all +# instances of @VAR@ with the value of the shell variable VAR in the +# output files (e.g. one or more Makefiles). +# -------------------------------------------------------------- -if test "$enableifem" != no -then : -printf "%s\n" "#define ENABLE_INFINITE_ELEMENTS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with infinite elements >>>" >&5 -printf "%s\n" "<<< Configuring library with infinite elements >>>" >&6; } -fi - if test x$enableifem != no ; then - LIBMESH_ENABLE_INFINITE_ELEMENTS_TRUE= - LIBMESH_ENABLE_INFINITE_ELEMENTS_FALSE='#' -else - LIBMESH_ENABLE_INFINITE_ELEMENTS_TRUE='#' - LIBMESH_ENABLE_INFINITE_ELEMENTS_FALSE= -fi -# ------------------------------------------------------------- -# ------------------------------------------------------------- -# Second Derivative Calculations -- disabled by default -# ------------------------------------------------------------- -# Check whether --enable-second was given. -if test ${enable_second+y} -then : - enableval=$enable_second; enablesecond=$enableval -else case e in #( - e) enablesecond=yes ;; -esac -fi -if test "$enablesecond" != no -then : -printf "%s\n" "#define ENABLE_SECOND_DERIVATIVES 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with second derivatives >>>" >&5 -printf "%s\n" "<<< Configuring library with second derivatives >>>" >&6; } -fi -# ------------------------------------------------------------- +# -------------------------------------------------------------- +# This is a special test for the mpCC (IBM) compiler. +# mpCC fails the AC_LANG tests. Set the compiler to +# mpCC if it is there instead of xlC, but only do this +# _after_ configure is finished using CXX! +# -------------------------------------------------------------- +if test "$CXX" = xlC_r +then : -# ------------------------------------------------------------- -# complex numbers -- disabled by default -# ------------------------------------------------------------- -# Check whether --enable-complex was given. -if test ${enable_complex+y} + # Extract the first word of "mpCC_r", so it can be a program name with args. +set dummy mpCC_r; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPCXX+y} then : - enableval=$enable_complex; case "${enableval}" in #( - yes) : - enablecomplex=yes ;; #( - no) : - enablecomplex=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-complex" "$LINENO" 5 ;; -esac + printf %s "(cached) " >&6 else case e in #( - e) enablecomplex=no ;; + e) if test -n "$MPCXX"; then + ac_cv_prog_MPCXX="$MPCXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_MPCXX="mpCC_r" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_MPCXX" && ac_cv_prog_MPCXX="$CXX" +fi ;; esac +fi +MPCXX=$ac_cv_prog_MPCXX +if test -n "$MPCXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPCXX" >&5 +printf "%s\n" "$MPCXX" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -if test "$enablecomplex" != no + CXX=$MPCXX + if test "$CXX" = mpCC_r then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using $CXX instead of xlC_r to compile C++ >>>" >&5 +printf "%s\n" "<<< Using $CXX instead of xlC_r to compile C++ >>>" >&6; } +fi +fi -printf "%s\n" "#define USE_COMPLEX_NUMBERS 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with complex number support >>>" >&5 -printf "%s\n" "<<< Configuring library with complex number support >>>" >&6; } +if test "$CXX" = xlC +then : + # Extract the first word of "mpCC", so it can be a program name with args. +set dummy mpCC; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPCXX+y} +then : + printf %s "(cached) " >&6 else case e in #( - e) - -printf "%s\n" "#define USE_REAL_NUMBERS 1" >>confdefs.h + e) if test -n "$MPCXX"; then + ac_cv_prog_MPCXX="$MPCXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_MPCXX="mpCC" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with real number support >>>" >&5 -printf "%s\n" "<<< Configuring library with real number support >>>" >&6; } - ;; + test -z "$ac_cv_prog_MPCXX" && ac_cv_prog_MPCXX="$CXX" +fi ;; esac fi - - if test x$enablecomplex = xyes; then - LIBMESH_ENABLE_COMPLEX_TRUE= - LIBMESH_ENABLE_COMPLEX_FALSE='#' +MPCXX=$ac_cv_prog_MPCXX +if test -n "$MPCXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPCXX" >&5 +printf "%s\n" "$MPCXX" >&6; } else - LIBMESH_ENABLE_COMPLEX_TRUE='#' - LIBMESH_ENABLE_COMPLEX_FALSE= + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -# ------------------------------------------------------------- - - -# ------------------------------------------------------------- -# Reference Counting -- enabled by default -# ------------------------------------------------------------- -# Check whether --enable-reference-counting was given. -if test ${enable_reference_counting+y} + CXX=$MPCXX + if test "$CXX" = mpCC then : - enableval=$enable_reference_counting; enablerefct=$enableval -else case e in #( - e) enablerefct=yes ;; -esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using $CXX instead of xlC to compile C++ >>>" >&5 +printf "%s\n" "<<< Using $CXX instead of xlC to compile C++ >>>" >&6; } fi +fi +# -------------------------------------------------------------- -if test "x$enablerefct" != "xno" && test "x$ac_cv_cxx_rtti" = "xyes" -then : + +# -------------------------------------------------------------- +# Get the source tree directory +# -------------------------------------------------------------- +PWD=`pwd` -printf "%s\n" "#define ENABLE_REFERENCE_COUNTING 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with reference counting support >>>" >&5 -printf "%s\n" "<<< Configuring library with reference counting support >>>" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< No RTTI: disabling reference counting support >>>" >&5 -printf "%s\n" "<<< No RTTI: disabling reference counting support >>>" >&6; } ;; -esac -fi -# ------------------------------------------------------------- +# -------------------------------------------------------------- +# configure parts of the libmesh core +# -------------------------------------------------------------- +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ----- Configuring core library features -----" >&5 +printf "%s\n" "----- Configuring core library features -----" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } # ------------------------------------------------------------- -# Performance Logging -- disabled by default +# gdb backtrace command -- default "gdb" +# +# Note: if you want to completely disable GDB backtraces, configure +# libmesh with --without-gdb-command. # ------------------------------------------------------------- -# Check whether --enable-perflog was given. -if test ${enable_perflog+y} + +# Check whether --with-gdb-command was given. +if test ${with_gdb_command+y} then : - enableval=$enable_perflog; enableperflog=$enableval + withval=$with_gdb_command; gdb_command="$withval" else case e in #( - e) enableperflog=$enableeverything ;; + e) gdb_command="no" ;; esac fi -if test "$enableperflog" != no -then : - - -printf "%s\n" "#define ENABLE_PERFORMANCE_LOGGING 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with performance logging support >>>" >&5 -printf "%s\n" "<<< Configuring library with performance logging support >>>" >&6; } +printf "%s\n" "#define GDB_COMMAND \"$gdb_command\"" >>confdefs.h -fi -# ------------------------------------------------------------ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring gdb command... \"$gdb_command\"" >&5 +printf "%s\n" "configuring gdb command... \"$gdb_command\"" >&6; } +# ------------------------------------------------------------- -# ------------------------------------------------------------- -# Examples - enabled by default -# ------------------------------------------------------------- -# Check whether --enable-examples was given. -if test ${enable_examples+y} +# -------------------------------------------------------------- +# The --enable/disable-unique-ptr is now deprecated and a warning +# message is printed if you attempt to use it. +# -------------------------------------------------------------- +# Check whether --enable-unique-ptr was given. +if test ${enable_unique_ptr+y} then : - enableval=$enable_examples; case "${enableval}" in #( - yes) : - enableexamples=yes ;; #( - no) : - enableexamples=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-examples" "$LINENO" 5 ;; -esac + enableval=$enable_unique_ptr; enableuniqueptr=$enableval else case e in #( - e) enableexamples=yes ;; + e) enableuniqueptr=irrelevant ;; esac fi -if test "$enableexamples" = yes +if test "$enableuniqueptr" != irrelevant then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library example suite support >>>" >&5 -printf "%s\n" "<<< Configuring library example suite support >>>" >&6; } -fi - if test x$enableexamples = xyes; then - LIBMESH_ENABLE_EXAMPLES_TRUE= - LIBMESH_ENABLE_EXAMPLES_FALSE='#' -else - LIBMESH_ENABLE_EXAMPLES_TRUE='#' - LIBMESH_ENABLE_EXAMPLES_FALSE= + + enableuniqueptr=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable/disable-unique-ptr are now deprecated" >&5 +printf "%s\n" "$as_me: WARNING: --enable/disable-unique-ptr are now deprecated" >&2;} + fi -# ------------------------------------------------------------ +# Keep #define and Makefile variables around for backwards compatibility. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -- Done configuring core library features ---" >&5 -printf "%s\n" "-- Done configuring core library features ---" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } +printf "%s\n" "#define ENABLE_UNIQUE_PTR 1" >>confdefs.h + +# -------------------------------------------------------------- # -------------------------------------------------------------- -# configure TIMPI, which is practically libMesh core -# -# Use AX_SUBDIRS_CONFIGURE here so we get timpi_config.h before -# contrib/metaphysicl might need it later. +# library warnings - enable by default # -------------------------------------------------------------- +# Check whether --enable-warnings was given. +if test ${enable_warnings+y} +then : + enableval=$enable_warnings; enablewarnings=$enableval +else case e in #( + e) enablewarnings=yes ;; +esac +fi +if test "$enablewarnings" != yes +then : - # Various preliminary checks. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> INFO: Disabling library warnings <<<" >&5 +printf "%s\n" ">>> INFO: Disabling library warnings <<<" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring library without warnings <<<" >&5 +printf "%s\n" ">>> Configuring library without warnings <<<" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with warnings >>>" >&5 +printf "%s\n" "<<< Configuring library with warnings >>>" >&6; } +printf "%s\n" "#define ENABLE_WARNINGS 1" >>confdefs.h + ;; +esac +fi +# -------------------------------------------------------------- - ax_dir="contrib/timpi" +# -------------------------------------------------------------- +# library deprecated code - enable by default +# -------------------------------------------------------------- +# Check whether --enable-deprecated was given. +if test ${enable_deprecated+y} +then : + enableval=$enable_deprecated; enabledeprecated=$enableval +else case e in #( + e) enabledeprecated=yes ;; +esac +fi - # Do not complain, so a configure script can configure whichever parts of a - # large source tree are present. - if test -d "$srcdir/$ax_dir"; then - ac_builddir=. -case "$ax_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ax_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +if test "$enabledeprecated" != yes +then : - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. - ax_args= - ax_prev= - eval "set x $ac_configure_args" - shift - for ax_arg; do - if test -n "$ax_prev"; then - ax_prev= - continue - fi - case $ax_arg in - -cache-file | --cache-file | --cache-fil | --cache-fi | --cache-f \ - | --cache- | --cache | --cach | --cac | --ca | --c) - ax_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ - | --c=*) - ;; - --config-cache | -C) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ax_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ax_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* \ - | --p=*) - ;; - --disable-option-checking) - ;; - *) case $ax_arg in - *\'*) ax_arg=$(printf "%s\n" "$ax_arg" | sed "s/'/'\\\\\\\\''/g");; - esac - as_fn_append ax_args " '$ax_arg'" ;; - esac - done - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ax_args="--disable-option-checking $ax_args" - # Options that must be added as they are provided. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> INFO: Disabling library deprecated code <<<" >&5 +printf "%s\n" ">>> INFO: Disabling library deprecated code <<<" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring library without deprecated code support <<<" >&5 +printf "%s\n" ">>> Configuring library without deprecated code support <<<" >&6; } - # New options that may need to be merged with existing options. +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with deprecated code support >>>" >&5 +printf "%s\n" "<<< Configuring library with deprecated code support >>>" >&6; } - # New options that must replace existing options. +printf "%s\n" "#define ENABLE_DEPRECATED 1" >>confdefs.h - # Options that must be removed. + ;; +esac +fi +# -------------------------------------------------------------- - as_fn_append ax_args " '--srcdir=$ac_srcdir'" - # Add the subdirectory to the list of target subdirectories. - ax_subconfigures="$ax_subconfigures $ax_dir" - # Save the argument list for this subdirectory. - ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_") - eval "ax_sub_configure_args_$ax_var=\"$ax_args\"" - eval "ax_sub_configure_$ax_var=\"yes\"" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find source tree for $ax_dir" >&5 -printf "%s\n" "$as_me: WARNING: could not find source tree for $ax_dir" >&2;} - fi +# -------------------------------------------------------------- +# forward declared enumerations - this is now required +# -------------------------------------------------------------- +# Check whether --enable-forward-declare-enums was given. +if test ${enable_forward_declare_enums+y} +then : + enableval=$enable_forward_declare_enums; enablefwdenums=$enableval +else case e in #( + e) enablefwdenums=irrelevant ;; +esac +fi +if test "$enablefwdenums" != irrelevant +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable/disable-forward-declare-enums is now deprecated" >&5 +printf "%s\n" "$as_me: WARNING: --enable/disable-forward-declare-enums is now deprecated" >&2;} +fi +enablefwdenums=yes +# -------------------------------------------------------------- # -------------------------------------------------------------- -# configure optional, external packages and libraries +# blocked matrix/vector storage - disabled by default. +# See http://sourceforge.net/mailarchive/forum.php?thread_name=B4613A7D-0033-43C7-A9DF-5A801217A097%40nasa.gov&forum_name=libmesh-devel # -------------------------------------------------------------- +# Check whether --enable-blocked-storage was given. +if test ${enable_blocked_storage+y} +then : + enableval=$enable_blocked_storage; enableblockedstorage=$enableval +else case e in #( + e) enableblockedstorage=no ;; +esac +fi +if test "$enableblockedstorage" != no +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to use blocked storage data structures >>>" >&5 +printf "%s\n" "<<< Configuring library to use blocked storage data structures >>>" >&6; } +printf "%s\n" "#define ENABLE_BLOCKED_STORAGE 1" >>confdefs.h -# initialize these empty - append below -# note that -# libmesh_optional_INCLUDES and -# libmesh_optional_LIBS should point to third party packages -# outside the libMesh source and installation tree, and will -# be exported to the installation environment. -# -# By contrast, libmesh_contrib_INCLUDES and libmesh_contrib_LDFLAGS -# point inside the source tree for building contributed packages that -# do not need to be exported as part of the installation environment. -# -# 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_contrib_LDFLAGS="" -libmesh_pkgconfig_requires="" -libmesh_installed_LIBS="" +fi # -------------------------------------------------------------- -# TIMPI is required - so we should be able to see our TIMPI submodule. -# If our version of TIMPI doesn't have AM MAINTAINER MODE set, then we -# need its autoconf submodule initialized too. -# -------------------------------------------------------------- -if test -r $top_srcdir/contrib/timpi/README && - (test -r $top_srcdir/contrib/timpi/m4/autoconf-submodule/acsm_mpi.m4 || - grep "^AM""_MAINTAINER_MODE" $top_srcdir/contrib/timpi/configure.ac >/dev/null) -then : - libmesh_contrib_INCLUDES="-I\$(top_srcdir)/contrib/timpi/src/algorithms/include $libmesh_contrib_INCLUDES" - libmesh_contrib_INCLUDES="-I\$(top_srcdir)/contrib/timpi/src/parallel/include $libmesh_contrib_INCLUDES" - libmesh_contrib_INCLUDES="-I\$(top_srcdir)/contrib/timpi/src/utilities/include $libmesh_contrib_INCLUDES" - # Including timpi_config.h - libmesh_contrib_INCLUDES="-I\$(top_builddir)/contrib/timpi/src/utilities/include $libmesh_contrib_INCLUDES" +# -------------------------------------------------------------- +# legacy include paths - disabled by default +# -------------------------------------------------------------- +# Check whether --enable-legacy-include-paths was given. +if test ${enable_legacy_include_paths+y} +then : + enableval=$enable_legacy_include_paths; enablelegacyincludepaths=$enableval else case e in #( - e) - as_fn_error $? "You must run \"git submodule update --init --recursive\" before configuring libmesh" "$LINENO" 5 - ;; + e) enablelegacyincludepaths=no ;; esac fi -# Note that even when optional packages are disabled we need to -# run their m4 macros to get proper AM_CONDITIONALs. Just be -# quiet about it... -if test "$enableoptional" != no + +if test "$enablelegacyincludepaths" != no then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ----- Configuring for optional packages -----" >&5 -printf "%s\n" "----- Configuring for optional packages -----" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 -printf "%s\n" "---------------------------------------------" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> WARNING: using a legacy option <<<" >&5 +printf "%s\n" ">>> WARNING: using a legacy option <<<" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring library to dump old header paths into include args <<<" >&5 +printf "%s\n" ">>> Configuring library to dump old header paths into include args <<<" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to require \`\`include \"libmesh/etc.h\"'' style >>>" >&5 +printf "%s\n" "<<< Configuring library to require \`\`include \"libmesh/etc.h\"'' style >>>" >&6; } ;; +esac fi +# -------------------------------------------------------------- # -------------------------------------------------------------- -# Allow user to specify --disable-strict-lgpl -# By default libmesh is built only with LGPL-compatible contrib -# libraries, but the user can pass --disable-strict-lgpl to configure -# to turn on Laspack, Triangle, and Space-filling curves library -# support. +# legacy "using namespace libMesh" - disabled by default # -------------------------------------------------------------- -# Check whether --enable-strict-lgpl was given. -if test ${enable_strict_lgpl+y} +# Check whether --enable-legacy-using-namespace was given. +if test ${enable_legacy_using_namespace+y} then : - enableval=$enable_strict_lgpl; case "${enableval}" in #( - yes) : - enablestrictlgpl=yes ;; #( - no) : - enablestrictlgpl=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-strict-lgpl" "$LINENO" 5 ;; -esac + enableval=$enable_legacy_using_namespace; enablelegacyusingnamespace=$enableval else case e in #( - e) enablestrictlgpl=yes ;; + e) enablelegacyusingnamespace=no ;; esac fi - -# -------------------------------------------------------------- -# Allow for disable-nested -# -------------------------------------------------------------- -# Check whether --enable-nested was given. -if test ${enable_nested+y} +if test "$enablelegacyusingnamespace" != no then : - enableval=$enable_nested; case "${enableval}" in #( - yes) : - enablenested=yes ;; #( - no) : - enablenested=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-nested" "$LINENO" 5 ;; -esac + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> WARNING: using a legacy option <<<" >&5 +printf "%s\n" ">>> WARNING: using a legacy option <<<" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Configuring library to dump names into global namespace <<<" >&5 +printf "%s\n" ">>> Configuring library to dump names into global namespace <<<" >&6; } + else case e in #( - e) enablenested=$enableoptional ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to keep names in libMesh namespace >>>" >&5 +printf "%s\n" "<<< Configuring library to keep names in libMesh namespace >>>" >&6; } + +printf "%s\n" "#define REQUIRE_SEPARATE_NAMESPACE 1" >>confdefs.h + + ;; esac fi +# -------------------------------------------------------------- -# -------------------------------------------------------------- -# XDR binary IO support - enabled by default -# This used to be tested in libmesh_core_features.m4 since your -# system either had it or it didn't. Now it's possible for the -# XDR headers to be in different places, so it's more convenient -# to test for it here. -# -------------------------------------------------------------- +# ------------------------------------------------------------- +# size of boundary_id_type -- default 2 bytes +# ------------------------------------------------------------- -# Check whether --enable-xdr-required was given. -if test ${enable_xdr_required+y} +# Check whether --with-boundary_id_bytes was given. +if test ${with_boundary_id_bytes+y} then : - enableval=$enable_xdr_required; case "${enableval}" in #( - yes) : - xdrrequired=yes ;; #( - no) : - xdrrequired=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-xdr-required" "$LINENO" 5 ;; -esac + withval=$with_boundary_id_bytes; boundary_bytes="$withval" else case e in #( - e) xdrrequired=no ;; + e) boundary_bytes=2 ;; esac fi +case "$boundary_bytes" in #( + 1) : -# Check whether --enable-xdr was given. -if test ${enable_xdr+y} +printf "%s\n" "#define BOUNDARY_ID_BYTES 1" >>confdefs.h + ;; #( + 2) : + +printf "%s\n" "#define BOUNDARY_ID_BYTES 2" >>confdefs.h + ;; #( + 4) : + +printf "%s\n" "#define BOUNDARY_ID_BYTES 4" >>confdefs.h + ;; #( + 8) : + +printf "%s\n" "#define BOUNDARY_ID_BYTES 8" >>confdefs.h + ;; #( + *) : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> unrecognized boundary_id size: $boundary_bytes - configuring size...2" >&5 +printf "%s\n" ">>> unrecognized boundary_id size: $boundary_bytes - configuring size...2" >&6; } + +printf "%s\n" "#define BOUNDARY_ID_BYTES 2" >>confdefs.h + + boundary_bytes=2 + ;; +esac + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of boundary_id... $boundary_bytes" >&5 +printf "%s\n" "configuring size of boundary_id... $boundary_bytes" >&6; } +# ------------------------------------------------------------- + + + +# ------------------------------------------------------------- +# size of dof_id_type -- default 4 bytes +# +# We delay AC_DEFINE(DOF_ID_BYTES, etc) until later so we can +# double-check PETSc compatibility first. +# ------------------------------------------------------------- + +# Check whether --with-dof_id_bytes was given. +if test ${with_dof_id_bytes+y} then : - enableval=$enable_xdr; enablexdr=$enableval + withval=$with_dof_id_bytes; dof_bytes="$withval" + dof_bytes_setting="explicit" else case e in #( - e) enablexdr=yes ;; + e) dof_bytes=4 + dof_bytes_setting="implicit" ;; esac fi -if test "x$enablexdr" != "xno" -then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested size of dof_id... $dof_bytes" >&5 +printf "%s\n" "requested size of dof_id... $dof_bytes" >&6; } +# ------------------------------------------------------------- - if test "x${TIRPC_DIR}" != "x" + +# ------------------------------------------------------------- +# size of processor_id_type -- default 4 bytes +# ------------------------------------------------------------- + +# Check whether --with-processor_id_bytes was given. +if test ${with_processor_id_bytes+y} then : - withxdrinc_default=${TIRPC_DIR} + withval=$with_processor_id_bytes; processor_bytes="$withval" else case e in #( - e) withxdrinc_default=no ;; + e) processor_bytes=4 ;; esac fi - # Support for --with-xdr-include configure option -# Check whether --with-xdr-include was given. -if test ${with_xdr_include+y} +case "$processor_bytes" in #( + 1) : + +printf "%s\n" "#define PROCESSOR_ID_BYTES 1" >>confdefs.h + ;; #( + 2) : + +printf "%s\n" "#define PROCESSOR_ID_BYTES 2" >>confdefs.h + ;; #( + 4) : + +printf "%s\n" "#define PROCESSOR_ID_BYTES 4" >>confdefs.h + ;; #( + 8) : + +printf "%s\n" "#define PROCESSOR_ID_BYTES 8" >>confdefs.h + ;; #( + *) : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> unrecognized processor_id size: $processor_bytes - configuring size...4" >&5 +printf "%s\n" ">>> unrecognized processor_id size: $processor_bytes - configuring size...4" >&6; } + +printf "%s\n" "#define PROCESSOR_ID_BYTES 4" >>confdefs.h + + processor_bytes=4 + ;; +esac + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of processor_id... $processor_bytes" >&5 +printf "%s\n" "configuring size of processor_id... $processor_bytes" >&6; } +# ------------------------------------------------------------- + + + +# ------------------------------------------------------------- +# size of subdomain_id_type -- default 2 bytes +# ------------------------------------------------------------- + +# Check whether --with-subdomain_id_bytes was given. +if test ${with_subdomain_id_bytes+y} then : - withval=$with_xdr_include; withxdrinc=$withval + withval=$with_subdomain_id_bytes; subdomain_bytes="$withval" else case e in #( - e) withxdrinc=$withxdrinc_default ;; + e) subdomain_bytes=2 ;; esac fi - # Support for --with-xdr-libdir configure option. If the user does - # not specify this option, we assume the desired RPC libraries are - # already in the user's linker path. +case "$subdomain_bytes" in #( + 1) : -# Check whether --with-xdr-libdir was given. -if test ${with_xdr_libdir+y} +printf "%s\n" "#define SUBDOMAIN_ID_BYTES 1" >>confdefs.h + ;; #( + 2) : + +printf "%s\n" "#define SUBDOMAIN_ID_BYTES 2" >>confdefs.h + ;; #( + 4) : + +printf "%s\n" "#define SUBDOMAIN_ID_BYTES 4" >>confdefs.h + ;; #( + 8) : + +printf "%s\n" "#define SUBDOMAIN_ID_BYTES 8" >>confdefs.h + ;; #( + *) : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> unrecognized subdomain_id size: $subdomain_bytes - configuring size...2" >&5 +printf "%s\n" ">>> unrecognized subdomain_id size: $subdomain_bytes - configuring size...2" >&6; } + +printf "%s\n" "#define SUBDOMAIN_ID_BYTES 2" >>confdefs.h + + subdomain_bytes=2 + ;; +esac + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of subdomain_id... $subdomain_bytes" >&5 +printf "%s\n" "configuring size of subdomain_id... $subdomain_bytes" >&6; } +# ------------------------------------------------------------- + + + +# ------------------------------------------------------------- +# Allow user to specify --enable-everything +# +# This flag will cause all (non-conflicting) options to be +# enabled for the purposes of configuration. For example, by +# performance logging is off by default, however +# --enable-everything will change it to be on by default. +# +# Note specific flags will override --enable-everything for +# that particular package, i.e. +# ./configure --enable-everything --disable-perflog +# +# ------------------------------------------------------------- +# Check whether --enable-everything was given. +if test ${enable_everything+y} then : - withval=$with_xdr_libdir; withxdrlibdir=$withval + enableval=$enable_everything; enableeverything=$enableval else case e in #( - e) withxdrlibdir=no ;; + e) enableeverything=no ;; esac fi - # Support for --with-xdr-libname configure option. If the user does - # not specify this option, we do check "tirpc" since that seems to - # be the most common way of linking "external" RPC libraries. -# Check whether --with-xdr-libname was given. -if test ${with_xdr_libname+y} + +# ------------------------------------------------------------- +# unique_id -- disable by default +# ------------------------------------------------------------- +# Check whether --enable-unique-id was given. +if test ${enable_unique_id+y} then : - withval=$with_xdr_libname; withxdrlibname=$withval + enableval=$enable_unique_id; case "${enableval}" in #( + yes) : + enableuniqueid=yes ;; #( + no) : + enableuniqueid=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-unique-id" "$LINENO" 5 ;; +esac else case e in #( - e) withxdrlibname=no ;; + e) enableuniqueid=$enableeverything ;; esac fi - XDRINCLUDES='' - XDRLINKLIBS='' - if test "x$withxdrlibname" != "xno" +if test "$enableuniqueid" = yes then : - XDRLINKLIBS="-l$withxdrlibname" - -fi - if test "x$withxdrlibdir" != "xno" -then : +printf "%s\n" "#define ENABLE_UNIQUE_ID 1" >>confdefs.h - if test "x$withxdrlibname" = "xno" -then : - as_fn_error $? "xdr-libdir was set to $withxdrlibdir, but no xdr-libname was set" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with unique id support >>>" >&5 +printf "%s\n" "<<< Configuring library with unique id support >>>" >&6; } fi - XDRLINKLIBS="${RPATHFLAG}$withxdrlibdir $XDRLINKLIBS" +# ------------------------------------------------------------- -fi - if test "x$withxdrinc" != "xno" -then : - XDRINCLUDES="-I$withxdrinc" +# ------------------------------------------------------------- +# size of unique_id_type -- default 8 bytes +# ------------------------------------------------------------- - if test "x$withxdrlibdir" != "xno" +# Check whether --with-unique_id_bytes was given. +if test ${with_unique_id_bytes+y} then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in $withxdrinc and $withxdrlibdir" >&5 -printf %s "checking for XDR support in $withxdrinc and $withxdrlibdir... " >&6; } + withval=$with_unique_id_bytes; unique_bytes="$withval" else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in $withxdrinc" >&5 -printf %s "checking for XDR support in $withxdrinc... " >&6; } ;; + e) unique_bytes=8 ;; esac fi - old_CPPFLAGS="$CPPFLAGS" - old_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $XDRINCLUDES" - LIBS="$LIBS $XDRLINKLIBS" +case "$unique_bytes" in #( + 1) : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include -int -main (void) -{ +printf "%s\n" "#define UNIQUE_ID_BYTES 1" >>confdefs.h + ;; #( + 2) : - XDR * xdr; - FILE * fp; - xdrstdio_create(xdr, fp, XDR_ENCODE); +printf "%s\n" "#define UNIQUE_ID_BYTES 2" >>confdefs.h + ;; #( + 4) : - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +printf "%s\n" "#define UNIQUE_ID_BYTES 4" >>confdefs.h + ;; #( + 8) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +printf "%s\n" "#define UNIQUE_ID_BYTES 8" >>confdefs.h + ;; #( + *) : -printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> unrecognized unique_id size: $unique_bytes - configuring size...8" >&5 +printf "%s\n" ">>> unrecognized unique_id size: $unique_bytes - configuring size...8" >&6; } - enablexdr=yes +printf "%s\n" "#define UNIQUE_ID_BYTES 8" >>confdefs.h -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - enablexdr=no - ;; + unique_bytes=8 + ;; esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$old_CPPFLAGS" - LIBS="$old_LIBS" +if test "$enableuniqueid" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of unique_id... $unique_bytes" >&5 +printf "%s\n" "configuring size of unique_id... $unique_bytes" >&6; } +fi +# ------------------------------------------------------------- - if test "x$withxdrlibname" = "xno" -then : - if test "x$withxdrlibdir" != "xno" +# -------------------------------------------------------------- +# Write stack trace output files on error() - disabled by default +# -------------------------------------------------------------- +# Check whether --enable-tracefiles was given. +if test ${enable_tracefiles+y} then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in $withxdrinc and $withxdrlibdir with -ltirpc" >&5 -printf %s "checking for XDR support in $withxdrinc and $withxdrlibdir with -ltirpc... " >&6; } + enableval=$enable_tracefiles; enabletracefiles=$enableval else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in $withxdrinc with -ltirpc" >&5 -printf %s "checking for XDR support in $withxdrinc with -ltirpc... " >&6; } ;; + e) enabletracefiles=$enableeverything ;; esac fi - XDRLINKLIBS="$XDRLINKLIBS -ltirpc" - - old_CPPFLAGS="$CPPFLAGS" - old_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $XDRINCLUDES" - LIBS="$LIBS $XDRLINKLIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include -int -main (void) -{ +if test "$enabletracefiles" != no +then : - XDR * xdr; - FILE * fp; - xdrstdio_create(xdr, fp, XDR_ENCODE); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +printf "%s\n" "#define ENABLE_TRACEFILES 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with stack trace file support >>>" >&5 +printf "%s\n" "<<< Configuring library with stack trace file support >>>" >&6; } -printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h +fi +# -------------------------------------------------------------- - enablexdr=yes +# ------------------------------------------------------------- +# AMR -- enabled by default +# ------------------------------------------------------------- +# Check whether --enable-amr was given. +if test ${enable_amr+y} +then : + enableval=$enable_amr; enableamr=$enableval else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - enablexdr=no - ;; + e) enableamr=yes ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$old_CPPFLAGS" - LIBS="$old_LIBS" + +if test "$enableamr" != no +then : +printf "%s\n" "#define ENABLE_AMR 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with AMR support >>>" >&5 +printf "%s\n" "<<< Configuring library with AMR support >>>" >&6; } + fi +# ------------------------------------------------------------- -else case e in #( - e) - if test "x$withxdrlibdir" != "xno" + +# ------------------------------------------------------------- +# Variational smoother -- enabled by default +# ------------------------------------------------------------- +# Check whether --enable-vsmoother was given. +if test ${enable_vsmoother+y} then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR library in $withxdrlibdir" >&5 -printf %s "checking for XDR library in $withxdrlibdir... " >&6; } + enableval=$enable_vsmoother; enablevsmoother=$enableval else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for built-in XDR support" >&5 -printf %s "checking for built-in XDR support... " >&6; } ;; + e) enablevsmoother=yes ;; esac fi - old_CPPFLAGS="$CPPFLAGS" - old_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $XDRINCLUDES" - LIBS="$LIBS $XDRLINKLIBS" +if test "$enablevsmoother" != no +then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include -int -main (void) -{ - XDR * xdr; - FILE * fp; - xdrstdio_create(xdr, fp, XDR_ENCODE); +printf "%s\n" "#define ENABLE_VSMOOTHER 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with variational smoother support >>>" >&5 +printf "%s\n" "<<< Configuring library with variational smoother support >>>" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +fi +# ------------------------------------------------------------- -printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h - enablexdr=yes +# ------------------------------------------------------------- +# Periodic BCs -- enabled by default +# ------------------------------------------------------------- +# Check whether --enable-periodic was given. +if test ${enable_periodic+y} +then : + enableval=$enable_periodic; enableperiodic=$enableval else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - enablexdr=no - ;; + e) enableperiodic=yes ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$old_CPPFLAGS" - LIBS="$old_LIBS" - - if test "x$enablexdr" = "xno" && test "x$withxdrlibname" = "xno" +if test "$enableperiodic" != no then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support via libtirpc" >&5 -printf %s "checking for XDR support via libtirpc... " >&6; } - XDRLINKLIBS="-ltirpc" - - - old_CPPFLAGS="$CPPFLAGS" - old_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $XDRINCLUDES" - LIBS="$LIBS $XDRLINKLIBS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include -int -main (void) -{ - XDR * xdr; - FILE * fp; - xdrstdio_create(xdr, fp, XDR_ENCODE); +printf "%s\n" "#define ENABLE_PERIODIC 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with periodic BC support >>>" >&5 +printf "%s\n" "<<< Configuring library with periodic BC support >>>" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +fi +# ------------------------------------------------------------- -printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h - enablexdr=yes +# ------------------------------------------------------------- +# Dirichlet BC constraints -- enabled by default +# ------------------------------------------------------------- +# Check whether --enable-dirichlet was given. +if test ${enable_dirichlet+y} +then : + enableval=$enable_dirichlet; enabledirichlet=$enableval else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - enablexdr=no - ;; + e) enabledirichlet=yes ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$old_CPPFLAGS" - LIBS="$old_LIBS" +if test "$enabledirichlet" != no +then : -fi - if test "x$enablexdr" = "xno" && test "x$withxdrlibdir" = "xno" -then : +printf "%s\n" "#define ENABLE_DIRICHLET 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in /usr/include/tirpc" >&5 -printf %s "checking for XDR support in /usr/include/tirpc... " >&6; } - XDRINCLUDES="-I/usr/include/tirpc" - XDRLINKLIBS="-ltirpc" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Dirichlet constraint support >>>" >&5 +printf "%s\n" "<<< Configuring library with Dirichlet constraint support >>>" >&6; } +fi +# ------------------------------------------------------------- - old_CPPFLAGS="$CPPFLAGS" - old_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $XDRINCLUDES" - LIBS="$LIBS $XDRLINKLIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include -int -main (void) -{ - XDR * xdr; - FILE * fp; - xdrstdio_create(xdr, fp, XDR_ENCODE); +# ------------------------------------------------------------- +# NodeConstraints -- disabled by default +# ------------------------------------------------------------- +# Check whether --enable-nodeconstraint was given. +if test ${enable_nodeconstraint+y} +then : + enableval=$enable_nodeconstraint; enablenodeconstraint=$enableval +else case e in #( + e) enablenodeconstraint=$enableeverything ;; +esac +fi - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" + +if test "$enablenodeconstraint" != no then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h +printf "%s\n" "#define ENABLE_NODE_CONSTRAINTS 1" >>confdefs.h - enablexdr=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with node constraints support >>>" >&5 +printf "%s\n" "<<< Configuring library with node constraints support >>>" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - enablexdr=no - ;; -esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext +# ------------------------------------------------------------- - CPPFLAGS="$old_CPPFLAGS" - LIBS="$old_LIBS" -fi - ;; +# ------------------------------------------------------------- +# Mesh == ParallelMesh -- disabled by default for max compatibility +# This flag is old/deprecated +# ------------------------------------------------------------- +# Check whether --enable-parmesh was given. +if test ${enable_parmesh+y} +then : + enableval=$enable_parmesh; enableparmesh=$enableval +else case e in #( + e) enableparmesh=no ;; esac fi - if test "x$enablexdr" = "xno" + +if test "$enabledistmesh" != no then : - XDRINCLUDES='' - XDRLINKLIBS='' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< --enable-parmesh is deprecated; use --enable-distmesh >>>" >&5 +printf "%s\n" "<<< --enable-parmesh is deprecated; use --enable-distmesh >>>" >&6; } fi +# ------------------------------------------------------------- - +# ------------------------------------------------------------- +# Mesh == DistributedMesh -- disabled by default for max +# compatibility, so DistributedMesh must be chosen manually +# ------------------------------------------------------------- +# Check whether --enable-distmesh was given. +if test ${enable_distmesh+y} +then : + enableval=$enable_distmesh; enabledistmesh=$enableval +else case e in #( + e) enabledistmesh=$enableparmesh ;; +esac fi -if test "x$enablexdr" != "xno" + +if test "$enabledistmesh" != no then : - libmesh_optional_INCLUDES="$XDRINCLUDES $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$XDRLINKLIBS $libmesh_optional_LIBS" + +printf "%s\n" "#define ENABLE_PARMESH 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Defaulting library to DistributedMesh >>>" >&5 +printf "%s\n" "<<< Defaulting library to DistributedMesh >>>" >&6; } fi +# ------------------------------------------------------------- +# -if test "x$enablexdr" = "xno" && test "x$xdrrequired" = "xyes" +# ------------------------------------------------------------- +# size of mapvector/chunked_mapvector nodes -- default 1 object +# ------------------------------------------------------------- + +# Check whether --with-mapvector_chunk_size was given. +if test ${with_mapvector_chunk_size+y} then : - as_fn_error 4 "*** XDR was not found, but --enable-xdr-required was specified." "$LINENO" 5 + withval=$with_mapvector_chunk_size; mapvector_chunk_size="$withval" +else case e in #( + e) mapvector_chunk_size=1 ;; +esac fi -# ------------------------------------------------------------- + + +printf "%s\n" "#define MAPVECTOR_CHUNK_SIZE $mapvector_chunk_size" >>confdefs.h + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: configuring size of mapvector chunks: $mapvector_chunk_size" >&5 +printf "%s\n" "configuring size of mapvector chunks: $mapvector_chunk_size" >&6; } + # ------------------------------------------------------------- -# Boost -- enabled by default +# Ghosted instead of Serial local vectors -- enabled by default # ------------------------------------------------------------- - - # Check whether --enable-boost was given. -if test ${enable_boost+y} +# Check whether --enable-ghosted was given. +if test ${enable_ghosted+y} then : - enableval=$enable_boost; case "${enableval}" in #( - yes) : - enableboost=yes ;; #( - no) : - enableboost=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-boost" "$LINENO" 5 ;; -esac + enableval=$enable_ghosted; enableghosted=$enableval else case e in #( - e) enableboost=$enableoptional ;; + e) enableghosted=yes ;; esac fi - BOOST_INCLUDE="" - if test "x$enableboost" != "xno" +if test "$enableghosted" != no then : - external_boost_found=yes - if test "x" != "x"; then - want_boost="yes" - ac_boost_path="" - else +printf "%s\n" "#define ENABLE_GHOSTED 1" >>confdefs.h -# Check whether --with-boost was given. -if test ${with_boost+y} -then : - withval=$with_boost; - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to use ghosted local vectors >>>" >&5 +printf "%s\n" "<<< Configuring library to use ghosted local vectors >>>" >&6; } -else case e in #( - e) want_boost="yes" ;; -esac fi +# ------------------------------------------------------------- - -# Check whether --with-boost-libdir was given. -if test ${with_boost_libdir+y} +# ------------------------------------------------------------- +# Store node valence for use with subdivision surface finite +# elements -- enabled by default +# ------------------------------------------------------------- +# Check whether --enable-node-valence was given. +if test ${enable_node_valence+y} then : - withval=$with_boost_libdir; - if test -d "$withval" - then - ac_boost_lib_path="$withval" - else - as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5 - fi - + enableval=$enable_node_valence; enablenodevalence=$enableval else case e in #( - e) ac_boost_lib_path="" ;; + e) enablenodevalence=yes ;; esac fi - fi +if test "$enablenodevalence" != no +then : -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=1.57.0 - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for boostlib >= $boost_lib_version_req" >&5 -printf %s "checking for boostlib >= $boost_lib_version_req... " >&6; } - succeeded=no - libsubdirs="lib" - ax_arch=`uname -m` - if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then - libsubdirs="lib64 lib lib64" - fi +printf "%s\n" "#define ENABLE_NODE_VALENCE 1" >>confdefs.h - if test "$ac_boost_path" != ""; then - BOOST_CPPFLAGS="-I$ac_boost_path/include" - for ac_boost_path_tmp in $libsubdirs; do - if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then - BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" - break - fi - done - elif test "$cross_compiling" != yes; then - for ac_boost_path_tmp in $BOOST_ROOT $BOOST_DIR /usr /usr/local /opt /opt/local ; do - if ls -d "$ac_boost_path_tmp"/include/boost*/boost/ >/dev/null 2>&1 || - ls -d "$ac_boost_path_tmp"/include/boost/ >/dev/null 2>&1; then - for libsubdir in $libsubdirs ; do - if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" - ac_boost_include_dir_tmp=`ls -d "$ac_boost_path_tmp"/include{/boost*,}/boost/shared_ptr.hpp 2>/dev/null | sed 's#boost/shared_ptr.hpp##'` - BOOST_CPPFLAGS="-I$ac_boost_include_dir_tmp" - break; - fi - done - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library to store node valence >>>" >&5 +printf "%s\n" "<<< Configuring library to store node valence >>>" >&6; } - if test "$ac_boost_lib_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_lib_path" - fi +fi +# ------------------------------------------------------------- - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS +# ------------------------------------------------------------- +# 1D or 1D/2D only -- disabled by default +# ------------------------------------------------------------- +# Check whether --enable-1D-only was given. +if test ${enable_1D_only+y} +then : + enableval=$enable_1D_only; enable1D=$enableval +else case e in #( + e) enable1D=no ;; +esac +fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# Check whether --enable-2D-only was given. +if test ${enable_2D_only+y} +then : + enableval=$enable_2D_only; enable2D=$enableval +else case e in #( + e) enable2D=no ;; +esac +fi - #include -int -main (void) -{ +if test "$enable2D" != no +then : - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif +printf "%s\n" "#define DIM 2" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library for 1D/2D meshes only >>>" >&5 +printf "%s\n" "<<< Configuring library for 1D/2D meshes only >>>" >&6; } +elif test "$enable1D" != no then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - succeeded=yes - found_system=yes +printf "%s\n" "#define DIM 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library for 1D meshes only >>>" >&5 +printf "%s\n" "<<< Configuring library for 1D meshes only >>>" >&6; } +else case e in #( + e) +printf "%s\n" "#define DIM 3" >>confdefs.h + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - +# ------------------------------------------------------------- - if test "x$succeeded" != "xyes"; then - _version=0 - if test "$ac_boost_path" != ""; then - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - fi - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" - done - fi - else - if test "$cross_compiling" != yes; then - for ac_boost_path in /usr /usr/local /opt /opt/local ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - if test "$ac_boost_lib_path" = ""; then - for libsubdir in $libsubdirs ; do - if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - BOOST_LDFLAGS="-L$best_path/$libsubdir" - fi - fi - if test "x$BOOST_ROOT" != "x"; then - for libsubdir in $libsubdirs ; do - if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then - version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` - stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` - stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'` - V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: We will use a staged boost library from $BOOST_ROOT" >&5 -printf "%s\n" "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;} - BOOST_CPPFLAGS="-I$BOOST_ROOT" - BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" - fi - fi - fi - fi +# ------------------------------------------------------------- +# higher order shapes -- enabled by default +# ------------------------------------------------------------- +# Check whether --enable-pfem was given. +if test ${enable_pfem+y} +then : + enableval=$enable_pfem; enablepfem=$enableval +else case e in #( + e) enablepfem=yes ;; +esac +fi - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test "$enablepfem" != no +then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include +printf "%s\n" "#define ENABLE_HIGHER_ORDER_SHAPES 1" >>confdefs.h -int -main (void) -{ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with higher order p-FEM shapes >>>" >&5 +printf "%s\n" "<<< Configuring library with higher order p-FEM shapes >>>" >&6; } - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif +fi +# ------------------------------------------------------------- - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - succeeded=yes - found_system=yes +# ------------------------------------------------------------- +# Infinite Elements -- disabled by default +# ------------------------------------------------------------- +# Check whether --enable-ifem was given. +if test ${enable_ifem+y} +then : + enableval=$enable_ifem; enableifem=$enableval +else case e in #( + e) enableifem=$enableeverything ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - fi - if test "$succeeded" != "yes" ; then - if test "$_version" = "0" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&5 -printf "%s\n" "$as_me: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&6;} - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5 -printf "%s\n" "$as_me: Your boost libraries seems to old (version $_version)." >&6;} - fi - # execute ACTION-IF-NOT-FOUND (if present): - external_boost_found=no - else +if test "$enableifem" != no +then : +printf "%s\n" "#define ENABLE_INFINITE_ELEMENTS 1" >>confdefs.h -printf "%s\n" "#define HAVE_BOOST 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with infinite elements >>>" >&5 +printf "%s\n" "<<< Configuring library with infinite elements >>>" >&6; } - # execute ACTION-IF-FOUND (if present): - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using external boost installation >>>" >&5 -printf "%s\n" "<<< Using external boost installation >>>" >&6; } - fi +fi - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" + if test x$enableifem != no ; then + LIBMESH_ENABLE_INFINITE_ELEMENTS_TRUE= + LIBMESH_ENABLE_INFINITE_ELEMENTS_FALSE='#' +else + LIBMESH_ENABLE_INFINITE_ELEMENTS_TRUE='#' + LIBMESH_ENABLE_INFINITE_ELEMENTS_FALSE= fi +# ------------------------------------------------------------- - if test "x$external_boost_found" = "xyes" -then : -printf "%s\n" "#define HAVE_EXTERNAL_BOOST 1" >>confdefs.h +# ------------------------------------------------------------- +# Second Derivative Calculations -- disabled by default +# ------------------------------------------------------------- +# Check whether --enable-second was given. +if test ${enable_second+y} +then : + enableval=$enable_second; enablesecond=$enableval else case e in #( - e) enableboost=no ;; + e) enablesecond=yes ;; esac -fi - fi - if test "x$enableboost" = "xyes" +if test "$enablesecond" != no then : - libmesh_optional_INCLUDES="$BOOST_CPPFLAGS $libmesh_optional_INCLUDES" - export timpi_CPPFLAGS="$timpi_CPPFLAGS $BOOST_CPPFLAGS" -fi +printf "%s\n" "#define ENABLE_SECOND_DERIVATIVES 1" >>confdefs.h -# -------------------------------------------------------------- + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with second derivatives >>>" >&5 +printf "%s\n" "<<< Configuring library with second derivatives >>>" >&6; } +fi # ------------------------------------------------------------- -# MPI -- enabled by default -# ------------------------------------------------------------- -if test "x$enablempi" = xyes -then : - - -if test x"$MPI_USING_WRAPPERS" = x1 +# ------------------------------------------------------------- +# complex numbers -- disabled by default +# ------------------------------------------------------------- +# Check whether --enable-complex was given. +if test ${enable_complex+y} then : + enableval=$enable_complex; case "${enableval}" in #( + yes) : + enablecomplex=yes ;; #( + no) : + enablecomplex=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-complex" "$LINENO" 5 ;; +esac +else case e in #( + e) enablecomplex=no ;; +esac +fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -int np; MPI_Comm_size (MPI_COMM_WORLD, &np); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" +if test "$enablecomplex" != no then : - enablempi=yes - MPI_IMPL="mpi-wrapper-built-in" -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define USE_COMPLEX_NUMBERS 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with complex number support >>>" >&5 +printf "%s\n" "<<< Configuring library with complex number support >>>" >&6; } else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: MPI wrapper $CXX cannot compile an MPI program. Disabling MPI..." >&5 -printf "%s\n" "MPI wrapper $CXX cannot compile an MPI program. Disabling MPI..." >&6; } - enablempi=no - ;; + +printf "%s\n" "#define USE_REAL_NUMBERS 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with real number support >>>" >&5 +printf "%s\n" "<<< Configuring library with real number support >>>" >&6; } + ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test x$enablecomplex = xyes; then + LIBMESH_ENABLE_COMPLEX_TRUE= + LIBMESH_ENABLE_COMPLEX_FALSE='#' +else + LIBMESH_ENABLE_COMPLEX_TRUE='#' + LIBMESH_ENABLE_COMPLEX_FALSE= +fi -elif test -n "$MPI_LIBS_PATH" -a -n "$MPI_INCLUDES_PATH" -then : +# ------------------------------------------------------------- - printf "%s\n" "note: Checking $MPI_LIBS_PATH and $MPI_INCLUDES_PATH for MPI" - MPI_LIBS_TO_TEST="" - if test -e $MPI_LIBS_PATH/libmpi.a -then : - MPI_LIBS_TO_TEST="$MPI_LIBS_PATH/libmpi.a $MPI_LIBS_TO_TEST" -fi - if test -e $MPI_LIBS_PATH/libmpi.so -then : - MPI_LIBS_TO_TEST="$MPI_LIBS_PATH/libmpi.so $MPI_LIBS_TO_TEST" -fi - if test -e $MPI_LIBS_PATH/libmpi.dylib + +# ------------------------------------------------------------- +# Reference Counting -- enabled by default +# ------------------------------------------------------------- +# Check whether --enable-reference-counting was given. +if test ${enable_reference_counting+y} then : - MPI_LIBS_TO_TEST="$MPI_LIBS_PATH/libmpi.dylib $MPI_LIBS_TO_TEST" + enableval=$enable_reference_counting; enablerefct=$enableval +else case e in #( + e) enablerefct=yes ;; +esac fi - if test x"$MPI_LIBS_TO_TEST" != x +if test "x$enablerefct" != "xno" && test "x$ac_cv_cxx_rtti" = "xyes" then : - printf "%s\n" "note: testing $MPI_LIBS_PATH/libmpi(.a/.so/.dylib)" - tmpLIBS=$LIBS +printf "%s\n" "#define ENABLE_REFERENCE_COUNTING 1" >>confdefs.h - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with reference counting support >>>" >&5 +printf "%s\n" "<<< Configuring library with reference counting support >>>" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< No RTTI: disabling reference counting support >>>" >&5 +printf "%s\n" "<<< No RTTI: disabling reference counting support >>>" >&6; } ;; +esac +fi +# ------------------------------------------------------------- - LIBS="-L$MPI_LIBS_PATH $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lam_show_version in -llam" >&5 -printf %s "checking for lam_show_version in -llam... " >&6; } -if test ${ac_cv_lib_lam_lam_show_version+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-llam $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -namespace conftest { - extern "C" int lam_show_version (); -} -int -main (void) -{ -return conftest::lam_show_version (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" +# ------------------------------------------------------------- +# Performance Logging -- disabled by default +# ------------------------------------------------------------- +# Check whether --enable-perflog was given. +if test ${enable_perflog+y} then : - ac_cv_lib_lam_lam_show_version=yes + enableval=$enable_perflog; enableperflog=$enableval else case e in #( - e) ac_cv_lib_lam_lam_show_version=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + e) enableperflog=$enableeverything ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lam_lam_show_version" >&5 -printf "%s\n" "$ac_cv_lib_lam_lam_show_version" >&6; } -if test "x$ac_cv_lib_lam_lam_show_version" = xyes + + +if test "$enableperflog" != no then : - LIBS="-llam $LIBS" - MPI_LIBS="-llam $MPI_LIBS" + +printf "%s\n" "#define ENABLE_PERFORMANCE_LOGGING 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with performance logging support >>>" >&5 +printf "%s\n" "<<< Configuring library with performance logging support >>>" >&6; } fi +# ------------------------------------------------------------ - for lib in $MPI_LIBS_TO_TEST - do - if (nm $lib | grep elan > /dev/null); then - printf "%s\n" "note: MPI found to use Quadrics switch, looking for elan library" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for elan_init in -lelan" >&5 -printf %s "checking for elan_init in -lelan... " >&6; } -if test ${ac_cv_lib_elan_elan_init+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lelan $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -namespace conftest { - extern "C" int elan_init (); -} -int -main (void) -{ -return conftest::elan_init (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" +# ------------------------------------------------------------- +# Examples - enabled by default +# ------------------------------------------------------------- +# Check whether --enable-examples was given. +if test ${enable_examples+y} then : - ac_cv_lib_elan_elan_init=yes + enableval=$enable_examples; case "${enableval}" in #( + yes) : + enableexamples=yes ;; #( + no) : + enableexamples=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-examples" "$LINENO" 5 ;; +esac else case e in #( - e) ac_cv_lib_elan_elan_init=no ;; + e) enableexamples=yes ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac + + +if test "$enableexamples" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library example suite support >>>" >&5 +printf "%s\n" "<<< Configuring library example suite support >>>" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elan_elan_init" >&5 -printf "%s\n" "$ac_cv_lib_elan_elan_init" >&6; } -if test "x$ac_cv_lib_elan_elan_init" = xyes + if test x$enableexamples = xyes; then + LIBMESH_ENABLE_EXAMPLES_TRUE= + LIBMESH_ENABLE_EXAMPLES_FALSE='#' +else + LIBMESH_ENABLE_EXAMPLES_TRUE='#' + LIBMESH_ENABLE_EXAMPLES_FALSE= +fi + +# ------------------------------------------------------------ + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -- Done configuring core library features ---" >&5 +printf "%s\n" "-- Done configuring core library features ---" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } + + + +# -------------------------------------------------------------- +# configure TIMPI, which is practically libMesh core +# +# Use AX_SUBDIRS_CONFIGURE here so we get timpi_config.h before +# contrib/metaphysicl might need it later. +# -------------------------------------------------------------- + + + + + # Various preliminary checks. + + + + + + ax_dir="contrib/timpi" + + # Do not complain, so a configure script can configure whichever parts of a + # large source tree are present. + if test -d "$srcdir/$ax_dir"; then + ac_builddir=. + +case "$ax_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`printf "%s\n" "$ax_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + # Remove --cache-file, --srcdir, and --disable-option-checking arguments + # so they do not pile up. + ax_args= + ax_prev= + eval "set x $ac_configure_args" + shift + for ax_arg; do + if test -n "$ax_prev"; then + ax_prev= + continue + fi + case $ax_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi | --cache-f \ + | --cache- | --cache | --cach | --cac | --ca | --c) + ax_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ax_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ax_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* \ + | --p=*) + ;; + --disable-option-checking) + ;; + *) case $ax_arg in + *\'*) ax_arg=$(printf "%s\n" "$ax_arg" | sed "s/'/'\\\\\\\\''/g");; + esac + as_fn_append ax_args " '$ax_arg'" ;; + esac + done + # Always prepend --disable-option-checking to silence warnings, since + # different subdirs can have different --enable and --with options. + ax_args="--disable-option-checking $ax_args" + # Options that must be added as they are provided. + + # New options that may need to be merged with existing options. + + # New options that must replace existing options. + + # Options that must be removed. + + as_fn_append ax_args " '--srcdir=$ac_srcdir'" + + # Add the subdirectory to the list of target subdirectories. + ax_subconfigures="$ax_subconfigures $ax_dir" + # Save the argument list for this subdirectory. + ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_") + eval "ax_sub_configure_args_$ax_var=\"$ax_args\"" + eval "ax_sub_configure_$ax_var=\"yes\"" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find source tree for $ax_dir" >&5 +printf "%s\n" "$as_me: WARNING: could not find source tree for $ax_dir" >&2;} + fi + + + + + + +# -------------------------------------------------------------- +# configure optional, external packages and libraries +# -------------------------------------------------------------- + + + + + +# initialize these empty - append below +# note that +# libmesh_optional_INCLUDES and +# libmesh_optional_LIBS should point to third party packages +# outside the libMesh source and installation tree, and will +# be exported to the installation environment. +# +# By contrast, libmesh_contrib_INCLUDES and libmesh_contrib_LDFLAGS +# point inside the source tree for building contributed packages that +# do not need to be exported as part of the installation environment. +# +# 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_contrib_LDFLAGS="" +libmesh_pkgconfig_requires="" +libmesh_installed_LIBS="" + +# -------------------------------------------------------------- +# TIMPI is required - so we should be able to see our TIMPI submodule. +# If our version of TIMPI doesn't have AM MAINTAINER MODE set, then we +# need its autoconf submodule initialized too. +# -------------------------------------------------------------- +if test -r $top_srcdir/contrib/timpi/README && + (test -r $top_srcdir/contrib/timpi/m4/autoconf-submodule/acsm_mpi.m4 || + grep "^AM""_MAINTAINER_MODE" $top_srcdir/contrib/timpi/configure.ac >/dev/null) then : - LIBS="-lelan $LIBS" - MPI_LIBS="-lelan $MPI_LIBS" + libmesh_contrib_INCLUDES="-I\$(top_srcdir)/contrib/timpi/src/algorithms/include $libmesh_contrib_INCLUDES" + libmesh_contrib_INCLUDES="-I\$(top_srcdir)/contrib/timpi/src/parallel/include $libmesh_contrib_INCLUDES" + libmesh_contrib_INCLUDES="-I\$(top_srcdir)/contrib/timpi/src/utilities/include $libmesh_contrib_INCLUDES" + # Including timpi_config.h + libmesh_contrib_INCLUDES="-I\$(top_builddir)/contrib/timpi/src/utilities/include $libmesh_contrib_INCLUDES" else case e in #( - e) as_fn_error $? "Could not find elan library... exiting" "$LINENO" 5 ;; + e) + as_fn_error $? "You must run \"git submodule update --init --recursive\" before configuring libmesh" "$LINENO" 5 + ;; esac fi - break - fi - done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 -printf %s "checking for MPI_Init in -lmpi... " >&6; } -if test ${ac_cv_lib_mpi_MPI_Init+y} +# Note that even when optional packages are disabled we need to +# run their m4 macros to get proper AM_CONDITIONALs. Just be +# quiet about it... +if test "$enableoptional" != no then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpi $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -namespace conftest { - extern "C" int MPI_Init (); -} -int -main (void) -{ -return conftest::MPI_Init (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ----- Configuring for optional packages -----" >&5 +printf "%s\n" "----- Configuring for optional packages -----" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ---------------------------------------------" >&5 +printf "%s\n" "---------------------------------------------" >&6; } + +fi + + +# -------------------------------------------------------------- +# Allow user to specify --disable-strict-lgpl +# By default libmesh is built only with LGPL-compatible contrib +# libraries, but the user can pass --disable-strict-lgpl to configure +# to turn on Laspack, Triangle, and Space-filling curves library +# support. +# -------------------------------------------------------------- +# Check whether --enable-strict-lgpl was given. +if test ${enable_strict_lgpl+y} then : - ac_cv_lib_mpi_MPI_Init=yes -else case e in #( - e) ac_cv_lib_mpi_MPI_Init=no ;; + enableval=$enable_strict_lgpl; case "${enableval}" in #( + yes) : + enablestrictlgpl=yes ;; #( + no) : + enablestrictlgpl=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-strict-lgpl" "$LINENO" 5 ;; esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; +else case e in #( + e) enablestrictlgpl=yes ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 -printf "%s\n" "$ac_cv_lib_mpi_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpi_MPI_Init" = xyes -then : - MPI_LIBS="-lmpi $MPI_LIBS" - MPI_LDFLAGS="-L$MPI_LIBS_PATH" - MPI_IMPL="mpi" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found valid MPI installation..." >&5 -printf "%s\n" "Found valid MPI installation..." >&6; } + +# -------------------------------------------------------------- +# Allow for disable-nested +# -------------------------------------------------------------- +# Check whether --enable-nested was given. +if test ${enable_nested+y} +then : + enableval=$enable_nested; case "${enableval}" in #( + yes) : + enablenested=yes ;; #( + no) : + enablenested=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-nested" "$LINENO" 5 ;; +esac else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not link in the MPI library..." >&5 -printf "%s\n" "Could not link in the MPI library..." >&6; }; enablempi=no ;; + e) enablenested=$enableoptional ;; esac fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - LIBS=$tmpLIBS +# -------------------------------------------------------------- +# XDR binary IO support - enabled by default +# This used to be tested in libmesh_core_features.m4 since your +# system either had it or it didn't. Now it's possible for the +# XDR headers to be in different places, so it's more convenient +# to test for it here. +# -------------------------------------------------------------- +# Check whether --enable-xdr-required was given. +if test ${enable_xdr_required+y} +then : + enableval=$enable_xdr_required; case "${enableval}" in #( + yes) : + xdrrequired=yes ;; #( + no) : + xdrrequired=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-xdr-required" "$LINENO" 5 ;; +esac else case e in #( - e) - printf "%s\n" "note: Could not find $MPI_LIBS_PATH/libmpi(.a/.so/.dylib)" - ;; + e) xdrrequired=no ;; esac fi - if test x"$MPI_IMPL" = x -then : - - if test -e $MPI_LIBS_PATH/libmpich.a || test -e $MPI_LIBS_PATH/libmpich.so -then : - printf "%s\n" "note: using $MPI_LIBS_PATH/libmpich(.a/.so)" - tmpLIBS=$LIBS +# Check whether --enable-xdr was given. +if test ${enable_xdr+y} +then : + enableval=$enable_xdr; enablexdr=$enableval +else case e in #( + e) enablexdr=yes ;; +esac +fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - LIBS="-L$MPI_LIBS_PATH $LIBS" +if test "x$enablexdr" != "xno" +then : - if (nm $MPI_LIBS_PATH/libmpich.* | grep gm_open > /dev/null); then - printf "%s\n" "note: MPICH found to use Myricomm's Myrinet, looking for gm library" - if test "x$GMHOME" = "x" + if test "x${TIRPC_DIR}" != "x" then : - GMHOME="/usr" + withxdrinc_default=${TIRPC_DIR} +else case e in #( + e) withxdrinc_default=no ;; +esac fi -# Check whether --with-gm was given. -if test ${with_gm+y} + # Support for --with-xdr-include configure option + +# Check whether --with-xdr-include was given. +if test ${with_xdr_include+y} then : - withval=$with_gm; GM="$withval" + withval=$with_xdr_include; withxdrinc=$withval else case e in #( - e) - printf "%s\n" "note: GM library path not given... trying prefix=$MPIHOME" - GM=$GMHOME - ;; + e) withxdrinc=$withxdrinc_default ;; esac fi - LIBS="-L$GM/lib $LIBS" - MPI_LIBS="-L$GM/lib $MPI_LIBS" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gm_open in -lgm" >&5 -printf %s "checking for gm_open in -lgm... " >&6; } -if test ${ac_cv_lib_gm_gm_open+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lgm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + # Support for --with-xdr-libdir configure option. If the user does + # not specify this option, we assume the desired RPC libraries are + # already in the user's linker path. -namespace conftest { - extern "C" int gm_open (); -} -int -main (void) -{ -return conftest::gm_open (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" +# Check whether --with-xdr-libdir was given. +if test ${with_xdr_libdir+y} then : - ac_cv_lib_gm_gm_open=yes + withval=$with_xdr_libdir; withxdrlibdir=$withval else case e in #( - e) ac_cv_lib_gm_gm_open=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + e) withxdrlibdir=no ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gm_gm_open" >&5 -printf "%s\n" "$ac_cv_lib_gm_gm_open" >&6; } -if test "x$ac_cv_lib_gm_gm_open" = xyes -then : - LIBS="$LIBS -lgm" - MPI_LIBS="$MPI_LIBS -lgm" + # Support for --with-xdr-libname configure option. If the user does + # not specify this option, we do check "tirpc" since that seems to + # be the most common way of linking "external" RPC libraries. + +# Check whether --with-xdr-libname was given. +if test ${with_xdr_libname+y} +then : + withval=$with_xdr_libname; withxdrlibname=$withval else case e in #( - e) as_fn_error $? "Could not find gm library... exiting" "$LINENO" 5 ;; + e) withxdrlibname=no ;; esac fi - fi - if test -e $MPI_LIBS_PATH/libmpl.a || test -e $MPI_LIBS_PATH/libmpl.so + XDRINCLUDES='' + XDRLINKLIBS='' + if test "x$withxdrlibname" != "xno" then : - LIBS="-L$MPI_LIBS_PATH -lmpl $tmpLIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 -printf %s "checking for MPI_Init in -lmpich... " >&6; } -if test ${ac_cv_lib_mpich_MPI_Init+y} + XDRLINKLIBS="-l$withxdrlibname" + +fi + + if test "x$withxdrlibdir" != "xno" then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpich $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -namespace conftest { - extern "C" int MPI_Init (); -} -int -main (void) -{ -return conftest::MPI_Init (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" + if test "x$withxdrlibname" = "xno" then : - ac_cv_lib_mpich_MPI_Init=yes -else case e in #( - e) ac_cv_lib_mpich_MPI_Init=no ;; -esac + as_fn_error $? "xdr-libdir was set to $withxdrlibdir, but no xdr-libname was set" "$LINENO" 5 + fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac + XDRLINKLIBS="${RPATHFLAG}$withxdrlibdir $XDRLINKLIBS" + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 -printf "%s\n" "$ac_cv_lib_mpich_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpich_MPI_Init" = xyes + + if test "x$withxdrinc" != "xno" then : - MPI_LIBS="-lmpich -lmpl $MPI_LIBS" - MPI_LDFLAGS="-L$MPI_LIBS_PATH" - MPI_IMPL="mpich" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found valid MPICH installation with libmpl..." >&5 -printf "%s\n" "Found valid MPICH installation with libmpl..." >&6; } + XDRINCLUDES="-I$withxdrinc" + if test "x$withxdrlibdir" != "xno" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in $withxdrinc and $withxdrlibdir" >&5 +printf %s "checking for XDR support in $withxdrinc and $withxdrlibdir... " >&6; } else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not link in the MPI library..." >&5 -printf "%s\n" "Could not link in the MPI library..." >&6; }; enablempi=no ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in $withxdrinc" >&5 +printf %s "checking for XDR support in $withxdrinc... " >&6; } ;; esac fi -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 -printf %s "checking for MPI_Init in -lmpich... " >&6; } -if test ${ac_cv_lib_mpich_MPI_Init+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpich $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + old_CPPFLAGS="$CPPFLAGS" + old_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $XDRINCLUDES" + LIBS="$LIBS $XDRLINKLIBS" -namespace conftest { - extern "C" int MPI_Init (); -} + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include int main (void) { -return conftest::MPI_Init (); + + XDR * xdr; + FILE * fp; + xdrstdio_create(xdr, fp, XDR_ENCODE); + ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : - ac_cv_lib_mpich_MPI_Init=yes -else case e in #( - e) ac_cv_lib_mpich_MPI_Init=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 -printf "%s\n" "$ac_cv_lib_mpich_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpich_MPI_Init" = xyes -then : - - MPI_LIBS="-lmpich $MPI_LIBS" - MPI_LDFLAGS="-L$MPI_LIBS_PATH" - MPI_IMPL="mpich" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found valid MPICH installation..." >&5 -printf "%s\n" "Found valid MPICH installation..." >&6; } - -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not link in the MPI library..." >&5 -printf "%s\n" "Could not link in the MPI library..." >&6; }; enablempi=no ;; -esac -fi - ;; -esac -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h - LIBS=$tmpLIBS + enablexdr=yes +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + enablexdr=no + ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext -fi + CPPFLAGS="$old_CPPFLAGS" + LIBS="$old_LIBS" - if test "x$MPI_IMPL" != x -then : - if test -e $MPI_INCLUDES_PATH/mpi.h + if test "x$withxdrlibname" = "xno" then : - printf "%s\n" "note: using $MPI_INCLUDES_PATH/mpi.h" - tmpCPPFLAGS=$CPPFLAGS - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - CPPFLAGS="-I$MPI_INCLUDES_PATH $CPPFLAGS" - ac_fn_cxx_check_header_compile "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default" -if test "x$ac_cv_header_mpi_h" = xyes + if test "x$withxdrlibdir" != "xno" then : - - -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h - - enablempi=yes - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in $withxdrinc and $withxdrlibdir with -ltirpc" >&5 +printf %s "checking for XDR support in $withxdrinc and $withxdrlibdir with -ltirpc... " >&6; } else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not compile in the MPI headers..." >&5 -printf "%s\n" "Could not compile in the MPI headers..." >&6; }; enablempi=no ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in $withxdrinc with -ltirpc" >&5 +printf %s "checking for XDR support in $withxdrinc with -ltirpc... " >&6; } ;; esac fi + XDRLINKLIBS="$XDRLINKLIBS -ltirpc" - MPI_INCLUDES="-I$MPI_INCLUDES_PATH" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - CPPFLAGS=$tmpCPPFLAGS -elif test -e $MPI_INCLUDES_PATH/mpi/mpi.h -then : + old_CPPFLAGS="$CPPFLAGS" + old_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $XDRINCLUDES" + LIBS="$LIBS $XDRLINKLIBS" - MPI_INCLUDES_PATH=$MPI_INCLUDES_PATH/mpi - printf "%s\n" "note: using $MPI_INCLUDES_PATH/mpi.h" - tmpCPPFLAGS=$CPPFLAGS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include +int +main (void) +{ - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + XDR * xdr; + FILE * fp; + xdrstdio_create(xdr, fp, XDR_ENCODE); - CPPFLAGS="-I$MPI_INCLUDES_PATH $CPPFLAGS" - ac_fn_cxx_check_header_compile "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default" -if test "x$ac_cv_header_mpi_h" = xyes + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h - enablempi=yes + enablexdr=yes else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not compile in the MPI headers..." >&5 -printf "%s\n" "Could not compile in the MPI headers..." >&6; }; enablempi=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + enablexdr=no + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext - MPI_INCLUDES="-I$MPI_INCLUDES_PATH" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + CPPFLAGS="$old_CPPFLAGS" + LIBS="$old_LIBS" - CPPFLAGS=$tmpCPPFLAGS + +fi else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not find MPI header ..." >&5 -printf "%s\n" "Could not find MPI header ..." >&6; } - enablempi=no - ;; + + if test "x$withxdrlibdir" != "xno" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR library in $withxdrlibdir" >&5 +printf %s "checking for XDR library in $withxdrlibdir... " >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for built-in XDR support" >&5 +printf %s "checking for built-in XDR support... " >&6; } ;; esac fi -else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + old_CPPFLAGS="$CPPFLAGS" + old_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $XDRINCLUDES" + LIBS="$LIBS $XDRLINKLIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + #include + #include int main (void) { -int np; MPI_Comm_size (MPI_COMM_WORLD, &np); + + XDR * xdr; + FILE * fp; + xdrstdio_create(xdr, fp, XDR_ENCODE); + ; return 0; } @@ -63905,51 +63957,54 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO" then : - MPI_IMPL="CXX-built-in" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX Compiler Supports MPI " >&5 -printf "%s\n" "$CXX Compiler Supports MPI " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h - enablempi=yes + enablexdr=yes else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX Compiler Does NOT Support MPI..." >&5 -printf "%s\n" "$CXX Compiler Does NOT Support MPI..." >&6; }; enablempi=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + enablexdr=no + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ;; -esac -fi + CPPFLAGS="$old_CPPFLAGS" + LIBS="$old_LIBS" -elif test x"$PETSC_HAVE_MPI" = x1 + + if test "x$enablexdr" = "xno" && test "x$withxdrlibname" = "xno" then : - tmpCPPFLAGS=$CPPFLAGS - tmpLIBS=$LIBS - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support via libtirpc" >&5 +printf %s "checking for XDR support via libtirpc... " >&6; } + XDRLINKLIBS="-ltirpc" - LIBS="$PETSC_MPI_LINK_LIBS $LIBS" - CPPFLAGS="$PETSC_MPI_INCLUDE_DIRS $CPPFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + old_CPPFLAGS="$CPPFLAGS" + old_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $XDRINCLUDES" + LIBS="$LIBS $XDRLINKLIBS" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + #include + #include int main (void) { -int np; MPI_Comm_size (MPI_COMM_WORLD, &np); + + XDR * xdr; + FILE * fp; + xdrstdio_create(xdr, fp, XDR_ENCODE); + ; return 0; } @@ -63957,55 +64012,57 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO" then : - enablempi=yes - MPI_IMPL="petsc" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h - if test x"$PETSC_MPI_INCLUDE_DIRS" != x -then : - MPI_INCLUDES="$PETSC_MPI_INCLUDE_DIRS" -fi - if test x"$PETSC_MPI_LINK_LIBS" != x -then : - MPI_LIBS="$PETSC_MPI_LINK_LIBS" -fi + enablexdr=yes else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: PETSc MPI cannot compile an MPI program. Disabling MPI..." >&5 -printf "%s\n" "PETSc MPI cannot compile an MPI program. Disabling MPI..." >&6; } - enablempi=no - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + enablexdr=no + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - LIBS=$tmpLIBS - CPPFLAGS=$tmpCPPFLAGS + CPPFLAGS="$old_CPPFLAGS" + LIBS="$old_LIBS" -else case e in #( - e) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$enablexdr" = "xno" && test "x$withxdrlibdir" = "xno" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDR support in /usr/include/tirpc" >&5 +printf %s "checking for XDR support in /usr/include/tirpc... " >&6; } + XDRINCLUDES="-I/usr/include/tirpc" + XDRLINKLIBS="-ltirpc" + + + old_CPPFLAGS="$CPPFLAGS" + old_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $XDRINCLUDES" + LIBS="$LIBS $XDRLINKLIBS" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + #include + #include int main (void) { -int np; MPI_Comm_size (MPI_COMM_WORLD, &np); + + XDR * xdr; + FILE * fp; + xdrstdio_create(xdr, fp, XDR_ENCODE); + ; return 0; } @@ -64013,242 +64070,226 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO" then : - MPI_IMPL="CXX-built-in" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX Compiler Supports MPI " >&5 -printf "%s\n" "$CXX Compiler Supports MPI " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_XDR 1" >>confdefs.h - enablempi=yes + enablexdr=yes else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX Compiler Does NOT Support MPI..." >&5 -printf "%s\n" "$CXX Compiler Does NOT Support MPI..." >&6; }; enablempi=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + enablexdr=no + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ;; + CPPFLAGS="$old_CPPFLAGS" + LIBS="$old_LIBS" + + +fi + ;; esac fi + if test "x$enablexdr" = "xno" +then : + XDRINCLUDES='' + XDRLINKLIBS='' +fi +fi - if test "x$enablempi" = xyes +if test "x$enablexdr" != "xno" then : - if test x"$MPI_INCLUDES" = x -then : + libmesh_optional_INCLUDES="$XDRINCLUDES $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$XDRLINKLIBS $libmesh_optional_LIBS" -else case e in #( - e) libmesh_optional_INCLUDES="$MPI_INCLUDES $libmesh_optional_INCLUDES" ;; -esac -fi - if test x"$MPI_LIBS" != x -then : - libmesh_optional_LIBS="$MPI_LIBS $libmesh_optional_LIBS" fi - if test x"$MPI_LDFLAGS" != x + +if test "x$enablexdr" = "xno" && test "x$xdrrequired" = "xyes" then : - libmesh_optional_LIBS="$MPI_LDFLAGS $libmesh_optional_LIBS" + as_fn_error 4 "*** XDR was not found, but --enable-xdr-required was specified." "$LINENO" 5 fi -fi +# ------------------------------------------------------------- -fi -# ------------------------------------------------------------------- -# Petsc -- We already called ACSM_SCRAPE_PETSC_CONFIGURE in -# LIBMESH_SET_COMPILERS, so it's possible that the $enablepetsc -# flag is already set to "no", in which case we won't do further -# PETSc configuration here. -# ------------------------------------------------------------------- +# ------------------------------------------------------------- +# Boost -- enabled by default +# ------------------------------------------------------------- -# Check whether --enable-petsc-required was given. -if test ${enable_petsc_required+y} + # Check whether --enable-boost was given. +if test ${enable_boost+y} then : - enableval=$enable_petsc_required; case "${enableval}" in #( + enableval=$enable_boost; case "${enableval}" in #( yes) : - petscrequired=yes ;; #( + enableboost=yes ;; #( no) : - petscrequired=no ;; #( + enableboost=no ;; #( *) : - as_fn_error $? "bad value ${enableval} for --enable-petsc-required" "$LINENO" 5 ;; + as_fn_error $? "bad value ${enableval} for --enable-boost" "$LINENO" 5 ;; esac else case e in #( - e) petscrequired=no ;; + e) enableboost=$enableoptional ;; esac fi -# Check whether --enable-petsc-hypre-required was given. -if test ${enable_petsc_hypre_required+y} + BOOST_INCLUDE="" + if test "x$enableboost" != "xno" then : - enableval=$enable_petsc_hypre_required; case "${enableval}" in #( - yes) : - petschyprerequired=yes - petscrequired=yes ;; #( - no) : - petschyprerequired=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-petsc-hypre-required" "$LINENO" 5 ;; -esac -else case e in #( - e) petschyprerequired=no ;; -esac -fi + external_boost_found=yes -if test "x$enablepetsc" = "xno" && test "x$petscrequired" = "xyes" -then : - as_fn_error 3 "*** PETSc was not found, but --enable-petsc-required was specified." "$LINENO" 5 -fi - -if test "x$enablepetsc" = "xno" && test "x$petschyprerequired" = "xyes" -then : - as_fn_error 4 "*** PETSc was not found, but --enable-petsc-hypre-required was specified." "$LINENO" 5 -fi + if test "x" != "x"; then + want_boost="yes" + ac_boost_path="" + else -if test "x$enablepetsc" != "xno" +# Check whether --with-boost was given. +if test ${with_boost+y} then : + withval=$with_boost; + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ac_boost_path="" + else + want_boost="yes" + ac_boost_path="$withval" + fi +else case e in #( + e) want_boost="yes" ;; +esac +fi - if test "$enablepetsc" != no +# Check whether --with-boost-libdir was given. +if test ${with_boost_libdir+y} then : + withval=$with_boost_libdir; + if test -d "$withval" + then + ac_boost_lib_path="$withval" + else + as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5 + fi - # AC_REQUIRE: - # If the M4 macro AC_PROG_F77 has not already been called, call - # it (without any arguments). Make sure to quote AC_PROG_F77 with - # square brackets. AC_PROG_F77 must have been defined using - # AC_DEFUN or else contain a call to AC_PROVIDE to indicate - # that it has been called. - - - # Find petscversion.h - if test -r ${PETSC_DIR}/${PETSC_ARCH}/include/petscversion.h -then : - enablepetsc=yes; enablepetsc_mpi=yes - petsc_version_h_file=${PETSC_DIR}/${PETSC_ARCH}/include/petscversion.h -elif test -r ${PETSC_DIR}/include/petscversion.h -then : - enablepetsc=yes; enablepetsc_mpi=yes - petsc_version_h_file=${PETSC_DIR}/include/petscversion.h else case e in #( - e) enablepetsc=no; enablepetsc_mpi=no ;; + e) ac_boost_lib_path="" ;; esac fi - petsc_have_hypre=0 - - # Grab PETSc version and substitute into Makefile. - # If version 2.x, also check that PETSC_ARCH is set - if test "$enablepetsc" != no -then : - - petscmajor=`grep "define PETSC_VERSION_MAJOR" $petsc_version_h_file | sed -e "s/#define PETSC_VERSION_MAJOR[ ]*//g"` - petscminor=`grep "define PETSC_VERSION_MINOR" $petsc_version_h_file | sed -e "s/#define PETSC_VERSION_MINOR[ ]*//g"` - petscsubminor=`grep "define PETSC_VERSION_SUBMINOR" $petsc_version_h_file | sed -e "s/#define PETSC_VERSION_SUBMINOR[ ]*//g"` - petscrelease=`grep "define PETSC_VERSION_RELEASE" $petsc_version_h_file | sed -e "s/#define PETSC_VERSION_RELEASE[ ]*//g"` - petscversion=$petscmajor.$petscminor.$petscsubminor - petscmajorminor=$petscmajor.$petscminor.x + fi - if test "$petscmajor" = "2" && test "x${PETSC_ARCH}" = "x" -then : - enablepetsc=no; enablepetsc_mpi=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< PETSc 2.x detected and \"\$PETSC_ARCH\" not set. PETSc disabled. >>>" >&5 -printf "%s\n" "<<< PETSc 2.x detected and \"\$PETSC_ARCH\" not set. PETSc disabled. >>>" >&6; } +if test "x$want_boost" = "xyes"; then + boost_lib_version_req=1.57.0 + boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'` + boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'` + boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'` + boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` + if test "x$boost_lib_version_req_sub_minor" = "x" ; then + boost_lib_version_req_sub_minor="0" + fi + WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for boostlib >= $boost_lib_version_req" >&5 +printf %s "checking for boostlib >= $boost_lib_version_req... " >&6; } + succeeded=no -fi + libsubdirs="lib" + ax_arch=`uname -m` + if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then + libsubdirs="lib64 lib lib64" + fi -else case e in #( - e) enablepetsc=no; enablepetsc_mpi=no ;; -esac -fi + if test "$ac_boost_path" != ""; then + BOOST_CPPFLAGS="-I$ac_boost_path/include" + for ac_boost_path_tmp in $libsubdirs; do + if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then + BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" + break + fi + done + elif test "$cross_compiling" != yes; then + for ac_boost_path_tmp in $BOOST_ROOT $BOOST_DIR /usr /usr/local /opt /opt/local ; do + if ls -d "$ac_boost_path_tmp"/include/boost*/boost/ >/dev/null 2>&1 || + ls -d "$ac_boost_path_tmp"/include/boost/ >/dev/null 2>&1; then + for libsubdir in $libsubdirs ; do + if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" + ac_boost_include_dir_tmp=`ls -d "$ac_boost_path_tmp"/include{/boost*,}/boost/shared_ptr.hpp 2>/dev/null | sed 's#boost/shared_ptr.hpp##'` + BOOST_CPPFLAGS="-I$ac_boost_include_dir_tmp" + break; + fi + done + fi - # If we haven't been disabled yet, carry on! - if test $enablepetsc != no -then : + if test "$ac_boost_lib_path" != ""; then + BOOST_LDFLAGS="-L$ac_boost_lib_path" + fi + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS - # Print informative message about the version of PETSc we detected - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Found PETSc $petscversion installation in ${PETSC_DIR} ... >>>" >&5 -printf "%s\n" "<<< Found PETSc $petscversion installation in ${PETSC_DIR} ... >>>" >&6; } + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS - # We can skip the rest of the tests because they aren't going to pass - if test $enablepetsc != no -then : - # Try to compile a trivial PETSc program to check our - # configuration... this should handle cases where we slipped - # by the tests above with an invalid PETSCINCLUDEDIRS - # variable, which happened when PETSc 3.6 came out. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile a trivial PETSc program" >&5 -printf %s "checking whether we can compile a trivial PETSc program... " >&6; } - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - # Save the original CXXFLAGS contents - saveCXXFLAGS="$CXXFLAGS" - - # Append PETSc include paths to the CXXFLAGS variables - CXXFLAGS="$saveCXXFLAGS $PETSCINCLUDEDIRS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #undef MAJOR_VERSION - #undef MINOR_VERSION - #include - static char help[]=""; + #include - int main(int argc, char **argv) - { - auto ierr = PetscInitialize(&argc, &argv, (char*)0,help); - CHKERRQ(ierr); - ierr = PetscFinalize(); - CHKERRQ(ierr); - return 0; - } +int +main (void) +{ + + #if BOOST_VERSION >= $WANT_BOOST_VERSION + // Everything is okay + #else + # error Boost version is too old + #endif + ; + return 0; +} _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + succeeded=yes + found_system=yes -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - enablepetsc=no; enablepetsc_mpi=no - ;; -esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - # Return CXXFLAGS to their original state. - CXXFLAGS="$saveCXXFLAGS" - - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -64256,2571 +64297,2619 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # PETSc >= 3.5.0 should have TAO built-in, we don't currently support any other type of TAO installation. - petsc_have_tao=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TAO support via PETSc" >&5 -printf %s "checking for TAO support via PETSc... " >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test "x$succeeded" != "xyes"; then + _version=0 + if test "$ac_boost_path" != ""; then + if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then + for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do + _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` + V_CHECK=`expr $_version_tmp \> $_version` + if test "$V_CHECK" = "1" ; then + _version=$_version_tmp + fi + VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` + BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" + done + fi + else + if test "$cross_compiling" != yes; then + for ac_boost_path in /usr /usr/local /opt /opt/local ; do + if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then + for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do + _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` + V_CHECK=`expr $_version_tmp \> $_version` + if test "$V_CHECK" = "1" ; then + _version=$_version_tmp + best_path=$ac_boost_path + fi + done + fi + done + + VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` + BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" + if test "$ac_boost_lib_path" = ""; then + for libsubdir in $libsubdirs ; do + if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + BOOST_LDFLAGS="-L$best_path/$libsubdir" + fi + fi - # Save the original CFLAGS contents - saveCFLAGS="$CFLAGS" + if test "x$BOOST_ROOT" != "x"; then + for libsubdir in $libsubdirs ; do + if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then + version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` + stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` + stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'` + V_CHECK=`expr $stage_version_shorten \>\= $_version` + if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: We will use a staged boost library from $BOOST_ROOT" >&5 +printf "%s\n" "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;} + BOOST_CPPFLAGS="-I$BOOST_ROOT" + BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" + fi + fi + fi + fi - # Append PETSc include paths to the CFLAGS variables - CFLAGS="$saveCFLAGS $PETSCINCLUDEDIRS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #undef MAJOR_VERSION - #undef MINOR_VERSION - #include - static char help[]=""; + #include + +int +main (void) +{ - int main(int argc, char **argv) - { - Tao tao; - PetscInitialize(&argc, &argv, (char*)0,help); - TaoCreate(PETSC_COMM_WORLD,&tao); - TaoDestroy(&tao); - PetscFinalize(); - return 0; - } + #if BOOST_VERSION >= $WANT_BOOST_VERSION + // Everything is okay + #else + # error Boost version is too old + #endif + ; + return 0; +} _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_cxx_try_compile "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - petsc_have_tao=yes + succeeded=yes + found_system=yes -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - # Return C flags to their original state. - CFLAGS="$saveCFLAGS" - - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + fi -fi - -fi - -fi - + if test "$succeeded" != "yes" ; then + if test "$_version" = "0" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&5 +printf "%s\n" "$as_me: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&6;} + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5 +printf "%s\n" "$as_me: Your boost libraries seems to old (version $_version)." >&6;} + fi + # execute ACTION-IF-NOT-FOUND (if present): + external_boost_found=no + else - # If PETSc is still enabled at this point, do the required AC_SUBST - # and AC_DEFINE commands. This prevents libmesh_config.h from having - # confusing information in it if the test compilation steps fail. - if test $enablepetsc != no -then : +printf "%s\n" "#define HAVE_BOOST 1" >>confdefs.h + # execute ACTION-IF-FOUND (if present): + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Using external boost installation >>>" >&5 +printf "%s\n" "<<< Using external boost installation >>>" >&6; } + fi + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" +fi + if test "x$external_boost_found" = "xyes" +then : -printf "%s\n" "#define DETECTED_PETSC_VERSION_MAJOR $petscmajor" >>confdefs.h +printf "%s\n" "#define HAVE_EXTERNAL_BOOST 1" >>confdefs.h +else case e in #( + e) enableboost=no ;; +esac +fi +fi -printf "%s\n" "#define DETECTED_PETSC_VERSION_MINOR $petscminor" >>confdefs.h + if test "x$enableboost" = "xyes" +then : + libmesh_optional_INCLUDES="$BOOST_CPPFLAGS $libmesh_optional_INCLUDES" + export timpi_CPPFLAGS="$timpi_CPPFLAGS $BOOST_CPPFLAGS" -printf "%s\n" "#define DETECTED_PETSC_VERSION_SUBMINOR $petscsubminor" >>confdefs.h +fi +# -------------------------------------------------------------- +# ------------------------------------------------------------- +# MPI -- enabled by default +# ------------------------------------------------------------- +if test "x$enablempi" = xyes +then : -printf "%s\n" "#define DETECTED_PETSC_VERSION_RELEASE $petscrelease" >>confdefs.h - petsc_use_debug=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_USE_DEBUG` - petsc_have_superlu_dist=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_SUPERLU_DIST` - petsc_have_mumps=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_MUMPS` - petsc_have_strumpack=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_STRUMPACK` - petsc_have_metis=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_METIS` - petsc_have_chaco=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_CHACO` - petsc_have_party=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_PARTY` - petsc_have_ptscotch=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_PTSCOTCH` - petsc_have_parmetis=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_PARMETIS` - petsc_have_hypre=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_HYPRE` - # Set a #define if PETSc was built with debugging enabled. Note - # that this token will appear as LIBMESH_PETSC_USE_DEBUG in our - # header, so it won't collide with PETSc's. It is safe to test - # the value of $petsc_use_debug, it is guaranteed to be either 0 - # or nonzero. - if test $petsc_use_debug -gt 0 +if test x"$MPI_USING_WRAPPERS" = x1 then : -printf "%s\n" "#define PETSC_USE_DEBUG 1" >>confdefs.h - -fi + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # Set a #define if PETSc was built with SuperLU_dist support - if test $petsc_have_superlu_dist -gt 0 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int np; MPI_Comm_size (MPI_COMM_WORLD, &np); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : -printf "%s\n" "#define PETSC_HAVE_SUPERLU_DIST 1" >>confdefs.h - -fi + enablempi=yes + MPI_IMPL="mpi-wrapper-built-in" - # Set a #define if PETSc was built with MUMPS support - if test $petsc_have_mumps -gt 0 -then : +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h -printf "%s\n" "#define PETSC_HAVE_MUMPS 1" >>confdefs.h +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: MPI wrapper $CXX cannot compile an MPI program. Disabling MPI..." >&5 +printf "%s\n" "MPI wrapper $CXX cannot compile an MPI program. Disabling MPI..." >&6; } + enablempi=no + ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # Set a #define if PETSc was built with STRUMPACK support - if test $petsc_have_strumpack -gt 0 -then : - -printf "%s\n" "#define PETSC_HAVE_STRUMPACK 1" >>confdefs.h - -fi - # Set a #define if PETSc was built with Chaco support - if test $petsc_have_chaco -gt 0 +elif test -n "$MPI_LIBS_PATH" -a -n "$MPI_INCLUDES_PATH" then : -printf "%s\n" "#define PETSC_HAVE_CHACO 1" >>confdefs.h - -fi + printf "%s\n" "note: Checking $MPI_LIBS_PATH and $MPI_INCLUDES_PATH for MPI" - # Set a #define if PETSc was built with Party support - if test $petsc_have_party -gt 0 + MPI_LIBS_TO_TEST="" + if test -e $MPI_LIBS_PATH/libmpi.a then : - -printf "%s\n" "#define PETSC_HAVE_PARTY 1" >>confdefs.h - + MPI_LIBS_TO_TEST="$MPI_LIBS_PATH/libmpi.a $MPI_LIBS_TO_TEST" fi - - # Set a #define if PETSc was built with PTScotch support - if test $petsc_have_ptscotch -gt 0 + if test -e $MPI_LIBS_PATH/libmpi.so then : - -printf "%s\n" "#define PETSC_HAVE_PTSCOTCH 1" >>confdefs.h - + MPI_LIBS_TO_TEST="$MPI_LIBS_PATH/libmpi.so $MPI_LIBS_TO_TEST" fi - - # Set a #define if PETSc was built with ParMETIS support - if test $petsc_have_parmetis -gt 0 + if test -e $MPI_LIBS_PATH/libmpi.dylib then : - -printf "%s\n" "#define PETSC_HAVE_PARMETIS 1" >>confdefs.h - + MPI_LIBS_TO_TEST="$MPI_LIBS_PATH/libmpi.dylib $MPI_LIBS_TO_TEST" fi - # Note: may be empty... + if test x"$MPI_LIBS_TO_TEST" != x +then : + printf "%s\n" "note: testing $MPI_LIBS_PATH/libmpi(.a/.so/.dylib)" + tmpLIBS=$LIBS + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + LIBS="-L$MPI_LIBS_PATH $LIBS" - if test $petsc_have_hypre -gt 0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lam_show_version in -llam" >&5 +printf %s "checking for lam_show_version in -llam... " >&6; } +if test ${ac_cv_lib_lam_lam_show_version+y} then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-llam $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -printf "%s\n" "#define HAVE_PETSC_HYPRE 1" >>confdefs.h - +namespace conftest { + extern "C" int lam_show_version (); +} +int +main (void) +{ +return conftest::lam_show_version (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + ac_cv_lib_lam_lam_show_version=yes +else case e in #( + e) ac_cv_lib_lam_lam_show_version=no ;; +esac fi - - -printf "%s\n" "#define HAVE_PETSC 1" >>confdefs.h - - - if test $petsc_have_tao != no +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lam_lam_show_version" >&5 +printf "%s\n" "$ac_cv_lib_lam_lam_show_version" >&6; } +if test "x$ac_cv_lib_lam_lam_show_version" = xyes then : -printf "%s\n" "#define HAVE_PETSC_TAO 1" >>confdefs.h + LIBS="-llam $LIBS" + MPI_LIBS="-llam $MPI_LIBS" fi -fi - # If PETSc is not enabled, but it *was* required, error out now - # instead of compiling libmesh in an invalid configuration. - if test "$enablepetsc" = "no" && test "$petscrequired" = "yes" + for lib in $MPI_LIBS_TO_TEST + do + if (nm $lib | grep elan > /dev/null); then + printf "%s\n" "note: MPI found to use Quadrics switch, looking for elan library" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for elan_init in -lelan" >&5 +printf %s "checking for elan_init in -lelan... " >&6; } +if test ${ac_cv_lib_elan_elan_init+y} then : - as_fn_error 3 "*** PETSc was not found, but --enable-petsc-required was specified." "$LINENO" 5 -fi + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lelan $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # If PETSc + Hypre is required, throw an error if we don't have it. - if test "x$petschyprerequired" = "xyes" && test $petsc_have_hypre -eq 0 +namespace conftest { + extern "C" int elan_init (); +} +int +main (void) +{ +return conftest::elan_init (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - as_fn_error 4 "*** PETSc with Hypre was not found, but --enable-petsc-hypre-required was specified." "$LINENO" 5 + ac_cv_lib_elan_elan_init=yes +else case e in #( + e) ac_cv_lib_elan_elan_init=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elan_elan_init" >&5 +printf "%s\n" "$ac_cv_lib_elan_elan_init" >&6; } +if test "x$ac_cv_lib_elan_elan_init" = xyes +then : + LIBS="-lelan $LIBS" + MPI_LIBS="-lelan $MPI_LIBS" +else case e in #( + e) as_fn_error $? "Could not find elan library... exiting" "$LINENO" 5 ;; +esac fi -if test "x$enablepetsc" != "xno" -then : - libmesh_optional_INCLUDES="$PETSCINCLUDEDIRS $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$PETSCLINKLIBS $libmesh_optional_LIBS" + break + fi + done + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 +printf %s "checking for MPI_Init in -lmpi... " >&6; } +if test ${ac_cv_lib_mpi_MPI_Init+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpi $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +namespace conftest { + extern "C" int MPI_Init (); +} +int +main (void) +{ +return conftest::MPI_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + ac_cv_lib_mpi_MPI_Init=yes +else case e in #( + e) ac_cv_lib_mpi_MPI_Init=no ;; +esac fi - if test x$enablepetsc = xyes; then - LIBMESH_ENABLE_PETSC_TRUE= - LIBMESH_ENABLE_PETSC_FALSE='#' -else - LIBMESH_ENABLE_PETSC_TRUE='#' - LIBMESH_ENABLE_PETSC_FALSE= +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 +printf "%s\n" "$ac_cv_lib_mpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpi_MPI_Init" = xyes +then : -# ------------------------------------------------------------- + MPI_LIBS="-lmpi $MPI_LIBS" + MPI_LDFLAGS="-L$MPI_LIBS_PATH" + MPI_IMPL="mpi" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found valid MPI installation..." >&5 +printf "%s\n" "Found valid MPI installation..." >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not link in the MPI library..." >&5 +printf "%s\n" "Could not link in the MPI library..." >&6; }; enablempi=no ;; +esac +fi -# ------------------------------------------------------------- -# Check for inconsistencies between PETSc and libmesh's scalar -# and index datatypes, and override $dof_bytes if reasonable. -# ------------------------------------------------------------- -if test $enablepetsc != no -then : + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - petsc_use_64bit_indices=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_USE_64BIT_INDICES` + LIBS=$tmpLIBS - if test $petsc_use_64bit_indices -gt 0 && test "$dof_bytes_setting" != "explicit" -then : - if test $dof_bytes != "8" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> adopting PETSc dof_id size: 8" >&5 -printf "%s\n" ">>> adopting PETSc dof_id size: 8" >&6; } +else case e in #( + e) + printf "%s\n" "note: Could not find $MPI_LIBS_PATH/libmpi(.a/.so/.dylib)" + ;; +esac fi - dof_bytes=8 - dof_bytes_setting="explicit" -fi - if test $petsc_use_64bit_indices -gt 0 && test "$dof_bytes" != "8" + if test x"$MPI_IMPL" = x then : - as_fn_error $? "<<< PETSc is using 64-bit indices, you must configure libmesh with --with-dof-id-bytes=8. >>>" "$LINENO" 5 -fi - if test $petsc_use_64bit_indices = "0" && test "$dof_bytes_setting" != "explicit" -then : - if test $dof_bytes != "4" + if test -e $MPI_LIBS_PATH/libmpich.a || test -e $MPI_LIBS_PATH/libmpich.so then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> adopting PETSc dof_id size: 4" >&5 -printf "%s\n" ">>> adopting PETSc dof_id size: 4" >&6; } -fi - dof_bytes=4 - dof_bytes_setting="explicit" -fi - if test "$petsc_use_64bit_indices" = "0" && test $dof_bytes -gt 4 -then : - as_fn_error $? "<<< PETSc is using 32-bit indices, you must configure libmesh with --with-dof-id-bytes=<1|2|4>. >>>" "$LINENO" 5 -fi + printf "%s\n" "note: using $MPI_LIBS_PATH/libmpich(.a/.so)" - petsc_use_complex=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_USE_COMPLEX` + tmpLIBS=$LIBS - if test $petsc_use_complex -gt 0 && test "$enablecomplex" = "no" -then : - as_fn_error $? "<<< PETSc was built with complex scalars, you must configure libmesh with --enable-complex. >>>" "$LINENO" 5 -fi + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "$petsc_use_complex" = "0" && test "$enablecomplex" = "yes" + LIBS="-L$MPI_LIBS_PATH $LIBS" + + if (nm $MPI_LIBS_PATH/libmpich.* | grep gm_open > /dev/null); then + printf "%s\n" "note: MPICH found to use Myricomm's Myrinet, looking for gm library" + + if test "x$GMHOME" = "x" then : - as_fn_error $? "<<< PETSc was built with real scalars, you must configure libmesh with --disable-complex. >>>" "$LINENO" 5 + GMHOME="/usr" fi +# Check whether --with-gm was given. +if test ${with_gm+y} +then : + withval=$with_gm; GM="$withval" +else case e in #( + e) + printf "%s\n" "note: GM library path not given... trying prefix=$MPIHOME" + GM=$GMHOME + ;; +esac fi + LIBS="-L$GM/lib $LIBS" + MPI_LIBS="-L$GM/lib $MPI_LIBS" -# ------------------------------------------------------------- -# SLEPc -- enabled by default -# ------------------------------------------------------------- + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gm_open in -lgm" >&5 +printf %s "checking for gm_open in -lgm... " >&6; } +if test ${ac_cv_lib_gm_gm_open+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lgm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Check whether --enable-slepc was given. -if test ${enable_slepc+y} +namespace conftest { + extern "C" int gm_open (); +} +int +main (void) +{ +return conftest::gm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - enableval=$enable_slepc; case "${enableval}" in #( - yes) : - enableslepc=yes ;; #( - no) : - enableslepc=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-slepc" "$LINENO" 5 ;; + ac_cv_lib_gm_gm_open=yes +else case e in #( + e) ac_cv_lib_gm_gm_open=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gm_gm_open" >&5 +printf "%s\n" "$ac_cv_lib_gm_gm_open" >&6; } +if test "x$ac_cv_lib_gm_gm_open" = xyes +then : + + LIBS="$LIBS -lgm" + MPI_LIBS="$MPI_LIBS -lgm" + else case e in #( - e) enableslepc=$enablepetsc ;; + e) as_fn_error $? "Could not find gm library... exiting" "$LINENO" 5 ;; esac fi - # if unspecified, infer from what's up with PETSc + fi + if test -e $MPI_LIBS_PATH/libmpl.a || test -e $MPI_LIBS_PATH/libmpl.so +then : - if test "$enableslepc" != no + LIBS="-L$MPI_LIBS_PATH -lmpl $tmpLIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 +printf %s "checking for MPI_Init in -lmpich... " >&6; } +if test ${ac_cv_lib_mpich_MPI_Init+y} then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpich $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "x$SLEPC_DIR" = "x" && test "x$PETSC_DIR" != "x" +namespace conftest { + extern "C" int MPI_Init (); +} +int +main (void) +{ +return conftest::MPI_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - export SLEPC_DIR=$PETSC_DIR + ac_cv_lib_mpich_MPI_Init=yes +else case e in #( + e) ac_cv_lib_mpich_MPI_Init=no ;; +esac fi - - # It doesn't seem likely that we would find a /usr/lib/slepc - # when we already didn't find a /usr/lib/petsc (otherwise, - # PETSC_DIR would be set!) so let's rule that case out just - # to be safe. - if test "x$SLEPC_DIR" = "x" -then : - - enableslepc=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Could not infer SLEPC_DIR from PETSC_DIR, SLEPc disabled. >>>" >&5 -printf "%s\n" "<<< Could not infer SLEPC_DIR from PETSC_DIR, SLEPc disabled. >>>" >&6; } - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac fi - - if test "x$SLEPC_DIR" != "x" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 +printf "%s\n" "$ac_cv_lib_mpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpich_MPI_Init" = xyes then : - slepc_standalone=no - slepc_in_petsc_arch=no - slepc_in_usr_lib=no + MPI_LIBS="-lmpich -lmpl $MPI_LIBS" + MPI_LDFLAGS="-L$MPI_LIBS_PATH" + MPI_IMPL="mpich" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found valid MPICH installation with libmpl..." >&5 +printf "%s\n" "Found valid MPICH installation with libmpl..." >&6; } - as_ac_Header=`printf "%s\n" "ac_cv_header_$SLEPC_DIR/include/slepcversion.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$SLEPC_DIR/include/slepcversion.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - SLEPC_INCLUDE="-I$SLEPC_DIR/include" - slepc_standalone=yes +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not link in the MPI library..." >&5 +printf "%s\n" "Could not link in the MPI library..." >&6; }; enablempi=no ;; +esac fi - if test "x$slepc_standalone" != "xyes" && test "x$PETSC_ARCH" != "x" +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 +printf %s "checking for MPI_Init in -lmpich... " >&6; } +if test ${ac_cv_lib_mpich_MPI_Init+y} then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpich $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - as_ac_Header=`printf "%s\n" "ac_cv_header_$SLEPC_DIR/$PETSC_ARCH/include/slepcversion.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$SLEPC_DIR/$PETSC_ARCH/include/slepcversion.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" +namespace conftest { + extern "C" int MPI_Init (); +} +int +main (void) +{ +return conftest::MPI_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" then : - SLEPC_INCLUDE="-I$SLEPC_DIR/$PETSC_ARCH/include" - slepc_in_petsc_arch=yes + ac_cv_lib_mpich_MPI_Init=yes +else case e in #( + e) ac_cv_lib_mpich_MPI_Init=no ;; +esac fi - - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac fi - - if test "x$slepc_standalone" != "xyes" && test "x$slepc_in_petsc_arch" != "xyes" -then : - - ac_fn_cxx_check_header_compile "$LINENO" "/usr/lib/slepc/slepcversion.h" "ac_cv_header__usr_lib_slepc_slepcversion_h" "$ac_includes_default" -if test "x$ac_cv_header__usr_lib_slepc_slepcversion_h" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 +printf "%s\n" "$ac_cv_lib_mpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpich_MPI_Init" = xyes then : - export SLEPC_DIR=/usr/lib/slepc - SLEPC_INCLUDE="-I$SLEPC_DIR/include" + MPI_LIBS="-lmpich $MPI_LIBS" + MPI_LDFLAGS="-L$MPI_LIBS_PATH" + MPI_IMPL="mpich" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found valid MPICH installation..." >&5 +printf "%s\n" "Found valid MPICH installation..." >&6; } else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< No valid SLEPC installation found, SLEPc disabled. >>>" >&5 -printf "%s\n" "<<< No valid SLEPC installation found, SLEPc disabled. >>>" >&6; } - unset SLEPC_DIR - enableslepc=no - ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not link in the MPI library..." >&5 +printf "%s\n" "Could not link in the MPI library..." >&6; }; enablempi=no ;; esac fi - + ;; +esac fi -fi + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "x$PETSC_ARCH" != "x" -then : - as_ac_Header=`printf "%s\n" "ac_cv_header_$SLEPC_DIR/$PETSC_ARCH/include/slepcconf.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$SLEPC_DIR/$PETSC_ARCH/include/slepcconf.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - SLEPC_INCLUDE="$SLEPC_INCLUDE -I$SLEPC_DIR/$PETSC_ARCH/include" -fi + LIBS=$tmpLIBS fi fi - if test "x$enableslepc" = "xyes" + if test "x$MPI_IMPL" != x then : - slepc_version_header=$SLEPC_DIR/$PETSC_ARCH/include/slepcversion.h - if test "x$slepc_in_petsc_arch" != "xyes" + if test -e $MPI_INCLUDES_PATH/mpi.h then : - slepc_version_header=$SLEPC_DIR/include/slepcversion.h -fi - slepcmajor=`grep "define SLEPC_VERSION_MAJOR" $slepc_version_header | sed -e "s/#define SLEPC_VERSION_MAJOR[ ]*//g"` - slepcminor=`grep "define SLEPC_VERSION_MINOR" $slepc_version_header | sed -e "s/#define SLEPC_VERSION_MINOR[ ]*//g"` - slepcsubminor=`grep "define SLEPC_VERSION_SUBMINOR" $slepc_version_header | sed -e "s/#define SLEPC_VERSION_SUBMINOR[ ]*//g"` + printf "%s\n" "note: using $MPI_INCLUDES_PATH/mpi.h" + tmpCPPFLAGS=$CPPFLAGS - slepcversion=$slepcmajor.$slepcminor.$slepcsubminor - oldpetsc=no + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test $petscmajor -lt 3 -then : - oldpetsc=yes -fi - if test "$petscmajor" = "3" && test $petscminor -lt 4 + CPPFLAGS="-I$MPI_INCLUDES_PATH $CPPFLAGS" + ac_fn_cxx_check_header_compile "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default" +if test "x$ac_cv_header_mpi_h" = xyes then : - oldpetsc=yes -fi - if test "$oldpetsc" = "yes" && test "$slepcversion" != "$petscversion" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< WARNING: PETSc version $petscversion does not match SLEPc version $slepcversion >>>" >&5 -printf "%s\n" "<<< WARNING: PETSc version $petscversion does not match SLEPc version $slepcversion >>>" >&6; } -fi - if test "$slepcmajor" != "$petscmajor" || test "$slepcminor" != "$petscminor" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< WARNING: PETSc version $petscmajor.$petscminor does not match SLEPc version $slepcmajor.$slepcminor >>>" >&5 -printf "%s\n" "<<< WARNING: PETSc version $petscmajor.$petscminor does not match SLEPc version $slepcmajor.$slepcminor >>>" >&6; } -fi +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h - includefile="" + enablempi=yes - if test -r ${SLEPC_DIR}/bmake/${PETSC_ARCH}/slepcconf -then : - includefile=${SLEPC_DIR}/bmake/${PETSC_ARCH}/slepcconf -elif test -r ${SLEPC_DIR}/conf/slepc_common_variables -then : - includefile=${SLEPC_DIR}/conf/slepc_common_variables -elif test -r ${SLEPC_DIR}/conf/slepc_variables -then : - includefile=${SLEPC_DIR}/conf/slepc_variables -elif test -r ${SLEPC_DIR}/lib/slepc/conf/slepc_variables -then : - includefile=${SLEPC_DIR}/lib/slepc/conf/slepc_variables -elif test -r ${SLEPC_DIR}/${PETSC_ARCH}/lib/slepc/conf/slepc_variables -then : - includefile=${SLEPC_DIR}/${PETSC_ARCH}/lib/slepc/conf/slepc_variables else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< SLEPc configuration failed. Could not find slepcconf/slepc_variables file. >>>" >&5 -printf "%s\n" "<<< SLEPc configuration failed. Could not find slepcconf/slepc_variables file. >>>" >&6; } - enableslepc=no ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not compile in the MPI headers..." >&5 +printf "%s\n" "Could not compile in the MPI headers..." >&6; }; enablempi=no ;; esac fi - if test "x$enableslepc" = "xyes" && test "x$includefile" != "x" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Querying SLEPc configuration from $includefile >>>" >&5 -printf "%s\n" "<<< Querying SLEPc configuration from $includefile >>>" >&6; } - printf '%s\n' "include $includefile" > Makefile_config_slepc - printf '%s\n' "getSLEPC_LIBS:" >> Makefile_config_slepc - printf '\t%s\n' "echo \$(SLEPC_LIB) \$(ARPACK_LIB)" >> Makefile_config_slepc + MPI_INCLUDES="-I$MPI_INCLUDES_PATH" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - SLEPC_LIBS=`make -s -f Makefile_config_slepc getSLEPC_LIBS` + CPPFLAGS=$tmpCPPFLAGS - if test x$? = x0 +elif test -e $MPI_INCLUDES_PATH/mpi/mpi.h then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile a trivial SLEPc program" >&5 -printf %s "checking whether we can compile a trivial SLEPc program... " >&6; } - ac_ext=cpp + MPI_INCLUDES_PATH=$MPI_INCLUDES_PATH/mpi + printf "%s\n" "note: using $MPI_INCLUDES_PATH/mpi.h" + tmpCPPFLAGS=$CPPFLAGS + + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + CPPFLAGS="-I$MPI_INCLUDES_PATH $CPPFLAGS" + ac_fn_cxx_check_header_compile "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default" +if test "x$ac_cv_header_mpi_h" = xyes +then : - saveCXXFLAGS="$CXXFLAGS" - CXXFLAGS="$saveCXXFLAGS $PETSCINCLUDEDIRS $SLEPC_INCLUDE" +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + enablempi=yes - #include - static char help[]=""; +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not compile in the MPI headers..." >&5 +printf "%s\n" "Could not compile in the MPI headers..." >&6; }; enablempi=no ;; +esac +fi - int main(int argc, char **argv) - { - auto ierr = SlepcInitialize(&argc, &argv, (char*)0, help); - CHKERRQ(ierr); - ierr = SlepcFinalize(); - CHKERRQ(ierr); - return 0; - } + MPI_INCLUDES="-I$MPI_INCLUDES_PATH" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : + CPPFLAGS=$tmpCPPFLAGS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with SLEPc version $slepcversion support >>>" >&5 -printf "%s\n" "<<< Configuring library with SLEPc version $slepcversion support >>>" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Could not find MPI header ..." >&5 +printf "%s\n" "Could not find MPI header ..." >&6; } + enablempi=no + ;; +esac +fi +else case e in #( + e) -printf "%s\n" "#define HAVE_SLEPC 1" >>confdefs.h + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int np; MPI_Comm_size (MPI_COMM_WORLD, &np); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + MPI_IMPL="CXX-built-in" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX Compiler Supports MPI " >&5 +printf "%s\n" "$CXX Compiler Supports MPI " >&6; } +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h + enablempi=yes -printf "%s\n" "#define DETECTED_SLEPC_VERSION_MAJOR $slepcmajor" >>confdefs.h +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX Compiler Does NOT Support MPI..." >&5 +printf "%s\n" "$CXX Compiler Does NOT Support MPI..." >&6; }; enablempi=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ;; +esac +fi +elif test x"$PETSC_HAVE_MPI" = x1 +then : -printf "%s\n" "#define DETECTED_SLEPC_VERSION_MINOR $slepcminor" >>confdefs.h + tmpCPPFLAGS=$CPPFLAGS + tmpLIBS=$LIBS + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + LIBS="$PETSC_MPI_LINK_LIBS $LIBS" + CPPFLAGS="$PETSC_MPI_INCLUDE_DIRS $CPPFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int np; MPI_Comm_size (MPI_COMM_WORLD, &np); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : + enablempi=yes + MPI_IMPL="petsc" -printf "%s\n" "#define DETECTED_SLEPC_VERSION_SUBMINOR $slepcsubminor" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h + if test x"$PETSC_MPI_INCLUDE_DIRS" != x +then : + MPI_INCLUDES="$PETSC_MPI_INCLUDE_DIRS" +fi + if test x"$PETSC_MPI_LINK_LIBS" != x +then : + MPI_LIBS="$PETSC_MPI_LINK_LIBS" +fi else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiling trivial SLEPc program failed. SLEPc disabled. >>>" >&5 -printf "%s\n" "<<< Compiling trivial SLEPc program failed. SLEPc disabled. >>>" >&6; } - enableslepc=no - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: PETSc MPI cannot compile an MPI program. Disabling MPI..." >&5 +printf "%s\n" "PETSc MPI cannot compile an MPI program. Disabling MPI..." >&6; } + enablempi=no + ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - CXXFLAGS="$saveCXXFLAGS" - ac_ext=cpp +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + LIBS=$tmpLIBS + CPPFLAGS=$tmpCPPFLAGS else case e in #( e) - enableslepc=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< SLEPc configuration query failed. SLEPc disabled. >>>" >&5 -printf "%s\n" "<<< SLEPc configuration query failed. SLEPc disabled. >>>" >&6; } - ;; -esac -fi - rm -f Makefile_config_slepc + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +int np; MPI_Comm_size (MPI_COMM_WORLD, &np); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO" +then : -fi + MPI_IMPL="CXX-built-in" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX Compiler Supports MPI " >&5 +printf "%s\n" "$CXX Compiler Supports MPI " >&6; } -if test $enableslepc = yes -then : +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h - libmesh_optional_INCLUDES="$SLEPC_INCLUDE $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$SLEPC_LIBS $libmesh_optional_LIBS" + enablempi=yes +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX Compiler Does NOT Support MPI..." >&5 +printf "%s\n" "$CXX Compiler Does NOT Support MPI..." >&6; }; enablempi=no ;; +esac fi - if test x$enableslepc = xyes; then - LIBMESH_ENABLE_SLEPC_TRUE= - LIBMESH_ENABLE_SLEPC_FALSE='#' -else - LIBMESH_ENABLE_SLEPC_TRUE='#' - LIBMESH_ENABLE_SLEPC_FALSE= +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + ;; +esac fi -# ------------------------------------------------------------- -# ------------------------------------------------------------- -# "Trilinos" -- enabled by default unless we're building with -# complex numbers. -# ------------------------------------------------------------- - # Check whether --enable-trilinos was given. -if test ${enable_trilinos+y} + + if test "x$enablempi" = xyes then : - enableval=$enable_trilinos; case "${enableval}" in #( - yes) : - enabletrilinos=yes ;; #( - no) : - enabletrilinos=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-trilinos" "$LINENO" 5 ;; -esac + + if test x"$MPI_INCLUDES" = x +then : + else case e in #( - e) enabletrilinos=$enableoptional ;; + e) libmesh_optional_INCLUDES="$MPI_INCLUDES $libmesh_optional_INCLUDES" ;; esac fi - - - if test "$enabletrilinos" = yes && test "$dof_bytes" != "4" + if test x"$MPI_LIBS" != x then : - - enabletrilinos=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Trilinos disabled, requires --with-dof-id-bytes=4 >>>" >&5 -printf "%s\n" "<<< Trilinos disabled, requires --with-dof-id-bytes=4 >>>" >&6; } + libmesh_optional_LIBS="$MPI_LIBS $libmesh_optional_LIBS" +fi + if test x"$MPI_LDFLAGS" != x +then : + libmesh_optional_LIBS="$MPI_LDFLAGS $libmesh_optional_LIBS" +fi fi - if test "x$enabletrilinos" = xyes -then : +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Whether MPI is available for Trilinos" >&5 -printf %s "checking Whether MPI is available for Trilinos... " >&6; } - if test "x$enablempi" = "xno" -then : - enabletrilinos=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +# ------------------------------------------------------------------- +# Petsc -- We already called ACSM_SCRAPE_PETSC_CONFIGURE in +# LIBMESH_SET_COMPILERS, so it's possible that the $enablepetsc +# flag is already set to "no", in which case we won't do further +# PETSc configuration here. +# ------------------------------------------------------------------- +# Check whether --enable-petsc-required was given. +if test ${enable_petsc_required+y} +then : + enableval=$enable_petsc_required; case "${enableval}" in #( + yes) : + petscrequired=yes ;; #( + no) : + petscrequired=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-petsc-required" "$LINENO" 5 ;; +esac else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - ;; + e) petscrequired=no ;; esac fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Whether Real precision is compatible with Trilinos" >&5 -printf %s "checking Whether Real precision is compatible with Trilinos... " >&6; } - if test "x$enablesingleprecision" != "xno" || test "x$enabletripleprecision" != "xno" || test "x$enablequadrupleprecision" != "xno" -then : - - enabletrilinos=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - ;; +# Check whether --enable-petsc-hypre-required was given. +if test ${enable_petsc_hypre_required+y} +then : + enableval=$enable_petsc_hypre_required; case "${enableval}" in #( + yes) : + petschyprerequired=yes + petscrequired=yes ;; #( + no) : + petschyprerequired=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-petsc-hypre-required" "$LINENO" 5 ;; +esac +else case e in #( + e) petschyprerequired=no ;; esac -fi - fi +if test "x$enablepetsc" = "xno" && test "x$petscrequired" = "xyes" +then : + as_fn_error 3 "*** PETSc was not found, but --enable-petsc-required was specified." "$LINENO" 5 +fi - if test "x$enablecomplex" = "xno" +if test "x$enablepetsc" = "xno" && test "x$petschyprerequired" = "xyes" then : + as_fn_error 4 "*** PETSc was not found, but --enable-petsc-hypre-required was specified." "$LINENO" 5 +fi - if test "x$enabletrilinos" != "xno" +if test "x$enablepetsc" != "xno" then : - if test "x$TRILINOS_DIR" = "x" -then : - if test -d /usr/include/trilinos + + + if test "$enablepetsc" != no then : - TRILINOS_DIR=/usr/include/trilinos -else case e in #( - e) TRILINOS_DIR=no ;; -esac -fi -fi + # AC_REQUIRE: + # If the M4 macro AC_PROG_F77 has not already been called, call + # it (without any arguments). Make sure to quote AC_PROG_F77 with + # square brackets. AC_PROG_F77 must have been defined using + # AC_DEFUN or else contain a call to AC_PROVIDE to indicate + # that it has been called. -# Check whether --with-trilinos was given. -if test ${with_trilinos+y} + # Find petscversion.h + if test -r ${PETSC_DIR}/${PETSC_ARCH}/include/petscversion.h then : - withval=$with_trilinos; withtrilinosdir=$withval + enablepetsc=yes; enablepetsc_mpi=yes + petsc_version_h_file=${PETSC_DIR}/${PETSC_ARCH}/include/petscversion.h +elif test -r ${PETSC_DIR}/include/petscversion.h +then : + enablepetsc=yes; enablepetsc_mpi=yes + petsc_version_h_file=${PETSC_DIR}/include/petscversion.h else case e in #( - e) withtrilinosdir=$TRILINOS_DIR ;; + e) enablepetsc=no; enablepetsc_mpi=no ;; esac fi + petsc_have_hypre=0 - if test "x$withtrilinosdir" != "xno" + # Grab PETSc version and substitute into Makefile. + # If version 2.x, also check that PETSC_ARCH is set + if test "$enablepetsc" != no then : - if test -r $withtrilinosdir/include/Makefile.export.Trilinos -then : - TRILINOS_MAKEFILE_EXPORT=$withtrilinosdir/include/Makefile.export.Trilinos -elif test -r $withtrilinosdir/Makefile.export.Trilinos + petscmajor=`grep "define PETSC_VERSION_MAJOR" $petsc_version_h_file | sed -e "s/#define PETSC_VERSION_MAJOR[ ]*//g"` + petscminor=`grep "define PETSC_VERSION_MINOR" $petsc_version_h_file | sed -e "s/#define PETSC_VERSION_MINOR[ ]*//g"` + petscsubminor=`grep "define PETSC_VERSION_SUBMINOR" $petsc_version_h_file | sed -e "s/#define PETSC_VERSION_SUBMINOR[ ]*//g"` + petscrelease=`grep "define PETSC_VERSION_RELEASE" $petsc_version_h_file | sed -e "s/#define PETSC_VERSION_RELEASE[ ]*//g"` + petscversion=$petscmajor.$petscminor.$petscsubminor + petscmajorminor=$petscmajor.$petscminor.x + + if test "$petscmajor" = "2" && test "x${PETSC_ARCH}" = "x" then : - TRILINOS_MAKEFILE_EXPORT=$withtrilinosdir/Makefile.export.Trilinos + + enablepetsc=no; enablepetsc_mpi=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< PETSc 2.x detected and \"\$PETSC_ARCH\" not set. PETSc disabled. >>>" >&5 +printf "%s\n" "<<< PETSc 2.x detected and \"\$PETSC_ARCH\" not set. PETSc disabled. >>>" >&6; } + +fi + else case e in #( - e) enabletrilinos10=no ;; + e) enablepetsc=no; enablepetsc_mpi=no ;; esac fi - if test "x$enabletrilinos10" != "xno" + # If we haven't been disabled yet, carry on! + if test $enablepetsc != no then : - enabletrilinos10=yes - trilinosversionstring=`grep "define TRILINOS_VERSION_STRING" $withtrilinosdir/include/Trilinos_version.h | sed -e "s/#define TRILINOS_VERSION_STRING[ ]*//g" | tr -d '"'` + # Print informative message about the version of PETSc we detected + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Found PETSc $petscversion installation in ${PETSC_DIR} ... >>>" >&5 +printf "%s\n" "<<< Found PETSc $petscversion installation in ${PETSC_DIR} ... >>>" >&6; } - if test "x$trilinosversionstring" = "x" + # We can skip the rest of the tests because they aren't going to pass + if test $enablepetsc != no then : - trilinosversionstring=`grep "define TRILINOS_MAJOR_VERSION" $withtrilinosdir/include/Trilinos_version.h | sed -e "s/#define TRILINOS_MAJOR_VERSION[ ]*//g"` + # Try to compile a trivial PETSc program to check our + # configuration... this should handle cases where we slipped + # by the tests above with an invalid PETSCINCLUDEDIRS + # variable, which happened when PETSc 3.6 came out. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile a trivial PETSc program" >&5 +printf %s "checking whether we can compile a trivial PETSc program... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -fi - if test "x$trilinosversionstring" = "x" -then : - trilinosversionstring=10+ -fi + # Save the original CXXFLAGS contents + saveCXXFLAGS="$CXXFLAGS" + # Append PETSc include paths to the CXXFLAGS variables + CXXFLAGS="$saveCXXFLAGS $PETSCINCLUDEDIRS" -printf "%s\n" "#define HAVE_TRILINOS 1" >>confdefs.h + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos $trilinosversionstring support >>>" >&5 -printf "%s\n" "<<< Configuring library with Trilinos $trilinosversionstring support >>>" >&6; } + #undef MAJOR_VERSION + #undef MINOR_VERSION + #include + static char help[]=""; - as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/AztecOO_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/AztecOO_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enableaztecoo=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/AztecOO_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/AztecOO_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enableaztecoo=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/aztecoo/src/AztecOO_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/aztecoo/src/AztecOO_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" + int main(int argc, char **argv) + { + auto ierr = PetscInitialize(&argc, &argv, (char*)0,help); + CHKERRQ(ierr); + ierr = PetscFinalize(); + CHKERRQ(ierr); + return 0; + } + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" then : - enableaztecoo=yes + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else case e in #( - e) enableaztecoo=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + enablepetsc=no; enablepetsc_mpi=no + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; -esac -fi - ;; -esac -fi + # Return CXXFLAGS to their original state. + CXXFLAGS="$saveCXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "x$enableaztecoo" != "xno" -then : -printf "%s\n" "#define TRILINOS_HAVE_AZTECOO 1" >>confdefs.h + # PETSc >= 3.5.0 should have TAO built-in, we don't currently support any other type of TAO installation. + petsc_have_tao=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TAO support via PETSc" >&5 +printf %s "checking for TAO support via PETSc... " >&6; } + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with AztecOO support >>>" >&5 -printf "%s\n" "<<< Configuring library with AztecOO support >>>" >&6; } -fi + # Save the original CFLAGS contents + saveCFLAGS="$CFLAGS" - as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/NOX_Config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/NOX_Config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enablenox=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/NOX_Config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/NOX_Config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enablenox=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/nox/src/NOX_Config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/nox/src/NOX_Config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enablenox=yes -else case e in #( - e) enablenox=no ;; -esac -fi - ;; -esac -fi - ;; -esac -fi + # Append PETSc include paths to the CFLAGS variables + CFLAGS="$saveCFLAGS $PETSCINCLUDEDIRS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "x$enablenox" != "xno" -then : + #undef MAJOR_VERSION + #undef MINOR_VERSION + #include + static char help[]=""; + int main(int argc, char **argv) + { + Tao tao; + PetscInitialize(&argc, &argv, (char*)0,help); + TaoCreate(PETSC_COMM_WORLD,&tao); + TaoDestroy(&tao); + PetscFinalize(); + return 0; + } -printf "%s\n" "#define TRILINOS_HAVE_NOX 1" >>confdefs.h +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NOX support >>>" >&5 -printf "%s\n" "<<< Configuring library with NOX support >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + petsc_have_tao=yes +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/ml_include.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/ml_include.h" "$as_ac_Header" " - #ifdef HAVE_PETSC - #undef HAVE_PETSC - #endif + # Return C flags to their original state. + CFLAGS="$saveCFLAGS" -" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enableml=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/ml_include.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/ml_include.h" "$as_ac_Header" " - #ifdef HAVE_PETSC - #undef HAVE_PETSC - #endif + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enableml=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/ml/src/ml_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/ml/src/ml_config.h" "$as_ac_Header" " - #ifdef HAVE_PETSC - #undef HAVE_PETSC - #endif -" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enableml=yes -else case e in #( - e) enableml=no ;; -esac fi - ;; -esac + fi - ;; -esac + fi - if test "x$enableml" != "xno" + + # If PETSc is still enabled at this point, do the required AC_SUBST + # and AC_DEFINE commands. This prevents libmesh_config.h from having + # confusing information in it if the test compilation steps fail. + if test $enablepetsc != no then : -printf "%s\n" "#define TRILINOS_HAVE_ML 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with ML support >>>" >&5 -printf "%s\n" "<<< Configuring library with ML support >>>" >&6; } -fi - as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/Tpetra_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/Tpetra_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabletpetra=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/Tpetra_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/Tpetra_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabletpetra=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/tpetra/src/Tpetra_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/tpetra/src/Tpetra_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabletpetra=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/tpetra/core/src/TpetraCore_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/tpetra/core/src/TpetraCore_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabletpetra=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/TpetraCore_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/TpetraCore_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabletpetra=yes -else case e in #( - e) enabletpetra=no ;; -esac -fi - ;; -esac -fi - ;; -esac -fi - ;; -esac -fi - ;; -esac -fi - if test "x$enabletpetra" != "xno" -then : +printf "%s\n" "#define DETECTED_PETSC_VERSION_MAJOR $petscmajor" >>confdefs.h -printf "%s\n" "#define TRILINOS_HAVE_TPETRA 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with TPetra support >>>" >&5 -printf "%s\n" "<<< Configuring library with TPetra support >>>" >&6; } +printf "%s\n" "#define DETECTED_PETSC_VERSION_MINOR $petscminor" >>confdefs.h -fi - as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/DataTransferKit_config.hpp" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/DataTransferKit_config.hpp" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabledtk=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/DataTransferKit_config.hpp" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/DataTransferKit_config.hpp" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabledtk=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/DataTransferKit/src/DataTransferKit_config.hpp" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/DataTransferKit/src/DataTransferKit_config.hpp" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabledtk=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/DataTransferKit/packages/Utils/src/DataTransferKitUtils_config.hpp" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/DataTransferKit/packages/Utils/src/DataTransferKitUtils_config.hpp" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabledtk=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/DataTransferKitUtils_config.hpp" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/DataTransferKitUtils_config.hpp" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enabledtk=yes -else case e in #( - e) enabledtk=no ;; -esac -fi - ;; -esac -fi - ;; -esac -fi - ;; -esac -fi - ;; -esac -fi +printf "%s\n" "#define DETECTED_PETSC_VERSION_SUBMINOR $petscsubminor" >>confdefs.h - if test "x$enabledtk" != "xno" -then : -printf "%s\n" "#define TRILINOS_HAVE_DTK 1" >>confdefs.h +printf "%s\n" "#define DETECTED_PETSC_VERSION_RELEASE $petscrelease" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with DTK support >>>" >&5 -printf "%s\n" "<<< Configuring library with DTK support >>>" >&6; } -fi + petsc_use_debug=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_USE_DEBUG` + petsc_have_superlu_dist=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_SUPERLU_DIST` + petsc_have_mumps=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_MUMPS` + petsc_have_strumpack=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_STRUMPACK` + petsc_have_metis=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_METIS` + petsc_have_chaco=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_CHACO` + petsc_have_party=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_PARTY` + petsc_have_ptscotch=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_PTSCOTCH` + petsc_have_parmetis=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_PARMETIS` + petsc_have_hypre=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_HAVE_HYPRE` - as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/Ifpack_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/Ifpack_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enableifpack=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/ifpack/src/Ifpack_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/ifpack/src/Ifpack_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" + # Set a #define if PETSc was built with debugging enabled. Note + # that this token will appear as LIBMESH_PETSC_USE_DEBUG in our + # header, so it won't collide with PETSc's. It is safe to test + # the value of $petsc_use_debug, it is guaranteed to be either 0 + # or nonzero. + if test $petsc_use_debug -gt 0 then : - enableifpack=yes -else case e in #( - e) enableifpack=no ;; -esac -fi - ;; -esac -fi +printf "%s\n" "#define PETSC_USE_DEBUG 1" >>confdefs.h + +fi - if test "x$enableifpack" != "xno" + # Set a #define if PETSc was built with SuperLU_dist support + if test $petsc_have_superlu_dist -gt 0 then : +printf "%s\n" "#define PETSC_HAVE_SUPERLU_DIST 1" >>confdefs.h -printf "%s\n" "#define TRILINOS_HAVE_IFPACK 1" >>confdefs.h +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos Ifpack support >>>" >&5 -printf "%s\n" "<<< Configuring library with Trilinos Ifpack support >>>" >&6; } + # Set a #define if PETSc was built with MUMPS support + if test $petsc_have_mumps -gt 0 +then : + +printf "%s\n" "#define PETSC_HAVE_MUMPS 1" >>confdefs.h fi - as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/EpetraExt_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/EpetraExt_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enableepetraext=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/epetraext/src/EpetraExt_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/epetraext/src/EpetraExt_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" + # Set a #define if PETSc was built with STRUMPACK support + if test $petsc_have_strumpack -gt 0 then : - enableepetraext=yes -else case e in #( - e) enableepetraext=no ;; -esac -fi - ;; -esac -fi +printf "%s\n" "#define PETSC_HAVE_STRUMPACK 1" >>confdefs.h - if test "x$enableepetraext" != "xno" +fi + + # Set a #define if PETSc was built with Chaco support + if test $petsc_have_chaco -gt 0 then : +printf "%s\n" "#define PETSC_HAVE_CHACO 1" >>confdefs.h -printf "%s\n" "#define TRILINOS_HAVE_EPETRAEXT 1" >>confdefs.h +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos EpetraExt support >>>" >&5 -printf "%s\n" "<<< Configuring library with Trilinos EpetraExt support >>>" >&6; } + # Set a #define if PETSc was built with Party support + if test $petsc_have_party -gt 0 +then : + +printf "%s\n" "#define PETSC_HAVE_PARTY 1" >>confdefs.h fi - as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/Epetra_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/Epetra_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - enableepetra=yes -else case e in #( - e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/epetra/src/Epetra_config.h" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/epetra/src/Epetra_config.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" + # Set a #define if PETSc was built with PTScotch support + if test $petsc_have_ptscotch -gt 0 then : - enableepetra=yes -else case e in #( - e) enableepetra=no ;; -esac + +printf "%s\n" "#define PETSC_HAVE_PTSCOTCH 1" >>confdefs.h + fi - ;; -esac + + # Set a #define if PETSc was built with ParMETIS support + if test $petsc_have_parmetis -gt 0 +then : + +printf "%s\n" "#define PETSC_HAVE_PARMETIS 1" >>confdefs.h + fi + # Note: may be empty... - if test "x$enableepetra" != "xno" -then : -printf "%s\n" "#define TRILINOS_HAVE_EPETRA 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos Epetra support >>>" >&5 -printf "%s\n" "<<< Configuring library with Trilinos Epetra support >>>" >&6; } -fi -fi -else case e in #( - e) - enabletrilinos10=no - ;; -esac + if test $petsc_have_hypre -gt 0 +then : + +printf "%s\n" "#define HAVE_PETSC_HYPRE 1" >>confdefs.h + fi +printf "%s\n" "#define HAVE_PETSC 1" >>confdefs.h + - if test "x$enabletrilinos10" != "xno" + if test $petsc_have_tao != no then : - printf '%s\n' "include $TRILINOS_MAKEFILE_EXPORT" > Makefile_config_trilinos - printf '%s\n' "echo_libs:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(Trilinos_LIBRARIES) \$(Trilinos_LIBRARY_DIRS) \$(Trilinos_TPL_LIBRARIES) \$(Trilinos_TPL_LIBRARY_DIRS)" >> Makefile_config_trilinos - printf '%s\n' "echo_include:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(Trilinos_INCLUDE_DIRS) \$(Trilinos_TPL_INCLUDE_DIRS)" >> Makefile_config_trilinos +printf "%s\n" "#define HAVE_PETSC_TAO 1" >>confdefs.h - TRILINOS_INCLUDES=`make -sf Makefile_config_trilinos echo_include` - TRILINOS_LIBS=`make -sf Makefile_config_trilinos echo_libs` - rm -f Makefile_config_trilinos +fi fi - if test "x$RPATHFLAG" != "x" && test -d ${withtrilinosdir}/lib + # If PETSc is not enabled, but it *was* required, error out now + # instead of compiling libmesh in an invalid configuration. + if test "$enablepetsc" = "no" && test "$petscrequired" = "yes" then : - TRILINOS_LIBS="${RPATHFLAG}${withtrilinosdir}/lib $TRILINOS_LIBS" + as_fn_error 3 "*** PETSc was not found, but --enable-petsc-required was specified." "$LINENO" 5 fi + # If PETSc + Hypre is required, throw an error if we don't have it. + if test "x$petschyprerequired" = "xyes" && test $petsc_have_hypre -eq 0 +then : + as_fn_error 4 "*** PETSc with Hypre was not found, but --enable-petsc-hypre-required was specified." "$LINENO" 5 +fi - - if test "x$enabletrilinos10" = "xno" +fi +if test "x$enablepetsc" != "xno" then : + libmesh_optional_INCLUDES="$PETSCINCLUDEDIRS $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$PETSCLINKLIBS $libmesh_optional_LIBS" - if test "x$TRILINOS_DIR" = "x" -then : - TRILINOS_DIR=no +fi + if test x$enablepetsc = xyes; then + LIBMESH_ENABLE_PETSC_TRUE= + LIBMESH_ENABLE_PETSC_FALSE='#' +else + LIBMESH_ENABLE_PETSC_TRUE='#' + LIBMESH_ENABLE_PETSC_FALSE= fi +# ------------------------------------------------------------- -# Check whether --with-trilinos was given. -if test ${with_trilinos+y} -then : - withval=$with_trilinos; withtrilinosdir=$withval -else case e in #( - e) withtrilinosdir=$TRILINOS_DIR ;; -esac -fi - if test "x$withtrilinosdir" != "xno" +# ------------------------------------------------------------- +# Check for inconsistencies between PETSc and libmesh's scalar +# and index datatypes, and override $dof_bytes if reasonable. +# ------------------------------------------------------------- +if test $enablepetsc != no then : - if test -r $withtrilinosdir/include/Makefile.export.aztecoo + petsc_use_64bit_indices=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_USE_64BIT_INDICES` + + if test $petsc_use_64bit_indices -gt 0 && test "$dof_bytes_setting" != "explicit" then : - AZTECOO_MAKEFILE_EXPORT=$withtrilinosdir/include/Makefile.export.aztecoo -elif test -r $withtrilinosdir/packages/aztecoo/Makefile.export.aztecoo + if test $dof_bytes != "8" then : - AZTECOO_MAKEFILE_EXPORT=$withtrilinosdir/packages/aztecoo/Makefile.export.aztecoo -else case e in #( - e) enableaztecoo=no ;; -esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> adopting PETSc dof_id size: 8" >&5 +printf "%s\n" ">>> adopting PETSc dof_id size: 8" >&6; } fi + dof_bytes=8 + dof_bytes_setting="explicit" - if test "x$enableaztecoo" != "xno" +fi + if test $petsc_use_64bit_indices -gt 0 && test "$dof_bytes" != "8" then : + as_fn_error $? "<<< PETSc is using 64-bit indices, you must configure libmesh with --with-dof-id-bytes=8. >>>" "$LINENO" 5 +fi - enableaztecoo=yes + if test $petsc_use_64bit_indices = "0" && test "$dof_bytes_setting" != "explicit" +then : + if test $dof_bytes != "4" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> adopting PETSc dof_id size: 4" >&5 +printf "%s\n" ">>> adopting PETSc dof_id size: 4" >&6; } +fi + dof_bytes=4 + dof_bytes_setting="explicit" -printf "%s\n" "#define TRILINOS_HAVE_AZTECOO 1" >>confdefs.h +fi + if test "$petsc_use_64bit_indices" = "0" && test $dof_bytes -gt 4 +then : + as_fn_error $? "<<< PETSc is using 32-bit indices, you must configure libmesh with --with-dof-id-bytes=<1|2|4>. >>>" "$LINENO" 5 +fi - printf "%s\n" "#define HAVE_TRILINOS 1" >>confdefs.h + petsc_use_complex=`cat ${PETSC_DIR}/include/petscconf.h ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h 2>/dev/null | grep -c PETSC_USE_COMPLEX` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos 9 support >>>" >&5 -printf "%s\n" "<<< Configuring library with Trilinos 9 support >>>" >&6; } + if test $petsc_use_complex -gt 0 && test "$enablecomplex" = "no" +then : + as_fn_error $? "<<< PETSc was built with complex scalars, you must configure libmesh with --enable-complex. >>>" "$LINENO" 5 +fi + if test "$petsc_use_complex" = "0" && test "$enablecomplex" = "yes" +then : + as_fn_error $? "<<< PETSc was built with real scalars, you must configure libmesh with --disable-complex. >>>" "$LINENO" 5 fi -else case e in #( - e) enableaztecoo=no ;; -esac fi -# Check whether --with-nox was given. -if test ${with_nox+y} + +# ------------------------------------------------------------- +# SLEPc -- enabled by default +# ------------------------------------------------------------- + + # Check whether --enable-slepc was given. +if test ${enable_slepc+y} then : - withval=$with_nox; withnoxdir=$withval + enableval=$enable_slepc; case "${enableval}" in #( + yes) : + enableslepc=yes ;; #( + no) : + enableslepc=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-slepc" "$LINENO" 5 ;; +esac else case e in #( - e) withnoxdir=$TRILINOS_DIR ;; + e) enableslepc=$enablepetsc ;; esac fi + # if unspecified, infer from what's up with PETSc - if test "x$withnoxdir" != "xno" -then : - if test -r $withnoxdir/include/Makefile.export.nox + if test "$enableslepc" != no then : - NOX_MAKEFILE_EXPORT=$withnoxdir/include/Makefile.export.nox -elif test -r $withnoxdir/packages/nox/Makefile.export.nox + + if test "x$SLEPC_DIR" = "x" && test "x$PETSC_DIR" != "x" then : - NOX_MAKEFILE_EXPORT=$withnoxdir/packages/nox/Makefile.export.nox -else case e in #( - e) enablenox=no ;; -esac + export SLEPC_DIR=$PETSC_DIR fi - if test "x$enablenox" != "xno" + # It doesn't seem likely that we would find a /usr/lib/slepc + # when we already didn't find a /usr/lib/petsc (otherwise, + # PETSC_DIR would be set!) so let's rule that case out just + # to be safe. + if test "x$SLEPC_DIR" = "x" then : - enablenox=yes - -printf "%s\n" "#define TRILINOS_HAVE_NOX 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nox support >>>" >&5 -printf "%s\n" "<<< Configuring library with Nox support >>>" >&6; } + enableslepc=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Could not infer SLEPC_DIR from PETSC_DIR, SLEPc disabled. >>>" >&5 +printf "%s\n" "<<< Could not infer SLEPC_DIR from PETSC_DIR, SLEPc disabled. >>>" >&6; } fi -else case e in #( - e) enablenox=no ;; -esac -fi + if test "x$SLEPC_DIR" != "x" +then : + slepc_standalone=no + slepc_in_petsc_arch=no + slepc_in_usr_lib=no -# Check whether --with-ml was given. -if test ${with_ml+y} + as_ac_Header=`printf "%s\n" "ac_cv_header_$SLEPC_DIR/include/slepcversion.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$SLEPC_DIR/include/slepcversion.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - withval=$with_ml; withmldir=$withval -else case e in #( - e) withmldir=$TRILINOS_DIR ;; -esac + SLEPC_INCLUDE="-I$SLEPC_DIR/include" + slepc_standalone=yes fi - if test "x$withmldir" != "xno" + if test "x$slepc_standalone" != "xyes" && test "x$PETSC_ARCH" != "x" then : - if test -r $withmldir/include/Makefile.export.ml -then : - ML_MAKEFILE_EXPORT=$withmldir/include/Makefile.export.ml -elif test -r $withmldir/packages/nox/Makefile.export.ml + as_ac_Header=`printf "%s\n" "ac_cv_header_$SLEPC_DIR/$PETSC_ARCH/include/slepcversion.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$SLEPC_DIR/$PETSC_ARCH/include/slepcversion.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - ML_MAKEFILE_EXPORT=$withmldir/packages/nox/Makefile.export.ml -else case e in #( - e) enableml=no ;; -esac + SLEPC_INCLUDE="-I$SLEPC_DIR/$PETSC_ARCH/include" + slepc_in_petsc_arch=yes fi - if test "x$enableml" != "xno" -then : - enableml=yes +fi -printf "%s\n" "#define TRILINOS_HAVE_ML 1" >>confdefs.h + if test "x$slepc_standalone" != "xyes" && test "x$slepc_in_petsc_arch" != "xyes" +then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with ML support >>>" >&5 -printf "%s\n" "<<< Configuring library with ML support >>>" >&6; } + ac_fn_cxx_check_header_compile "$LINENO" "/usr/lib/slepc/slepcversion.h" "ac_cv_header__usr_lib_slepc_slepcversion_h" "$ac_includes_default" +if test "x$ac_cv_header__usr_lib_slepc_slepcversion_h" = xyes +then : -fi + export SLEPC_DIR=/usr/lib/slepc + SLEPC_INCLUDE="-I$SLEPC_DIR/include" else case e in #( - e) enableml=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< No valid SLEPC installation found, SLEPc disabled. >>>" >&5 +printf "%s\n" "<<< No valid SLEPC installation found, SLEPc disabled. >>>" >&6; } + unset SLEPC_DIR + enableslepc=no + ;; esac fi -# Check whether --with-tpetra was given. -if test ${with_tpetra+y} -then : - withval=$with_tpetra; withtpetradir=$withval -else case e in #( - e) withtpetradir=$TRILINOS_DIR ;; -esac fi +fi - if test "x$withtpetradir" != "xno" -then : - - if test -r $withtpetradir/include/Makefile.export.Tpetra + if test "x$PETSC_ARCH" != "x" then : - TPETRA_MAKEFILE_EXPORT=$withtpetradir/include/Makefile.export.Tpetra -elif test -r $withtpetradir/packages/tpetra/Makefile.export.Tpetra + as_ac_Header=`printf "%s\n" "ac_cv_header_$SLEPC_DIR/$PETSC_ARCH/include/slepcconf.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$SLEPC_DIR/$PETSC_ARCH/include/slepcconf.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - TPETRA_MAKEFILE_EXPORT=$withtpetradir/packages/tpetra/Makefile.export.Tpetra -else case e in #( - e) enabletpetra=no ;; -esac + SLEPC_INCLUDE="$SLEPC_INCLUDE -I$SLEPC_DIR/$PETSC_ARCH/include" fi - if test "x$enabletpetra" != "xno" -then : - - enabletpetra=yes +fi -printf "%s\n" "#define TRILINOS_HAVE_TPETRA 1" >>confdefs.h +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Tpetra support >>>" >&5 -printf "%s\n" "<<< Configuring library with Tpetra support >>>" >&6; } + if test "x$enableslepc" = "xyes" +then : + slepc_version_header=$SLEPC_DIR/$PETSC_ARCH/include/slepcversion.h + if test "x$slepc_in_petsc_arch" != "xyes" +then : + slepc_version_header=$SLEPC_DIR/include/slepcversion.h fi -else case e in #( - e) enabletpetra=no ;; -esac -fi + slepcmajor=`grep "define SLEPC_VERSION_MAJOR" $slepc_version_header | sed -e "s/#define SLEPC_VERSION_MAJOR[ ]*//g"` + slepcminor=`grep "define SLEPC_VERSION_MINOR" $slepc_version_header | sed -e "s/#define SLEPC_VERSION_MINOR[ ]*//g"` + slepcsubminor=`grep "define SLEPC_VERSION_SUBMINOR" $slepc_version_header | sed -e "s/#define SLEPC_VERSION_SUBMINOR[ ]*//g"` + slepcversion=$slepcmajor.$slepcminor.$slepcsubminor + oldpetsc=no + if test $petscmajor -lt 3 +then : + oldpetsc=yes +fi + if test "$petscmajor" = "3" && test $petscminor -lt 4 +then : + oldpetsc=yes +fi + if test "$oldpetsc" = "yes" && test "$slepcversion" != "$petscversion" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< WARNING: PETSc version $petscversion does not match SLEPc version $slepcversion >>>" >&5 +printf "%s\n" "<<< WARNING: PETSc version $petscversion does not match SLEPc version $slepcversion >>>" >&6; } +fi -# Check whether --with-dtk was given. -if test ${with_dtk+y} + if test "$slepcmajor" != "$petscmajor" || test "$slepcminor" != "$petscminor" then : - withval=$with_dtk; withdtkdir=$withval -else case e in #( - e) withdtkdir=$TRILINOS_DIR ;; -esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< WARNING: PETSc version $petscmajor.$petscminor does not match SLEPc version $slepcmajor.$slepcminor >>>" >&5 +printf "%s\n" "<<< WARNING: PETSc version $petscmajor.$petscminor does not match SLEPc version $slepcmajor.$slepcminor >>>" >&6; } fi + includefile="" - if test "x$withdtkdir" != "xno" + if test -r ${SLEPC_DIR}/bmake/${PETSC_ARCH}/slepcconf then : - - if test -r $withdtkdir/include/Makefile.export.DataTransferKit + includefile=${SLEPC_DIR}/bmake/${PETSC_ARCH}/slepcconf +elif test -r ${SLEPC_DIR}/conf/slepc_common_variables then : - DTK_MAKEFILE_EXPORT=$withdtkdir/include/Makefile.export.Makefile.export.DataTransferKit -elif test -r $withdtkdir/DataTransferKit/Makefile.export.Makefile.export.DataTransferKit + includefile=${SLEPC_DIR}/conf/slepc_common_variables +elif test -r ${SLEPC_DIR}/conf/slepc_variables then : - DTK_MAKEFILE_EXPORT=$withdtkdir/packages/dtk/Makefile.export.Makefile.export.DataTransferKit + includefile=${SLEPC_DIR}/conf/slepc_variables +elif test -r ${SLEPC_DIR}/lib/slepc/conf/slepc_variables +then : + includefile=${SLEPC_DIR}/lib/slepc/conf/slepc_variables +elif test -r ${SLEPC_DIR}/${PETSC_ARCH}/lib/slepc/conf/slepc_variables +then : + includefile=${SLEPC_DIR}/${PETSC_ARCH}/lib/slepc/conf/slepc_variables else case e in #( - e) enabledtk=no ;; + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< SLEPc configuration failed. Could not find slepcconf/slepc_variables file. >>>" >&5 +printf "%s\n" "<<< SLEPc configuration failed. Could not find slepcconf/slepc_variables file. >>>" >&6; } + enableslepc=no ;; esac fi - if test "x$enabledtk" != "xno" + if test "x$enableslepc" = "xyes" && test "x$includefile" != "x" then : - enabledtk=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Querying SLEPc configuration from $includefile >>>" >&5 +printf "%s\n" "<<< Querying SLEPc configuration from $includefile >>>" >&6; } + printf '%s\n' "include $includefile" > Makefile_config_slepc + printf '%s\n' "getSLEPC_LIBS:" >> Makefile_config_slepc + printf '\t%s\n' "echo \$(SLEPC_LIB) \$(ARPACK_LIB)" >> Makefile_config_slepc -printf "%s\n" "#define TRILINOS_HAVE_DTK 1" >>confdefs.h + SLEPC_LIBS=`make -s -f Makefile_config_slepc getSLEPC_LIBS` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with DTK support >>>" >&5 -printf "%s\n" "<<< Configuring library with DTK support >>>" >&6; } + if test x$? = x0 +then : -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile a trivial SLEPc program" >&5 +printf %s "checking whether we can compile a trivial SLEPc program... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -else case e in #( - e) enabledtk=no ;; -esac -fi + saveCXXFLAGS="$CXXFLAGS" + CXXFLAGS="$saveCXXFLAGS $PETSCINCLUDEDIRS $SLEPC_INCLUDE" - enableifpack=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - enableepetraext=no - enableepetra=no + #include + static char help[]=""; + + int main(int argc, char **argv) + { + auto ierr = SlepcInitialize(&argc, &argv, (char*)0, help); + CHKERRQ(ierr); + ierr = SlepcFinalize(); + CHKERRQ(ierr); + return 0; + } +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with SLEPc version $slepcversion support >>>" >&5 +printf "%s\n" "<<< Configuring library with SLEPc version $slepcversion support >>>" >&6; } +printf "%s\n" "#define HAVE_SLEPC 1" >>confdefs.h +printf "%s\n" "#define DETECTED_SLEPC_VERSION_MAJOR $slepcmajor" >>confdefs.h - if test "x$enableml" = xyes || test "x$enableaztecoo" = xyes || test "x$enablenox" = xyes -then : - enabletrilinos9=yes +printf "%s\n" "#define DETECTED_SLEPC_VERSION_MINOR $slepcminor" >>confdefs.h + + + +printf "%s\n" "#define DETECTED_SLEPC_VERSION_SUBMINOR $slepcsubminor" >>confdefs.h + + else case e in #( - e) enabletrilinos9=no ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Compiling trivial SLEPc program failed. SLEPc disabled. >>>" >&5 +printf "%s\n" "<<< Compiling trivial SLEPc program failed. SLEPc disabled. >>>" >&6; } + enableslepc=no + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - if test "x$enableaztecoo" != "xno" -then : - - printf '%s\n' "include $AZTECOO_MAKEFILE_EXPORT" > Makefile_config_trilinos - printf '%s\n' "echo_libs:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(AZTECOO_LIBS)" >> Makefile_config_trilinos - printf '%s\n' "echo_include:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(AZTECOO_INCLUDES)" >> Makefile_config_trilinos + CXXFLAGS="$saveCXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - AZTECOO_INCLUDES=`make -sf Makefile_config_trilinos echo_include` - AZTECOO_LIBS=`make -sf Makefile_config_trilinos echo_libs` - rm -f Makefile_config_trilinos +else case e in #( + e) + enableslepc=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< SLEPc configuration query failed. SLEPc disabled. >>>" >&5 +printf "%s\n" "<<< SLEPc configuration query failed. SLEPc disabled. >>>" >&6; } + ;; +esac fi - if test "x$enablenox" != "xno" -then : - - printf '%s\n' "include $NOX_MAKEFILE_EXPORT" > Makefile_config_trilinos - printf '%s\n' "echo_libs:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(NOX_LIBS)" >> Makefile_config_trilinos - printf '%s\n' "echo_include:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(NOX_INCLUDES)" >> Makefile_config_trilinos + rm -f Makefile_config_slepc - NOX_INCLUDES=`make -sf Makefile_config_trilinos echo_include` - NOX_LIBS=`make -sf Makefile_config_trilinos echo_libs` - rm -f Makefile_config_trilinos +fi fi - if test "x$enableml" != "xno" +if test $enableslepc = yes then : - printf '%s\n' "include $ML_MAKEFILE_EXPORT" > Makefile_config_trilinos - printf '%s\n' "echo_libs:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(ML_LIBS)" >> Makefile_config_trilinos - printf '%s\n' "echo_include:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(ML_INCLUDES)" >> Makefile_config_trilinos - - ML_INCLUDES=`make -sf Makefile_config_trilinos echo_include` - ML_LIBS=`make -sf Makefile_config_trilinos echo_libs` - rm -f Makefile_config_trilinos + libmesh_optional_INCLUDES="$SLEPC_INCLUDE $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$SLEPC_LIBS $libmesh_optional_LIBS" +fi + if test x$enableslepc = xyes; then + LIBMESH_ENABLE_SLEPC_TRUE= + LIBMESH_ENABLE_SLEPC_FALSE='#' +else + LIBMESH_ENABLE_SLEPC_TRUE='#' + LIBMESH_ENABLE_SLEPC_FALSE= fi - if test "x$enabletpetra" != "xno" -then : +# ------------------------------------------------------------- - printf '%s\n' "include $TPETRA_MAKEFILE_EXPORT" > Makefile_config_trilinos - printf '%s\n' "echo_libs:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(TPETRA_LIBS)" >> Makefile_config_trilinos - printf '%s\n' "echo_include:" >> Makefile_config_trilinos - printf '\t%s\n' "@echo \$(TPETRA_INCLUDES)" >> Makefile_config_trilinos - TPETRA_INCLUDES=`make -sf Makefile_config_trilinos echo_include` - TPETRA_LIBS=`make -sf Makefile_config_trilinos echo_libs` - rm -f Makefile_config_trilinos +# ------------------------------------------------------------- +# "Trilinos" -- enabled by default unless we're building with +# complex numbers. +# ------------------------------------------------------------- + + # Check whether --enable-trilinos was given. +if test ${enable_trilinos+y} +then : + enableval=$enable_trilinos; case "${enableval}" in #( + yes) : + enabletrilinos=yes ;; #( + no) : + enabletrilinos=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-trilinos" "$LINENO" 5 ;; +esac +else case e in #( + e) enabletrilinos=$enableoptional ;; +esac fi + if test "$enabletrilinos" = yes && test "$dof_bytes" != "4" +then : + + enabletrilinos=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Trilinos disabled, requires --with-dof-id-bytes=4 >>>" >&5 +printf "%s\n" "<<< Trilinos disabled, requires --with-dof-id-bytes=4 >>>" >&6; } +fi + if test "x$enabletrilinos" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Whether MPI is available for Trilinos" >&5 +printf %s "checking Whether MPI is available for Trilinos... " >&6; } + if test "x$enablempi" = "xno" +then : + enabletrilinos=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ;; +esac +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Whether Real precision is compatible with Trilinos" >&5 +printf %s "checking Whether Real precision is compatible with Trilinos... " >&6; } + if test "x$enablesingleprecision" != "xno" || test "x$enabletripleprecision" != "xno" || test "x$enablequadrupleprecision" != "xno" +then : + enabletrilinos=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } - if test "x$enabletrilinos9" = "xno" -then : - enabletrilinos=no +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ;; +esac fi fi -fi -fi -if test "$enabletrilinos" = yes + if test "x$enablecomplex" = "xno" then : - libmesh_optional_INCLUDES="$TRILINOS_INCLUDES $AZTECOO_INCLUDES $NOX_INCLUDES $ML_INCLUDES $TPETRA_INCLUDES $DTK_INCLUDES $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$TRILINOS_LIBS $AZTECOO_LIBS $NOX_LIBS $ML_LIBS $TPETRA_INCLUDES $DTK_INCLUDES $libmesh_optional_LIBS" - -fi -# ------------------------------------------------------------- + if test "x$enabletrilinos" != "xno" +then : -# ------------------------------------------------------------- -# NVTX -- enabled by default -# ------------------------------------------------------------- + if test "x$TRILINOS_DIR" = "x" +then : - # Check whether --enable-nvtx was given. -if test ${enable_nvtx+y} + if test -d /usr/include/trilinos then : - enableval=$enable_nvtx; case "${enableval}" in #( - yes) : - enablenvtx=yes ;; #( - no) : - enablenvtx=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-nvtx" "$LINENO" 5 ;; -esac + TRILINOS_DIR=/usr/include/trilinos else case e in #( - e) enablenvtx=$enableoptional ;; + e) TRILINOS_DIR=no ;; esac fi - - if test "x$enablenvtx" = "xyes" -then : +fi -# Check whether --with-nvtx was given. -if test ${with_nvtx+y} +# Check whether --with-trilinos was given. +if test ${with_trilinos+y} then : - withval=$with_nvtx; withnvtx=$withval + withval=$with_trilinos; withtrilinosdir=$withval else case e in #( - e) withnvtx=$NVTX_DIR ;; + e) withtrilinosdir=$TRILINOS_DIR ;; esac fi - if test "$withnvtx" != no + if test "x$withtrilinosdir" != "xno" then : - if test "x$withnvtx" = "x" -then : - withnvtx=/usr -fi - as_ac_Header=`printf "%s\n" "ac_cv_header_$withnvtx/include/nvtx3/nvtx3.hpp" | sed "$as_sed_sh"` -ac_fn_cxx_check_header_compile "$LINENO" "$withnvtx/include/nvtx3/nvtx3.hpp" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" + if test -r $withtrilinosdir/include/Makefile.export.Trilinos then : - NVTX_INCLUDE_PATH=$withnvtx/include -fi - - -fi - - if test -r $NVTX_INCLUDE_PATH/nvtx3/nvtx3.hpp + TRILINOS_MAKEFILE_EXPORT=$withtrilinosdir/include/Makefile.export.Trilinos +elif test -r $withtrilinosdir/Makefile.export.Trilinos then : - - NVTX_INCLUDE=-I$NVTX_INCLUDE_PATH - + TRILINOS_MAKEFILE_EXPORT=$withtrilinosdir/Makefile.export.Trilinos else case e in #( - e) enablenvtx=no ;; + e) enabletrilinos10=no ;; esac fi - if test "x$enablenvtx" != "xno" + if test "x$enabletrilinos10" != "xno" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nvtx3::mark support" >&5 -printf %s "checking for nvtx3::mark support... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + enabletrilinos10=yes + trilinosversionstring=`grep "define TRILINOS_VERSION_STRING" $withtrilinosdir/include/Trilinos_version.h | sed -e "s/#define TRILINOS_VERSION_STRING[ ]*//g" | tr -d '"'` - saveCXXFLAGS="$CXXFLAGS" - CXXFLAGS="$saveCXXFLAGS $NVTX_INCLUDE" + if test "x$trilinosversionstring" = "x" +then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + trilinosversionstring=`grep "define TRILINOS_MAJOR_VERSION" $withtrilinosdir/include/Trilinos_version.h | sed -e "s/#define TRILINOS_MAJOR_VERSION[ ]*//g"` - #include +fi -int -main (void) -{ + if test "x$trilinosversionstring" = "x" +then : + trilinosversionstring=10+ +fi - nvtx3::mark("Hello world!"); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +printf "%s\n" "#define HAVE_TRILINOS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - enablenvtx=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos $trilinosversionstring support >>>" >&5 +printf "%s\n" "<<< Configuring library with Trilinos $trilinosversionstring support >>>" >&6; } + as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/AztecOO_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/AztecOO_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enableaztecoo=yes else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - enablenvtx=no - ;; + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/AztecOO_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/AztecOO_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enableaztecoo=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/aztecoo/src/AztecOO_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/aztecoo/src/AztecOO_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enableaztecoo=yes +else case e in #( + e) enableaztecoo=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - CXXFLAGS=$saveCXXFLAGS - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - + ;; +esac +fi + ;; +esac fi - if test "x$enablenvtx" != "xno" -then : + if test "x$enableaztecoo" != "xno" +then : -printf "%s\n" "#define HAVE_NVTX_API 1" >>confdefs.h +printf "%s\n" "#define TRILINOS_HAVE_AZTECOO 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NVTX annotation support >>>" >&5 -printf "%s\n" "<<< Configuring library with NVTX annotation support >>>" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with AztecOO support >>>" >&5 +printf "%s\n" "<<< Configuring library with AztecOO support >>>" >&6; } fi + as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/NOX_Config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/NOX_Config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enablenox=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/NOX_Config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/NOX_Config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enablenox=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/nox/src/NOX_Config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/nox/src/NOX_Config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enablenox=yes +else case e in #( + e) enablenox=no ;; +esac +fi + ;; +esac +fi + ;; +esac fi -if test "$enablenvtx" = yes + + if test "x$enablenox" != "xno" then : - libmesh_optional_INCLUDES="$NVTX_INCLUDE $libmesh_optional_INCLUDES" -fi -# -------------------------------------------------------------- +printf "%s\n" "#define TRILINOS_HAVE_NOX 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NOX support >>>" >&5 +printf "%s\n" "<<< Configuring library with NOX support >>>" >&6; } -# ------------------------------------------------------------- -# Choose between TBB, OpenMP, and pthreads thread models. -# The user can control this by configuring with -# -# --with-thread-model={tbb,pthread,auto,none} -# -# where "auto" will try to automatically detect the best possible -# version (see threads.m4). -# ------------------------------------------------------------- +fi + as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/ml_include.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/ml_include.h" "$as_ac_Header" " + #ifdef HAVE_PETSC + #undef HAVE_PETSC + #endif -# Check whether --with-thread-model was given. -if test ${with_thread_model+y} +" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - withval=$with_thread_model; case "${withval}" in #( - tbb) : - requested_thread_model=tbb ;; #( - pthread) : - requested_thread_model=pthread ;; #( - pthreads) : - requested_thread_model=pthread ;; #( - openmp) : - requested_thread_model=openmp ;; #( - auto) : - requested_thread_model=auto ;; #( - none) : - requested_thread_model=none ;; #( - *) : - as_fn_error $? "bad value ${withval} for --with-thread-model" "$LINENO" 5 ;; -esac + enableml=yes else case e in #( - e) requested_thread_model=auto ;; -esac -fi - + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/ml_include.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/ml_include.h" "$as_ac_Header" " + #ifdef HAVE_PETSC + #undef HAVE_PETSC + #endif - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< User requested thread model: $requested_thread_model >>>" >&5 -printf "%s\n" "<<< User requested thread model: $requested_thread_model >>>" >&6; } +" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enableml=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/ml/src/ml_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/ml/src/ml_config.h" "$as_ac_Header" " + #ifdef HAVE_PETSC + #undef HAVE_PETSC + #endif - # Check whether --enable-openmp was given. -if test ${enable_openmp+y} +" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - enableval=$enable_openmp; case "${enableval}" in #( - yes) : - enableopenmp=yes ;; #( - no) : - enableopenmp=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-openmp" "$LINENO" 5 ;; -esac + enableml=yes else case e in #( - e) enableopenmp=yes ;; + e) enableml=no ;; +esac +fi + ;; +esac +fi + ;; esac fi - if test "x$enableopenmp" = "xyes" + if test "x$enableml" != "xno" then : - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +printf "%s\n" "#define TRILINOS_HAVE_ML 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with ML support >>>" >&5 +printf "%s\n" "<<< Configuring library with ML support >>>" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C++ compiler" >&5 -printf %s "checking for OpenMP flag of C++ compiler... " >&6; } -if test ${ax_cv_cxx_openmp+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) saveCXXFLAGS=$CXXFLAGS -ax_cv_cxx_openmp=unknown -# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), -# -qopenmp (icc>=15), -openmp (icc), -# -xopenmp (Sun), -omp (Tru64), -# -qsmp=omp (AIX), -# none -ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" -if test "x$OPENMP_CXXFLAGS" != x; then - ax_openmp_flags="$OPENMP_CXXFLAGS $ax_openmp_flags" fi -for ax_openmp_flag in $ax_openmp_flags; do - case $ax_openmp_flag in - none) CXXFLAGS=$saveCXX ;; - *) CXXFLAGS="$saveCXXFLAGS $ax_openmp_flag" ;; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -static void -parallel_fill(int * data, int n) -{ - int i; -#pragma omp parallel for - for (i = 0; i < n; ++i) - data[i] = i; -} -int -main(void) -{ - int arr[100000]; - omp_set_num_threads(2); - parallel_fill(arr, 100000); - return 0; -} - -_ACEOF -if ac_fn_cxx_try_link "$LINENO" + as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/Tpetra_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/Tpetra_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - ax_cv_cxx_openmp=$ax_openmp_flag; break + enabletpetra=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/Tpetra_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/Tpetra_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enabletpetra=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/tpetra/src/Tpetra_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/tpetra/src/Tpetra_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enabletpetra=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/tpetra/core/src/TpetraCore_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/tpetra/core/src/TpetraCore_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enabletpetra=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/TpetraCore_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/TpetraCore_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enabletpetra=yes +else case e in #( + e) enabletpetra=no ;; +esac +fi + ;; +esac +fi + ;; +esac +fi + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -done -CXXFLAGS=$saveCXXFLAGS ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_openmp" >&5 -printf "%s\n" "$ax_cv_cxx_openmp" >&6; } -if test "x$ax_cv_cxx_openmp" = "xunknown"; then - enableopenmp=no -else - if test "x$ax_cv_cxx_openmp" != "xnone"; then - OPENMP_CXXFLAGS=$ax_cv_cxx_openmp - fi -printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h -fi + if test "x$enabletpetra" != "xno" +then : - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +printf "%s\n" "#define TRILINOS_HAVE_TPETRA 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with TPetra support >>>" >&5 +printf "%s\n" "<<< Configuring library with TPetra support >>>" >&6; } +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C compiler" >&5 -printf %s "checking for OpenMP flag of C compiler... " >&6; } -if test ${ax_cv_c_openmp+y} + as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/DataTransferKit_config.hpp" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/DataTransferKit_config.hpp" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - printf %s "(cached) " >&6 + enabledtk=yes else case e in #( - e) saveCFLAGS=$CFLAGS -ax_cv_c_openmp=unknown -# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), -# -qopenmp (icc>=15), -openmp (icc), -# -xopenmp (Sun), -omp (Tru64), -# -qsmp=omp (AIX), -# none -ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" -if test "x$OPENMP_CFLAGS" != x; then - ax_openmp_flags="$OPENMP_CFLAGS $ax_openmp_flags" + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/DataTransferKit_config.hpp" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/DataTransferKit_config.hpp" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enabledtk=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/DataTransferKit/src/DataTransferKit_config.hpp" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/DataTransferKit/src/DataTransferKit_config.hpp" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enabledtk=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/DataTransferKit/packages/Utils/src/DataTransferKitUtils_config.hpp" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/DataTransferKit/packages/Utils/src/DataTransferKitUtils_config.hpp" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enabledtk=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/DataTransferKitUtils_config.hpp" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/DataTransferKitUtils_config.hpp" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enabledtk=yes +else case e in #( + e) enabledtk=no ;; +esac +fi + ;; +esac +fi + ;; +esac +fi + ;; +esac +fi + ;; +esac fi -for ax_openmp_flag in $ax_openmp_flags; do - case $ax_openmp_flag in - none) CFLAGS=$saveC ;; - *) CFLAGS="$saveCFLAGS $ax_openmp_flag" ;; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -static void -parallel_fill(int * data, int n) -{ - int i; -#pragma omp parallel for - for (i = 0; i < n; ++i) - data[i] = i; -} + if test "x$enabledtk" != "xno" +then : -int -main(void) -{ - int arr[100000]; - omp_set_num_threads(2); - parallel_fill(arr, 100000); - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ax_cv_c_openmp=$ax_openmp_flag; break +printf "%s\n" "#define TRILINOS_HAVE_DTK 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with DTK support >>>" >&5 +printf "%s\n" "<<< Configuring library with DTK support >>>" >&6; } + fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -done -CFLAGS=$saveCFLAGS - ;; + + + as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/Ifpack_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/Ifpack_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enableifpack=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/ifpack/src/Ifpack_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/ifpack/src/Ifpack_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enableifpack=yes +else case e in #( + e) enableifpack=no ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_openmp" >&5 -printf "%s\n" "$ax_cv_c_openmp" >&6; } -if test "x$ax_cv_c_openmp" = "xunknown"; then - : -else - if test "x$ax_cv_c_openmp" != "xnone"; then - OPENMP_CFLAGS=$ax_cv_c_openmp - fi - -printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h - + ;; +esac fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "x$enablefortran" = "xyes" + if test "x$enableifpack" != "xno" then : - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu +printf "%s\n" "#define TRILINOS_HAVE_IFPACK 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos Ifpack support >>>" >&5 +printf "%s\n" "<<< Configuring library with Trilinos Ifpack support >>>" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of Fortran 77 compiler" >&5 -printf %s "checking for OpenMP flag of Fortran 77 compiler... " >&6; } -if test ${ax_cv_f77_openmp+y} +fi + + as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/EpetraExt_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/EpetraExt_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - printf %s "(cached) " >&6 + enableepetraext=yes else case e in #( - e) saveFFLAGS=$FFLAGS -ax_cv_f77_openmp=unknown -# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), -# -qopenmp (icc>=15), -openmp (icc), -# -xopenmp (Sun), -omp (Tru64), -# -qsmp=omp (AIX), -# none -ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" -if test "x$OPENMP_FFLAGS" != x; then - ax_openmp_flags="$OPENMP_FFLAGS $ax_openmp_flags" + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/epetraext/src/EpetraExt_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/epetraext/src/EpetraExt_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enableepetraext=yes +else case e in #( + e) enableepetraext=no ;; +esac +fi + ;; +esac fi -for ax_openmp_flag in $ax_openmp_flags; do - case $ax_openmp_flag in - none) FFLAGS=$saveF ;; - *) FFLAGS="$saveFFLAGS $ax_openmp_flag" ;; - esac - cat > conftest.$ac_ext <<_ACEOF -#include -static void -parallel_fill(int * data, int n) -{ - int i; -#pragma omp parallel for - for (i = 0; i < n; ++i) - data[i] = i; -} + if test "x$enableepetraext" != "xno" +then : -int -main(void) -{ - int arr[100000]; - omp_set_num_threads(2); - parallel_fill(arr, 100000); - return 0; -} -_ACEOF -if ac_fn_f77_try_link "$LINENO" +printf "%s\n" "#define TRILINOS_HAVE_EPETRAEXT 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos EpetraExt support >>>" >&5 +printf "%s\n" "<<< Configuring library with Trilinos EpetraExt support >>>" >&6; } + +fi + + as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/include/Epetra_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/include/Epetra_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - ax_cv_f77_openmp=$ax_openmp_flag; break + enableepetra=yes +else case e in #( + e) as_ac_Header=`printf "%s\n" "ac_cv_header_$withtrilinosdir/packages/epetra/src/Epetra_config.h" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withtrilinosdir/packages/epetra/src/Epetra_config.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + enableepetra=yes +else case e in #( + e) enableepetra=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -done -FFLAGS=$saveFFLAGS ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f77_openmp" >&5 -printf "%s\n" "$ax_cv_f77_openmp" >&6; } -if test "x$ax_cv_f77_openmp" = "xunknown"; then - : -else - if test "x$ax_cv_f77_openmp" != "xnone"; then - OPENMP_FFLAGS=$ax_cv_f77_openmp - fi -printf "%s\n" "#define HAVE_OPENMP 1" >>confdefs.h -fi + if test "x$enableepetra" != "xno" +then : - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +printf "%s\n" "#define TRILINOS_HAVE_EPETRA 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos Epetra support >>>" >&5 +printf "%s\n" "<<< Configuring library with Trilinos Epetra support >>>" >&6; } fi - if test "x$OPENMP_CFLAGS" != "x" -then : +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with C OpenMP support >>>" >&5 -printf "%s\n" "<<< Configuring library with C OpenMP support >>>" >&6; } - CFLAGS_OPT="$CFLAGS_OPT $OPENMP_CFLAGS" - CFLAGS_DBG="$CFLAGS_DBG $OPENMP_CFLAGS" - CFLAGS_DEVEL="$CFLAGS_DEVEL $OPENMP_CFLAGS" - CFLAGS_PROF="$CFLAGS_PROF $OPENMP_CFLAGS" - CFLAGS_OPROF="$CFLAGS_OPROF $OPENMP_CFLAGS" +else case e in #( + e) + enabletrilinos10=no + ;; +esac +fi -fi - if test "x$OPENMP_FFLAGS" != "x" + if test "x$enabletrilinos10" != "xno" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Fortran OpenMP support >>>" >&5 -printf "%s\n" "<<< Configuring library with Fortran OpenMP support >>>" >&6; } - FFLAGS="$FFLAGS $OPENMP_FFLAGS" + printf '%s\n' "include $TRILINOS_MAKEFILE_EXPORT" > Makefile_config_trilinos + printf '%s\n' "echo_libs:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(Trilinos_LIBRARIES) \$(Trilinos_LIBRARY_DIRS) \$(Trilinos_TPL_LIBRARIES) \$(Trilinos_TPL_LIBRARY_DIRS)" >> Makefile_config_trilinos + printf '%s\n' "echo_include:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(Trilinos_INCLUDE_DIRS) \$(Trilinos_TPL_INCLUDE_DIRS)" >> Makefile_config_trilinos + TRILINOS_INCLUDES=`make -sf Makefile_config_trilinos echo_include` + TRILINOS_LIBS=`make -sf Makefile_config_trilinos echo_libs` + rm -f Makefile_config_trilinos fi - if test "x$OPENMP_CXXFLAGS" != "x" + if test "x$RPATHFLAG" != "x" && test -d ${withtrilinosdir}/lib then : + TRILINOS_LIBS="${RPATHFLAG}${withtrilinosdir}/lib $TRILINOS_LIBS" +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with OpenMP support >>>" >&5 -printf "%s\n" "<<< Configuring library with OpenMP support >>>" >&6; } - CXXFLAGS_OPT="$CXXFLAGS_OPT $OPENMP_CXXFLAGS" - CXXFLAGS_DBG="$CXXFLAGS_DBG $OPENMP_CXXFLAGS" - CXXFLAGS_DEVEL="$CXXFLAGS_DEVEL $OPENMP_CXXFLAGS" - CXXFLAGS_PROF="$CXXFLAGS_PROF $OPENMP_CXXFLAGS" - CXXFLAGS_OPROF="$CXXFLAGS_OPROF $OPENMP_CXXFLAGS" -else case e in #( - e) if test "x$requested_thread_model" = "xopenmp" + + if test "x$enabletrilinos10" = "xno" then : - as_fn_error $? "requested openmp threading model, but C++ compiler does not support openmp." "$LINENO" 5 -fi ;; -esac + + + if test "x$TRILINOS_DIR" = "x" +then : + TRILINOS_DIR=no fi -else case e in #( - e) if test "x$requested_thread_model" = "xopenmp" + + +# Check whether --with-trilinos was given. +if test ${with_trilinos+y} then : - as_fn_error $? "requested openmp threading model, but --disable-openmp has been specified." "$LINENO" 5 -fi ;; + withval=$with_trilinos; withtrilinosdir=$withval +else case e in #( + e) withtrilinosdir=$TRILINOS_DIR ;; esac fi - found_thread_model=none - if test "x$requested_thread_model" = "xpthread" || test "x$requested_thread_model" = "xauto" || test "x$requested_thread_model" = "xopenmp" + if test "x$withtrilinosdir" != "xno" then : - # Check whether --enable-pthreads was given. -if test ${enable_pthreads+y} + if test -r $withtrilinosdir/include/Makefile.export.aztecoo then : - enableval=$enable_pthreads; case "${enableval}" in #( - yes) : - enablepthreads=yes ;; #( - no) : - enablepthreads=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-pthreads" "$LINENO" 5 ;; -esac + AZTECOO_MAKEFILE_EXPORT=$withtrilinosdir/include/Makefile.export.aztecoo +elif test -r $withtrilinosdir/packages/aztecoo/Makefile.export.aztecoo +then : + AZTECOO_MAKEFILE_EXPORT=$withtrilinosdir/packages/aztecoo/Makefile.export.aztecoo else case e in #( - e) enablepthreads=$enableoptional ;; + e) enableaztecoo=no ;; esac fi - - if test "x$enablepthreads" = "xyes" + if test "x$enableaztecoo" != "xno" then : + enableaztecoo=yes +printf "%s\n" "#define TRILINOS_HAVE_AZTECOO 1" >>confdefs.h -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + printf "%s\n" "#define HAVE_TRILINOS 1" >>confdefs.h -ax_pthread_ok=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Trilinos 9 support >>>" >&5 +printf "%s\n" "<<< Configuring library with Trilinos 9 support >>>" >&6; } -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. +fi -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -printf %s "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +else case e in #( + e) enableaztecoo=no ;; +esac +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (void); -int -main (void) -{ -return pthread_join (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + +# Check whether --with-nox was given. +if test ${with_nox+y} then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -printf "%s\n" "$ax_pthread_ok" >&6; } - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + withval=$with_nox; withnoxdir=$withval +else case e in #( + e) withnoxdir=$TRILINOS_DIR ;; +esac fi -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. + if test "x$withnoxdir" != "xno" +then : -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + if test -r $withnoxdir/include/Makefile.export.nox +then : + NOX_MAKEFILE_EXPORT=$withnoxdir/include/Makefile.export.nox +elif test -r $withnoxdir/packages/nox/Makefile.export.nox +then : + NOX_MAKEFILE_EXPORT=$withnoxdir/packages/nox/Makefile.export.nox +else case e in #( + e) enablenox=no ;; +esac +fi -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: + if test "x$enablenox" != "xno" +then : -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) + enablenox=yes -case ${host_os} in - solaris*) +printf "%s\n" "#define TRILINOS_HAVE_NOX 1" >>confdefs.h - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Nox support >>>" >&5 +printf "%s\n" "<<< Configuring library with Nox support >>>" >&6; } - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; +fi - darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" - ;; +else case e in #( + e) enablenox=no ;; esac +fi -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -printf %s "checking whether pthreads work without any flags... " >&6; } - ;; - - -*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 -printf %s "checking whether pthreads work with $flag... " >&6; } - PTHREAD_CFLAGS="$flag" - ;; - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ax_pthread_config+y} +# Check whether --with-ml was given. +if test ${with_ml+y} then : - printf %s "(cached) " >&6 + withval=$with_ml; withmldir=$withval else case e in #( - e) if test -n "$ax_pthread_config"; then - ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ax_pthread_config="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" -fi ;; + e) withmldir=$TRILINOS_DIR ;; esac fi -ax_pthread_config=$ac_cv_prog_ax_pthread_config -if test -n "$ax_pthread_config"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -printf "%s\n" "$ax_pthread_config" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 -printf %s "checking for the pthreads library -l$flag... " >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; } -int -main (void) -{ -pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + if test "x$withmldir" != "xno" then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -printf "%s\n" "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = xyes; then - break; - fi - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done + if test -r $withmldir/include/Makefile.export.ml +then : + ML_MAKEFILE_EXPORT=$withmldir/include/Makefile.export.ml +elif test -r $withmldir/packages/nox/Makefile.export.ml +then : + ML_MAKEFILE_EXPORT=$withmldir/packages/nox/Makefile.export.ml +else case e in #( + e) enableml=no ;; +esac fi -# Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -printf %s "checking for joinable pthread attribute... " >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -int attr = $attr; return attr /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + if test "x$enableml" != "xno" then : - attr_name=$attr; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 -printf "%s\n" "$attr_name" >&6; } - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then -printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $attr_name" >>confdefs.h + enableml=yes - fi +printf "%s\n" "#define TRILINOS_HAVE_ML 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 -printf %s "checking if more special flags are required for pthreads... " >&6; } - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - flag="-mt -D_REENTRANT" - fi - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 -printf "%s\n" "${flag}" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with ML support >>>" >&5 +printf "%s\n" "<<< Configuring library with ML support >>>" >&6; } + +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 -printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } -if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + e) enableml=no ;; +esac +fi - #include -int -main (void) -{ -int i = PTHREAD_PRIO_INHERIT; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + +# Check whether --with-tpetra was given. +if test ${with_tpetra+y} then : - ax_cv_PTHREAD_PRIO_INHERIT=yes + withval=$with_tpetra; withtpetradir=$withval else case e in #( - e) ax_cv_PTHREAD_PRIO_INHERIT=no ;; + e) withtpetradir=$TRILINOS_DIR ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - ;; + + + if test "x$withtpetradir" != "xno" +then : + + if test -r $withtpetradir/include/Makefile.export.Tpetra +then : + TPETRA_MAKEFILE_EXPORT=$withtpetradir/include/Makefile.export.Tpetra +elif test -r $withtpetradir/packages/tpetra/Makefile.export.Tpetra +then : + TPETRA_MAKEFILE_EXPORT=$withtpetradir/packages/tpetra/Makefile.export.Tpetra +else case e in #( + e) enabletpetra=no ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 -printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } - if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" + + if test "x$enabletpetra" != "xno" then : -printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + enabletpetra=yes + +printf "%s\n" "#define TRILINOS_HAVE_TPETRA 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Tpetra support >>>" >&5 +printf "%s\n" "<<< Configuring library with Tpetra support >>>" >&6; } fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" +else case e in #( + e) enabletpetra=no ;; +esac +fi - # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then - case $host_os in - aix*) - case "x/$CC" in #( - x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : - #handle absolute path differently from PATH based program lookup - case "x$CC" in #( - x/*) : - if as_fn_executable_p ${CC}_r -then : - PTHREAD_CC="${CC}_r" -fi ;; #( - *) : - for ac_prog in ${CC}_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_PTHREAD_CC+y} + + + +# Check whether --with-dtk was given. +if test ${with_dtk+y} then : - printf %s "(cached) " >&6 + withval=$with_dtk; withdtkdir=$withval else case e in #( - e) if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi ;; + e) withdtkdir=$TRILINOS_DIR ;; esac fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -printf "%s\n" "$PTHREAD_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + + + if test "x$withdtkdir" != "xno" +then : + + if test -r $withdtkdir/include/Makefile.export.DataTransferKit +then : + DTK_MAKEFILE_EXPORT=$withdtkdir/include/Makefile.export.Makefile.export.DataTransferKit +elif test -r $withdtkdir/DataTransferKit/Makefile.export.Makefile.export.DataTransferKit +then : + DTK_MAKEFILE_EXPORT=$withdtkdir/packages/dtk/Makefile.export.Makefile.export.DataTransferKit +else case e in #( + e) enabledtk=no ;; +esac fi + if test "x$enabledtk" != "xno" +then : - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - ;; -esac ;; #( - *) : - ;; + enabledtk=yes + +printf "%s\n" "#define TRILINOS_HAVE_DTK 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with DTK support >>>" >&5 +printf "%s\n" "<<< Configuring library with DTK support >>>" >&6; } + +fi + +else case e in #( + e) enabledtk=no ;; esac - ;; - esac - fi fi -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + enableifpack=no + + enableepetraext=no + enableepetra=no -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then -printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h - : -else - ax_pthread_ok=no -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "x$ax_pthread_ok" = "xyes" -then : -printf "%s\n" "#define USING_THREADS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with pthread support >>>" >&5 -printf "%s\n" "<<< Configuring library with pthread support >>>" >&6; } - libmesh_optional_INCLUDES="$PTHREAD_CFLAGS $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$PTHREAD_LIBS $libmesh_optional_LIBS" - found_thread_model=pthread + if test "x$enableml" = xyes || test "x$enableaztecoo" = xyes || test "x$enablenox" = xyes +then : + enabletrilinos9=yes else case e in #( - e) enablepthreads=no ;; + e) enabletrilinos9=no ;; esac fi + if test "x$enableaztecoo" != "xno" +then : + + printf '%s\n' "include $AZTECOO_MAKEFILE_EXPORT" > Makefile_config_trilinos + printf '%s\n' "echo_libs:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(AZTECOO_LIBS)" >> Makefile_config_trilinos + printf '%s\n' "echo_include:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(AZTECOO_INCLUDES)" >> Makefile_config_trilinos + + AZTECOO_INCLUDES=`make -sf Makefile_config_trilinos echo_include` + AZTECOO_LIBS=`make -sf Makefile_config_trilinos echo_libs` + rm -f Makefile_config_trilinos + fi - if test "x$enablepthreads" = "xno" && test "x$requested_thread_model" = "xpthread" + if test "x$enablenox" != "xno" then : - as_fn_error $? "requested threading model, pthreads, could not be found." "$LINENO" 5 + + printf '%s\n' "include $NOX_MAKEFILE_EXPORT" > Makefile_config_trilinos + printf '%s\n' "echo_libs:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(NOX_LIBS)" >> Makefile_config_trilinos + printf '%s\n' "echo_include:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(NOX_INCLUDES)" >> Makefile_config_trilinos + + NOX_INCLUDES=`make -sf Makefile_config_trilinos echo_include` + NOX_LIBS=`make -sf Makefile_config_trilinos echo_libs` + rm -f Makefile_config_trilinos + fi - if test "x$enablepthreads" = "xno" && test "x$requested_thread_model" = "xopenmp" + + if test "x$enableml" != "xno" then : - as_fn_error $? "openmp threading model requested, but required pthread support unavailable." "$LINENO" 5 -fi + + printf '%s\n' "include $ML_MAKEFILE_EXPORT" > Makefile_config_trilinos + printf '%s\n' "echo_libs:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(ML_LIBS)" >> Makefile_config_trilinos + printf '%s\n' "echo_include:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(ML_INCLUDES)" >> Makefile_config_trilinos + + ML_INCLUDES=`make -sf Makefile_config_trilinos echo_include` + ML_LIBS=`make -sf Makefile_config_trilinos echo_libs` + rm -f Makefile_config_trilinos fi - if test "x$found_thread_model" = "xnone" + if test "x$enabletpetra" != "xno" then : - if test "x$requested_thread_model" = "xtbb" || test "x$requested_thread_model" = "xauto" -then : + printf '%s\n' "include $TPETRA_MAKEFILE_EXPORT" > Makefile_config_trilinos + printf '%s\n' "echo_libs:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(TPETRA_LIBS)" >> Makefile_config_trilinos + printf '%s\n' "echo_include:" >> Makefile_config_trilinos + printf '\t%s\n' "@echo \$(TPETRA_INCLUDES)" >> Makefile_config_trilinos + TPETRA_INCLUDES=`make -sf Makefile_config_trilinos echo_include` + TPETRA_LIBS=`make -sf Makefile_config_trilinos echo_libs` + rm -f Makefile_config_trilinos - # Check whether --enable-tbb was given. -if test ${enable_tbb+y} -then : - enableval=$enable_tbb; case "${enableval}" in #( - yes) : - enabletbb=yes ;; #( - no) : - enabletbb=no ;; #( - *) : - as_fn_error $? "bad value ${enableval} for --enable-tbb" "$LINENO" 5 ;; -esac -else case e in #( - e) enabletbb=$enableoptional ;; -esac fi - if test "x$enabletbb" = "xyes" -then : -# Check whether --with-tbb was given. -if test ${with_tbb+y} -then : - withval=$with_tbb; withtbb=$withval -else case e in #( - e) withtbb=$TBB_DIR ;; -esac -fi -# Check whether --with-tbb-lib was given. -if test ${with_tbb_lib+y} + + + + if test "x$enabletrilinos9" = "xno" then : - withval=$with_tbb_lib; withtbblib=$withval -else case e in #( - e) withtbblib=$TBB_LIB_PATH ;; -esac + enabletrilinos=no fi +fi - if test "$withtbb" != no -then : +fi - if test "x$withtbb" = "x" +fi + +if test "$enabletrilinos" = yes then : - withtbb=/usr + + libmesh_optional_INCLUDES="$TRILINOS_INCLUDES $AZTECOO_INCLUDES $NOX_INCLUDES $ML_INCLUDES $TPETRA_INCLUDES $DTK_INCLUDES $libmesh_optional_INCLUDES" + libmesh_optional_LIBS="$TRILINOS_LIBS $AZTECOO_LIBS $NOX_LIBS $ML_LIBS $TPETRA_INCLUDES $DTK_INCLUDES $libmesh_optional_LIBS" + fi +# ------------------------------------------------------------- - case $withtbb in - "~/"*) withtbb=$HOME${withtbb#"~"} ;; - esac - tbb_is_onetbb=no - if test -r $withtbb/include/tbb/version.h +# ------------------------------------------------------------- +# NVTX -- enabled by default +# ------------------------------------------------------------- + + # Check whether --enable-nvtx was given. +if test ${enable_nvtx+y} then : - TBB_INCLUDE_PATH=$withtbb/include - tbb_is_onetbb=yes + enableval=$enable_nvtx; case "${enableval}" in #( + yes) : + enablenvtx=yes ;; #( + no) : + enablenvtx=no ;; #( + *) : + as_fn_error $? "bad value ${enableval} for --enable-nvtx" "$LINENO" 5 ;; +esac else case e in #( - e) if test -r $withtbb/include/tbb/tbb_stddef.h -then : - TBB_INCLUDE_PATH=$withtbb/include -fi ;; + e) enablenvtx=$enableoptional ;; esac fi - if test "x$withtbblib" != "x" + + if test "x$enablenvtx" = "xyes" then : - TBB_LIBS=$withtbblib + + +# Check whether --with-nvtx was given. +if test ${with_nvtx+y} +then : + withval=$with_nvtx; withnvtx=$withval else case e in #( - e) TBB_LIBS=$withtbb/lib ;; + e) withnvtx=$NVTX_DIR ;; esac fi -fi - if test "x$TBB_INCLUDE_PATH" != "x" + if test "$withnvtx" != no then : - TBB_LIBRARY="-L$TBB_LIBS -ltbb -ltbbmalloc" - TBB_INCLUDE=-I$TBB_INCLUDE_PATH - - if test "x$RPATHFLAG" != "x" && test -d $TBB_LIBS + if test "x$withnvtx" = "x" then : - TBB_LIBRARY="${RPATHFLAG}${TBB_LIBS} $TBB_LIBRARY" + withnvtx=/usr fi - - if test "x$tbb_is_onetbb" = "xyes" + as_ac_Header=`printf "%s\n" "ac_cv_header_$withnvtx/include/nvtx3/nvtx3.hpp" | sed "$as_sed_sh"` +ac_fn_cxx_check_header_compile "$LINENO" "$withnvtx/include/nvtx3/nvtx3.hpp" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" then : - tbbverfile=$TBB_INCLUDE_PATH/tbb/version.h -else case e in #( - e) tbbverfile=$TBB_INCLUDE_PATH/tbb/tbb_stddef.h ;; -esac + NVTX_INCLUDE_PATH=$withnvtx/include fi - tbbmajor=`grep "define TBB_VERSION_MAJOR" $tbbverfile | sed -e "s/#define TBB_VERSION_MAJOR[ ]*//g"` - tbbminor=`grep "define TBB_VERSION_MINOR" $tbbverfile | sed -e "s/#define TBB_VERSION_MINOR[ ]*//g"` + + +fi + + if test -r $NVTX_INCLUDE_PATH/nvtx3/nvtx3.hpp +then : + + NVTX_INCLUDE=-I$NVTX_INCLUDE_PATH else case e in #( - e) enabletbb=no ;; + e) enablenvtx=no ;; esac fi - if test "x$enabletbb" != "xno" + if test "x$enablenvtx" != "xno" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TBB support" >&5 -printf %s "checking for TBB support... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nvtx3::mark support" >&5 +printf %s "checking for nvtx3::mark support... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -66828,20 +66917,19 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - saveCXXFLAGS="$CXXFLAGS" - CXXFLAGS="$saveCXXFLAGS $TBB_INCLUDE" + saveCXXFLAGS="$CXXFLAGS" + CXXFLAGS="$saveCXXFLAGS $NVTX_INCLUDE" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main (void) { - tbb::blocked_range r(0, 1); - (void)r.size(); + nvtx3::mark("Hello world!"); ; return 0; @@ -66852,19 +66940,20 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - enabletbb=yes + enablenvtx=yes else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - enabletbb=no + enablenvtx=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CXXFLAGS=$saveCXXFLAGS + CXXFLAGS=$saveCXXFLAGS + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -66874,115 +66963,27 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi - if test "x$enabletbb" != "xno" -then : - - -printf "%s\n" "#define DETECTED_TBB_VERSION_MAJOR $tbbmajor" >>confdefs.h - - -printf "%s\n" "#define DETECTED_TBB_VERSION_MINOR $tbbminor" >>confdefs.h - - - if test "x$tbb_is_onetbb" = "xyes" -then : - -printf "%s\n" "#define HAVE_ONETBB 1" >>confdefs.h - -fi - - - - -printf "%s\n" "#define USING_THREADS 1" >>confdefs.h - - -printf "%s\n" "#define HAVE_TBB_API 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Intel TBB threading support >>>" >&5 -printf "%s\n" "<<< Configuring library with Intel TBB threading support >>>" >&6; } - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 -printf %s "checking for thread local storage (TLS) class... " >&6; } - if test ${ac_cv_tls+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do - case $ax_tls_keyword in #( - none) : - ac_cv_tls=none ; break ;; #( - *) : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -static $ax_tls_keyword int bar; - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_tls=$ax_tls_keyword ; break -else case e in #( - e) ac_cv_tls=none - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; -esac - done - ;; -esac -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 -printf "%s\n" "$ac_cv_tls" >&6; } - - if test "$ac_cv_tls" != "none" + if test "x$enablenvtx" != "xno" then : -printf "%s\n" "#define TLS $ac_cv_tls" >>confdefs.h - : -else case e in #( - e) : ;; -esac -fi +printf "%s\n" "#define HAVE_NVTX_API 1" >>confdefs.h -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NVTX annotation support >>>" >&5 +printf "%s\n" "<<< Configuring library with NVTX annotation support >>>" >&6; } fi - if test "x$enabletbb" = "xyes" -then : - - libmesh_optional_INCLUDES="$TBB_INCLUDE $libmesh_optional_INCLUDES" - libmesh_optional_LIBS="$TBB_LIBRARY $libmesh_optional_LIBS" - found_thread_model=tbb - fi - if test "x$enabletbb" = "xno" && test "x$requested_thread_model" = "xtbb" +if test "$enablenvtx" = yes then : - as_fn_error $? "requested threading model, TBB, could not be found." "$LINENO" 5 -fi -fi + libmesh_optional_INCLUDES="$NVTX_INCLUDE $libmesh_optional_INCLUDES" fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Found thread model: $found_thread_model >>>" >&5 -printf "%s\n" "<<< Found thread model: $found_thread_model >>>" >&6; } - - +# -------------------------------------------------------------- # ------------------------------------------------------------- From e02e81d89bbeee236452bde77c13f4e92588a7d1 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Fri, 17 Jul 2026 15:01:09 -0500 Subject: [PATCH 41/41] Use cxxflags_extra in test_installed_headers --- contrib/bin/test_installed_headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/bin/test_installed_headers.sh b/contrib/bin/test_installed_headers.sh index 53538d03ed..8a475a49af 100755 --- a/contrib/bin/test_installed_headers.sh +++ b/contrib/bin/test_installed_headers.sh @@ -54,7 +54,7 @@ if test "$test_CXXFLAGS" = ""; then # testing_installed_tree="yes" if test "$PKG_CONFIG" != "no"; then - test_CXXFLAGS=$(pkg-config libmesh --cflags) + test_CXXFLAGS="$(pkg-config libmesh --cflags) $(pkg-config libmesh --variable=cxxflags_extra)" echo "Using pkg-config CXXFLAGS $test_CXXFLAGS" elif test -x $LIBMESH_CONFIG_PATH/libmesh-config; then