Commit 1409d6af authored by Matteo Quintiliani's avatar Matteo Quintiliani

Optional seedlink support


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@369 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 54d48bd9
......@@ -36,32 +36,39 @@ AC_ARG_WITH([libmseed],
[AS_HELP_STRING([--without-libmseed], [disable support for libmseed])],
[],
[with_libmseed=yes]
)
)
AC_ARG_WITH([ew],
[AS_HELP_STRING([--without-ew], [disable support for earthworm])],
[],
[with_ew=yes]
)
AS_IF([test "x$with_libmseed" != xno],
[AC_CHECK_LIB([mseed], [msr_init],
[LIBS="$LIBS -lmseed"
AC_DEFINE([HAVE_LIBMSEED], [1], [Define if you have libreadline])
AC_CHECK_LIB([nmxp], [nmxp_data_msr_pack],
[],
[AC_MSG_FAILURE([libmseed is installed but libnmxp does not support it. (Try --without-libmseed to disable)])])
],
[AC_MSG_WARN([
libmseed is not available (--without-libmseed to disable)
])
AC_CHECK_LIB([nmxp], [nmxp_openSocket], [], [AC_MSG_ERROR([libnmxp is not installed or it supports libmseed
but libmseed is not available anymore! Try to recompile libnmxp!
])])
],
)
],
[ AC_CHECK_LIB([nmxp], [nmxp_openSocket], [], [AC_MSG_ERROR([libnmxp is not installed or supports libmseed (--with-libmseed to enable)!])]) ]
)
)
AC_ARG_WITH([seedlink],
[AS_HELP_STRING([--without-seedlink], [disable support for seedlink])],
[],
[with_seedlink=yes]
)
AS_IF([test "x$with_libmseed" != xno],
[AC_CHECK_LIB([mseed], [msr_init],
[LIBS="$LIBS -lmseed"
AC_DEFINE([HAVE_LIBMSEED], [1], [Define if you have libreadline])
AC_CHECK_LIB([nmxp], [nmxp_data_msr_pack],
[],
[AC_MSG_FAILURE([libmseed is installed but libnmxp does not support it. (Try --without-libmseed to disable)])])
],
[AC_MSG_WARN([
libmseed is not available (--without-libmseed to disable)
])
AC_CHECK_LIB([nmxp], [nmxp_openSocket], [], [AC_MSG_ERROR([libnmxp is not installed or it supports libmseed
but libmseed is not available anymore! Try to recompile libnmxp!
])])
],
)
],
[ AC_CHECK_LIB([nmxp], [nmxp_openSocket], [], [AC_MSG_ERROR([libnmxp is not installed or supports libmseed (--with-libmseed to enable)!])]) ]
)
# Checks for header files.
......@@ -69,7 +76,7 @@ AC_HEADER_STDC
AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
# Earthworm check
# Earthworm check.
AS_IF([test "x$with_ew" != xno],
[
AS_IF([test "x$EW_HOME" != x],
......@@ -89,8 +96,11 @@ AS_IF([test "x$with_ew" != xno],
# Checks for files.
# TODO optional
AC_CHECK_FILES([./src/seedlink_plugin.c ./src/seedlink_plugin.h], [], AC_MSG_ERROR([seedlink plug-in sources not found!]))
# Seedlink check.
AS_IF([test "x$with_seedlink" != xno],
[AC_CHECK_FILES([./src/seedlink_plugin.c ./src/seedlink_plugin.h], [], AC_MSG_ERROR([seedlink plug-in sources not found!]))]
)
# Checks for typedefs, structures, and compiler characteristics.
......
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxptool.c,v 1.74 2007-09-28 15:30:13 mtheo Exp $
* $Id: nmxptool.c,v 1.75 2007-09-28 21:04:27 mtheo Exp $
*
*/
......@@ -53,7 +53,10 @@ static void clientDummyHandler(int sig);
int nmxptool_write_miniseed(NMXP_DATA_PROCESS *pd);
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
int nmxptool_send_raw_depoch(NMXP_DATA_PROCESS *pd);
#endif
int nmxptool_print_seq_no(NMXP_DATA_PROCESS *pd);
int nmxptool_check_and_log_gap(double time1, double time2, const double gap_tollerance, const char *station, const char *channel);
......@@ -755,6 +758,7 @@ int nmxptool_print_seq_no(NMXP_DATA_PROCESS *pd) {
}
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
int nmxptool_send_raw_depoch(NMXP_DATA_PROCESS *pd) {
/* TODO Set values */
const int usec_correction = 0;
......@@ -763,6 +767,7 @@ int nmxptool_send_raw_depoch(NMXP_DATA_PROCESS *pd) {
return send_raw_depoch(pd->station, pd->channel, pd->time, usec_correction, timing_quality,
pd->pDataPtr, pd->nSamp);
}
#endif
......
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxptool_getoptlong.c,v 1.25 2007-09-28 13:24:52 mtheo Exp $
* $Id: nmxptool_getoptlong.c,v 1.26 2007-09-28 21:04:27 mtheo Exp $
*
*/
......@@ -77,7 +77,14 @@ void nmxptool_supports() {
nmxp_log(NMXP_LOG_NORM_NO, 0, "NO");
#endif
nmxp_log(NMXP_LOG_NORM_NO, 0, ", earthworm ");
nmxp_log(NMXP_LOG_NORM_NO, 0, ", SeedLink ");
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
nmxp_log(NMXP_LOG_NORM_NO, 0, "YES");
#else
nmxp_log(NMXP_LOG_NORM_NO, 0, "NO");
#endif
nmxp_log(NMXP_LOG_NORM_NO, 0, ", Earthworm ");
#ifdef HAVE_EARTHWORMOBJS
nmxp_log(NMXP_LOG_NORM_NO, 0, "YES");
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment