#
# Copyright (C) 2017, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
# $Id: README.Ubuntu 3433 2017-09-29 17:34:49Z wkliao $

-----------------------------------------------------------------------------
 Build PnetCDF shared libraries on Ubuntu
-----------------------------------------------------------------------------

Please set LDFLAGS to the following at the configure command line, i.e.,

    ./configure --prefix=/path/to/install \
                --enable-shared \
                LDFLAGS="-Wl,--allow-shlib-undefined"


Without option "--enable-shared", only the static libraries will be built
and in this case there is no need to set LDFLAGS.

Note that without setting the LDFLAGS to the above, you might see error
messages similar to below, when using gfortran based MPI compilers.

../../../src/libs/.libs/libpnetcdf.so: undefined reference to `_gfortran_shape_4'
../../../src/libs/.libs/libpnetcdf.so: undefined reference to `_gfortran_os_error'
../../../src/libs/.libs/libpnetcdf.so: undefined reference to `_gfortran_runtime_error_at'
../../../src/libs/.libs/libpnetcdf.so: undefined reference to `_gfortran_runtime_error'
../../../src/libs/.libs/libpnetcdf.so: undefined reference to `_gfortran_internal_unpack'
../../../src/libs/.libs/libpnetcdf.so: undefined reference to `_gfortran_compare_string'
../../../src/libs/.libs/libpnetcdf.so: undefined reference to `_gfortran_internal_pack'
../../../src/libs/.libs/libpnetcdf.so: undefined reference to `_gfortran_string_len_trim'
collect2: error: ld returned 1 exit status

