mirror of
https://github.com/samba-team/samba.git
synced 2025-11-30 20:23:49 +03:00
Fixed detection of CUPS. We need to check for the presence of the cups
header files as well as libcups.
This commit is contained in:
1274
source/configure
vendored
1274
source/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(ssize_t, int)
|
||||||
AC_CHECK_TYPE(wchar_t, unsigned short)
|
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)
|
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
|
# we need libdl for PAM and the new VFS code
|
||||||
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
|
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
|
||||||
AC_DEFINE(HAVE_LIBDL)])
|
AC_DEFINE(HAVE_LIBDL)])
|
||||||
|
|||||||
@@ -983,8 +983,8 @@
|
|||||||
/* Define if you have the acl library (-lacl). */
|
/* Define if you have the acl library (-lacl). */
|
||||||
#undef HAVE_LIBACL
|
#undef HAVE_LIBACL
|
||||||
|
|
||||||
/* Define if you have the cups library (-lcups). */
|
/* Define if you have cups installed. */
|
||||||
#undef HAVE_LIBCUPS
|
#undef HAVE_CUPS
|
||||||
|
|
||||||
/* Define if you have the gen library (-lgen). */
|
/* Define if you have the gen library (-lgen). */
|
||||||
#undef HAVE_LIBGEN
|
#undef HAVE_LIBGEN
|
||||||
|
|||||||
@@ -760,7 +760,7 @@ typedef enum
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DEFAULT_PRINTING
|
#ifndef DEFAULT_PRINTING
|
||||||
#ifdef HAVE_LIBCUPS
|
#ifdef HAVE_CUPS
|
||||||
#define DEFAULT_PRINTING PRINT_CUPS
|
#define DEFAULT_PRINTING PRINT_CUPS
|
||||||
#define PRINTCAP_NAME "cups"
|
#define PRINTCAP_NAME "cups"
|
||||||
#elif defined(SYSV)
|
#elif defined(SYSV)
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ struct printif
|
|||||||
|
|
||||||
extern struct printif generic_printif;
|
extern struct printif generic_printif;
|
||||||
|
|
||||||
#ifdef HAVE_LIBCUPS
|
#ifdef HAVE_CUPS
|
||||||
extern struct printif cups_printif;
|
extern struct printif cups_printif;
|
||||||
#endif /* HAVE_LIBCUPS */
|
#endif /* HAVE_CUPS */
|
||||||
|
|
||||||
#define PRINT_MAX_JOBID 10000
|
#define PRINT_MAX_JOBID 10000
|
||||||
#define UNIX_JOB_START PRINT_MAX_JOBID
|
#define UNIX_JOB_START PRINT_MAX_JOBID
|
||||||
|
|||||||
@@ -1062,7 +1062,7 @@ static void init_printer_values(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PRINT_CUPS:
|
case PRINT_CUPS:
|
||||||
#ifdef HAVE_LIBCUPS
|
#ifdef HAVE_CUPS
|
||||||
string_set(&sDefault.szLpqcommand, "");
|
string_set(&sDefault.szLpqcommand, "");
|
||||||
string_set(&sDefault.szLprmcommand, "");
|
string_set(&sDefault.szLprmcommand, "");
|
||||||
string_set(&sDefault.szPrintcommand, "");
|
string_set(&sDefault.szPrintcommand, "");
|
||||||
@@ -1088,7 +1088,7 @@ static void init_printer_values(void)
|
|||||||
string_set(&sDefault.szQueueresumecommand,
|
string_set(&sDefault.szQueueresumecommand,
|
||||||
"/usr/bin/enable %p");
|
"/usr/bin/enable %p");
|
||||||
string_set(&Globals.szPrintcapname, "lpstat");
|
string_set(&Globals.szPrintcapname, "lpstat");
|
||||||
#endif /* HAVE_LIBCUPS */
|
#endif /* HAVE_CUPS */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PRINT_SYSV:
|
case PRINT_SYSV:
|
||||||
|
|||||||
@@ -270,10 +270,10 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname)
|
|||||||
return(False);
|
return(False);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBCUPS
|
#ifdef HAVE_CUPS
|
||||||
if (strequal(psz, "cups"))
|
if (strequal(psz, "cups"))
|
||||||
return (cups_printername_ok(pszPrintername));
|
return (cups_printername_ok(pszPrintername));
|
||||||
#endif /* HAVE_LIBCUPS */
|
#endif /* HAVE_CUPS */
|
||||||
|
|
||||||
#ifdef SYSV
|
#ifdef SYSV
|
||||||
if (strequal(psz, "lpstat"))
|
if (strequal(psz, "lpstat"))
|
||||||
@@ -344,12 +344,12 @@ void pcap_printer_fn(void (*fn)(char *, char *))
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBCUPS
|
#ifdef HAVE_CUPS
|
||||||
if (strequal(psz, "cups")) {
|
if (strequal(psz, "cups")) {
|
||||||
cups_printer_fn(fn);
|
cups_printer_fn(fn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LIBCUPS */
|
#endif /* HAVE_CUPS */
|
||||||
|
|
||||||
#ifdef SYSV
|
#ifdef SYSV
|
||||||
if (strequal(psz, "lpstat")) {
|
if (strequal(psz, "lpstat")) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include "printing.h"
|
#include "printing.h"
|
||||||
#include "smb.h"
|
#include "smb.h"
|
||||||
|
|
||||||
#ifdef HAVE_LIBCUPS
|
#ifdef HAVE_CUPS
|
||||||
#include <cups/cups.h>
|
#include <cups/cups.h>
|
||||||
#include <cups/language.h>
|
#include <cups/language.h>
|
||||||
|
|
||||||
@@ -1189,4 +1189,4 @@ cups_queue_resume(int snum)
|
|||||||
#else
|
#else
|
||||||
/* this keeps fussy compilers happy */
|
/* this keeps fussy compilers happy */
|
||||||
void print_cups_dummy(void) {}
|
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);
|
tdb_unlock_bystring(tdb, sversion);
|
||||||
|
|
||||||
/* select the appropriate printing interface... */
|
/* select the appropriate printing interface... */
|
||||||
#ifdef HAVE_LIBCUPS
|
#ifdef HAVE_CUPS
|
||||||
if (strcmp(lp_printcapname(), "cups") == 0)
|
if (strcmp(lp_printcapname(), "cups") == 0)
|
||||||
current_printif = &cups_printif;
|
current_printif = &cups_printif;
|
||||||
#endif /* HAVE_LIBCUPS */
|
#endif /* HAVE_CUPS */
|
||||||
|
|
||||||
/* do NT print initialization... */
|
/* do NT print initialization... */
|
||||||
return nt_printing_init();
|
return nt_printing_init();
|
||||||
|
|||||||
Reference in New Issue
Block a user