Re: [PATCH] acinclude.m4 fixes for wx 2.6, wx-nondebug, postgres-ssl and others

From: Chris Campbell <chris(at)bignerdranch(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] acinclude.m4 fixes for wx 2.6, wx-nondebug, postgres-ssl and others
Date: 2005-04-15 07:27:50
Message-ID: 9b454dcce0c270e6e32d781ac9159a4c@bignerdranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

I compiled CVS HEAD against a non-debug wxMac 2.5.5 (with toplevel.cpp
patch). Compiled successfully out of the box. And it doesn't have the
window sizing problem. However, I do get a big blank error window if I
attempt to connect to a server and it rejects the connection (incorrect
password, etc).

I put my build up at:

http://gwenmalone.com/pgAdmin3.tar.gz (4.8 MB)

if anyone wants to try it.

BTW, why don't we just link against the static libpq.a? Then we don't
need Frameworks/libpq.4.dylib, and we can probably make the whole thing
a bit smaller. Right now, it's a total of about 18 MB, with all the
docs and everything (executable size is about 7 MB). The description of
this patch seems to imply that we are linking against libpq statically,
but I see "-lpq" in the linker flags when we link the executable.

Thanks!

- Chris

On Apr 14, 2005, at 09:28, Florian G. Pflug wrote:

> Hi
>
> This patch
> .) Doesn't actually switch pgadmin3 over to using wx2.6 aka CVS HEAD
> ;-)
> .) It just e.g. adds a 2.6-case to checks where there is a 2.4 and a
> 2.5 case
> .) It works around the postgres-ssl problem on osx, by checking
> wether libpq links libssl directly (otool -L ;-) ).
> .) Fixes statically linking against libpq (There is no libcrypt on
> osx)
> .) Fixes linking against a non-debug wxMac. Non-debug versions are
> named macu_*, but relevant part of acinclude.m4 only checked for mac,
> mac_d & macud.
> Added macu
>
> Statically linking pgadmin3 against libpq and wx now works for me
> out-of-the-box
> This should fix both the problems OpenMacNew was having, and the "I
> have to fiddle
> with LIBS" problems
>
> Everybody with a Mac - please test, if you have the time ;-))))
>
> greetings, Florian Pflug
> Index: acinclude.m4
> ===================================================================
> RCS file: /projects/pgadmin3/acinclude.m4,v
> retrieving revision 1.44
> diff -a -u -r1.44 acinclude.m4
> --- acinclude.m4 12 Apr 2005 07:36:41 -0000 1.44
> +++ acinclude.m4 14 Apr 2005 13:12:53 -0000
> @@ -131,7 +131,18 @@
> AC_LANG_SAVE
> AC_LANG_C
> AC_CHECK_LIB(pq, PQexec, [pgsql_cv_libpq=yes],
> [pgsql_cv_libpq=no])
> - AC_CHECK_LIB(pq, SSL_connect, [pgsql_ssl_libpq=yes],
> [pgsql_ssl_libpq=no])
> + if test "$build_cpu-$build_vendor" = "powerpc-apple"; then
> + echo -n "Checking if libpq links against libssl: "
> + if test "$(otool -L ${LIBPQ_HOME}/lib/libpq.?.dylib | grep -c
> libssl)" -gt 0
> + then
> + pgsql_ssl_libpq="yes"
> + else
> + pgsql_ssl_libpq="no"
> + fi
> + echo $pgsql_ssl_libpq
> + else
> + AC_CHECK_LIB(pq, SSL_connect, [pgsql_ssl_libpq=yes],
> [pgsql_ssl_libpq=no])
> + fi
> AC_LANG_RESTORE
>
> if test "$pgsql_include" != ""
> @@ -143,11 +154,18 @@
>
> if test "$pg_static_build" = "yes"
> then
> + if test "$build_cpu-$build_vendor" = "powerpc-apple"
> + then
> + CRYPT_LIB=""
> + else
> + CRYPT_LIB="-lcrypt"
> + fi
> +
> if test "$pgsql_ssl_libpq" = "yes"
> then
> - LIBS="${LIBPQ_HOME}/lib/libpq.a -lcrypt $LIBS -lssl
> -lcrypto"
> + LIBS="${LIBPQ_HOME}/lib/libpq.a $CRYPT_LIB $LIBS -lssl
> -lcrypto"
> else
> - LIBS="${LIBPQ_HOME}/lib/libpq.a -lcrypt $LIBS -lcrypto"
> + LIBS="${LIBPQ_HOME}/lib/libpq.a $CRYPT_LIB $LIBS -lcrypto"
> fi
> else
> if test "$pgsql_ssl_libpq" = "yes"
> @@ -253,6 +271,9 @@
> # Which version of wxWindows is this?
> WX_VERSION=`${WX_CONFIG} --version`
> case "${WX_VERSION}" in
> + 2.6*)
> + WX_VERSION="2.6"
> + ;;
> 2.5*)
> WX_VERSION="2.5"
> ;;
> @@ -311,6 +332,14 @@
> LIBS="$LIBS
> ${WX_HOME}/lib/libwx_mac_stc-${WX_VERSION}.a
> ${WX_HOME}/lib/libwx_mac_ogl-${WX_VERSION}.a"
> LIBS="$LIBS $WX_NEW_LDFLAGS"
> ;;
> + *libwx_macu-*)
> + LIBS="$LIBS
> ${WX_HOME}/lib/libwx_macu_stc-${WX_VERSION}.a
> ${WX_HOME}/lib/libwx_macu_ogl-${WX_VERSION}.a"
> + LIBS="$LIBS $WX_NEW_LDFLAGS"
> + ;;
> + *libwx_macu_core*)
> + LIBS="$LIBS
> ${WX_HOME}/lib/libwx_macu_stc-${WX_VERSION}.a
> ${WX_HOME}/lib/libwx_macu_ogl-${WX_VERSION}.a"
> + LIBS="$LIBS $WX_NEW_LDFLAGS"
> + ;;
> *libwx_gtk2ud-*)
> LIBS="$LIBS
> ${WX_HOME}/lib/libwx_gtk2ud_stc-${WX_VERSION}.a
> ${WX_HOME}/lib/libwx_gtk2ud_ogl-${WX_VERSION}.a"
> LIBS="$LIBS $WX_NEW_LDFLAGS"
> @@ -408,6 +437,14 @@
> LIBS="$LIBS -lwx_mac_stc-${WX_VERSION}
> -lwx_mac_ogl-${WX_VERSION}"
> LIBS="$LIBS $WX_NEW_LDFLAGS"
> ;;
> + *wx_macu-*)
> + LIBS="$LIBS -lwx_macu_stc-${WX_VERSION}
> -lwx_macu_ogl-${WX_VERSION}"
> + LIBS="$LIBS $WX_NEW_LDFLAGS"
> + ;;
> + *wx_macu_core*)
> + LIBS="$LIBS -lwx_macu_stc-${WX_VERSION}
> -lwx_macu_ogl-${WX_VERSION}"
> + LIBS="$LIBS $WX_NEW_LDFLAGS"
> + ;;
> *wx_gtk2ud-*)
> LIBS="$LIBS -lwx_gtk2ud_stc-${WX_VERSION}
> -lwx_gtk2ud_ogl-${WX_VERSION}"
> LIBS="$LIBS $WX_NEW_LDFLAGS"

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2005-04-15 09:35:14 Merging the support module and the agent daemon
Previous Message Chris Campbell 2005-04-15 06:44:27 Re: CVS Commit by dpage: Since the autotools for some reason refuse to strip