Hi to all, first message on this list.
In order to make libssh2 build on Cygwin I had to make a couple of
changes. After applying this patch it built nicely using:
./buildconf
./configure
./make
./make test
Atached patch is against snapshot libssh2-0.15-20070328 I hope that
you take it in consideration before next release.
Thanks,
--
-=[Yang]=-
diff -rup libssh2-0.15-20070328/configure.in libssh2-0.15-new/configure.in
--- libssh2-0.15-20070328/configure.in 2007-03-28 04:02:06.000000000 +0200
+++ libssh2-0.15-new/configure.in 2007-03-29 04:28:30.740011200 +0200
@@ -22,6 +22,18 @@ case "$host" in
;;
esac
+AC_MSG_CHECKING([if we need -no-undefined])
+case $host in
+ *-*-cygwin | *-*-mingw* | *-*-pw32*)
+ need_no_undefined=yes
+ ;;
+ *)
+ need_no_undefined=no
+ ;;
+esac
+AC_MSG_RESULT($need_no_undefined)
+AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
+
# Some systems (Solaris?) have socket() in -lsocket.
AC_SEARCH_LIBS(socket, socket)
diff -rup libssh2-0.15-20070328/include/libssh2.h
libssh2-0.15-new/include/libssh2.h
--- libssh2-0.15-20070328/include/libssh2.h 2007-02-08 04:02:09.000000000
+0100
+++ libssh2-0.15-new/include/libssh2.h 2007-03-29 04:24:04.877720000 +0200
@@ -63,7 +63,7 @@ extern "C" {
# include <sys/uio.h>
#endif
-#if defined(LIBSSH2_WIN32) && _MSC_VER < 1300
+#if defined(LIBSSH2_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1300)
typedef unsigned __int64 libssh2_uint64_t;
typedef __int64 libssh2_int64_t;
#else
diff -rup libssh2-0.15-20070328/src/Makefile.am libssh2-0.15-new/src/Makefile.am
--- libssh2-0.15-20070328/src/Makefile.am 2007-02-03 04:02:06.000000000
+0100
+++ libssh2-0.15-new/src/Makefile.am 2007-03-29 04:37:05.790617600 +0200
@@ -50,4 +50,9 @@ VERSION=-version-info 1:0:0
# set age to 0. (c:r:a=0)
#
-libssh2_la_LDFLAGS = $(VERSION)
+if NO_UNDEFINED
+# The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
+UNDEF = -no-undefined
+endif
+
+libssh2_la_LDFLAGS = $(UNDEF) $(VERSION)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel