[SCM] Samba Shared Repository - branch v3-5-test updated

Karolin Seeger kseeger at samba.org
Tue Aug 24 08:40:45 MDT 2010


The branch, v3-5-test has been updated
       via  fd43cc6... s3: fall back to cups-config for underlinked libs
      from  fe4dcd4... s3: Fix bug 7635

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -----------------------------------------------------------------
commit fd43cc698a7f03c4d6c48d21e88097cc5050ca8e
Author: Björn Jacke <bj at sernet.de>
Date:   Thu Aug 12 16:18:45 2010 +0200

    s3: fall back to cups-config for underlinked libs
    
    some OpenBSD systems have underlinked cups libraries. If linking against cups
    alone fails, try to link against all the cups-config --libs cruft, which we
    usually don't want. (bugzila #7244)
    (cherry picked from commit 616e187d68e3e7b202413a96518b31d029e9563a)

-----------------------------------------------------------------------

Summary of changes:
 source3/configure.in |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 4360ca6..3dc9da7 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -756,15 +756,21 @@ if test x$enable_cups != xno; then
 
         if test "x$CUPS_CONFIG" != x; then
 
-		ac_save_CFLAGS=$CFLAGS
 		ac_save_LDFLAGS=$LDFLAGS
 		ac_save_PRINT_LIBS=$PRINT_LIBS
-		CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
-		LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
-		PRINT_LIBS="$PRINT_LIBS -lcups"
 		AC_CHECK_HEADERS(cups/cups.h cups/language.h)
+
 		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
 		        x"$ac_cv_header_cups_language_h" = xyes; then
+			# try linking with -lcups alone first. That should work unless libcups is
+			# underlinked. With cups-config --libs we pull in unwanted and unneeded
+			# dendencies including thread libraries - use cups-config only if really
+			# required. 
+			AC_CHECK_LIB_EXT(cups, ac_save_PRINT_LIBS , httpConnect,
+				[PRINT_LIBS"$ac_save_PRINT_LIBS -lcups"],
+				[AC_MSG_WARN([your cups library doesn't link with -lcups alone, it might be underlinked.]) ;
+				 PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG --libs`"])
+
 			AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS])
 			samba_cv_HAVE_CUPS=yes
 			AC_CHECK_LIB_EXT(cups, PRINT_LIBS, httpConnectEncrypt)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list