From 68a788c3c735d8dcf8949bbe8523afaa794e570e Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Mon, 15 Aug 2016 16:53:12 +0200 Subject: [PATCH 1/2] some fine tuning needed to make sure that the NeXus library is indeed found. --- configure.ac | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9fcdefdb..6f7547b7 100644 --- a/configure.ac +++ b/configure.ac @@ -586,7 +586,17 @@ AC_ARG_ENABLE([NeXus], [AS_HELP_STRING([--enable-NeXus],[build optional NeXus su ) AC_SUBST(NEXUS_PREFIX) if test "${NEXUS_FOUND}" != "1"; then - NEXUS_LIBS="-L${NEXUS_PREFIX}/lib64 -lNeXus" + if test -r ${NEXUS_PREFIX}/lib/libNeXus.so; then + NEXUS_LIB_DIR="lib" + elif test -r ${NEXUS_PREFIX}/lib64/libNeXus.so; then + NEXUS_LIB_DIR="lib64" + else + AC_MSG_ERROR( + [Couldn't find the NeXus library.] + ) + fi + + NEXUS_LIBS="-L${NEXUS_PREFIX}/${NEXUS_LIB_DIR} -lNeXus" NEXUS_CFLAGS="-I${NEXUS_PREFIX}/include/nexus" fi AC_SUBST(NEXUS_LIBS) From aae5762f7ce5342ce371928625b9eddd38fbc451 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Wed, 17 Aug 2016 08:27:13 +0200 Subject: [PATCH 2/2] yet another improvement for the new git-based NeXus versions >= 4.4 --- configure.ac | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6f7547b7..376584b8 100644 --- a/configure.ac +++ b/configure.ac @@ -586,9 +586,18 @@ AC_ARG_ENABLE([NeXus], [AS_HELP_STRING([--enable-NeXus],[build optional NeXus su ) AC_SUBST(NEXUS_PREFIX) if test "${NEXUS_FOUND}" != "1"; then - if test -r ${NEXUS_PREFIX}/lib/libNeXus.so; then + dnl get suffix for the NeXus library depending on the OS + AC_REQUIRE([AC_CANONICAL_HOST]) + AS_CASE([$host_os], + [linux*], [NEXUS_SUFFIX="so"], + [darwin*], [NEXUS_SUFFIX="dylib"], + [*cygwin*], [NEXUS_SUFFIX="dll"], + [AC_MSG_ERROR([NeXus check: Your platform is not currently supported])] + ) + AC_MSG_NOTICE([NeXus Suffix Result: "${NEXUS_SUFFIX}"]) + if test -r ${NEXUS_PREFIX}/lib/libNeXus.${NEXUS_SUFFIX}; then NEXUS_LIB_DIR="lib" - elif test -r ${NEXUS_PREFIX}/lib64/libNeXus.so; then + elif test -r ${NEXUS_PREFIX}/lib64/libNeXus.${NEXUS_SUFFIX}; then NEXUS_LIB_DIR="lib64" else AC_MSG_ERROR(