diff --git a/configure.ac b/configure.ac index 105b73449..b3d35a85b 100644 --- a/configure.ac +++ b/configure.ac @@ -954,7 +954,7 @@ else NC_LIBS="$with_netcdf_c_lib" fi if test "x$enable_shared" != xyes; then - NC_LIBS="$NC_LIBS $LIBS" + NC_LIBS="$LDFLAGS $NC_LIBS $LIBS" fi case "x$target_os" in