Ignore:
Timestamp:
May 7, 2019, 2:17:08 PM (5 years ago)
Author:
djay
Message:

Merge prototype-v0 branch in trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/zoo-project/zoo-kernel/configure.ac

    r817 r917  
    11AC_INIT([ZOO Kernel], [1.7.0], [bugs@zoo-project.org])
     2
     3AC_CONFIG_MACRO_DIR([macros])
    24
    35# Checks for programs.
     
    1214AC_CHECK_LIB([dl], [dlopen,dlsym,dlerror,dlclose])
    1315AC_CHECK_LIB([crypto], [EVP_DigestInit,EVP_md5,EVP_DigestUpdate,BIO_f_base64,BIO_new])
    14 AC_CHECK_LIB([uuid], [uuid_generate_time])
    1516
    1617DEFAULT_LIBS="$LIBS"
     
    2021# Checks for header files.
    2122AC_FUNC_ALLOCA
    22 AC_CHECK_HEADERS([fcntl.h inttypes.h libintl.h malloc.h stddef.h stdlib.h string.h unistd.h])
     23AC_CHECK_HEADERS([fcntl.h inttypes.h malloc.h stddef.h stdlib.h string.h unistd.h])
    2324
    2425# Checks for typedefs, structures, and compiler characteristics.
     
    3839AC_FUNC_REALLOC
    3940AC_CHECK_FUNCS([dup2 getcwd memset setenv strdup strstr])
     41
     42#============================================================================
     43# Detect if uuid is available
     44#============================================================================
     45
     46AC_ARG_WITH([uuid],
     47    [AS_HELP_STRING([--with-uuid=PATH], [Specifies an alternative location for the ossp-uuid library])],
     48    [UUID_DIR="$withval"], [UUID_DIR="/usr/"])
     49UUID_CFLAGS="-I$UUID_DIR/include"
     50UUID_LDFLAGS="-L$UUID_DIR/lib -luuid"
     51CPPFLAGS_SAVE="$CPPFLAGS"
     52CPPFLAGS="$UUID_CFLAGS"
     53LIBS_SAVE="$LIBS"
     54LIBS="$UUID_LDFLAGS"
     55AC_CHECK_HEADERS([uuid/uuid.h],
     56                        [], [AC_MSG_ERROR([could not find header file uuid.h])])
     57AC_CHECK_LIB([uuid], [uuid_generate_time],
     58                        [], [AC_MSG_ERROR([could not find function in uuid library])])
     59CPPFLAGS="$CPPFLAGS_SAVE"
     60AC_SUBST([UUID_CFLAGS])
     61AC_SUBST([UUID_LDFLAGS])
     62
     63#============================================================================
     64# Detect if json-c is available
     65#============================================================================
     66
     67AC_ARG_WITH([callback],
     68    [AS_HELP_STRING([--with-callback=yes], [Activate callback invocation during HPC execution])],
     69    [CALLBACK_ACTIVATED="$withval"], [CALLBACK_ACTIVATED="no"])
     70   
     71AC_ARG_WITH([json],
     72    [AS_HELP_STRING([--with-json=PATH], [Specifies an alternative location for the json-c library])],
     73    [JSON_DIR="$withval"], [JSON_DIR="/usr/"])
     74if test "x$JSON_DIR" != "x" && test "x$CALLBACK_ACTIVATED" == "xyes"
     75then
     76        JSON_CPPFLAGS="-I$JSON_DIR/include/json-c/"
     77        JSON_LDFLAGS="-L$JSON_DIR/lib -ljson-c"
     78        CPPFLAGS_SAVE="$CPPFLAGS"
     79        CPPFLAGS="$JSON_CPPFLAGS"
     80        LIBS_SAVE="$LIBS"
     81        LIBS="$JSON_LDFLAGS"
     82        AC_CHECK_HEADERS([json_object.h],
     83                [], [AC_MSG_ERROR([could not find header file json_object.h])])
     84        AC_CHECK_LIB([json-c], [json_object_new_object],
     85                [], [AC_MSG_ERROR([could not find function in json-c library])])
     86        CPPFLAGS="$CPPFLAGS_SAVE"
     87        JSON_FILE="service_json.o"
     88        JSON_ENABLED="-DJSON"
     89        CALLBACK_FILE="service_callback.o"
     90        CALLBACK_USE="-DUSE_CALLBACK"
     91fi
     92AC_SUBST([JSON_CPPFLAGS])
     93AC_SUBST([JSON_LDFLAGS])
     94AC_SUBST([JSON_FILE])
     95AC_SUBST([JSON_ENABLED])
     96AC_SUBST([CALLBACK_FILE])
     97AC_SUBST([CALLBACK_USE])
    4098
    4199#============================================================================
     
    56114AC_CHECK_LIB(crypto, BIO_f_base64,
    57115                        [], [AC_MSG_ERROR([could not find $i function in openssl library])])
     116CPPFLAGS="$CPPFLAGS_SAVE"
    58117AC_SUBST([OPENSSL_CFLAGS])
    59118AC_SUBST([OPENSSL_LDFLAGS])
     119
     120#============================================================================
     121# Detect if gettext is available
     122#============================================================================
     123
     124#AC_ARG_WITH([gettext],
     125#    [AS_HELP_STRING([--with-gettext=PATH], [Specifies an alternative location for the openssl library])],
     126#    [GETTEXT_DIR="$withval"], [GETTEXT_DIR="/usr/"])
     127
     128#GETTEXT_CFLAGS="-I$GETTEXT_DIR/include"
     129#GETTEXT_LDFLAGS="-L$GETTEXT_DIR/lib -lintl"
     130#CFLAGS_SAVE="$CFLAGS"
     131#CFLAGS="$GETTEXT_CFLAGS"
     132#LIBS_SAVE="$LIBS"
     133#LIBS="$GETTEXT_LDFLAGS"
     134#AM_GNU_GETTEXT([external], [], [])
     135#AC_CHECK_LIB(intl,
     136#                       [dgettext], [] , [AC_MSG_ERROR([could not find $i function in gettext library])])
     137#AC_SUBST([GETTEXT_CFLAGS])
     138#AC_SUBST([GETTEXT_LDFLAGS])
    60139
    61140#============================================================================
     
    145224AC_SUBST([FCGI_LDFLAGS])
    146225
     226AC_ARG_WITH([metadb],
     227        [AS_HELP_STRING([--with-metadb=yes], [Activates the metadata database support])],
     228        [WITHMETADB="$withval"], [WITHMETADB=""])
     229
     230if test "x$WITHMETADB" = "xyes"; then
     231        METADB="-DMETA_DB"
     232        METADB_FILE="meta_sql.o sqlapi.o"
     233else
     234        METADB=""
     235        METADB_FILE=""
     236fi
     237
     238AC_SUBST([METADB])
     239AC_SUBST([METADB_FILE])
     240
     241AC_ARG_WITH([hpc],
     242        [AS_HELP_STRING([--with-hpc=yes], [Specifies if you need to activate HPC support])],
     243        [HPCWITH="$withval"], [HPCWITH="no"])
     244
     245
     246AC_ARG_WITH([ssh2],
     247        [AS_HELP_STRING([--with-ssh2=PATH], [Specifies an alternative location for the ssh2 library])],
     248        [SSH2PATH="$withval"], [SSH2PATH="/usr"])
     249
     250if test "x$HPCWITH" = "xyes"; then
     251        HPC_FILES="service_internal_hpc.o sshapi.o"
     252        HPC_ENABLED="-DUSE_HPC"
     253        HPC_CPPFLAGS=""
     254        HPC_LDFLAGS=""
     255        # Extract the linker and include flags
     256        SSH2_LDFLAGS="-L$SSH2PATH/lib -lssh2"
     257        SSH2_CPPFLAGS="-I$SSH2PATH/include"
     258        # Check headers file
     259        CPPFLAGS_SAVE="$CPPFLAGS"
     260        CPPFLAGS="$SSH2_CPPFLAGS"
     261        LIBS_SAVE="$LIBS"
     262        LIBS="$SSH2_LDFLAGS"
     263       
     264        AC_CHECK_HEADERS([libssh2.h],
     265                 [], [AC_MSG_ERROR([could not find headers related to libssh2])])
     266        AC_CHECK_LIB([ssh2], [libssh2_session_init])
     267
     268        LIBS="$LIBS_SAVE"
     269fi
     270
     271AC_SUBST([HPC_CPPFLAGS])
     272AC_SUBST([HPC_LDFLAGS])
     273AC_SUBST([HPC_ENABLED])
     274AC_SUBST([HPC_FILES])
     275
     276AC_SUBST([SSH2_CPPFLAGS])
     277AC_SUBST([SSH2_LDFLAGS])
     278
    147279# ===========================================================================
    148280# Detect if libxml2 is installed
     
    400532AC_SUBST([MS_LIBS])
    401533AC_SUBST([MS_FILE])
     534AC_SUBST([MS_VERSION])
     535
     536# ===========================================================================
     537# Detect if R is installed
     538# ===========================================================================
     539
     540AC_ARG_WITH([r],
     541        [AS_HELP_STRING([--with-r=PATH], [To enable python support or Specifies an alternative directory for R installation,  disabled by default])],
     542        [R_PATH="$withval"; R_ENABLED="-DUSE_R"], [R_ENABLED=""])
     543
     544if test -z "$R_ENABLED"
     545then
     546        R_FILE=""
     547else
     548        R_FILE="service_internal_r.o"
     549        # Extract the linker and include flags
     550        R_LDFLAGS="-L$R_PATH/lib/ -lR"
     551        R_CPPFLAGS="-I$R_PATH/include/"
     552
     553        # Check headers file
     554        CPPFLAGS_SAVE="$CPPFLAGS"
     555        CPPFLAGS="$R_CPPFLAGS"
     556        AC_CHECK_HEADERS([RInternals.h],
     557                 [], [AC_MSG_ERROR([could not find headers include related to R])])
     558
     559        # Ensure we can link against libphp
     560        #LIBS_SAVE="$LIBS"
     561        #LIBS="$R_LDFLAGS"
     562        #AC_CHECK_LIB([$LIBS], [R_tryEval], [], [AC_MSG_ERROR([could not find libR])], [])
     563        #LIBS="$LIBS_SAVE"
     564fi
     565
     566AC_SUBST([R_CPPFLAGS])
     567AC_SUBST([R_LDFLAGS])
     568AC_SUBST([R_ENABLED])
     569AC_SUBST([R_FILE])
     570
    402571
    403572# ===========================================================================
     
    646815
    647816        AC_LANG([C++])
    648         echo $JAVA_CPPFLAGS
     817        #echo $JAVA_CPPFLAGS
    649818        # Check headers file (second time we check that in fact)
    650819        CPPFLAGS_SAVE="$CPPFLAGS"
     
    696865
    697866        AC_LANG([C++])
    698         echo $JAVA_CPPFLAGS
     867        #echo $JAVA_CPPFLAGS
    699868        # Check headers file (second time we check that in fact)
    700869        CPPFLAGS_SAVE="$CFLAGS"
     
    8881057        [SAGAPATH="$withval"], [SAGAPATH=""])
    8891058
     1059AC_ARG_WITH([saga-version],
     1060        [AS_HELP_STRING([--with-saga-version=VERSION], [Specifies the SAGA-GIS version number])],
     1061        [SAGAVERS="$withval"], [SAGAVERS="2"])
     1062
    8901063if test -z "$SAGAPATH"
    8911064then
     
    9031076        WX_ISSUE="-D_WX_WXCRTVARARG_H_"
    9041077        SAGA_DEFS="-D_SAGA_LINUX -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -DMODULE_LIBRARY_PATH=\\\"$SAGAPATH/lib/saga\\\""
    905         SAGA_CPPFLAGS=" -fPIC -I$SAGAPATH/include/saga/saga_core/saga_api/ `$WXCFG --unicode=yes --static=no --cxxflags` -D_SAGA_UNICODE $SAGA_DEFS $WX_ISSUE"
     1078        SAGA_CPPFLAGS="-DSAGA_VERSION=${SAGAVERS} -fPIC -I$SAGAPATH/include/saga/saga_core/saga_api/ `$WXCFG --unicode=yes --static=no --cxxflags` -D_SAGA_UNICODE $SAGA_DEFS $WX_ISSUE"
    9061079        SAGA_LDFLAGS="-fPIC `$WXCFG --unicode=yes --static=no --libs` -lsaga_api"
    9071080        SAGA_ENABLED="-DUSE_SAGA"
     
    9141087        LIBS_SAVE="$LIBS"
    9151088        LIBS="$SAGA_LDFLAGS"
    916         AC_CHECK_HEADERS([module_library.h],
    917                         [], [AC_MSG_ERROR([could not find header file $i related to SAGA-GIS])])
    918         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "module_library.h"],[SG_Get_Module_Library_Manager();]])],
    919                 [AC_MSG_RESULT([checking for SG_Get_Module_Library_Manager... yes])],[AC_MSG_ERROR([checking for SG_Get_Module_Library_Manager... failed])])
     1089        if test "$SAGAVERS" == "2"; then
     1090        AC_CHECK_HEADERS([module_library.h],
     1091                        [], [AC_MSG_ERROR([could not find header file $i related to SAGA-GIS])])
     1092        AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "module_library.h"],[SG_Get_Module_Library_Manager();]])],
     1093                [AC_MSG_RESULT([checking for SG_Get_Module_Library_Manager... yes])],[AC_MSG_ERROR([checking for SG_Get_Module_Library_Manager... failed])])
     1094        else
     1095        AC_CHECK_HEADERS([tool_library.h],
     1096                        [], [AC_MSG_ERROR([could not find header file $i related to SAGA-GIS])])
     1097        AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "tool_library.h"],[SG_Get_Tool_Library_Manager();]])],
     1098                [AC_MSG_RESULT([checking for SG_Get_Tool_Library_Manager... yes])],[AC_MSG_ERROR([checking for SG_Get_Tool_Library_Manager... failed])])
     1099        fi
     1100       
    9201101        LIBS="$LIBS_SAVE"
    9211102        AC_LANG_POP([C++])
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png