Thread: [patch] libkrb5 needed during static linking of 1.6beta2 on debian
Hi Dave, while working on debian packaging of 1.6 beta2 I had to add -lkrb5 as the libpq.a depends on it. As we are near from the release, I prefer to let you double check the patch attached. I would not like to be at the origin of a "dramatic play" ;) Cheers, Raph Index: acinclude.m4 =================================================================== --- acinclude.m4 (révision 5445) +++ acinclude.m4 (copie de travail) @@ -308,6 +308,21 @@ else AC_CHECK_LIB(pq, SSL_connect, [PG_SSL=yes], [PG_SSL=no]) fi + + if test "$build_cpu-$build_vendor" = "powerpc-apple" + then + echo -n "Checking if libpq links against libkrb5: " + if test "$(otool -L ${PG_HOME}/lib/libpq.?.dylib | grep -c libkrb5)" -gt 0 + then + PG_KRB5="yes" + else + PG_KRB5="no" + fi + echo $PG_KRB5 + else + AC_CHECK_LIB(pq, krb5_free_principal, [PG_KRB5=yes], [PG_KRB5=no]) + fi + AC_LANG_RESTORE PG_INCLUDE=`${PG_CONFIG} --includedir` @@ -339,6 +354,11 @@ else LIBS="${PG_LIB}/libpq.a $CRYPT_LIB $LIBS $CRYPTO_LIB" fi + + if test "$PG_KRB5" = "yes" + then + LIBS="$LIBS -lkrb5" + fi else if test "$PG_SSL" = "yes" then
Looks OK, and I don’t see any problem on OSX.
Go for it.
/D
On 9/10/06 19:52, "Raphaël Enrici" <blacknoz@club-internet.fr> wrote:
Go for it.
/D
On 9/10/06 19:52, "Raphaël Enrici" <blacknoz@club-internet.fr> wrote:
Hi Dave,
while working on debian packaging of 1.6 beta2 I had to add -lkrb5 as
the libpq.a depends on it. As we are near from the release, I prefer to
let you double check the patch attached. I would not like to be at the
origin of a "dramatic play" ;)
Cheers,
Raph
Index: acinclude.m4
===================================================================
--- acinclude.m4 (révision 5445)
+++ acinclude.m4 (copie de travail)
@@ -308,6 +308,21 @@
else
AC_CHECK_LIB(pq, SSL_connect, [PG_SSL=yes], [PG_SSL=no])
fi
+
+ if test "$build_cpu-$build_vendor" = "powerpc-apple"
+ then
+ echo -n "Checking if libpq links against libkrb5: "
+ if test "$(otool -L ${PG_HOME}/lib/libpq.?.dylib | grep -c libkrb5)" -gt 0
+ then
+ PG_KRB5="yes"
+ else
+ PG_KRB5="no"
+ fi
+ echo $PG_KRB5
+ else
+ AC_CHECK_LIB(pq, krb5_free_principal, [PG_KRB5=yes], [PG_KRB5=no])
+ fi
+
AC_LANG_RESTORE
PG_INCLUDE=`${PG_CONFIG} --includedir`
@@ -339,6 +354,11 @@
else
LIBS="${PG_LIB}/libpq.a $CRYPT_LIB $LIBS $CRYPTO_LIB"
fi
+
+ if test "$PG_KRB5" = "yes"
+ then
+ LIBS="$LIBS -lkrb5"
+ fi
else
if test "$PG_SSL" = "yes"
then