apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Rossi <bob_ro...@cox.net>
Subject Re: dbd pgsql autotools patch
Date Mon, 19 May 2008 19:54:35 GMT
On Sat, May 17, 2008 at 10:23:59AM +1000, Bojan Smojver wrote:
> On Fri, 2008-05-16 at 06:26 -0400, Bob Rossi wrote:
> 
> >   configure:40279: gcc -o conftest -g -Wall -pthread  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
 conftest.c -lcrypt   >&5
> >   configure:40285: $? = 0
> >   configure:40313: result: -lcrypt
> 
> So, the test for crypt actually succeeds. Maybe the whole thing is
> caused by the fact that we check for crypt after we did DBD stuff. Can
> you tell me if the attached patch works for you?
> 
> PS. The patch is against 1.3.x, but it should apply against 1.2.x as
> well, with some fuzz.

You will be sorry to know, that although this worked on linux, it failed
on mingw with windows. 

  configure:36343: gcc-sjlj -o conftest.exe -g -gstabs -Wall
  -D_LARGEFILE64_SOURCE
  -I...postgresql/postgresql-8.3.1/include -L...postgresql/postgresql-8.3.1/lib  
  conftest.c -lpq   >&5
  ...postgresql/postgresql-8.3.1/lib/libpq.a(fe-protocol2.o): In function
  `pqBuildStartupPacket2'
  :fe-protocol2.c:1432: undefined reference to `htonl@4'
  ...

When it worked, it's cause I passed all the flags from pg_config --libs,

  configure:34068: checking for PQsendQueryPrepared in -lpq
  configure:34103: gcc-sjlj -o conftest.exe -g -gstabs -Wall  -D_LARGEFILE64_SOURCE 
  -I...postgresql/postgresql-8.3.1/include -L...postgresql/postgresql-8.3.1/lib  
  conftest.c -lpq -lpgport -lm -lSecur32 -lws2_32 -lshfolder  >&5

However, I reproduced that this command line works,

  $ gcc-sjlj -o conftest.exe -g -gstabs -Wall  -D_LARGEFILE64_SOURCE
  -I...postgresql/postgresql-8.3.1/include
  -L...postgresql/postgresql-8.3.1/lib  foo.c -lpq -lSecur32 -lws2_32

So basically I need -lSecur32 and ws2_32. What can I do about this?

Bob Rossi

Mime
View raw message