]>
Commit | Line | Data |
---|---|---|
1 | dnl | |
2 | dnl Common configuration stuff for CUPS. | |
3 | dnl | |
4 | dnl Copyright 2007-2015 by Apple Inc. | |
5 | dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. | |
6 | dnl | |
7 | dnl These coded instructions, statements, and computer programs are the | |
8 | dnl property of Apple Inc. and are protected by Federal copyright | |
9 | dnl law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
10 | dnl which should have been included with this file. If this file is | |
11 | dnl file is missing or damaged, see the license at "http://www.cups.org/". | |
12 | dnl | |
13 | ||
14 | dnl Set the name of the config header file... | |
15 | AC_CONFIG_HEADER(config.h) | |
16 | ||
17 | dnl Version number information... | |
18 | CUPS_VERSION="AC_PACKAGE_VERSION" | |
19 | ||
20 | case "$CUPS_VERSION" in | |
21 | *svn) | |
22 | if test -z "$CUPS_REVISION" -a -d .svn; then | |
23 | CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`" | |
24 | else | |
25 | CUPS_REVISION="" | |
26 | fi | |
27 | ;; | |
28 | ||
29 | *) | |
30 | CUPS_REVISION="" | |
31 | ;; | |
32 | esac | |
33 | ||
34 | CUPS_BUILD="cups-$CUPS_VERSION" | |
35 | ||
36 | AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" string ], | |
37 | CUPS_BUILD="$withval") | |
38 | ||
39 | AC_SUBST(CUPS_VERSION) | |
40 | AC_SUBST(CUPS_REVISION) | |
41 | AC_SUBST(CUPS_BUILD) | |
42 | AC_DEFINE_UNQUOTED(CUPS_SVERSION, "AC_PACKAGE_NAME v$CUPS_VERSION$CUPS_REVISION") | |
43 | AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "AC_PACKAGE_NAME/$CUPS_VERSION$CUPS_REVISION") | |
44 | ||
45 | dnl Default compiler flags... | |
46 | CFLAGS="${CFLAGS:=}" | |
47 | CPPFLAGS="${CPPFLAGS:=}" | |
48 | CXXFLAGS="${CXXFLAGS:=}" | |
49 | LDFLAGS="${LDFLAGS:=}" | |
50 | ||
51 | dnl Checks for programs... | |
52 | AC_PROG_AWK | |
53 | AC_PROG_CC(clang cc gcc) | |
54 | AC_PROG_CPP | |
55 | AC_PROG_CXX(clang++ c++ g++) | |
56 | AC_PROG_RANLIB | |
57 | AC_PATH_PROG(AR,ar) | |
58 | AC_PATH_PROG(CHMOD,chmod) | |
59 | AC_PATH_PROG(GZIP,gzip) | |
60 | AC_PATH_PROG(LD,ld) | |
61 | AC_PATH_PROG(LN,ln) | |
62 | AC_PATH_PROG(MV,mv) | |
63 | AC_PATH_PROG(RM,rm) | |
64 | AC_PATH_PROG(RMDIR,rmdir) | |
65 | AC_PATH_PROG(SED,sed) | |
66 | AC_PATH_PROG(XDGOPEN,xdg-open) | |
67 | if test "x$XDGOPEN" = x; then | |
68 | CUPS_HTMLVIEW="htmlview" | |
69 | else | |
70 | CUPS_HTMLVIEW="$XDGOPEN" | |
71 | fi | |
72 | AC_SUBST(CUPS_HTMLVIEW) | |
73 | ||
74 | AC_MSG_CHECKING(for install-sh script) | |
75 | INSTALL="`pwd`/install-sh" | |
76 | AC_SUBST(INSTALL) | |
77 | AC_MSG_RESULT(using $INSTALL) | |
78 | ||
79 | if test "x$AR" = x; then | |
80 | AC_MSG_ERROR([Unable to find required library archive command.]) | |
81 | fi | |
82 | if test "x$CC" = x; then | |
83 | AC_MSG_ERROR([Unable to find required C compiler command.]) | |
84 | fi | |
85 | ||
86 | dnl Static library option... | |
87 | INSTALLSTATIC="" | |
88 | AC_ARG_ENABLE(static, [ --enable-static install static libraries]) | |
89 | ||
90 | if test x$enable_static = xyes; then | |
91 | echo Installing static libraries... | |
92 | INSTALLSTATIC="installstatic" | |
93 | fi | |
94 | ||
95 | AC_SUBST(INSTALLSTATIC) | |
96 | ||
97 | dnl Check for pkg-config, which is used for some other tests later on... | |
98 | AC_PATH_TOOL(PKGCONFIG, pkg-config) | |
99 | ||
100 | dnl Check for libraries... | |
101 | AC_SEARCH_LIBS(abs, m, AC_DEFINE(HAVE_ABS)) | |
102 | AC_SEARCH_LIBS(crypt, crypt) | |
103 | AC_SEARCH_LIBS(fmod, m) | |
104 | AC_SEARCH_LIBS(getspent, sec gen) | |
105 | ||
106 | LIBMALLOC="" | |
107 | AC_ARG_ENABLE(mallinfo, [ --enable-mallinfo build with malloc debug logging]) | |
108 | ||
109 | if test x$enable_mallinfo = xyes; then | |
110 | SAVELIBS="$LIBS" | |
111 | LIBS="" | |
112 | AC_SEARCH_LIBS(mallinfo, malloc, AC_DEFINE(HAVE_MALLINFO)) | |
113 | LIBMALLOC="$LIBS" | |
114 | LIBS="$SAVELIBS" | |
115 | fi | |
116 | ||
117 | AC_SUBST(LIBMALLOC) | |
118 | ||
119 | dnl Check for libpaper support... | |
120 | AC_ARG_ENABLE(libpaper, [ --enable-libpaper build with libpaper support]) | |
121 | ||
122 | if test x$enable_libpaper = xyes; then | |
123 | AC_CHECK_LIB(paper,systempapername, | |
124 | AC_DEFINE(HAVE_LIBPAPER) | |
125 | LIBPAPER="-lpaper", | |
126 | LIBPAPER="") | |
127 | else | |
128 | LIBPAPER="" | |
129 | fi | |
130 | AC_SUBST(LIBPAPER) | |
131 | ||
132 | dnl Checks for header files. | |
133 | AC_HEADER_STDC | |
134 | AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H)) | |
135 | AC_CHECK_HEADER(crypt.h,AC_DEFINE(HAVE_CRYPT_H)) | |
136 | AC_CHECK_HEADER(langinfo.h,AC_DEFINE(HAVE_LANGINFO_H)) | |
137 | AC_CHECK_HEADER(malloc.h,AC_DEFINE(HAVE_MALLOC_H)) | |
138 | AC_CHECK_HEADER(shadow.h,AC_DEFINE(HAVE_SHADOW_H)) | |
139 | AC_CHECK_HEADER(stdint.h,AC_DEFINE(HAVE_STDINT_H)) | |
140 | AC_CHECK_HEADER(string.h,AC_DEFINE(HAVE_STRING_H)) | |
141 | AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H)) | |
142 | AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H)) | |
143 | AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H)) | |
144 | AC_CHECK_HEADER(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H)) | |
145 | AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H)) | |
146 | AC_CHECK_HEADER(asl.h,AC_DEFINE(HAVE_ASL_H)) | |
147 | ||
148 | dnl Checks for iconv.h and iconv_open | |
149 | AC_CHECK_HEADER(iconv.h, | |
150 | SAVELIBS="$LIBS" | |
151 | LIBS="" | |
152 | AC_SEARCH_LIBS(iconv_open,iconv, | |
153 | AC_DEFINE(HAVE_ICONV_H) | |
154 | SAVELIBS="$SAVELIBS $LIBS") | |
155 | AC_SEARCH_LIBS(libiconv_open,iconv, | |
156 | AC_DEFINE(HAVE_ICONV_H) | |
157 | SAVELIBS="$SAVELIBS $LIBS") | |
158 | LIBS="$SAVELIBS") | |
159 | ||
160 | dnl Checks for Mini-XML (www.minixml.org)... | |
161 | LIBMXML="" | |
162 | AC_CHECK_HEADER(mxml.h, | |
163 | SAVELIBS="$LIBS" | |
164 | AC_SEARCH_LIBS(mmxlNewElement,mxml, | |
165 | AC_DEFINE(HAVE_MXML_H) | |
166 | LIBMXML="-lmxml") | |
167 | LIBS="$SAVELIBS") | |
168 | AC_SUBST(LIBMXML) | |
169 | ||
170 | dnl Checks for statfs and its many headers... | |
171 | AC_CHECK_HEADER(sys/mount.h,AC_DEFINE(HAVE_SYS_MOUNT_H)) | |
172 | AC_CHECK_HEADER(sys/statfs.h,AC_DEFINE(HAVE_SYS_STATFS_H)) | |
173 | AC_CHECK_HEADER(sys/statvfs.h,AC_DEFINE(HAVE_SYS_STATVFS_H)) | |
174 | AC_CHECK_HEADER(sys/vfs.h,AC_DEFINE(HAVE_SYS_VFS_H)) | |
175 | AC_CHECK_FUNCS(statfs statvfs) | |
176 | ||
177 | dnl Checks for string functions. | |
178 | AC_CHECK_FUNCS(strdup strlcat strlcpy) | |
179 | if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then | |
180 | echo Forcing snprintf emulation for HP-UX. | |
181 | else | |
182 | AC_CHECK_FUNCS(snprintf vsnprintf) | |
183 | fi | |
184 | ||
185 | dnl Check for random number functions... | |
186 | AC_CHECK_FUNCS(random lrand48 arc4random) | |
187 | ||
188 | dnl Check for geteuid function. | |
189 | AC_CHECK_FUNCS(geteuid) | |
190 | ||
191 | dnl Check for setpgid function. | |
192 | AC_CHECK_FUNCS(setpgid) | |
193 | ||
194 | dnl Check for vsyslog function. | |
195 | AC_CHECK_FUNCS(vsyslog) | |
196 | ||
197 | dnl Checks for signal functions. | |
198 | case "$uname" in | |
199 | Linux | GNU) | |
200 | # Do not use sigset on Linux or GNU HURD | |
201 | ;; | |
202 | *) | |
203 | # Use sigset on other platforms, if available | |
204 | AC_CHECK_FUNCS(sigset) | |
205 | ;; | |
206 | esac | |
207 | ||
208 | AC_CHECK_FUNCS(sigaction) | |
209 | ||
210 | dnl Checks for wait functions. | |
211 | AC_CHECK_FUNCS(waitpid wait3) | |
212 | ||
213 | dnl Check for posix_spawn | |
214 | AC_CHECK_FUNCS(posix_spawn) | |
215 | ||
216 | dnl See if the tm structure has the tm_gmtoff member... | |
217 | AC_MSG_CHECKING(for tm_gmtoff member in tm structure) | |
218 | AC_TRY_COMPILE([#include <time.h>],[struct tm t; | |
219 | int o = t.tm_gmtoff;], | |
220 | AC_MSG_RESULT(yes) | |
221 | AC_DEFINE(HAVE_TM_GMTOFF), | |
222 | AC_MSG_RESULT(no)) | |
223 | ||
224 | dnl See if the stat structure has the st_gen member... | |
225 | AC_MSG_CHECKING(for st_gen member in stat structure) | |
226 | AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat t; | |
227 | int o = t.st_gen;], | |
228 | AC_MSG_RESULT(yes) | |
229 | AC_DEFINE(HAVE_ST_GEN), | |
230 | AC_MSG_RESULT(no)) | |
231 | ||
232 | dnl See if we have the removefile(3) function for securely removing files | |
233 | AC_CHECK_FUNCS(removefile) | |
234 | ||
235 | dnl See if we have libusb... | |
236 | AC_ARG_ENABLE(libusb, [ --enable-libusb use libusb for USB printing]) | |
237 | ||
238 | LIBUSB="" | |
239 | USBQUIRKS="" | |
240 | AC_SUBST(LIBUSB) | |
241 | AC_SUBST(USBQUIRKS) | |
242 | ||
243 | if test "x$PKGCONFIG" != x; then | |
244 | if test x$enable_libusb != xno -a $uname != Darwin; then | |
245 | AC_MSG_CHECKING(for libusb-1.0) | |
246 | if $PKGCONFIG --exists libusb-1.0; then | |
247 | AC_MSG_RESULT(yes) | |
248 | AC_DEFINE(HAVE_LIBUSB) | |
249 | CFLAGS="$CFLAGS `$PKGCONFIG --cflags libusb-1.0`" | |
250 | LIBUSB="`$PKGCONFIG --libs libusb-1.0`" | |
251 | USBQUIRKS="\$(DATADIR)/usb" | |
252 | else | |
253 | AC_MSG_RESULT(no) | |
254 | if test x$enable_libusb = xyes; then | |
255 | AC_MSG_ERROR(libusb required for --enable-libusb.) | |
256 | fi | |
257 | fi | |
258 | fi | |
259 | elif test x$enable_libusb = xyes; then | |
260 | AC_MSG_ERROR(Need pkg-config to enable libusb support.) | |
261 | fi | |
262 | ||
263 | dnl See if we have libwrap for TCP wrappers support... | |
264 | AC_ARG_ENABLE(tcp_wrappers, [ --enable-tcp-wrappers use libwrap for TCP wrappers support]) | |
265 | ||
266 | LIBWRAP="" | |
267 | AC_SUBST(LIBWRAP) | |
268 | ||
269 | if test x$enable_tcp_wrappers = xyes; then | |
270 | AC_CHECK_LIB(wrap, hosts_access,[ | |
271 | AC_CHECK_HEADER(tcpd.h, | |
272 | AC_DEFINE(HAVE_TCPD_H) | |
273 | LIBWRAP="-lwrap")]) | |
274 | fi | |
275 | ||
276 | dnl ZLIB | |
277 | INSTALL_GZIP="" | |
278 | LIBZ="" | |
279 | AC_CHECK_HEADER(zlib.h, | |
280 | AC_CHECK_LIB(z, gzgets, | |
281 | AC_DEFINE(HAVE_LIBZ) | |
282 | LIBZ="-lz" | |
283 | LIBS="$LIBS -lz" | |
284 | AC_CHECK_LIB(z, inflateCopy, AC_DEFINE(HAVE_INFLATECOPY)) | |
285 | if test "x$GZIP" != z; then | |
286 | INSTALL_GZIP="-z" | |
287 | fi)) | |
288 | AC_SUBST(INSTALL_GZIP) | |
289 | AC_SUBST(LIBZ) | |
290 | ||
291 | dnl Flags for "ar" command... | |
292 | case $uname in | |
293 | Darwin* | *BSD*) | |
294 | ARFLAGS="-rcv" | |
295 | ;; | |
296 | *) | |
297 | ARFLAGS="crvs" | |
298 | ;; | |
299 | esac | |
300 | ||
301 | AC_SUBST(ARFLAGS) | |
302 | ||
303 | dnl Prep libraries specifically for cupsd and backends... | |
304 | BACKLIBS="" | |
305 | SERVERLIBS="" | |
306 | AC_SUBST(BACKLIBS) | |
307 | AC_SUBST(SERVERLIBS) | |
308 | ||
309 | dnl See if we have POSIX ACL support... | |
310 | SAVELIBS="$LIBS" | |
311 | LIBS="" | |
312 | AC_ARG_ENABLE(acl, [ --enable-acl build with POSIX ACL support]) | |
313 | if test "x$enable_acl" != xno; then | |
314 | AC_SEARCH_LIBS(acl_init, acl, AC_DEFINE(HAVE_ACL_INIT)) | |
315 | SERVERLIBS="$SERVERLIBS $LIBS" | |
316 | fi | |
317 | LIBS="$SAVELIBS" | |
318 | ||
319 | dnl Check for DBUS support | |
320 | AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support]) | |
321 | AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory ], | |
322 | DBUSDIR="$withval") | |
323 | ||
324 | DBUSDIR="" | |
325 | DBUS_NOTIFIER="" | |
326 | DBUS_NOTIFIERLIBS="" | |
327 | ||
328 | if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$uname" != xDarwin; then | |
329 | AC_MSG_CHECKING(for DBUS) | |
330 | if $PKGCONFIG --exists dbus-1; then | |
331 | AC_MSG_RESULT(yes) | |
332 | AC_DEFINE(HAVE_DBUS) | |
333 | CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE" | |
334 | SERVERLIBS="$SERVERLIBS `$PKGCONFIG --libs dbus-1`" | |
335 | DBUS_NOTIFIER="dbus" | |
336 | DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs dbus-1`" | |
337 | SAVELIBS="$LIBS" | |
338 | LIBS="$LIBS $DBUS_NOTIFIERLIBS" | |
339 | AC_CHECK_FUNC(dbus_message_iter_init_append, | |
340 | AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND)) | |
341 | AC_CHECK_FUNC(dbus_threads_init, | |
342 | AC_DEFINE(HAVE_DBUS_THREADS_INIT)) | |
343 | LIBS="$SAVELIBS" | |
344 | if test -d /etc/dbus-1; then | |
345 | DBUSDIR="/etc/dbus-1" | |
346 | fi | |
347 | else | |
348 | AC_MSG_RESULT(no) | |
349 | fi | |
350 | fi | |
351 | ||
352 | AC_SUBST(DBUSDIR) | |
353 | AC_SUBST(DBUS_NOTIFIER) | |
354 | AC_SUBST(DBUS_NOTIFIERLIBS) | |
355 | ||
356 | dnl Extra platform-specific libraries... | |
357 | CUPS_DEFAULT_PRINTOPERATOR_AUTH="@SYSTEM" | |
358 | CUPS_DEFAULT_SYSTEM_AUTHKEY="" | |
359 | CUPS_SYSTEM_AUTHKEY="" | |
360 | INSTALLXPC="" | |
361 | ||
362 | case $uname in | |
363 | Darwin*) | |
364 | BACKLIBS="$BACKLIBS -framework IOKit" | |
365 | SERVERLIBS="$SERVERLIBS -framework IOKit -weak_framework ApplicationServices" | |
366 | LIBS="-framework SystemConfiguration -framework CoreFoundation -framework Security $LIBS" | |
367 | ||
368 | dnl Check for framework headers... | |
369 | AC_CHECK_HEADER(ApplicationServices/ApplicationServices.h,AC_DEFINE(HAVE_APPLICATIONSERVICES_H)) | |
370 | AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h,AC_DEFINE(HAVE_COREFOUNDATION_H)) | |
371 | AC_CHECK_HEADER(CoreFoundation/CFPriv.h,AC_DEFINE(HAVE_CFPRIV_H)) | |
372 | AC_CHECK_HEADER(CoreFoundation/CFBundlePriv.h,AC_DEFINE(HAVE_CFBUNDLEPRIV_H)) | |
373 | ||
374 | dnl Check for dynamic store function... | |
375 | AC_CHECK_FUNCS(SCDynamicStoreCopyComputerName) | |
376 | ||
377 | dnl Check for the new membership functions in MacOSX 10.4... | |
378 | AC_CHECK_HEADER(membership.h,AC_DEFINE(HAVE_MEMBERSHIP_H)) | |
379 | AC_CHECK_HEADER(membershipPriv.h,AC_DEFINE(HAVE_MEMBERSHIPPRIV_H)) | |
380 | AC_CHECK_FUNCS(mbr_uid_to_uuid) | |
381 | ||
382 | dnl Need <dlfcn.h> header... | |
383 | AC_CHECK_HEADER(dlfcn.h,AC_DEFINE(HAVE_DLFCN_H)) | |
384 | ||
385 | dnl Check for notify_post support | |
386 | AC_CHECK_HEADER(notify.h,AC_DEFINE(HAVE_NOTIFY_H)) | |
387 | AC_CHECK_FUNCS(notify_post) | |
388 | ||
389 | dnl Check for Authorization Services support | |
390 | AC_ARG_WITH(adminkey, [ --with-adminkey set the default SystemAuthKey value], | |
391 | default_adminkey="$withval", | |
392 | default_adminkey="default") | |
393 | AC_ARG_WITH(operkey, [ --with-operkey set the default operator @AUTHKEY value], | |
394 | default_operkey="$withval", | |
395 | default_operkey="default") | |
396 | ||
397 | AC_CHECK_HEADER(Security/Authorization.h, [ | |
398 | AC_DEFINE(HAVE_AUTHORIZATION_H) | |
399 | ||
400 | if test "x$default_adminkey" != xdefault; then | |
401 | CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey $default_adminkey" | |
402 | CUPS_DEFAULT_SYSTEM_AUTHKEY="$default_adminkey" | |
403 | elif grep -q system.print.operator /etc/authorization; then | |
404 | CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin" | |
405 | CUPS_DEFAULT_SYSTEM_AUTHKEY="system.print.admin" | |
406 | else | |
407 | CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences" | |
408 | CUPS_DEFAULT_SYSTEM_AUTHKEY="system.preferences" | |
409 | fi | |
410 | ||
411 | if test "x$default_operkey" != xdefault; then | |
412 | CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY($default_operkey) @admin @lpadmin" | |
413 | elif grep -q system.print.operator /etc/authorization; then | |
414 | CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin" | |
415 | else | |
416 | CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.admin) @admin @lpadmin" | |
417 | fi]) | |
418 | AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H)) | |
419 | ||
420 | dnl Check for sandbox/Seatbelt support | |
421 | if test $uversion -ge 100; then | |
422 | AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H)) | |
423 | fi | |
424 | if test $uversion -ge 110 -a $uversion -lt 120; then | |
425 | # Broken public headers in 10.7.x... | |
426 | AC_MSG_CHECKING(for sandbox/private.h presence) | |
427 | if test -f /usr/local/include/sandbox/private.h; then | |
428 | AC_MSG_RESULT(yes) | |
429 | else | |
430 | AC_MSG_RESULT(no) | |
431 | AC_MSG_ERROR(Run 'sudo mkdir -p /usr/local/include/sandbox' and 'sudo touch /usr/local/include/sandbox/private.h' to build CUPS.) | |
432 | fi | |
433 | fi | |
434 | ||
435 | dnl Check for XPC support | |
436 | AC_CHECK_HEADER(xpc/xpc.h, | |
437 | AC_DEFINE(HAVE_XPC) | |
438 | INSTALLXPC="install-xpc") | |
439 | AC_CHECK_HEADER(xpc/private.h, | |
440 | AC_DEFINE(HAVE_XPC_PRIVATE_H)) | |
441 | ;; | |
442 | esac | |
443 | ||
444 | AC_SUBST(CUPS_DEFAULT_PRINTOPERATOR_AUTH) | |
445 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTOPERATOR_AUTH, "$CUPS_DEFAULT_PRINTOPERATOR_AUTH") | |
446 | AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_AUTHKEY, "$CUPS_DEFAULT_SYSTEM_AUTHKEY") | |
447 | AC_SUBST(CUPS_SYSTEM_AUTHKEY) | |
448 | AC_SUBST(INSTALLXPC) | |
449 | ||
450 | dnl Check for build components | |
451 | COMPONENTS="all" | |
452 | ||
453 | AC_ARG_WITH(components, [ --with-components set components to build: | |
454 | - "all" (default) builds everything | |
455 | - "core" builds libcups and ipptool], | |
456 | COMPONENTS="$withval") | |
457 | ||
458 | case "$COMPONENTS" in | |
459 | all) | |
460 | BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates" | |
461 | ;; | |
462 | ||
463 | core) | |
464 | BUILDDIRS="data locale" | |
465 | ;; | |
466 | ||
467 | *) | |
468 | AC_MSG_ERROR([Bad build component "$COMPONENT" specified!]) | |
469 | ;; | |
470 | esac | |
471 | ||
472 | AC_SUBST(BUILDDIRS) |