Hello everyone,

I noticed that it is currently not possible to compile using any of the
win32-specific build systems since the required OpenSSL define
LIBSSH2_OPENSSL is not defined since commit
d512b25f69a1b6778881f6b4b5ff9cfc6023be42.

This patch adds LIBSSH2_OPENSSL to these build systems since they do not
support different crypto libraries as of now.

Best regards,
Marc
>From 9136ee4480955170d01288df9e1209b5251c5918 Mon Sep 17 00:00:00 2001
From: Marc Hoersken <i...@marc-hoersken.de>
Date: Mon, 18 Nov 2013 17:55:09 +0100
Subject: [PATCH] win32: Make it possible to compile using OpenSSL for now

Commit d512b25f69a1b6778881f6b4b5ff9cfc6023be42 changed the way
crypto libraries are detected and makes it necessary to define
LIBSSH2_OPENSSL in order to compile against OpenSSL. Since the
win32 makefiles NMakefile and GNUmakefile only support OpenSSL
the define can be hardcoded for now.
---
 win32/GNUmakefile | 2 +-
 win32/config.mk   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index c0cc20a..fd99e12 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -99,7 +99,7 @@ endif
 -include $(OBJDIR)/version.inc
 
 # Global flags for all compilers
-CFLAGS = $(OPT) -D$(DB) -DLIBSSH2_WIN32 # -DHAVE_CONFIG_H
+CFLAGS = $(OPT) -D$(DB) -DLIBSSH2_WIN32 -DLIBSSH2_OPENSSL # -DHAVE_CONFIG_H
 ifeq ($(ARCH),w64)
 CFLAGS += -D_AMD64_
 endif
diff --git a/win32/config.mk b/win32/config.mk
index 4c8eb2a..7495684 100644
--- a/win32/config.mk
+++ b/win32/config.mk
@@ -1,4 +1,4 @@
-
+# This file is used by NMakefile-based builds
 # Tweak these for your system
 !if "$(OPENSSLINC)" == ""
 OPENSSLINC=..\openssl-0.9.8x\inc32
@@ -29,7 +29,7 @@ CPPFLAGS=/Oi /O2 /Oy /GF /Y- /MD /DNDEBUG
 DLLFLAGS=/DEBUG /LD
 !endif
 
-CPPFLAGS=/nologo /GL /Zi /EHsc $(CPPFLAGS) /Iwin32 /Iinclude /I$(OPENSSLINC) 
$(ZLIBINC)
+CPPFLAGS=/nologo /GL /Zi /EHsc $(CPPFLAGS) /Iwin32 /Iinclude -DLIBSSH2_OPENSSL 
/I$(OPENSSLINC) $(ZLIBINC)
 CFLAGS=$(CPPFLAGS)
 RCFLAGS=/Iinclude
 DLLFLAGS=$(CFLAGS) $(DLLFLAGS)
-- 
1.8.1.msysgit.1

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to