acinclude.m4 and wx detection question

From: Raphaël Enrici <blacknoz(at)club-internet(dot)fr>
To: "Adam H(dot)Pendleton" <fmonkey(at)fmonkey(dot)net>
Cc: PgAdmin Hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: acinclude.m4 and wx detection question
Date: 2005-05-05 20:47:06
Message-ID: 427A864A.7050604@club-internet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Adam,

I have a small question in mind I never asked concerning the way we
check for wxwidgets files installed while in configure scripts (for
example stc headers).
Why don't we try to build small C or C++ examples which includes the
required files and check to see if the build failed instead of
hardcoding some test on file existance ? Or maybe we could parse the
'-I' outputs of wx-confg --cflags or cxxflags to take as a base for the
tests ?

IMHO we would gain in both portability (it would be easier to take care
of specific configuration) and maintenance (no more change needed to
acinclude.m4 if we change the version of wxwidgets we support).

As an example, my wx-config outputs is this one:
wx-config --cflags
-I/usr/lib/wx/include/gtk2-unicode-debug-static-2.6-pga3
-I/usr/include/wx-2.6-pga3 -D__WXDEBUG__ -D__WXGTK__
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1

If I want the configure script to pass with such a configuration, I must
patch acinclude.m4 so that it refers to the correct path. If not, it
just fails and tells me that I did not install stc which is not true.

If we were trying to detect this with a small program like this:
#include <wx/stc/stc.h>
...
void main(void) { .... }

After building it successfully with the wx-config --cflags output passed
to the compiler, wouldn't this be sufficient (we may also add a check on
the wx version detected if needed) ?

Tell me if I missed something.

Regards,
Raphaël

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Raphaël Enrici 2005-05-05 20:56:36 Re: which "wx2.6" should we use ?
Previous Message Dave Page 2005-05-05 20:39:43 Re: which "wx2.6" should we use ?