Hi,
Simon Josefsson schrieb:
> diff --git a/Makefile.inc b/Makefile.inc
> index 658b1d6..5812f3e 100644
> --- a/Makefile.inc
> +++ b/Makefile.inc
> @@ -2,10 +2,8 @@ CSOURCES = channel.c comp.c crypt.c hostkey.c kex.c mac.c 
> misc.c \
>   packet.c publickey.c scp.c session.c sftp.c userauth.c transport.c \
>   version.c knownhost.c
>  
> -ifdef LIBGCRYPT
> -CSOURCES += libgcrypt.c pem.c
> -else
> -CSOURCES += openssl.c
> -endif
> +# You also need ONE of these.
> +GCRYPT_CSOURCES = libgcrypt.c pem.c
> +OPENSSL_CSOURCES = openssl.c
>  
>  HHEADERS = libssh2_priv.h openssl.h libgcrypt.h transport.h channel.h comp.h 
> mac.h misc.h
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 53fb4e8..7369942 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -5,6 +5,11 @@ AUTOMAKE_OPTIONS = foreign nostdinc
>  include ../Makefile.inc
>  
>  libssh2_la_SOURCES = $(CSOURCES) $(HHEADERS)
> +if LIBGCRYPT
> +CSOURCES += $(GCRYPT_CSOURCES)
> +else
> +CSOURCES += $(OPENSSL_CSOURCES)
> +endif
>  
>  EXTRA_DIST = libssh2_config.h.in NMakefile
although this might work - I would prefer we do it in the C files, and
just block the one or the other depending on a define HAVE_LIBGCRYPT or
whatever configure puts into libssh2_config.h - this would work with all
platforms, no matter what make or IDE or whatever they use.

Gün.


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

Reply via email to