Re: New acinclude.m4 - Mailing list pgadmin-hackers
From | Raphaël Enrici |
---|---|
Subject | Re: New acinclude.m4 |
Date | |
Msg-id | 428CED03.6060908@club-internet.fr Whole thread Raw |
In response to | Re: New acinclude.m4 ("Florian G. Pflug" <fgp@phlo.org>) |
Responses |
Re: New acinclude.m4
|
List | pgadmin-hackers |
Florian G. Pflug wrote: > Raphaël Enrici wrote: > >>Florian G. Pflug wrote: >> >>>Raphaël Enrici wrote: >>> >>>>I have warning concerning ENABLE_STATIC in configure script. Shouldn't >>>>we also remove it crom configure.ac ? (patch attached). >>> >>> >>>Does this mean the linking statically is not possible anymore? >>>Or has the check just moved to another place? >> >>To me, as Adam is making the build relying on wx-config flags, the build >> is considered static if wxWid was built with --disabled-shared passed >>to its configure. In the case where wxWidgets has been built with >>--enable-shared, pgadmin will inherit this default and build dynamically >>(same thing if both shared and static wxWid libs were built, the shared >>build will become the default...). > > Will a statically-built wx make the _whole_ pgadmin link statically too, > or will only the wx-libraries be linkes statically and e.g. libpq > dynamically. To me, second case. wx static the rest of the world dynamic. >It would be the right thing to do, I guess - but then there > would be need for a global "--enable-static" flag, that defined > the linking-type for all other libs beside wx. At least for OSX, > linking the release-versions statically it the most reliable method, > while keeping the resulting app small. So, if I'm right we have lost this functionnality. But, again, I may be wrong. Can you try the patch attached on OSX with a fresh checkout (don't apply the configure.ac I just sent) ? (I need to rebuild wxWid to generate static libs... it may take a moment). Cheers, Raphaël >>Maybe it would be worth to still being able to force a static build by >>passing "--static" to wx-config in our acinclude.m4. Something like : >>if we pas --enable-static to our configure, then pass --static to >>wx-config so that we build statically, if not then don't pass anything >>in particular. > > Sounds reasonable - additionally --enable-static should link e.g. libpq > statically too. > > greetings, Florian Pflug > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > Index: acinclude.m4 =================================================================== --- acinclude.m4 (revision 4219) +++ acinclude.m4 (working copy) @@ -59,6 +59,18 @@ AC_SUBST(pg_debug_build) ############################ +# Static build of pgAdmin3 # +############################ +AC_DEFUN([ENABLE_STATIC], +[AC_ARG_ENABLE(static, +[ --enable-static build a static version of pgAdmin3], +[pg_static_build=yes +WX_STATIC="--static"], +[pg_static_build=no +WX_STATIC=""]) +]) + +############################ # Build an pgAdmin III.app # ############################ AC_DEFUN([ENABLE_APPBUNDLE], @@ -255,8 +267,8 @@ LDFLAGS="$LDFLAGS -L${WX_HOME}/lib" WX_OLD_LDFLAGS="$LDFLAGS" WX_OLD_CPPFLAGS="$CPPFLAGS" - WX_NEW_LIBS=`${WX_CONFIG} --libs` - WX_NEW_CONTRIB_LIBS=`${WX_CONFIG} --libs stc,ogl` + WX_NEW_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs` + WX_NEW_CONTRIB_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs stc,ogl` LIBS="$LIBS $WX_NEW_LIBS $WX_NEW_CONTRIB_LIBS" WX_NEW_CPPFLAGS=`${WX_CONFIG} --cppflags` CPPFLAGS="$CPPFLAGS $WX_NEW_CPPFLAGS"
pgadmin-hackers by date: