@@ -346,16 +346,24 @@ if test "x$enable_darshan_runtime" = xyes ; then
346346 # inform about HDF5 installs not found in default locations
347347 AC_ARG_WITH ( [ hdf5] ,
348348 [ AS_HELP_STRING ( [ --with-hdf5=DIR] ,
349- [ Installation directory for HDF5.] ) ] ,
350- [ ] , [ with_hdf5=no]
349+ [ Installation directory for HDF5.] ) ]
351350 )
352351
353352 # HDF5 module (disabled by default)
354353 AC_ARG_ENABLE ( [ hdf5-mod] ,
355354 [ AS_HELP_STRING ( [ --enable-hdf5-mod] ,
356- [ Enables compilation and use of HDF5 module] ) ] ,
357- [ ] , [ enable_hdf5_mod=no]
355+ [ Enables compilation and use of HDF5 module] ) ]
358356 )
357+
358+ # When --with-hdf5 is set, we automatically enable enable_hdf5_mod
359+ if test "x$enable_hdf5_mod" = x ; then
360+ if test "x$with_hdf5" != x ; then
361+ enable_hdf5_mod=yes
362+ else
363+ enable_hdf5_mod=no
364+ fi
365+ fi
366+
359367 if test "x$enable_hdf5_mod" = xyes ; then
360368 if test -d "$with_hdf5" ; then
361369 AC_PATH_PROG ( H5DUMP_CHECK , h5dump , "no" , "${with_hdf5}/bin" )
@@ -434,16 +442,24 @@ if test "x$enable_darshan_runtime" = xyes ; then
434442 # inform about PnetCDF installs not found in default locations
435443 AC_ARG_WITH ( [ pnetcdf] ,
436444 [ AS_HELP_STRING ( [ --with-pnetcdf=DIR] ,
437- [ Installation directory for PnetCDF.] ) ] ,
438- [ ] , [ with_pnetcdf=no]
445+ [ Installation directory for PnetCDF.] ) ]
439446 )
440447
441448 # PnetCDF module (disabled by default)
442449 AC_ARG_ENABLE ( [ pnetcdf-mod] ,
443450 [ AS_HELP_STRING ( [ --enable-pnetcdf-mod] ,
444- [ Enables compilation and use of PnetCDF module (requires MPI)] ) ] ,
445- [ ] , [ enable_pnetcdf_mod=no]
451+ [ Enables compilation and use of PnetCDF module (requires MPI)] ) ]
446452 )
453+
454+ # When --with-pnetcdf is set, we automatically enable enable_pnetcdf_mod
455+ if test "x$enable_pnetcdf_mod" = x ; then
456+ if test "x$with_pnetcdf" != x ; then
457+ enable_pnetcdf_mod=yes
458+ else
459+ enable_pnetcdf_mod=no
460+ fi
461+ fi
462+
447463 if test "x$enable_pnetcdf_mod" = xyes ; then
448464 if test "x$ENABLE_MPI" = xno ; then
449465 AC_MSG_ERROR ( [ --enable-pnetcdf-mod is used but MPI feature is disabled] )
0 commit comments