Hit the "send" button too soon...
> > I think I'd prefer the current solution with opensslconf.h.
>
> But that's exactly what they are not happy with. What they basically
> want is a single opensslconf.h that suits all (their?) OS-es. They most
> likely want to run './config' only once and then 'make' multiple times
> on different platforms. If this is really the case, then they very
> likely run './config no-asm' sacrificing a handful of performance. If
> one wants to get rid of no-asm, then one would have to make Makefiles
> platform-aware. By means equivalent to #if in C *or* by running a
> program/script that would reinvoke 'make' with platform dependent
> arguments. The latter whould effectively move './config' phase to 'make'
> phase. But it would not eliminate #if-s in opensslconf.h, but more
> likely *add* them (as we would have to have for example #if
> defined(OPENSSL_OS_NETBSD)(*) or something).
But that (i.e. #ifdef OPENSSL_OS_WHATEVER) is not what 3rd party
application developers want. They ultimately expect #include
<openssl/opensslconf.h> to work *without* specifying any extra flags.
And this is the reason why we generate opensslconf.h from a template for
the very platform ./config is currently executed at. Developers might
tolerate some automated procedure for generating flags, e.g. "cc
`openssl ccflags` ... `openssl ldflags`" (or why not "openssl cc
...":-), but not some specific platform dependent flag they have to
figure out all by themselves. In order to satisfy OS vendor who wants
multiplatform .h files it might be feasable to provide
opensslconf-<os>.h files vendors can create symbolic links to themselves
and put whatever #if-logic they wish (including trading all the logic
and performance for maintainability as Jun-ichiro suggests). Well,
nothing prevents 'em from doing so all by themselves... And for the fun
of it. Those openssl-<os>.h files can be made executable, e.g.:
#if 0
/bin/sh << EOS
ln -s "$0" include/openssl/opensslconf.h
make netbsd_screws_config-target
EOS
exit
#endif
#define LONG_LIVE_NETBSD
Isn't self-executable C source code cute? How about following:
#if 0
/bin/sh << EOS
PROGNAME=\`basename "$0" .c\`
cc -o \$PROGNAME.$$ "$0" && ./\$PROGNAME.$$
rm -f \$PROGNAME.$$
EOS
exit
#endif
main() { printf ("hello, world\n"); }
Andy:-)
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]