Move towards a working win32 build
This commit is contained in:
parent
a9af84c51d
commit
c070bdacc7
@ -43,7 +43,7 @@ dist:
|
||||
tar -zcf $(DISTLIB).tar.gz \
|
||||
$(DISTLIB)/configure $(DISTLIB)/Makefile.in $(DISTLIB)/ssh2_sample.c \
|
||||
$(DISTLIB)/LICENSE $(DISTLIB)/README $(DISTLIB)/TODO $(DISTLIB)/INSTALL \
|
||||
$(DISTLIB)/mkinstalldirs $(DISTLIB)/install-sh \
|
||||
$(DISTLIB)/mkinstalldirs $(DISTLIB)/install-sh $(DISTLIB)/config.sub $(DISTLIB)/config.guess \
|
||||
$(DISTLIB)/src/*.c $(DISTLIB)/src/Makefile.in \
|
||||
$(DISTLIB)/include/libssh2.h $(DISTLIB)/include/libssh2_priv.h $(DISTLIB)/include/libssh2_sftp.h \
|
||||
$(DISTLIB)/include/libssh2_config.h.in
|
||||
|
16
configure.in
16
configure.in
@ -3,9 +3,19 @@ AC_INIT(libssh2,0.4,sarag@libssh2.org)
|
||||
AC_CONFIG_SRCDIR([src])
|
||||
AC_CONFIG_HEADER([include/libssh2_config.h])
|
||||
|
||||
SHLIB_SUFFIX_NAME="so"
|
||||
SHLIB_LDFLAGS="-shared"
|
||||
|
||||
# Check for the OS.
|
||||
AC_CANONICAL_HOST
|
||||
case "$host" in
|
||||
*-cygwin)
|
||||
SHLIB_SUFFIX_NAME="dll"
|
||||
SHLIB_LDFLAGS="-shared"
|
||||
CFLAGS="$CFLAGS -DLIBSSH2_WIN32"
|
||||
;;
|
||||
*)
|
||||
SHLIB_SUFFIX_NAME="so"
|
||||
SHLIB_LDFLAGS="-shared"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(SHLIB_SUFFIX_NAME)
|
||||
AC_SUBST(SHLIB_LDFLAGS)
|
||||
|
||||
|
@ -42,6 +42,17 @@
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef LIBSSH2_WIN32
|
||||
#ifdef LIBSSH2_LIBRARY
|
||||
#define LIBSSH2_API __declspec(dllexport)
|
||||
#else
|
||||
#define LIBSSH2_API __declspec(dllimport)
|
||||
#endif
|
||||
#include <sys/uio.h>
|
||||
#else
|
||||
#define LIBSSH2_API
|
||||
#endif
|
||||
|
||||
#define LIBSSH2_VERSION "0.4"
|
||||
#define LIBSSH2_APINO 200412301450
|
||||
|
||||
@ -158,12 +169,6 @@ typedef struct _LIBSSH2_SESSION LIBSSH2_SESSION;
|
||||
typedef struct _LIBSSH2_CHANNEL LIBSSH2_CHANNEL;
|
||||
typedef struct _LIBSSH2_LISTENER LIBSSH2_LISTENER;
|
||||
|
||||
#ifdef WIN_32
|
||||
#define LIBSSH2_API __declspec(dllexport)
|
||||
#else
|
||||
#define LIBSSH2_API
|
||||
#endif
|
||||
|
||||
#define LIBSSH2_HOSTKEY_HASH_MD5 1
|
||||
#define LIBSSH2_HOSTKEY_HASH_SHA1 2
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#ifndef LIBSSH2_PRIV_H
|
||||
#define LIBSSH2_PRIV_H 1
|
||||
|
||||
/* Definitions shared with the public */
|
||||
#define LIBSSH2_LIBRARY
|
||||
#include "libssh2_config.h"
|
||||
#include "libssh2.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user