www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples

Archive Index This month's Index

Subject: [libssh2] Introduction, plans, and some pkg-config problems

[libssh2] Introduction, plans, and some pkg-config problems

From: Simon Josefsson <jas_at_extundo.com>
Date: Thu, 16 Nov 2006 17:28:37 +0100

Hello everyone! I'm attempting to port libssh2 to use libgcrypt
instead of OpenSSL. Rather than sending a huge patch that will be
difficult to review, I'm going to do things step by step. I've done
some initial testing with libgcrypt, and going back to the current CVS
the first problem that needs to be solved is the FLAG_EVP stuff, as
mentioned in include/libssh2_priv.h:

/* When FLAG_EVP is set, crypt contains a pointer to an EVP_CIPHER generator and init and dtor are ignored
 * Yes, I know it's a hack.
  */

I'm working on a standalone patch that solves this problem in a clean
way without changing anything else. If there are early comments on
this direction, I'd be happy to discuss it.

However, my first impressions building libssh2 is that it generates
some warnings:

jas_at_mocca:~/src/libssh2$ make
make[1]: Entering directory `/home/jas/self/src/libssh2/src'
gcc -o channel.o channel.c -c -g -O2 /usr/include -I/usr/include -Wall -I../include/ -fPIC
...
gcc: /usr/include: linker input file unused because linking not done

The origin of the spurious /usr/include in the command line appear to
be this part of configure.ac:

  OPENSSL_INCLINE=`$PKG_CONFIG --variable=includedir openssl`
...
CFLAGS="$CFLAGS $OPENSSL_INCLINE"

On my system, the first command results in this:

jas_at_mocca:~/src/libssh2$ pkg-config --variable=includedir openssl
/usr/include
jas_at_mocca:~/src/libssh2$

I suggest the following patch:

--- configure.in 16 Nov 2006 17:19:06 +0100 1.26
+++ configure.in 16 Nov 2006 17:23:21 +0100
@@ -85,7 +85,7 @@
   found_openssl=yes
   pkgcfg_openssl=yes
   OPENSSL_LIBLINE=`$PKG_CONFIG --libs openssl`
- OPENSSL_INCLINE=`$PKG_CONFIG --variable=includedir openssl`
+ OPENSSL_INCLINE=`$PKG_CONFIG --cflags openssl`
   AC_MSG_RESULT([Using paths from pkg-config])
 fi
 

/Simon

-------------------------------------------------------------------------
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_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2006-11-16

the libssh2 team