summaryrefslogtreecommitdiff
path: root/print/cups/patches/patch-af
blob: 8b528e514828b9d6816c81c6dab045e80e6eecf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
$NetBSD: patch-af,v 1.4 2000/12/21 16:59:32 jlam Exp $

--- configure.in.orig	Thu Dec 21 08:45:21 2000
+++ configure.in
@@ -117,4 +117,12 @@
 AC_ARG_WITH(fontpath, [  --with-fontpath     set font path for pstoraster],fontpath="$withval",fontpath="")
 
+AC_ARG_WITH(cups-user, [  --with-cups-user=USERID
+                          use USERID as cups userid [default=lp]], CUPS_USER="$withval", CUPS_USER="lp")
+AC_ARG_WITH(cups-group, [  --with-cups-group=GROUPID
+                          use GROUPID as cups group [default=sys]], CUPS_GROUP="$withval", CUPS_GROUP="sys")
+
+AC_SUBST(CUPS_USER)
+AC_SUBST(CUPS_GROUP)
+
 dnl Checks for programs...
 AC_PROG_AWK
@@ -201,9 +209,24 @@
 	SAVELIBS="$LIBS"
 
-	LIBS="-lcrypto $LIBS"
-	AC_CHECK_LIB(ssl,SSL_new,
-		SSLLIBS="-lssl -lcrypto"
-		AC_DEFINE(HAVE_LIBSSL)
-	)
+	dnl Some ELF systems can't resolve all the symbols in libcrypto
+	dnl if libcrypto was linked against RSAREF, and fail to link the
+	dnl test program correctly, even though a correct installation
+	dnl of OpenSSL exists.  So we test the linking three times in
+	dnl case the RSAREF libraries are needed.
+	dnl
+	for libcrypto in \
+		"-lcrypto" \
+		"-lcrypto -lrsaref" \
+		"-lcrypto -lRSAglue -lrsaref"
+	do
+		AC_CHECK_LIB(ssl,SSL_new,
+			[SSLLIBS="-lssl $libcrypto"
+			 AC_DEFINE(HAVE_LIBSSL)],,
+			$libcrypto
+		)
+		if test "x${SSLLIBS}" != "x"; then
+			break
+		fi
+	done
 
 	LIBS="$SAVELIBS"
@@ -257,4 +280,5 @@
 AC_CHECK_HEADER(stddef.h,AC_DEFINE(HAVE_STDDEF_H))
 AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H))
+AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
 
 dnl Checks for string functions.
@@ -396,5 +420,5 @@
 	else
 		datadir="$prefix/share"
-        fi
+	fi
 fi
 
@@ -429,9 +453,18 @@
 dnl Fix "mandir" variable...
 if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
-	if test "$uname" = "IRIX"; then
-		mandir="/usr/share/catman"
-	else
-		mandir="/usr/man"
-	fi
+	case "$uname" in
+		FreeBSD* | NetBSD* | OpenBSD*)
+			# *BSD
+			mandir="/usr/share/man"
+			;;
+		IRIX*)
+			# SGI IRIX
+			mandir="/usr/share/catman"
+			;;
+		*)
+			# All others
+			mandir="/usr/man"
+			;;
+	esac
 fi
 
@@ -510,11 +543,11 @@
 
 dnl Setup default locations...
-CUPS_SERVERROOT='${prefix}/etc/cups'
-CUPS_LOGDIR='${prefix}/var/log/cups'
-CUPS_REQUESTS='${prefix}/var/spool/cups'
-
-AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$prefix/etc/cups")
-AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$prefix/var/log/cups")
-AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$prefix/var/spool/cups")
+CUPS_SERVERROOT='${sysconfdir}/cups'
+CUPS_LOGDIR='${localstatedir}/log/cups'
+CUPS_REQUESTS='${localstatedir}/spool/cups'
+
+AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
+AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
+AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
 
 dnl See what directory to put server executables...
@@ -567,6 +600,6 @@
 
 dnl Set the CUPS_DOCROOT directory...
-CUPS_DOCROOT='${exec_prefix}/share/doc/cups'
-AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$exec_prefix/share/doc/cups")
+CUPS_DOCROOT='${datadir}/doc/html/cups'
+AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$datadir/doc/html/cups")
 AC_SUBST(CUPS_DOCROOT)
 
@@ -574,5 +607,5 @@
 AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$fontpath")
 
-AC_OUTPUT(Makedefs cups.sh)
+AC_OUTPUT(Makedefs cups.sh conf/cupsd.conf)
 
 dnl