Skip to content

Commit cb13ae3

Browse files
committed
Issue #6 (library-check) done for netcdf library
Added check for all used netcdf functions
1 parent b308984 commit cb13ae3

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

configure.ac

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,37 @@ AC_PROG_RANLIB
5050

5151
AX_CHECK_PROG([MPICC], [MPI compiler for C programming language has not been found])
5252
AX_CHECK_PROG([MPICXX], [MPI compiler for C++ programming language has not been found])
53-
AS_CASE(["$GOALS"],
54-
[*"qt"*], [
55-
AX_CHECK_PROG([QMAKE], [qmake-qt4 is required but has not been found])
56-
AC_CHECK_LIB([qwt-qt4],[QwtPlot::axisScaleEngine])
57-
]
58-
)
53+
54+
# Checks for -lnetcdf
55+
AX_CHECK_LIB([netcdf], [nc_create nc_close nc_sync nc_def_dim \
56+
nc_def_var nc_enddef nc_put_var_int nc_put_vara_double]
57+
)
58+
59+
for target in $GOALS
60+
do
61+
AS_CASE(["$target"],
62+
[*"network_viewer_qt"*], [
63+
AX_CHECK_PROG([QMAKE], [qmake-qt4 is required but has not been found])
64+
AX_CHECK_LIB([netcdf], [nc_open nc_inq_varid nc_get_var1 \
65+
nc_inq_nvars nc_inq_varids nc_inq_varndims nc_inq_dimlen \
66+
nc_inq_vardimid nc_get_vara_double nc_get_var1_int]
67+
)
68+
],
69+
[*"network_test"*], [
70+
AX_CHECK_LIB([netcdf], [nc_open nc_get_var_int nc_get_vara_double \
71+
nc_inq_dimid nc_inq_dimlen nc_inq_varid]
72+
)
73+
]
74+
)
75+
done
5976

6077
AS_IF([test "x$MPI_CFLAGS" = "x"], [AC_SUBST([MPI_CFLAGS], $CFLAGS)])
6178
AS_IF([test "x$MPI_CXXFLAGS" = "x"], [AC_SUBST([MPI_CXXFLAGS], $CXXFLAGS)])
6279
AS_IF([test "x$MPI_LDFLAGS" = "x"], [AC_SUBST([MPI_LDFLAGS], $LDFLAGS)])
6380
AS_IF([test "x$MPI_LIBS" = "x"], [AC_SUBST([MPI_LIBS], $LIBS)])
6481

6582
# Checks for libraries.
66-
# -lqwt-qt4 -lnetcdf -lGLU -lQtOpenGL -lQtGui -lQtCore -lGL -lpthread
67-
AC_CHECK_LIB([netcdf], [nc_open])
83+
# -lqwt-qt4 -lGLU -lQtOpenGL -lQtGui -lQtCore -lGL -lpthread
6884

6985
# Checks for header files.
7086
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h unistd.h])

0 commit comments

Comments
 (0)