]> granicus.if.org Git - curl/commitdiff
os400: Provide options for libssh2 use in compile scripts. Adjust README.
authorPatrick Monnerat <patrick.monnerat@dh.com>
Thu, 19 Nov 2015 12:35:29 +0000 (13:35 +0100)
committerPatrick Monnerat <patrick.monnerat@dh.com>
Thu, 19 Nov 2015 12:37:51 +0000 (13:37 +0100)
packages/OS400/README.OS400
packages/OS400/initscript.sh
packages/OS400/make-lib.sh

index e5c97127be299ad015f76061b90f2f7312439d54..24cf39e642e33e0a815bf4f07d2c2a2271ad064b 100644 (file)
@@ -103,10 +103,10 @@ options:
         CURLOPT_RTSP_TRANSPORT
         CURLOPT_SERVICE_NAME
         CURLOPT_SOCKS5_GSSAPI_SERVICE
-        CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 Note: SSH not available on OS400.
-        CURLOPT_SSH_KNOWNHOSTS          Note: SSH not available on OS400.
-        CURLOPT_SSH_PRIVATE_KEYFILE     Note: SSH not available on OS400.
-        CURLOPT_SSH_PUBLIC_KEYFILE      Note: SSH not available on OS400.
+        CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
+        CURLOPT_SSH_KNOWNHOSTS
+        CURLOPT_SSH_PRIVATE_KEYFILE
+        CURLOPT_SSH_PUBLIC_KEYFILE
         CURLOPT_SSLCERT
         CURLOPT_SSLCERTTYPE
         CURLOPT_SSL_CIPHER_LIST
@@ -204,6 +204,8 @@ _ POP3
 _ POP3S
 _ POP3 with secure transmission
 _ RTSP
+_ SCP if libssh2 is enabled
+_ SFTP if libssh2 is enabled
 _ SMTP
 _ SMTPS
 _ SMTP with secure transmission
@@ -219,13 +221,17 @@ archive extraction. Do not ask questions about these subjects if you're not
 familiar with.
 
 _ As a prerequisite, QADRT development environment must be installed.
+_ If data compression has to be supported, ZLIB development environment must
+  be installed.
+_ Likewise, if SCP and SFTP protocols have to be compiled in, LIBSSH2
+  developent environment must be installed.
 _ Install the curl source directory in IFS.
 _ Enter shell (QSH)
 _ Change current directory to the curl installation directory
 _ Change current directory to ./packages/OS400
 _ Edit file iniscript.sh. You may want to change tunable configuration
   parameters, like debug info generation, optimisation level, listing option,
-  target library, etc.
+  target library, ZLIB/LIBSSH2 availability and location, etc.
 _ Copy any file in the current directory to makelog (i.e.:
   cp initscript.sh makelog): this is intended to create the makelog file with
   an ASCII CCSID!
@@ -254,6 +260,8 @@ _ CURL.INC member in file H. This defines everything needed by an ILE/RPG
   program using libcurl.
 _ LIBxxx modules and programs. Although the test environment is not supported
   on OS/400, the libcurl test programs are compiled for manual tests.
+_ IFS directory /curl/include/curl containg the C header files for IFS source
+  C/C++ compilation and curl.inc.rpgle for IFS source ILE/RPG compilation.
 
 
 
@@ -267,7 +275,8 @@ _ The EBCDIC CCSID used by QADRT is 37 by default, NOT THE JOB'S CCSID. If
   LC_CTYPE, or by setting environment variable QADRT_ENV_LOCALE to the locale
   object path before executing the program.
 _ Do not use original source include files unless you know what you are doing.
-  Use the installed members instead (in /QSYS.LIB/CURL.LIB/H.FILE).
+  Use the installed members instead (in /QSYS.LIB/CURL.LIB/H.FILE and
+  /curl/include/curl).
 
 
 
index 0105f5a9d0b3c9399e9bafc0f84544b1a00d7d32..8d66b606a01fe41db4b8805619f984b16959591a 100644 (file)
@@ -60,6 +60,13 @@ setenv ZLIB_INCLUDE     '/zlib/include'         # ZLIB include IFS directory.
 setenv ZLIB_LIB         'ZLIB'                  # ZLIB library.
 setenv ZLIB_BNDDIR      'ZLIB_A'                # ZLIB binding directory.
 
+#       Define LIBSSH2 availability and locations.
+
+setenv WITH_LIBSSH2     0                       # Define to 1 to enable.
+setenv LIBSSH2_INCLUDE  '/libssh2/include'      # LIBSSH2 include IFS directory.
+setenv LIBSSH2_LIB      'LIBSSH2'               # LIBSSH2 library.
+setenv LIBSSH2_BNDDIR   'LIBSSH2_A'             # LIBSSH2 binding directory.
+
 
 ################################################################################
 
@@ -190,6 +197,10 @@ make_module()
         then    CMD="${CMD} '${ZLIB_INCLUDE}'"
         fi
 
+        if [ "${WITH_LIBSSH2}" != "0" ]
+        then    CMD="${CMD} '${LIBSSH2_INCLUDE}'"
+        fi
+
         CMD="${CMD} ${INCLUDES})"
         CMD="${CMD} TGTCCSID(${TGTCCSID}) TGTRLS(${TGTRLS})"
         CMD="${CMD} OUTPUT(${OUTPUT})"
@@ -202,6 +213,10 @@ make_module()
         then    DEFINES="${DEFINES} HAVE_LIBZ HAVE_ZLIB_H"
         fi
 
+        if [ "${WITH_LIBSSH2}" != "0" ]
+        then    DEFINES="${DEFINES} USE_LIBSSH2 HAVE_LIBSSH2_H"
+        fi
+
         if [ "${DEFINES}" ]
         then    CMD="${CMD} DEFINE(${DEFINES})"
         fi
index a4e505935d5714ca4f0c5fad91f033eabc56fc0a..526ec03591226bece8138dbc129fc9250135bdf8 100644 (file)
@@ -128,6 +128,11 @@ then    CMD="CRTSRVPGM SRVPGM(${TARGETLIB}/${SRVPGM})"
         CMD="${CMD} BNDDIR(${TARGETLIB}/${STATBNDDIR}"
         if [ "${WITH_ZLIB}" != 0 ]
         then    CMD="${CMD} ${ZLIB_LIB}/${ZLIB_BNDDIR}"
+                liblist -a "${ZLIB_LIB}"
+        fi
+        if [ "${WITH_LIBSSH2}" != 0 ]
+        then    CMD="${CMD} ${LIBSSH2_LIB}/${LIBSSH2_BNDDIR}"
+                liblist -a "${LIBSSH2_LIB}"
         fi
         CMD="${CMD})"
         CMD="${CMD} BNDSRVPGM(QADRTTS QGLDCLNT QGLDBRDR)"