Skip to content

Commit aea4d48

Browse files
committed
use bash test command options -a and -o
git-svn-id: https://svn.mcs.anl.gov/repos/parallel-netcdf/trunk@3742 c368ceb8-fd28-0410-a457-e46ee1d7cd4a
1 parent baffa65 commit aea4d48

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

Makefile.am

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ install-data-hook:
7676
@echo '| * PnetCDF man pages have been installed in'
7777
@echo '| $(DESTDIR)$(prefix)/share/man'
7878
@echo '|'
79-
@if test 'x$(has_fortran)' = xyes && test 'x$(FC_MODINC)' = 'x-I' ; then \
79+
@if test 'x$(has_fortran)' = xyes -a 'x$(FC_MODINC)' = 'x-I' ; then \
8080
echo '| To compile your PnetCDF programs, please add the following to the command' ; \
8181
else \
8282
echo '| To compile your PnetCDF C programs, please add the following to the command' ; \
8383
fi
8484
@echo '| line, so the compiler can find the PnetCDF header files:'
8585
@echo '| -I$(DESTDIR)$(prefix)/include'
86-
@if test "x$(has_fortran)" = xyes && test 'x$(FC_MODINC)' != 'x-I' ; then \
86+
@if test "x$(has_fortran)" = xyes -a 'x$(FC_MODINC)' != 'x-I' ; then \
8787
echo '| Use the following line to compile your Fortran programs'; \
8888
echo '| $(FC_MODINC)$(DESTDIR)$(prefix)/include' ; \
8989
fi

configure.ac

+11-12
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ ac_user_MPICC=$MPICC
179179
ac_user_MPICXX=$MPICXX
180180
ac_user_MPIF77=$MPIF77
181181
ac_user_MPIF90=$MPIF90
182-
if test "x$MPICC" = x && test "x$CC" != x ; then ac_user_MPICC=$CC ; fi
183-
if test "x$MPICXX" = x && test "x$CXX" != x ; then ac_user_MPICXX=$CXX ; fi
184-
if test "x$MPIF77" = x && test "x$F77" != x ; then ac_user_MPIF77=$F77 ; fi
185-
if test "x$MPIF77" = x && test "x$FC" != x ; then ac_user_MPIF77=$FC ; fi
186-
if test "x$MPIF90" = x && test "x$F90" != x ; then ac_user_MPIF90=$F90 ; fi
187-
if test "x$MPIF90" = x && test "x$FC" != x ; then ac_user_MPIF90=$FC ; fi
182+
if test "x$MPICC" = x -a "x$CC" != x ; then ac_user_MPICC=$CC ; fi
183+
if test "x$MPICXX" = x -a "x$CXX" != x ; then ac_user_MPICXX=$CXX ; fi
184+
if test "x$MPIF77" = x -a "x$F77" != x ; then ac_user_MPIF77=$F77 ; fi
185+
if test "x$MPIF77" = x -a "x$FC" != x ; then ac_user_MPIF77=$FC ; fi
186+
if test "x$MPIF90" = x -a "x$F90" != x ; then ac_user_MPIF90=$F90 ; fi
187+
if test "x$MPIF90" = x -a "x$FC" != x ; then ac_user_MPIF90=$FC ; fi
188188

189189
CANDIDATE_MPICC="${MPICC} mpicc mpicc_r"
190190
CANDIDATE_MPICXX="${MPICXX} mpicxx mpic++ mpiCC mpcxx mpc++ mpicxx_r mpiCC_r mpcxx_r mpic++_r mpc++_r"
@@ -364,7 +364,7 @@ if test "x${enable_cxx}" != xno ; then
364364
fi
365365
fi
366366

367-
if test "x${enable_cxx}" = xno || test "x${MPICXX}" = x ; then
367+
if test "x${enable_cxx}" = xno -o "x${MPICXX}" = x ; then
368368
dnl when cxx is explicitly disabled or no MPICXX can be found
369369
has_mpicxx=no
370370
else
@@ -651,7 +651,7 @@ AM_CONDITIONAL(HAS_FORTRAN, [test x$has_fortran = xyes])
651651
AM_CONDITIONAL(HAVE_MPI_MOD, [test x$mpi_mod = xyes])
652652

653653
if test "x${has_fortran}" = xyes ; then
654-
if test "x${enable_strict}" = xyes && test "x${GFC}" = xyes; then
654+
if test "x${enable_strict}" = xyes -a "x${GFC}" = xyes; then
655655
dnl not all Fortran compilers recognize -Wall
656656
FFLAGS+=" -Wall"
657657
FCFLAGS+=" -Wall"
@@ -954,8 +954,7 @@ if test "x${debug}" = xyes; then
954954
AC_CHECK_FUNCS([tsearch tdelete])
955955

956956
dnl check required functions for enabling malloc tracing
957-
if (test "x${ac_cv_func_tsearch}" = xyes) &&
958-
(test "x${ac_cv_func_tdelete}" = xyes) ; then
957+
if test "x${ac_cv_func_tsearch}" = xyes -a "x${ac_cv_func_tdelete}" = xyes ; then
959958
AC_DEFINE(PNC_MALLOC_TRACE)
960959
fi
961960
PNETCDF_DEBUG=1
@@ -1129,7 +1128,7 @@ dnl For big Endian, put buffer needs no byte swap and hence can be declared as
11291128
dnl INTENT(IN). For little Endian, put buffer may be used for byte swap in
11301129
dnl place and hence must be declared as INTENT(INOUT).
11311130
dnl This will configure/produce the file src/binding/f90/api.f90
1132-
if test "x${ac_cv_c_bigendian}" = xyes || (test "x${in_place_swap}" = xno) ; then
1131+
if test "x${ac_cv_c_bigendian}" = xyes -o "x${in_place_swap}" = xno ; then
11331132
INTENTV="IN"
11341133
else
11351134
INTENTV="INOUT"
@@ -1616,7 +1615,7 @@ if test "x${debug}" = xyes; then
16161615
echo "\
16171616
PnetCDF internal debug mode - enabled"
16181617
fi
1619-
if test "x${has_fortran}" = xyes && (test "x${ac_f77_support_freeform}" = xno) ; then
1618+
if test "x${has_fortran}" = xyes -a "x${ac_f77_support_freeform}" = xno ; then
16201619
echo "\
16211620
Support free form in Fortran 77 - disabled"
16221621
fi

0 commit comments

Comments
 (0)