@@ -12,7 +12,7 @@ dnl Copyright (c) 2004-2006 The Regents of the University of California.
12
12
dnl All rights reserved.
13
13
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
- dnl Copyright (c) 2015-2018 Research Organization for Information Science
15
+ dnl Copyright (c) 2015-2021 Research Organization for Information Science
16
16
dnl and Technology (RIST). All rights reserved.
17
17
dnl Copyright (c) 2020 Triad National Security, LLC. All rights
18
18
dnl reserved.
30
30
# support, otherwise executes action-if-not-found
31
31
AC_DEFUN([OMPI_CHECK_LUSTRE],[
32
32
33
- check_lustre_CPPFLAGS=
34
- check_lustre_LDFLAGS=
35
- check_lustre_LIBS=
36
-
37
- check_lustre_save_LIBS= " $LIBS "
38
- check_lustre_save_LDFLAGS= " $LDFLAGS "
39
- check_lustre_save_CPPFLAGS= " $CPPFLAGS "
40
-
41
- ompi_check_lustre_happy= " yes"
33
+ OPAL_VAR_SCOPE_PUSH([ompi_check_lustre_happy ompi_check_lustre_dir])
42
34
43
35
# Get some configuration information
44
36
AC_ARG_WITH([lustre],
@@ -47,25 +39,15 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[
47
39
OPAL_CHECK_WITHDIR([lustre], [$with_lustre ], [include/lustre/lustreapi.h])
48
40
49
41
AS_IF([test " $with_lustre " = " no" ],
50
- [ompi_check_lustre_happy= no])
42
+ [ompi_check_lustre_happy= " no" ],
43
+ [AS_IF([test -n " $with_lustre " && test " $with_lustre " != " yes" ],
44
+ [ompi_check_lustre_dir= $with_lustre ])
51
45
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
- ])
46
+ OPAL_CHECK_PACKAGE([$1 ], [lustre/lustreapi.h], [lustreapi], [llapi_file_create],
47
+ [], [$ompi_check_lustre_dir ], [],
48
+ [ompi_check_lustre_happy= " yes" ],
49
+ [ompi_check_lustre_happy= " no" ])])
62
50
63
- AS_IF([test " $ompi_check_lustre_happy " != " no" ],
64
- [OPAL_CHECK_PACKAGE([$1 ], [lustre/lustreapi.h], [lustreapi], [llapi_file_create],
65
- [], [$ompi_check_lustre_dir ], [$ompi_check_lustre_libdir ],
66
- [ompi_check_lustre_happy= " yes" ],
67
- [ompi_check_lustre_happy= " no" ])])
68
-
69
51
AS_IF([test " $ompi_check_lustre_happy " = " yes" ],
70
52
[AC_MSG_CHECKING([for required lustre data structures])
71
53
cat > conftest.c << EOF
@@ -81,18 +63,16 @@ void alloc_lum()
81
63
EOF
82
64
83
65
# 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 ])])
66
+ OPAL_LOG_COMMAND([$CC $CFLAGS $$ 1_CPPFLAGS -c conftest.c],
67
+ [], [ompi_check_lustre_happy= " no" ])
68
+ rm -f conftest.c conftest.o
69
+ AC_MSG_RESULT([$ompi_check_lustre_happy ])])
92
70
93
71
AS_IF([test " $ompi_check_lustre_happy " = " yes" ],
94
72
[$2 ],
95
73
[AS_IF([test -n " $with_lustre " && test " $with_lustre " != " no" ],
96
74
[AC_MSG_ERROR([Lustre support requested but not found. Aborting])])
97
- $3 ])
75
+ $3 ])
76
+
77
+ OPAL_VAR_SCOPE_POP
98
78
])
0 commit comments