cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: possible problem with curl-config

From: Yang Tse <yangsita_at_gmail.com>
Date: Mon, 25 Feb 2013 23:33:13 +0100

On Mon, Feb 25, Dennis Clarke <dclarke_at_blastwave.org> wrote:

> $ curl-config --configure
> '--enable-shared' '--enable-static' '--with-libidn=/usr/local' '--enable-tls-srp' '--with-ssl' 'CC=/opt/solarisstudio12.3/bin/cc' 'CFLAGS=-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16' 'CPPFLAGS=-I/usr/local/include -I/usr/local/ssl/include -I/opt/mysql/mysql/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE'
>

Notice that libcurl configure script performs not only compilation and
linking checks, it also does preprocessor based checks. In the same
way autoconf generated configure scripts do for most packages out
there.

Autoconf uses CPPFLAGS for preprocessor based checks. CPPFLAGS and
CFLAGS for compilation based checks. CPPFLAGS, CFLAGS and LDFLAGS for
linking based checks.

Given that options such as '-m64' or '-m32' [1] select memory model in
use for any of those checks, you have to specify '-m64' in CPPFLAGS.
Otherwise any preprocessing based check will be badly fooled. Even
preprocessing system headers is affected by this setting [2].

Wether PHP's configure script preserves CPPFLAGS, CFLAGS and LDFLAGS
settings you provide when calling other packages configure script or
not, is out of the scope of this mailing list.

[1] http://docs.oracle.com/cd/E19205-01/819-5265/gewif/index.html
[2] http://docs.oracle.com/cd/E19205-01/819-5265/bjamn/index.html

-- 
-=[Yang]=-
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-25