WSL/SLF GitLab Repository

Commit 27f5a40b authored by Mathias Bavay's avatar Mathias Bavay
Browse files

The autotools have been brought back... The popc version can ONLY be correctly...

The autotools have been brought back... The popc version can ONLY be correctly compiled with the autotools! The installation as generated by the autotools and by cmake are now identical (same paths)
parent 952e495b
......@@ -59,7 +59,7 @@ if (DEST STREQUAL "hera_par")
set(EXTRA_WARNINGS "-Wextra ")
set(OPTIM "-g -O3 -DNDEBUG")
#required for AMD64: amdfam10 or fPIC, even for static libs
set(ARCH "-march=amdfam10")
set(ARCH "-march=amdfam10 -fPIC")
set(DEBUG "-g -O0 -D__DEBUG")
endif(DEST STREQUAL "hera_par")
......@@ -117,8 +117,9 @@ FILE(GLOB plugins "${PROJECT_SOURCE_DIR}/lib/plugins/lib*.so*")
FILE(GLOB alibs "${PROJECT_SOURCE_DIR}/lib/*.a*")
if (DEST MATCHES "par")
FILE(GLOB modules "${PROJECT_SOURCE_DIR}/lib/*.module")
INSTALL(FILES ${modules} DESTINATION lib/meteoio)
endif(DEST MATCHES "par")
INSTALL(FILES ${solibs} ${alibs} ${modules} DESTINATION lib)
INSTALL(FILES ${solibs} ${alibs} DESTINATION lib)
INSTALL(FILES ${plugins} DESTINATION lib/meteoio/plugins)
......
#
# Makefile for the METEOIO Library
#
#Destination system: either zeus, grid or safe
#Prefix: @prefix@
####### USER CONFIGURATION
# build mode: release or debug
MODE = @MODE@
# plugins to build (yes/no)
BORMAIO = @BORMAIO@
IMISIO = @IMISIO@
GEOTOPIO = @GEOTOPIO@
GSNIO = @GSNIO@
SNIO = @SNIO@
SMETIO = @SMETIO@
ARCIO = @ARCIO@
GRASSIO = @GRASSIO@
PROJ4 = @PROJ4@
####### COMPILERS AND OPTIONS
#SVNREV_GEN = $(shell main/version.sh)
#SVNREV = $(eval SVNREV := $(SVNREV_GEN))$(SVNREV)
CC = @CC@ -DGNU
CXX = @CXX@
LINKER = @CXX@ -DGNU
POPCC = popcc
DEBUG = -g -O0 -D__DEBUG #-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC #-dr
debug_arithm = -DDEBUG_ARITHM -g
WARNING = @WARNING@ @EXTRA_WARN@ #-Weffc++ #-pedantic-errors #-Werror
ARCH = @ARCH@
OPTIM = @OPTIM@
MAKE_OPTIM = @MAKE_OPTIM@
ifeq ($(MODE),debug) #for debug
CFLAGS = $(debug_arithm) $(MAKE_OPTIM) $(ARCH) $(DEBUG) $(WARNING)
CCFLAGS = $(debug_arithm) $(MAKE_OPTIM) $(ARCH) $(DEBUG) $(WARNING)
FFLAGS = $(debug_arithm) $(MAKE_OPTIM) $(DEBUG) $(WARNING)
else #for release
CFLAGS = $(debug_arithm) $(MAKE_OPTIM) $(ARCH) $(OPTIM) $(WARNING)
CCFLAGS = $(debug_arithm) $(MAKE_OPTIM) $(ARCH) $(OPTIM) $(WARNING)
FFLAGS = $(debug_arithm) $(MAKE_OPTIM) $(FFOPTIM) $(WARNING)
endif
#CCFLAGS += -DSVNREV="\"$(SVNREV)\""
#################################################
# END USER OPTIONS
#################################################
####### DIRECTORIES
TARGET = meteoio
#TARGET_POPC = meteoio_par
SRCDIR = ./meteoio
PLUGINDIR = ./meteoio/plugins
LIBDIR = ./lib
TOOLSDIR = ./tools
export prefix = @prefix@
export exec_prefix = @exec_prefix@
LIBS = -lc -ldl -lm -lstdc++
LDFLAGS_SEQ = -L$(LIBDIR) -lmeteoio
LD_POPC = -L$(LIBDIR) -lmeteoiopopc
LDFLAGS_POPC = $(LD_POPC)
LDFLAGS = $(LIBS) -rdynamic
INCLUDE = -I.
ifeq ($(PROJ4),yes)
#warning: this is a bug on architectures other than ix386: one can not mix PIC and PDC code
PROJ4_STATIC = @PROJ4_LIBS@
CCFLAGS += -DPROJ4
endif
######## Sources, objects, headers
METEOIO_OBJ = $(SRCDIR)/MeteoData.o \
$(SRCDIR)/StationData.o \
$(SRCDIR)/IOHandler.o \
$(SRCDIR)/IOInterface.o \
$(SRCDIR)/DynamicLibrary.o \
$(SRCDIR)/A3DIO.o \
$(SRCDIR)/BufferedIOHandler.o \
$(SRCDIR)/ConfigReader.o \
$(SRCDIR)/Date.o \
$(SRCDIR)/Grid2DObject.o \
$(SRCDIR)/Grid3DObject.o \
$(SRCDIR)/FilterAlgorithms.o \
$(SRCDIR)/DEMObject.o \
$(SRCDIR)/IOExceptions.o \
$(SRCDIR)/IOUtils.o \
$(SRCDIR)/Coords.o \
$(SRCDIR)/libinterpol2D.o \
$(SRCDIR)/libinterpol1D.o \
$(SRCDIR)/Meteo2DInterpolator.o \
$(SRCDIR)/Meteo1DInterpolator.o \
$(SRCDIR)/MeteoProcessor.o \
$(SRCDIR)/MeteoFilter.o \
$(SRCDIR)/ResamplingAlgorithms.o \
$(SRCDIR)/InterpolationAlgorithms.o
METEOIO_OBJ_POPC = $(SRCDIR)/IOInterface_par.o \
$(SRCDIR)/IOInterface_par.o \
$(SRCDIR)/IOHandler.stub.o \
$(SRCDIR)/IOHandler_par.o \
$(SRCDIR)/BufferedIOHandler_par.o \
$(SRCDIR)/A3DIO_par.o \
$(SRCDIR)/MeteoData_par.o \
$(SRCDIR)/StationData_par.o \
$(SRCDIR)/ConfigReader_par.o \
$(SRCDIR)/Date_par.o \
$(SRCDIR)/Grid2DObject_par.o \
$(SRCDIR)/Grid3DObject_par.o \
$(SRCDIR)/MeteoFilter_par.o \
$(SRCDIR)/FilterAlgorithms_par.o \
$(SRCDIR)/DEMObject_par.o \
$(SRCDIR)/IOExceptions_par.o \
$(SRCDIR)/IOUtils_par.o \
$(SRCDIR)/Coords_par.o \
$(SRCDIR)/libinterpol2D_par.o \
$(SRCDIR)/libinterpol1D_par.o \
$(SRCDIR)/Meteo2DInterpolator_par.o \
$(SRCDIR)/InterpolationAlgorithms_par.o \
$(SRCDIR)/DynamicLibrary_par.o \
$(SRCDIR)/Meteo1DInterpolator_par.o \
$(SRCDIR)/MeteoProcessor_par.o \
$(SRCDIR)/MeteoFilter_par.o \
$(SRCDIR)/ResamplingAlgorithms_par.o \
$(SRCDIR)/marshal_meteoio_par.o
TOOLS_OBJ = $(TOOLSDIR)/createA3DFiles.o
####### Build rules SEQ
all: seq
@echo -e "*** MeteoIO compiled as \033[36m$(MODE)\033[0m"
help:
@echo -e "MeteoIO Makefile targets:"
@echo -e " \033[36mseq\033[0m"
@echo -e " \033[36mcreateA3DFiles\033[0m"
@echo -e " \033[36mpar\033[0m"
@echo -e " \033[36minstall\033[0m"
@echo -e " \033[36mclean\033[0m"
@echo -e " \033[36mdistclean\033[0m"
@echo -e " \033[36mdocumentation\033[0m"
seq: $(LIBDIR)/libmeteoio.a build_dynamiclibs
build_dynamiclibs: $(LIBDIR)/plugins/libbormaio.so \
$(LIBDIR)/plugins/libimisio.so \
$(LIBDIR)/plugins/libgeotopio.so \
$(LIBDIR)/plugins/libgsnio.so \
$(LIBDIR)/plugins/libsnio.so \
$(LIBDIR)/plugins/libsmetio.so \
$(LIBDIR)/plugins/libarcio.so \
$(LIBDIR)/plugins/libgrassio.so
############## POPC ##############
par: $(LIBDIR)/libmeteoiopopc.a build_dynamiclibs_par meteoIO_module_par
@echo -e "*** MeteoIO-Popc+ compiled as \033[36m$(MODE)\033[0m"
build_dynamiclibs_par: $(LIBDIR)/plugins/libarciopopc.so \
$(LIBDIR)/plugins/libsmetiopopc.so \
$(LIBDIR)/plugins/libsniopopc.so \
$(LIBDIR)/plugins/libgrassiopopc.so
meteoIO_module_par: $(LIBDIR)/meteoio.module
############## END ##############
clean:
-rm -f $(SRCDIR)/*~ $(SRCDIR)/*.o $(TOOLSDIR)/*.o $(PLUGINDIR)/*.o
# cd $(PLUGINDIR)/gsn; make clean
distclean: clean
-rm -f $(TOOLSDIR)/createA3DFiles
-rm -f $(LIBDIR)/*.a $(LIBDIR)/*.so $(LIBDIR)/*.module
.PHONY: install
install:
@echo **** Installing MeteoIO
mkdir -p @includedir@/meteoio
mkdir -p @libdir@
mkdir -p @libdir@/meteoio/plugins
cp ${SRCDIR}/*.h @includedir@/meteoio
cp ${SRCDIR}/*.ph @includedir@/meteoio
-cp lib/libmeteoio* @libdir@
-cp lib/plugins/*.so @libdir@/meteoio/plugins
-cp lib/*.module @libdir@/meteoio
documentation:
doxygen $(SRCDIR)/config.dox
####### Compile
.cc.o: $*.cc $*.h
$(CXX) $(CCFLAGS) -fPIC -c $< $(INCLUDE) -o $@
%_par.o : %.cc
$(POPCC) $(CCFLAGS) -fPIC -c $< $(INCLUDE) -o $@
%.stub.o : %.ph
$(POPCC) $(CCFLAGS) -fPIC -c $< $(INCLUDE) -o $@
$(LIBDIR)/libmeteoio.a: $(METEOIO_OBJ)
@echo -e **** Compiling libmeteoIO
ar -r $@ $(METEOIO_OBJ) $(PROJ4_STATIC)
ranlib $@
$(LIBDIR)/libmeteoiopopc.a: $(METEOIO_OBJ_POPC)
@echo -e **** Compiling libmeteoIOpopc
ar -r $@ $(METEOIO_OBJ_POPC) $(PROJ4_STATIC)
ranlib $@
# Dynamic libraries seq
$(LIBDIR)/plugins/libbormaio.so: $(PLUGINDIR)/BormaIO.cc $(PLUGINDIR)/BormaIO.h $(LIBDIR)/libmeteoio.a
ifeq ($(BORMAIO),yes)
@echo **** Compiling Borma plugin
$(CXX) $(CCFLAGS) -fPIC $(INCLUDE) @XMLPP_CFLAGS@ -c -o $(PLUGINDIR)/BormaIO.o $(PLUGINDIR)/BormaIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libbormaio.so -o $@ $(PLUGINDIR)/BormaIO.o $(LDFLAGS) @XMLPP_LIBS@
endif
$(LIBDIR)/plugins/libgeotopio.so:$(PLUGINDIR)/GeotopIO.cc $(PLUGINDIR)/GeotopIO.h $(LIBDIR)/libmeteoio.a
ifeq ($(GEOTOPIO),yes)
@echo **** Compiling GeoTOP plugin
$(CXX) $(CCFLAGS) -fPIC $(INCLUDE) -c -o $(PLUGINDIR)/GeotopIO.o $(PLUGINDIR)/GeotopIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libgeotopio.so -o $@ $(PLUGINDIR)/GeotopIO.o $(LDFLAGS)
endif
$(LIBDIR)/plugins/libsnio.so:$(PLUGINDIR)/SNIO.cc $(PLUGINDIR)/SNIO.h $(LIBDIR)/libmeteoio.a
ifeq ($(SNIO),yes)
@echo **** Compiling SNOWPACK plugin
$(CXX) $(CCFLAGS) -fPIC $(INCLUDE) -c -o $(PLUGINDIR)/SNIO.o $(PLUGINDIR)/SNIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libsnio.so -o $@ $(PLUGINDIR)/SNIO.o $(LDFLAGS)
endif
$(LIBDIR)/plugins/libsmetio.so:$(PLUGINDIR)/SMETIO.cc $(PLUGINDIR)/SMETIO.h $(LIBDIR)/libmeteoio.a
ifeq ($(SNIO),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)
endif
$(LIBDIR)/plugins/libarcio.so:$(PLUGINDIR)/ARCIO.cc $(PLUGINDIR)/ARCIO.h $(LIBDIR)/libmeteoio.a
ifeq ($(ARCIO),yes)
@echo **** Compiling ARC file plugin
$(CXX) $(CCFLAGS) -fPIC $(INCLUDE) -c -o $(PLUGINDIR)/ARCIO.o $(PLUGINDIR)/ARCIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libarcio.so -o $@ $(PLUGINDIR)/ARCIO.o $(LDFLAGS)
endif
$(LIBDIR)/plugins/libgrassio.so:$(PLUGINDIR)/GrassIO.cc $(PLUGINDIR)/GrassIO.h $(LIBDIR)/libmeteoio.a
ifeq ($(GRASSIO),yes)
@echo **** Compiling GRASS file plugin
$(CXX) $(CCFLAGS) -fPIC $(INCLUDE) -c -o $(PLUGINDIR)/GrassIO.o $(PLUGINDIR)/GrassIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libgrassio.so -o $@ $(PLUGINDIR)/GrassIO.o $(LDFLAGS)
endif
$(LIBDIR)/plugins/libgsnio.so:$(PLUGINDIR)/GSNIO.cc $(PLUGINDIR)/GSNIO.h $(LIBDIR)/libmeteoio.a
ifeq ($(GSNIO),yes)
@echo **** Compiling GSN plugin
cd $(PLUGINDIR)/gsn; make
$(CXX) $(CCFLAGS) -fPIC $(INCLUDE) @GSOAPPP_CFLAGS@ -c -o $(PLUGINDIR)/GSNIO.o $(PLUGINDIR)/GSNIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libgsnio.so -o $@ $(PLUGINDIR)/GSNIO.o $(PLUGINDIR)/gsn/soapA3DWebServiceSoap12BindingProxy.o $(PLUGINDIR)/gsn/soapC.o $(LDFLAGS) @GSOAPPP_LIBS@
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++
endif
# Dynamic libraries par
$(LIBDIR)/plugins/libgrassiopopc.so:$(PLUGINDIR)/GrassIO.cc $(PLUGINDIR)/GrassIO.h $(LIBDIR)/libmeteoiopopc.a
ifeq ($(GRASSIO),yes)
@echo **** Compiling GRASS file plugin
$(POPCC) $(CCFLAGS) -fPIC $(INCLUDE) -c -o $(PLUGINDIR)/GrassIO.o $(PLUGINDIR)/GrassIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libgrassio.so -o $@ $(PLUGINDIR)/GrassIO.o $(LDFLAGS_POPC) $(LDFLAGS)
endif
$(LIBDIR)/plugins/libarciopopc.so:$(PLUGINDIR)/ARCIO.cc $(PLUGINDIR)/ARCIO.h $(LIBDIR)/libmeteoiopopc.a
ifeq ($(ARCIO),yes)
@echo **** Compiling ARC file plugin
$(POPCC) $(CCFLAGS) -fPIC $(INCLUDE) -c -o $(PLUGINDIR)/ARCIO.o $(PLUGINDIR)/ARCIO.cc
$(CXX) $(CCFLAGS) -rdynamic -shared -Wl,-soname,libarcio.so -o $@ $(PLUGINDIR)/ARCIO.o $(LDFLAGS_POPC) $(LDFLAGS)
endif
$(LIBDIR)/plugins/libsmetiopopc.so:$(PLUGINDIR)/SMETIO.cc $(PLUGINDIR)/SMETIO.h $(LIBDIR)/libmeteoiopopc.a
ifeq ($(ARCIO),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)
@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)/meteoio.module: $(LIBDIR)/libmeteoiopopc.a $(SRCDIR)/PackMeteoIO_par.o
$(POPCC) $(CCFLAGS) -object -parocld=$(LINKER) -o $@ $(SRCDIR)/PackMeteoIO_par.o $(LDFLAGS) $(LDFLAGS_POPC)
This diff is collapsed.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.6])
AC_INIT(meteoio, 0.1, bavay@slf.ch)
m4_include(m4/ax_cflags_warn_all.m4)
m4_include(m4/m4_ax_cflags_gcc_option.m4)
m4_include(m4/m4_ax_compiler_vendor.m4)
m4_include(m4/pkg.m4)
#m4_include(m4/m4_ax_check_compiler_flags.m4)
#m4_include(m4/m4_ax_gcc_x86_cpuid.m4)
#m4_include(m4/m4_ax_gcc_archflag.m4)
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB
AC_CHECK_PROG([COLORGCC], [colorgcc], [yes], [no])
if test "$COLORGCC" == "yes"
then
AC_MSG_NOTICE([Compiling using colorgcc])
CC=colorgcc
CXX=colorgcc
fi
#AC_PROG_LIBTOOL
AC_LANG(C++)
#testing GCC flags, assuming that c and c++ compilers are the same
AX_CFLAGS_WARN_ALL(WARNING)
AC_SUBST(WARNING)
AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])], GCC_ARCH=$withval, GCC_ARCH=yes)
if test "x$GCC_ARCH" != xyes
then
ARCH="-march=$GCC_ARCH"
fi
AX_COMPILER_VENDOR
if test "$ax_cv_cxx_compiler_vendor" == "gnu"
then
AC_MSG_NOTICE([Checking specific GNU flags])
AX_CFLAGS_GCC_OPTION(-Wextra, EXTRA_WARN)
AC_SUBST(EXTRA_WARN)
if test "x$GCC_ARCH" = xyes
then
AX_CFLAGS_GCC_OPTION(-march=native, ARCH)
fi
AX_CFLAGS_GCC_OPTION(-g, OPTIM)
AX_CFLAGS_GCC_OPTION(-O3, OPTIM)
AC_SUBST(OPTIM)
AX_CXXFLAGS_GCC_OPTION(-combine, MAKE_OPTIM)
AX_CXXFLAGS_GCC_OPTION(-pipe, MAKE_OPTIM)
AC_SUBST(MAKE_OPTIM)
fi
AC_SUBST(ARCH)
# Checks for libraries.
AC_CHECK_LIB([dl], [main],,[AC_MSG_ERROR([Error, the dl library is missing!])])
AC_CHECK_LIB([c], [main],,[AC_MSG_ERROR([Error, the c library is missing!])])
AC_CHECK_LIB([m], [main],,[AC_MSG_ERROR([Error, the math library is missing!])])
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([dlfcn.h memory.h stdlib.h string.h sys/stat.h math.h],,[AC_MSG_ERROR([The header files must be present!])])
# Checks for typedefs, structures, and compiler characteristics.
#AC_HEADER_STDBOOL
AC_C_CONST
#AC_C_INLINE
#AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_STAT
AC_CHECK_PROG([POPCC], [popcc], [yes], [no])
if test "$POPCC" == "no"
then
AC_MSG_NOTICE([Pop-C++ not found, you won't be able to use the parallel version])
fi
echo
echo "================================="
echo "= USER OPTIONS ="
echo "================================="
######################## DEBUG MODE ######################
AC_ARG_ENABLE(debug, [ --enable-debug Enable debug mode], [debug=yes])
if test "$debug" == "yes"
then
AC_SUBST(MODE,debug)
else
AC_SUBST(MODE,release)
fi
AC_MSG_NOTICE([Compiling for mode '$MODE'])
######################## PLUGINS ##########################
CPPFLAGSOLD="$CPPFLAGS"
LDFLAGSOLD="$LDFLAGS"
echo ""
echo "================================="
echo "= ACTIVATED PLUGINS ="
echo "================================="
AC_ARG_WITH(proj4, [ --with-proj4 enable proj4 geographic coordinates conversions (libproj required)])
AC_SUBST(PROJ4,no)
AC_ARG_WITH(bormaio, [ --with-bormaio enable BormaIO (libxml++-2.6 required)])
AC_SUBST(BORMAIO,no)
AC_ARG_WITH(gsnio, [ --with-gsnio enable GSNIO (gsoap++ required)])
AC_SUBST(GSNIO,no)
AC_ARG_WITH(imisio, [ --with-imisio enable IMISIO ($ORACLE_HOME needs to be set)])
AC_SUBST(IMISIO,no)
AC_ARG_WITH(geotopio, [ --with-geotopio enable GeotopIO ], [use_geotopio=$withval], [use_geotopio=no])
AC_SUBST(GEOTOPIO,$use_geotopio)
AC_ARG_WITH(arcio, [ --without-arcio disable ARCIO plugin (default: enabled)], [use_arcio=$withval], [use_arcio=yes])
AC_SUBST(ARCIO,$use_arcio)
AC_ARG_WITH(snio, [ --without-snio disable SNIO plugin (default: enabled)], [use_snio=$withval], [use_snio=yes])
AC_SUBST(SNIO,$use_snio)
AC_ARG_WITH(smetio, [ --without-smetio disable SMETIO plugin (default: enabled)], [use_smetio=$withval], [use_smetio=yes])
AC_SUBST(SMETIO,$use_snio)
AC_ARG_WITH(grassio, [ --without-grassio disable GrassIO plugin (default: enabled)], [use_grassio=$withval], [use_grassio=yes])
AC_SUBST(GRASSIO,$use_grassio)
AC_ARG_VAR(ORACLE_HOME, [The home of your Oracle client installation])
if test "$with_geotopio" == "yes"; then AC_MSG_NOTICE([GeotopIO enabled. No prerequisites...]); fi
if test "x$use_grassio" == "xyes"; then AC_MSG_NOTICE([GrassIO enabled. No prerequisites...]); fi
if test "x$use_arcio" == "xyes"; then AC_MSG_NOTICE([ARCIO enabled. No prerequisites...]); fi
if test "x$use_snio" == "xyes"; then AC_MSG_NOTICE([SNIO enabled. No prerequisites...]); fi
if test "x$use_smetio" == "xyes"; then AC_MSG_NOTICE([SMETIO enabled. No prerequisites...]); fi
if test "$with_proj4" == "yes"
then
AC_MSG_NOTICE([PROJ4 enabled. Checking for prerequisites...])
AC_CHECK_HEADER([proj_api.h],,[AC_MSG_ERROR([Error, the proj_api.h header file is missing!])])
AC_CHECK_LIB(proj,main,,[AC_MSG_ERROR([Error, the proj4 library is missing!])])
AC_SUBST(PROJ4_CFLAGS)
AC_SUBST(PROJ4_LIBS)
AC_SUBST(PROJ4,yes)
fi
if test "$with_gsnio" == "yes"
then
AC_MSG_NOTICE([GSNIO enabled. Checking for prerequisites...])
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "$PKG_CONFIG" == "no"; then
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
rm -f configure config.status
exit 1
fi
PKG_CHECK_MODULES(GSOAPPP, gsoap++ >= 2.0)
CPPFLAGS="$CPPFLAGS $GSOAPPP_CFLAGS"
AC_SUBST(GSOAPPP_CFLAGS)
AC_SUBST(GSOAPPP_LIBS)
AC_SUBST(GSNIO,yes)
fi
if test "$with_bormaio" == "yes"
then
AC_MSG_NOTICE([BormaIO enabled. Checking for prerequisites...])
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "$PKG_CONFIG" == "no"; then
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
rm -f configure config.status
exit 1
fi
PKG_CHECK_MODULES(XMLPP, libxml++-2.6 >= 2.8)
CPPFLAGS="$CPPFLAGS $XMLPP_CFLAGS"
AC_CHECK_HEADER([libxml++/libxml++.h],,[AC_MSG_ERROR([Error, the libxml++.h header file is missing!])])
#AC_CHECK_LIB(xml2, xmlParseFile,,[AC_MSG_ERROR([Error, the xml++ library is missing!])])
AC_SUBST(XMLPP_CFLAGS)
AC_SUBST(XMLPP_LIBS)
AC_SUBST(BORMAIO,yes)
fi
if test "$with_imisio" == "yes"
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"
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)
fi
AC_SUBST(CPPFLAGS, $CPPFLAGSOLD)
AC_SUBST(LDFLAGS,$LDFLAGSOLD)
AC_SUBST(prefix)
AC_SUBST(execprefix)
echo
AC_OUTPUT(Makefile)
echo "Run 'make' to compile the meteoio library"
\ No newline at end of file
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