Ignore:
Timestamp:
Aug 16, 2018, 8:00:56 AM (6 years ago)
Author:
djay
Message:

Fixes for supporting properly the memory=protect which force the ZOO-Kernel to not store any downloaded files in memory. Add footer to the HPC support. Fix the autotools to build service_json and sshapi only when required so, when HPC support is activated, this also avoid adding too much dependencies at compilation time. Store md5 of the downloaded files to avoid uploading on HPC server the same file more than once, in case the md5 correspond.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-kernel/configure.ac

    r873 r877  
    6868    [AS_HELP_STRING([--with-json=PATH], [Specifies an alternative location for the json-c library])],
    6969    [JSON_DIR="$withval"], [JSON_DIR="/usr/"])
    70 JSON_CPPFLAGS="-I$JSON_DIR/include/json-c/"
    71 JSON_LDFLAGS="-L$JSON_DIR/lib -ljson-c"
    72 CPPFLAGS_SAVE="$CPPFLAGS"
    73 CPPFLAGS="$JSON_CPPFLAGS"
    74 LIBS_SAVE="$LIBS"
    75 LIBS="$JSON_LDFLAGS"
    76 echo $CPPFLAGS
    77 AC_CHECK_HEADERS([json_object.h],
    78                         [], [AC_MSG_ERROR([could not find header file json_object.h])])
    79 AC_CHECK_LIB([json-c], [json_object_new_object],
    80                         [], [AC_MSG_ERROR([could not find function in json-c library])])
    81 CPPFLAGS="$CPPFLAGS_SAVE"
    82 JSON_FILE="service_json.o"
    83 JSON_ENABLED="-DJSON"
     70if test "x$JSON_DIR" != "x"
     71then
     72        JSON_CPPFLAGS="-I$JSON_DIR/include/json-c/"
     73        JSON_LDFLAGS="-L$JSON_DIR/lib -ljson-c"
     74        CPPFLAGS_SAVE="$CPPFLAGS"
     75        CPPFLAGS="$JSON_CPPFLAGS"
     76        LIBS_SAVE="$LIBS"
     77        LIBS="$JSON_LDFLAGS"
     78        AC_CHECK_HEADERS([json_object.h],
     79                [], [AC_MSG_ERROR([could not find header file json_object.h])])
     80        AC_CHECK_LIB([json-c], [json_object_new_object],
     81                [], [AC_MSG_ERROR([could not find function in json-c library])])
     82        CPPFLAGS="$CPPFLAGS_SAVE"
     83        JSON_FILE="service_json.o"
     84        JSON_ENABLED="-DJSON"
     85fi
    8486AC_SUBST([JSON_CPPFLAGS])
    8587AC_SUBST([JSON_LDFLAGS])
     
    112114#============================================================================
    113115
    114 #AC_ARG_WITH([gettext],
    115 #    [AS_HELP_STRING([--with-gettext=PATH], [Specifies an alternative location for the openssl library])],
    116 #    [GETTEXT_DIR="$withval"], [GETTEXT_DIR="/usr/"])
    117 #GETTEXT_CFLAGS="-I$GETTEXT_DIR/include"
    118 #GETTEXT_LDFLAGS="-L$GETTEXT_DIR/lib -lintl"
     116AC_ARG_WITH([gettext],
     117    [AS_HELP_STRING([--with-gettext=PATH], [Specifies an alternative location for the openssl library])],
     118    [GETTEXT_DIR="$withval"], [GETTEXT_DIR="/usr/"])
     119
     120GETTEXT_CFLAGS="-I$GETTEXT_DIR/include"
     121GETTEXT_LDFLAGS="-L$GETTEXT_DIR/lib -lintl"
    119122#CFLAGS_SAVE="$CFLAGS"
    120123#CFLAGS="$GETTEXT_CFLAGS"
     
    232235        [HPCWITH="$withval"], [HPCWITH="no"])
    233236
     237
     238AC_ARG_WITH([ssh2],
     239        [AS_HELP_STRING([--with-ssh2=PATH], [Specifies an alternative location for the ssh2 library])],
     240        [SSH2PATH="$withval"], [SSH2PATH="/usr"])
     241
    234242if test "x$HPCWITH" = "xyes"; then
    235243        HPC_FILES="service_internal_hpc.o sshapi.o"
     
    237245        HPC_CPPFLAGS=""
    238246        HPC_LDFLAGS=""
     247        # Extract the linker and include flags
     248        SSH2_LDFLAGS="-L$SSH2PATH/lib -lssh2"
     249        SSH2_CPPFLAGS="-I$SSH2PATH/include"
     250        # Check headers file
     251        CPPFLAGS_SAVE="$CPPFLAGS"
     252        CPPFLAGS="$SSH2_CPPFLAGS"
     253        LIBS_SAVE="$LIBS"
     254        LIBS="$SSH2_LDFLAGS"
     255       
     256        AC_CHECK_HEADERS([libssh2.h],
     257                 [], [AC_MSG_ERROR([could not find headers related to libssh2])])
     258        AC_CHECK_LIB([ssh2], [libssh2_session_init])
     259
     260        LIBS="$LIBS_SAVE"
    239261fi
    240262
     
    244266AC_SUBST([HPC_FILES])
    245267
    246 AC_ARG_WITH([ssh2],
    247         [AS_HELP_STRING([--with-ssh2=PATH], [Specifies an alternative location for the ssh2 library])],
    248         [SSH2PATH="$withval"], [SSH2PATH="/usr"])
    249 
    250 # Extract the linker and include flags
    251 SSH2_LDFLAGS="-L$SSH2PATH/lib -lssh2"
    252 SSH2_CPPFLAGS="-I$SSH2PATH/include"
    253 # Check headers file
    254 CPPFLAGS_SAVE="$CPPFLAGS"
    255 CPPFLAGS="$SSH2_CPPFLAGS"
    256 LIBS_SAVE="$LIBS"
    257 LIBS="$SSH2_LDFLAGS"
    258 echo $CPPFLAGS
    259 echo $LIBS
    260 
    261 AC_CHECK_HEADERS([libssh2.h],
    262                  [], [AC_MSG_ERROR([could not find headers related to libssh2])])
    263 AC_CHECK_LIB([ssh2], [libssh2_session_init])
    264 
    265 LIBS="$LIBS_SAVE"
    266268AC_SUBST([SSH2_CPPFLAGS])
    267269AC_SUBST([SSH2_LDFLAGS])
     
    805807
    806808        AC_LANG([C++])
    807         echo $JAVA_CPPFLAGS
     809        #echo $JAVA_CPPFLAGS
    808810        # Check headers file (second time we check that in fact)
    809811        CPPFLAGS_SAVE="$CPPFLAGS"
     
    855857
    856858        AC_LANG([C++])
    857         echo $JAVA_CPPFLAGS
     859        #echo $JAVA_CPPFLAGS
    858860        # Check headers file (second time we check that in fact)
    859861        CPPFLAGS_SAVE="$CFLAGS"
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