1
1

rework check lustre config to avoid rpath lib64

The original configury check for lustre was ending up rpathing in /usr/lib64 in
the compiler wrapper scripts.  This commit fixes that issue.

related to #7580

Signed-off-by: Howard Pritchard <hppritcha@gmail.com>
Этот коммит содержится в:
Howard Pritchard 2020-04-23 10:29:28 -06:00
родитель 53154756e1
Коммит ea690d008b

Просмотреть файл

@ -14,6 +14,8 @@ 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) 2008-2018 University of Houston. All rights reserved.
dnl Copyright (c) 2015-2018 Research Organization for Information Science dnl Copyright (c) 2015-2018 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved. dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2020 Triad National Security, LLC. All rights
dnl reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
dnl Additional copyrights may follow dnl Additional copyrights may follow
@ -36,7 +38,6 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[
check_lustre_save_LDFLAGS="$LDFLAGS" check_lustre_save_LDFLAGS="$LDFLAGS"
check_lustre_save_CPPFLAGS="$CPPFLAGS" check_lustre_save_CPPFLAGS="$CPPFLAGS"
check_lustre_configuration="none"
ompi_check_lustre_happy="yes" ompi_check_lustre_happy="yes"
# Get some configuration information # Get some configuration information
@ -46,26 +47,28 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[
OPAL_CHECK_WITHDIR([lustre], [$with_lustre], [include/lustre/lustreapi.h]) OPAL_CHECK_WITHDIR([lustre], [$with_lustre], [include/lustre/lustreapi.h])
AS_IF([test "$with_lustre" = "no"], AS_IF([test "$with_lustre" = "no"],
[ompi_check_lustre_happy="no"], [ompi_check_lustre_happy=no])
[AS_IF([test -z "$with_lustre" || test "$with_lustre" = "yes"],
[ompi_check_lustre_dir="/usr"], AS_IF([test "$ompi_check_lustre_happy" != "no" ],
[ompi_check_lustre_dir=$with_lustre]) [AC_MSG_CHECKING([looking for lustre libraries and header files in])
AS_IF([test "$with_lustre" != "yes"],
if test -e "$ompi_check_lustre_dir/lib64" ; then [ompi_check_lustre_dir=$with_lustre
ompi_check_lustre_libdir="$ompi_check_lustre_dir/lib64" AC_MSG_RESULT([($ompi_check_lustre_dir)])],
else [AC_MSG_RESULT([(default search paths)])])
ompi_check_lustre_libdir="$ompi_check_lustre_dir/lib" AS_IF([test -n "$with_lustre_libdir" && \
fi test "$with_lustre_libdir" != "yes"],
[ompi_check_lustre_libdir=$with_lustre_libdir])
# Add correct -I and -L flags ])
OPAL_CHECK_PACKAGE([$1], [lustre/lustreapi.h], [lustreapi], [llapi_file_create],
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_dir], [$ompi_check_lustre_libdir],
[ompi_check_lustre_happy="yes"], [ompi_check_lustre_happy="yes"],
[ompi_check_lustre_happy="no"]) [ompi_check_lustre_happy="no"])])
AS_IF([test "$ompi_check_lustre_happy" = "yes"], AS_IF([test "$ompi_check_lustre_happy" = "yes"],
[AC_MSG_CHECKING([for required lustre data structures]) [AC_MSG_CHECKING([for required lustre data structures])
cat > conftest.c <<EOF cat > conftest.c <<EOF
#include "lustre/lustreapi.h" #include "lustre/lustreapi.h"
void alloc_lum() void alloc_lum()
{ {
@ -77,20 +80,19 @@ void alloc_lum()
} }
EOF EOF
# Try the compile # Try the compile
OPAL_LOG_COMMAND( OPAL_LOG_COMMAND(
[$CC $CFLAGS -I$ompi_check_lustre_dir/include -c conftest.c], [$CC $CFLAGS -I$ompi_check_lustre_dir/include -c conftest.c],
[ompi_check_lustre_struct_happy="yes"], [ompi_check_lustre_struct_happy="yes"],
[ompi_check_lustre_struct_happy="no" [ompi_check_lustre_struct_happy="no"
ompi_check_lustre_happy="no"] ompi_check_lustre_happy="no"]
) )
rm -f conftest.c conftest.o rm -f conftest.c conftest.o
AC_MSG_RESULT([$ompi_check_lustre_struct_happy])]) AC_MSG_RESULT([$ompi_check_lustre_struct_happy])])
])
AS_IF([test "$ompi_check_lustre_happy" = "yes"], AS_IF([test "$ompi_check_lustre_happy" = "yes"],
[$2], [$2],
[AS_IF([test ! -z "$with_lustre" && test "$with_lustre" != "no"], [AS_IF([test -n "$with_lustre" && test "$with_lustre" != "no"],
[AC_MSG_ERROR([Lustre support requested but not found. Aborting])]) [AC_MSG_ERROR([Lustre support requested but not found. Aborting])])
$3]) $3])
]) ])