WSL/SLF GitLab Repository

Commit d5fea8f3 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Fixed some small issues in the autotools, added a clearer error message in...

Fixed some small issues in the autotools, added a clearer error message in ImisIO as well as the ability to automatically add the "0" number after stations' names that don't contain one (like for some non-imis stations)
parent 27f5a40b
......@@ -163,6 +163,7 @@ par: $(LIBDIR)/libmeteoiopopc.a build_dynamiclibs_par meteoIO_module_par
build_dynamiclibs_par: $(LIBDIR)/plugins/libarciopopc.so \
$(LIBDIR)/plugins/libsmetiopopc.so \
$(LIBDIR)/plugins/libsniopopc.so \
$(LIBDIR)/plugins/libimisiopopc.so \
$(LIBDIR)/plugins/libgrassiopopc.so
meteoIO_module_par: $(LIBDIR)/meteoio.module
......@@ -237,7 +238,7 @@ ifeq ($(SNIO),yes)
endif
$(LIBDIR)/plugins/libsmetio.so:$(PLUGINDIR)/SMETIO.cc $(PLUGINDIR)/SMETIO.h $(LIBDIR)/libmeteoio.a
ifeq ($(SNIO),yes)
ifeq ($(SMETIO),yes)
@echo **** Compiling SMET plugin
$(CXX) $(CCFLAGS) -fPIC $(INCLUDE) -c -o $(PLUGINDIR)/SMETIO.o $(PLUGINDIR)/SMETIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libsmetio.so -o $@ $(PLUGINDIR)/SMETIO.o $(LDFLAGS)
......@@ -268,8 +269,8 @@ endif
$(LIBDIR)/plugins/libimisio.so: $(PLUGINDIR)/ImisIO.cc $(PLUGINDIR)/ImisIO.h $(LIBDIR)/libmeteoio.a
ifeq ($(IMISIO),yes)
@echo **** Compiling Imis plugin
$(CXX) $(CCFLAGS) -fPIC $(INCLUDE) -I$(ORACLE_HOME)/rdbms/public $(PLUGINDIR)/ImisIO.cc -c -o $(PLUGINDIR)/ImisIO.o
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-rpath,$(ORACLE_HOME)/lib,-soname,libimisio.so -o $@ $(PLUGINDIR)/ImisIO.o $(LDFLAGS) -L$(ORACLE_HOME)/lib -locci -lclntsh -lstdc++
$(CXX) $(CCFLAGS) -fPIC $(INCLUDE) -I$(ORACLE_HOME)/client_1/rdbms/public $(PLUGINDIR)/ImisIO.cc -c -o $(PLUGINDIR)/ImisIO.o
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-rpath,$(ORACLE_HOME)/client_1/lib,-soname,libimisio.so -o $@ $(PLUGINDIR)/ImisIO.o $(LDFLAGS) -L$(ORACLE_HOME)/client_1/lib -locci -lclntsh -lstdc++
endif
# Dynamic libraries par
......@@ -288,19 +289,26 @@ ifeq ($(ARCIO),yes)
endif
$(LIBDIR)/plugins/libsmetiopopc.so:$(PLUGINDIR)/SMETIO.cc $(PLUGINDIR)/SMETIO.h $(LIBDIR)/libmeteoiopopc.a
ifeq ($(ARCIO),yes)
ifeq ($(SMETIO),yes)
@echo **** Compiling SMET file plugin
$(POPCC) $(CCFLAGS) -fPIC $(INCLUDE) -c -o $(PLUGINDIR)/SMETIO.o $(PLUGINDIR)/SMETIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libsmetio.so -o $@ $(PLUGINDIR)/SMETIO.o $(LDFLAGS_POPC) $(LDFLAGS)
endif
$(LIBDIR)/plugins/libsniopopc.so:$(PLUGINDIR)/SNIO.cc $(PLUGINDIR)/SNIO.h $(LIBDIR)/libmeteoiopopc.a
ifeq ($(ARCIO),yes)
ifeq ($(SNIO),yes)
@echo **** Compiling SNIO file plugin
$(POPCC) $(CCFLAGS) -fPIC $(INCLUDE) -c -o $(PLUGINDIR)/SNIO.o $(PLUGINDIR)/SNIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libsnio.so -o $@ $(PLUGINDIR)/SNIO.o $(LDFLAGS_POPC) $(LDFLAGS)
endif
$(LIBDIR)/plugins/libimisiopopc.so:$(PLUGINDIR)/ImisIO.cc $(PLUGINDIR)/ImisIO.h $(LIBDIR)/libmeteoiopopc.a
ifeq ($(IMISIO),yes)
@echo **** Compiling Imis plugin
$(POPCC) $(CCFLAGS) -fPIC $(INCLUDE) -I$(ORACLE_HOME)/client_1/rdbms/public -c -o $(PLUGINDIR)/ImisIO.o $(PLUGINDIR)/ImisIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libimisio.so -o $@ $(PLUGINDIR)/ImisIO.o $(LDFLAGS_POPC) $(LDFLAGS) -L$(ORACLE_HOME)/client_1/lib -locci -lclntsh -lstdc++
endif
######
$(LIBDIR)/meteoio.module: $(LIBDIR)/libmeteoiopopc.a $(SRCDIR)/PackMeteoIO_par.o
$(POPCC) $(CCFLAGS) -object -parocld=$(LINKER) -o $@ $(SRCDIR)/PackMeteoIO_par.o $(LDFLAGS) $(LDFLAGS_POPC)
......@@ -6757,8 +6757,8 @@ then
echo ""
{ echo "$as_me:$LINENO: IMISIO enabled. Checking for prerequisites..." >&5
echo "$as_me: IMISIO enabled. Checking for prerequisites..." >&6;}
CPPFLAGS="$CPPFLAGS -I$ORACLE_HOME/include"
LDFLAGS="$LDFLAGS -L$ORACLE_HOME/lib -lclntsh -lnnz11"
CPPFLAGS="$CPPFLAGS -I$ORACLE_HOME/client_1/include"
LDFLAGS="$LDFLAGS -L$ORACLE_HOME/client_1/lib -lclntsh -lnnz11"
if test "${ac_cv_header_occi_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for occi.h" >&5
echo $ECHO_N "checking for occi.h... $ECHO_C" >&6; }
......
......@@ -194,8 +194,8 @@ then
#use AX_LIB_ORACLE_OCI?
echo ""
AC_MSG_NOTICE([IMISIO enabled. Checking for prerequisites...])
CPPFLAGS="$CPPFLAGS -I$ORACLE_HOME/include"
LDFLAGS="$LDFLAGS -L$ORACLE_HOME/lib -lclntsh -lnnz11"
CPPFLAGS="$CPPFLAGS -I$ORACLE_HOME/client_1/include"
LDFLAGS="$LDFLAGS -L$ORACLE_HOME/client_1/lib -lclntsh -lnnz11"
AC_CHECK_HEADER([occi.h],,[AC_MSG_ERROR([Error, the occi.h header file is missing!])])
AC_CHECK_LIB([occi], [main],,[AC_MSG_ERROR([Error, the occi library is missing!])])
AC_SUBST(IMISIO,yes)
......
......@@ -163,7 +163,7 @@ void ImisIO::readStationMetaData()
getStationData(stName, stationNumber, resultset);
if (resultset.size() < 4)
throw IOException("Could not read enough meta data", AT);
throw IOException("Could not read enough meta data for station "+stName+stationNumber, AT);
double east, north, alt;
if ((!IOUtils::convertString(east, resultset.at(1), std::dec))
......@@ -187,6 +187,11 @@ void ImisIO::parseStationName(const std::string& stationName, std::string& stNam
{
stName = stationName.substr(0, stationName.length()-1); //The station name: e.g. KLO
stNumber = stationName.substr(stationName.length()-1, 1); //The station number: e.g. 2
if(!std::isdigit(stNumber[0])) {
//the station is one of these non-imis stations that don't contain a number...
stName = stationName;
stNumber = "0";
}
}
/**
......
Supports Markdown
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