Commit 2fab343c authored by Matteo Quintiliani's avatar Matteo Quintiliani

Added HAVE_SEEDLINK define

git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@1432 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 30b1c919
......@@ -11,7 +11,7 @@ m4_define([major_version], [2])
m4_define([minor_version], [1])
m4_define([micro_version], [2])
# Comment build_version for stable release
m4_define([build_version], [beta4])
m4_define([build_version], [rc2])
m4_ifdef([build_version], [
m4_define([version],
......@@ -256,6 +256,7 @@ AS_IF([test "x$enable_seedlink" != xno],
)
AC_MSG_WARN([SEISCOMPDIR is set to ${SEISCOMPDIR}])
AC_SUBST(SEISCOMPDIR)
AC_DEFINE([HAVE_SEEDLINK], [1], [Define if you have libmseed])
],
[
......
......@@ -45,7 +45,7 @@
#include <libmseed.h>
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_H
#ifdef HAVE_SEEDLINK
#include "seedlink_plugin.h"
#endif
......@@ -86,12 +86,12 @@ int nmxptool_log_miniseed(const char *s);
int nmxptool_logerr_miniseed(const char *s);
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
int nmxptool_send_raw_depoch(NMXP_DATA_PROCESS *pd);
#endif
#ifdef HAVE_LIBMSEED
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
void nmxptool_msr_send_mseed_handler (char *record, int reclen, void *handlerdata);
int nmxptool_msr_send_mseed(NMXP_DATA_PROCESS *pd);
#endif
......@@ -324,7 +324,7 @@ int main (int argc, char **argv) {
}
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
/* Send data to SeedLink Server */
if(params.flag_slink) {
p_func_pd[n_func_pd++] = nmxptool_send_raw_depoch;
......@@ -332,7 +332,7 @@ int main (int argc, char **argv) {
#endif
#ifdef HAVE_LIBMSEED
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
/* Send data to SeedLink Server */
if(params.flag_slinkms) {
p_func_pd[n_func_pd++] = nmxptool_msr_send_mseed;
......@@ -681,7 +681,7 @@ int main (int argc, char **argv) {
}
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
/* Send data to SeedLink Server */
if(params.flag_slink) {
nmxptool_send_raw_depoch(pd);
......@@ -689,7 +689,7 @@ int main (int argc, char **argv) {
#endif
#ifdef HAVE_LIBMSEED
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
/* Send data to SeedLink Server */
if(params.flag_slinkms) {
nmxptool_msr_send_mseed(pd);
......@@ -1063,7 +1063,7 @@ int main (int argc, char **argv) {
}
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
/* Send data to SeedLink Server */
if(params.flag_slink) {
nmxptool_send_raw_depoch(pd);
......@@ -1071,7 +1071,7 @@ int main (int argc, char **argv) {
#endif
#ifdef HAVE_LIBMSEED
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
/* Send data to SeedLink Server */
if(params.flag_slinkms) {
nmxptool_msr_send_mseed(pd);
......@@ -1550,7 +1550,7 @@ int nmxptool_write_miniseed(NMXP_DATA_PROCESS *pd) {
#endif
#ifdef HAVE_LIBMSEED
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
void nmxptool_msr_send_mseed_handler (char *record, int reclen, void *handlerdata) {
int ret = 0;
......@@ -1644,7 +1644,7 @@ int nmxptool_print_seq_no(NMXP_DATA_PROCESS *pd) {
}
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
int nmxptool_send_raw_depoch(NMXP_DATA_PROCESS *pd) {
/* TODO Set values */
const int usec_correction = 0;
......
......@@ -107,7 +107,7 @@ void nmxptool_supports() {
#endif
nmxp_log(NMXP_LOG_NORM_NO, NMXP_LOG_D_ANY, ", SeedLink ");
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
nmxp_log(NMXP_LOG_NORM_NO, NMXP_LOG_D_ANY, "YES");
#else
nmxp_log(NMXP_LOG_NORM_NO, NMXP_LOG_D_ANY, "NO");
......@@ -179,7 +179,7 @@ NMXP_LOG_STR(DAP_VERSION)
\n", NMXP_LOG_STR(PACKAGE_NAME));
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
nmxp_log(NMXP_LOG_NORM_NO, NMXP_LOG_D_ANY, "\
%s <option ... option> [ -k | -K ]\n\
Launched as SeedLink plug-in to feed the SL-Server.\n\
......@@ -362,7 +362,7 @@ Mini-SEED arguments:\n");
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
nmxp_log(NMXP_LOG_NORM_NO, NMXP_LOG_D_ANY, "\
SeedLink arguments:\n");
......@@ -664,15 +664,15 @@ int nmxptool_getopt_long(int argc, char **argv, NMXPTOOL_PARAMS *params)
{"reclen", required_argument, NULL, 'r'},
#endif
{"writefile", no_argument, NULL, 'w'},
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
{"slink", required_argument, NULL, 'k'},
#endif
#ifdef HAVE_LIBMSEED
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
{"slinkms", required_argument, NULL, 'K'},
#endif
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
{"timing_quality", required_argument, NULL, 'Q'},
#endif
#ifndef HAVE_WINDOWS_H
......@@ -699,13 +699,13 @@ int nmxptool_getopt_long(int argc, char **argv, NMXPTOOL_PARAMS *params)
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
strcat(optstr, "Q:");
strcat(optstr, "k:");
#endif
#ifdef HAVE_LIBMSEED
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
strcat(optstr, "K:");
#endif
#endif
......@@ -874,7 +874,7 @@ int nmxptool_getopt_long(int argc, char **argv, NMXPTOOL_PARAMS *params)
nmxp_log(NMXP_LOG_NORM, NMXP_LOG_D_ANY, "Max_time_to_retrieve %d\n", params->max_data_to_retrieve);
break;
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
case 'k':
params->flag_slink = 1;
if(params->flag_slinkms) {
......@@ -891,7 +891,7 @@ int nmxptool_getopt_long(int argc, char **argv, NMXPTOOL_PARAMS *params)
#endif
#ifdef HAVE_LIBMSEED
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
case 'K':
params->flag_slinkms = 1;
if(params->flag_slink) {
......@@ -908,7 +908,7 @@ int nmxptool_getopt_long(int argc, char **argv, NMXPTOOL_PARAMS *params)
#endif
#endif
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
case 'Q':
params->timing_quality = atoi(optarg);
break;
......@@ -1339,7 +1339,7 @@ int nmxptool_check_params(NMXPTOOL_PARAMS *params) {
nmxp_log(NMXP_LOG_WARN, NMXP_LOG_D_ANY, "<timeoutrecv> ignored since not defined --stc=-1.\n");
}
#ifdef HAVE___SRC_SEEDLINK_PLUGIN_C
#ifdef HAVE_SEEDLINK
if( params->timing_quality != DEFAULT_TIMING_QUALITY &&
( params->timing_quality < DEFAULT_TIMING_QUALITY_MINIMUM || params->timing_quality > DEFAULT_TIMING_QUALITY_MAXIMUM) ) {
ret = -1;
......
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