diff --git a/config/ompi_check_lustre.m4 b/config/ompi_check_lustre.m4 index 8c385bfe8f..9f97b5ff38 100644 --- a/config/ompi_check_lustre.m4 +++ b/config/ompi_check_lustre.m4 @@ -12,8 +12,10 @@ dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved dnl Copyright (c) 2008-2018 University of Houston. All rights reserved. -dnl Copyright (c) 2015 Research Organization for Information Science -dnl and Technology (RIST). All rights reserved. +dnl Copyright (c) 2015-2018 Research Organization for Information Science +dnl and Technology (RIST). All rights reserved. +dnl Copyright (c) 2020 Triad National Security, LLC. All rights +dnl reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -36,7 +38,6 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[ check_lustre_save_LDFLAGS="$LDFLAGS" check_lustre_save_CPPFLAGS="$CPPFLAGS" - check_lustre_configuration="none" ompi_check_lustre_happy="yes" # Get some configuration information @@ -46,25 +47,28 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[ OPAL_CHECK_WITHDIR([lustre], [$with_lustre], [include/lustre/lustreapi.h]) AS_IF([test "$with_lustre" = "no"], - [ompi_check_lustre_happy="no"], - [AS_IF([test -z "$with_lustre" || test "$with_lustre" = "yes"], - [ompi_check_lustre_dir="/usr"], - [ompi_check_lustre_dir=$with_lustre]) - - if test -e "$ompi_check_lustre_dir/lib64" ; then - ompi_check_lustre_libdir="$ompi_check_lustre_dir/lib64" - else - ompi_check_lustre_libdir="$ompi_check_lustre_dir/lib" - fi - - # Add correct -I and -L flags - OPAL_CHECK_PACKAGE([$1], [lustre/lustreapi.h], [lustreapi], [llapi_file_create], + [ompi_check_lustre_happy=no]) + + AS_IF([test "$ompi_check_lustre_happy" != "no" ], + [AC_MSG_CHECKING([looking for lustre libraries and header files in]) + AS_IF([test "$with_lustre" != "yes"], + [ompi_check_lustre_dir=$with_lustre + AC_MSG_RESULT([($ompi_check_lustre_dir)])], + [AC_MSG_RESULT([(default search paths)])]) + AS_IF([test -n "$with_lustre_libdir" && \ + test "$with_lustre_libdir" != "yes"], + [ompi_check_lustre_libdir=$with_lustre_libdir]) + ]) + + AS_IF([test "$ompi_check_lustre_happy" != "no" ], + [OPAL_CHECK_PACKAGE([$1], [lustre/lustreapi.h], [lustreapi], [llapi_file_create], [], [$ompi_check_lustre_dir], [$ompi_check_lustre_libdir], [ompi_check_lustre_happy="yes"], - [ompi_check_lustre_happy="no"]) + [ompi_check_lustre_happy="no"])]) - AC_MSG_CHECKING([for required lustre data structures]) - cat > conftest.c < conftest.c <