Questions about two command-line options of utility program nc-config.
At first, I assume one of the purposes of nc-config is to display the compile and link options used when building the NetCDF libraries. For example, options --cflags and --libs may include the environment variables CFLAGS and LIBS set at configure time. If this is the case, then --cflags and --libs should not include the installation path of NetCDF. The installation paths can be obtained from the already provided option --includedir and --libdir.
Below are my configure command and output from nc-config when using the master branch.
% ./configure --prefix=$HOME/NetCDF \
--enable-netcdf-4 \
CC=mpicc \
CFLAGS="-g -Wall" \
CPPFLAGS="-I/homes/wkliao/HDF5/include" \
LDFLAGS="-L/homes/wkliao/HDF5/lib"
% ./nc-config --all
--cflags -> -I/homes/wkliao/NetCDF/include -I/homes/wkliao/HDF5/include
--libs -> -L/homes/wkliao/NetCDF/lib -lnetcdf
I expected the followings.
% ./nc-config --all
--cflags -> -g -Wall
--cppflags -> -I/homes/wkliao/HDF5/include
--ldflags -> -L/homes/wkliao/HDF5/lib
--libs ->
...
--prefix -> /homes/wkliao/NetCDF
--includedir -> /homes/wkliao/NetCDF/include
--libdir -> /homes/wkliao/NetCDF/lib
Please let me know if my above understanding of nc-config is correct.
Questions about two command-line options of utility program
nc-config.At first, I assume one of the purposes of
nc-configis to display the compile and link options used when building the NetCDF libraries. For example, options--cflagsand--libsmay include the environment variables CFLAGS and LIBS set at configure time. If this is the case, then--cflagsand--libsshould not include the installation path of NetCDF. The installation paths can be obtained from the already provided option--includedirand--libdir.Below are my configure command and output from nc-config when using the master branch.
I expected the followings.
Please let me know if my above understanding of
nc-configis correct.