[patch] libkrb5 needed during static linking of 1.6beta2 on debian - Mailing list pgadmin-hackers

From Raphaël Enrici
Subject [patch] libkrb5 needed during static linking of 1.6beta2 on debian
Date
Msg-id 452A9A71.4010906@club-internet.fr
Whole thread Raw
Responses Re: [patch] libkrb5 needed during static linking of 1.6beta2 on  (Dave Page <dpage@vale-housing.co.uk>)
List pgadmin-hackers
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

pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r5445 - in trunk/pgadmin3/src: frm main
Next
From: svn@pgadmin.org
Date:
Subject: SVN Commit by raphael: r5446 - trunk/pgadmin3/pkg/debian