Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch to make CUPS build against avahi-compat-libdns_sd #2455

Closed
michaelrsweet opened this issue Jul 19, 2007 · 3 comments
Closed

Patch to make CUPS build against avahi-compat-libdns_sd #2455

michaelrsweet opened this issue Jul 19, 2007 · 3 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.3-current
CUPS.org User: twaugh.redhat

I've managed to get CUPS 1.3b1 to build against avahi-compat-libdns_sd in Fedora. Here is the patch I used.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Thanks, I updated the patch slightly to support any platform with the needed libraries and in case the headers are there but not the library to link to...

@michaelrsweet
Copy link
Collaborator Author

"cups-avahi.patch":

--- cups-1.3b1/config-scripts/cups-dnssd.m4.avahi 2007-07-19 13:45:14.000000000 +0100
+++ cups-1.3b1/config-scripts/cups-dnssd.m4 2007-07-19 13:45:55.000000000 +0100
@@ -37,6 +37,9 @@
AC_DEFINE(HAVE_COREFOUNDATION)
AC_DEFINE(HAVE_SYSTEMCONFIGURATION)
;;

  •       Linux*)
    
  •           DNSSDLIBS="-ldns_sd"
    
  •           ;;
        *)
            # All others...
            DNSSDLIBS="???"
    

    --- cups-1.3b1/scheduler/dirsvc.c.avahi 2007-07-19 13:43:51.000000000 +0100
    +++ cups-1.3b1/scheduler/dirsvc.c 2007-07-19 13:44:42.000000000 +0100
    @@ -65,6 +65,8 @@

    #ifdef HAVE_DNSSD

    include <dns_sd.h>

    +#endif /* HAVE_DNSSD */
    +#ifdef APPLE

    include <nameser.h>

    include <nameser.h>

    ifdef HAVE_COREFOUNDATION

    @@ -73,7 +75,7 @@

    ifdef HAVE_SYSTEMCONFIGURATION

    include <SystemConfiguration/SystemConfiguration.h>

    endif /* HAVE_SYSTEMCONFIGURATION */

    -#endif /* HAVE_DNSSD /
    +#endif /
    APPLE */

    /*
    --- cups-1.3b1/configure.avahi 2007-07-19 13:46:30.000000000 +0100
    +++ cups-1.3b1/configure 2007-07-19 13:46:57.000000000 +0100
    @@ -17294,6 +17294,9 @@
    _ACEOF

              ;;
    
  •       Linux*)
    
  •           DNSSDLIBS="-ldns_sd"
    
  •           ;;
        *)
            # All others...
            DNSSDLIBS="???"
    

@michaelrsweet
Copy link
Collaborator Author

"str2455.patch":

Index: config-scripts/cups-dnssd.m4

--- config-scripts/cups-dnssd.m4 (revision 6690)
+++ config-scripts/cups-dnssd.m4 (working copy)
@@ -29,17 +29,19 @@

if test x$enable_dnssd != xno; then
AC_CHECK_HEADER(dns_sd.h, [

  •   AC_DEFINE(HAVE_DNSSD)
    case "$uname" in
        Darwin*)
            # Darwin and MacOS X...
            DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
    
  •           AC_DEFINE(HAVE_DNSSD)
            AC_DEFINE(HAVE_COREFOUNDATION)
            AC_DEFINE(HAVE_SYSTEMCONFIGURATION)
            ;;
        *)
            # All others...
    
  •           DNSSDLIBS="???"
    
  •           AC_CHECK_LIB(dns_sd,DNSServiceProcessResult,
    
  •               AC_DEFINE(HAVE_DNSSD)
    
  •               DNSSDLIBS="-ldns_sd")
            ;;
    esac
    

    ])

    Index: scheduler/dirsvc.c

    --- scheduler/dirsvc.c (revision 6690)
    +++ scheduler/dirsvc.c (working copy)
    @@ -65,14 +65,15 @@

    #ifdef HAVE_DNSSD

    include <dns_sd.h>

    -# include <nameser.h>
    -# include <nameser.h>
    -# ifdef HAVE_COREFOUNDATION
    -# include <CoreFoundation/CoreFoundation.h>
    -# endif /* HAVE_COREFOUNDATION /
    -# ifdef HAVE_SYSTEMCONFIGURATION
    -# include <SystemConfiguration/SystemConfiguration.h>
    -# endif /
    HAVE_SYSTEMCONFIGURATION /
    +# ifdef APPLE
    +# include <nameser.h>
    +# ifdef HAVE_COREFOUNDATION
    +# include <CoreFoundation/CoreFoundation.h>
    +# endif /
    HAVE_COREFOUNDATION /
    +# ifdef HAVE_SYSTEMCONFIGURATION
    +# include <SystemConfiguration/SystemConfiguration.h>
    +# endif /
    HAVE_SYSTEMCONFIGURATION /
    +# endif /
    APPLE /
    #endif /
    HAVE_DNSSD */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant