Re: [HACKERS] Off-topic: autoconf guru

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dmitry Samersoff <dms(at)wplus(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Off-topic: autoconf guru
Date: 1999-07-29 14:37:39
Message-ID: 320.933259059@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dmitry Samersoff <dms(at)wplus(dot)net> writes:
> if I make CC=CXX, configure can't find libpq,

You shouldn't do that. CC is supposed to be a C compiler not a C++
compiler.

We have enough cross-platform headaches with the code already ...
trying to make it all compile under C++ as well as C is a pushup
I don't care to undertake...

> if I keep CC as cc
> AC_TRY_COMPILE([#include <stdlib.h>
> #include <sys/types.h>
> #include <sys/socket.h>
> ],
> [int a = accept(1, (struct sockaddr *) 0, (int *) 0);],
> [AC_DEFINE(SOCKET_SIZE_TYPE, int) AC_MSG_RESULT(int)],
> [AC_DEFINE(SOCKET_SIZE_TYPE, size_t) AC_MSG_RESULT(size_t)])

> return wrong result because int always aceptable for C but
> can cause error for CXX

Huh? How can it be a problem for C++? The test snippet is C, and
so is the code that is going to be trying to call accept().

> Is there autoconf version modified for work with C++ or
> I have to patch it's macros by my self ?

I think you have a misconfigured C++ installation, and that you'd
be best off directing your attention to fixing that. I have
seen libpq++ fail in odd ways when I tried to build Postgres here
with a fresh egcs install whose C++ support wasn't right. (IIRC,
my problem was that /usr/local/lib/libg++ was an old version not
compatible with the new egcs --- but the error messages weren't
particularly helpful in diagnosing that...)

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-07-29 14:38:01 Re: [Keystone Slip # 22] Some confusion with datetimedata type andtimezone
Previous Message Ryan Kirkpatrick 1999-07-29 14:33:02 Re: [PORTS] RedHat6.0 & Alpha