mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
Fixed detection of CUPS. We need to check for the presence of the cups
header files as well as libcups. (This used to be commit 2dbb41a7b88e7fad63579111aaab4a1cd28c54d5)
This commit is contained in:
parent
2f6486b55f
commit
d1f53e4044
1274
source3/configure
vendored
1274
source3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -306,9 +306,23 @@ AC_CHECK_TYPE(offset_t,loff_t)
|
||||
AC_CHECK_TYPE(ssize_t, int)
|
||||
AC_CHECK_TYPE(wchar_t, unsigned short)
|
||||
|
||||
# we need libcups for CUPS support...
|
||||
############################################
|
||||
# for cups support we need libcups, and a handful of header files
|
||||
|
||||
AC_CHECK_LIB(cups,httpConnect)
|
||||
|
||||
# I wonder if there is a nicer way of doing this?
|
||||
|
||||
if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
|
||||
AC_CHECK_HEADERS(cups/cups.h cups/language.h)
|
||||
if x"$ac_cv_header_cups_cups_h" = x"yes"; then
|
||||
if x"$ac_cv_header_cups_language_h" = x"yes"; then
|
||||
AC_DEFINE(HAVE_CUPS)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
############################################
|
||||
# we need libdl for PAM and the new VFS code
|
||||
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
|
||||
AC_DEFINE(HAVE_LIBDL)])
|
||||
|
@ -983,8 +983,8 @@
|
||||
/* Define if you have the acl library (-lacl). */
|
||||
#undef HAVE_LIBACL
|
||||
|
||||
/* Define if you have the cups library (-lcups). */
|
||||
#undef HAVE_LIBCUPS
|
||||
/* Define if you have cups installed. */
|
||||
#undef HAVE_CUPS
|
||||
|
||||
/* Define if you have the gen library (-lgen). */
|
||||
#undef HAVE_LIBGEN
|
||||
|
@ -760,7 +760,7 @@ typedef enum
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_PRINTING
|
||||
#ifdef HAVE_LIBCUPS
|
||||
#ifdef HAVE_CUPS
|
||||
#define DEFAULT_PRINTING PRINT_CUPS
|
||||
#define PRINTCAP_NAME "cups"
|
||||
#elif defined(SYSV)
|
||||
|
@ -57,9 +57,9 @@ struct printif
|
||||
|
||||
extern struct printif generic_printif;
|
||||
|
||||
#ifdef HAVE_LIBCUPS
|
||||
#ifdef HAVE_CUPS
|
||||
extern struct printif cups_printif;
|
||||
#endif /* HAVE_LIBCUPS */
|
||||
#endif /* HAVE_CUPS */
|
||||
|
||||
#define PRINT_MAX_JOBID 10000
|
||||
#define UNIX_JOB_START PRINT_MAX_JOBID
|
||||
|
@ -1062,7 +1062,7 @@ static void init_printer_values(void)
|
||||
break;
|
||||
|
||||
case PRINT_CUPS:
|
||||
#ifdef HAVE_LIBCUPS
|
||||
#ifdef HAVE_CUPS
|
||||
string_set(&sDefault.szLpqcommand, "");
|
||||
string_set(&sDefault.szLprmcommand, "");
|
||||
string_set(&sDefault.szPrintcommand, "");
|
||||
@ -1088,7 +1088,7 @@ static void init_printer_values(void)
|
||||
string_set(&sDefault.szQueueresumecommand,
|
||||
"/usr/bin/enable %p");
|
||||
string_set(&Globals.szPrintcapname, "lpstat");
|
||||
#endif /* HAVE_LIBCUPS */
|
||||
#endif /* HAVE_CUPS */
|
||||
break;
|
||||
|
||||
case PRINT_SYSV:
|
||||
|
@ -270,10 +270,10 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname)
|
||||
return(False);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBCUPS
|
||||
#ifdef HAVE_CUPS
|
||||
if (strequal(psz, "cups"))
|
||||
return (cups_printername_ok(pszPrintername));
|
||||
#endif /* HAVE_LIBCUPS */
|
||||
#endif /* HAVE_CUPS */
|
||||
|
||||
#ifdef SYSV
|
||||
if (strequal(psz, "lpstat"))
|
||||
@ -344,12 +344,12 @@ void pcap_printer_fn(void (*fn)(char *, char *))
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBCUPS
|
||||
#ifdef HAVE_CUPS
|
||||
if (strequal(psz, "cups")) {
|
||||
cups_printer_fn(fn);
|
||||
return;
|
||||
}
|
||||
#endif /* HAVE_LIBCUPS */
|
||||
#endif /* HAVE_CUPS */
|
||||
|
||||
#ifdef SYSV
|
||||
if (strequal(psz, "lpstat")) {
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "printing.h"
|
||||
#include "smb.h"
|
||||
|
||||
#ifdef HAVE_LIBCUPS
|
||||
#ifdef HAVE_CUPS
|
||||
#include <cups/cups.h>
|
||||
#include <cups/language.h>
|
||||
|
||||
@ -1189,4 +1189,4 @@ cups_queue_resume(int snum)
|
||||
#else
|
||||
/* this keeps fussy compilers happy */
|
||||
void print_cups_dummy(void) {}
|
||||
#endif /* HAVE_LIBCUPS */
|
||||
#endif /* HAVE_CUPS */
|
||||
|
@ -72,10 +72,10 @@ BOOL print_backend_init(void)
|
||||
tdb_unlock_bystring(tdb, sversion);
|
||||
|
||||
/* select the appropriate printing interface... */
|
||||
#ifdef HAVE_LIBCUPS
|
||||
#ifdef HAVE_CUPS
|
||||
if (strcmp(lp_printcapname(), "cups") == 0)
|
||||
current_printif = &cups_printif;
|
||||
#endif /* HAVE_LIBCUPS */
|
||||
#endif /* HAVE_CUPS */
|
||||
|
||||
/* do NT print initialization... */
|
||||
return nt_printing_init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user