Skip site navigation (1) Skip section navigation (2)

Re: pgsql 8.0.0b1 - openssl detection

From: Stefanos Harhalakis <v13(at)it(dot)teithe(dot)gr>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pgsql 8.0.0b1 - openssl detection
Date: 2004-08-18 20:48:51
Message-ID: 200408182348.55082.v13@it.teithe.gr (view raw or flat)
Thread:
Lists: pgsql-bugs
On Wednesday 18 August 2004 23:09, Peter Eisentraut wrote:
> Stefanos Harhalakis wrote:
> > This happens because AC_CHECK_HEADERSis implemented using the
> > preprocessor (cpp/gcc -E) without adding CFLAGS/CXXFLAGS:
>
> The correct variable is CPPFLAGS.  Actually, you can also use
> --with-includes, but this is only in PostgreSQL, so I suggest you get
> used to CPPFLAGS, because that works everywhere.

I've tested it with CPPFLAGS too without success (before sending the previous 
email).

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:
===========
## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=set
ac_cv_env_CC_value=gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=$'-O2 -g -I/usr/local/ssl/include'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=$'-O2 -g -I/usr/local/ssl/include'


Taking a closer look to configure output I see:

checking for egrep... grep -E
configure: using CPPFLAGS=-D_GNU_SOURCE 
configure: using LDFLAGS=-L/usr/local/ssl/lib 
checking for gawk... gawk

It seems that the problem is in src/template/linux:

$ cat src/template/linux 
# Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise
CPPFLAGS="-D_GNU_SOURCE"

which is beeing sourced by configure.in. Changing this to 

CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"

solves the problem.

>
> > 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).
>
> This is wrong.  Both variants can accept an argument or not.  The
> difference is only in the spelling.

You're right. Please ignore my ignorance :)

<<V13>>

In response to

Responses

pgsql-bugs by date

Next:From: PostgreSQL Bugs ListDate: 2004-08-18 22:22:09
Subject: BUG #1224: Restarting postgres appends extra -D argument
Previous:From: Peter EisentrautDate: 2004-08-18 20:09:54
Subject: Re: pgsql 8.0.0b1 - openssl detection

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group