[PATCH] acinclude.m4 fixes for wx 2.6, wx-nondebug, postgres-ssl and others
| От | Florian G. Pflug |
|---|---|
| Тема | [PATCH] acinclude.m4 fixes for wx 2.6, wx-nondebug, postgres-ssl and others |
| Дата | |
| Msg-id | 425E6FE7.9000406@phlo.org обсуждение исходный текст |
| Ответы |
Re: [PATCH] acinclude.m4 fixes for wx 2.6,
Re: [PATCH] acinclude.m4 fixes for wx 2.6, wx-nondebug, postgres-ssl and others |
| Список | pgadmin-hackers |
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"
Вложения
В списке pgadmin-hackers по дате отправления: