Skip to content

Commit e275c19

Browse files
committed
Update configure to accept --without-fftw3 and --without-libpng
1 parent fc47b74 commit e275c19

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

configure

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,8 +1460,10 @@ Optional Features:
14601460
Optional Packages:
14611461
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
14621462
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1463-
--with-fftw3 Use fftw3 library
1463+
--with-fftw3 Use fftw3 library
1464+
--without-fftw3 to disable fftw3 library
14641465
--with-libpng Use libpng library
1466+
--without-libpng to disable libpng library
14651467
--with-hdf5=yes/no/PATH full path of h5pcc for parallel HDF5 configuration
14661468
--with-blas=<lib> use BLAS library <lib>
14671469
--with-zlib=DIR root directory path of zlib installation defaults to
@@ -4053,17 +4055,26 @@ fi
40534055
# Check whether --with-fftw3 was given.
40544056
if test ${with_fftw3+y}
40554057
then :
4056-
withval=$with_fftw3; USE_fftw3='yes'
4058+
withval=$with_fftw3; if test "$withval" != no ; then
4059+
USE_fftw3='yes'
4060+
else
4061+
USE_fftw3='no'
4062+
fi
40574063
else case e in #(
40584064
e) USE_fftw3='no' ;;
40594065
esac
40604066
fi
40614067

40624068

4069+
40634070
# Check whether --with-libpng was given.
40644071
if test ${with_libpng+y}
40654072
then :
4066-
withval=$with_libpng; USE_libpng='yes'
4073+
withval=$with_libpng; if test "$withval" != no ; then
4074+
USE_libpng='yes'
4075+
else
4076+
USE_libpng='no'
4077+
fi
40674078
else case e in #(
40684079
e) USE_libpng='no' ;;
40694080
esac

configure.ac

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,24 @@ AC_CONFIG_SRCDIR([src/programs/SPH_MHD/main_sph_MHD_w_psf.f90])
3838
# AC_CONFIG_HEADER([config.h])
3939

4040
AC_ARG_WITH(fftw3,
41-
[ --with-fftw3 Use fftw3 library],[USE_fftw3='yes'],[USE_fftw3='no'])
41+
[ --with-fftw3 Use fftw3 library
42+
--without-fftw3 to disable fftw3 library],
43+
[if test "$withval" != no ; then
44+
USE_fftw3='yes'
45+
else
46+
USE_fftw3='no'
47+
fi],
48+
[USE_fftw3='no'])
49+
4250
AC_ARG_WITH(libpng,
43-
[ --with-libpng Use libpng library],[USE_libpng='yes'],[USE_libpng='no'])
51+
[ --with-libpng Use libpng library
52+
--without-libpng to disable libpng library],
53+
[if test "$withval" != no ; then
54+
USE_libpng='yes'
55+
else
56+
USE_libpng='no'
57+
fi],
58+
[USE_libpng='no'])
4459

4560
AC_MSG_RESULT(with-fftw3... "${USE_fftw3}")
4661
AC_MSG_RESULT(enable-libpng..."${USE_libpng}")

0 commit comments

Comments
 (0)