On Wednesday 18 August 2004 20:14, Peter Eisentraut wrote: > Stefanos Harhalakis wrote: > > It seems that you've removed the possibility to add an argument to > > --with-openssl option of the configure script. Currently I'm > > maintaining two systems where the openssl is not somewhere in the > > standard paths and thus the only way to compile with SSL seems to be > > by setting appropriate CFLAGS, CXXGLAGS and LDFLAGS before running > > the configure script. > > Yes, that's the standard way to go about it. No need to duplicate that > functionality.
Well, in fact, setting: export CFLAGS="-O2 -g -I/usr/local/ssl/include" export CXXFLAGS="$CFLAGS" export LDFLAGS="-L/usr/local/ssl/lib" didn't work at all. It worked only when I did: export CC="gcc -I/usr/local/ssl/include -L/usr/local/ssl/lib" export CXX="g++ -I/usr/local/ssl/include -L/usr/local/ssl/lib" (not sure if CXX is required) or export CFLAGS="-O2 -g -I/usr/local/ssl/include" export CXXFLAGS="$CFLAGS" export LDFLAGS="-L/usr/local/ssl/lib" export CPP="gcc -E -I/usr/local/ssl/include" This happens because AC_CHECK_HEADERSis implemented using the preprocessor (cpp/gcc -E) without adding CFLAGS/CXXFLAGS: configure: ---------- checking for SSL_library_init in -lssl... yes [...] checking openssl/ssl.h usability... yes checking openssl/ssl.h presence... no configure: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: openssl/ssl.h: proceeding with the preprocessor's result checking for openssl/ssl.h... no config.log: ----------- configure:8492: checking openssl/ssl.h presence configure:8499: gcc -E -D_GNU_SOURCE conftest.c configure:8495:25: openssl/ssl.h: No such file or directory configure:8505: $? = 1 configure: failed program was: #line 8494 "configure" #include "confdefs.h" #include <openssl/ssl.h> configure:8523: result: no configure:8529: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor! configure:8531: WARNING: openssl/ssl.h: proceeding with the preprocessor's result configure:8541: checking for openssl/ssl.h configure:8548: result: no configure:8555: error: header file <openssl/ssl.h> is required for OpenSSL If you are not going to change this back to the old behaviour you should consider using AC_ARG_ENABLE instead of AC_ARG_WITH since the second is intended to be used when there is an optional (or not) argument to be passed (--with-package=arg) while the first is intended to be used to enable or disable a feature (--enable-feature). I believe that it makes sense to say 'enable ssl support', since you're not allowing the user to specify the openssl location. (just a suggestion) <<V13>>
pgpzi2jJS6wng.pgp
Description: PGP signature