When static libraries are built for AMD64 linux they _must_ be
compiled using PIC, otherwise linkage will fail.

The attached patch is the same solution I've contributed to libcurl,
and which has proven to be efective.

The 'trick' is to set to 'yes' variable 'with_pic' for x86_64 linux
BEFORE the AC_PROG_LIBTOOL call in configure.in

--
-=[Yang]=-
Index: libssh2/configure.in
===================================================================
RCS file: /cvsroot/libssh2/libssh2/configure.in,v
retrieving revision 1.46
diff -u -r1.46 configure.in
--- libssh2/configure.in        27 Mar 2007 15:57:23 -0000      1.46
+++ libssh2/configure.in        29 Mar 2007 10:27:40 -0000
@@ -34,6 +34,18 @@
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
+
+AC_MSG_CHECKING([if arch-OS host is x86_64-linux (to build PIC static 
libraries)])
+case $host in
+  x86_64*linux*)
+    AC_MSG_RESULT([yes])
+    with_pic=yes
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+esac
+
 AC_PROG_LIBTOOL
 AC_C_BIGENDIAN
 if test -z "$PKG_CONFIG"; then
-------------------------------------------------------------------------
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

Reply via email to