|
1 |
| -# OMPI_CHECK_GPFS(prefix, [action-if-found], [action-if-not-found]) |
2 |
| -# -------------------------------------------------------- |
3 |
| -# check if GPFS support can be found. Sets prefix_{CPPFLAGS, |
4 |
| -# LDFLAGS, LIBS} as needed and runs action-if-found if there is |
5 |
| -# support, otherwise executes action-if-not-found |
6 |
| - |
7 |
| -AC_DEFUN([OMPI_CHECK_GPFS],[ |
8 |
| -
|
9 |
| - check_gpfs_CPPFLAGS= |
10 |
| - check_gpfs_LDFLAGS= |
11 |
| - check_gpfs_LIBS= |
12 |
| -
|
13 |
| - check_gpfs_save_LIBS="$LIBS" |
14 |
| - check_gpfs_save_LDFLAGS="$LDFLAGS" |
15 |
| - check_gpfs_save_CPPFLAGS="$CPPFLAGS" |
16 |
| -
|
17 |
| - check_gpfs_configuration="none" |
18 |
| - ompi_check_gpfs_happy="yes" |
19 |
| -
|
20 |
| -
|
21 |
| - # Get some configuration information |
22 |
| - AC_ARG_WITH([gpfs], |
23 |
| - [AC_HELP_STRING([--with-gpfs(=DIR)], |
24 |
| - [Build GPFS support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) |
25 |
| - OPAL_CHECK_WITHDIR([gpfs], [$with_gpfs], [include/gpfs.h]) |
26 |
| -
|
27 |
| - AS_IF([test -z "$with_gpfs"], |
28 |
| - [ompi_check_gpfs_dir="/usr"], |
29 |
| - [ompi_check_gpfs_dir="$with_gpfs"]) |
30 |
| -
|
31 |
| - if test -e "$ompi_check_gpfs_dir/lib64" ; then |
32 |
| - ompi_check_gpfs_libdir="$ompi_check_gpfs_dir/lib64" |
33 |
| - else |
34 |
| - ompi_check_gpfs_libdir="$ompi_check_gpfs_dir/lib" |
35 |
| - fi |
36 |
| -
|
37 |
| - # Add correct -I and -L flags |
38 |
| - OPAL_CHECK_PACKAGE([$1], [gpfs.h], [gpfs], [gpfs_lib_init], [], |
39 |
| - [$ompi_check_gpfs_dir], [$ompi_check_gpfs_libdir], [ompi_check_gpfs_happy="yes"], |
40 |
| - [ompi_check_gpfs_happy="no"], [#include <gpfs.h>]) |
41 |
| -
|
42 |
| - AS_IF([test "$ompi_check_gpfs_happy" = "yes"], |
43 |
| - [$2], |
44 |
| - [AS_IF([test ! -z "$with_gpfs" -a "$with_gpfs" != "no"], |
45 |
| - [echo GPFS support not found]) |
46 |
| - $3]) |
47 |
| -]) |
| 1 | +dnl -*- shell-script -*- |
| 2 | +dnl |
| 3 | +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana |
| 4 | +dnl University Research and Technology |
| 5 | +dnl Corporation. All rights reserved. |
| 6 | +dnl Copyright (c) 2004-2005 The University of Tennessee and The University |
| 7 | +dnl of Tennessee Research Foundation. All rights |
| 8 | +dnl reserved. |
| 9 | +dnl Copyright (c) 2004-2018 High Performance Computing Center Stuttgart, |
| 10 | +dnl University of Stuttgart. All rights reserved. |
| 11 | +dnl Copyright (c) 2004-2006 The Regents of the University of California. |
| 12 | +dnl All rights reserved. |
| 13 | +dnl Copyright (c) 2018 University of Houston. All rights reserved. |
| 14 | +dnl $COPYRIGHT$ |
| 15 | +dnl |
| 16 | +dnl Additional copyrights may follow |
| 17 | +dnl |
| 18 | +dnl $HEADER$ |
| 19 | +dnl |
| 20 | + |
| 21 | +# OMPI_CHECK_GPFS(prefix, [action-if-found], [action-if-not-found]) |
| 22 | +# -------------------------------------------------------- |
| 23 | +# check if GPFS support can be found. sets prefix_{CPPFLAGS, |
| 24 | +# LDFLAGS, LIBS} as needed and runs action-if-found if there is |
| 25 | +# support, otherwise executes action-if-not-found |
| 26 | +AC_DEFUN([OMPI_CHECK_GPFS],[ |
| 27 | + |
| 28 | + check_gpfs_CPPFLAGS= |
| 29 | + check_gpfs_LDFLAGS= |
| 30 | + check_gpfs_LIBS= |
| 31 | + |
| 32 | + check_gpfs_save_LIBS="$LIBS" |
| 33 | + check_gpfs_save_LDFLAGS="$LDFLAGS" |
| 34 | + check_gpfs_save_CPPFLAGS="$CPPFLAGS" |
| 35 | + |
| 36 | + check_gpfs_configuration="none" |
| 37 | + ompi_check_gpfs_happy="yes" |
| 38 | + |
| 39 | + # Get some configuration information |
| 40 | + AC_ARG_WITH([gpfs], |
| 41 | + [AC_HELP_STRING([--with-gpfs(=DIR)], |
| 42 | + [Build Gpfs support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) |
| 43 | + OPAL_CHECK_WITHDIR([gpfs], [$with_gpfs], [include/gpfs.h]) |
| 44 | + |
| 45 | + AS_IF([test "$with_gpfs" = "no"], |
| 46 | + [ompi_check_gpfs_happy="no"], |
| 47 | + [AS_IF([test -z "$with_gpfs" || test "$with_gpfs" = "yes"], |
| 48 | + [ompi_check_gpfs_dir="/usr"], |
| 49 | + [ompi_check_gpfs_dir=$with_gpfs]) |
| 50 | + |
| 51 | + if test -e "$ompi_check_gpfs_dir/lib64" ; then |
| 52 | + ompi_check_gpfs_libdir="$ompi_check_gpfs_dir/lib64" |
| 53 | + else |
| 54 | + ompi_check_gpfs_libdir="$ompi_check_gpfs_dir/lib" |
| 55 | + fi |
| 56 | + |
| 57 | + # Add correct -I and -L flags |
| 58 | + OPAL_CHECK_PACKAGE([$1], [gpfs.h], [gpfs], [gpfs_lib_init], |
| 59 | + [], [$ompi_check_gpfs_dir], [$ompi_check_gpfs_libdir], |
| 60 | + [ompi_check_gpfs_happy="yes"], |
| 61 | + [ompi_check_gpfs_happy="no"]) |
| 62 | + ]) |
| 63 | + |
| 64 | + AS_IF([test "$ompi_check_gpfs_happy" = "yes"], |
| 65 | + [$2], |
| 66 | + [AS_IF([test ! -z "$with_gpfs" && test "$with_gpfs" != "no"], |
| 67 | + [AC_MSG_ERROR([GPFS support requested but not found. Aborting])]) |
| 68 | + $3]) |
| 69 | +]) |
0 commit comments