APPROVE COMMIT 21.5 RECOMMEND 21.4
It's not a big deal if it doesn't get in to 21.4, nobody's screaming
for it, but it might be worth consideration. Probably would need some
work for 21.4, let me know if you want it, Vin.
This patch adds detection of the case where PostgreSQL links against
-lcrypto -lssl. I only know of one case (where PostgreSQL was
installed from DarwinPorts on Mac OS X 10.3.9) where it's needed but I
don't think it can hurt.
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/ChangeLog,v
retrieving revision 1.465
diff -u -U0 -r1.465 ChangeLog
--- ChangeLog 26 Oct 2005 15:13:17 -0000 1.465
+++ ChangeLog 7 Nov 2005 08:01:26 -0000
@@ -0,0 +1,4 @@
+2005-11-07 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * configure.ac (PostgreSQL): Check for link against SSL+crypto.
+
Index: configure.ac
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.ac,v
retrieving revision 1.17
diff -u -r1.17 configure.ac
--- configure.ac 24 Oct 2005 21:01:08 -0000 1.17
+++ configure.ac 7 Nov 2005 07:36:44 -0000
@@ -3707,16 +3708,31 @@
libpq_fe_h_file=${header_dir}libpq-fe.h; break)
done
- test -n "$libpq_fe_h_file" && {
AC_CHECK_LIB(pq,PQconnectdb,have_libpq=yes) }
+ pq_libs=
+ extra_libs=
+ if test -n "$libpq_fe_h_file"; then
+ dnl #### Would it be nicer to do this with a loop?
+ dnl It seems unlikely that checking for SSL/crypto support can hurt,
+ dnl even if it's found.
+ AC_CHECK_LIB(pq, PQconnectdb,[pq_libs="-lpq"],[
+ unset ac_cv_lib_pq_PQconnectdb;
+ AC_CHECK_LIB(pq, PQconnectdb,[pq_libs="-lpq -lcrypto -lssl"],,
+ [-lcrypto -lssl])])
+ if test -z "$pq_libs"; then
+ have_libpq="no"
+ else
+ have_libpq="yes"
+ fi
+ fi
if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes";
then
with_postgresql=yes
AC_DEFINE(HAVE_POSTGRESQL)
AC_CHECK_LIB(pq,PQconnectStart, [
with_postgresqlv7=yes;
- AC_DEFINE(HAVE_POSTGRESQLV7)])
+ AC_DEFINE(HAVE_POSTGRESQLV7)], [:], $extra_libs)
AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file")
- XE_PREPEND(-lpq, postgresql_libs)
+ XE_PREPEND([$pq_libs], postgresql_libs)
XE_APPEND(modules/postgresql, MAKE_SUBDIR)
need_modules_common=yes
if test "$enable_modules" = "yes"; then
--
School of Systems and Information Engineering
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.