Skip to content

Commit fec973e

Browse files
committed
configury: test portability
replace test ... -o ... with test ... || test ... and test ... -a ... with test ... && test ...
1 parent 47ab2fc commit fec973e

File tree

39 files changed

+166
-90
lines changed

39 files changed

+166
-90
lines changed

config/ompi_check_psm2.m4

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# Copyright (c) 2006 QLogic Corp. All rights reserved.
1414
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1515
# Copyright (c) 2014 Intel Corporation. All rights reserved.
16+
# Copyright (c) 2015 Research Organization for Information Science
17+
# and Technology (RIST). All rights reserved.
1618
# $COPYRIGHT$
1719
#
1820
# Additional copyrights may follow
@@ -40,9 +42,9 @@ AC_DEFUN([OMPI_CHECK_PSM2],[
4042
ompi_check_psm2_$1_save_LIBS="$LIBS"
4143

4244
AS_IF([test "$with_psm2" != "no"],
43-
[AS_IF([test ! -z "$with_psm2" -a "$with_psm2" != "yes"],
45+
[AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "yes"],
4446
[ompi_check_psm2_dir="$with_psm2"])
45-
AS_IF([test ! -z "$with_psm2_libdir" -a "$with_psm2_libdir" != "yes"],
47+
AS_IF([test ! -z "$with_psm2_libdir" && test "$with_psm2_libdir" != "yes"],
4648
[ompi_check_psm2_libdir="$with_psm2_libdir"])
4749

4850
OPAL_CHECK_PACKAGE([$1],
@@ -60,13 +62,13 @@ AC_DEFUN([OMPI_CHECK_PSM2],[
6062
LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS"
6163
LIBS="$ompi_check_psm2_$1_save_LIBS"
6264

63-
AS_IF([test "$ompi_check_psm2_happy" = "yes" -a "$enable_progress_threads" = "yes"],
65+
AS_IF([test "$ompi_check_psm2_happy" = "yes" && test "$enable_progress_threads" = "yes"],
6466
[AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.])
6567
ompi_check_psm2_happy="no"])
6668

6769
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
6870
[$2],
69-
[AS_IF([test ! -z "$with_psm2" -a "$with_psm2" != "no"],
71+
[AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "no"],
7072
[AC_MSG_ERROR([PSM2 support requested but not found. Aborting])])
7173
$3])
7274
])

config/ompi_check_ucx.m4

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# -*- shell-script -*-
22
#
3-
# Copyright (C) Mellanox Technologies Ltd. 2015. ALL RIGHTS RESERVED.
3+
# Copyright (C) 2015 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
4+
# Copyright (c) 2015 Research Organization for Information Science
5+
# and Technology (RIST). All rights reserved.
46
# $COPYRIGHT$
57
#
68
# Additional copyrights may follow
@@ -28,12 +30,12 @@ AC_DEFUN([OMPI_CHECK_UCX],[
2830
ompi_check_ucx_$1_save_LIBS="$LIBS"
2931

3032
AS_IF([test "$with_ucx" != "no"],
31-
[AS_IF([test ! -z "$with_ucx" -a "$with_ucx" != "yes"],
33+
[AS_IF([test ! -z "$with_ucx" && test "$with_ucx" != "yes"],
3234
[
3335
ompi_check_ucx_dir="$with_ucx"
3436
ompi_check_ucx_libdir="$with_ucx/lib"
3537
])
36-
AS_IF([test ! -z "$with_ucx_libdir" -a "$with_ucx_libdir" != "yes"],
38+
AS_IF([test ! -z "$with_ucx_libdir" && test "$with_ucx_libdir" != "yes"],
3739
[ompi_check_ucx_libdir="$with_ucx_libdir"])
3840

3941
ompi_check_ucx_extra_libs="-L$ompi_check_ucx_libdir"
@@ -73,7 +75,7 @@ AC_DEFUN([OMPI_CHECK_UCX],[
7375

7476
AS_IF([test "$ompi_check_ucx_happy" = "yes"],
7577
[$2],
76-
[AS_IF([test ! -z "$with_ucx" -a "$with_ucx" != "no"],
78+
[AS_IF([test ! -z "$with_ucx" && test "$with_ucx" != "no"],
7779
[AC_MSG_ERROR([UCX support requested but not found. Aborting])])
7880
$3])
7981
])

config/ompi_fortran_check_real16_c_equiv.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ AC_DEFUN([OMPI_FORTRAN_CHECK_REAL16_C_EQUIV],[
5757
[CFLAGS="$CFLAGS_save"
5858
AC_MSG_RESULT([does not work])])
5959
])
60-
AS_IF([test "$opal_cv_c_compiler_vendor" = "gnu" -a "$ac_cv_type___float128" = "yes"],
60+
AS_IF([test "$opal_cv_c_compiler_vendor" = "gnu" && test "$ac_cv_type___float128" = "yes"],
6161
[AC_MSG_CHECKING([if gnu compiler __float128 == REAL*16])
6262
OPAL_UNIQ([CFLAGS])
6363
OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([__float128], [q])

config/opal_check_cray_xpmem.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
1515
# reserved.
1616
# Copyright (c) 2014 Intel, Inc. All rights reserved.
17-
# Copyright (c) 2014 Research Organization for Information Science
17+
# Copyright (c) 2014-2015 Research Organization for Information Science
1818
# and Technology (RIST). All rights reserved.
1919
# $COPYRIGHT$
2020
#
@@ -38,7 +38,7 @@ AC_DEFUN([OPAL_CHECK_CRAY_XPMEM],[
3838
AS_IF([test "$with_cray_xpmem" = "no"],
3939
[AC_MSG_RESULT([no])
4040
$3],
41-
[AS_IF([test "$with_cray_xpmem" = "auto" -o "$with_cray_xpmem" = "yes"],
41+
[AS_IF([test "$with_cray_xpmem" = "auto" || test "$with_cray_xpmem" = "yes"],
4242
[PKG_CHECK_MODULES_STATIC([CRAY_XPMEM], [cray-xpmem],
4343
[opal_check_cray_xpmem_happy="yes"],
4444
[opal_check_cray_xpmem_happy="no"]
@@ -49,7 +49,7 @@ AC_DEFUN([OPAL_CHECK_CRAY_XPMEM],[
4949
[])
5050
])
5151
52-
AS_IF([test "$opal_check_cray_xpmem_happy" = "yes" -a "$enable_static" = "yes"],
52+
AS_IF([test "$opal_check_cray_xpmem_happy" = "yes" && test "$enable_static" = "yes"],
5353
[CRAY_XPMEM_LIBS = $CRAY_XPMEM_STATIC_LIBS],[])
5454
5555
AS_IF([test "$opal_check_cray_xpmem_happy" = "yes"],

config/opal_check_withdir.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ dnl Corporation. All rights reserved.
66
dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights
77
dnl reserved.
88
dnl Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
9+
dnl Copyright (c) 2015 Research Organization for Information Science
10+
dnl and Technology (RIST). All rights reserved.
911
dnl $COPYRIGHT$
1012
dnl
1113
dnl Additional copyrights may follow
@@ -17,7 +19,7 @@ dnl
1719
# ----------------------------------------------------
1820
AC_DEFUN([OPAL_CHECK_WITHDIR],[
1921
AC_MSG_CHECKING([--with-$1 value])
20-
AS_IF([test "$2" = "yes" -o "$2" = "no" -o "x$2" = "x"],
22+
AS_IF([test "$2" = "yes" || test "$2" = "no" || test "x$2" = "x"],
2123
[AC_MSG_RESULT([simple ok (unspecified)])],
2224
[AS_IF([test ! -d "$2"],
2325
[AC_MSG_RESULT([not found])

config/opal_config_asm.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,11 +872,11 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
872872
[], [enable_osx_builtin_atomics="yes"])
873873
874874
opal_cv_asm_builtin="BUILTIN_NO"
875-
if test "$opal_cv_asm_builtin" = "BUILTIN_NO" -a "$enable_builtin_atomics" = "yes" ; then
875+
if test "$opal_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" = "yes" ; then
876876
OPAL_CHECK_SYNC_BUILTINS([opal_cv_asm_builtin="BUILTIN_SYNC"], [])
877877
OPAL_CHECK_SYNC_BUILTIN_CSWAP_INT128
878878
fi
879-
if test "$opal_cv_asm_builtin" = "BUILTIN_NO" -a "$enable_osx_builtin_atomics" = "yes" ; then
879+
if test "$opal_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_osx_builtin_atomics" = "yes" ; then
880880
AC_CHECK_HEADER([libkern/OSAtomic.h],
881881
[opal_cv_asm_builtin="BUILTIN_OSX"])
882882
else

ompi/mca/bcol/iboffload/configure.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#
33
# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
44
# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
5+
# Copyright (c) 2015 Research Organization for Information Science
6+
# and Technology (RIST). All rights reserved.
57
# $COPYRIGHT$
68
#
79
# Additional copyrights may follow
@@ -26,7 +28,7 @@ AC_DEFUN([MCA_ompi_bcol_iboffload_CONFIG],[
2628
OPAL_CHECK_OPENFABRICS([bcol_iboffload], [bcol_ofa_happy="yes"])
2729
OPAL_CHECK_MLNX_OPENFABRICS([bcol_iboffload], [bcol_mlnx_ofed_happy="yes"])
2830

29-
AS_IF([test "$bcol_ofa_happy" = "yes" -a "$bcol_mlnx_ofed_happy" = "yes"],
31+
AS_IF([test "$bcol_ofa_happy" = "yes" && test "$bcol_mlnx_ofed_happy" = "yes"],
3032
[$1],
3133
[$2])
3234

ompi/mca/io/romio314/configure.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ AC_DEFUN([MCA_ompi_io_romio314_CONFIG],[
5252
$2],
5353
[AC_MSG_RESULT([yes])
5454

55-
AS_IF([test -n "$with_io_romio_flags" -a "$with_io_romio_flags" != "no"],
55+
AS_IF([test -n "$with_io_romio_flags" && test "$with_io_romio_flags" != "no"],
5656
[io_romio314_flags="$with_io_romio_flags $io_romio314_flags"],
5757
[io_romio314_flags=])
5858
# If ROMIO is going to end up in a DSO, all we need is
@@ -69,7 +69,7 @@ AC_DEFUN([MCA_ompi_io_romio314_CONFIG],[
6969
AS_IF([test "$enable_static" = "yes"],
7070
[io_romio314_static=enable],
7171
[io_romio314_static=disable])])
72-
AS_IF([test -n "$prefix" -a "$prefix" != "NONE"],
72+
AS_IF([test -n "$prefix" && test "$prefix" != "NONE"],
7373
[io_romio314_prefix_arg="--prefix=$prefix"],
7474
[io_romio314_prefix_arg=])
7575

ompi/mca/sbgp/ibnet/configure.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#
33
# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
44
# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
5+
# Copyright (c) 2015 Research Organization for Information Science
6+
# and Technology (RIST). All rights reserved.
57
# $COPYRIGHT$
68
#
79
# Additional copyrights may follow
@@ -26,7 +28,7 @@ AC_DEFUN([MCA_ompi_sbgp_ibnet_CONFIG],[
2628
OPAL_CHECK_OPENFABRICS([sbgp_ibnet], [sbgp_ofa_happy="yes"])
2729
OPAL_CHECK_MLNX_OPENFABRICS([sbgp_ibnet], [sbgp_mlnx_ofed_happy="yes"])
2830

29-
AS_IF([test "$sbgp_ofa_happy" = "yes" -a "$sbgp_mlnx_ofed_happy" = "yes"],
31+
AS_IF([test "$sbgp_ofa_happy" = "yes" && test "$sbgp_mlnx_ofed_happy" = "yes"],
3032
[$1],
3133
[$2])
3234

opal/mca/btl/openib/configure.m4

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
# MCA_btl_openib_POST_CONFIG([should_build])
2727
# ------------------------------------------
2828
AC_DEFUN([MCA_opal_btl_openib_POST_CONFIG], [
29-
AM_CONDITIONAL([MCA_btl_openib_have_xrc], [test $1 -eq 1 -a "x$btl_openib_have_xrc" = "x1"])
30-
AM_CONDITIONAL([MCA_btl_openib_have_rdmacm], [test $1 -eq 1 -a "x$btl_openib_have_rdmacm" = "x1"])
31-
AM_CONDITIONAL([MCA_btl_openib_have_dynamic_sl], [test $1 -eq 1 -a "x$btl_openib_have_opensm_devel" = "x1"])
32-
AM_CONDITIONAL([MCA_btl_openib_have_udcm], [test $1 -eq 1 -a "x$btl_openib_have_udcm" = "x1"])
29+
AM_CONDITIONAL([MCA_btl_openib_have_xrc], [test $1 -eq 1 && test "x$btl_openib_have_xrc" = "x1"])
30+
AM_CONDITIONAL([MCA_btl_openib_have_rdmacm], [test $1 -eq 1 && test "x$btl_openib_have_rdmacm" = "x1"])
31+
AM_CONDITIONAL([MCA_btl_openib_have_dynamic_sl], [test $1 -eq 1 && test "x$btl_openib_have_opensm_devel" = "x1"])
32+
AM_CONDITIONAL([MCA_btl_openib_have_udcm], [test $1 -eq 1 && test "x$btl_openib_have_udcm" = "x1"])
3333
])
3434

3535

@@ -132,7 +132,7 @@ AC_DEFUN([MCA_opal_btl_openib_CONFIG],[
132132
[AC_CHECK_FUNC([__free_hook],
133133
[btl_openib_malloc_hooks_enabled=1])])])])])
134134

135-
AS_IF([test "$enable_btl_openib_malloc_alignment" = "yes" -a "$btl_openib_malloc_hooks_enabled" = "0"],
135+
AS_IF([test "$enable_btl_openib_malloc_alignment" = "yes" && test "$btl_openib_malloc_hooks_enabled" = "0"],
136136
[AC_MSG_ERROR([openib malloc alignment is requested but __malloc_hook is not available])])
137137
AC_MSG_CHECKING([whether the openib BTL will use malloc hooks])
138138
AS_IF([test "$btl_openib_malloc_hooks_enabled" = "0"],

0 commit comments

Comments
 (0)