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"
smime.p7s
Description: S/MIME cryptographic signature
