Re: SUN Studio 11 vs pgAdmin - code cleanup] - Mailing list pgadmin-hackers

From Dave Page
Subject Re: SUN Studio 11 vs pgAdmin - code cleanup]
Date
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E40154C421@ratbert.vale-housing.co.uk
Whole thread Raw
In response to Re: SUN Studio 11 vs pgAdmin - code cleanup]  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
List pgadmin-hackers

> -----Original Message-----
> From: Zdenek.Kotala@Sun.COM [mailto:Zdenek.Kotala@Sun.COM]
> Sent: 03 August 2006 15:15
> To: Dave Page
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: SUN Studio 11 vs pgAdmin - code cleanup]
>
> Dave Page wrote:
>
> >
> > Thanks - patch applied to the stable branch.   Would you
> mind taking some
> > time to port the patch to SVN TRUNK please? It's most
> likely that that
> > will go beta within a few weeks and unfortunately I'm
> *really* pushed
> > for time right now :-(
> >
>
> Ok. No problem. I will do it.


Thanks.

> The problem what I have is that when I set CC and CXX environment
> variable to Sun Studio compilers, configure generates Makefile which
> contains wrong compiler switches (-Wall ...). I must manually change
> makefile If I want to compile pgAdmin with Sun Studio. There is some
> problem with openssl library detection on solaris as well.

OK, well I'll warn you up front that I'm not an automake/autoconf
*expert* so others on the list may have better ideas. I'm also going on
holiday for 2 weeks this weekend, so if I don't reply to you immediately
I'm not being rude :-)

At the moment most of the GCC flags are set in the Makefile.am files -
in particular we set

-Wall -Wno-non-virtual-dtor

I would look at moving that into the CLEANUP macro in acinclude.m4 (and
perhaps giving it a more suitable name), along with a conditional
alternative for the Sun compiler (if you check your config.log file,
hopefully you'll find a suitable variable to test for the compiler
name). I notice there are also a couple of other hacks at the end of
SETUP_WXWIDGETS (for Apple and Solaris) that could also move into that
macro.

I also notice that we setup CXXFLAGS and CFLAGS in the Makefile.am's
which we don't need at all - those lines can be removed from all the
Makefile.am's I guess.

When you've made changes to any of the Makefile.am's, acinclude.m4 or
configure.ac.in (in which you may need to update/add/remove and macro
names from acinclude.m4), just run the bootstrap script in $PGADMIN_SRC/
to regenerate everything, then run "./configure; make clean; make" to
test.

Regards, Dave.

pgadmin-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: SUN Studio 11 vs pgAdmin - code cleanup]
Next
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r5291 - trunk/pgadmin3/src/frm