@@ -14,6 +14,8 @@ dnl Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
14
14
dnl Copyright (c) 2008-2018 University of Houston. All rights reserved.
15
15
dnl Copyright (c) 2015-2018 Research Organization for Information Science
16
16
dnl and Technology (RIST). All rights reserved.
17
+ dnl Copyright (c) 2020 Triad National Security, LLC. All rights
18
+ dnl reserved.
17
19
dnl $COPYRIGHT $
18
20
dnl
19
21
dnl Additional copyrights may follow
@@ -36,7 +38,6 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[
36
38
check_lustre_save_LDFLAGS= " $LDFLAGS "
37
39
check_lustre_save_CPPFLAGS= " $CPPFLAGS "
38
40
39
- check_lustre_configuration= " none"
40
41
ompi_check_lustre_happy= " yes"
41
42
42
43
# Get some configuration information
@@ -46,26 +47,28 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[
46
47
OPAL_CHECK_WITHDIR([lustre], [$with_lustre ], [include/lustre/lustreapi.h])
47
48
48
49
AS_IF([test " $with_lustre " = " no" ],
49
- [ompi_check_lustre_happy= " no" ],
50
- [AS_IF([test -z " $with_lustre " || test " $with_lustre " = " yes" ],
51
- [ompi_check_lustre_dir= " /usr" ],
52
- [ompi_check_lustre_dir= $with_lustre ])
53
-
54
- if test -e " $ompi_check_lustre_dir /lib64" ; then
55
- ompi_check_lustre_libdir=" $ompi_check_lustre_dir /lib64"
56
- else
57
- ompi_check_lustre_libdir=" $ompi_check_lustre_dir /lib"
58
- fi
59
-
60
- # Add correct -I and -L flags
61
- OPAL_CHECK_PACKAGE([$1 ], [lustre/lustreapi.h], [lustreapi], [llapi_file_create],
50
+ [ompi_check_lustre_happy= no])
51
+
52
+ AS_IF([test " $ompi_check_lustre_happy " != " no" ],
53
+ [AC_MSG_CHECKING([looking for lustre libraries and header files in])
54
+ AS_IF([test " $with_lustre " != " yes" ],
55
+ [ompi_check_lustre_dir= $with_lustre
56
+ AC_MSG_RESULT([($ompi_check_lustre_dir )])],
57
+ [AC_MSG_RESULT([(default search paths)])])
58
+ AS_IF([test -n " $with_lustre_libdir " && \
59
+ test " $with_lustre_libdir " != " yes" ],
60
+ [ompi_check_lustre_libdir= $with_lustre_libdir ])
61
+ ])
62
+
63
+ AS_IF([test " $ompi_check_lustre_happy " != " no" ],
64
+ [OPAL_CHECK_PACKAGE([$1 ], [lustre/lustreapi.h], [lustreapi], [llapi_file_create],
62
65
[], [$ompi_check_lustre_dir ], [$ompi_check_lustre_libdir ],
63
66
[ompi_check_lustre_happy= " yes" ],
64
- [ompi_check_lustre_happy= " no" ])
67
+ [ompi_check_lustre_happy= " no" ])])
65
68
66
- AS_IF([test " $ompi_check_lustre_happy " = " yes" ],
67
- [AC_MSG_CHECKING([for required lustre data structures])
68
- cat > conftest.c << EOF
69
+ AS_IF([test " $ompi_check_lustre_happy " = " yes" ],
70
+ [AC_MSG_CHECKING([for required lustre data structures])
71
+ cat > conftest.c << EOF
69
72
# include "lustre/lustreapi.h"
70
73
void alloc_lum ()
71
74
{
@@ -77,20 +80,19 @@ void alloc_lum()
77
80
}
78
81
EOF
79
82
80
- # Try the compile
81
- OPAL_LOG_COMMAND(
82
- [$CC $CFLAGS -I$ompi_check_lustre_dir /include -c conftest.c],
83
- [ompi_check_lustre_struct_happy= " yes" ],
84
- [ompi_check_lustre_struct_happy= " no"
85
- ompi_check_lustre_happy= " no" ]
86
- )
87
- rm -f conftest.c conftest.o
88
- AC_MSG_RESULT([$ompi_check_lustre_struct_happy ])])
89
- ])
83
+ # Try the compile
84
+ OPAL_LOG_COMMAND(
85
+ [$CC $CFLAGS -I$ompi_check_lustre_dir /include -c conftest.c],
86
+ [ompi_check_lustre_struct_happy= " yes" ],
87
+ [ompi_check_lustre_struct_happy= " no"
88
+ ompi_check_lustre_happy= " no" ]
89
+ )
90
+ rm -f conftest.c conftest.o
91
+ AC_MSG_RESULT([$ompi_check_lustre_struct_happy ])])
90
92
91
93
AS_IF([test " $ompi_check_lustre_happy " = " yes" ],
92
94
[$2 ],
93
- [AS_IF([test ! -z " $with_lustre " && test " $with_lustre " != " no" ],
95
+ [AS_IF([test -n " $with_lustre " && test " $with_lustre " != " no" ],
94
96
[AC_MSG_ERROR([Lustre support requested but not found. Aborting])])
95
- $3 ])
97
+ $3 ])
96
98
])
0 commit comments