Subject: Re: libssh2 master 42aefdb configure.ac: Call zlib zlib and not libz in text but keep option names

Re: libssh2 master 42aefdb configure.ac: Call zlib zlib and not libz in text but keep option names

From: Peter Stuge <peter_at_stuge.se>
Date: Mon, 16 Sep 2013 11:24:20 +0200

Daniel Stenberg wrote:
>> 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 agent.c openssl.c libgcrypt.c pem.c keepalive.c \
>> - global.c
>> + version.c knownhost.c agent.c pem.c keepalive.c global.c
>> +if OPENSSL
>> +CSOURCES += openssl.c
>> +endif
>> +if LIBGCRYPT
>> +CSOURCES += libgcrypt.c
>> +endif
>
> Ugh. A primary motivation for the .inc file is for it to be used by
> non-automake systems, so introducing these conditionals in there is
> unfortunately not OK.

Doh, sorry about that - I should have checked where it was being used.

I'll move the conditionals to Makefile.am and we'll have to find
solutions for the other build systems that we would like to support.

> We need to have the #ifdefs in the source files to
> make it easier for people to build "all files" in different build systems
> with less trouble...

When are "all files" actually needed?

It makes absolutely no sense to me to build source files that are
*known* not to be needed.

For nmake there's Makefile preprocessing with both !IF and !IFDEF
which allows our NMakefile to have automake-like conditionals
triggered by /D options on the command line. I'll add those.

What about NetWare, VMS and Watcom? Do similar methods exist, or
will we have to have separate build files for each configuration?

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-09-16