]> git.ipfire.org Git - thirdparty/cups.git/blame - configure
Clean up some build issues on certain platforms.
[thirdparty/cups.git] / configure
CommitLineData
d9f356c5
MS
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3c2cb822 3# Generated by GNU Autoconf 2.69 for CUPS 2.3b7.
d9f356c5 4#
24343173 5# Report bugs to <https://github.com/apple/cups/issues>.
d9f356c5
MS
6#
7#
3c2cb822 8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
d9f356c5
MS
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
102IFS=$as_save_IFS
103
104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
3c2cb822
MS
137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
d9f356c5
MS
162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
3c2cb822
MS
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
d9f356c5
MS
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
3c2cb822
MS
241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
d9f356c5
MS
260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
24343173 270$0: https://github.com/apple/cups/issues about your system,
d9f356c5
MS
271$0: including any error possibly output before this
272$0: message. Then install a modern shell, or manually run
273$0: the script under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
3c2cb822
MS
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
d9f356c5
MS
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417 fi
418 $as_echo "$as_me: error: $2" >&2
419 as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
477 sed '
478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
482 N
483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485 t loop
486 s/-\n.*//
487 ' >$as_me.lineno &&
488 chmod +x "$as_me.lineno" ||
489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
3c2cb822
MS
491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
d9f356c5
MS
495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
499 # Exit status is that of the last command.
500 exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506 case `echo 'xy\c'` in
507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
511 esac;;
512*)
513 ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
521 mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
3c2cb822 529 # In both cases, we have to default to `cp -pR'.
d9f356c5 530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
3c2cb822 531 as_ln_s='cp -pR'
d9f356c5
MS
532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
3c2cb822 535 as_ln_s='cp -pR'
d9f356c5
MS
536 fi
537else
3c2cb822 538 as_ln_s='cp -pR'
d9f356c5
MS
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544 as_mkdir_p='mkdir -p "$as_dir"'
545else
546 test -d ./-p && rmdir ./-p
547 as_mkdir_p=false
548fi
549
3c2cb822
MS
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
d9f356c5
MS
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='CUPS'
582PACKAGE_TARNAME='cups'
8a763079
MS
583PACKAGE_VERSION='2.3b7'
584PACKAGE_STRING='CUPS 2.3b7'
24343173 585PACKAGE_BUGREPORT='https://github.com/apple/cups/issues'
d9f356c5
MS
586PACKAGE_URL='https://www.cups.org/'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602# include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607# include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_default_prefix=/
625ac_subst_vars='LTLIBOBJS
626LIBOBJS
627UNINSTALL_LANGUAGES
628INSTALL_LANGUAGES
d9f356c5
MS
629CUPS_WEBIF
630DEFAULT_IPP_PORT
631CUPS_SNMP_COMMUNITY
632CUPS_SNMP_ADDRESS
633DEFAULT_RAW_PRINTING
634CUPS_MAX_COPIES
635CUPS_DEFAULT_SMB_CONFIG_FILE
636CUPS_DEFAULT_LPD_CONFIG_FILE
637CUPS_DEFAULT_PRINTCAP
638CUPS_PRIMARY_SYSTEM_GROUP
639CUPS_SYSTEM_GROUPS
640CUPS_GROUP
641CUPS_USER
642CUPS_DEFAULT_SHARED
643CUPS_BROWSE_LOCAL_PROTOCOLS
644CUPS_BROWSING
645CUPS_PAGE_LOG_FORMAT
646CUPS_ACCESS_LOG_LEVEL
647CUPS_LOG_LEVEL
648CUPS_FATAL_ERRORS
649CUPS_LOG_FILE_PERM
650CUPS_CUPSD_FILE_PERM
651CUPS_CONFIG_FILE_PERM
d4a895f8 652CUPS_EXE_FILE_PERM
e4b72d7e 653CUPS_RESOURCEDIR
d9f356c5
MS
654CUPS_BUNDLEDIR
655LANGUAGES
656XINETD
657RCSTOP
658RCSTART
659RCLEVELS
660INITDDIR
661INITDIR
662SMFMANIFESTDIR
663SYSTEMD_DIR
664LAUNCHD_DIR
665ONDEMANDLIBS
666ONDEMANDFLAGS
667IPPFIND_MAN
668IPPFIND_BIN
669DNSSD_BACKEND
670DNSSDLIBS
671LARGEFILE
672PAMMODAUTH
673PAMMOD
674PAMLIBS
675PAMFILE
676PAMDIR
677EXPORT_SSLLIBS
678SSLLIBS
679SSLFLAGS
680IPPALIASES
681CUPS_SERVERKEYCHAIN
d9f356c5
MS
682LIBGNUTLSCONFIG
683PTHREAD_FLAGS
684CUPS_DEFAULT_GSSSERVICENAME
685KRB5CONFIG
686LIBGSSAPI
687CUPS_LISTEN_DOMAINSOCKET
688CUPS_DEFAULT_DOMAINSOCKET
f518bf7e 689WARNING_OPTIONS
d9f356c5
MS
690RELROFLAGS
691PIEFLAGS
692CXXLIBS
693LDARCHFLAGS
694ARCHFLAGS
695UNITTESTS
696OPTIM
697INSTALL_STRIP
b94f7488
MS
698LIBTOOL_INSTALL
699LIBTOOL_CXX
700LIBTOOL_CC
d9f356c5 701LIBTOOL
07cb7247
MS
702LD_CXX
703LD_CC
d9f356c5
MS
704EXPORT_LDFLAGS
705IMGLIBS
706DSOLIBS
707LINKCUPSIMAGE
708LINKCUPS
709EXTLINKCUPSIMAGE
710EXTLINKCUPS
711LIBCUPSSTATIC
d9f356c5 712LIBCUPSIMAGE
d9f356c5
MS
713LIBCUPSBASE
714LIBCUPS
715DSOFLAGS
716DSOXX
717DSO
718MAN8DIR
719MAN8EXT
720MAN7EXT
721MAN5EXT
722MAN1EXT
723PMANDIR
724AMANDIR
725CUPS_STATEDIR
726CUPS_SERVERROOT
727INSTALL_SYSV
728CUPS_SERVERBIN
729CUPS_REQUESTS
730CUPS_LOGDIR
731CUPS_LOCALEDIR
732CUPS_FONTPATH
733CUPS_DOCROOT
734MENUDIR
735ICONDIR
736CUPS_DATADIR
737CUPS_CACHEDIR
738PRIVATEINCLUDE
739privateinclude
ffbf1e61
MS
740LIBHEADERSPRIV
741LIBHEADERS
58b64dbb 742LIBCUPSOBJS
d9f356c5
MS
743BUILDDIRS
744INSTALLXPC
745CUPS_SYSTEM_AUTHKEY
746CUPS_DEFAULT_PRINTOPERATOR_AUTH
747DBUS_NOTIFIERLIBS
748DBUS_NOTIFIER
749DBUSDIR
750SERVERLIBS
751BACKLIBS
752ARFLAGS
753LIBZ
754INSTALL_GZIP
755LIBWRAP
756USBQUIRKS
757LIBUSB
d9f356c5
MS
758EGREP
759GREP
760LIBPAPER
761LIBMALLOC
762PKGCONFIG
763INSTALLSTATIC
764INSTALL
765CUPS_HTMLVIEW
766XDGOPEN
767SED
768RMDIR
769RM
770MV
9964a31a 771MKDIR
d9f356c5
MS
772LN
773LD
774GZIP
775CHMOD
776AR
777RANLIB
778ac_ct_CXX
779CXXFLAGS
780CXX
48cc3892 781CPP
d9f356c5
MS
782OBJEXT
783EXEEXT
784ac_ct_CC
785CPPFLAGS
786LDFLAGS
787CFLAGS
788CC
789AWK
790CUPS_BUILD
791CUPS_REVISION
792CUPS_VERSION
137fa9a8 793CODE_SIGN
105922ec
MS
794LOCALTARGET
795host_os
796host_vendor
797host_cpu
798host
799build_os
800build_vendor
801build_cpu
802build
d9f356c5
MS
803target_alias
804host_alias
805build_alias
806LIBS
807ECHO_T
808ECHO_N
809ECHO_C
810DEFS
811mandir
812localedir
813libdir
814psdir
815pdfdir
816dvidir
817htmldir
818infodir
819docdir
820oldincludedir
821includedir
822localstatedir
823sharedstatedir
824sysconfdir
825datadir
826datarootdir
827libexecdir
828sbindir
829bindir
830program_transform_name
831prefix
832exec_prefix
833PACKAGE_URL
834PACKAGE_BUGREPORT
835PACKAGE_STRING
836PACKAGE_VERSION
837PACKAGE_TARNAME
838PACKAGE_NAME
839PATH_SEPARATOR
840SHELL'
841ac_subst_files=''
842ac_user_opts='
843enable_option_checking
844with_cups_build
845enable_static
846enable_mallinfo
847enable_libpaper
848enable_libusb
849enable_tcp_wrappers
850enable_acl
851enable_dbus
852with_dbusdir
853with_adminkey
854with_operkey
855with_components
856with_privateinclude
857with_lpdconfig
858with_smbconfig
859with_cachedir
860with_icondir
861with_menudir
862with_docdir
863with_fontpath
864with_logdir
865with_rundir
866enable_shared
867enable_libtool_unsupported
868with_optim
869enable_debug
870enable_debug_guards
871enable_debug_printfs
872enable_unit_tests
873with_archflags
874with_ldarchflags
875enable_relro
f518bf7e 876enable_sanitizer
d9f356c5
MS
877with_domainsocket
878enable_gssapi
879with_gssservicename
880enable_threads
881enable_ssl
882enable_cdsassl
883enable_gnutls
884enable_pam
885with_pam_module
886enable_largefile
887enable_avahi
888enable_dnssd
889with_dnssd_libs
890with_dnssd_includes
891enable_launchd
892enable_systemd
893with_systemd
441de8b2 894enable_upstart
d9f356c5
MS
895with_smfmanifestdir
896with_rcdir
897with_rclevels
898with_rcstart
899with_rcstop
900with_xinetd
901with_languages
902with_bundledir
171c38f2 903with_bundlelang
d4a895f8 904with_exe_file_perm
d9f356c5
MS
905with_config_file_perm
906with_cupsd_file_perm
907with_log_file_perm
908with_fatal_errors
909with_log_level
910with_access_log_level
911enable_page_logging
912enable_browsing
913with_local_protocols
914enable_default_shared
915with_cups_user
916with_cups_group
917with_system_groups
918with_printcap
919with_lpdconfigfile
920with_smbconfigfile
921with_max_copies
922enable_raw_printing
923with_snmp_address
924with_snmp_community
925with_ipp_port
926enable_webif
d9f356c5
MS
927'
928 ac_precious_vars='build_alias
929host_alias
930target_alias
931CC
932CFLAGS
933LDFLAGS
934LIBS
935CPPFLAGS
48cc3892 936CPP
d9f356c5
MS
937CXX
938CXXFLAGS
48cc3892 939CCC'
d9f356c5
MS
940
941
942# Initialize some variables set by options.
943ac_init_help=
944ac_init_version=false
945ac_unrecognized_opts=
946ac_unrecognized_sep=
947# The variables have the same names as the options, with
948# dashes changed to underlines.
949cache_file=/dev/null
950exec_prefix=NONE
951no_create=
952no_recursion=
953prefix=NONE
954program_prefix=NONE
955program_suffix=NONE
956program_transform_name=s,x,x,
957silent=
958site=
959srcdir=
960verbose=
961x_includes=NONE
962x_libraries=NONE
963
964# Installation directory options.
965# These are left unexpanded so users can "make install exec_prefix=/foo"
966# and all the variables that are supposed to be based on exec_prefix
967# by default will actually change.
968# Use braces instead of parens because sh, perl, etc. also accept them.
969# (The list follows the same order as the GNU Coding Standards.)
970bindir='${exec_prefix}/bin'
971sbindir='${exec_prefix}/sbin'
972libexecdir='${exec_prefix}/libexec'
973datarootdir='${prefix}/share'
974datadir='${datarootdir}'
975sysconfdir='${prefix}/etc'
976sharedstatedir='${prefix}/com'
977localstatedir='${prefix}/var'
978includedir='${prefix}/include'
979oldincludedir='/usr/include'
980docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
981infodir='${datarootdir}/info'
982htmldir='${docdir}'
983dvidir='${docdir}'
984pdfdir='${docdir}'
985psdir='${docdir}'
986libdir='${exec_prefix}/lib'
987localedir='${datarootdir}/locale'
988mandir='${datarootdir}/man'
989
990ac_prev=
991ac_dashdash=
992for ac_option
993do
994 # If the previous option needs an argument, assign it.
995 if test -n "$ac_prev"; then
996 eval $ac_prev=\$ac_option
997 ac_prev=
998 continue
999 fi
1000
1001 case $ac_option in
1002 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1003 *=) ac_optarg= ;;
1004 *) ac_optarg=yes ;;
1005 esac
1006
1007 # Accept the important Cygnus configure options, so we can diagnose typos.
1008
1009 case $ac_dashdash$ac_option in
1010 --)
1011 ac_dashdash=yes ;;
1012
1013 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1014 ac_prev=bindir ;;
1015 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1016 bindir=$ac_optarg ;;
1017
1018 -build | --build | --buil | --bui | --bu)
1019 ac_prev=build_alias ;;
1020 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1021 build_alias=$ac_optarg ;;
1022
1023 -cache-file | --cache-file | --cache-fil | --cache-fi \
1024 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1025 ac_prev=cache_file ;;
1026 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1027 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1028 cache_file=$ac_optarg ;;
1029
1030 --config-cache | -C)
1031 cache_file=config.cache ;;
1032
1033 -datadir | --datadir | --datadi | --datad)
1034 ac_prev=datadir ;;
1035 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1036 datadir=$ac_optarg ;;
1037
1038 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1039 | --dataroo | --dataro | --datar)
1040 ac_prev=datarootdir ;;
1041 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1042 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1043 datarootdir=$ac_optarg ;;
1044
1045 -disable-* | --disable-*)
1046 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1047 # Reject names that are not valid shell variable names.
1048 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1049 as_fn_error $? "invalid feature name: $ac_useropt"
1050 ac_useropt_orig=$ac_useropt
1051 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1052 case $ac_user_opts in
1053 *"
1054"enable_$ac_useropt"
1055"*) ;;
1056 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1057 ac_unrecognized_sep=', ';;
1058 esac
1059 eval enable_$ac_useropt=no ;;
1060
1061 -docdir | --docdir | --docdi | --doc | --do)
1062 ac_prev=docdir ;;
1063 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1064 docdir=$ac_optarg ;;
1065
1066 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1067 ac_prev=dvidir ;;
1068 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1069 dvidir=$ac_optarg ;;
1070
1071 -enable-* | --enable-*)
1072 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1073 # Reject names that are not valid shell variable names.
1074 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1075 as_fn_error $? "invalid feature name: $ac_useropt"
1076 ac_useropt_orig=$ac_useropt
1077 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1078 case $ac_user_opts in
1079 *"
1080"enable_$ac_useropt"
1081"*) ;;
1082 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1083 ac_unrecognized_sep=', ';;
1084 esac
1085 eval enable_$ac_useropt=\$ac_optarg ;;
1086
1087 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1088 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1089 | --exec | --exe | --ex)
1090 ac_prev=exec_prefix ;;
1091 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1092 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1093 | --exec=* | --exe=* | --ex=*)
1094 exec_prefix=$ac_optarg ;;
1095
1096 -gas | --gas | --ga | --g)
1097 # Obsolete; use --with-gas.
1098 with_gas=yes ;;
1099
1100 -help | --help | --hel | --he | -h)
1101 ac_init_help=long ;;
1102 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1103 ac_init_help=recursive ;;
1104 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1105 ac_init_help=short ;;
1106
1107 -host | --host | --hos | --ho)
1108 ac_prev=host_alias ;;
1109 -host=* | --host=* | --hos=* | --ho=*)
1110 host_alias=$ac_optarg ;;
1111
1112 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1113 ac_prev=htmldir ;;
1114 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1115 | --ht=*)
1116 htmldir=$ac_optarg ;;
1117
1118 -includedir | --includedir | --includedi | --included | --include \
1119 | --includ | --inclu | --incl | --inc)
1120 ac_prev=includedir ;;
1121 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1122 | --includ=* | --inclu=* | --incl=* | --inc=*)
1123 includedir=$ac_optarg ;;
1124
1125 -infodir | --infodir | --infodi | --infod | --info | --inf)
1126 ac_prev=infodir ;;
1127 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1128 infodir=$ac_optarg ;;
1129
1130 -libdir | --libdir | --libdi | --libd)
1131 ac_prev=libdir ;;
1132 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1133 libdir=$ac_optarg ;;
1134
1135 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1136 | --libexe | --libex | --libe)
1137 ac_prev=libexecdir ;;
1138 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1139 | --libexe=* | --libex=* | --libe=*)
1140 libexecdir=$ac_optarg ;;
1141
1142 -localedir | --localedir | --localedi | --localed | --locale)
1143 ac_prev=localedir ;;
1144 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1145 localedir=$ac_optarg ;;
1146
1147 -localstatedir | --localstatedir | --localstatedi | --localstated \
1148 | --localstate | --localstat | --localsta | --localst | --locals)
1149 ac_prev=localstatedir ;;
1150 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1151 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1152 localstatedir=$ac_optarg ;;
1153
1154 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1155 ac_prev=mandir ;;
1156 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1157 mandir=$ac_optarg ;;
1158
1159 -nfp | --nfp | --nf)
1160 # Obsolete; use --without-fp.
1161 with_fp=no ;;
1162
1163 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1164 | --no-cr | --no-c | -n)
1165 no_create=yes ;;
1166
1167 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1168 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1169 no_recursion=yes ;;
1170
1171 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1172 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1173 | --oldin | --oldi | --old | --ol | --o)
1174 ac_prev=oldincludedir ;;
1175 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1176 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1177 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1178 oldincludedir=$ac_optarg ;;
1179
1180 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1181 ac_prev=prefix ;;
1182 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1183 prefix=$ac_optarg ;;
1184
1185 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1186 | --program-pre | --program-pr | --program-p)
1187 ac_prev=program_prefix ;;
1188 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1189 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1190 program_prefix=$ac_optarg ;;
1191
1192 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1193 | --program-suf | --program-su | --program-s)
1194 ac_prev=program_suffix ;;
1195 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1196 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1197 program_suffix=$ac_optarg ;;
1198
1199 -program-transform-name | --program-transform-name \
1200 | --program-transform-nam | --program-transform-na \
1201 | --program-transform-n | --program-transform- \
1202 | --program-transform | --program-transfor \
1203 | --program-transfo | --program-transf \
1204 | --program-trans | --program-tran \
1205 | --progr-tra | --program-tr | --program-t)
1206 ac_prev=program_transform_name ;;
1207 -program-transform-name=* | --program-transform-name=* \
1208 | --program-transform-nam=* | --program-transform-na=* \
1209 | --program-transform-n=* | --program-transform-=* \
1210 | --program-transform=* | --program-transfor=* \
1211 | --program-transfo=* | --program-transf=* \
1212 | --program-trans=* | --program-tran=* \
1213 | --progr-tra=* | --program-tr=* | --program-t=*)
1214 program_transform_name=$ac_optarg ;;
1215
1216 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1217 ac_prev=pdfdir ;;
1218 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1219 pdfdir=$ac_optarg ;;
1220
1221 -psdir | --psdir | --psdi | --psd | --ps)
1222 ac_prev=psdir ;;
1223 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1224 psdir=$ac_optarg ;;
1225
1226 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1227 | -silent | --silent | --silen | --sile | --sil)
1228 silent=yes ;;
1229
1230 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1231 ac_prev=sbindir ;;
1232 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1233 | --sbi=* | --sb=*)
1234 sbindir=$ac_optarg ;;
1235
1236 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1237 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1238 | --sharedst | --shareds | --shared | --share | --shar \
1239 | --sha | --sh)
1240 ac_prev=sharedstatedir ;;
1241 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1242 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1243 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1244 | --sha=* | --sh=*)
1245 sharedstatedir=$ac_optarg ;;
1246
1247 -site | --site | --sit)
1248 ac_prev=site ;;
1249 -site=* | --site=* | --sit=*)
1250 site=$ac_optarg ;;
1251
1252 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1253 ac_prev=srcdir ;;
1254 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1255 srcdir=$ac_optarg ;;
1256
1257 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1258 | --syscon | --sysco | --sysc | --sys | --sy)
1259 ac_prev=sysconfdir ;;
1260 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1261 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1262 sysconfdir=$ac_optarg ;;
1263
1264 -target | --target | --targe | --targ | --tar | --ta | --t)
1265 ac_prev=target_alias ;;
1266 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1267 target_alias=$ac_optarg ;;
1268
1269 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1270 verbose=yes ;;
1271
1272 -version | --version | --versio | --versi | --vers | -V)
1273 ac_init_version=: ;;
1274
1275 -with-* | --with-*)
1276 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1277 # Reject names that are not valid shell variable names.
1278 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1279 as_fn_error $? "invalid package name: $ac_useropt"
1280 ac_useropt_orig=$ac_useropt
1281 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1282 case $ac_user_opts in
1283 *"
1284"with_$ac_useropt"
1285"*) ;;
1286 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1287 ac_unrecognized_sep=', ';;
1288 esac
1289 eval with_$ac_useropt=\$ac_optarg ;;
1290
1291 -without-* | --without-*)
1292 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1293 # Reject names that are not valid shell variable names.
1294 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1295 as_fn_error $? "invalid package name: $ac_useropt"
1296 ac_useropt_orig=$ac_useropt
1297 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1298 case $ac_user_opts in
1299 *"
1300"with_$ac_useropt"
1301"*) ;;
1302 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1303 ac_unrecognized_sep=', ';;
1304 esac
1305 eval with_$ac_useropt=no ;;
1306
1307 --x)
1308 # Obsolete; use --with-x.
1309 with_x=yes ;;
1310
1311 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1312 | --x-incl | --x-inc | --x-in | --x-i)
1313 ac_prev=x_includes ;;
1314 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1315 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1316 x_includes=$ac_optarg ;;
1317
1318 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1319 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1320 ac_prev=x_libraries ;;
1321 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1322 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1323 x_libraries=$ac_optarg ;;
1324
1325 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1326Try \`$0 --help' for more information"
1327 ;;
1328
1329 *=*)
1330 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1331 # Reject names that are not valid shell variable names.
1332 case $ac_envvar in #(
1333 '' | [0-9]* | *[!_$as_cr_alnum]* )
1334 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1335 esac
1336 eval $ac_envvar=\$ac_optarg
1337 export $ac_envvar ;;
1338
1339 *)
1340 # FIXME: should be removed in autoconf 3.0.
1341 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1342 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1343 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1344 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1345 ;;
1346
1347 esac
1348done
1349
1350if test -n "$ac_prev"; then
1351 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1352 as_fn_error $? "missing argument to $ac_option"
1353fi
1354
1355if test -n "$ac_unrecognized_opts"; then
1356 case $enable_option_checking in
1357 no) ;;
1358 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1359 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1360 esac
1361fi
1362
1363# Check all directory arguments for consistency.
1364for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1365 datadir sysconfdir sharedstatedir localstatedir includedir \
1366 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1367 libdir localedir mandir
1368do
1369 eval ac_val=\$$ac_var
1370 # Remove trailing slashes.
1371 case $ac_val in
1372 */ )
1373 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1374 eval $ac_var=\$ac_val;;
1375 esac
1376 # Be sure to have absolute directory names.
1377 case $ac_val in
1378 [\\/$]* | ?:[\\/]* ) continue;;
1379 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1380 esac
1381 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1382done
1383
1384# There might be people who depend on the old broken behavior: `$host'
1385# used to hold the argument of --host etc.
1386# FIXME: To remove some day.
1387build=$build_alias
1388host=$host_alias
1389target=$target_alias
1390
1391# FIXME: To remove some day.
1392if test "x$host_alias" != x; then
1393 if test "x$build_alias" = x; then
1394 cross_compiling=maybe
d9f356c5
MS
1395 elif test "x$build_alias" != "x$host_alias"; then
1396 cross_compiling=yes
1397 fi
1398fi
1399
1400ac_tool_prefix=
1401test -n "$host_alias" && ac_tool_prefix=$host_alias-
1402
1403test "$silent" = yes && exec 6>/dev/null
1404
1405
1406ac_pwd=`pwd` && test -n "$ac_pwd" &&
1407ac_ls_di=`ls -di .` &&
1408ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1409 as_fn_error $? "working directory cannot be determined"
1410test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1411 as_fn_error $? "pwd does not report name of working directory"
1412
1413
1414# Find the source files, if location was not specified.
1415if test -z "$srcdir"; then
1416 ac_srcdir_defaulted=yes
1417 # Try the directory containing this script, then the parent directory.
1418 ac_confdir=`$as_dirname -- "$as_myself" ||
1419$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1420 X"$as_myself" : 'X\(//\)[^/]' \| \
1421 X"$as_myself" : 'X\(//\)$' \| \
1422 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1423$as_echo X"$as_myself" |
1424 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1425 s//\1/
1426 q
1427 }
1428 /^X\(\/\/\)[^/].*/{
1429 s//\1/
1430 q
1431 }
1432 /^X\(\/\/\)$/{
1433 s//\1/
1434 q
1435 }
1436 /^X\(\/\).*/{
1437 s//\1/
1438 q
1439 }
1440 s/.*/./; q'`
1441 srcdir=$ac_confdir
1442 if test ! -r "$srcdir/$ac_unique_file"; then
1443 srcdir=..
1444 fi
1445else
1446 ac_srcdir_defaulted=no
1447fi
1448if test ! -r "$srcdir/$ac_unique_file"; then
1449 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1450 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1451fi
1452ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1453ac_abs_confdir=`(
1454 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1455 pwd)`
1456# When building in place, set srcdir=.
1457if test "$ac_abs_confdir" = "$ac_pwd"; then
1458 srcdir=.
1459fi
1460# Remove unnecessary trailing slashes from srcdir.
1461# Double slashes in file names in object file debugging info
1462# mess up M-x gdb in Emacs.
1463case $srcdir in
1464*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1465esac
1466for ac_var in $ac_precious_vars; do
1467 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1468 eval ac_env_${ac_var}_value=\$${ac_var}
1469 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1470 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1471done
1472
1473#
1474# Report the --help message.
1475#
1476if test "$ac_init_help" = "long"; then
1477 # Omit some internal or obsolete options to make the list less imposing.
1478 # This message is too long to be a string in the A/UX 3.1 sh.
1479 cat <<_ACEOF
8a763079 1480\`configure' configures CUPS 2.3b7 to adapt to many kinds of systems.
d9f356c5
MS
1481
1482Usage: $0 [OPTION]... [VAR=VALUE]...
1483
1484To assign environment variables (e.g., CC, CFLAGS...), specify them as
1485VAR=VALUE. See below for descriptions of some of the useful variables.
1486
1487Defaults for the options are specified in brackets.
1488
1489Configuration:
1490 -h, --help display this help and exit
1491 --help=short display options specific to this package
1492 --help=recursive display the short help of all the included packages
1493 -V, --version display version information and exit
1494 -q, --quiet, --silent do not print \`checking ...' messages
1495 --cache-file=FILE cache test results in FILE [disabled]
1496 -C, --config-cache alias for \`--cache-file=config.cache'
1497 -n, --no-create do not create output files
1498 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1499
1500Installation directories:
1501 --prefix=PREFIX install architecture-independent files in PREFIX
1502 [$ac_default_prefix]
1503 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1504 [PREFIX]
1505
1506By default, \`make install' will install all the files in
1507\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1508an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1509for instance \`--prefix=\$HOME'.
1510
1511For better control, use the options below.
1512
1513Fine tuning of the installation directories:
1514 --bindir=DIR user executables [EPREFIX/bin]
1515 --sbindir=DIR system admin executables [EPREFIX/sbin]
1516 --libexecdir=DIR program executables [EPREFIX/libexec]
1517 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1518 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1519 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1520 --libdir=DIR object code libraries [EPREFIX/lib]
1521 --includedir=DIR C header files [PREFIX/include]
1522 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1523 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1524 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1525 --infodir=DIR info documentation [DATAROOTDIR/info]
1526 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1527 --mandir=DIR man documentation [DATAROOTDIR/man]
1528 --docdir=DIR documentation root [DATAROOTDIR/doc/cups]
1529 --htmldir=DIR html documentation [DOCDIR]
1530 --dvidir=DIR dvi documentation [DOCDIR]
1531 --pdfdir=DIR pdf documentation [DOCDIR]
1532 --psdir=DIR ps documentation [DOCDIR]
1533_ACEOF
1534
1535 cat <<\_ACEOF
105922ec
MS
1536
1537System types:
1538 --build=BUILD configure for building on BUILD [guessed]
1539 --host=HOST cross-compile to build programs to run on HOST [BUILD]
d9f356c5
MS
1540_ACEOF
1541fi
1542
1543if test -n "$ac_init_help"; then
1544 case $ac_init_help in
8a763079 1545 short | recursive ) echo "Configuration of CUPS 2.3b7:";;
d9f356c5
MS
1546 esac
1547 cat <<\_ACEOF
1548
1549Optional Features:
1550 --disable-option-checking ignore unrecognized --enable/--with options
1551 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1552 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1553 --enable-static install static libraries
1554 --enable-mallinfo build with malloc debug logging
1555 --enable-libpaper build with libpaper support
1556 --enable-libusb use libusb for USB printing
1557 --enable-tcp-wrappers use libwrap for TCP wrappers support
1558 --enable-acl build with POSIX ACL support
6eda776e 1559 --disable-dbus build without DBUS support
d9f356c5 1560 --disable-shared do not create shared libraries
a621d151 1561 --enable-libtool-unsupported=/path/to/libtool
d9f356c5
MS
1562 build with libtool (UNSUPPORTED!)
1563 --enable-debug build with debugging symbols
1564 --enable-debug-guards build with memory allocation guards
1565 --enable-debug-printfs build with CUPS_DEBUG_LOG support
1566 --enable-unit-tests build and run unit tests
1567 --enable-relro build with the GCC relro option
f518bf7e 1568 --enable-sanitizer build with AddressSanitizer
d9f356c5
MS
1569 --disable-gssapi disable GSSAPI support
1570 --disable-threads disable multi-threading support
1571 --disable-ssl disable SSL/TLS support
1572 --enable-cdsassl use CDSA for SSL/TLS support, default=first
1573 --enable-gnutls use GNU TLS for SSL/TLS support, default=second
1574 --disable-pam disable PAM support
1575 --disable-largefile omit support for large files
1576 --disable-avahi disable DNS Service Discovery support using Avahi
1577 --disable-dnssd disable DNS Service Discovery support using mDNSResponder
1578 --disable-launchd disable launchd support
1579 --disable-systemd disable systemd support
6eda776e 1580 --enable-upstart enable upstart support
d9f356c5
MS
1581 --enable-page-logging enable page_log by default
1582 --disable-browsing disable Browsing by default
1583 --disable-default-shared
1584 disable DefaultShared by default
1585 --disable-raw-printing do not allow raw printing by default
8072030b 1586 --enable-webif enable the web interface by default, default=no for macOS
d9f356c5
MS
1587
1588Optional Packages:
1589 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1590 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1591 --with-cups-build set "cups-config --build" string
1592 --with-dbusdir set DBUS configuration directory
1593 --with-adminkey set the default SystemAuthKey value
1594 --with-operkey set the default operator @AUTHKEY value
1595 --with-components set components to build:
1596 - "all" (default) builds everything
1597 - "core" builds libcups and ipptool
171c38f2 1598 - "libcups" builds just libcups
58b64dbb 1599 - "libcupslite" builds just libcups without driver support
d9f356c5
MS
1600 --with-privateinclude set path for private include files, default=none
1601 --with-lpdconfig set URI for LPD config file
1602 --with-smbconfig set URI for Samba config file
1603 --with-cachedir set path for cache files
1604 --with-icondir set path for application icons
1605 --with-menudir set path for application menus
1606 --with-docdir set path for documentation
1607 --with-fontpath set font path for pstoraster
1608 --with-logdir set path for log files
1609 --with-rundir set transient run-time state directory
1610 --with-optim set optimization flags
1611 --with-archflags set default architecture flags
1612 --with-ldarchflags set program architecture flags
1613 --with-domainsocket set unix domain socket name
1614 --with-gssservicename set default gss service name
6eda776e 1615 --with-pam-module set the PAM module to use
d9f356c5
MS
1616 --with-dnssd-libs set directory for DNS Service Discovery library
1617 --with-dnssd-includes set directory for DNS Service Discovery includes
1618 --with-systemd set directory for systemd service files
1619 --with-smfmanifestdir set path for Solaris SMF manifest
1620 --with-rcdir set path for rc scripts
1621 --with-rclevels set run levels for rc scripts
1622 --with-rcstart set start number for rc scripts
1623 --with-rcstop set stop number for rc scripts
1624 --with-xinetd set path for xinetd config files
1625 --with-languages set installed languages, default=all
171c38f2
MS
1626 --with-bundledir set localization bundle directory
1627 --with-bundlelang set localization bundle base language (English or en)
6eda776e 1628 --with-exe-file-perm set default executable permissions value, default=0555
d9f356c5
MS
1629 --with-config-file-perm set default ConfigFilePerm value, default=0640
1630 --with-cupsd-file-perm set default cupsd permissions, default=0500
1631 --with-log-file-perm set default LogFilePerm value, default=0644
1632 --with-fatal-errors set default FatalErrors value, default=config
1633 --with-log-level set default LogLevel value, default=warn
1634 --with-access-log-level set default AccessLogLevel value, default=none
1635 --with-local-protocols set default BrowseLocalProtocols, default=""
1636 --with-cups-user set default user for CUPS
1637 --with-cups-group set default group for CUPS
1638 --with-system-groups set default system groups for CUPS
1639 --with-printcap set default printcap file
1640 --with-lpdconfigfile set default LPDConfigFile URI
1641 --with-smbconfigfile set default SMBConfigFile URI
1642 --with-max-copies set default max copies value, default=9999
1643 --with-snmp-address set SNMP query address, default=auto
1644 --with-snmp-community set SNMP community, default=public
1645 --with-ipp-port set port number for IPP, default=631
d9f356c5
MS
1646
1647Some influential environment variables:
1648 CC C compiler command
1649 CFLAGS C compiler flags
1650 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1651 nonstandard directory <lib dir>
1652 LIBS libraries to pass to the linker, e.g. -l<library>
1653 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1654 you have headers in a nonstandard directory <include dir>
48cc3892 1655 CPP C preprocessor
d9f356c5
MS
1656 CXX C++ compiler command
1657 CXXFLAGS C++ compiler flags
1658
1659Use these variables to override the choices made by `configure' or to help
1660it to find libraries and programs with nonstandard names/locations.
1661
24343173 1662Report bugs to <https://github.com/apple/cups/issues>.
d9f356c5
MS
1663CUPS home page: <https://www.cups.org/>.
1664_ACEOF
1665ac_status=$?
1666fi
1667
1668if test "$ac_init_help" = "recursive"; then
1669 # If there are subdirs, report their specific --help.
1670 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1671 test -d "$ac_dir" ||
1672 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1673 continue
1674 ac_builddir=.
1675
1676case "$ac_dir" in
1677.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1678*)
1679 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1680 # A ".." for each directory in $ac_dir_suffix.
1681 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1682 case $ac_top_builddir_sub in
1683 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1684 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1685 esac ;;
1686esac
1687ac_abs_top_builddir=$ac_pwd
1688ac_abs_builddir=$ac_pwd$ac_dir_suffix
1689# for backward compatibility:
1690ac_top_builddir=$ac_top_build_prefix
1691
1692case $srcdir in
1693 .) # We are building in place.
1694 ac_srcdir=.
1695 ac_top_srcdir=$ac_top_builddir_sub
1696 ac_abs_top_srcdir=$ac_pwd ;;
1697 [\\/]* | ?:[\\/]* ) # Absolute name.
1698 ac_srcdir=$srcdir$ac_dir_suffix;
1699 ac_top_srcdir=$srcdir
1700 ac_abs_top_srcdir=$srcdir ;;
1701 *) # Relative name.
1702 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1703 ac_top_srcdir=$ac_top_build_prefix$srcdir
1704 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1705esac
1706ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1707
1708 cd "$ac_dir" || { ac_status=$?; continue; }
1709 # Check for guested configure.
1710 if test -f "$ac_srcdir/configure.gnu"; then
1711 echo &&
1712 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1713 elif test -f "$ac_srcdir/configure"; then
1714 echo &&
1715 $SHELL "$ac_srcdir/configure" --help=recursive
1716 else
1717 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1718 fi || ac_status=$?
1719 cd "$ac_pwd" || { ac_status=$?; break; }
1720 done
1721fi
1722
1723test -n "$ac_init_help" && exit $ac_status
1724if $ac_init_version; then
1725 cat <<\_ACEOF
8a763079 1726CUPS configure 2.3b7
3c2cb822 1727generated by GNU Autoconf 2.69
d9f356c5 1728
3c2cb822 1729Copyright (C) 2012 Free Software Foundation, Inc.
d9f356c5
MS
1730This configure script is free software; the Free Software Foundation
1731gives unlimited permission to copy, distribute and modify it.
1732_ACEOF
1733 exit
1734fi
1735
1736## ------------------------ ##
1737## Autoconf initialization. ##
1738## ------------------------ ##
1739
1740# ac_fn_c_try_compile LINENO
1741# --------------------------
1742# Try to compile conftest.$ac_ext, and return whether this succeeded.
1743ac_fn_c_try_compile ()
1744{
1745 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1746 rm -f conftest.$ac_objext
1747 if { { ac_try="$ac_compile"
1748case "(($ac_try" in
1749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1750 *) ac_try_echo=$ac_try;;
1751esac
1752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1753$as_echo "$ac_try_echo"; } >&5
1754 (eval "$ac_compile") 2>conftest.err
1755 ac_status=$?
1756 if test -s conftest.err; then
1757 grep -v '^ *+' conftest.err >conftest.er1
1758 cat conftest.er1 >&5
1759 mv -f conftest.er1 conftest.err
1760 fi
1761 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1762 test $ac_status = 0; } && {
1763 test -z "$ac_c_werror_flag" ||
1764 test ! -s conftest.err
1765 } && test -s conftest.$ac_objext; then :
1766 ac_retval=0
1767else
1768 $as_echo "$as_me: failed program was:" >&5
1769sed 's/^/| /' conftest.$ac_ext >&5
1770
1771 ac_retval=1
1772fi
1773 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1774 as_fn_set_status $ac_retval
1775
1776} # ac_fn_c_try_compile
1777
48cc3892
MS
1778# ac_fn_c_try_cpp LINENO
1779# ----------------------
1780# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1781ac_fn_c_try_cpp ()
1782{
1783 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1784 if { { ac_try="$ac_cpp conftest.$ac_ext"
1785case "(($ac_try" in
1786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1787 *) ac_try_echo=$ac_try;;
1788esac
1789eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1790$as_echo "$ac_try_echo"; } >&5
1791 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1792 ac_status=$?
1793 if test -s conftest.err; then
1794 grep -v '^ *+' conftest.err >conftest.er1
1795 cat conftest.er1 >&5
1796 mv -f conftest.er1 conftest.err
1797 fi
1798 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1799 test $ac_status = 0; } > conftest.i && {
1800 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1801 test ! -s conftest.err
1802 }; then :
1803 ac_retval=0
1804else
1805 $as_echo "$as_me: failed program was:" >&5
1806sed 's/^/| /' conftest.$ac_ext >&5
1807
1808 ac_retval=1
1809fi
1810 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1811 as_fn_set_status $ac_retval
1812
1813} # ac_fn_c_try_cpp
1814
d9f356c5
MS
1815# ac_fn_cxx_try_compile LINENO
1816# ----------------------------
1817# Try to compile conftest.$ac_ext, and return whether this succeeded.
1818ac_fn_cxx_try_compile ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 rm -f conftest.$ac_objext
1822 if { { ac_try="$ac_compile"
1823case "(($ac_try" in
1824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1825 *) ac_try_echo=$ac_try;;
1826esac
1827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1828$as_echo "$ac_try_echo"; } >&5
1829 (eval "$ac_compile") 2>conftest.err
1830 ac_status=$?
1831 if test -s conftest.err; then
1832 grep -v '^ *+' conftest.err >conftest.er1
1833 cat conftest.er1 >&5
1834 mv -f conftest.er1 conftest.err
1835 fi
1836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1837 test $ac_status = 0; } && {
1838 test -z "$ac_cxx_werror_flag" ||
1839 test ! -s conftest.err
1840 } && test -s conftest.$ac_objext; then :
1841 ac_retval=0
1842else
1843 $as_echo "$as_me: failed program was:" >&5
1844sed 's/^/| /' conftest.$ac_ext >&5
1845
1846 ac_retval=1
1847fi
1848 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1849 as_fn_set_status $ac_retval
1850
1851} # ac_fn_cxx_try_compile
1852
1853# ac_fn_c_try_link LINENO
1854# -----------------------
1855# Try to link conftest.$ac_ext, and return whether this succeeded.
1856ac_fn_c_try_link ()
1857{
1858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859 rm -f conftest.$ac_objext conftest$ac_exeext
1860 if { { ac_try="$ac_link"
1861case "(($ac_try" in
1862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1863 *) ac_try_echo=$ac_try;;
1864esac
1865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1866$as_echo "$ac_try_echo"; } >&5
1867 (eval "$ac_link") 2>conftest.err
1868 ac_status=$?
1869 if test -s conftest.err; then
1870 grep -v '^ *+' conftest.err >conftest.er1
1871 cat conftest.er1 >&5
1872 mv -f conftest.er1 conftest.err
1873 fi
1874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1875 test $ac_status = 0; } && {
1876 test -z "$ac_c_werror_flag" ||
1877 test ! -s conftest.err
1878 } && test -s conftest$ac_exeext && {
1879 test "$cross_compiling" = yes ||
3c2cb822 1880 test -x conftest$ac_exeext
d9f356c5
MS
1881 }; then :
1882 ac_retval=0
1883else
1884 $as_echo "$as_me: failed program was:" >&5
1885sed 's/^/| /' conftest.$ac_ext >&5
1886
1887 ac_retval=1
1888fi
1889 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1890 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1891 # interfere with the next link command; also delete a directory that is
1892 # left behind by Apple's compiler. We do this before executing the actions.
1893 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1894 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1895 as_fn_set_status $ac_retval
1896
1897} # ac_fn_c_try_link
1898
1899# ac_fn_c_try_run LINENO
1900# ----------------------
1901# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1902# that executables *can* be run.
1903ac_fn_c_try_run ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 if { { ac_try="$ac_link"
1907case "(($ac_try" in
1908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1909 *) ac_try_echo=$ac_try;;
1910esac
1911eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1912$as_echo "$ac_try_echo"; } >&5
1913 (eval "$ac_link") 2>&5
1914 ac_status=$?
1915 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1916 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1917 { { case "(($ac_try" in
1918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1919 *) ac_try_echo=$ac_try;;
1920esac
1921eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1922$as_echo "$ac_try_echo"; } >&5
1923 (eval "$ac_try") 2>&5
1924 ac_status=$?
1925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1926 test $ac_status = 0; }; }; then :
1927 ac_retval=0
1928else
1929 $as_echo "$as_me: program exited with status $ac_status" >&5
1930 $as_echo "$as_me: failed program was:" >&5
1931sed 's/^/| /' conftest.$ac_ext >&5
1932
1933 ac_retval=$ac_status
1934fi
1935 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1937 as_fn_set_status $ac_retval
1938
1939} # ac_fn_c_try_run
1940
1941# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1942# -------------------------------------------------------
1943# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1944# the include files in INCLUDES and setting the cache variable VAR
1945# accordingly.
1946ac_fn_c_check_header_mongrel ()
1947{
1948 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949 if eval \${$3+:} false; then :
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1951$as_echo_n "checking for $2... " >&6; }
1952if eval \${$3+:} false; then :
1953 $as_echo_n "(cached) " >&6
1954fi
1955eval ac_res=\$$3
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1957$as_echo "$ac_res" >&6; }
1958else
1959 # Is the header compilable?
1960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1961$as_echo_n "checking $2 usability... " >&6; }
1962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1963/* end confdefs.h. */
1964$4
1965#include <$2>
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968 ac_header_compiler=yes
1969else
1970 ac_header_compiler=no
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1974$as_echo "$ac_header_compiler" >&6; }
1975
1976# Is the header present?
1977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1978$as_echo_n "checking $2 presence... " >&6; }
1979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980/* end confdefs.h. */
1981#include <$2>
1982_ACEOF
1983if ac_fn_c_try_cpp "$LINENO"; then :
1984 ac_header_preproc=yes
1985else
1986 ac_header_preproc=no
1987fi
1988rm -f conftest.err conftest.i conftest.$ac_ext
1989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1990$as_echo "$ac_header_preproc" >&6; }
1991
1992# So? What about this header?
1993case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1994 yes:no: )
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1996$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1998$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1999 ;;
2000 no:yes:* )
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2002$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2003 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2004$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2005 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2006$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2008$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2010$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
24343173
MS
2011( $as_echo "## --------------------------------------------------- ##
2012## Report this to https://github.com/apple/cups/issues ##
2013## --------------------------------------------------- ##"
d9f356c5
MS
2014 ) | sed "s/^/$as_me: WARNING: /" >&2
2015 ;;
2016esac
2017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2018$as_echo_n "checking for $2... " >&6; }
2019if eval \${$3+:} false; then :
2020 $as_echo_n "(cached) " >&6
2021else
2022 eval "$3=\$ac_header_compiler"
2023fi
2024eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026$as_echo "$ac_res" >&6; }
2027fi
2028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029
2030} # ac_fn_c_check_header_mongrel
2031
2032# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2033# -------------------------------------------------------
2034# Tests whether HEADER exists and can be compiled using the include files in
2035# INCLUDES, setting the cache variable VAR accordingly.
2036ac_fn_c_check_header_compile ()
2037{
2038 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2040$as_echo_n "checking for $2... " >&6; }
2041if eval \${$3+:} false; then :
2042 $as_echo_n "(cached) " >&6
2043else
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045/* end confdefs.h. */
2046$4
2047#include <$2>
2048_ACEOF
2049if ac_fn_c_try_compile "$LINENO"; then :
2050 eval "$3=yes"
2051else
2052 eval "$3=no"
2053fi
2054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2055fi
2056eval ac_res=\$$3
2057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2058$as_echo "$ac_res" >&6; }
2059 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2060
2061} # ac_fn_c_check_header_compile
2062
2063# ac_fn_c_check_func LINENO FUNC VAR
2064# ----------------------------------
2065# Tests whether FUNC exists, setting the cache variable VAR accordingly
2066ac_fn_c_check_func ()
2067{
2068 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2070$as_echo_n "checking for $2... " >&6; }
2071if eval \${$3+:} false; then :
2072 $as_echo_n "(cached) " >&6
2073else
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2077 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2078#define $2 innocuous_$2
2079
2080/* System header to define __stub macros and hopefully few prototypes,
2081 which can conflict with char $2 (); below.
2082 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2083 <limits.h> exists even on freestanding compilers. */
2084
2085#ifdef __STDC__
2086# include <limits.h>
2087#else
2088# include <assert.h>
2089#endif
2090
2091#undef $2
2092
2093/* Override any GCC internal prototype to avoid an error.
2094 Use char because int might match the return type of a GCC
2095 builtin and then its argument prototype would still apply. */
2096#ifdef __cplusplus
2097extern "C"
2098#endif
2099char $2 ();
2100/* The GNU C library defines this for functions which it implements
2101 to always fail with ENOSYS. Some functions are actually named
2102 something starting with __ and the normal name is an alias. */
2103#if defined __stub_$2 || defined __stub___$2
2104choke me
2105#endif
2106
2107int
2108main ()
2109{
2110return $2 ();
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_link "$LINENO"; then :
2116 eval "$3=yes"
2117else
2118 eval "$3=no"
2119fi
2120rm -f core conftest.err conftest.$ac_objext \
2121 conftest$ac_exeext conftest.$ac_ext
2122fi
2123eval ac_res=\$$3
2124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2125$as_echo "$ac_res" >&6; }
2126 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2127
2128} # ac_fn_c_check_func
2129
2130# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2131# ----------------------------------------------------
2132# Tries to find if the field MEMBER exists in type AGGR, after including
2133# INCLUDES, setting cache variable VAR accordingly.
2134ac_fn_c_check_member ()
2135{
2136 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2138$as_echo_n "checking for $2.$3... " >&6; }
2139if eval \${$4+:} false; then :
2140 $as_echo_n "(cached) " >&6
2141else
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$5
2145int
2146main ()
2147{
2148static $2 ac_aggr;
2149if (ac_aggr.$3)
2150return 0;
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_compile "$LINENO"; then :
2156 eval "$4=yes"
2157else
2158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159/* end confdefs.h. */
2160$5
2161int
2162main ()
2163{
2164static $2 ac_aggr;
2165if (sizeof ac_aggr.$3)
2166return 0;
2167 ;
2168 return 0;
2169}
2170_ACEOF
2171if ac_fn_c_try_compile "$LINENO"; then :
2172 eval "$4=yes"
2173else
2174 eval "$4=no"
2175fi
2176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179fi
2180eval ac_res=\$$4
2181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2182$as_echo "$ac_res" >&6; }
2183 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2184
2185} # ac_fn_c_check_member
2186cat >config.log <<_ACEOF
2187This file contains any messages produced by compilers while
2188running configure, to aid debugging if configure makes a mistake.
2189
8a763079 2190It was created by CUPS $as_me 2.3b7, which was
3c2cb822 2191generated by GNU Autoconf 2.69. Invocation command line was
d9f356c5
MS
2192
2193 $ $0 $@
2194
2195_ACEOF
2196exec 5>>config.log
2197{
2198cat <<_ASUNAME
2199## --------- ##
2200## Platform. ##
2201## --------- ##
2202
2203hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2204uname -m = `(uname -m) 2>/dev/null || echo unknown`
2205uname -r = `(uname -r) 2>/dev/null || echo unknown`
2206uname -s = `(uname -s) 2>/dev/null || echo unknown`
2207uname -v = `(uname -v) 2>/dev/null || echo unknown`
2208
2209/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2210/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2211
2212/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2213/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2214/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2215/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2216/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2217/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2218/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2219
2220_ASUNAME
2221
2222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2223for as_dir in $PATH
2224do
2225 IFS=$as_save_IFS
2226 test -z "$as_dir" && as_dir=.
2227 $as_echo "PATH: $as_dir"
2228 done
2229IFS=$as_save_IFS
2230
2231} >&5
2232
2233cat >&5 <<_ACEOF
2234
2235
2236## ----------- ##
2237## Core tests. ##
2238## ----------- ##
2239
2240_ACEOF
2241
2242
2243# Keep a trace of the command line.
2244# Strip out --no-create and --no-recursion so they do not pile up.
2245# Strip out --silent because we don't want to record it for future runs.
2246# Also quote any args containing shell meta-characters.
2247# Make two passes to allow for proper duplicate-argument suppression.
2248ac_configure_args=
2249ac_configure_args0=
2250ac_configure_args1=
2251ac_must_keep_next=false
2252for ac_pass in 1 2
2253do
2254 for ac_arg
2255 do
2256 case $ac_arg in
2257 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2258 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2259 | -silent | --silent | --silen | --sile | --sil)
2260 continue ;;
2261 *\'*)
2262 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2263 esac
2264 case $ac_pass in
2265 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2266 2)
2267 as_fn_append ac_configure_args1 " '$ac_arg'"
2268 if test $ac_must_keep_next = true; then
2269 ac_must_keep_next=false # Got value, back to normal.
2270 else
2271 case $ac_arg in
2272 *=* | --config-cache | -C | -disable-* | --disable-* \
2273 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2274 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2275 | -with-* | --with-* | -without-* | --without-* | --x)
2276 case "$ac_configure_args0 " in
2277 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2278 esac
2279 ;;
2280 -* ) ac_must_keep_next=true ;;
2281 esac
2282 fi
2283 as_fn_append ac_configure_args " '$ac_arg'"
2284 ;;
2285 esac
2286 done
2287done
2288{ ac_configure_args0=; unset ac_configure_args0;}
2289{ ac_configure_args1=; unset ac_configure_args1;}
2290
2291# When interrupted or exit'd, cleanup temporary files, and complete
2292# config.log. We remove comments because anyway the quotes in there
2293# would cause problems or look ugly.
2294# WARNING: Use '\'' to represent an apostrophe within the trap.
2295# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2296trap 'exit_status=$?
2297 # Save into config.log some information that might help in debugging.
2298 {
2299 echo
2300
2301 $as_echo "## ---------------- ##
2302## Cache variables. ##
2303## ---------------- ##"
2304 echo
2305 # The following way of writing the cache mishandles newlines in values,
2306(
2307 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2308 eval ac_val=\$$ac_var
2309 case $ac_val in #(
2310 *${as_nl}*)
2311 case $ac_var in #(
2312 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2313$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2314 esac
2315 case $ac_var in #(
2316 _ | IFS | as_nl) ;; #(
2317 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2318 *) { eval $ac_var=; unset $ac_var;} ;;
2319 esac ;;
2320 esac
2321 done
2322 (set) 2>&1 |
2323 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2324 *${as_nl}ac_space=\ *)
2325 sed -n \
2326 "s/'\''/'\''\\\\'\'''\''/g;
2327 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2328 ;; #(
2329 *)
2330 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2331 ;;
2332 esac |
2333 sort
2334)
2335 echo
2336
2337 $as_echo "## ----------------- ##
2338## Output variables. ##
2339## ----------------- ##"
2340 echo
2341 for ac_var in $ac_subst_vars
2342 do
2343 eval ac_val=\$$ac_var
2344 case $ac_val in
2345 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2346 esac
2347 $as_echo "$ac_var='\''$ac_val'\''"
2348 done | sort
2349 echo
2350
2351 if test -n "$ac_subst_files"; then
2352 $as_echo "## ------------------- ##
2353## File substitutions. ##
2354## ------------------- ##"
2355 echo
2356 for ac_var in $ac_subst_files
2357 do
2358 eval ac_val=\$$ac_var
2359 case $ac_val in
2360 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2361 esac
2362 $as_echo "$ac_var='\''$ac_val'\''"
2363 done | sort
2364 echo
2365 fi
2366
2367 if test -s confdefs.h; then
2368 $as_echo "## ----------- ##
2369## confdefs.h. ##
2370## ----------- ##"
2371 echo
2372 cat confdefs.h
2373 echo
2374 fi
2375 test "$ac_signal" != 0 &&
2376 $as_echo "$as_me: caught signal $ac_signal"
2377 $as_echo "$as_me: exit $exit_status"
2378 } >&5
2379 rm -f core *.core core.conftest.* &&
2380 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2381 exit $exit_status
2382' 0
2383for ac_signal in 1 2 13 15; do
2384 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2385done
2386ac_signal=0
2387
2388# confdefs.h avoids OS command line length limits that DEFS can exceed.
2389rm -f -r conftest* confdefs.h
2390
2391$as_echo "/* confdefs.h */" > confdefs.h
2392
2393# Predefined preprocessor variables.
2394
2395cat >>confdefs.h <<_ACEOF
2396#define PACKAGE_NAME "$PACKAGE_NAME"
2397_ACEOF
2398
2399cat >>confdefs.h <<_ACEOF
2400#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2401_ACEOF
2402
2403cat >>confdefs.h <<_ACEOF
2404#define PACKAGE_VERSION "$PACKAGE_VERSION"
2405_ACEOF
2406
2407cat >>confdefs.h <<_ACEOF
2408#define PACKAGE_STRING "$PACKAGE_STRING"
2409_ACEOF
2410
2411cat >>confdefs.h <<_ACEOF
2412#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2413_ACEOF
2414
2415cat >>confdefs.h <<_ACEOF
2416#define PACKAGE_URL "$PACKAGE_URL"
2417_ACEOF
2418
2419
2420# Let the site file select an alternate cache file if it wants to.
2421# Prefer an explicitly selected file to automatically selected ones.
2422ac_site_file1=NONE
2423ac_site_file2=NONE
2424if test -n "$CONFIG_SITE"; then
2425 # We do not want a PATH search for config.site.
2426 case $CONFIG_SITE in #((
2427 -*) ac_site_file1=./$CONFIG_SITE;;
2428 */*) ac_site_file1=$CONFIG_SITE;;
2429 *) ac_site_file1=./$CONFIG_SITE;;
2430 esac
2431elif test "x$prefix" != xNONE; then
2432 ac_site_file1=$prefix/share/config.site
2433 ac_site_file2=$prefix/etc/config.site
2434else
2435 ac_site_file1=$ac_default_prefix/share/config.site
2436 ac_site_file2=$ac_default_prefix/etc/config.site
2437fi
2438for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2439do
2440 test "x$ac_site_file" = xNONE && continue
2441 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2442 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2443$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2444 sed 's/^/| /' "$ac_site_file" >&5
2445 . "$ac_site_file" \
2446 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2448as_fn_error $? "failed to load site script $ac_site_file
2449See \`config.log' for more details" "$LINENO" 5; }
2450 fi
2451done
2452
2453if test -r "$cache_file"; then
2454 # Some versions of bash will fail to source /dev/null (special files
2455 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2456 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2457 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2458$as_echo "$as_me: loading cache $cache_file" >&6;}
2459 case $cache_file in
2460 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2461 *) . "./$cache_file";;
2462 esac
2463 fi
2464else
2465 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2466$as_echo "$as_me: creating cache $cache_file" >&6;}
2467 >$cache_file
2468fi
2469
2470# Check that the precious variables saved in the cache have kept the same
2471# value.
2472ac_cache_corrupted=false
2473for ac_var in $ac_precious_vars; do
2474 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2475 eval ac_new_set=\$ac_env_${ac_var}_set
2476 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2477 eval ac_new_val=\$ac_env_${ac_var}_value
2478 case $ac_old_set,$ac_new_set in
2479 set,)
2480 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2481$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2482 ac_cache_corrupted=: ;;
2483 ,set)
2484 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2485$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2486 ac_cache_corrupted=: ;;
2487 ,);;
2488 *)
2489 if test "x$ac_old_val" != "x$ac_new_val"; then
2490 # differences in whitespace do not lead to failure.
2491 ac_old_val_w=`echo x $ac_old_val`
2492 ac_new_val_w=`echo x $ac_new_val`
2493 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2494 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2495$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2496 ac_cache_corrupted=:
2497 else
2498 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2499$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2500 eval $ac_var=\$ac_old_val
2501 fi
2502 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2503$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2504 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2505$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2506 fi;;
2507 esac
2508 # Pass precious variables to config.status.
2509 if test "$ac_new_set" = set; then
2510 case $ac_new_val in
2511 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2512 *) ac_arg=$ac_var=$ac_new_val ;;
2513 esac
2514 case " $ac_configure_args " in
2515 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2516 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2517 esac
2518 fi
2519done
2520if $ac_cache_corrupted; then
2521 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2524$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2525 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2526fi
2527## -------------------- ##
2528## Main body of script. ##
2529## -------------------- ##
2530
2531ac_ext=c
2532ac_cpp='$CPP $CPPFLAGS'
2533ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2534ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2535ac_compiler_gnu=$ac_cv_c_compiler_gnu
2536
2537
2538
2539
105922ec
MS
2540ac_aux_dir=
2541for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2542 if test -f "$ac_dir/install-sh"; then
2543 ac_aux_dir=$ac_dir
2544 ac_install_sh="$ac_aux_dir/install-sh -c"
2545 break
2546 elif test -f "$ac_dir/install.sh"; then
2547 ac_aux_dir=$ac_dir
2548 ac_install_sh="$ac_aux_dir/install.sh -c"
2549 break
2550 elif test -f "$ac_dir/shtool"; then
2551 ac_aux_dir=$ac_dir
2552 ac_install_sh="$ac_aux_dir/shtool install -c"
2553 break
2554 fi
2555done
2556if test -z "$ac_aux_dir"; then
2557 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2558fi
d9f356c5 2559
105922ec
MS
2560# These three variables are undocumented and unsupported,
2561# and are intended to be withdrawn in a future Autoconf release.
2562# They can cause serious problems if a builder's source tree is in a directory
2563# whose full name contains unusual characters.
2564ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2565ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2566ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
d9f356c5 2567
105922ec
MS
2568
2569# Make sure we can run config.sub.
2570$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2571 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2572
2573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2574$as_echo_n "checking build system type... " >&6; }
2575if ${ac_cv_build+:} false; then :
2576 $as_echo_n "(cached) " >&6
2577else
2578 ac_build_alias=$build_alias
2579test "x$ac_build_alias" = x &&
2580 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2581test "x$ac_build_alias" = x &&
2582 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2583ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2584 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2585
2586fi
2587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2588$as_echo "$ac_cv_build" >&6; }
2589case $ac_cv_build in
2590*-*-*) ;;
2591*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2592esac
2593build=$ac_cv_build
2594ac_save_IFS=$IFS; IFS='-'
2595set x $ac_cv_build
2596shift
2597build_cpu=$1
2598build_vendor=$2
2599shift; shift
2600# Remember, the first character of IFS is used to create $*,
2601# except with old shells:
2602build_os=$*
2603IFS=$ac_save_IFS
2604case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2605
2606
2607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2608$as_echo_n "checking host system type... " >&6; }
2609if ${ac_cv_host+:} false; then :
2610 $as_echo_n "(cached) " >&6
2611else
2612 if test "x$host_alias" = x; then
2613 ac_cv_host=$ac_cv_build
2614else
2615 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2616 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2617fi
2618
2619fi
2620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2621$as_echo "$ac_cv_host" >&6; }
2622case $ac_cv_host in
2623*-*-*) ;;
2624*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
d9f356c5 2625esac
105922ec
MS
2626host=$ac_cv_host
2627ac_save_IFS=$IFS; IFS='-'
2628set x $ac_cv_host
2629shift
2630host_cpu=$1
2631host_vendor=$2
2632shift; shift
2633# Remember, the first character of IFS is used to create $*,
2634# except with old shells:
2635host_os=$*
2636IFS=$ac_save_IFS
2637case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2638
2639
2640
2641host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`
2642host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}'`
d4a895f8 2643# Linux often does not yield an OS version we can use...
bb719eb3
MS
2644if test "x$host_os_version" = x; then
2645 host_os_version="0"
2646fi
105922ec 2647
105922ec
MS
2648if test "$build" = "$host"; then
2649 # No, build local targets
2650 LOCALTARGET="local"
2651else
2652 # Yes, don't build local targets
2653 LOCALTARGET=""
2654fi
2655
d9f356c5 2656
c8c5ec3b
MS
2657for ac_prog in codesign true
2658do
2659 # Extract the first word of "$ac_prog", so it can be a program name with args.
2660set dummy $ac_prog; ac_word=$2
2661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2662$as_echo_n "checking for $ac_word... " >&6; }
2663if ${ac_cv_path_CODE_SIGN+:} false; then :
2664 $as_echo_n "(cached) " >&6
2665else
2666 case $CODE_SIGN in
2667 [\\/]* | ?:[\\/]*)
2668 ac_cv_path_CODE_SIGN="$CODE_SIGN" # Let the user override the test with a path.
2669 ;;
2670 *)
2671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2672for as_dir in $PATH
2673do
2674 IFS=$as_save_IFS
2675 test -z "$as_dir" && as_dir=.
2676 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 2677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c8c5ec3b
MS
2678 ac_cv_path_CODE_SIGN="$as_dir/$ac_word$ac_exec_ext"
2679 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2680 break 2
2681 fi
2682done
2683 done
2684IFS=$as_save_IFS
137fa9a8 2685
c8c5ec3b
MS
2686 ;;
2687esac
137fa9a8 2688fi
c8c5ec3b
MS
2689CODE_SIGN=$ac_cv_path_CODE_SIGN
2690if test -n "$CODE_SIGN"; then
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODE_SIGN" >&5
2692$as_echo "$CODE_SIGN" >&6; }
2693else
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2695$as_echo "no" >&6; }
2696fi
2697
2698
2699 test -n "$CODE_SIGN" && break
2700done
2701
137fa9a8 2702
d9f356c5 2703
d9f356c5
MS
2704ac_config_headers="$ac_config_headers config.h"
2705
2706
8a763079 2707CUPS_VERSION="2.3b7"
24343173 2708CUPS_REVISION=""
d9f356c5
MS
2709CUPS_BUILD="cups-$CUPS_VERSION"
2710
2711
2712# Check whether --with-cups_build was given.
2713if test "${with_cups_build+set}" = set; then :
2714 withval=$with_cups_build; CUPS_BUILD="$withval"
2715fi
2716
2717
2718
2719
2720
2721cat >>confdefs.h <<_ACEOF
2722#define CUPS_SVERSION "CUPS v$CUPS_VERSION$CUPS_REVISION"
2723_ACEOF
2724
2725cat >>confdefs.h <<_ACEOF
2726#define CUPS_MINIMAL "CUPS/$CUPS_VERSION$CUPS_REVISION"
2727_ACEOF
2728
2729
2730CFLAGS="${CFLAGS:=}"
2731CPPFLAGS="${CPPFLAGS:=}"
2732CXXFLAGS="${CXXFLAGS:=}"
2733LDFLAGS="${LDFLAGS:=}"
2734
2735for ac_prog in gawk mawk nawk awk
2736do
2737 # Extract the first word of "$ac_prog", so it can be a program name with args.
2738set dummy $ac_prog; ac_word=$2
2739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2740$as_echo_n "checking for $ac_word... " >&6; }
2741if ${ac_cv_prog_AWK+:} false; then :
2742 $as_echo_n "(cached) " >&6
2743else
2744 if test -n "$AWK"; then
2745 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2746else
2747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2748for as_dir in $PATH
2749do
2750 IFS=$as_save_IFS
2751 test -z "$as_dir" && as_dir=.
2752 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 2753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
2754 ac_cv_prog_AWK="$ac_prog"
2755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2756 break 2
2757 fi
2758done
2759 done
2760IFS=$as_save_IFS
2761
2762fi
2763fi
2764AWK=$ac_cv_prog_AWK
2765if test -n "$AWK"; then
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2767$as_echo "$AWK" >&6; }
2768else
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2770$as_echo "no" >&6; }
2771fi
2772
2773
2774 test -n "$AWK" && break
2775done
2776
2777ac_ext=c
2778ac_cpp='$CPP $CPPFLAGS'
2779ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2780ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2781ac_compiler_gnu=$ac_cv_c_compiler_gnu
2782if test -n "$ac_tool_prefix"; then
2783 for ac_prog in clang cc gcc
2784 do
2785 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2786set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2788$as_echo_n "checking for $ac_word... " >&6; }
2789if ${ac_cv_prog_CC+:} false; then :
2790 $as_echo_n "(cached) " >&6
2791else
2792 if test -n "$CC"; then
2793 ac_cv_prog_CC="$CC" # Let the user override the test.
2794else
2795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2796for as_dir in $PATH
2797do
2798 IFS=$as_save_IFS
2799 test -z "$as_dir" && as_dir=.
2800 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 2801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
2802 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2804 break 2
2805 fi
2806done
2807 done
2808IFS=$as_save_IFS
2809
2810fi
2811fi
2812CC=$ac_cv_prog_CC
2813if test -n "$CC"; then
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2815$as_echo "$CC" >&6; }
2816else
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2818$as_echo "no" >&6; }
2819fi
2820
2821
2822 test -n "$CC" && break
2823 done
2824fi
2825if test -z "$CC"; then
2826 ac_ct_CC=$CC
2827 for ac_prog in clang cc gcc
2828do
2829 # Extract the first word of "$ac_prog", so it can be a program name with args.
2830set dummy $ac_prog; ac_word=$2
2831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2832$as_echo_n "checking for $ac_word... " >&6; }
2833if ${ac_cv_prog_ac_ct_CC+:} false; then :
2834 $as_echo_n "(cached) " >&6
2835else
2836 if test -n "$ac_ct_CC"; then
2837 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2838else
2839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2840for as_dir in $PATH
2841do
2842 IFS=$as_save_IFS
2843 test -z "$as_dir" && as_dir=.
2844 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 2845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
2846 ac_cv_prog_ac_ct_CC="$ac_prog"
2847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2848 break 2
2849 fi
2850done
2851 done
2852IFS=$as_save_IFS
2853
2854fi
2855fi
2856ac_ct_CC=$ac_cv_prog_ac_ct_CC
2857if test -n "$ac_ct_CC"; then
2858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2859$as_echo "$ac_ct_CC" >&6; }
2860else
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2862$as_echo "no" >&6; }
2863fi
2864
2865
2866 test -n "$ac_ct_CC" && break
2867done
2868
2869 if test "x$ac_ct_CC" = x; then
2870 CC=""
2871 else
2872 case $cross_compiling:$ac_tool_warned in
2873yes:)
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2875$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2876ac_tool_warned=yes ;;
2877esac
2878 CC=$ac_ct_CC
2879 fi
2880fi
2881
2882
2883test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2885as_fn_error $? "no acceptable C compiler found in \$PATH
2886See \`config.log' for more details" "$LINENO" 5; }
2887
2888# Provide some information about the compiler.
2889$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2890set X $ac_compile
2891ac_compiler=$2
2892for ac_option in --version -v -V -qversion; do
2893 { { ac_try="$ac_compiler $ac_option >&5"
2894case "(($ac_try" in
2895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2896 *) ac_try_echo=$ac_try;;
2897esac
2898eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2899$as_echo "$ac_try_echo"; } >&5
2900 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2901 ac_status=$?
2902 if test -s conftest.err; then
2903 sed '10a\
2904... rest of stderr output deleted ...
2905 10q' conftest.err >conftest.er1
2906 cat conftest.er1 >&5
2907 fi
2908 rm -f conftest.er1 conftest.err
2909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2910 test $ac_status = 0; }
2911done
2912
2913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2914/* end confdefs.h. */
2915
2916int
2917main ()
2918{
2919
2920 ;
2921 return 0;
2922}
2923_ACEOF
2924ac_clean_files_save=$ac_clean_files
2925ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2926# Try to create an executable without -o first, disregard a.out.
2927# It will help us diagnose broken compilers, and finding out an intuition
2928# of exeext.
2929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2930$as_echo_n "checking whether the C compiler works... " >&6; }
2931ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2932
2933# The possible output files:
2934ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2935
2936ac_rmfiles=
2937for ac_file in $ac_files
2938do
2939 case $ac_file in
2940 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2941 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2942 esac
2943done
2944rm -f $ac_rmfiles
2945
2946if { { ac_try="$ac_link_default"
2947case "(($ac_try" in
2948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2949 *) ac_try_echo=$ac_try;;
2950esac
2951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2952$as_echo "$ac_try_echo"; } >&5
2953 (eval "$ac_link_default") 2>&5
2954 ac_status=$?
2955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2956 test $ac_status = 0; }; then :
2957 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2958# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2959# in a Makefile. We should not override ac_cv_exeext if it was cached,
2960# so that the user can short-circuit this test for compilers unknown to
2961# Autoconf.
2962for ac_file in $ac_files ''
2963do
2964 test -f "$ac_file" || continue
2965 case $ac_file in
2966 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2967 ;;
2968 [ab].out )
2969 # We found the default executable, but exeext='' is most
2970 # certainly right.
2971 break;;
2972 *.* )
2973 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2974 then :; else
2975 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2976 fi
2977 # We set ac_cv_exeext here because the later test for it is not
2978 # safe: cross compilers may not add the suffix if given an `-o'
2979 # argument, so we may need to know it at that point already.
2980 # Even if this section looks crufty: it has the advantage of
2981 # actually working.
2982 break;;
2983 * )
2984 break;;
2985 esac
2986done
2987test "$ac_cv_exeext" = no && ac_cv_exeext=
2988
2989else
2990 ac_file=''
2991fi
2992if test -z "$ac_file"; then :
2993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2994$as_echo "no" >&6; }
2995$as_echo "$as_me: failed program was:" >&5
2996sed 's/^/| /' conftest.$ac_ext >&5
2997
2998{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3000as_fn_error 77 "C compiler cannot create executables
3001See \`config.log' for more details" "$LINENO" 5; }
3002else
3003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3004$as_echo "yes" >&6; }
3005fi
3006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3007$as_echo_n "checking for C compiler default output file name... " >&6; }
3008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3009$as_echo "$ac_file" >&6; }
3010ac_exeext=$ac_cv_exeext
3011
3012rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3013ac_clean_files=$ac_clean_files_save
3014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3015$as_echo_n "checking for suffix of executables... " >&6; }
3016if { { ac_try="$ac_link"
3017case "(($ac_try" in
3018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3019 *) ac_try_echo=$ac_try;;
3020esac
3021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3022$as_echo "$ac_try_echo"; } >&5
3023 (eval "$ac_link") 2>&5
3024 ac_status=$?
3025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3026 test $ac_status = 0; }; then :
3027 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3028# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3029# work properly (i.e., refer to `conftest.exe'), while it won't with
3030# `rm'.
3031for ac_file in conftest.exe conftest conftest.*; do
3032 test -f "$ac_file" || continue
3033 case $ac_file in
3034 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3035 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3036 break;;
3037 * ) break;;
3038 esac
3039done
3040else
3041 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3042$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3043as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3044See \`config.log' for more details" "$LINENO" 5; }
3045fi
3046rm -f conftest conftest$ac_cv_exeext
3047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3048$as_echo "$ac_cv_exeext" >&6; }
3049
3050rm -f conftest.$ac_ext
3051EXEEXT=$ac_cv_exeext
3052ac_exeext=$EXEEXT
3053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3054/* end confdefs.h. */
3055#include <stdio.h>
3056int
3057main ()
3058{
3059FILE *f = fopen ("conftest.out", "w");
3060 return ferror (f) || fclose (f) != 0;
3061
3062 ;
3063 return 0;
3064}
3065_ACEOF
3066ac_clean_files="$ac_clean_files conftest.out"
3067# Check that the compiler produces executables we can run. If not, either
3068# the compiler is broken, or we cross compile.
3069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3070$as_echo_n "checking whether we are cross compiling... " >&6; }
3071if test "$cross_compiling" != yes; then
3072 { { ac_try="$ac_link"
3073case "(($ac_try" in
3074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3075 *) ac_try_echo=$ac_try;;
3076esac
3077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3078$as_echo "$ac_try_echo"; } >&5
3079 (eval "$ac_link") 2>&5
3080 ac_status=$?
3081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3082 test $ac_status = 0; }
3083 if { ac_try='./conftest$ac_cv_exeext'
3084 { { case "(($ac_try" in
3085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3086 *) ac_try_echo=$ac_try;;
3087esac
3088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3089$as_echo "$ac_try_echo"; } >&5
3090 (eval "$ac_try") 2>&5
3091 ac_status=$?
3092 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3093 test $ac_status = 0; }; }; then
3094 cross_compiling=no
3095 else
3096 if test "$cross_compiling" = maybe; then
3097 cross_compiling=yes
3098 else
3099 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3100$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3101as_fn_error $? "cannot run C compiled programs.
3102If you meant to cross compile, use \`--host'.
3103See \`config.log' for more details" "$LINENO" 5; }
3104 fi
3105 fi
3106fi
3107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3108$as_echo "$cross_compiling" >&6; }
3109
3110rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3111ac_clean_files=$ac_clean_files_save
3112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3113$as_echo_n "checking for suffix of object files... " >&6; }
3114if ${ac_cv_objext+:} false; then :
3115 $as_echo_n "(cached) " >&6
3116else
3117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3118/* end confdefs.h. */
3119
3120int
3121main ()
3122{
3123
3124 ;
3125 return 0;
3126}
3127_ACEOF
3128rm -f conftest.o conftest.obj
3129if { { ac_try="$ac_compile"
3130case "(($ac_try" in
3131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3132 *) ac_try_echo=$ac_try;;
3133esac
3134eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3135$as_echo "$ac_try_echo"; } >&5
3136 (eval "$ac_compile") 2>&5
3137 ac_status=$?
3138 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3139 test $ac_status = 0; }; then :
3140 for ac_file in conftest.o conftest.obj conftest.*; do
3141 test -f "$ac_file" || continue;
3142 case $ac_file in
3143 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3144 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3145 break;;
3146 esac
3147done
3148else
3149 $as_echo "$as_me: failed program was:" >&5
3150sed 's/^/| /' conftest.$ac_ext >&5
3151
3152{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3154as_fn_error $? "cannot compute suffix of object files: cannot compile
3155See \`config.log' for more details" "$LINENO" 5; }
3156fi
3157rm -f conftest.$ac_cv_objext conftest.$ac_ext
3158fi
3159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3160$as_echo "$ac_cv_objext" >&6; }
3161OBJEXT=$ac_cv_objext
3162ac_objext=$OBJEXT
3163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3164$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3165if ${ac_cv_c_compiler_gnu+:} false; then :
3166 $as_echo_n "(cached) " >&6
3167else
3168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3169/* end confdefs.h. */
3170
3171int
3172main ()
3173{
3174#ifndef __GNUC__
3175 choke me
3176#endif
3177
3178 ;
3179 return 0;
3180}
3181_ACEOF
3182if ac_fn_c_try_compile "$LINENO"; then :
3183 ac_compiler_gnu=yes
3184else
3185 ac_compiler_gnu=no
3186fi
3187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3188ac_cv_c_compiler_gnu=$ac_compiler_gnu
3189
3190fi
3191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3192$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3193if test $ac_compiler_gnu = yes; then
3194 GCC=yes
3195else
3196 GCC=
3197fi
3198ac_test_CFLAGS=${CFLAGS+set}
3199ac_save_CFLAGS=$CFLAGS
3200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3201$as_echo_n "checking whether $CC accepts -g... " >&6; }
3202if ${ac_cv_prog_cc_g+:} false; then :
3203 $as_echo_n "(cached) " >&6
3204else
3205 ac_save_c_werror_flag=$ac_c_werror_flag
3206 ac_c_werror_flag=yes
3207 ac_cv_prog_cc_g=no
3208 CFLAGS="-g"
3209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3210/* end confdefs.h. */
3211
3212int
3213main ()
3214{
3215
3216 ;
3217 return 0;
3218}
3219_ACEOF
3220if ac_fn_c_try_compile "$LINENO"; then :
3221 ac_cv_prog_cc_g=yes
3222else
3223 CFLAGS=""
3224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3225/* end confdefs.h. */
3226
3227int
3228main ()
3229{
3230
3231 ;
3232 return 0;
3233}
3234_ACEOF
3235if ac_fn_c_try_compile "$LINENO"; then :
3236
3237else
3238 ac_c_werror_flag=$ac_save_c_werror_flag
3239 CFLAGS="-g"
3240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3241/* end confdefs.h. */
3242
3243int
3244main ()
3245{
3246
3247 ;
3248 return 0;
3249}
3250_ACEOF
3251if ac_fn_c_try_compile "$LINENO"; then :
3252 ac_cv_prog_cc_g=yes
3253fi
3254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3255fi
3256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3257fi
3258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3259 ac_c_werror_flag=$ac_save_c_werror_flag
3260fi
3261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3262$as_echo "$ac_cv_prog_cc_g" >&6; }
3263if test "$ac_test_CFLAGS" = set; then
3264 CFLAGS=$ac_save_CFLAGS
3265elif test $ac_cv_prog_cc_g = yes; then
3266 if test "$GCC" = yes; then
3267 CFLAGS="-g -O2"
3268 else
3269 CFLAGS="-g"
3270 fi
3271else
3272 if test "$GCC" = yes; then
3273 CFLAGS="-O2"
3274 else
3275 CFLAGS=
3276 fi
3277fi
3278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3279$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3280if ${ac_cv_prog_cc_c89+:} false; then :
3281 $as_echo_n "(cached) " >&6
3282else
3283 ac_cv_prog_cc_c89=no
3284ac_save_CC=$CC
3285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3286/* end confdefs.h. */
3287#include <stdarg.h>
3288#include <stdio.h>
3c2cb822 3289struct stat;
d9f356c5
MS
3290/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3291struct buf { int x; };
3292FILE * (*rcsopen) (struct buf *, struct stat *, int);
3293static char *e (p, i)
3294 char **p;
3295 int i;
3296{
3297 return p[i];
3298}
3299static char *f (char * (*g) (char **, int), char **p, ...)
3300{
3301 char *s;
3302 va_list v;
3303 va_start (v,p);
3304 s = g (p, va_arg (v,int));
3305 va_end (v);
3306 return s;
3307}
3308
3309/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3310 function prototypes and stuff, but not '\xHH' hex character constants.
3311 These don't provoke an error unfortunately, instead are silently treated
3312 as 'x'. The following induces an error, until -std is added to get
3313 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3314 array size at least. It's necessary to write '\x00'==0 to get something
3315 that's true only with -std. */
3316int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3317
3318/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3319 inside strings and character constants. */
3320#define FOO(x) 'x'
3321int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3322
3323int test (int i, double x);
3324struct s1 {int (*f) (int a);};
3325struct s2 {int (*f) (double a);};
3326int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3327int argc;
3328char **argv;
3329int
3330main ()
3331{
3332return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3333 ;
3334 return 0;
3335}
3336_ACEOF
3337for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3338 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3339do
3340 CC="$ac_save_CC $ac_arg"
3341 if ac_fn_c_try_compile "$LINENO"; then :
3342 ac_cv_prog_cc_c89=$ac_arg
3343fi
3344rm -f core conftest.err conftest.$ac_objext
3345 test "x$ac_cv_prog_cc_c89" != "xno" && break
3346done
3347rm -f conftest.$ac_ext
3348CC=$ac_save_CC
3349
3350fi
3351# AC_CACHE_VAL
3352case "x$ac_cv_prog_cc_c89" in
3353 x)
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3355$as_echo "none needed" >&6; } ;;
3356 xno)
3357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3358$as_echo "unsupported" >&6; } ;;
3359 *)
3360 CC="$CC $ac_cv_prog_cc_c89"
3361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3362$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3363esac
3364if test "x$ac_cv_prog_cc_c89" != xno; then :
3365
3366fi
3367
3368ac_ext=c
3369ac_cpp='$CPP $CPPFLAGS'
3370ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3371ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3372ac_compiler_gnu=$ac_cv_c_compiler_gnu
3373
48cc3892
MS
3374ac_ext=c
3375ac_cpp='$CPP $CPPFLAGS'
3376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3377ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3378ac_compiler_gnu=$ac_cv_c_compiler_gnu
3379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3380$as_echo_n "checking how to run the C preprocessor... " >&6; }
3381# On Suns, sometimes $CPP names a directory.
3382if test -n "$CPP" && test -d "$CPP"; then
3383 CPP=
3384fi
3385if test -z "$CPP"; then
3386 if ${ac_cv_prog_CPP+:} false; then :
3387 $as_echo_n "(cached) " >&6
3388else
3389 # Double quotes because CPP needs to be expanded
3390 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3391 do
3392 ac_preproc_ok=false
3393for ac_c_preproc_warn_flag in '' yes
3394do
3395 # Use a header file that comes with gcc, so configuring glibc
3396 # with a fresh cross-compiler works.
3397 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3398 # <limits.h> exists even on freestanding compilers.
3399 # On the NeXT, cc -E runs the code through the compiler's parser,
3400 # not just through cpp. "Syntax error" is here to catch this case.
3401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3402/* end confdefs.h. */
3403#ifdef __STDC__
3404# include <limits.h>
3405#else
3406# include <assert.h>
3407#endif
3408 Syntax error
3409_ACEOF
3410if ac_fn_c_try_cpp "$LINENO"; then :
3411
3412else
3413 # Broken: fails on valid input.
3414continue
3415fi
3416rm -f conftest.err conftest.i conftest.$ac_ext
3417
3418 # OK, works on sane cases. Now check whether nonexistent headers
3419 # can be detected and how.
3420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3421/* end confdefs.h. */
3422#include <ac_nonexistent.h>
3423_ACEOF
3424if ac_fn_c_try_cpp "$LINENO"; then :
3425 # Broken: success on invalid input.
3426continue
3427else
3428 # Passes both tests.
3429ac_preproc_ok=:
3430break
3431fi
3432rm -f conftest.err conftest.i conftest.$ac_ext
3433
3434done
3435# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3436rm -f conftest.i conftest.err conftest.$ac_ext
3437if $ac_preproc_ok; then :
3438 break
3439fi
3440
3441 done
3442 ac_cv_prog_CPP=$CPP
3443
3444fi
3445 CPP=$ac_cv_prog_CPP
3446else
3447 ac_cv_prog_CPP=$CPP
3448fi
3449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3450$as_echo "$CPP" >&6; }
3451ac_preproc_ok=false
3452for ac_c_preproc_warn_flag in '' yes
3453do
3454 # Use a header file that comes with gcc, so configuring glibc
3455 # with a fresh cross-compiler works.
3456 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3457 # <limits.h> exists even on freestanding compilers.
3458 # On the NeXT, cc -E runs the code through the compiler's parser,
3459 # not just through cpp. "Syntax error" is here to catch this case.
3460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3461/* end confdefs.h. */
3462#ifdef __STDC__
3463# include <limits.h>
3464#else
3465# include <assert.h>
3466#endif
3467 Syntax error
3468_ACEOF
3469if ac_fn_c_try_cpp "$LINENO"; then :
3470
3471else
3472 # Broken: fails on valid input.
3473continue
3474fi
3475rm -f conftest.err conftest.i conftest.$ac_ext
3476
3477 # OK, works on sane cases. Now check whether nonexistent headers
3478 # can be detected and how.
3479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3480/* end confdefs.h. */
3481#include <ac_nonexistent.h>
3482_ACEOF
3483if ac_fn_c_try_cpp "$LINENO"; then :
3484 # Broken: success on invalid input.
3485continue
3486else
3487 # Passes both tests.
3488ac_preproc_ok=:
3489break
3490fi
3491rm -f conftest.err conftest.i conftest.$ac_ext
3492
3493done
3494# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3495rm -f conftest.i conftest.err conftest.$ac_ext
3496if $ac_preproc_ok; then :
3497
3498else
3499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3501as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3502See \`config.log' for more details" "$LINENO" 5; }
3503fi
3504
3505ac_ext=c
3506ac_cpp='$CPP $CPPFLAGS'
3507ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3508ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3509ac_compiler_gnu=$ac_cv_c_compiler_gnu
3510
d9f356c5
MS
3511ac_ext=cpp
3512ac_cpp='$CXXCPP $CPPFLAGS'
3513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3516if test -z "$CXX"; then
3517 if test -n "$CCC"; then
3518 CXX=$CCC
3519 else
3520 if test -n "$ac_tool_prefix"; then
3521 for ac_prog in clang++ c++ g++
3522 do
3523 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3524set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3526$as_echo_n "checking for $ac_word... " >&6; }
3527if ${ac_cv_prog_CXX+:} false; then :
3528 $as_echo_n "(cached) " >&6
3529else
3530 if test -n "$CXX"; then
3531 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3532else
3533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3534for as_dir in $PATH
3535do
3536 IFS=$as_save_IFS
3537 test -z "$as_dir" && as_dir=.
3538 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 3539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
3540 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3542 break 2
3543 fi
3544done
3545 done
3546IFS=$as_save_IFS
3547
3548fi
3549fi
3550CXX=$ac_cv_prog_CXX
3551if test -n "$CXX"; then
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3553$as_echo "$CXX" >&6; }
3554else
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3556$as_echo "no" >&6; }
3557fi
3558
3559
3560 test -n "$CXX" && break
3561 done
3562fi
3563if test -z "$CXX"; then
3564 ac_ct_CXX=$CXX
3565 for ac_prog in clang++ c++ g++
3566do
3567 # Extract the first word of "$ac_prog", so it can be a program name with args.
3568set dummy $ac_prog; ac_word=$2
3569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3570$as_echo_n "checking for $ac_word... " >&6; }
3571if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3572 $as_echo_n "(cached) " >&6
3573else
3574 if test -n "$ac_ct_CXX"; then
3575 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3576else
3577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3578for as_dir in $PATH
3579do
3580 IFS=$as_save_IFS
3581 test -z "$as_dir" && as_dir=.
3582 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 3583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
3584 ac_cv_prog_ac_ct_CXX="$ac_prog"
3585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3586 break 2
3587 fi
3588done
3589 done
3590IFS=$as_save_IFS
3591
3592fi
3593fi
3594ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3595if test -n "$ac_ct_CXX"; then
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3597$as_echo "$ac_ct_CXX" >&6; }
3598else
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600$as_echo "no" >&6; }
3601fi
3602
3603
3604 test -n "$ac_ct_CXX" && break
3605done
3606
3607 if test "x$ac_ct_CXX" = x; then
3608 CXX="g++"
3609 else
3610 case $cross_compiling:$ac_tool_warned in
3611yes:)
3612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3614ac_tool_warned=yes ;;
3615esac
3616 CXX=$ac_ct_CXX
3617 fi
3618fi
3619
3620 fi
3621fi
3622# Provide some information about the compiler.
3623$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3624set X $ac_compile
3625ac_compiler=$2
3626for ac_option in --version -v -V -qversion; do
3627 { { ac_try="$ac_compiler $ac_option >&5"
3628case "(($ac_try" in
3629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3630 *) ac_try_echo=$ac_try;;
3631esac
3632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3633$as_echo "$ac_try_echo"; } >&5
3634 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3635 ac_status=$?
3636 if test -s conftest.err; then
3637 sed '10a\
3638... rest of stderr output deleted ...
3639 10q' conftest.err >conftest.er1
3640 cat conftest.er1 >&5
3641 fi
3642 rm -f conftest.er1 conftest.err
3643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3644 test $ac_status = 0; }
3645done
3646
3647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3648$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3649if ${ac_cv_cxx_compiler_gnu+:} false; then :
3650 $as_echo_n "(cached) " >&6
3651else
3652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3653/* end confdefs.h. */
3654
3655int
3656main ()
3657{
3658#ifndef __GNUC__
3659 choke me
3660#endif
3661
3662 ;
3663 return 0;
3664}
3665_ACEOF
3666if ac_fn_cxx_try_compile "$LINENO"; then :
3667 ac_compiler_gnu=yes
3668else
3669 ac_compiler_gnu=no
3670fi
3671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3672ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3673
3674fi
3675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3676$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3677if test $ac_compiler_gnu = yes; then
3678 GXX=yes
3679else
3680 GXX=
3681fi
3682ac_test_CXXFLAGS=${CXXFLAGS+set}
3683ac_save_CXXFLAGS=$CXXFLAGS
3684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3685$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3686if ${ac_cv_prog_cxx_g+:} false; then :
3687 $as_echo_n "(cached) " >&6
3688else
3689 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3690 ac_cxx_werror_flag=yes
3691 ac_cv_prog_cxx_g=no
3692 CXXFLAGS="-g"
3693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3694/* end confdefs.h. */
3695
3696int
3697main ()
3698{
3699
3700 ;
3701 return 0;
3702}
3703_ACEOF
3704if ac_fn_cxx_try_compile "$LINENO"; then :
3705 ac_cv_prog_cxx_g=yes
3706else
3707 CXXFLAGS=""
3708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3709/* end confdefs.h. */
3710
3711int
3712main ()
3713{
3714
3715 ;
3716 return 0;
3717}
3718_ACEOF
3719if ac_fn_cxx_try_compile "$LINENO"; then :
3720
3721else
3722 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3723 CXXFLAGS="-g"
3724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3725/* end confdefs.h. */
3726
3727int
3728main ()
3729{
3730
3731 ;
3732 return 0;
3733}
3734_ACEOF
3735if ac_fn_cxx_try_compile "$LINENO"; then :
3736 ac_cv_prog_cxx_g=yes
3737fi
3738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3739fi
3740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3741fi
3742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3743 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3744fi
3745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3746$as_echo "$ac_cv_prog_cxx_g" >&6; }
3747if test "$ac_test_CXXFLAGS" = set; then
3748 CXXFLAGS=$ac_save_CXXFLAGS
3749elif test $ac_cv_prog_cxx_g = yes; then
3750 if test "$GXX" = yes; then
3751 CXXFLAGS="-g -O2"
3752 else
3753 CXXFLAGS="-g"
3754 fi
3755else
3756 if test "$GXX" = yes; then
3757 CXXFLAGS="-O2"
3758 else
3759 CXXFLAGS=
3760 fi
3761fi
3762ac_ext=c
3763ac_cpp='$CPP $CPPFLAGS'
3764ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3765ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3766ac_compiler_gnu=$ac_cv_c_compiler_gnu
3767
3768if test -n "$ac_tool_prefix"; then
3769 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3770set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772$as_echo_n "checking for $ac_word... " >&6; }
3773if ${ac_cv_prog_RANLIB+:} false; then :
3774 $as_echo_n "(cached) " >&6
3775else
3776 if test -n "$RANLIB"; then
3777 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3778else
3779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780for as_dir in $PATH
3781do
3782 IFS=$as_save_IFS
3783 test -z "$as_dir" && as_dir=.
3784 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 3785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
3786 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3788 break 2
3789 fi
3790done
3791 done
3792IFS=$as_save_IFS
3793
3794fi
3795fi
3796RANLIB=$ac_cv_prog_RANLIB
3797if test -n "$RANLIB"; then
3798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
3799$as_echo "$RANLIB" >&6; }
3800else
3801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
3803fi
3804
3805
3806fi
3807if test -z "$ac_cv_prog_RANLIB"; then
3808 ac_ct_RANLIB=$RANLIB
3809 # Extract the first word of "ranlib", so it can be a program name with args.
3810set dummy ranlib; ac_word=$2
3811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3812$as_echo_n "checking for $ac_word... " >&6; }
3813if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
3814 $as_echo_n "(cached) " >&6
3815else
3816 if test -n "$ac_ct_RANLIB"; then
3817 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3818else
3819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3820for as_dir in $PATH
3821do
3822 IFS=$as_save_IFS
3823 test -z "$as_dir" && as_dir=.
3824 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 3825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
3826 ac_cv_prog_ac_ct_RANLIB="ranlib"
3827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3828 break 2
3829 fi
3830done
3831 done
3832IFS=$as_save_IFS
3833
3834fi
3835fi
3836ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3837if test -n "$ac_ct_RANLIB"; then
3838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
3839$as_echo "$ac_ct_RANLIB" >&6; }
3840else
3841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3842$as_echo "no" >&6; }
3843fi
3844
3845 if test "x$ac_ct_RANLIB" = x; then
3846 RANLIB=":"
3847 else
3848 case $cross_compiling:$ac_tool_warned in
3849yes:)
3850{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3851$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3852ac_tool_warned=yes ;;
3853esac
3854 RANLIB=$ac_ct_RANLIB
3855 fi
3856else
3857 RANLIB="$ac_cv_prog_RANLIB"
3858fi
3859
3860# Extract the first word of "ar", so it can be a program name with args.
3861set dummy ar; ac_word=$2
3862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3863$as_echo_n "checking for $ac_word... " >&6; }
3864if ${ac_cv_path_AR+:} false; then :
3865 $as_echo_n "(cached) " >&6
3866else
3867 case $AR in
3868 [\\/]* | ?:[\\/]*)
3869 ac_cv_path_AR="$AR" # Let the user override the test with a path.
3870 ;;
3871 *)
3872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3873for as_dir in $PATH
3874do
3875 IFS=$as_save_IFS
3876 test -z "$as_dir" && as_dir=.
3877 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 3878 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
3879 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
3880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3881 break 2
3882 fi
3883done
3884 done
3885IFS=$as_save_IFS
3886
3887 ;;
3888esac
3889fi
3890AR=$ac_cv_path_AR
3891if test -n "$AR"; then
3892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
3893$as_echo "$AR" >&6; }
3894else
3895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3896$as_echo "no" >&6; }
3897fi
3898
3899
3900# Extract the first word of "chmod", so it can be a program name with args.
3901set dummy chmod; ac_word=$2
3902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3903$as_echo_n "checking for $ac_word... " >&6; }
3904if ${ac_cv_path_CHMOD+:} false; then :
3905 $as_echo_n "(cached) " >&6
3906else
3907 case $CHMOD in
3908 [\\/]* | ?:[\\/]*)
3909 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3910 ;;
3911 *)
3912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3913for as_dir in $PATH
3914do
3915 IFS=$as_save_IFS
3916 test -z "$as_dir" && as_dir=.
3917 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 3918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
3919 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3921 break 2
3922 fi
3923done
3924 done
3925IFS=$as_save_IFS
3926
3927 ;;
3928esac
3929fi
3930CHMOD=$ac_cv_path_CHMOD
3931if test -n "$CHMOD"; then
3932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3933$as_echo "$CHMOD" >&6; }
3934else
3935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3936$as_echo "no" >&6; }
3937fi
3938
3939
3940# Extract the first word of "gzip", so it can be a program name with args.
3941set dummy gzip; ac_word=$2
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3943$as_echo_n "checking for $ac_word... " >&6; }
3944if ${ac_cv_path_GZIP+:} false; then :
3945 $as_echo_n "(cached) " >&6
3946else
3947 case $GZIP in
3948 [\\/]* | ?:[\\/]*)
3949 ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
3950 ;;
3951 *)
3952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3953for as_dir in $PATH
3954do
3955 IFS=$as_save_IFS
3956 test -z "$as_dir" && as_dir=.
3957 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 3958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
3959 ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
3960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3961 break 2
3962 fi
3963done
3964 done
3965IFS=$as_save_IFS
3966
3967 ;;
3968esac
3969fi
3970GZIP=$ac_cv_path_GZIP
3971if test -n "$GZIP"; then
3972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
3973$as_echo "$GZIP" >&6; }
3974else
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3976$as_echo "no" >&6; }
3977fi
3978
3979
3980# Extract the first word of "ld", so it can be a program name with args.
3981set dummy ld; ac_word=$2
3982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3983$as_echo_n "checking for $ac_word... " >&6; }
3984if ${ac_cv_path_LD+:} false; then :
3985 $as_echo_n "(cached) " >&6
3986else
3987 case $LD in
3988 [\\/]* | ?:[\\/]*)
3989 ac_cv_path_LD="$LD" # Let the user override the test with a path.
3990 ;;
3991 *)
3992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3993for as_dir in $PATH
3994do
3995 IFS=$as_save_IFS
3996 test -z "$as_dir" && as_dir=.
3997 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 3998 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
3999 ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
4000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4001 break 2
4002 fi
4003done
4004 done
4005IFS=$as_save_IFS
4006
4007 ;;
4008esac
4009fi
4010LD=$ac_cv_path_LD
4011if test -n "$LD"; then
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
4013$as_echo "$LD" >&6; }
4014else
4015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4016$as_echo "no" >&6; }
4017fi
4018
4019
4020# Extract the first word of "ln", so it can be a program name with args.
4021set dummy ln; ac_word=$2
4022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4023$as_echo_n "checking for $ac_word... " >&6; }
4024if ${ac_cv_path_LN+:} false; then :
4025 $as_echo_n "(cached) " >&6
4026else
4027 case $LN in
4028 [\\/]* | ?:[\\/]*)
4029 ac_cv_path_LN="$LN" # Let the user override the test with a path.
4030 ;;
4031 *)
4032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4033for as_dir in $PATH
4034do
4035 IFS=$as_save_IFS
4036 test -z "$as_dir" && as_dir=.
4037 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 4038 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
4039 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4041 break 2
4042 fi
4043done
4044 done
4045IFS=$as_save_IFS
4046
4047 ;;
4048esac
4049fi
4050LN=$ac_cv_path_LN
4051if test -n "$LN"; then
4052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4053$as_echo "$LN" >&6; }
4054else
4055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4056$as_echo "no" >&6; }
4057fi
4058
4059
9964a31a
MS
4060# Extract the first word of "mkdir", so it can be a program name with args.
4061set dummy mkdir; ac_word=$2
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4063$as_echo_n "checking for $ac_word... " >&6; }
4064if ${ac_cv_path_MKDIR+:} false; then :
4065 $as_echo_n "(cached) " >&6
4066else
4067 case $MKDIR in
4068 [\\/]* | ?:[\\/]*)
4069 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4070 ;;
4071 *)
4072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4073for as_dir in $PATH
4074do
4075 IFS=$as_save_IFS
4076 test -z "$as_dir" && as_dir=.
4077 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 4078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9964a31a
MS
4079 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4081 break 2
4082 fi
4083done
4084 done
4085IFS=$as_save_IFS
4086
4087 ;;
4088esac
4089fi
4090MKDIR=$ac_cv_path_MKDIR
4091if test -n "$MKDIR"; then
4092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4093$as_echo "$MKDIR" >&6; }
4094else
4095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4096$as_echo "no" >&6; }
4097fi
4098
4099
d9f356c5
MS
4100# Extract the first word of "mv", so it can be a program name with args.
4101set dummy mv; ac_word=$2
4102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4103$as_echo_n "checking for $ac_word... " >&6; }
4104if ${ac_cv_path_MV+:} false; then :
4105 $as_echo_n "(cached) " >&6
4106else
4107 case $MV in
4108 [\\/]* | ?:[\\/]*)
4109 ac_cv_path_MV="$MV" # Let the user override the test with a path.
4110 ;;
4111 *)
4112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4113for as_dir in $PATH
4114do
4115 IFS=$as_save_IFS
4116 test -z "$as_dir" && as_dir=.
4117 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 4118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
4119 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4121 break 2
4122 fi
4123done
4124 done
4125IFS=$as_save_IFS
4126
4127 ;;
4128esac
4129fi
4130MV=$ac_cv_path_MV
4131if test -n "$MV"; then
4132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4133$as_echo "$MV" >&6; }
4134else
4135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4136$as_echo "no" >&6; }
4137fi
4138
4139
4140# Extract the first word of "rm", so it can be a program name with args.
4141set dummy rm; ac_word=$2
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4143$as_echo_n "checking for $ac_word... " >&6; }
4144if ${ac_cv_path_RM+:} false; then :
4145 $as_echo_n "(cached) " >&6
4146else
4147 case $RM in
4148 [\\/]* | ?:[\\/]*)
4149 ac_cv_path_RM="$RM" # Let the user override the test with a path.
4150 ;;
4151 *)
4152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4153for as_dir in $PATH
4154do
4155 IFS=$as_save_IFS
4156 test -z "$as_dir" && as_dir=.
4157 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 4158 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
4159 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
4160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4161 break 2
4162 fi
4163done
4164 done
4165IFS=$as_save_IFS
4166
4167 ;;
4168esac
4169fi
4170RM=$ac_cv_path_RM
4171if test -n "$RM"; then
4172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
4173$as_echo "$RM" >&6; }
4174else
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4176$as_echo "no" >&6; }
4177fi
4178
4179
4180# Extract the first word of "rmdir", so it can be a program name with args.
4181set dummy rmdir; ac_word=$2
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4183$as_echo_n "checking for $ac_word... " >&6; }
4184if ${ac_cv_path_RMDIR+:} false; then :
4185 $as_echo_n "(cached) " >&6
4186else
4187 case $RMDIR in
4188 [\\/]* | ?:[\\/]*)
4189 ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
4190 ;;
4191 *)
4192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4193for as_dir in $PATH
4194do
4195 IFS=$as_save_IFS
4196 test -z "$as_dir" && as_dir=.
4197 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 4198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
4199 ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
4200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4201 break 2
4202 fi
4203done
4204 done
4205IFS=$as_save_IFS
4206
4207 ;;
4208esac
4209fi
4210RMDIR=$ac_cv_path_RMDIR
4211if test -n "$RMDIR"; then
4212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
4213$as_echo "$RMDIR" >&6; }
4214else
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4216$as_echo "no" >&6; }
4217fi
4218
4219
4220# Extract the first word of "sed", so it can be a program name with args.
4221set dummy sed; ac_word=$2
4222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4223$as_echo_n "checking for $ac_word... " >&6; }
4224if ${ac_cv_path_SED+:} false; then :
4225 $as_echo_n "(cached) " >&6
4226else
4227 case $SED in
4228 [\\/]* | ?:[\\/]*)
4229 ac_cv_path_SED="$SED" # Let the user override the test with a path.
4230 ;;
4231 *)
4232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4233for as_dir in $PATH
4234do
4235 IFS=$as_save_IFS
4236 test -z "$as_dir" && as_dir=.
4237 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 4238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
4239 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4241 break 2
4242 fi
4243done
4244 done
4245IFS=$as_save_IFS
4246
4247 ;;
4248esac
4249fi
4250SED=$ac_cv_path_SED
4251if test -n "$SED"; then
4252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4253$as_echo "$SED" >&6; }
4254else
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4256$as_echo "no" >&6; }
4257fi
4258
4259
4260# Extract the first word of "xdg-open", so it can be a program name with args.
4261set dummy xdg-open; ac_word=$2
4262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4263$as_echo_n "checking for $ac_word... " >&6; }
4264if ${ac_cv_path_XDGOPEN+:} false; then :
4265 $as_echo_n "(cached) " >&6
4266else
4267 case $XDGOPEN in
4268 [\\/]* | ?:[\\/]*)
4269 ac_cv_path_XDGOPEN="$XDGOPEN" # Let the user override the test with a path.
4270 ;;
4271 *)
4272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4273for as_dir in $PATH
4274do
4275 IFS=$as_save_IFS
4276 test -z "$as_dir" && as_dir=.
4277 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 4278 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
4279 ac_cv_path_XDGOPEN="$as_dir/$ac_word$ac_exec_ext"
4280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4281 break 2
4282 fi
4283done
4284 done
4285IFS=$as_save_IFS
4286
4287 ;;
4288esac
4289fi
4290XDGOPEN=$ac_cv_path_XDGOPEN
4291if test -n "$XDGOPEN"; then
4292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDGOPEN" >&5
4293$as_echo "$XDGOPEN" >&6; }
4294else
4295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4296$as_echo "no" >&6; }
4297fi
4298
4299
4300if test "x$XDGOPEN" = x; then
4301 CUPS_HTMLVIEW="htmlview"
4302else
4303 CUPS_HTMLVIEW="$XDGOPEN"
4304fi
4305
4306
4307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for install-sh script" >&5
4308$as_echo_n "checking for install-sh script... " >&6; }
4309INSTALL="`pwd`/install-sh"
4310
4311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $INSTALL" >&5
4312$as_echo "using $INSTALL" >&6; }
4313
4314if test "x$AR" = x; then
4315 as_fn_error $? "Unable to find required library archive command." "$LINENO" 5
4316fi
4317if test "x$CC" = x; then
4318 as_fn_error $? "Unable to find required C compiler command." "$LINENO" 5
4319fi
4320
4321INSTALLSTATIC=""
4322# Check whether --enable-static was given.
4323if test "${enable_static+set}" = set; then :
4324 enableval=$enable_static;
4325fi
4326
4327
4328if test x$enable_static = xyes; then
4329 echo Installing static libraries...
4330 INSTALLSTATIC="installstatic"
4331fi
4332
4333
4334
4335if test -n "$ac_tool_prefix"; then
4336 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4337set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4339$as_echo_n "checking for $ac_word... " >&6; }
4340if ${ac_cv_path_PKGCONFIG+:} false; then :
4341 $as_echo_n "(cached) " >&6
4342else
4343 case $PKGCONFIG in
4344 [\\/]* | ?:[\\/]*)
4345 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
4346 ;;
4347 *)
4348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4349for as_dir in $PATH
4350do
4351 IFS=$as_save_IFS
4352 test -z "$as_dir" && as_dir=.
4353 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 4354 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
4355 ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
4356 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4357 break 2
4358 fi
4359done
4360 done
4361IFS=$as_save_IFS
4362
4363 ;;
4364esac
4365fi
4366PKGCONFIG=$ac_cv_path_PKGCONFIG
4367if test -n "$PKGCONFIG"; then
4368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
4369$as_echo "$PKGCONFIG" >&6; }
4370else
4371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4372$as_echo "no" >&6; }
4373fi
4374
4375
4376fi
4377if test -z "$ac_cv_path_PKGCONFIG"; then
4378 ac_pt_PKGCONFIG=$PKGCONFIG
4379 # Extract the first word of "pkg-config", so it can be a program name with args.
4380set dummy pkg-config; ac_word=$2
4381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4382$as_echo_n "checking for $ac_word... " >&6; }
4383if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
4384 $as_echo_n "(cached) " >&6
4385else
4386 case $ac_pt_PKGCONFIG in
4387 [\\/]* | ?:[\\/]*)
4388 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
4389 ;;
4390 *)
4391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4392for as_dir in $PATH
4393do
4394 IFS=$as_save_IFS
4395 test -z "$as_dir" && as_dir=.
4396 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 4397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
4398 ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
4399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4400 break 2
4401 fi
4402done
4403 done
4404IFS=$as_save_IFS
4405
4406 ;;
4407esac
4408fi
4409ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
4410if test -n "$ac_pt_PKGCONFIG"; then
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
4412$as_echo "$ac_pt_PKGCONFIG" >&6; }
4413else
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4415$as_echo "no" >&6; }
4416fi
4417
4418 if test "x$ac_pt_PKGCONFIG" = x; then
4419 PKGCONFIG=""
4420 else
4421 case $cross_compiling:$ac_tool_warned in
4422yes:)
4423{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4424$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4425ac_tool_warned=yes ;;
4426esac
4427 PKGCONFIG=$ac_pt_PKGCONFIG
4428 fi
4429else
4430 PKGCONFIG="$ac_cv_path_PKGCONFIG"
4431fi
4432
4433
4434
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing abs" >&5
4436$as_echo_n "checking for library containing abs... " >&6; }
4437if ${ac_cv_search_abs+:} false; then :
4438 $as_echo_n "(cached) " >&6
4439else
4440 ac_func_search_save_LIBS=$LIBS
4441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442/* end confdefs.h. */
4443
4444/* Override any GCC internal prototype to avoid an error.
4445 Use char because int might match the return type of a GCC
4446 builtin and then its argument prototype would still apply. */
4447#ifdef __cplusplus
4448extern "C"
4449#endif
4450char abs ();
4451int
4452main ()
4453{
4454return abs ();
4455 ;
4456 return 0;
4457}
4458_ACEOF
4459for ac_lib in '' m; do
4460 if test -z "$ac_lib"; then
4461 ac_res="none required"
4462 else
4463 ac_res=-l$ac_lib
4464 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4465 fi
4466 if ac_fn_c_try_link "$LINENO"; then :
4467 ac_cv_search_abs=$ac_res
4468fi
4469rm -f core conftest.err conftest.$ac_objext \
4470 conftest$ac_exeext
4471 if ${ac_cv_search_abs+:} false; then :
4472 break
4473fi
4474done
4475if ${ac_cv_search_abs+:} false; then :
4476
4477else
4478 ac_cv_search_abs=no
4479fi
4480rm conftest.$ac_ext
4481LIBS=$ac_func_search_save_LIBS
4482fi
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_abs" >&5
4484$as_echo "$ac_cv_search_abs" >&6; }
4485ac_res=$ac_cv_search_abs
4486if test "$ac_res" != no; then :
4487 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4488 $as_echo "#define HAVE_ABS 1" >>confdefs.h
4489
4490fi
4491
4492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
4493$as_echo_n "checking for library containing crypt... " >&6; }
4494if ${ac_cv_search_crypt+:} false; then :
4495 $as_echo_n "(cached) " >&6
4496else
4497 ac_func_search_save_LIBS=$LIBS
4498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4499/* end confdefs.h. */
4500
4501/* Override any GCC internal prototype to avoid an error.
4502 Use char because int might match the return type of a GCC
4503 builtin and then its argument prototype would still apply. */
4504#ifdef __cplusplus
4505extern "C"
4506#endif
4507char crypt ();
4508int
4509main ()
4510{
4511return crypt ();
4512 ;
4513 return 0;
4514}
4515_ACEOF
4516for ac_lib in '' crypt; do
4517 if test -z "$ac_lib"; then
4518 ac_res="none required"
4519 else
4520 ac_res=-l$ac_lib
4521 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4522 fi
4523 if ac_fn_c_try_link "$LINENO"; then :
4524 ac_cv_search_crypt=$ac_res
4525fi
4526rm -f core conftest.err conftest.$ac_objext \
4527 conftest$ac_exeext
4528 if ${ac_cv_search_crypt+:} false; then :
4529 break
4530fi
4531done
4532if ${ac_cv_search_crypt+:} false; then :
4533
4534else
4535 ac_cv_search_crypt=no
4536fi
4537rm conftest.$ac_ext
4538LIBS=$ac_func_search_save_LIBS
4539fi
4540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
4541$as_echo "$ac_cv_search_crypt" >&6; }
4542ac_res=$ac_cv_search_crypt
4543if test "$ac_res" != no; then :
4544 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4545
4546fi
4547
4548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmod" >&5
4549$as_echo_n "checking for library containing fmod... " >&6; }
4550if ${ac_cv_search_fmod+:} false; then :
4551 $as_echo_n "(cached) " >&6
4552else
4553 ac_func_search_save_LIBS=$LIBS
4554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4555/* end confdefs.h. */
4556
4557/* Override any GCC internal prototype to avoid an error.
4558 Use char because int might match the return type of a GCC
4559 builtin and then its argument prototype would still apply. */
4560#ifdef __cplusplus
4561extern "C"
4562#endif
4563char fmod ();
4564int
4565main ()
4566{
4567return fmod ();
4568 ;
4569 return 0;
4570}
4571_ACEOF
4572for ac_lib in '' m; do
4573 if test -z "$ac_lib"; then
4574 ac_res="none required"
4575 else
4576 ac_res=-l$ac_lib
4577 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4578 fi
4579 if ac_fn_c_try_link "$LINENO"; then :
4580 ac_cv_search_fmod=$ac_res
4581fi
4582rm -f core conftest.err conftest.$ac_objext \
4583 conftest$ac_exeext
4584 if ${ac_cv_search_fmod+:} false; then :
4585 break
4586fi
4587done
4588if ${ac_cv_search_fmod+:} false; then :
4589
4590else
4591 ac_cv_search_fmod=no
4592fi
4593rm conftest.$ac_ext
4594LIBS=$ac_func_search_save_LIBS
4595fi
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmod" >&5
4597$as_echo "$ac_cv_search_fmod" >&6; }
4598ac_res=$ac_cv_search_fmod
4599if test "$ac_res" != no; then :
4600 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4601
4602fi
4603
4604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getspent" >&5
4605$as_echo_n "checking for library containing getspent... " >&6; }
4606if ${ac_cv_search_getspent+:} false; then :
4607 $as_echo_n "(cached) " >&6
4608else
4609 ac_func_search_save_LIBS=$LIBS
4610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611/* end confdefs.h. */
4612
4613/* Override any GCC internal prototype to avoid an error.
4614 Use char because int might match the return type of a GCC
4615 builtin and then its argument prototype would still apply. */
4616#ifdef __cplusplus
4617extern "C"
4618#endif
4619char getspent ();
4620int
4621main ()
4622{
4623return getspent ();
4624 ;
4625 return 0;
4626}
4627_ACEOF
4628for ac_lib in '' sec gen; do
4629 if test -z "$ac_lib"; then
4630 ac_res="none required"
4631 else
4632 ac_res=-l$ac_lib
4633 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4634 fi
4635 if ac_fn_c_try_link "$LINENO"; then :
4636 ac_cv_search_getspent=$ac_res
4637fi
4638rm -f core conftest.err conftest.$ac_objext \
4639 conftest$ac_exeext
4640 if ${ac_cv_search_getspent+:} false; then :
4641 break
4642fi
4643done
4644if ${ac_cv_search_getspent+:} false; then :
4645
4646else
4647 ac_cv_search_getspent=no
4648fi
4649rm conftest.$ac_ext
4650LIBS=$ac_func_search_save_LIBS
4651fi
4652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getspent" >&5
4653$as_echo "$ac_cv_search_getspent" >&6; }
4654ac_res=$ac_cv_search_getspent
4655if test "$ac_res" != no; then :
4656 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4657
4658fi
4659
4660
4661LIBMALLOC=""
4662# Check whether --enable-mallinfo was given.
4663if test "${enable_mallinfo+set}" = set; then :
4664 enableval=$enable_mallinfo;
4665fi
4666
4667
4668if test x$enable_mallinfo = xyes; then
4669 SAVELIBS="$LIBS"
4670 LIBS=""
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mallinfo" >&5
4672$as_echo_n "checking for library containing mallinfo... " >&6; }
4673if ${ac_cv_search_mallinfo+:} false; then :
4674 $as_echo_n "(cached) " >&6
4675else
4676 ac_func_search_save_LIBS=$LIBS
4677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678/* end confdefs.h. */
4679
4680/* Override any GCC internal prototype to avoid an error.
4681 Use char because int might match the return type of a GCC
4682 builtin and then its argument prototype would still apply. */
4683#ifdef __cplusplus
4684extern "C"
4685#endif
4686char mallinfo ();
4687int
4688main ()
4689{
4690return mallinfo ();
4691 ;
4692 return 0;
4693}
4694_ACEOF
4695for ac_lib in '' malloc; do
4696 if test -z "$ac_lib"; then
4697 ac_res="none required"
4698 else
4699 ac_res=-l$ac_lib
4700 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4701 fi
4702 if ac_fn_c_try_link "$LINENO"; then :
4703 ac_cv_search_mallinfo=$ac_res
4704fi
4705rm -f core conftest.err conftest.$ac_objext \
4706 conftest$ac_exeext
4707 if ${ac_cv_search_mallinfo+:} false; then :
4708 break
4709fi
4710done
4711if ${ac_cv_search_mallinfo+:} false; then :
4712
4713else
4714 ac_cv_search_mallinfo=no
4715fi
4716rm conftest.$ac_ext
4717LIBS=$ac_func_search_save_LIBS
4718fi
4719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mallinfo" >&5
4720$as_echo "$ac_cv_search_mallinfo" >&6; }
4721ac_res=$ac_cv_search_mallinfo
4722if test "$ac_res" != no; then :
4723 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4724 $as_echo "#define HAVE_MALLINFO 1" >>confdefs.h
4725
4726fi
4727
4728 LIBMALLOC="$LIBS"
4729 LIBS="$SAVELIBS"
4730fi
4731
4732
4733
4734# Check whether --enable-libpaper was given.
4735if test "${enable_libpaper+set}" = set; then :
4736 enableval=$enable_libpaper;
4737fi
4738
4739
4740if test x$enable_libpaper = xyes; then
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systempapername in -lpaper" >&5
4742$as_echo_n "checking for systempapername in -lpaper... " >&6; }
4743if ${ac_cv_lib_paper_systempapername+:} false; then :
4744 $as_echo_n "(cached) " >&6
4745else
4746 ac_check_lib_save_LIBS=$LIBS
4747LIBS="-lpaper $LIBS"
4748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4749/* end confdefs.h. */
4750
4751/* Override any GCC internal prototype to avoid an error.
4752 Use char because int might match the return type of a GCC
4753 builtin and then its argument prototype would still apply. */
4754#ifdef __cplusplus
4755extern "C"
4756#endif
4757char systempapername ();
4758int
4759main ()
4760{
4761return systempapername ();
4762 ;
4763 return 0;
4764}
4765_ACEOF
4766if ac_fn_c_try_link "$LINENO"; then :
4767 ac_cv_lib_paper_systempapername=yes
4768else
4769 ac_cv_lib_paper_systempapername=no
4770fi
4771rm -f core conftest.err conftest.$ac_objext \
4772 conftest$ac_exeext conftest.$ac_ext
4773LIBS=$ac_check_lib_save_LIBS
4774fi
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_paper_systempapername" >&5
4776$as_echo "$ac_cv_lib_paper_systempapername" >&6; }
4777if test "x$ac_cv_lib_paper_systempapername" = xyes; then :
4778 $as_echo "#define HAVE_LIBPAPER 1" >>confdefs.h
4779
4780 LIBPAPER="-lpaper"
4781else
4782 LIBPAPER=""
4783fi
4784
4785else
4786 LIBPAPER=""
4787fi
4788
4789
4790
4791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4792$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4793if ${ac_cv_path_GREP+:} false; then :
4794 $as_echo_n "(cached) " >&6
4795else
4796 if test -z "$GREP"; then
4797 ac_path_GREP_found=false
4798 # Loop through the user's path and test for each of PROGNAME-LIST
4799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4800for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4801do
4802 IFS=$as_save_IFS
4803 test -z "$as_dir" && as_dir=.
4804 for ac_prog in grep ggrep; do
4805 for ac_exec_ext in '' $ac_executable_extensions; do
4806 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3c2cb822 4807 as_fn_executable_p "$ac_path_GREP" || continue
d9f356c5
MS
4808# Check for GNU ac_path_GREP and select it if it is found.
4809 # Check for GNU $ac_path_GREP
4810case `"$ac_path_GREP" --version 2>&1` in
4811*GNU*)
4812 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4813*)
4814 ac_count=0
4815 $as_echo_n 0123456789 >"conftest.in"
4816 while :
4817 do
4818 cat "conftest.in" "conftest.in" >"conftest.tmp"
4819 mv "conftest.tmp" "conftest.in"
4820 cp "conftest.in" "conftest.nl"
4821 $as_echo 'GREP' >> "conftest.nl"
4822 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4823 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4824 as_fn_arith $ac_count + 1 && ac_count=$as_val
4825 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4826 # Best one so far, save it but keep looking for a better one
4827 ac_cv_path_GREP="$ac_path_GREP"
4828 ac_path_GREP_max=$ac_count
4829 fi
4830 # 10*(2^10) chars as input seems more than enough
4831 test $ac_count -gt 10 && break
4832 done
4833 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4834esac
4835
4836 $ac_path_GREP_found && break 3
4837 done
4838 done
4839 done
4840IFS=$as_save_IFS
4841 if test -z "$ac_cv_path_GREP"; then
4842 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4843 fi
4844else
4845 ac_cv_path_GREP=$GREP
4846fi
4847
4848fi
4849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4850$as_echo "$ac_cv_path_GREP" >&6; }
4851 GREP="$ac_cv_path_GREP"
4852
4853
4854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4855$as_echo_n "checking for egrep... " >&6; }
4856if ${ac_cv_path_EGREP+:} false; then :
4857 $as_echo_n "(cached) " >&6
4858else
4859 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4860 then ac_cv_path_EGREP="$GREP -E"
4861 else
4862 if test -z "$EGREP"; then
4863 ac_path_EGREP_found=false
4864 # Loop through the user's path and test for each of PROGNAME-LIST
4865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4866for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4867do
4868 IFS=$as_save_IFS
4869 test -z "$as_dir" && as_dir=.
4870 for ac_prog in egrep; do
4871 for ac_exec_ext in '' $ac_executable_extensions; do
4872 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3c2cb822 4873 as_fn_executable_p "$ac_path_EGREP" || continue
d9f356c5
MS
4874# Check for GNU ac_path_EGREP and select it if it is found.
4875 # Check for GNU $ac_path_EGREP
4876case `"$ac_path_EGREP" --version 2>&1` in
4877*GNU*)
4878 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4879*)
4880 ac_count=0
4881 $as_echo_n 0123456789 >"conftest.in"
4882 while :
4883 do
4884 cat "conftest.in" "conftest.in" >"conftest.tmp"
4885 mv "conftest.tmp" "conftest.in"
4886 cp "conftest.in" "conftest.nl"
4887 $as_echo 'EGREP' >> "conftest.nl"
4888 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4889 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4890 as_fn_arith $ac_count + 1 && ac_count=$as_val
4891 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4892 # Best one so far, save it but keep looking for a better one
4893 ac_cv_path_EGREP="$ac_path_EGREP"
4894 ac_path_EGREP_max=$ac_count
4895 fi
4896 # 10*(2^10) chars as input seems more than enough
4897 test $ac_count -gt 10 && break
4898 done
4899 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4900esac
4901
4902 $ac_path_EGREP_found && break 3
4903 done
4904 done
4905 done
4906IFS=$as_save_IFS
4907 if test -z "$ac_cv_path_EGREP"; then
4908 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4909 fi
4910else
4911 ac_cv_path_EGREP=$EGREP
4912fi
4913
4914 fi
4915fi
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4917$as_echo "$ac_cv_path_EGREP" >&6; }
4918 EGREP="$ac_cv_path_EGREP"
4919
4920
4921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4922$as_echo_n "checking for ANSI C header files... " >&6; }
4923if ${ac_cv_header_stdc+:} false; then :
4924 $as_echo_n "(cached) " >&6
4925else
4926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4927/* end confdefs.h. */
4928#include <stdlib.h>
4929#include <stdarg.h>
4930#include <string.h>
4931#include <float.h>
4932
4933int
4934main ()
4935{
4936
4937 ;
4938 return 0;
4939}
4940_ACEOF
4941if ac_fn_c_try_compile "$LINENO"; then :
4942 ac_cv_header_stdc=yes
4943else
4944 ac_cv_header_stdc=no
4945fi
4946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4947
4948if test $ac_cv_header_stdc = yes; then
4949 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4951/* end confdefs.h. */
4952#include <string.h>
4953
4954_ACEOF
4955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4956 $EGREP "memchr" >/dev/null 2>&1; then :
4957
4958else
4959 ac_cv_header_stdc=no
4960fi
4961rm -f conftest*
4962
4963fi
4964
4965if test $ac_cv_header_stdc = yes; then
4966 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4968/* end confdefs.h. */
4969#include <stdlib.h>
4970
4971_ACEOF
4972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4973 $EGREP "free" >/dev/null 2>&1; then :
4974
4975else
4976 ac_cv_header_stdc=no
4977fi
4978rm -f conftest*
4979
4980fi
4981
4982if test $ac_cv_header_stdc = yes; then
4983 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4984 if test "$cross_compiling" = yes; then :
4985 :
4986else
4987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4988/* end confdefs.h. */
4989#include <ctype.h>
4990#include <stdlib.h>
4991#if ((' ' & 0x0FF) == 0x020)
4992# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4993# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4994#else
4995# define ISLOWER(c) \
4996 (('a' <= (c) && (c) <= 'i') \
4997 || ('j' <= (c) && (c) <= 'r') \
4998 || ('s' <= (c) && (c) <= 'z'))
4999# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5000#endif
5001
5002#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5003int
5004main ()
5005{
5006 int i;
5007 for (i = 0; i < 256; i++)
5008 if (XOR (islower (i), ISLOWER (i))
5009 || toupper (i) != TOUPPER (i))
5010 return 2;
5011 return 0;
5012}
5013_ACEOF
5014if ac_fn_c_try_run "$LINENO"; then :
5015
5016else
5017 ac_cv_header_stdc=no
5018fi
5019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5020 conftest.$ac_objext conftest.beam conftest.$ac_ext
5021fi
5022
5023fi
5024fi
5025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5026$as_echo "$ac_cv_header_stdc" >&6; }
5027if test $ac_cv_header_stdc = yes; then
5028
5029$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5030
5031fi
5032
5033# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5034for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5035 inttypes.h stdint.h unistd.h
5036do :
5037 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5038ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5039"
5040if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5041 cat >>confdefs.h <<_ACEOF
5042#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5043_ACEOF
5044
5045fi
5046
5047done
5048
5049
5050ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
5051if test "x$ac_cv_header_stdlib_h" = xyes; then :
5052 $as_echo "#define HAVE_STDLIB_H 1" >>confdefs.h
5053
5054fi
5055
5056
5057ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
5058if test "x$ac_cv_header_crypt_h" = xyes; then :
5059 $as_echo "#define HAVE_CRYPT_H 1" >>confdefs.h
5060
5061fi
5062
5063
5064ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
5065if test "x$ac_cv_header_langinfo_h" = xyes; then :
5066 $as_echo "#define HAVE_LANGINFO_H 1" >>confdefs.h
5067
5068fi
5069
5070
5071ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
5072if test "x$ac_cv_header_malloc_h" = xyes; then :
5073 $as_echo "#define HAVE_MALLOC_H 1" >>confdefs.h
5074
5075fi
5076
5077
5078ac_fn_c_check_header_mongrel "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
5079if test "x$ac_cv_header_shadow_h" = xyes; then :
5080 $as_echo "#define HAVE_SHADOW_H 1" >>confdefs.h
5081
5082fi
5083
5084
5085ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
5086if test "x$ac_cv_header_stdint_h" = xyes; then :
5087 $as_echo "#define HAVE_STDINT_H 1" >>confdefs.h
5088
5089fi
5090
5091
5092ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
5093if test "x$ac_cv_header_string_h" = xyes; then :
5094 $as_echo "#define HAVE_STRING_H 1" >>confdefs.h
5095
5096fi
5097
5098
5099ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
5100if test "x$ac_cv_header_strings_h" = xyes; then :
5101 $as_echo "#define HAVE_STRINGS_H 1" >>confdefs.h
5102
5103fi
5104
5105
5106ac_fn_c_check_header_mongrel "$LINENO" "bstring.h" "ac_cv_header_bstring_h" "$ac_includes_default"
5107if test "x$ac_cv_header_bstring_h" = xyes; then :
5108 $as_echo "#define HAVE_BSTRING_H 1" >>confdefs.h
5109
5110fi
5111
5112
5113ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
5114if test "x$ac_cv_header_sys_ioctl_h" = xyes; then :
5115 $as_echo "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
5116
5117fi
5118
5119
5120ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
5121if test "x$ac_cv_header_sys_param_h" = xyes; then :
5122 $as_echo "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
5123
5124fi
5125
5126
5127ac_fn_c_check_header_mongrel "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default"
5128if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
5129 $as_echo "#define HAVE_SYS_UCRED_H 1" >>confdefs.h
5130
5131fi
5132
5133
d9f356c5
MS
5134
5135ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
5136if test "x$ac_cv_header_iconv_h" = xyes; then :
5137 SAVELIBS="$LIBS"
5138 LIBS=""
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing iconv_open" >&5
5140$as_echo_n "checking for library containing iconv_open... " >&6; }
5141if ${ac_cv_search_iconv_open+:} false; then :
5142 $as_echo_n "(cached) " >&6
5143else
5144 ac_func_search_save_LIBS=$LIBS
5145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5146/* end confdefs.h. */
5147
5148/* Override any GCC internal prototype to avoid an error.
5149 Use char because int might match the return type of a GCC
5150 builtin and then its argument prototype would still apply. */
5151#ifdef __cplusplus
5152extern "C"
5153#endif
5154char iconv_open ();
5155int
5156main ()
5157{
5158return iconv_open ();
5159 ;
5160 return 0;
5161}
5162_ACEOF
5163for ac_lib in '' iconv; do
5164 if test -z "$ac_lib"; then
5165 ac_res="none required"
5166 else
5167 ac_res=-l$ac_lib
5168 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5169 fi
5170 if ac_fn_c_try_link "$LINENO"; then :
5171 ac_cv_search_iconv_open=$ac_res
5172fi
5173rm -f core conftest.err conftest.$ac_objext \
5174 conftest$ac_exeext
5175 if ${ac_cv_search_iconv_open+:} false; then :
5176 break
5177fi
5178done
5179if ${ac_cv_search_iconv_open+:} false; then :
5180
5181else
5182 ac_cv_search_iconv_open=no
5183fi
5184rm conftest.$ac_ext
5185LIBS=$ac_func_search_save_LIBS
5186fi
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv_open" >&5
5188$as_echo "$ac_cv_search_iconv_open" >&6; }
5189ac_res=$ac_cv_search_iconv_open
5190if test "$ac_res" != no; then :
5191 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5192 $as_echo "#define HAVE_ICONV_H 1" >>confdefs.h
5193
5194 SAVELIBS="$SAVELIBS $LIBS"
5195fi
5196
5197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing libiconv_open" >&5
5198$as_echo_n "checking for library containing libiconv_open... " >&6; }
5199if ${ac_cv_search_libiconv_open+:} false; then :
5200 $as_echo_n "(cached) " >&6
5201else
5202 ac_func_search_save_LIBS=$LIBS
5203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5204/* end confdefs.h. */
5205
5206/* Override any GCC internal prototype to avoid an error.
5207 Use char because int might match the return type of a GCC
5208 builtin and then its argument prototype would still apply. */
5209#ifdef __cplusplus
5210extern "C"
5211#endif
5212char libiconv_open ();
5213int
5214main ()
5215{
5216return libiconv_open ();
5217 ;
5218 return 0;
5219}
5220_ACEOF
5221for ac_lib in '' iconv; do
5222 if test -z "$ac_lib"; then
5223 ac_res="none required"
5224 else
5225 ac_res=-l$ac_lib
5226 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5227 fi
5228 if ac_fn_c_try_link "$LINENO"; then :
5229 ac_cv_search_libiconv_open=$ac_res
5230fi
5231rm -f core conftest.err conftest.$ac_objext \
5232 conftest$ac_exeext
5233 if ${ac_cv_search_libiconv_open+:} false; then :
5234 break
5235fi
5236done
5237if ${ac_cv_search_libiconv_open+:} false; then :
5238
5239else
5240 ac_cv_search_libiconv_open=no
5241fi
5242rm conftest.$ac_ext
5243LIBS=$ac_func_search_save_LIBS
5244fi
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_libiconv_open" >&5
5246$as_echo "$ac_cv_search_libiconv_open" >&6; }
5247ac_res=$ac_cv_search_libiconv_open
5248if test "$ac_res" != no; then :
5249 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5250 $as_echo "#define HAVE_ICONV_H 1" >>confdefs.h
5251
5252 SAVELIBS="$SAVELIBS $LIBS"
5253fi
5254
5255 LIBS="$SAVELIBS"
5256fi
5257
5258
5259
d9f356c5
MS
5260ac_fn_c_check_header_mongrel "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default"
5261if test "x$ac_cv_header_sys_mount_h" = xyes; then :
5262 $as_echo "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h
5263
5264fi
5265
5266
5267ac_fn_c_check_header_mongrel "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
5268if test "x$ac_cv_header_sys_statfs_h" = xyes; then :
5269 $as_echo "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
5270
5271fi
5272
5273
5274ac_fn_c_check_header_mongrel "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default"
5275if test "x$ac_cv_header_sys_statvfs_h" = xyes; then :
5276 $as_echo "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h
5277
5278fi
5279
5280
5281ac_fn_c_check_header_mongrel "$LINENO" "sys/vfs.h" "ac_cv_header_sys_vfs_h" "$ac_includes_default"
5282if test "x$ac_cv_header_sys_vfs_h" = xyes; then :
5283 $as_echo "#define HAVE_SYS_VFS_H 1" >>confdefs.h
5284
5285fi
5286
5287
5288for ac_func in statfs statvfs
5289do :
5290 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5291ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5292if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5293 cat >>confdefs.h <<_ACEOF
5294#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5295_ACEOF
5296
5297fi
5298done
5299
5300
5301for ac_func in strdup strlcat strlcpy
5302do :
5303 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5304ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5305if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5306 cat >>confdefs.h <<_ACEOF
5307#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5308_ACEOF
5309
5310fi
5311done
5312
105922ec 5313if test "$host_os_name" = "hp-ux" -a "$host_os_version" = "1020"; then
d9f356c5
MS
5314 echo Forcing snprintf emulation for HP-UX.
5315else
5316 for ac_func in snprintf vsnprintf
5317do :
5318 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5319ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5320if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5321 cat >>confdefs.h <<_ACEOF
5322#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5323_ACEOF
5324
5325fi
5326done
5327
5328fi
5329
5330for ac_func in random lrand48 arc4random
5331do :
5332 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5333ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5334if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5335 cat >>confdefs.h <<_ACEOF
5336#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5337_ACEOF
5338
5339fi
5340done
5341
5342
5343for ac_func in geteuid
5344do :
5345 ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid"
5346if test "x$ac_cv_func_geteuid" = xyes; then :
5347 cat >>confdefs.h <<_ACEOF
5348#define HAVE_GETEUID 1
5349_ACEOF
5350
5351fi
5352done
5353
5354
5355for ac_func in setpgid
5356do :
5357 ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
5358if test "x$ac_cv_func_setpgid" = xyes; then :
5359 cat >>confdefs.h <<_ACEOF
5360#define HAVE_SETPGID 1
5361_ACEOF
5362
5363fi
5364done
5365
5366
5367for ac_func in vsyslog
5368do :
5369 ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog"
5370if test "x$ac_cv_func_vsyslog" = xyes; then :
5371 cat >>confdefs.h <<_ACEOF
5372#define HAVE_VSYSLOG 1
5373_ACEOF
5374
5375fi
5376done
5377
5378
105922ec 5379case "$host_os_name" in
827bf9ce 5380 linux* | gnu*)
d9f356c5
MS
5381 # Do not use sigset on Linux or GNU HURD
5382 ;;
5383 *)
5384 # Use sigset on other platforms, if available
5385 for ac_func in sigset
5386do :
5387 ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
5388if test "x$ac_cv_func_sigset" = xyes; then :
5389 cat >>confdefs.h <<_ACEOF
5390#define HAVE_SIGSET 1
5391_ACEOF
5392
5393fi
5394done
5395
5396 ;;
5397esac
5398
5399for ac_func in sigaction
5400do :
5401 ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
5402if test "x$ac_cv_func_sigaction" = xyes; then :
5403 cat >>confdefs.h <<_ACEOF
5404#define HAVE_SIGACTION 1
5405_ACEOF
5406
5407fi
5408done
5409
5410
5411for ac_func in waitpid wait3
5412do :
5413 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5414ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5415if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5416 cat >>confdefs.h <<_ACEOF
5417#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5418_ACEOF
5419
5420fi
5421done
5422
5423
5424for ac_func in posix_spawn
5425do :
5426 ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
5427if test "x$ac_cv_func_posix_spawn" = xyes; then :
5428 cat >>confdefs.h <<_ACEOF
5429#define HAVE_POSIX_SPAWN 1
5430_ACEOF
5431
5432fi
5433done
5434
5435
6eb98aee
MS
5436for ac_func in getgrouplist
5437do :
5438 ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
5439if test "x$ac_cv_func_getgrouplist" = xyes; then :
5440 cat >>confdefs.h <<_ACEOF
5441#define HAVE_GETGROUPLIST 1
5442_ACEOF
5443
5444fi
5445done
5446
5447
d9f356c5
MS
5448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff member in tm structure" >&5
5449$as_echo_n "checking for tm_gmtoff member in tm structure... " >&6; }
5450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5451/* end confdefs.h. */
5452#include <time.h>
5453int
5454main ()
5455{
5456struct tm t;
5457 int o = t.tm_gmtoff;
5458 ;
5459 return 0;
5460}
5461_ACEOF
5462if ac_fn_c_try_compile "$LINENO"; then :
5463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5464$as_echo "yes" >&6; }
5465 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
5466
5467else
5468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5469$as_echo "no" >&6; }
5470fi
5471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5472
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_gen member in stat structure" >&5
5474$as_echo_n "checking for st_gen member in stat structure... " >&6; }
5475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476/* end confdefs.h. */
5477#include <sys/stat.h>
5478int
5479main ()
5480{
5481struct stat t;
5482 int o = t.st_gen;
5483 ;
5484 return 0;
5485}
5486_ACEOF
5487if ac_fn_c_try_compile "$LINENO"; then :
5488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5489$as_echo "yes" >&6; }
5490 $as_echo "#define HAVE_ST_GEN 1" >>confdefs.h
5491
5492else
5493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5494$as_echo "no" >&6; }
5495fi
5496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5497
5498for ac_func in removefile
5499do :
5500 ac_fn_c_check_func "$LINENO" "removefile" "ac_cv_func_removefile"
5501if test "x$ac_cv_func_removefile" = xyes; then :
5502 cat >>confdefs.h <<_ACEOF
5503#define HAVE_REMOVEFILE 1
5504_ACEOF
5505
5506fi
5507done
5508
5509
5510# Check whether --enable-libusb was given.
5511if test "${enable_libusb+set}" = set; then :
5512 enableval=$enable_libusb;
5513fi
5514
5515
5516LIBUSB=""
5517USBQUIRKS=""
5518
5519
5520
5521if test "x$PKGCONFIG" != x; then
105922ec 5522 if test x$enable_libusb != xno -a $host_os_name != darwin; then
d9f356c5
MS
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb-1.0" >&5
5524$as_echo_n "checking for libusb-1.0... " >&6; }
5525 if $PKGCONFIG --exists libusb-1.0; then
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5527$as_echo "yes" >&6; }
5528 $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h
5529
5530 CFLAGS="$CFLAGS `$PKGCONFIG --cflags libusb-1.0`"
5531 LIBUSB="`$PKGCONFIG --libs libusb-1.0`"
5532 USBQUIRKS="\$(DATADIR)/usb"
5533 else
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5535$as_echo "no" >&6; }
5536 if test x$enable_libusb = xyes; then
5537 as_fn_error $? "libusb required for --enable-libusb." "$LINENO" 5
5538 fi
5539 fi
5540 fi
5541elif test x$enable_libusb = xyes; then
5542 as_fn_error $? "Need pkg-config to enable libusb support." "$LINENO" 5
5543fi
5544
5545# Check whether --enable-tcp_wrappers was given.
5546if test "${enable_tcp_wrappers+set}" = set; then :
5547 enableval=$enable_tcp_wrappers;
5548fi
5549
5550
5551LIBWRAP=""
5552
5553
5554if test x$enable_tcp_wrappers = xyes; then
5555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hosts_access in -lwrap" >&5
5556$as_echo_n "checking for hosts_access in -lwrap... " >&6; }
5557if ${ac_cv_lib_wrap_hosts_access+:} false; then :
5558 $as_echo_n "(cached) " >&6
5559else
5560 ac_check_lib_save_LIBS=$LIBS
5561LIBS="-lwrap $LIBS"
5562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5563/* end confdefs.h. */
5564
5565/* Override any GCC internal prototype to avoid an error.
5566 Use char because int might match the return type of a GCC
5567 builtin and then its argument prototype would still apply. */
5568#ifdef __cplusplus
5569extern "C"
5570#endif
5571char hosts_access ();
5572int
5573main ()
5574{
5575return hosts_access ();
5576 ;
5577 return 0;
5578}
5579_ACEOF
5580if ac_fn_c_try_link "$LINENO"; then :
5581 ac_cv_lib_wrap_hosts_access=yes
5582else
5583 ac_cv_lib_wrap_hosts_access=no
5584fi
5585rm -f core conftest.err conftest.$ac_objext \
5586 conftest$ac_exeext conftest.$ac_ext
5587LIBS=$ac_check_lib_save_LIBS
5588fi
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wrap_hosts_access" >&5
5590$as_echo "$ac_cv_lib_wrap_hosts_access" >&6; }
5591if test "x$ac_cv_lib_wrap_hosts_access" = xyes; then :
5592
5593 ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
5594if test "x$ac_cv_header_tcpd_h" = xyes; then :
5595 $as_echo "#define HAVE_TCPD_H 1" >>confdefs.h
5596
5597 LIBWRAP="-lwrap"
5598fi
5599
5600
5601fi
5602
5603fi
5604
5605INSTALL_GZIP=""
5606LIBZ=""
5607ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
5608if test "x$ac_cv_header_zlib_h" = xyes; then :
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzgets in -lz" >&5
5610$as_echo_n "checking for gzgets in -lz... " >&6; }
5611if ${ac_cv_lib_z_gzgets+:} false; then :
5612 $as_echo_n "(cached) " >&6
5613else
5614 ac_check_lib_save_LIBS=$LIBS
5615LIBS="-lz $LIBS"
5616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5617/* end confdefs.h. */
5618
5619/* Override any GCC internal prototype to avoid an error.
5620 Use char because int might match the return type of a GCC
5621 builtin and then its argument prototype would still apply. */
5622#ifdef __cplusplus
5623extern "C"
5624#endif
5625char gzgets ();
5626int
5627main ()
5628{
5629return gzgets ();
5630 ;
5631 return 0;
5632}
5633_ACEOF
5634if ac_fn_c_try_link "$LINENO"; then :
5635 ac_cv_lib_z_gzgets=yes
5636else
5637 ac_cv_lib_z_gzgets=no
5638fi
5639rm -f core conftest.err conftest.$ac_objext \
5640 conftest$ac_exeext conftest.$ac_ext
5641LIBS=$ac_check_lib_save_LIBS
5642fi
5643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzgets" >&5
5644$as_echo "$ac_cv_lib_z_gzgets" >&6; }
5645if test "x$ac_cv_lib_z_gzgets" = xyes; then :
5646 $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
5647
5648 LIBZ="-lz"
5649 LIBS="$LIBS -lz"
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
5651$as_echo_n "checking for inflateCopy in -lz... " >&6; }
5652if ${ac_cv_lib_z_inflateCopy+:} false; then :
5653 $as_echo_n "(cached) " >&6
5654else
5655 ac_check_lib_save_LIBS=$LIBS
5656LIBS="-lz $LIBS"
5657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5658/* end confdefs.h. */
5659
5660/* Override any GCC internal prototype to avoid an error.
5661 Use char because int might match the return type of a GCC
5662 builtin and then its argument prototype would still apply. */
5663#ifdef __cplusplus
5664extern "C"
5665#endif
5666char inflateCopy ();
5667int
5668main ()
5669{
5670return inflateCopy ();
5671 ;
5672 return 0;
5673}
5674_ACEOF
5675if ac_fn_c_try_link "$LINENO"; then :
5676 ac_cv_lib_z_inflateCopy=yes
5677else
5678 ac_cv_lib_z_inflateCopy=no
5679fi
5680rm -f core conftest.err conftest.$ac_objext \
5681 conftest$ac_exeext conftest.$ac_ext
5682LIBS=$ac_check_lib_save_LIBS
5683fi
5684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
5685$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
5686if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
5687 $as_echo "#define HAVE_INFLATECOPY 1" >>confdefs.h
5688
5689fi
5690
5691 if test "x$GZIP" != z; then
5692 INSTALL_GZIP="-z"
5693 fi
5694fi
5695
5696fi
5697
5698
5699
5700
5701
105922ec
MS
5702case $host_os_name in
5703 darwin* | *bsd*)
d9f356c5
MS
5704 ARFLAGS="-rcv"
5705 ;;
5706 *)
5707 ARFLAGS="crvs"
5708 ;;
5709esac
5710
5711
5712
5713BACKLIBS=""
5714SERVERLIBS=""
5715
5716
5717
5718SAVELIBS="$LIBS"
5719LIBS=""
5720# Check whether --enable-acl was given.
5721if test "${enable_acl+set}" = set; then :
5722 enableval=$enable_acl;
5723fi
5724
5725if test "x$enable_acl" != xno; then
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_init" >&5
5727$as_echo_n "checking for library containing acl_init... " >&6; }
5728if ${ac_cv_search_acl_init+:} false; then :
5729 $as_echo_n "(cached) " >&6
5730else
5731 ac_func_search_save_LIBS=$LIBS
5732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5733/* end confdefs.h. */
5734
5735/* Override any GCC internal prototype to avoid an error.
5736 Use char because int might match the return type of a GCC
5737 builtin and then its argument prototype would still apply. */
5738#ifdef __cplusplus
5739extern "C"
5740#endif
5741char acl_init ();
5742int
5743main ()
5744{
5745return acl_init ();
5746 ;
5747 return 0;
5748}
5749_ACEOF
5750for ac_lib in '' acl; do
5751 if test -z "$ac_lib"; then
5752 ac_res="none required"
5753 else
5754 ac_res=-l$ac_lib
5755 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5756 fi
5757 if ac_fn_c_try_link "$LINENO"; then :
5758 ac_cv_search_acl_init=$ac_res
5759fi
5760rm -f core conftest.err conftest.$ac_objext \
5761 conftest$ac_exeext
5762 if ${ac_cv_search_acl_init+:} false; then :
5763 break
5764fi
5765done
5766if ${ac_cv_search_acl_init+:} false; then :
5767
5768else
5769 ac_cv_search_acl_init=no
5770fi
5771rm conftest.$ac_ext
5772LIBS=$ac_func_search_save_LIBS
5773fi
5774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_init" >&5
5775$as_echo "$ac_cv_search_acl_init" >&6; }
5776ac_res=$ac_cv_search_acl_init
5777if test "$ac_res" != no; then :
5778 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5779 $as_echo "#define HAVE_ACL_INIT 1" >>confdefs.h
5780
5781fi
5782
5783 SERVERLIBS="$SERVERLIBS $LIBS"
5784fi
5785LIBS="$SAVELIBS"
5786
5787# Check whether --enable-dbus was given.
5788if test "${enable_dbus+set}" = set; then :
5789 enableval=$enable_dbus;
5790fi
5791
5792
5793# Check whether --with-dbusdir was given.
5794if test "${with_dbusdir+set}" = set; then :
5795 withval=$with_dbusdir; DBUSDIR="$withval"
5796fi
5797
5798
5799DBUSDIR=""
5800DBUS_NOTIFIER=""
5801DBUS_NOTIFIERLIBS=""
5802
105922ec 5803if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$host_os_name" != xdarwin; then
d9f356c5
MS
5804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
5805$as_echo_n "checking for DBUS... " >&6; }
5806 if $PKGCONFIG --exists dbus-1; then
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5808$as_echo "yes" >&6; }
5809 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
5810
5811 CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
5812 SERVERLIBS="$SERVERLIBS `$PKGCONFIG --libs dbus-1`"
5813 DBUS_NOTIFIER="dbus"
5814 DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs dbus-1`"
5815 SAVELIBS="$LIBS"
5816 LIBS="$LIBS $DBUS_NOTIFIERLIBS"
5817 ac_fn_c_check_func "$LINENO" "dbus_message_iter_init_append" "ac_cv_func_dbus_message_iter_init_append"
5818if test "x$ac_cv_func_dbus_message_iter_init_append" = xyes; then :
5819 $as_echo "#define HAVE_DBUS_MESSAGE_ITER_INIT_APPEND 1" >>confdefs.h
5820
5821fi
5822
5823 ac_fn_c_check_func "$LINENO" "dbus_threads_init" "ac_cv_func_dbus_threads_init"
5824if test "x$ac_cv_func_dbus_threads_init" = xyes; then :
5825 $as_echo "#define HAVE_DBUS_THREADS_INIT 1" >>confdefs.h
5826
5827fi
5828
5829 LIBS="$SAVELIBS"
5830 if test -d /etc/dbus-1; then
5831 DBUSDIR="/etc/dbus-1"
5832 fi
5833 else
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835$as_echo "no" >&6; }
5836 fi
5837fi
5838
5839
5840
5841
5842
5843CUPS_DEFAULT_PRINTOPERATOR_AUTH="@SYSTEM"
5844CUPS_DEFAULT_SYSTEM_AUTHKEY=""
5845CUPS_SYSTEM_AUTHKEY=""
5846INSTALLXPC=""
5847
105922ec
MS
5848case $host_os_name in
5849 darwin*)
d9f356c5
MS
5850 BACKLIBS="$BACKLIBS -framework IOKit"
5851 SERVERLIBS="$SERVERLIBS -framework IOKit -weak_framework ApplicationServices"
3c2cb822 5852 LIBS="-framework CoreFoundation -framework Security $LIBS"
d9f356c5
MS
5853
5854 ac_fn_c_check_header_mongrel "$LINENO" "ApplicationServices/ApplicationServices.h" "ac_cv_header_ApplicationServices_ApplicationServices_h" "$ac_includes_default"
5855if test "x$ac_cv_header_ApplicationServices_ApplicationServices_h" = xyes; then :
5856 $as_echo "#define HAVE_APPLICATIONSERVICES_H 1" >>confdefs.h
5857
5858fi
5859
5860
5861 ac_fn_c_check_header_mongrel "$LINENO" "CoreFoundation/CoreFoundation.h" "ac_cv_header_CoreFoundation_CoreFoundation_h" "$ac_includes_default"
5862if test "x$ac_cv_header_CoreFoundation_CoreFoundation_h" = xyes; then :
5863 $as_echo "#define HAVE_COREFOUNDATION_H 1" >>confdefs.h
5864
5865fi
5866
5867
d9f356c5 5868
3c2cb822
MS
5869 SAVELIBS="$LIBS"
5870 LIBS="-framework SystemConfiguration $LIBS"
5871 for ac_func in SCDynamicStoreCopyComputerName
d9f356c5
MS
5872do :
5873 ac_fn_c_check_func "$LINENO" "SCDynamicStoreCopyComputerName" "ac_cv_func_SCDynamicStoreCopyComputerName"
5874if test "x$ac_cv_func_SCDynamicStoreCopyComputerName" = xyes; then :
5875 cat >>confdefs.h <<_ACEOF
5876#define HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME 1
5877_ACEOF
5878
3c2cb822
MS
5879 $as_echo "#define HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME 1" >>confdefs.h
5880
5881else
5882
5883 LIBS="$SAVELIBS"
d9f356c5
MS
5884fi
5885done
5886
5887
5888 ac_fn_c_check_header_mongrel "$LINENO" "membership.h" "ac_cv_header_membership_h" "$ac_includes_default"
5889if test "x$ac_cv_header_membership_h" = xyes; then :
5890 $as_echo "#define HAVE_MEMBERSHIP_H 1" >>confdefs.h
5891
5892fi
5893
5894
d9f356c5
MS
5895 for ac_func in mbr_uid_to_uuid
5896do :
5897 ac_fn_c_check_func "$LINENO" "mbr_uid_to_uuid" "ac_cv_func_mbr_uid_to_uuid"
5898if test "x$ac_cv_func_mbr_uid_to_uuid" = xyes; then :
5899 cat >>confdefs.h <<_ACEOF
5900#define HAVE_MBR_UID_TO_UUID 1
5901_ACEOF
5902
5903fi
5904done
5905
5906
5907 ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
5908if test "x$ac_cv_header_dlfcn_h" = xyes; then :
5909 $as_echo "#define HAVE_DLFCN_H 1" >>confdefs.h
5910
5911fi
5912
5913
5914
5915 ac_fn_c_check_header_mongrel "$LINENO" "notify.h" "ac_cv_header_notify_h" "$ac_includes_default"
5916if test "x$ac_cv_header_notify_h" = xyes; then :
5917 $as_echo "#define HAVE_NOTIFY_H 1" >>confdefs.h
5918
5919fi
5920
5921
5922 for ac_func in notify_post
5923do :
5924 ac_fn_c_check_func "$LINENO" "notify_post" "ac_cv_func_notify_post"
5925if test "x$ac_cv_func_notify_post" = xyes; then :
5926 cat >>confdefs.h <<_ACEOF
5927#define HAVE_NOTIFY_POST 1
5928_ACEOF
5929
5930fi
5931done
5932
5933
5934
5935# Check whether --with-adminkey was given.
5936if test "${with_adminkey+set}" = set; then :
5937 withval=$with_adminkey; default_adminkey="$withval"
5938else
5939 default_adminkey="default"
5940fi
5941
5942
5943# Check whether --with-operkey was given.
5944if test "${with_operkey+set}" = set; then :
5945 withval=$with_operkey; default_operkey="$withval"
5946else
5947 default_operkey="default"
5948fi
5949
5950
5951 ac_fn_c_check_header_mongrel "$LINENO" "Security/Authorization.h" "ac_cv_header_Security_Authorization_h" "$ac_includes_default"
5952if test "x$ac_cv_header_Security_Authorization_h" = xyes; then :
5953
5954 $as_echo "#define HAVE_AUTHORIZATION_H 1" >>confdefs.h
5955
5956
5957 if test "x$default_adminkey" != xdefault; then
5958 CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey $default_adminkey"
5959 CUPS_DEFAULT_SYSTEM_AUTHKEY="$default_adminkey"
b94f7488 5960 else
d9f356c5
MS
5961 CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin"
5962 CUPS_DEFAULT_SYSTEM_AUTHKEY="system.print.admin"
d9f356c5
MS
5963 fi
5964
5965 if test "x$default_operkey" != xdefault; then
5966 CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY($default_operkey) @admin @lpadmin"
d9f356c5 5967 else
b94f7488 5968 CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin"
d9f356c5
MS
5969 fi
5970fi
5971
5972
d9f356c5 5973
105922ec 5974 if test $host_os_version -ge 100; then
d9f356c5
MS
5975 ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
5976if test "x$ac_cv_header_sandbox_h" = xyes; then :
5977 $as_echo "#define HAVE_SANDBOX_H 1" >>confdefs.h
5978
5979fi
5980
5981
5982 fi
105922ec 5983 if test $host_os_version -ge 110 -a $host_os_version -lt 120; then
d9f356c5
MS
5984 # Broken public headers in 10.7.x...
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sandbox/private.h presence" >&5
5986$as_echo_n "checking for sandbox/private.h presence... " >&6; }
5987 if test -f /usr/local/include/sandbox/private.h; then
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5989$as_echo "yes" >&6; }
5990 else
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992$as_echo "no" >&6; }
5993 as_fn_error $? "Run 'sudo mkdir -p /usr/local/include/sandbox' and 'sudo touch /usr/local/include/sandbox/private.h' to build CUPS." "$LINENO" 5
5994 fi
5995 fi
5996
5997 ac_fn_c_check_header_mongrel "$LINENO" "xpc/xpc.h" "ac_cv_header_xpc_xpc_h" "$ac_includes_default"
5998if test "x$ac_cv_header_xpc_xpc_h" = xyes; then :
5999 $as_echo "#define HAVE_XPC 1" >>confdefs.h
6000
6001 INSTALLXPC="install-xpc"
6002fi
6003
6004
d9f356c5
MS
6005 ;;
6006esac
6007
6008
6009cat >>confdefs.h <<_ACEOF
6010#define CUPS_DEFAULT_PRINTOPERATOR_AUTH "$CUPS_DEFAULT_PRINTOPERATOR_AUTH"
6011_ACEOF
6012
6013cat >>confdefs.h <<_ACEOF
6014#define CUPS_DEFAULT_SYSTEM_AUTHKEY "$CUPS_DEFAULT_SYSTEM_AUTHKEY"
6015_ACEOF
6016
6017
6018
6019
6020COMPONENTS="all"
6021
6022
6023# Check whether --with-components was given.
6024if test "${with_components+set}" = set; then :
6025 withval=$with_components; COMPONENTS="$withval"
6026fi
6027
6028
58b64dbb
MS
6029cupsimagebase="cupsimage"
6030LIBCUPSOBJS="\$(COREOBJS) \$(DRIVEROBJS)"
ffbf1e61
MS
6031LIBHEADERS="\$(COREHEADERS) \$(DRIVERHEADERS)"
6032LIBHEADERSPRIV="\$(COREHEADERSPRIV) \$(DRIVERHEADERSPRIV)"
6033
d9f356c5
MS
6034case "$COMPONENTS" in
6035 all)
171c38f2 6036 BUILDDIRS="test filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
d9f356c5
MS
6037 ;;
6038
6039 core)
171c38f2
MS
6040 BUILDDIRS="test locale"
6041 ;;
6042
6043 libcups)
6044 BUILDDIRS="locale"
58b64dbb
MS
6045 cupsimagebase=""
6046 ;;
6047
6048 libcupslite)
6049 BUILDDIRS="locale"
6050 cupsimagebase=""
6051 LIBCUPSOBJS="\$(COREOBJS)"
ffbf1e61
MS
6052 LIBHEADERS="\$(COREHEADERS)"
6053 LIBHEADERSPRIV="\$(COREHEADERSPRIV)"
d9f356c5
MS
6054 ;;
6055
6056 *)
6057 as_fn_error $? "Bad build component \"$COMPONENT\" specified!" "$LINENO" 5
6058 ;;
6059esac
6060
6061
6062
6063
6064
6065
58b64dbb 6066
ffbf1e61
MS
6067
6068
d9f356c5
MS
6069if test "$prefix" = "NONE"; then
6070 prefix="/"
6071fi
6072
6073if test "$exec_prefix" = "NONE"; then
6074 if test "$prefix" = "/"; then
6075 exec_prefix="/usr"
6076 else
6077 exec_prefix="$prefix"
6078 fi
6079fi
6080
6081if test "$bindir" = "\${exec_prefix}/bin"; then
6082 bindir="$exec_prefix/bin"
6083fi
6084
6085cat >>confdefs.h <<_ACEOF
6086#define CUPS_BINDIR "$bindir"
6087_ACEOF
6088
6089
6090if test "$sbindir" = "\${exec_prefix}/sbin"; then
6091 sbindir="$exec_prefix/sbin"
6092fi
6093
6094cat >>confdefs.h <<_ACEOF
6095#define CUPS_SBINDIR "$sbindir"
6096_ACEOF
6097
6098
6099if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then
6100 sharedstatedir="/usr/com"
6101fi
6102
6103if test "$datarootdir" = "\${prefix}/share"; then
6104 if test "$prefix" = "/"; then
6105 datarootdir="/usr/share"
6106 else
6107 datarootdir="$prefix/share"
6108 fi
6109fi
6110
6111if test "$datadir" = "\${prefix}/share"; then
6112 if test "$prefix" = "/"; then
6113 datadir="/usr/share"
6114 else
6115 datadir="$prefix/share"
6116 fi
6117elif test "$datadir" = "\${datarootdir}"; then
6118 datadir="$datarootdir"
6119fi
6120
6121if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then
6122 includedir="/usr/include"
6123fi
6124
6125if test "$localstatedir" = "\${prefix}/var"; then
6126 if test "$prefix" = "/"; then
105922ec 6127 if test "$host_os_name" = darwin; then
d9f356c5
MS
6128 localstatedir="/private/var"
6129 else
6130 localstatedir="/var"
6131 fi
6132 else
6133 localstatedir="$prefix/var"
6134 fi
6135fi
6136
6137if test "$sysconfdir" = "\${prefix}/etc"; then
6138 if test "$prefix" = "/"; then
105922ec 6139 if test "$host_os_name" = darwin; then
d9f356c5
MS
6140 sysconfdir="/private/etc"
6141 else
6142 sysconfdir="/etc"
6143 fi
6144 else
6145 sysconfdir="$prefix/etc"
6146 fi
6147fi
6148
6149if test "$libdir" = "\${exec_prefix}/lib"; then
105922ec
MS
6150 case "$host_os_name" in
6151 linux*)
d9f356c5
MS
6152 if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
6153 libdir="$exec_prefix/lib64"
6154 fi
6155 ;;
6156 esac
6157fi
6158
6159
6160# Check whether --with-privateinclude was given.
6161if test "${with_privateinclude+set}" = set; then :
6162 withval=$with_privateinclude; privateinclude="$withval"
6163else
6164 privateinclude=""
6165fi
6166
6167if test "x$privateinclude" != x -a "x$privateinclude" != xnone; then
6168 PRIVATEINCLUDE="$privateinclude/cups"
6169else
6170 privateinclude=""
6171 PRIVATEINCLUDE=""
6172fi
6173
6174
6175
6176
6177# Check whether --with-lpdconfig was given.
6178if test "${with_lpdconfig+set}" = set; then :
6179 withval=$with_lpdconfig; LPDCONFIG="$withval"
6180else
6181 LPDCONFIG=""
6182fi
6183
6184
6185if test "x$LPDCONFIG" = x; then
6186 if test -f /System/Library/LaunchDaemons/org.cups.cups-lpd.plist; then
6187 LPDCONFIG="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
6188 elif test "x$XINETD" != x; then
6189 LPDCONFIG="xinetd://$XINETD/cups-lpd"
6190 fi
6191fi
6192
6193if test "x$LPDCONFIG" = xoff; then
6194 cat >>confdefs.h <<_ACEOF
6195#define CUPS_DEFAULT_LPD_CONFIG ""
6196_ACEOF
6197
6198else
6199 cat >>confdefs.h <<_ACEOF
6200#define CUPS_DEFAULT_LPD_CONFIG "$LPDCONFIG"
6201_ACEOF
6202
6203fi
6204
6205
6206# Check whether --with-smbconfig was given.
6207if test "${with_smbconfig+set}" = set; then :
6208 withval=$with_smbconfig; SMBCONFIG="$withval"
6209else
6210 SMBCONFIG=""
6211fi
6212
6213
6214if test "x$SMBCONFIG" = x; then
6215 if test -f /System/Library/LaunchDaemons/smbd.plist; then
6216 SMBCONFIG="launchd:///System/Library/LaunchDaemons/smbd.plist"
6217 else
6218 for dir in /etc /etc/samba /usr/local/etc; do
6219 if test -f $dir/smb.conf; then
6220 SMBCONFIG="samba://$dir/smb.conf"
6221 break
6222 fi
6223 done
6224 fi
6225fi
6226
6227if test "x$SMBCONFIG" = xoff; then
6228 cat >>confdefs.h <<_ACEOF
6229#define CUPS_DEFAULT_SMB_CONFIG ""
6230_ACEOF
6231
6232else
6233 cat >>confdefs.h <<_ACEOF
6234#define CUPS_DEFAULT_SMB_CONFIG "$SMBCONFIG"
6235_ACEOF
6236
6237fi
6238
6239# Cache data...
6240
6241# Check whether --with-cachedir was given.
6242if test "${with_cachedir+set}" = set; then :
6243 withval=$with_cachedir; cachedir="$withval"
6244else
6245 cachedir=""
6246fi
6247
6248
6249if test x$cachedir = x; then
105922ec 6250 if test "x$host_os_name" = xdarwin; then
d9f356c5
MS
6251 CUPS_CACHEDIR="$localstatedir/spool/cups/cache"
6252 else
6253 CUPS_CACHEDIR="$localstatedir/cache/cups"
6254 fi
6255else
6256 CUPS_CACHEDIR="$cachedir"
6257fi
6258cat >>confdefs.h <<_ACEOF
6259#define CUPS_CACHEDIR "$CUPS_CACHEDIR"
6260_ACEOF
6261
6262
6263
6264# Data files
6265CUPS_DATADIR="$datadir/cups"
6266cat >>confdefs.h <<_ACEOF
6267#define CUPS_DATADIR "$datadir/cups"
6268_ACEOF
6269
6270
6271
6272# Icon directory
6273
6274# Check whether --with-icondir was given.
6275if test "${with_icondir+set}" = set; then :
6276 withval=$with_icondir; icondir="$withval"
6277else
6278 icondir=""
6279fi
6280
6281
6282if test "x$icondir" = x -a -d /usr/share/icons; then
6283 ICONDIR="/usr/share/icons"
6284else
6285 ICONDIR="$icondir"
6286fi
6287
6288
6289
6290# Menu directory
6291
6292# Check whether --with-menudir was given.
6293if test "${with_menudir+set}" = set; then :
6294 withval=$with_menudir; menudir="$withval"
6295else
6296 menudir=""
6297fi
6298
6299
6300if test "x$menudir" = x -a -d /usr/share/applications; then
6301 MENUDIR="/usr/share/applications"
6302else
6303 MENUDIR="$menudir"
6304fi
6305
6306
6307
6308# Documentation files
6309
6310# Check whether --with-docdir was given.
6311if test "${with_docdir+set}" = set; then :
6312 withval=$with_docdir; docdir="$withval"
6313else
6314 docdir=""
6315fi
6316
6317
6318if test x$docdir = x; then
6319 CUPS_DOCROOT="$datadir/doc/cups"
6320 docdir="$datadir/doc/cups"
6321else
6322 CUPS_DOCROOT="$docdir"
6323fi
6324
6325cat >>confdefs.h <<_ACEOF
6326#define CUPS_DOCROOT "$docdir"
6327_ACEOF
6328
6329
6330
6331# Fonts
6332
6333# Check whether --with-fontpath was given.
6334if test "${with_fontpath+set}" = set; then :
6335 withval=$with_fontpath; fontpath="$withval"
6336else
6337 fontpath=""
6338fi
6339
6340
6341if test "x$fontpath" = "x"; then
6342 CUPS_FONTPATH="$datadir/cups/fonts"
6343else
6344 CUPS_FONTPATH="$fontpath"
6345fi
6346
6347
6348cat >>confdefs.h <<_ACEOF
6349#define CUPS_FONTPATH "$CUPS_FONTPATH"
6350_ACEOF
6351
6352
6353# Locale data
6354if test "$localedir" = "\${datarootdir}/locale"; then
105922ec 6355 case "$host_os_name" in
827bf9ce 6356 linux* | gnu* | *bsd* | darwin*)
d9f356c5
MS
6357 CUPS_LOCALEDIR="$datarootdir/locale"
6358 ;;
6359
6360 *)
6361 # This is the standard System V location...
6362 CUPS_LOCALEDIR="$exec_prefix/lib/locale"
6363 ;;
6364 esac
6365else
6366 CUPS_LOCALEDIR="$localedir"
6367fi
6368
6369cat >>confdefs.h <<_ACEOF
6370#define CUPS_LOCALEDIR "$CUPS_LOCALEDIR"
6371_ACEOF
6372
6373
6374
6375# Log files...
6376
6377# Check whether --with-logdir was given.
6378if test "${with_logdir+set}" = set; then :
6379 withval=$with_logdir; logdir="$withval"
6380else
6381 logdir=""
6382fi
6383
6384
6385if test x$logdir = x; then
6386 CUPS_LOGDIR="$localstatedir/log/cups"
6387 cat >>confdefs.h <<_ACEOF
6388#define CUPS_LOGDIR "$localstatedir/log/cups"
6389_ACEOF
6390
6391else
6392 CUPS_LOGDIR="$logdir"
6393fi
6394cat >>confdefs.h <<_ACEOF
6395#define CUPS_LOGDIR "$CUPS_LOGDIR"
6396_ACEOF
6397
6398
6399
6400# Longer-term spool data
6401CUPS_REQUESTS="$localstatedir/spool/cups"
6402cat >>confdefs.h <<_ACEOF
6403#define CUPS_REQUESTS "$localstatedir/spool/cups"
6404_ACEOF
6405
6406
6407
6408# Server executables...
105922ec
MS
6409case "$host_os_name" in
6410 *bsd* | darwin*)
d4874933 6411 # *BSD and Darwin (macOS)
d9f356c5
MS
6412 INSTALL_SYSV=""
6413 CUPS_SERVERBIN="$exec_prefix/libexec/cups"
6414 ;;
6415 *)
6416 # All others
6417 INSTALL_SYSV="install-sysv"
6418 CUPS_SERVERBIN="$exec_prefix/lib/cups"
6419 ;;
6420esac
6421
6422cat >>confdefs.h <<_ACEOF
6423#define CUPS_SERVERBIN "$CUPS_SERVERBIN"
6424_ACEOF
6425
6426
6427
6428
6429# Configuration files
6430CUPS_SERVERROOT="$sysconfdir/cups"
6431cat >>confdefs.h <<_ACEOF
6432#define CUPS_SERVERROOT "$sysconfdir/cups"
6433_ACEOF
6434
6435
6436
6437# Transient run-time state
6438
6439# Check whether --with-rundir was given.
6440if test "${with_rundir+set}" = set; then :
6441 withval=$with_rundir; CUPS_STATEDIR="$withval"
6442else
6443
105922ec
MS
6444 case "$host_os_name" in
6445 darwin*)
8072030b 6446 # Darwin (macOS)
d9f356c5
MS
6447 CUPS_STATEDIR="$CUPS_SERVERROOT"
6448 ;;
6449 *)
6450 # All others
6451 CUPS_STATEDIR="$localstatedir/run/cups"
6452 ;;
6453 esac
6454fi
6455
6456cat >>confdefs.h <<_ACEOF
6457#define CUPS_STATEDIR "$CUPS_STATEDIR"
6458_ACEOF
6459
6460
6461
6462
d9f356c5
MS
6463if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
6464 # New GNU "standards" break previous ones, so make sure we use
6465 # the right default location for the operating system...
6466 mandir="\${prefix}/man"
6467fi
6468
6469if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
105922ec 6470 case "$host_os_name" in
4466c8ca 6471 darwin* | linux* | gnu* | *bsd*)
d4874933 6472 # Darwin, macOS, Linux, GNU HURD, and *BSD
d9f356c5
MS
6473 mandir="/usr/share/man"
6474 AMANDIR="/usr/share/man"
6475 PMANDIR="/usr/share/man"
6476 ;;
6477 *)
6478 # All others
6479 mandir="/usr/man"
6480 AMANDIR="/usr/man"
6481 PMANDIR="/usr/man"
6482 ;;
6483 esac
6484else
6485 AMANDIR="$mandir"
6486 PMANDIR="$mandir"
6487fi
6488
6489
6490
6491
105922ec
MS
6492case "$host_os_name" in
6493 sunos*)
d9f356c5
MS
6494 # Solaris
6495 MAN1EXT=1
6496 MAN5EXT=5
6497 MAN7EXT=7
6498 MAN8EXT=1m
6499 MAN8DIR=1m
6500 ;;
105922ec 6501 linux* | gnu* | darwin*)
8072030b 6502 # Linux, GNU Hurd, and macOS
d9f356c5
MS
6503 MAN1EXT=1.gz
6504 MAN5EXT=5.gz
6505 MAN7EXT=7.gz
6506 MAN8EXT=8.gz
6507 MAN8DIR=8
6508 ;;
6509 *)
6510 # All others
6511 MAN1EXT=1
6512 MAN5EXT=5
6513 MAN7EXT=7
6514 MAN8EXT=8
6515 MAN8DIR=8
6516 ;;
6517esac
6518
6519
6520
6521
6522
6523
6524
6525
6526
d9f356c5
MS
6527PICFLAG=1
6528DSOFLAGS="${DSOFLAGS:=}"
6529
6530# Check whether --enable-shared was given.
6531if test "${enable_shared+set}" = set; then :
6532 enableval=$enable_shared;
6533fi
6534
6535
6536cupsbase="cups"
6537LIBCUPSBASE="lib$cupsbase"
58b64dbb 6538LIBCUPSIMAGE=""
d9f356c5
MS
6539LIBCUPSSTATIC="lib$cupsbase.a"
6540
6541if test x$enable_shared != xno; then
105922ec
MS
6542 case "$host_os_name" in
6543 sunos*)
d9f356c5 6544 LIBCUPS="lib$cupsbase.so.2"
58b64dbb
MS
6545 if test "x$cupsimagebase" != x; then
6546 LIBCUPSIMAGE="lib$cupsimagebase.so.2"
6547 fi
d9f356c5
MS
6548 DSO="\$(CC)"
6549 DSOXX="\$(CXX)"
f518bf7e 6550 DSOFLAGS="$DSOFLAGS -Wl,-h\`basename \$@\` -G"
d9f356c5 6551 ;;
827bf9ce 6552 linux* | gnu* | *bsd*)
d9f356c5 6553 LIBCUPS="lib$cupsbase.so.2"
58b64dbb
MS
6554 if test "x$cupsimagebase" != x; then
6555 LIBCUPSIMAGE="lib$cupsimagebase.so.2"
6556 fi
d9f356c5
MS
6557 DSO="\$(CC)"
6558 DSOXX="\$(CXX)"
f518bf7e 6559 DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared"
d9f356c5 6560 ;;
105922ec 6561 darwin*)
d9f356c5 6562 LIBCUPS="lib$cupsbase.2.dylib"
58b64dbb
MS
6563 if test "x$cupsimagebase" != x; then
6564 LIBCUPSIMAGE="lib$cupsimagebase.2.dylib"
6565 fi
d9f356c5
MS
6566 DSO="\$(CC)"
6567 DSOXX="\$(CXX)"
f518bf7e 6568 DSOFLAGS="$DSOFLAGS -Wl,-no_warn_inits -dynamiclib -single_module -lc"
d9f356c5
MS
6569 ;;
6570 *)
6571 echo "Warning: shared libraries may not be supported. Trying -shared"
6572 echo " option with compiler."
6573 LIBCUPS="lib$cupsbase.so.2"
58b64dbb
MS
6574 if test "x$cupsimagebase" != x; then
6575 LIBCUPSIMAGE="lib$cupsimagebase.so.2"
6576 fi
d9f356c5
MS
6577 DSO="\$(CC)"
6578 DSOXX="\$(CXX)"
f518bf7e 6579 DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared"
d9f356c5
MS
6580 ;;
6581 esac
6582else
6583 PICFLAG=0
6584 LIBCUPS="lib$cupsbase.a"
58b64dbb
MS
6585 if test "x$cupsimagebase" != x; then
6586 LIBCUPSIMAGE="lib$cupsimagebase.a"
6587 fi
d9f356c5
MS
6588 DSO=":"
6589 DSOXX=":"
6590fi
6591
6592
6593
6594
6595
6596
6597
6598
6599
d9f356c5
MS
6600if test x$enable_shared = xno; then
6601 LINKCUPS="../cups/lib$cupsbase.a"
d9f356c5 6602 EXTLINKCUPS="-lcups"
58b64dbb
MS
6603
6604 if test "x$cupsimagebase" != x; then
6605 LINKCUPSIMAGE="../cups/lib$cupsimagebase.a"
6606 EXTLINKCUPSIMAGE="-l$cupsimagebase"
6607 else
6608 LINKCUPSIMAGE=""
6609 EXTLINKCUPSIMAGE=""
6610 fi
d9f356c5
MS
6611else
6612 LINKCUPS="-l${cupsbase}"
d9f356c5 6613 EXTLINKCUPS="-lcups"
58b64dbb
MS
6614
6615 if test "x$cupsimagebase" != x; then
6616 LINKCUPSIMAGE="-l$cupsimagebase"
6617 EXTLINKCUPSIMAGE="-l$cupsimagebase"
6618 else
6619 LINKCUPSIMAGE=""
6620 EXTLINKCUPSIMAGE=""
6621 fi
d9f356c5
MS
6622fi
6623
6624
6625
6626
6627
6628
6629EXPORT_LDFLAGS=""
6630
6631if test "$DSO" != ":"; then
6632 # When using DSOs the image libraries are linked to libcupsimage.so
6633 # rather than to the executables. This makes things smaller if you
6634 # are using any static libraries, and it also allows us to distribute
6635 # a single DSO rather than a bunch...
6636 DSOLIBS="\$(LIBZ)"
6637 IMGLIBS=""
6638
6639 # Tell the run-time linkers where to find a DSO. Some platforms
6640 # need this option, even when the library is installed in a
6641 # standard location...
105922ec
MS
6642 case $host_os_name in
6643 sunos*)
d9f356c5
MS
6644 # Solaris...
6645 if test $exec_prefix != /usr; then
6646 DSOFLAGS="-R$libdir $DSOFLAGS"
6647 LDFLAGS="$LDFLAGS -R$libdir"
6648 EXPORT_LDFLAGS="-R$libdir"
6649 fi
6650 ;;
105922ec 6651 *bsd*)
d9f356c5
MS
6652 # *BSD...
6653 if test $exec_prefix != /usr; then
6654 DSOFLAGS="-Wl,-R$libdir $DSOFLAGS"
6655 LDFLAGS="$LDFLAGS -Wl,-R$libdir"
6656 EXPORT_LDFLAGS="-Wl,-R$libdir"
6657 fi
6658 ;;
827bf9ce 6659 linux* | gnu*)
d9f356c5
MS
6660 # Linux, and HURD...
6661 if test $exec_prefix != /usr; then
6662 DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
6663 LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
6664 EXPORT_LDFLAGS="-Wl,-rpath,$libdir"
6665 fi
6666 ;;
6667 esac
6668else
6669 DSOLIBS=""
6670 IMGLIBS="\$(LIBZ)"
6671fi
6672
6673
6674
6675
6676
6677
d9f356c5
MS
6678# Check whether --enable-libtool_unsupported was given.
6679if test "${enable_libtool_unsupported+set}" = set; then :
6680 enableval=$enable_libtool_unsupported; if test x$enable_libtool_unsupported != xno; then
a621d151
MS
6681 if test x$enable_libtool_unsupported == xyes; then
6682 as_fn_error $? "Use --enable-libtool-unsupported=/path/to/libtool." "$LINENO" 5
6683 fi
d9f356c5
MS
6684 LIBTOOL="$enable_libtool_unsupported"
6685 enable_shared=no
6686 echo "WARNING: libtool is not supported or endorsed by Apple Inc."
6687 echo " WE DO NOT PROVIDE SUPPORT FOR LIBTOOL PROBLEMS."
6688 else
6689 LIBTOOL=""
6690 fi
6691fi
6692
6693
d9f356c5 6694if test x$LIBTOOL != x; then
b94f7488
MS
6695 DSO="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
6696 DSOXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
6697
07cb7247
MS
6698 LD_CC="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
6699 LD_CXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
6700
d9f356c5 6701 LIBCUPS="libcups.la"
b94f7488 6702 LIBCUPSSTATIC="libcups.la"
a621d151 6703 LIBCUPSCGI="libcupscgi.la"
d9f356c5 6704 LIBCUPSIMAGE="libcupsimage.la"
a621d151
MS
6705 LIBCUPSMIME="libcupsmime.la"
6706 LIBCUPSPPDC="libcupsppdc.la"
6707
b94f7488
MS
6708 LIBTOOL_CC="\$(LIBTOOL) --mode=compile --tag=CC"
6709 LIBTOOL_CXX="\$(LIBTOOL) --mode=compile --tag=CXX"
6710 LIBTOOL_INSTALL="\$(LIBTOOL) --mode=install"
a621d151 6711
d9f356c5 6712 LINKCUPS="../cups/\$(LIBCUPS)"
123979a9 6713 LINKCUPSIMAGE="../cups/\$(LIBCUPSIMAGE)"
a621d151 6714
a621d151 6715else
07cb7247
MS
6716 LD_CC="\$(CC)"
6717 LD_CXX="\$(CXX)"
6718
b94f7488
MS
6719 LIBTOOL_CC=""
6720 LIBTOOL_CXX=""
6721 LIBTOOL_INSTALL=""
d9f356c5
MS
6722fi
6723
6724
a621d151
MS
6725
6726
6727
6728
6729
b94f7488
MS
6730
6731
07cb7247 6732
d9f356c5 6733INSTALL_STRIP=""
d9f356c5
MS
6734
6735
6736
6737# Check whether --with-optim was given.
6738if test "${with_optim+set}" = set; then :
f518bf7e
MS
6739 withval=$with_optim; OPTIM="$withval"
6740else
6741 OPTIM=""
d9f356c5
MS
6742fi
6743
f518bf7e
MS
6744
6745
d9f356c5
MS
6746# Check whether --enable-debug was given.
6747if test "${enable_debug+set}" = set; then :
6748 enableval=$enable_debug;
6749fi
6750
6751# Check whether --enable-debug_guards was given.
6752if test "${enable_debug_guards+set}" = set; then :
6753 enableval=$enable_debug_guards;
6754fi
6755
6756# Check whether --enable-debug_printfs was given.
6757if test "${enable_debug_printfs+set}" = set; then :
6758 enableval=$enable_debug_printfs;
6759fi
6760
6761# Check whether --enable-unit_tests was given.
6762if test "${enable_unit_tests+set}" = set; then :
6763 enableval=$enable_unit_tests;
6764fi
6765
6766
f518bf7e 6767if test x$enable_debug = xyes -a "x$OPTIM" = x; then
d9f356c5
MS
6768 OPTIM="-g"
6769else
6770 INSTALL_STRIP="-s"
6771fi
6772
6773if test x$enable_debug_printfs = xyes; then
6774 CFLAGS="$CFLAGS -DDEBUG"
6775 CXXFLAGS="$CXXFLAGS -DDEBUG"
6776fi
6777
6778if test x$enable_debug_guards = xyes; then
6779 CFLAGS="$CFLAGS -DDEBUG_GUARDS"
6780 CXXFLAGS="$CXXFLAGS -DDEBUG_GUARDS"
6781fi
6782
6783if test x$enable_unit_tests = xyes; then
105922ec
MS
6784 if test "$build" != "$host"; then
6785 as_fn_error $? "Sorry, cannot build unit tests when cross-compiling." "$LINENO" 5
6786 fi
6787
d9f356c5
MS
6788 UNITTESTS="unittests"
6789else
6790 UNITTESTS=""
6791fi
6792
6793
6794
6795# Check whether --with-archflags was given.
6796if test "${with_archflags+set}" = set; then :
6797 withval=$with_archflags;
6798fi
6799
6800
6801# Check whether --with-ldarchflags was given.
6802if test "${with_ldarchflags+set}" = set; then :
6803 withval=$with_ldarchflags;
6804fi
6805
6806
6807if test -z "$with_archflags"; then
6808 ARCHFLAGS=""
6809else
6810 ARCHFLAGS="$with_archflags"
6811fi
6812
6813if test -z "$with_ldarchflags"; then
105922ec 6814 if test "$host_os_name" = darwin; then
d9f356c5
MS
6815 # Only create Intel programs by default
6816 LDARCHFLAGS="`echo $ARCHFLAGS | sed -e '1,$s/-arch ppc64//'`"
6817 else
6818 LDARCHFLAGS="$ARCHFLAGS"
6819 fi
6820else
6821 LDARCHFLAGS="$with_ldarchflags"
6822fi
6823
6824
6825
6826
6827# Check whether --enable-relro was given.
6828if test "${enable_relro+set}" = set; then :
6829 enableval=$enable_relro;
6830fi
6831
6832
f518bf7e
MS
6833# Check whether --enable-sanitizer was given.
6834if test "${enable_sanitizer+set}" = set; then :
6835 enableval=$enable_sanitizer;
6836fi
6837
6838
d9f356c5
MS
6839CXXLIBS="${CXXLIBS:=}"
6840
6841
6842PIEFLAGS=""
6843
6844
6845RELROFLAGS=""
6846
6847
f518bf7e
MS
6848WARNING_OPTIONS=""
6849
6850
d9f356c5
MS
6851if test -n "$GCC"; then
6852 # Add GCC-specific compiler options...
f518bf7e
MS
6853
6854 # Address sanitizer is a useful tool to use when developing/debugging
6855 # code but adds about 2x overhead...
ef4e12b3
MS
6856 if test x$enable_sanitizer = xyes; then
6857 # Use -fsanitize=address with debugging...
f518bf7e 6858 OPTIM="$OPTIM -g -fsanitize=address"
ef4e12b3
MS
6859 else
6860 # Otherwise use the Fortify enhancements to catch any unbounded
6861 # string operations...
6862 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
6863 CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
6864 fi
f518bf7e
MS
6865
6866 # Default optimization options...
d9f356c5 6867 if test -z "$OPTIM"; then
f518bf7e
MS
6868 # Default to optimize-for-size and debug
6869 OPTIM="-Os -g"
d9f356c5
MS
6870 fi
6871
6872 # Generate position-independent code as needed...
6873 if test $PICFLAG = 1; then
6874 OPTIM="-fPIC $OPTIM"
6875 fi
6876
6877 # The -fstack-protector option is available with some versions of
6878 # GCC and adds "stack canaries" which detect when the return address
6879 # has been overwritten, preventing many types of exploit attacks.
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -fstack-protector" >&5
6881$as_echo_n "checking whether compiler supports -fstack-protector... " >&6; }
6882 OLDCFLAGS="$CFLAGS"
6883 CFLAGS="$CFLAGS -fstack-protector"
6884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6885/* end confdefs.h. */
6886
6887int
6888main ()
6889{
6890
6891 ;
6892 return 0;
6893}
6894_ACEOF
6895if ac_fn_c_try_link "$LINENO"; then :
6896 if test "x$LSB_BUILD" = xy; then
6897 # Can't use stack-protector with LSB binaries...
6898 OPTIM="$OPTIM -fno-stack-protector"
6899 else
6900 OPTIM="$OPTIM -fstack-protector"
6901 fi
6902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6903$as_echo "yes" >&6; }
6904else
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6906$as_echo "no" >&6; }
6907fi
6908rm -f core conftest.err conftest.$ac_objext \
6909 conftest$ac_exeext conftest.$ac_ext
6910 CFLAGS="$OLDCFLAGS"
6911
6912 if test "x$LSB_BUILD" != xy; then
6913 # The -fPIE option is available with some versions of GCC and
6914 # adds randomization of addresses, which avoids another class of
6915 # exploits that depend on a fixed address for common functions.
6916 #
6917 # Not available to LSB binaries...
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -fPIE" >&5
6919$as_echo_n "checking whether compiler supports -fPIE... " >&6; }
6920 OLDCFLAGS="$CFLAGS"
105922ec
MS
6921 case "$host_os_name" in
6922 darwin*)
d9f356c5
MS
6923 CFLAGS="$CFLAGS -fPIE -Wl,-pie"
6924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6925/* end confdefs.h. */
6926
6927int
6928main ()
6929{
6930
6931 ;
6932 return 0;
6933}
6934_ACEOF
6935if ac_fn_c_try_compile "$LINENO"; then :
6936
6937 PIEFLAGS="-fPIE -Wl,-pie"
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6939$as_echo "yes" >&6; }
6940else
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6942$as_echo "no" >&6; }
6943fi
6944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6945 ;;
6946
6947 *)
6948 CFLAGS="$CFLAGS -fPIE -pie"
6949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6950/* end confdefs.h. */
6951
6952int
6953main ()
6954{
6955
6956 ;
6957 return 0;
6958}
6959_ACEOF
6960if ac_fn_c_try_compile "$LINENO"; then :
6961
6962 PIEFLAGS="-fPIE -pie"
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6964$as_echo "yes" >&6; }
6965else
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6967$as_echo "no" >&6; }
6968fi
6969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6970 ;;
6971 esac
6972 CFLAGS="$OLDCFLAGS"
6973 fi
6974
f518bf7e
MS
6975 # Add useful warning options for tracking down problems...
6976 WARNING_OPTIONS="-Wall -Wno-format-y2k -Wunused -Wno-unused-result -Wsign-conversion"
d9f356c5 6977
f518bf7e
MS
6978 # Test GCC version for certain warning flags since -Werror
6979 # doesn't trigger...
6980 gccversion=`$CC --version | head -1 | awk '{print $NF}'`
6981 case "$gccversion" in
6982 7.* | 8.*)
6983 WARNING_OPTIONS="$WARNING_OPTIONS -Wno-format-truncation -Wno-tautological-compare"
d9f356c5
MS
6984 ;;
6985 esac
f518bf7e
MS
6986
6987 # Additional warning options for development testing...
6988 if test -d .git; then
7d730d0c 6989 WARNING_OPTIONS="-Werror -Wno-error=deprecated-declarations $WARNING_OPTIONS"
f518bf7e 6990 fi
d9f356c5
MS
6991else
6992 # Add vendor-specific compiler options...
105922ec
MS
6993 case $host_os_name in
6994 sunos*)
d9f356c5
MS
6995 # Solaris
6996 if test -z "$OPTIM"; then
f518bf7e 6997 OPTIM="-xO2"
d9f356c5
MS
6998 fi
6999
7000 if test $PICFLAG = 1; then
7001 OPTIM="-KPIC $OPTIM"
7002 fi
7003 ;;
7004 *)
f518bf7e
MS
7005 # Running some other operating system; inform the user
7006 # they should contribute the necessary options via
7007 # Github...
7008 echo "Building CUPS with default compiler optimizations; contact the CUPS developers on Github"
7009 echo "(https://github.com/apple/cups/issues) with the uname and compiler options needed for"
7010 echo "your platform, or set the CFLAGS and LDFLAGS environment variables before running"
7011 echo "configure."
d9f356c5
MS
7012 ;;
7013 esac
7014fi
7015
7016# Add general compiler options per platform...
105922ec
MS
7017case $host_os_name in
7018 linux*)
d9f356c5
MS
7019 # glibc 2.8 and higher breaks peer credentials unless you
7020 # define _GNU_SOURCE...
7021 OPTIM="$OPTIM -D_GNU_SOURCE"
f518bf7e
MS
7022
7023 # The -z relro option is provided by the Linux linker command to
7024 # make relocatable data read-only.
7025 if test x$enable_relro = xyes; then
7026 RELROFLAGS="-Wl,-z,relro,-z,now"
7027 fi
d9f356c5
MS
7028 ;;
7029esac
7030
7031
7032
d9f356c5
MS
7033ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
7034#include <sys/socket.h>
7035#include <netinet/in.h>
7036#include <arpa/inet.h>
7037#include <netinet/in_systm.h>
7038#include <netinet/ip.h>
7039"
7040if test "x$ac_cv_header_resolv_h" = xyes; then :
7041 $as_echo "#define HAVE_RESOLV_H 1" >>confdefs.h
7042
7043fi
7044
7045
7046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7047$as_echo_n "checking for library containing socket... " >&6; }
7048if ${ac_cv_search_socket+:} false; then :
7049 $as_echo_n "(cached) " >&6
7050else
7051 ac_func_search_save_LIBS=$LIBS
7052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7053/* end confdefs.h. */
7054
7055/* Override any GCC internal prototype to avoid an error.
7056 Use char because int might match the return type of a GCC
7057 builtin and then its argument prototype would still apply. */
7058#ifdef __cplusplus
7059extern "C"
7060#endif
7061char socket ();
7062int
7063main ()
7064{
7065return socket ();
7066 ;
7067 return 0;
7068}
7069_ACEOF
7070for ac_lib in '' socket; do
7071 if test -z "$ac_lib"; then
7072 ac_res="none required"
7073 else
7074 ac_res=-l$ac_lib
7075 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7076 fi
7077 if ac_fn_c_try_link "$LINENO"; then :
7078 ac_cv_search_socket=$ac_res
7079fi
7080rm -f core conftest.err conftest.$ac_objext \
7081 conftest$ac_exeext
7082 if ${ac_cv_search_socket+:} false; then :
7083 break
7084fi
7085done
7086if ${ac_cv_search_socket+:} false; then :
7087
7088else
7089 ac_cv_search_socket=no
7090fi
7091rm conftest.$ac_ext
7092LIBS=$ac_func_search_save_LIBS
7093fi
7094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7095$as_echo "$ac_cv_search_socket" >&6; }
7096ac_res=$ac_cv_search_socket
7097if test "$ac_res" != no; then :
7098 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7099
7100fi
7101
7102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyaddr" >&5
7103$as_echo_n "checking for library containing gethostbyaddr... " >&6; }
7104if ${ac_cv_search_gethostbyaddr+:} false; then :
7105 $as_echo_n "(cached) " >&6
7106else
7107 ac_func_search_save_LIBS=$LIBS
7108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7109/* end confdefs.h. */
7110
7111/* Override any GCC internal prototype to avoid an error.
7112 Use char because int might match the return type of a GCC
7113 builtin and then its argument prototype would still apply. */
7114#ifdef __cplusplus
7115extern "C"
7116#endif
7117char gethostbyaddr ();
7118int
7119main ()
7120{
7121return gethostbyaddr ();
7122 ;
7123 return 0;
7124}
7125_ACEOF
7126for ac_lib in '' nsl; do
7127 if test -z "$ac_lib"; then
7128 ac_res="none required"
7129 else
7130 ac_res=-l$ac_lib
7131 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7132 fi
7133 if ac_fn_c_try_link "$LINENO"; then :
7134 ac_cv_search_gethostbyaddr=$ac_res
7135fi
7136rm -f core conftest.err conftest.$ac_objext \
7137 conftest$ac_exeext
7138 if ${ac_cv_search_gethostbyaddr+:} false; then :
7139 break
7140fi
7141done
7142if ${ac_cv_search_gethostbyaddr+:} false; then :
7143
7144else
7145 ac_cv_search_gethostbyaddr=no
7146fi
7147rm conftest.$ac_ext
7148LIBS=$ac_func_search_save_LIBS
7149fi
7150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyaddr" >&5
7151$as_echo "$ac_cv_search_gethostbyaddr" >&6; }
7152ac_res=$ac_cv_search_gethostbyaddr
7153if test "$ac_res" != no; then :
7154 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7155
7156fi
7157
7158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getifaddrs" >&5
7159$as_echo_n "checking for library containing getifaddrs... " >&6; }
7160if ${ac_cv_search_getifaddrs+:} false; then :
7161 $as_echo_n "(cached) " >&6
7162else
7163 ac_func_search_save_LIBS=$LIBS
7164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7165/* end confdefs.h. */
7166
7167/* Override any GCC internal prototype to avoid an error.
7168 Use char because int might match the return type of a GCC
7169 builtin and then its argument prototype would still apply. */
7170#ifdef __cplusplus
7171extern "C"
7172#endif
7173char getifaddrs ();
7174int
7175main ()
7176{
7177return getifaddrs ();
7178 ;
7179 return 0;
7180}
7181_ACEOF
7182for ac_lib in '' nsl; do
7183 if test -z "$ac_lib"; then
7184 ac_res="none required"
7185 else
7186 ac_res=-l$ac_lib
7187 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7188 fi
7189 if ac_fn_c_try_link "$LINENO"; then :
7190 ac_cv_search_getifaddrs=$ac_res
7191fi
7192rm -f core conftest.err conftest.$ac_objext \
7193 conftest$ac_exeext
7194 if ${ac_cv_search_getifaddrs+:} false; then :
7195 break
7196fi
7197done
7198if ${ac_cv_search_getifaddrs+:} false; then :
7199
7200else
7201 ac_cv_search_getifaddrs=no
7202fi
7203rm conftest.$ac_ext
7204LIBS=$ac_func_search_save_LIBS
7205fi
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getifaddrs" >&5
7207$as_echo "$ac_cv_search_getifaddrs" >&6; }
7208ac_res=$ac_cv_search_getifaddrs
7209if test "$ac_res" != no; then :
7210 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7211 $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
7212
7213fi
7214
7215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing hstrerror" >&5
7216$as_echo_n "checking for library containing hstrerror... " >&6; }
7217if ${ac_cv_search_hstrerror+:} false; then :
7218 $as_echo_n "(cached) " >&6
7219else
7220 ac_func_search_save_LIBS=$LIBS
7221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7222/* end confdefs.h. */
7223
7224/* Override any GCC internal prototype to avoid an error.
7225 Use char because int might match the return type of a GCC
7226 builtin and then its argument prototype would still apply. */
7227#ifdef __cplusplus
7228extern "C"
7229#endif
7230char hstrerror ();
7231int
7232main ()
7233{
7234return hstrerror ();
7235 ;
7236 return 0;
7237}
7238_ACEOF
7239for ac_lib in '' nsl socket resolv; do
7240 if test -z "$ac_lib"; then
7241 ac_res="none required"
7242 else
7243 ac_res=-l$ac_lib
7244 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7245 fi
7246 if ac_fn_c_try_link "$LINENO"; then :
7247 ac_cv_search_hstrerror=$ac_res
7248fi
7249rm -f core conftest.err conftest.$ac_objext \
7250 conftest$ac_exeext
7251 if ${ac_cv_search_hstrerror+:} false; then :
7252 break
7253fi
7254done
7255if ${ac_cv_search_hstrerror+:} false; then :
7256
7257else
7258 ac_cv_search_hstrerror=no
7259fi
7260rm conftest.$ac_ext
7261LIBS=$ac_func_search_save_LIBS
7262fi
7263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_hstrerror" >&5
7264$as_echo "$ac_cv_search_hstrerror" >&6; }
7265ac_res=$ac_cv_search_hstrerror
7266if test "$ac_res" != no; then :
7267 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7268 $as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
7269
7270fi
7271
7272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rresvport_af" >&5
7273$as_echo_n "checking for library containing rresvport_af... " >&6; }
7274if ${ac_cv_search_rresvport_af+:} false; then :
7275 $as_echo_n "(cached) " >&6
7276else
7277 ac_func_search_save_LIBS=$LIBS
7278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7279/* end confdefs.h. */
7280
7281/* Override any GCC internal prototype to avoid an error.
7282 Use char because int might match the return type of a GCC
7283 builtin and then its argument prototype would still apply. */
7284#ifdef __cplusplus
7285extern "C"
7286#endif
7287char rresvport_af ();
7288int
7289main ()
7290{
7291return rresvport_af ();
7292 ;
7293 return 0;
7294}
7295_ACEOF
7296for ac_lib in '' nsl; do
7297 if test -z "$ac_lib"; then
7298 ac_res="none required"
7299 else
7300 ac_res=-l$ac_lib
7301 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7302 fi
7303 if ac_fn_c_try_link "$LINENO"; then :
7304 ac_cv_search_rresvport_af=$ac_res
7305fi
7306rm -f core conftest.err conftest.$ac_objext \
7307 conftest$ac_exeext
7308 if ${ac_cv_search_rresvport_af+:} false; then :
7309 break
7310fi
7311done
7312if ${ac_cv_search_rresvport_af+:} false; then :
7313
7314else
7315 ac_cv_search_rresvport_af=no
7316fi
7317rm conftest.$ac_ext
7318LIBS=$ac_func_search_save_LIBS
7319fi
7320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rresvport_af" >&5
7321$as_echo "$ac_cv_search_rresvport_af" >&6; }
7322ac_res=$ac_cv_search_rresvport_af
7323if test "$ac_res" != no; then :
7324 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7325 $as_echo "#define HAVE_RRESVPORT_AF 1" >>confdefs.h
7326
7327fi
7328
7329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __res_init" >&5
7330$as_echo_n "checking for library containing __res_init... " >&6; }
7331if ${ac_cv_search___res_init+:} false; then :
7332 $as_echo_n "(cached) " >&6
7333else
7334 ac_func_search_save_LIBS=$LIBS
7335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7336/* end confdefs.h. */
7337
7338/* Override any GCC internal prototype to avoid an error.
7339 Use char because int might match the return type of a GCC
7340 builtin and then its argument prototype would still apply. */
7341#ifdef __cplusplus
7342extern "C"
7343#endif
7344char __res_init ();
7345int
7346main ()
7347{
7348return __res_init ();
7349 ;
7350 return 0;
7351}
7352_ACEOF
7353for ac_lib in '' resolv bind; do
7354 if test -z "$ac_lib"; then
7355 ac_res="none required"
7356 else
7357 ac_res=-l$ac_lib
7358 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7359 fi
7360 if ac_fn_c_try_link "$LINENO"; then :
7361 ac_cv_search___res_init=$ac_res
7362fi
7363rm -f core conftest.err conftest.$ac_objext \
7364 conftest$ac_exeext
7365 if ${ac_cv_search___res_init+:} false; then :
7366 break
7367fi
7368done
7369if ${ac_cv_search___res_init+:} false; then :
7370
7371else
7372 ac_cv_search___res_init=no
7373fi
7374rm conftest.$ac_ext
7375LIBS=$ac_func_search_save_LIBS
7376fi
7377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___res_init" >&5
7378$as_echo "$ac_cv_search___res_init" >&6; }
7379ac_res=$ac_cv_search___res_init
7380if test "$ac_res" != no; then :
7381 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7382 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
7383
7384else
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
7386$as_echo_n "checking for library containing res_9_init... " >&6; }
7387if ${ac_cv_search_res_9_init+:} false; then :
7388 $as_echo_n "(cached) " >&6
7389else
7390 ac_func_search_save_LIBS=$LIBS
7391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7392/* end confdefs.h. */
7393
7394/* Override any GCC internal prototype to avoid an error.
7395 Use char because int might match the return type of a GCC
7396 builtin and then its argument prototype would still apply. */
7397#ifdef __cplusplus
7398extern "C"
7399#endif
7400char res_9_init ();
7401int
7402main ()
7403{
7404return res_9_init ();
7405 ;
7406 return 0;
7407}
7408_ACEOF
7409for ac_lib in '' resolv bind; do
7410 if test -z "$ac_lib"; then
7411 ac_res="none required"
7412 else
7413 ac_res=-l$ac_lib
7414 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7415 fi
7416 if ac_fn_c_try_link "$LINENO"; then :
7417 ac_cv_search_res_9_init=$ac_res
7418fi
7419rm -f core conftest.err conftest.$ac_objext \
7420 conftest$ac_exeext
7421 if ${ac_cv_search_res_9_init+:} false; then :
7422 break
7423fi
7424done
7425if ${ac_cv_search_res_9_init+:} false; then :
7426
7427else
7428 ac_cv_search_res_9_init=no
7429fi
7430rm conftest.$ac_ext
7431LIBS=$ac_func_search_save_LIBS
7432fi
7433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
7434$as_echo "$ac_cv_search_res_9_init" >&6; }
7435ac_res=$ac_cv_search_res_9_init
7436if test "$ac_res" != no; then :
7437 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7438 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
7439
7440else
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
7442$as_echo_n "checking for library containing res_init... " >&6; }
7443if ${ac_cv_search_res_init+:} false; then :
7444 $as_echo_n "(cached) " >&6
7445else
7446 ac_func_search_save_LIBS=$LIBS
7447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7448/* end confdefs.h. */
7449
7450/* Override any GCC internal prototype to avoid an error.
7451 Use char because int might match the return type of a GCC
7452 builtin and then its argument prototype would still apply. */
7453#ifdef __cplusplus
7454extern "C"
7455#endif
7456char res_init ();
7457int
7458main ()
7459{
7460return res_init ();
7461 ;
7462 return 0;
7463}
7464_ACEOF
7465for ac_lib in '' resolv bind; do
7466 if test -z "$ac_lib"; then
7467 ac_res="none required"
7468 else
7469 ac_res=-l$ac_lib
7470 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7471 fi
7472 if ac_fn_c_try_link "$LINENO"; then :
7473 ac_cv_search_res_init=$ac_res
7474fi
7475rm -f core conftest.err conftest.$ac_objext \
7476 conftest$ac_exeext
7477 if ${ac_cv_search_res_init+:} false; then :
7478 break
7479fi
7480done
7481if ${ac_cv_search_res_init+:} false; then :
7482
7483else
7484 ac_cv_search_res_init=no
7485fi
7486rm conftest.$ac_ext
7487LIBS=$ac_func_search_save_LIBS
7488fi
7489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
7490$as_echo "$ac_cv_search_res_init" >&6; }
7491ac_res=$ac_cv_search_res_init
7492if test "$ac_res" != no; then :
7493 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7494 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
7495
7496fi
7497
7498fi
7499
7500fi
7501
7502
7503# Tru64 5.1b leaks file descriptors with these functions; disable until
7504# we can come up with a test for this...
105922ec 7505if test "$host_os_name" != "osf1"; then
d9f356c5
MS
7506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
7507$as_echo_n "checking for library containing getaddrinfo... " >&6; }
7508if ${ac_cv_search_getaddrinfo+:} false; then :
7509 $as_echo_n "(cached) " >&6
7510else
7511 ac_func_search_save_LIBS=$LIBS
7512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7513/* end confdefs.h. */
7514
7515/* Override any GCC internal prototype to avoid an error.
7516 Use char because int might match the return type of a GCC
7517 builtin and then its argument prototype would still apply. */
7518#ifdef __cplusplus
7519extern "C"
7520#endif
7521char getaddrinfo ();
7522int
7523main ()
7524{
7525return getaddrinfo ();
7526 ;
7527 return 0;
7528}
7529_ACEOF
7530for ac_lib in '' nsl; do
7531 if test -z "$ac_lib"; then
7532 ac_res="none required"
7533 else
7534 ac_res=-l$ac_lib
7535 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7536 fi
7537 if ac_fn_c_try_link "$LINENO"; then :
7538 ac_cv_search_getaddrinfo=$ac_res
7539fi
7540rm -f core conftest.err conftest.$ac_objext \
7541 conftest$ac_exeext
7542 if ${ac_cv_search_getaddrinfo+:} false; then :
7543 break
7544fi
7545done
7546if ${ac_cv_search_getaddrinfo+:} false; then :
7547
7548else
7549 ac_cv_search_getaddrinfo=no
7550fi
7551rm conftest.$ac_ext
7552LIBS=$ac_func_search_save_LIBS
7553fi
7554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
7555$as_echo "$ac_cv_search_getaddrinfo" >&6; }
7556ac_res=$ac_cv_search_getaddrinfo
7557if test "$ac_res" != no; then :
7558 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7559 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
7560
7561fi
7562
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getnameinfo" >&5
7564$as_echo_n "checking for library containing getnameinfo... " >&6; }
7565if ${ac_cv_search_getnameinfo+:} false; then :
7566 $as_echo_n "(cached) " >&6
7567else
7568 ac_func_search_save_LIBS=$LIBS
7569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7570/* end confdefs.h. */
7571
7572/* Override any GCC internal prototype to avoid an error.
7573 Use char because int might match the return type of a GCC
7574 builtin and then its argument prototype would still apply. */
7575#ifdef __cplusplus
7576extern "C"
7577#endif
7578char getnameinfo ();
7579int
7580main ()
7581{
7582return getnameinfo ();
7583 ;
7584 return 0;
7585}
7586_ACEOF
7587for ac_lib in '' nsl; do
7588 if test -z "$ac_lib"; then
7589 ac_res="none required"
7590 else
7591 ac_res=-l$ac_lib
7592 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7593 fi
7594 if ac_fn_c_try_link "$LINENO"; then :
7595 ac_cv_search_getnameinfo=$ac_res
7596fi
7597rm -f core conftest.err conftest.$ac_objext \
7598 conftest$ac_exeext
7599 if ${ac_cv_search_getnameinfo+:} false; then :
7600 break
7601fi
7602done
7603if ${ac_cv_search_getnameinfo+:} false; then :
7604
7605else
7606 ac_cv_search_getnameinfo=no
7607fi
7608rm conftest.$ac_ext
7609LIBS=$ac_func_search_save_LIBS
7610fi
7611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getnameinfo" >&5
7612$as_echo "$ac_cv_search_getnameinfo" >&6; }
7613ac_res=$ac_cv_search_getnameinfo
7614if test "$ac_res" != no; then :
7615 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7616 $as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
7617
7618fi
7619
7620fi
7621
7622ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
7623"
7624if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
7625
7626fi
7627
7628ac_fn_c_check_header_mongrel "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default"
7629if test "x$ac_cv_header_sys_sockio_h" = xyes; then :
7630 $as_echo "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
7631
7632fi
7633
7634
7635
7636CUPS_DEFAULT_DOMAINSOCKET=""
7637
7638
7639# Check whether --with-domainsocket was given.
7640if test "${with_domainsocket+set}" = set; then :
7641 withval=$with_domainsocket; default_domainsocket="$withval"
7642else
7643 default_domainsocket=""
7644fi
7645
7646
7647if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
7648 if test "x$default_domainsocket" = x; then
105922ec
MS
7649 case "$host_os_name" in
7650 darwin*)
d4874933 7651 # Darwin and macOS do their own thing...
d9f356c5
MS
7652 CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
7653 ;;
7654 *)
7655 # All others use FHS standard...
7656 CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock"
7657 ;;
7658 esac
7659 else
7660 CUPS_DEFAULT_DOMAINSOCKET="$default_domainsocket"
7661 fi
7662
7663 CUPS_LISTEN_DOMAINSOCKET="Listen $CUPS_DEFAULT_DOMAINSOCKET"
7664
7665 cat >>confdefs.h <<_ACEOF
7666#define CUPS_DEFAULT_DOMAINSOCKET "$CUPS_DEFAULT_DOMAINSOCKET"
7667_ACEOF
7668
7669else
7670 CUPS_LISTEN_DOMAINSOCKET=""
7671fi
7672
7673
7674
7675
7676
d9f356c5
MS
7677ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
7678if test "x$ac_cv_func_poll" = xyes; then :
7679 $as_echo "#define HAVE_POLL 1" >>confdefs.h
7680
7681fi
7682
7683ac_fn_c_check_func "$LINENO" "epoll_create" "ac_cv_func_epoll_create"
7684if test "x$ac_cv_func_epoll_create" = xyes; then :
7685 $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
7686
7687fi
7688
7689ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue"
7690if test "x$ac_cv_func_kqueue" = xyes; then :
7691 $as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
7692
7693fi
7694
7695
7696
d9f356c5
MS
7697# Check whether --enable-gssapi was given.
7698if test "${enable_gssapi+set}" = set; then :
7699 enableval=$enable_gssapi;
7700fi
7701
7702
7703LIBGSSAPI=""
7704
7705
7706if test x$enable_gssapi != xno; then
7707 if test -n "$ac_tool_prefix"; then
7708 # Extract the first word of "${ac_tool_prefix}krb5-config", so it can be a program name with args.
7709set dummy ${ac_tool_prefix}krb5-config; ac_word=$2
7710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7711$as_echo_n "checking for $ac_word... " >&6; }
7712if ${ac_cv_path_KRB5CONFIG+:} false; then :
7713 $as_echo_n "(cached) " >&6
7714else
7715 case $KRB5CONFIG in
7716 [\\/]* | ?:[\\/]*)
7717 ac_cv_path_KRB5CONFIG="$KRB5CONFIG" # Let the user override the test with a path.
7718 ;;
7719 *)
7720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721for as_dir in $PATH
7722do
7723 IFS=$as_save_IFS
7724 test -z "$as_dir" && as_dir=.
7725 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 7726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
7727 ac_cv_path_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
7728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7729 break 2
7730 fi
7731done
7732 done
7733IFS=$as_save_IFS
7734
7735 ;;
7736esac
7737fi
7738KRB5CONFIG=$ac_cv_path_KRB5CONFIG
7739if test -n "$KRB5CONFIG"; then
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONFIG" >&5
7741$as_echo "$KRB5CONFIG" >&6; }
7742else
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7744$as_echo "no" >&6; }
7745fi
7746
7747
7748fi
7749if test -z "$ac_cv_path_KRB5CONFIG"; then
7750 ac_pt_KRB5CONFIG=$KRB5CONFIG
7751 # Extract the first word of "krb5-config", so it can be a program name with args.
7752set dummy krb5-config; ac_word=$2
7753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7754$as_echo_n "checking for $ac_word... " >&6; }
7755if ${ac_cv_path_ac_pt_KRB5CONFIG+:} false; then :
7756 $as_echo_n "(cached) " >&6
7757else
7758 case $ac_pt_KRB5CONFIG in
7759 [\\/]* | ?:[\\/]*)
7760 ac_cv_path_ac_pt_KRB5CONFIG="$ac_pt_KRB5CONFIG" # Let the user override the test with a path.
7761 ;;
7762 *)
7763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7764for as_dir in $PATH
7765do
7766 IFS=$as_save_IFS
7767 test -z "$as_dir" && as_dir=.
7768 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 7769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
7770 ac_cv_path_ac_pt_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
7771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7772 break 2
7773 fi
7774done
7775 done
7776IFS=$as_save_IFS
7777
7778 ;;
7779esac
7780fi
7781ac_pt_KRB5CONFIG=$ac_cv_path_ac_pt_KRB5CONFIG
7782if test -n "$ac_pt_KRB5CONFIG"; then
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_KRB5CONFIG" >&5
7784$as_echo "$ac_pt_KRB5CONFIG" >&6; }
7785else
7786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7787$as_echo "no" >&6; }
7788fi
7789
7790 if test "x$ac_pt_KRB5CONFIG" = x; then
7791 KRB5CONFIG=""
7792 else
7793 case $cross_compiling:$ac_tool_warned in
7794yes:)
7795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7797ac_tool_warned=yes ;;
7798esac
7799 KRB5CONFIG=$ac_pt_KRB5CONFIG
7800 fi
7801else
7802 KRB5CONFIG="$ac_cv_path_KRB5CONFIG"
7803fi
7804
7805 if test "x$KRB5CONFIG" != x; then
105922ec
MS
7806 case "$host_os_name" in
7807 darwin)
8072030b 7808 # macOS weak-links to the Kerberos framework...
d9f356c5
MS
7809 LIBGSSAPI="-weak_framework Kerberos"
7810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS framework" >&5
7811$as_echo_n "checking for GSS framework... " >&6; }
7812 if test -d /System/Library/Frameworks/GSS.framework; then
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7814$as_echo "yes" >&6; }
7815 LIBGSSAPI="$LIBGSSAPI -weak_framework GSS"
7816 else
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7818$as_echo "no" >&6; }
7819 fi
7820 ;;
105922ec 7821 sunos*)
d9f356c5
MS
7822 # Solaris has a non-standard krb5-config, don't use it!
7823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_display_status in -lgss" >&5
7824$as_echo_n "checking for gss_display_status in -lgss... " >&6; }
7825if ${ac_cv_lib_gss_gss_display_status+:} false; then :
7826 $as_echo_n "(cached) " >&6
7827else
7828 ac_check_lib_save_LIBS=$LIBS
7829LIBS="-lgss $LIBS"
7830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7831/* end confdefs.h. */
7832
7833/* Override any GCC internal prototype to avoid an error.
7834 Use char because int might match the return type of a GCC
7835 builtin and then its argument prototype would still apply. */
7836#ifdef __cplusplus
7837extern "C"
7838#endif
7839char gss_display_status ();
7840int
7841main ()
7842{
7843return gss_display_status ();
7844 ;
7845 return 0;
7846}
7847_ACEOF
7848if ac_fn_c_try_link "$LINENO"; then :
7849 ac_cv_lib_gss_gss_display_status=yes
7850else
7851 ac_cv_lib_gss_gss_display_status=no
7852fi
7853rm -f core conftest.err conftest.$ac_objext \
7854 conftest$ac_exeext conftest.$ac_ext
7855LIBS=$ac_check_lib_save_LIBS
7856fi
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_display_status" >&5
7858$as_echo "$ac_cv_lib_gss_gss_display_status" >&6; }
7859if test "x$ac_cv_lib_gss_gss_display_status" = xyes; then :
7860
7861$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
7862
7863 CFLAGS="`$KRB5CONFIG --cflags` $CFLAGS"
7864 CPPFLAGS="`$KRB5CONFIG --cflags` $CPPFLAGS"
7865 LIBGSSAPI="-lgss `$KRB5CONFIG --libs`"
7866fi
7867
7868 ;;
7869 *)
7870 # Other platforms just ask for GSSAPI
7871 CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
7872 CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
7873 LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
7874 ;;
7875 esac
7876
7877$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
7878
7879 else
7880 # Check for vendor-specific implementations...
105922ec
MS
7881 case "$host_os_name" in
7882 hp-ux*)
d9f356c5
MS
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_display_status in -lgss" >&5
7884$as_echo_n "checking for gss_display_status in -lgss... " >&6; }
7885if ${ac_cv_lib_gss_gss_display_status+:} false; then :
7886 $as_echo_n "(cached) " >&6
7887else
7888 ac_check_lib_save_LIBS=$LIBS
7889LIBS="-lgss $LIBS"
7890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7891/* end confdefs.h. */
7892
7893/* Override any GCC internal prototype to avoid an error.
7894 Use char because int might match the return type of a GCC
7895 builtin and then its argument prototype would still apply. */
7896#ifdef __cplusplus
7897extern "C"
7898#endif
7899char gss_display_status ();
7900int
7901main ()
7902{
7903return gss_display_status ();
7904 ;
7905 return 0;
7906}
7907_ACEOF
7908if ac_fn_c_try_link "$LINENO"; then :
7909 ac_cv_lib_gss_gss_display_status=yes
7910else
7911 ac_cv_lib_gss_gss_display_status=no
7912fi
7913rm -f core conftest.err conftest.$ac_objext \
7914 conftest$ac_exeext conftest.$ac_ext
7915LIBS=$ac_check_lib_save_LIBS
7916fi
7917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_display_status" >&5
7918$as_echo "$ac_cv_lib_gss_gss_display_status" >&6; }
7919if test "x$ac_cv_lib_gss_gss_display_status" = xyes; then :
7920
7921$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
7922
7923 LIBGSSAPI="-lgss -lgssapi_krb5"
7924fi
7925
7926 ;;
105922ec 7927 sunos*)
d9f356c5
MS
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_display_status in -lgss" >&5
7929$as_echo_n "checking for gss_display_status in -lgss... " >&6; }
7930if ${ac_cv_lib_gss_gss_display_status+:} false; then :
7931 $as_echo_n "(cached) " >&6
7932else
7933 ac_check_lib_save_LIBS=$LIBS
7934LIBS="-lgss $LIBS"
7935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7936/* end confdefs.h. */
7937
7938/* Override any GCC internal prototype to avoid an error.
7939 Use char because int might match the return type of a GCC
7940 builtin and then its argument prototype would still apply. */
7941#ifdef __cplusplus
7942extern "C"
7943#endif
7944char gss_display_status ();
7945int
7946main ()
7947{
7948return gss_display_status ();
7949 ;
7950 return 0;
7951}
7952_ACEOF
7953if ac_fn_c_try_link "$LINENO"; then :
7954 ac_cv_lib_gss_gss_display_status=yes
7955else
7956 ac_cv_lib_gss_gss_display_status=no
7957fi
7958rm -f core conftest.err conftest.$ac_objext \
7959 conftest$ac_exeext conftest.$ac_ext
7960LIBS=$ac_check_lib_save_LIBS
7961fi
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_display_status" >&5
7963$as_echo "$ac_cv_lib_gss_gss_display_status" >&6; }
7964if test "x$ac_cv_lib_gss_gss_display_status" = xyes; then :
7965
7966$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
7967
7968 LIBGSSAPI="-lgss"
7969fi
7970
7971 ;;
7972 esac
7973 fi
7974
7975 if test "x$LIBGSSAPI" != x; then
7976 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
7977if test "x$ac_cv_header_krb5_h" = xyes; then :
7978 $as_echo "#define HAVE_KRB5_H 1" >>confdefs.h
7979
7980fi
7981
7982
7983 if test -d /System/Library/Frameworks/GSS.framework; then
7984 ac_fn_c_check_header_mongrel "$LINENO" "GSS/gssapi.h" "ac_cv_header_GSS_gssapi_h" "$ac_includes_default"
7985if test "x$ac_cv_header_GSS_gssapi_h" = xyes; then :
7986 $as_echo "#define HAVE_GSS_GSSAPI_H 1" >>confdefs.h
7987
7988fi
7989
7990
7991 ac_fn_c_check_header_mongrel "$LINENO" "GSS/gssapi_generic.h" "ac_cv_header_GSS_gssapi_generic_h" "$ac_includes_default"
7992if test "x$ac_cv_header_GSS_gssapi_generic_h" = xyes; then :
7993 $as_echo "#define HAVE_GSS_GSSAPI_GENERIC_H 1" >>confdefs.h
7994
7995fi
7996
7997
7998 ac_fn_c_check_header_mongrel "$LINENO" "GSS/gssapi_spi.h" "ac_cv_header_GSS_gssapi_spi_h" "$ac_includes_default"
7999if test "x$ac_cv_header_GSS_gssapi_spi_h" = xyes; then :
8000 $as_echo "#define HAVE_GSS_GSSAPI_SPI_H 1" >>confdefs.h
8001
8002fi
8003
8004
8005 else
8006 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
8007if test "x$ac_cv_header_gssapi_h" = xyes; then :
8008 $as_echo "#define HAVE_GSSAPI_H 1" >>confdefs.h
8009
8010fi
8011
8012
8013 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
8014if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
8015 $as_echo "#define HAVE_GSSAPI_GSSAPI_H 1" >>confdefs.h
8016
8017fi
8018
8019
8020 fi
8021
8022 SAVELIBS="$LIBS"
8023 LIBS="$LIBS $LIBGSSAPI"
8024
8025 ac_fn_c_check_func "$LINENO" "__ApplePrivate_gss_acquire_cred_ex_f" "ac_cv_func___ApplePrivate_gss_acquire_cred_ex_f"
8026if test "x$ac_cv_func___ApplePrivate_gss_acquire_cred_ex_f" = xyes; then :
8027 $as_echo "#define HAVE_GSS_ACQUIRE_CRED_EX_F 1" >>confdefs.h
8028
8029fi
8030
8031
8032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS_C_NT_HOSTBASED_SERVICE" >&5
8033$as_echo_n "checking for GSS_C_NT_HOSTBASED_SERVICE... " >&6; }
8034 if test x$ac_cv_header_gssapi_gssapi_h = xyes; then
8035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8036/* end confdefs.h. */
8037 #include <gssapi/gssapi.h>
8038int
8039main ()
8040{
8041 gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE;
8042 ;
8043 return 0;
8044}
8045_ACEOF
8046if ac_fn_c_try_compile "$LINENO"; then :
8047 $as_echo "#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1" >>confdefs.h
8048
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8050$as_echo "yes" >&6; }
8051else
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8053$as_echo "no" >&6; }
8054fi
8055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8056 elif test x$ac_cv_header_gss_gssapi_h = xyes; then
8057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8058/* end confdefs.h. */
8059 #include <GSS/gssapi.h>
8060int
8061main ()
8062{
8063 gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE;
8064 ;
8065 return 0;
8066}
8067_ACEOF
8068if ac_fn_c_try_compile "$LINENO"; then :
8069 $as_echo "#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1" >>confdefs.h
8070
8071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8072$as_echo "yes" >&6; }
8073else
8074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8075$as_echo "no" >&6; }
8076fi
8077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8078 else
8079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8080/* end confdefs.h. */
8081 #include <gssapi.h>
8082int
8083main ()
8084{
8085 gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE;
8086 ;
8087 return 0;
8088}
8089_ACEOF
8090if ac_fn_c_try_compile "$LINENO"; then :
8091 $as_echo "#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1" >>confdefs.h
8092
8093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8094$as_echo "yes" >&6; }
8095else
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097$as_echo "no" >&6; }
8098fi
8099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8100 fi
8101
8102 LIBS="$SAVELIBS"
8103 fi
8104fi
8105
8106
8107# Check whether --with-gssservicename was given.
8108if test "${with_gssservicename+set}" = set; then :
8109 withval=$with_gssservicename; default_gssservicename="$withval"
8110else
8111 default_gssservicename="default"
8112fi
8113
8114
8115if test x$default_gssservicename != xno; then
8116 if test "x$default_gssservicename" = "xdefault"; then
8117 CUPS_DEFAULT_GSSSERVICENAME="host"
8118 else
8119 CUPS_DEFAULT_GSSSERVICENAME="$default_gssservicename"
8120 fi
8121else
8122 CUPS_DEFAULT_GSSSERVICENAME=""
8123fi
8124
8125
8126cat >>confdefs.h <<_ACEOF
8127#define CUPS_DEFAULT_GSSSERVICENAME "$CUPS_DEFAULT_GSSSERVICENAME"
8128_ACEOF
8129
8130
8131
d9f356c5
MS
8132# Check whether --enable-threads was given.
8133if test "${enable_threads+set}" = set; then :
8134 enableval=$enable_threads;
8135fi
8136
8137
8138have_pthread=no
8139PTHREAD_FLAGS=""
8140
8141if test "x$enable_threads" != xno; then
8142 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8143if test "x$ac_cv_header_pthread_h" = xyes; then :
8144 $as_echo "#define HAVE_PTHREAD_H 1" >>confdefs.h
8145
8146fi
8147
8148
8149
8150 if test x$ac_cv_header_pthread_h = xyes; then
8151 for flag in -lpthreads -lpthread -pthread; do
8152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create using $flag" >&5
8153$as_echo_n "checking for pthread_create using $flag... " >&6; }
8154 SAVELIBS="$LIBS"
8155 LIBS="$flag $LIBS"
8156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8157/* end confdefs.h. */
8158#include <pthread.h>
8159int
8160main ()
8161{
8162pthread_create(0, 0, 0, 0);
8163 ;
8164 return 0;
8165}
8166_ACEOF
8167if ac_fn_c_try_link "$LINENO"; then :
8168 have_pthread=yes
8169else
8170 LIBS="$SAVELIBS"
8171fi
8172rm -f core conftest.err conftest.$ac_objext \
8173 conftest$ac_exeext conftest.$ac_ext
8174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread" >&5
8175$as_echo "$have_pthread" >&6; }
8176
8177 if test $have_pthread = yes; then
8178 PTHREAD_FLAGS="-D_THREAD_SAFE -D_REENTRANT"
8179
8180 # Solaris requires -D_POSIX_PTHREAD_SEMANTICS to
8181 # be POSIX-compliant... :(
105922ec 8182 if test $host_os_name = sunos; then
d9f356c5
MS
8183 PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
8184 fi
8185 break
8186 fi
8187 done
8188 fi
8189fi
8190
8191
8192
8193
d9f356c5
MS
8194# Check whether --enable-ssl was given.
8195if test "${enable_ssl+set}" = set; then :
8196 enableval=$enable_ssl;
8197fi
8198
8199# Check whether --enable-cdsassl was given.
8200if test "${enable_cdsassl+set}" = set; then :
8201 enableval=$enable_cdsassl;
8202fi
8203
8204# Check whether --enable-gnutls was given.
8205if test "${enable_gnutls+set}" = set; then :
8206 enableval=$enable_gnutls;
8207fi
8208
8209
8210SSLFLAGS=""
8211SSLLIBS=""
8212have_ssl=0
8213CUPS_SERVERKEYCHAIN=""
8214
8215if test x$enable_ssl != xno; then
8216 if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then
105922ec 8217 if test $host_os_name = darwin; then
d9f356c5
MS
8218 ac_fn_c_check_header_mongrel "$LINENO" "Security/SecureTransport.h" "ac_cv_header_Security_SecureTransport_h" "$ac_includes_default"
8219if test "x$ac_cv_header_Security_SecureTransport_h" = xyes; then :
8220
8221 have_ssl=1
8222 $as_echo "#define HAVE_SSL 1" >>confdefs.h
8223
8224 $as_echo "#define HAVE_CDSASSL 1" >>confdefs.h
8225
8226 CUPS_SERVERKEYCHAIN="/Library/Keychains/System.keychain"
8227
fa26ab95 8228 ac_fn_c_check_header_mongrel "$LINENO" "Security/SecCertificate.h" "ac_cv_header_Security_SecCertificate_h" "$ac_includes_default"
d9f356c5
MS
8229if test "x$ac_cv_header_Security_SecCertificate_h" = xyes; then :
8230 $as_echo "#define HAVE_SECCERTIFICATE_H 1" >>confdefs.h
8231
8232fi
8233
8234
8235 ac_fn_c_check_header_mongrel "$LINENO" "Security/SecItem.h" "ac_cv_header_Security_SecItem_h" "$ac_includes_default"
8236if test "x$ac_cv_header_Security_SecItem_h" = xyes; then :
8237 $as_echo "#define HAVE_SECITEM_H 1" >>confdefs.h
8238
8239fi
8240
8241
d9f356c5
MS
8242 ac_fn_c_check_header_mongrel "$LINENO" "Security/SecPolicy.h" "ac_cv_header_Security_SecPolicy_h" "$ac_includes_default"
8243if test "x$ac_cv_header_Security_SecPolicy_h" = xyes; then :
8244 $as_echo "#define HAVE_SECPOLICY_H 1" >>confdefs.h
8245
8246fi
8247
8248
d9f356c5
MS
8249fi
8250
8251
d9f356c5
MS
8252 fi
8253 fi
8254
8255 if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
8256 if test -n "$ac_tool_prefix"; then
8257 # Extract the first word of "${ac_tool_prefix}libgnutls-config", so it can be a program name with args.
8258set dummy ${ac_tool_prefix}libgnutls-config; ac_word=$2
8259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8260$as_echo_n "checking for $ac_word... " >&6; }
8261if ${ac_cv_path_LIBGNUTLSCONFIG+:} false; then :
8262 $as_echo_n "(cached) " >&6
8263else
8264 case $LIBGNUTLSCONFIG in
8265 [\\/]* | ?:[\\/]*)
8266 ac_cv_path_LIBGNUTLSCONFIG="$LIBGNUTLSCONFIG" # Let the user override the test with a path.
8267 ;;
8268 *)
8269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8270for as_dir in $PATH
8271do
8272 IFS=$as_save_IFS
8273 test -z "$as_dir" && as_dir=.
8274 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 8275 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
8276 ac_cv_path_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
8277 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8278 break 2
8279 fi
8280done
8281 done
8282IFS=$as_save_IFS
8283
8284 ;;
8285esac
8286fi
8287LIBGNUTLSCONFIG=$ac_cv_path_LIBGNUTLSCONFIG
8288if test -n "$LIBGNUTLSCONFIG"; then
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLSCONFIG" >&5
8290$as_echo "$LIBGNUTLSCONFIG" >&6; }
8291else
8292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8293$as_echo "no" >&6; }
8294fi
8295
8296
8297fi
8298if test -z "$ac_cv_path_LIBGNUTLSCONFIG"; then
8299 ac_pt_LIBGNUTLSCONFIG=$LIBGNUTLSCONFIG
8300 # Extract the first word of "libgnutls-config", so it can be a program name with args.
8301set dummy libgnutls-config; ac_word=$2
8302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8303$as_echo_n "checking for $ac_word... " >&6; }
8304if ${ac_cv_path_ac_pt_LIBGNUTLSCONFIG+:} false; then :
8305 $as_echo_n "(cached) " >&6
8306else
8307 case $ac_pt_LIBGNUTLSCONFIG in
8308 [\\/]* | ?:[\\/]*)
8309 ac_cv_path_ac_pt_LIBGNUTLSCONFIG="$ac_pt_LIBGNUTLSCONFIG" # Let the user override the test with a path.
8310 ;;
8311 *)
8312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8313for as_dir in $PATH
8314do
8315 IFS=$as_save_IFS
8316 test -z "$as_dir" && as_dir=.
8317 for ac_exec_ext in '' $ac_executable_extensions; do
3c2cb822 8318 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d9f356c5
MS
8319 ac_cv_path_ac_pt_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
8320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8321 break 2
8322 fi
8323done
8324 done
8325IFS=$as_save_IFS
8326
8327 ;;
8328esac
8329fi
8330ac_pt_LIBGNUTLSCONFIG=$ac_cv_path_ac_pt_LIBGNUTLSCONFIG
8331if test -n "$ac_pt_LIBGNUTLSCONFIG"; then
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LIBGNUTLSCONFIG" >&5
8333$as_echo "$ac_pt_LIBGNUTLSCONFIG" >&6; }
8334else
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8336$as_echo "no" >&6; }
8337fi
8338
8339 if test "x$ac_pt_LIBGNUTLSCONFIG" = x; then
8340 LIBGNUTLSCONFIG=""
8341 else
8342 case $cross_compiling:$ac_tool_warned in
8343yes:)
8344{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8345$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8346ac_tool_warned=yes ;;
8347esac
8348 LIBGNUTLSCONFIG=$ac_pt_LIBGNUTLSCONFIG
8349 fi
8350else
8351 LIBGNUTLSCONFIG="$ac_cv_path_LIBGNUTLSCONFIG"
8352fi
8353
d9f356c5
MS
8354 if $PKGCONFIG --exists gnutls; then
8355 have_ssl=1
8356 SSLLIBS=`$PKGCONFIG --libs gnutls`
8357 SSLFLAGS=`$PKGCONFIG --cflags gnutls`
8358 $as_echo "#define HAVE_SSL 1" >>confdefs.h
8359
8360 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
8361
8362 elif test "x$LIBGNUTLSCONFIG" != x; then
8363 have_ssl=1
8364 SSLLIBS=`$LIBGNUTLSCONFIG --libs`
8365 SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
8366 $as_echo "#define HAVE_SSL 1" >>confdefs.h
8367
8368 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
8369
8370 fi
8371
8372 if test $have_ssl = 1; then
8373 CUPS_SERVERKEYCHAIN="ssl"
8374
8375 SAVELIBS="$LIBS"
8376 LIBS="$LIBS $SSLLIBS"
8377 ac_fn_c_check_func "$LINENO" "gnutls_transport_set_pull_timeout_function" "ac_cv_func_gnutls_transport_set_pull_timeout_function"
8378if test "x$ac_cv_func_gnutls_transport_set_pull_timeout_function" = xyes; then :
8379 $as_echo "#define HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION 1" >>confdefs.h
8380
8381fi
8382
8383 ac_fn_c_check_func "$LINENO" "gnutls_priority_set_direct" "ac_cv_func_gnutls_priority_set_direct"
8384if test "x$ac_cv_func_gnutls_priority_set_direct" = xyes; then :
8385 $as_echo "#define HAVE_GNUTLS_PRIORITY_SET_DIRECT 1" >>confdefs.h
8386
8387fi
8388
8389 LIBS="$SAVELIBS"
8390 fi
8391 fi
8392fi
8393
8394IPPALIASES="http"
8395if test $have_ssl = 1; then
8396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SSLLIBS=\"$SSLLIBS\"" >&5
8397$as_echo " Using SSLLIBS=\"$SSLLIBS\"" >&6; }
8398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SSLFLAGS=\"$SSLFLAGS\"" >&5
8399$as_echo " Using SSLFLAGS=\"$SSLFLAGS\"" >&6; }
8400 IPPALIASES="http https ipps"
8401elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes; then
8402 as_fn_error $? "Unable to enable SSL support." "$LINENO" 5
8403fi
8404
8405
8406
8407
8408
8409
8410EXPORT_SSLLIBS="$SSLLIBS"
8411
8412
8413
d9f356c5
MS
8414# Check whether --enable-pam was given.
8415if test "${enable_pam+set}" = set; then :
8416 enableval=$enable_pam;
8417fi
8418
8419
8420# Check whether --with-pam_module was given.
8421if test "${with_pam_module+set}" = set; then :
8422 withval=$with_pam_module;
8423fi
8424
8425
8426PAMDIR=""
8427PAMFILE="pam.std"
8428PAMLIBS=""
8429PAMMOD="pam_unknown.so"
8430PAMMODAUTH="pam_unknown.so"
8431
8432if test x$enable_pam != xno; then
8433 SAVELIBS="$LIBS"
8434
8435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8436$as_echo_n "checking for dlopen in -ldl... " >&6; }
8437if ${ac_cv_lib_dl_dlopen+:} false; then :
8438 $as_echo_n "(cached) " >&6
8439else
8440 ac_check_lib_save_LIBS=$LIBS
8441LIBS="-ldl $LIBS"
8442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8443/* end confdefs.h. */
8444
8445/* Override any GCC internal prototype to avoid an error.
8446 Use char because int might match the return type of a GCC
8447 builtin and then its argument prototype would still apply. */
8448#ifdef __cplusplus
8449extern "C"
8450#endif
8451char dlopen ();
8452int
8453main ()
8454{
8455return dlopen ();
8456 ;
8457 return 0;
8458}
8459_ACEOF
8460if ac_fn_c_try_link "$LINENO"; then :
8461 ac_cv_lib_dl_dlopen=yes
8462else
8463 ac_cv_lib_dl_dlopen=no
8464fi
8465rm -f core conftest.err conftest.$ac_objext \
8466 conftest$ac_exeext conftest.$ac_ext
8467LIBS=$ac_check_lib_save_LIBS
8468fi
8469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8470$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
8471if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
8472 cat >>confdefs.h <<_ACEOF
8473#define HAVE_LIBDL 1
8474_ACEOF
8475
8476 LIBS="-ldl $LIBS"
8477
8478fi
8479
8480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8481$as_echo_n "checking for pam_start in -lpam... " >&6; }
8482if ${ac_cv_lib_pam_pam_start+:} false; then :
8483 $as_echo_n "(cached) " >&6
8484else
8485 ac_check_lib_save_LIBS=$LIBS
8486LIBS="-lpam $LIBS"
8487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8488/* end confdefs.h. */
8489
8490/* Override any GCC internal prototype to avoid an error.
8491 Use char because int might match the return type of a GCC
8492 builtin and then its argument prototype would still apply. */
8493#ifdef __cplusplus
8494extern "C"
8495#endif
8496char pam_start ();
8497int
8498main ()
8499{
8500return pam_start ();
8501 ;
8502 return 0;
8503}
8504_ACEOF
8505if ac_fn_c_try_link "$LINENO"; then :
8506 ac_cv_lib_pam_pam_start=yes
8507else
8508 ac_cv_lib_pam_pam_start=no
8509fi
8510rm -f core conftest.err conftest.$ac_objext \
8511 conftest$ac_exeext conftest.$ac_ext
8512LIBS=$ac_check_lib_save_LIBS
8513fi
8514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8515$as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8516if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8517 cat >>confdefs.h <<_ACEOF
8518#define HAVE_LIBPAM 1
8519_ACEOF
8520
8521 LIBS="-lpam $LIBS"
8522
8523fi
8524
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
8526$as_echo_n "checking for pam_set_item in -lpam... " >&6; }
8527if ${ac_cv_lib_pam_pam_set_item+:} false; then :
8528 $as_echo_n "(cached) " >&6
8529else
8530 ac_check_lib_save_LIBS=$LIBS
8531LIBS="-lpam $LIBS"
8532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8533/* end confdefs.h. */
8534
8535/* Override any GCC internal prototype to avoid an error.
8536 Use char because int might match the return type of a GCC
8537 builtin and then its argument prototype would still apply. */
8538#ifdef __cplusplus
8539extern "C"
8540#endif
8541char pam_set_item ();
8542int
8543main ()
8544{
8545return pam_set_item ();
8546 ;
8547 return 0;
8548}
8549_ACEOF
8550if ac_fn_c_try_link "$LINENO"; then :
8551 ac_cv_lib_pam_pam_set_item=yes
8552else
8553 ac_cv_lib_pam_pam_set_item=no
8554fi
8555rm -f core conftest.err conftest.$ac_objext \
8556 conftest$ac_exeext conftest.$ac_ext
8557LIBS=$ac_check_lib_save_LIBS
8558fi
8559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
8560$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
8561if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
8562 $as_echo "#define HAVE_PAM_SET_ITEM 1" >>confdefs.h
8563
8564fi
8565
8566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_setcred in -lpam" >&5
8567$as_echo_n "checking for pam_setcred in -lpam... " >&6; }
8568if ${ac_cv_lib_pam_pam_setcred+:} false; then :
8569 $as_echo_n "(cached) " >&6
8570else
8571 ac_check_lib_save_LIBS=$LIBS
8572LIBS="-lpam $LIBS"
8573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8574/* end confdefs.h. */
8575
8576/* Override any GCC internal prototype to avoid an error.
8577 Use char because int might match the return type of a GCC
8578 builtin and then its argument prototype would still apply. */
8579#ifdef __cplusplus
8580extern "C"
8581#endif
8582char pam_setcred ();
8583int
8584main ()
8585{
8586return pam_setcred ();
8587 ;
8588 return 0;
8589}
8590_ACEOF
8591if ac_fn_c_try_link "$LINENO"; then :
8592 ac_cv_lib_pam_pam_setcred=yes
8593else
8594 ac_cv_lib_pam_pam_setcred=no
8595fi
8596rm -f core conftest.err conftest.$ac_objext \
8597 conftest$ac_exeext conftest.$ac_ext
8598LIBS=$ac_check_lib_save_LIBS
8599fi
8600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_setcred" >&5
8601$as_echo "$ac_cv_lib_pam_pam_setcred" >&6; }
8602if test "x$ac_cv_lib_pam_pam_setcred" = xyes; then :
8603 $as_echo "#define HAVE_PAM_SETCRED 1" >>confdefs.h
8604
8605fi
8606
8607 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
8608if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
8609
8610fi
8611
8612
8613 if test x$ac_cv_header_security_pam_appl_h != xyes; then
8614 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
8615if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
8616 $as_echo "#define HAVE_PAM_PAM_APPL_H 1" >>confdefs.h
8617
8618fi
8619
8620
8621 fi
8622
8623 if test x$ac_cv_lib_pam_pam_start != xno; then
8624 # Set the necessary libraries for PAM...
8625 if test x$ac_cv_lib_dl_dlopen != xno; then
8626 PAMLIBS="-lpam -ldl"
8627 else
8628 PAMLIBS="-lpam"
8629 fi
8630
8631 # Find the PAM configuration directory, if any...
8632 for dir in /private/etc/pam.d /etc/pam.d; do
8633 if test -d $dir; then
8634 PAMDIR=$dir
8635 break;
8636 fi
8637 done
8638 fi
8639
8640 LIBS="$SAVELIBS"
8641
105922ec 8642 case "$host_os_name" in
8d7d268f 8643 darwin*)
8072030b 8644 # Darwin/macOS
d9f356c5
MS
8645 if test "x$with_pam_module" != x; then
8646 PAMFILE="pam.$with_pam_module"
8647 elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
8648 PAMFILE="pam.opendirectory"
8649 else
8650 PAMFILE="pam.securityserver"
8651 fi
8652 ;;
8653
8654 *)
8655 # All others; this test might need to be updated
8656 # as Linux distributors move things around...
8657 if test "x$with_pam_module" != x; then
8658 PAMMOD="pam_${with_pam_module}.so"
ac05c630
MS
8659 elif test -f /etc/pam.d/common-auth; then
8660 PAMFILE="pam.common"
8661 else
8662 moddir=""
8663 for dir in /lib/security /lib64/security /lib/x86_64-linux-gnu/security /var/lib/pam; do
8664 if test -d $dir; then
8665 moddir=$dir
8666 break;
8667 fi
8668 done
8669
8670 if test -f $moddir/pam_unix2.so; then
8671 PAMMOD="pam_unix2.so"
8672 elif test -f $moddir/pam_unix.so; then
8673 PAMMOD="pam_unix.so"
8674 fi
d9f356c5
MS
8675 fi
8676
8677 if test "x$PAMMOD" = xpam_unix.so; then
8678 PAMMODAUTH="$PAMMOD shadow nodelay"
8679 else
8680 PAMMODAUTH="$PAMMOD nodelay"
8681 fi
8682 ;;
8683 esac
8684fi
8685
8686
8687
8688
8689
8690
8691
8692
d9f356c5
MS
8693# Check whether --enable-largefile was given.
8694if test "${enable_largefile+set}" = set; then :
8695 enableval=$enable_largefile;
8696fi
8697
8698if test "$enable_largefile" != no; then
8699
8700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
8701$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
8702if ${ac_cv_sys_largefile_CC+:} false; then :
8703 $as_echo_n "(cached) " >&6
8704else
8705 ac_cv_sys_largefile_CC=no
8706 if test "$GCC" != yes; then
8707 ac_save_CC=$CC
8708 while :; do
8709 # IRIX 6.2 and later do not support large files by default,
8710 # so use the C compiler's -n32 option if that helps.
8711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8712/* end confdefs.h. */
8713#include <sys/types.h>
8714 /* Check that off_t can represent 2**63 - 1 correctly.
8715 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8716 since some C++ compilers masquerading as C compilers
8717 incorrectly reject 9223372036854775807. */
1166bf58 8718#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
d9f356c5
MS
8719 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8720 && LARGE_OFF_T % 2147483647 == 1)
8721 ? 1 : -1];
8722int
8723main ()
8724{
8725
8726 ;
8727 return 0;
8728}
8729_ACEOF
8730 if ac_fn_c_try_compile "$LINENO"; then :
8731 break
8732fi
8733rm -f core conftest.err conftest.$ac_objext
8734 CC="$CC -n32"
8735 if ac_fn_c_try_compile "$LINENO"; then :
8736 ac_cv_sys_largefile_CC=' -n32'; break
8737fi
8738rm -f core conftest.err conftest.$ac_objext
8739 break
8740 done
8741 CC=$ac_save_CC
8742 rm -f conftest.$ac_ext
8743 fi
8744fi
8745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
8746$as_echo "$ac_cv_sys_largefile_CC" >&6; }
8747 if test "$ac_cv_sys_largefile_CC" != no; then
8748 CC=$CC$ac_cv_sys_largefile_CC
8749 fi
8750
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8752$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
8753if ${ac_cv_sys_file_offset_bits+:} false; then :
8754 $as_echo_n "(cached) " >&6
8755else
8756 while :; do
8757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8758/* end confdefs.h. */
8759#include <sys/types.h>
8760 /* Check that off_t can represent 2**63 - 1 correctly.
8761 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8762 since some C++ compilers masquerading as C compilers
8763 incorrectly reject 9223372036854775807. */
1166bf58 8764#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
d9f356c5
MS
8765 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8766 && LARGE_OFF_T % 2147483647 == 1)
8767 ? 1 : -1];
8768int
8769main ()
8770{
8771
8772 ;
8773 return 0;
8774}
8775_ACEOF
8776if ac_fn_c_try_compile "$LINENO"; then :
8777 ac_cv_sys_file_offset_bits=no; break
8778fi
8779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8781/* end confdefs.h. */
8782#define _FILE_OFFSET_BITS 64
8783#include <sys/types.h>
8784 /* Check that off_t can represent 2**63 - 1 correctly.
8785 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8786 since some C++ compilers masquerading as C compilers
8787 incorrectly reject 9223372036854775807. */
1166bf58 8788#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
d9f356c5
MS
8789 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8790 && LARGE_OFF_T % 2147483647 == 1)
8791 ? 1 : -1];
8792int
8793main ()
8794{
8795
8796 ;
8797 return 0;
8798}
8799_ACEOF
8800if ac_fn_c_try_compile "$LINENO"; then :
8801 ac_cv_sys_file_offset_bits=64; break
8802fi
8803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8804 ac_cv_sys_file_offset_bits=unknown
8805 break
8806done
8807fi
8808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
8809$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
8810case $ac_cv_sys_file_offset_bits in #(
8811 no | unknown) ;;
8812 *)
8813cat >>confdefs.h <<_ACEOF
8814#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8815_ACEOF
8816;;
8817esac
8818rm -rf conftest*
8819 if test $ac_cv_sys_file_offset_bits = unknown; then
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
8821$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
8822if ${ac_cv_sys_large_files+:} false; then :
8823 $as_echo_n "(cached) " >&6
8824else
8825 while :; do
8826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8827/* end confdefs.h. */
8828#include <sys/types.h>
8829 /* Check that off_t can represent 2**63 - 1 correctly.
8830 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8831 since some C++ compilers masquerading as C compilers
8832 incorrectly reject 9223372036854775807. */
1166bf58 8833#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
d9f356c5
MS
8834 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8835 && LARGE_OFF_T % 2147483647 == 1)
8836 ? 1 : -1];
8837int
8838main ()
8839{
8840
8841 ;
8842 return 0;
8843}
8844_ACEOF
8845if ac_fn_c_try_compile "$LINENO"; then :
8846 ac_cv_sys_large_files=no; break
8847fi
8848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8850/* end confdefs.h. */
8851#define _LARGE_FILES 1
8852#include <sys/types.h>
8853 /* Check that off_t can represent 2**63 - 1 correctly.
8854 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8855 since some C++ compilers masquerading as C compilers
8856 incorrectly reject 9223372036854775807. */
1166bf58 8857#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
d9f356c5
MS
8858 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8859 && LARGE_OFF_T % 2147483647 == 1)
8860 ? 1 : -1];
8861int
8862main ()
8863{
8864
8865 ;
8866 return 0;
8867}
8868_ACEOF
8869if ac_fn_c_try_compile "$LINENO"; then :
8870 ac_cv_sys_large_files=1; break
8871fi
8872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8873 ac_cv_sys_large_files=unknown
8874 break
8875done
8876fi
8877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
8878$as_echo "$ac_cv_sys_large_files" >&6; }
8879case $ac_cv_sys_large_files in #(
8880 no | unknown) ;;
8881 *)
8882cat >>confdefs.h <<_ACEOF
8883#define _LARGE_FILES $ac_cv_sys_large_files
8884_ACEOF
8885;;
8886esac
8887rm -rf conftest*
8888 fi
3c2cb822
MS
8889
8890
d9f356c5
MS
8891fi
8892
8893
8894LARGEFILE=""
8895if test x$enable_largefile != xno; then
8896 LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
8897
8898 if test x$ac_cv_sys_large_files = x1; then
8899 LARGEFILE="$LARGEFILE -D_LARGE_FILES"
8900 fi
8901
8902 if test x$ac_cv_sys_file_offset_bits = x64; then
8903 LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
8904 fi
8905fi
8906
8907
8908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
8909$as_echo_n "checking for long long int... " >&6; }
8910if ${ac_cv_c_long_long+:} false; then :
8911 $as_echo_n "(cached) " >&6
8912else
8913 if test "$GCC" = yes; then
8914 ac_cv_c_long_long=yes
8915 else
8916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8917/* end confdefs.h. */
8918
8919int
8920main ()
8921{
8922long long int i;
8923 ;
8924 return 0;
8925}
8926_ACEOF
8927if ac_fn_c_try_compile "$LINENO"; then :
8928 ac_cv_c_long_long=yes
8929else
8930 ac_cv_c_long_long=no
8931fi
8932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8933 fi
8934fi
8935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_long_long" >&5
8936$as_echo "$ac_cv_c_long_long" >&6; }
8937
8938if test $ac_cv_c_long_long = yes; then
8939 $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
8940
8941fi
8942
8943ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
8944if test "x$ac_cv_func_strtoll" = xyes; then :
8945 $as_echo "#define HAVE_STRTOLL 1" >>confdefs.h
8946
8947fi
8948
8949
8950
d9f356c5
MS
8951# Check whether --enable-avahi was given.
8952if test "${enable_avahi+set}" = set; then :
8953 enableval=$enable_avahi;
8954fi
8955
8956# Check whether --enable-dnssd was given.
8957if test "${enable_dnssd+set}" = set; then :
8958 enableval=$enable_dnssd;
8959fi
8960
8961
8962# Check whether --with-dnssd-libs was given.
8963if test "${with_dnssd_libs+set}" = set; then :
8964 withval=$with_dnssd_libs; LDFLAGS="-L$withval $LDFLAGS"
8965 DSOFLAGS="-L$withval $DSOFLAGS"
8966fi
8967
8968
8969# Check whether --with-dnssd-includes was given.
8970if test "${with_dnssd_includes+set}" = set; then :
8971 withval=$with_dnssd_includes; CFLAGS="-I$withval $CFLAGS"
8972 CPPFLAGS="-I$withval $CPPFLAGS"
8973fi
8974
8975
8976DNSSDLIBS=""
8977DNSSD_BACKEND=""
8978IPPFIND_BIN=""
8979IPPFIND_MAN=""
8980
105922ec 8981if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$host_os_name != xdarwin; then
d9f356c5
MS
8982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Avahi" >&5
8983$as_echo_n "checking for Avahi... " >&6; }
8984 if $PKGCONFIG --exists avahi-client; then
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8986$as_echo "yes" >&6; }
8987 CFLAGS="$CFLAGS `$PKGCONFIG --cflags avahi-client`"
8988 DNSSDLIBS="`$PKGCONFIG --libs avahi-client`"
8989 DNSSD_BACKEND="dnssd"
8990 IPPFIND_BIN="ippfind"
8991 IPPFIND_MAN="ippfind.\$(MAN1EXT)"
8992 $as_echo "#define HAVE_AVAHI 1" >>confdefs.h
8993
8994 else
8995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8996$as_echo "no" >&6; }
8997 fi
8998fi
8999
9000if test "x$DNSSD_BACKEND" = x -a x$enable_dnssd != xno; then
9001 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9002if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9003
105922ec
MS
9004 case "$host_os_name" in
9005 darwin*)
d4874933 9006 # Darwin and macOS...
d9f356c5
MS
9007 $as_echo "#define HAVE_DNSSD 1" >>confdefs.h
9008
d9f356c5
MS
9009 DNSSD_BACKEND="dnssd"
9010 IPPFIND_BIN="ippfind"
9011 IPPFIND_MAN="ippfind.\$(MAN1EXT)"
9012 ;;
9013 *)
9014 # All others...
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for current version of dns_sd library" >&5
9016$as_echo_n "checking for current version of dns_sd library... " >&6; }
9017 SAVELIBS="$LIBS"
9018 LIBS="$LIBS -ldns_sd"
9019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9020/* end confdefs.h. */
9021#include <dns_sd.h>
9022int
9023main ()
9024{
9025int constant = kDNSServiceFlagsShareConnection;
9026 unsigned char txtRecord[100];
9027 uint8_t valueLen;
9028 TXTRecordGetValuePtr(sizeof(txtRecord),
9029 txtRecord, "value", &valueLen);
9030 ;
9031 return 0;
9032}
9033_ACEOF
9034if ac_fn_c_try_compile "$LINENO"; then :
9035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9036$as_echo "yes" >&6; }
9037 $as_echo "#define HAVE_DNSSD 1" >>confdefs.h
9038
9039 DNSSDLIBS="-ldns_sd"
9040 DNSSD_BACKEND="dnssd"
9041else
9042 IPPFIND_BIN="ippfind"
9043 IPPFIND_MAN="ippfind.\$(MAN1EXT)"
9044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9045$as_echo "no" >&6; }
9046fi
9047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9048 LIBS="$SAVELIBS"
9049 ;;
9050 esac
9051
9052fi
9053
9054
9055fi
9056
9057
9058
9059
9060
9061
9062
d9f356c5
MS
9063ONDEMANDFLAGS=""
9064ONDEMANDLIBS=""
9065
9066
9067
9068# Check whether --enable-launchd was given.
9069if test "${enable_launchd+set}" = set; then :
9070 enableval=$enable_launchd;
9071fi
9072
9073LAUNCHD_DIR=""
9074
9075
9076if test x$enable_launchd != xno; then
1166bf58 9077 ac_fn_c_check_func "$LINENO" "launch_activate_socket" "ac_cv_func_launch_activate_socket"
d9f356c5
MS
9078if test "x$ac_cv_func_launch_activate_socket" = xyes; then :
9079
1166bf58 9080 $as_echo "#define HAVE_LAUNCHD 1" >>confdefs.h
d9f356c5 9081
1166bf58 9082 $as_echo "#define HAVE_ONDEMAND 1" >>confdefs.h
d9f356c5
MS
9083
9084fi
9085
d9f356c5
MS
9086 ac_fn_c_check_header_mongrel "$LINENO" "launch.h" "ac_cv_header_launch_h" "$ac_includes_default"
9087if test "x$ac_cv_header_launch_h" = xyes; then :
9088 $as_echo "#define HAVE_LAUNCH_H 1" >>confdefs.h
9089
9090fi
9091
9092
9093
105922ec
MS
9094 if test "$host_os_name" = darwin; then
9095 LAUNCHD_DIR="/System/Library/LaunchDaemons"
9096 # liblaunch is already part of libSystem
9097 fi
d9f356c5
MS
9098fi
9099
9100# Check whether --enable-systemd was given.
9101if test "${enable_systemd+set}" = set; then :
9102 enableval=$enable_systemd;
9103fi
9104
9105
9106# Check whether --with-systemd was given.
9107if test "${with_systemd+set}" = set; then :
9108 withval=$with_systemd; SYSTEMD_DIR="$withval"
9109else
9110 SYSTEMD_DIR=""
9111fi
9112
9113
9114
9115if test x$enable_systemd != xno; then
9116 if test "x$PKGCONFIG" = x; then
9117 if test x$enable_systemd = xyes; then
9118 as_fn_error $? "Need pkg-config to enable systemd support." "$LINENO" 5
9119 fi
9120 else
9121 have_systemd=no
9122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd" >&5
9123$as_echo_n "checking for libsystemd... " >&6; }
9124 if $PKGCONFIG --exists libsystemd; then
9125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9126$as_echo "yes" >&6; }
9127 have_systemd=yes
9128 ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd`
9129 ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd`
9130 elif $PKGCONFIG --exists libsystemd-daemon; then
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - legacy" >&5
9132$as_echo "yes - legacy" >&6; }
9133 have_systemd=yes
9134 ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
9135 ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
9136
9137 if $PKGCONFIG --exists libsystemd-journal; then
9138 ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`"
9139 ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`"
9140 fi
9141 else
9142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9143$as_echo "no" >&6; }
9144 fi
9145
9146 if test $have_systemd = yes; then
9147 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
9148
1166bf58
MS
9149 $as_echo "#define HAVE_ONDEMAND 1" >>confdefs.h
9150
d9f356c5
MS
9151 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-journal.h" "ac_cv_header_systemd_sd_journal_h" "$ac_includes_default"
9152if test "x$ac_cv_header_systemd_sd_journal_h" = xyes; then :
9153 $as_echo "#define HAVE_SYSTEMD_SD_JOURNAL_H 1" >>confdefs.h
9154
9155fi
9156
9157
9158 if test "x$SYSTEMD_DIR" = x; then
9159 SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`"
9160 fi
9161 fi
9162 fi
9163fi
9164
441de8b2
BN
9165# Check whether --enable-upstart was given.
9166if test "${enable_upstart+set}" = set; then :
9167 enableval=$enable_upstart;
9168fi
9169
9170if test "x$enable_upstart" = "xyes"; then
9171 if test "x$have_systemd" = "xyes"; then
9172 as_fn_error $? "Cannot support both systemd and upstart." "$LINENO" 5
9173 fi
9174 $as_echo "#define HAVE_UPSTART 1" >>confdefs.h
9175
1166bf58
MS
9176 $as_echo "#define HAVE_ONDEMAND 1" >>confdefs.h
9177
441de8b2
BN
9178fi
9179
d9f356c5
MS
9180SMFMANIFESTDIR=""
9181
9182
9183# Check whether --with-smfmanifestdir was given.
9184if test "${with_smfmanifestdir+set}" = set; then :
9185 withval=$with_smfmanifestdir; SMFMANIFESTDIR="$withval"
9186fi
9187
9188
9189
9190# Check whether --with-rcdir was given.
9191if test "${with_rcdir+set}" = set; then :
9192 withval=$with_rcdir; rcdir="$withval"
9193else
9194 rcdir=""
9195fi
9196
9197
9198# Check whether --with-rclevels was given.
9199if test "${with_rclevels+set}" = set; then :
9200 withval=$with_rclevels; rclevels="$withval"
9201else
9202 rclevels="2 3 5"
9203fi
9204
9205
9206# Check whether --with-rcstart was given.
9207if test "${with_rcstart+set}" = set; then :
9208 withval=$with_rcstart; rcstart="$withval"
9209else
9210 rcstart=""
9211fi
9212
9213
9214# Check whether --with-rcstop was given.
9215if test "${with_rcstop+set}" = set; then :
9216 withval=$with_rcstop; rcstop="$withval"
9217else
9218 rcstop=""
9219fi
9220
9221
9222if test x$rcdir = x; then
9223 if test x$LAUNCHD_DIR = x -a x$SYSTEMD_DIR = x -a x$SMFMANIFESTDIR = x; then
9224 # Fall back on "init", the original service startup interface...
9225 if test -d /sbin/init.d; then
9226 # SuSE
9227 rcdir="/sbin/init.d"
9228 elif test -d /etc/init.d; then
9229 # Others
9230 rcdir="/etc"
9231 else
9232 # RedHat, NetBSD
9233 rcdir="/etc/rc.d"
9234 fi
9235 else
9236 rcdir="no"
9237 fi
9238fi
9239
9240if test "x$rcstart" = x; then
105922ec 9241 case "$host_os_name" in
827bf9ce 9242 linux* | gnu*)
d9f356c5
MS
9243 # Linux
9244 rcstart="81"
9245 ;;
9246
105922ec 9247 sunos*)
d9f356c5
MS
9248 # Solaris
9249 rcstart="81"
9250 ;;
9251
9252 *)
9253 # Others
9254 rcstart="99"
9255 ;;
9256 esac
9257fi
9258
9259if test "x$rcstop" = x; then
105922ec 9260 case "$host_os_name" in
827bf9ce 9261 linux* | gnu*)
d9f356c5
MS
9262 # Linux
9263 rcstop="36"
9264 ;;
9265
9266 *)
9267 # Others
9268 rcstop="00"
9269 ;;
9270 esac
9271fi
9272
9273INITDIR=""
9274INITDDIR=""
9275RCLEVELS="$rclevels"
9276RCSTART="$rcstart"
9277RCSTOP="$rcstop"
9278
9279
9280
9281
9282
9283
9284if test "x$rcdir" != xno; then
9285 if test "x$rclevels" = x; then
9286 INITDDIR="$rcdir"
9287 else
9288 INITDIR="$rcdir"
9289 fi
9290fi
9291
9292
9293# Check whether --with-xinetd was given.
9294if test "${with_xinetd+set}" = set; then :
9295 withval=$with_xinetd; xinetd="$withval"
9296else
9297 xinetd=""
9298fi
9299
9300XINETD=""
9301
9302
9303if test "x$xinetd" = x; then
9304 if test ! -x /sbin/launchd; then
9305 for dir in /etc/xinetd.d /usr/local/etc/xinetd.d; do
9306 if test -d $dir; then
9307 XINETD="$dir"
9308 break
9309 fi
9310 done
9311 fi
9312elif test "x$xinetd" != xno; then
9313 XINETD="$xinetd"
9314fi
9315
9316
d9f356c5
MS
9317LANGUAGES="`ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`"
9318
9319
9320# Check whether --with-languages was given.
9321if test "${with_languages+set}" = set; then :
9322 withval=$with_languages;
9323 case "$withval" in
9324 none | no) LANGUAGES="" ;;
9325 all) ;;
9326 *) LANGUAGES="$withval" ;;
9327 esac
9328fi
9329
9330
9331
9332
9333# Check whether --with-bundledir was given.
9334if test "${with_bundledir+set}" = set; then :
9335 withval=$with_bundledir; CUPS_BUNDLEDIR="$withval"
9336else
e4b72d7e
MS
9337
9338 if test "x$host_os_name" = xdarwin -a $host_os_version -ge 100; then
d9f356c5
MS
9339 CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
9340 LANGUAGES=""
9341 else
9342 CUPS_BUNDLEDIR=""
9343 fi
9344fi
9345
9346
9347
9348if test "x$CUPS_BUNDLEDIR" != x; then
9349 cat >>confdefs.h <<_ACEOF
9350#define CUPS_BUNDLEDIR "$CUPS_BUNDLEDIR"
9351_ACEOF
9352
171c38f2
MS
9353fi
9354
9355
9356# Check whether --with-bundlelang was given.
9357if test "${with_bundlelang+set}" = set; then :
9358 withval=$with_bundlelang; cups_bundlelang="$withval"
9359else
e4b72d7e
MS
9360
9361 if test $host_os_version -ge 190; then
171c38f2 9362 cups_bundlelang="en"
e4b72d7e 9363 else
171c38f2 9364 cups_bundlelang="English"
e4b72d7e 9365 fi
171c38f2
MS
9366fi
9367
171c38f2
MS
9368
9369if test "x$cups_bundlelang" != x -a "x$CUPS_BUNDLEDIR" != x; then
9370 CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/$cups_bundlelang.lproj"
e4b72d7e
MS
9371else
9372 CUPS_RESOURCEDIR=""
d9f356c5
MS
9373fi
9374
9375
e4b72d7e 9376
d4a895f8
MS
9377# Check whether --with-exe_file_perm was given.
9378if test "${with_exe_file_perm+set}" = set; then :
9379 withval=$with_exe_file_perm; CUPS_EXE_FILE_PERM="$withval"
9380else
827bf9ce 9381 case "$host_os_name" in
134d0579 9382 linux* | gnu*)
827bf9ce
MS
9383 CUPS_EXE_FILE_PERM="755"
9384 ;;
9385 *)
9386 CUPS_EXE_FILE_PERM="555"
9387 ;;
134d0579
MS
9388 esac
9389fi
9390
d4a895f8
MS
9391
9392
9393
d9f356c5
MS
9394# Check whether --with-config_file_perm was given.
9395if test "${with_config_file_perm+set}" = set; then :
9396 withval=$with_config_file_perm; CUPS_CONFIG_FILE_PERM="$withval"
9397else
105922ec 9398 if test "x$host_os_name" = xdarwin; then
d9f356c5
MS
9399 CUPS_CONFIG_FILE_PERM="644"
9400 else
9401 CUPS_CONFIG_FILE_PERM="640"
9402 fi
9403fi
9404
9405
9406cat >>confdefs.h <<_ACEOF
9407#define CUPS_DEFAULT_CONFIG_FILE_PERM 0$CUPS_CONFIG_FILE_PERM
9408_ACEOF
9409
9410
9411
9412# Check whether --with-cupsd_file_perm was given.
9413if test "${with_cupsd_file_perm+set}" = set; then :
9414 withval=$with_cupsd_file_perm; CUPS_CUPSD_FILE_PERM="$withval"
9415else
827bf9ce 9416 case "$host_os_name" in
134d0579 9417 linux* | gnu*)
827bf9ce
MS
9418 CUPS_CUPSD_FILE_PERM="700"
9419 ;;
9420 *)
9421 CUPS_CUPSD_FILE_PERM="500"
9422 ;;
134d0579
MS
9423 esac
9424fi
9425
d9f356c5
MS
9426
9427
9428
9429# Check whether --with-log_file_perm was given.
9430if test "${with_log_file_perm+set}" = set; then :
9431 withval=$with_log_file_perm; CUPS_LOG_FILE_PERM="$withval"
9432else
9433 CUPS_LOG_FILE_PERM="644"
9434fi
9435
9436
9437cat >>confdefs.h <<_ACEOF
9438#define CUPS_DEFAULT_LOG_FILE_PERM 0$CUPS_LOG_FILE_PERM
9439_ACEOF
9440
9441
9442
9443# Check whether --with-fatal_errors was given.
9444if test "${with_fatal_errors+set}" = set; then :
9445 withval=$with_fatal_errors; CUPS_FATAL_ERRORS="$withval"
9446else
9447 CUPS_FATAL_ERRORS="config"
9448fi
9449
9450
9451cat >>confdefs.h <<_ACEOF
9452#define CUPS_DEFAULT_FATAL_ERRORS "$CUPS_FATAL_ERRORS"
9453_ACEOF
9454
9455
9456
9457# Check whether --with-log_level was given.
9458if test "${with_log_level+set}" = set; then :
9459 withval=$with_log_level; CUPS_LOG_LEVEL="$withval"
9460else
9461 CUPS_LOG_LEVEL="warn"
9462fi
9463
9464
9465cat >>confdefs.h <<_ACEOF
9466#define CUPS_DEFAULT_LOG_LEVEL "$CUPS_LOG_LEVEL"
9467_ACEOF
9468
9469
9470
9471# Check whether --with-access_log_level was given.
9472if test "${with_access_log_level+set}" = set; then :
9473 withval=$with_access_log_level; CUPS_ACCESS_LOG_LEVEL="$withval"
9474else
9475 CUPS_ACCESS_LOG_LEVEL="none"
9476fi
9477
9478
9479cat >>confdefs.h <<_ACEOF
9480#define CUPS_DEFAULT_ACCESS_LOG_LEVEL "$CUPS_ACCESS_LOG_LEVEL"
9481_ACEOF
9482
9483
9484# Check whether --enable-page_logging was given.
9485if test "${enable_page_logging+set}" = set; then :
9486 enableval=$enable_page_logging;
9487fi
9488
9489if test "x$enable_page_logging" = xyes; then
9490 CUPS_PAGE_LOG_FORMAT=""
9491else
9492 CUPS_PAGE_LOG_FORMAT="PageLogFormat"
9493fi
9494
9495
9496# Check whether --enable-browsing was given.
9497if test "${enable_browsing+set}" = set; then :
9498 enableval=$enable_browsing;
9499fi
9500
9501if test "x$enable_browsing" = xno; then
9502 CUPS_BROWSING="No"
9503 cat >>confdefs.h <<_ACEOF
9504#define CUPS_DEFAULT_BROWSING 0
9505_ACEOF
9506
9507else
9508 CUPS_BROWSING="Yes"
9509 cat >>confdefs.h <<_ACEOF
9510#define CUPS_DEFAULT_BROWSING 1
9511_ACEOF
9512
9513fi
9514
9515
9516
9517# Check whether --with-local_protocols was given.
9518if test "${with_local_protocols+set}" = set; then :
9519 withval=$with_local_protocols; default_local_protocols="$withval"
9520else
9521 default_local_protocols="default"
9522fi
9523
9524
9525if test x$with_local_protocols != xno; then
9526 if test "x$default_local_protocols" = "xdefault"; then
9527 if test "x$DNSSD_BACKEND" != "x"; then
9528 CUPS_BROWSE_LOCAL_PROTOCOLS="dnssd"
9529 else
9530 CUPS_BROWSE_LOCAL_PROTOCOLS=""
9531 fi
9532 else
9533 CUPS_BROWSE_LOCAL_PROTOCOLS="$default_local_protocols"
9534 fi
9535else
9536 CUPS_BROWSE_LOCAL_PROTOCOLS=""
9537fi
9538
9539
9540cat >>confdefs.h <<_ACEOF
9541#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "$CUPS_BROWSE_LOCAL_PROTOCOLS"
9542_ACEOF
9543
9544
9545# Check whether --enable-default_shared was given.
9546if test "${enable_default_shared+set}" = set; then :
9547 enableval=$enable_default_shared;
9548fi
9549
9550if test "x$enable_default_shared" = xno; then
9551 CUPS_DEFAULT_SHARED="No"
9552 cat >>confdefs.h <<_ACEOF
9553#define CUPS_DEFAULT_DEFAULT_SHARED 0
9554_ACEOF
9555
9556else
9557 CUPS_DEFAULT_SHARED="Yes"
9558 cat >>confdefs.h <<_ACEOF
9559#define CUPS_DEFAULT_DEFAULT_SHARED 1
9560_ACEOF
9561
9562fi
9563
9564
9565
9566# Check whether --with-cups_user was given.
9567if test "${with_cups_user+set}" = set; then :
9568 withval=$with_cups_user; CUPS_USER="$withval"
9569else
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default print user" >&5
9571$as_echo_n "checking for default print user... " >&6; }
105922ec 9572 if test x$host_os_name = xdarwin; then
d9f356c5
MS
9573 if test x`id -u _lp 2>/dev/null` = x; then
9574 CUPS_USER="lp";
9575 else
9576 CUPS_USER="_lp";
9577 fi
9578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_USER" >&5
9579$as_echo "$CUPS_USER" >&6; }
9580 elif test -f /etc/passwd; then
9581 CUPS_USER=""
9582 for user in lp lpd guest daemon nobody; do
9583 if test "`grep \^${user}: /etc/passwd`" != ""; then
9584 CUPS_USER="$user"
9585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $user" >&5
9586$as_echo "$user" >&6; }
9587 break;
9588 fi
9589 done
9590
9591 if test x$CUPS_USER = x; then
9592 CUPS_USER="nobody"
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9594$as_echo "not found" >&6; }
9595 fi
9596 else
9597 CUPS_USER="nobody"
9598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no password file" >&5
9599$as_echo "no password file" >&6; }
9600 fi
9601fi
9602
9603
9604if test "x$CUPS_USER" = "xroot" -o "x$CUPS_USER" = "x0"; then
9605 as_fn_error $? "The default user for CUPS cannot be root!" "$LINENO" 5
9606fi
9607
9608
9609# Check whether --with-cups_group was given.
9610if test "${with_cups_group+set}" = set; then :
9611 withval=$with_cups_group; CUPS_GROUP="$withval"
9612else
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default print group" >&5
9614$as_echo_n "checking for default print group... " >&6; }
105922ec 9615 if test x$host_os_name = xdarwin; then
d9f356c5
MS
9616 if test x`id -g _lp 2>/dev/null` = x; then
9617 CUPS_GROUP="lp";
9618 else
9619 CUPS_GROUP="_lp";
9620 fi
9621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_GROUP" >&5
9622$as_echo "$CUPS_GROUP" >&6; }
9623 elif test -f /etc/group; then
9624 GROUP_LIST="_lp lp nobody"
9625 CUPS_GROUP=""
9626 for group in $GROUP_LIST; do
9627 if test "`grep \^${group}: /etc/group`" != ""; then
9628 CUPS_GROUP="$group"
9629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $group" >&5
9630$as_echo "$group" >&6; }
9631 break;
9632 fi
9633 done
9634
9635 if test x$CUPS_GROUP = x; then
9636 CUPS_GROUP="nobody"
9637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9638$as_echo "not found" >&6; }
9639 fi
9640 else
9641 CUPS_GROUP="nobody"
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no group file" >&5
9643$as_echo "no group file" >&6; }
9644 fi
9645fi
9646
9647
9648if test "x$CUPS_GROUP" = "xroot" -o "x$CUPS_GROUP" = "xwheel" -o "x$CUPS_GROUP" = "x0"; then
9649 as_fn_error $? "The default group for CUPS cannot be root!" "$LINENO" 5
9650fi
9651
9652
9653# Check whether --with-system_groups was given.
9654if test "${with_system_groups+set}" = set; then :
9655 withval=$with_system_groups; CUPS_SYSTEM_GROUPS="$withval"
9656else
105922ec 9657 if test x$host_os_name = xdarwin; then
d9f356c5
MS
9658 CUPS_SYSTEM_GROUPS="admin"
9659 else
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default system groups" >&5
9661$as_echo_n "checking for default system groups... " >&6; }
9662 if test -f /etc/group; then
9663 CUPS_SYSTEM_GROUPS=""
9664 GROUP_LIST="lpadmin sys system root"
9665 for group in $GROUP_LIST; do
9666 if test "`grep \^${group}: /etc/group`" != ""; then
9667 if test "x$CUPS_SYSTEM_GROUPS" = x; then
9668 CUPS_SYSTEM_GROUPS="$group"
9669 else
9670 CUPS_SYSTEM_GROUPS="$CUPS_SYSTEM_GROUPS $group"
9671 fi
9672 fi
9673 done
9674
9675 if test "x$CUPS_SYSTEM_GROUPS" = x; then
9676 CUPS_SYSTEM_GROUPS="$GROUP_LIST"
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no groups found" >&5
9678$as_echo "no groups found" >&6; }
9679 else
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CUPS_SYSTEM_GROUPS\"" >&5
9681$as_echo "\"$CUPS_SYSTEM_GROUPS\"" >&6; }
9682 fi
9683 else
9684 CUPS_SYSTEM_GROUPS="$GROUP_LIST"
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no group file" >&5
9686$as_echo "no group file" >&6; }
9687 fi
9688 fi
9689fi
9690
9691
9692CUPS_PRIMARY_SYSTEM_GROUP="`echo $CUPS_SYSTEM_GROUPS | awk '{print $1}'`"
9693
9694for group in $CUPS_SYSTEM_GROUPS; do
9695 if test "x$CUPS_GROUP" = "x$group"; then
9696 as_fn_error $? "The default system groups cannot contain the default CUPS group!" "$LINENO" 5
9697 fi
9698done
9699
9700
9701
9702
9703
9704
9705cat >>confdefs.h <<_ACEOF
9706#define CUPS_DEFAULT_USER "$CUPS_USER"
9707_ACEOF
9708
9709cat >>confdefs.h <<_ACEOF
9710#define CUPS_DEFAULT_GROUP "$CUPS_GROUP"
9711_ACEOF
9712
9713cat >>confdefs.h <<_ACEOF
9714#define CUPS_DEFAULT_SYSTEM_GROUPS "$CUPS_SYSTEM_GROUPS"
9715_ACEOF
9716
9717
9718
9719# Check whether --with-printcap was given.
9720if test "${with_printcap+set}" = set; then :
9721 withval=$with_printcap; default_printcap="$withval"
9722else
9723 default_printcap="default"
9724fi
9725
9726
9727if test x$default_printcap != xno; then
9728 if test "x$default_printcap" = "xdefault"; then
105922ec
MS
9729 case $host_os_name in
9730 darwin*)
9731 if test $host_os_version -ge 90; then
d9f356c5
MS
9732 CUPS_DEFAULT_PRINTCAP="/Library/Preferences/org.cups.printers.plist"
9733 else
9734 CUPS_DEFAULT_PRINTCAP="/etc/printcap"
9735 fi
9736 ;;
105922ec 9737 sunos*)
d9f356c5
MS
9738 CUPS_DEFAULT_PRINTCAP="/etc/printers.conf"
9739 ;;
9740 *)
9741 CUPS_DEFAULT_PRINTCAP="/etc/printcap"
9742 ;;
9743 esac
9744 else
9745 CUPS_DEFAULT_PRINTCAP="$default_printcap"
9746 fi
9747else
9748 CUPS_DEFAULT_PRINTCAP=""
9749fi
9750
9751
9752cat >>confdefs.h <<_ACEOF
9753#define CUPS_DEFAULT_PRINTCAP "$CUPS_DEFAULT_PRINTCAP"
9754_ACEOF
9755
9756
9757
9758# Check whether --with-lpdconfigfile was given.
9759if test "${with_lpdconfigfile+set}" = set; then :
9760 withval=$with_lpdconfigfile; default_lpdconfigfile="$withval"
9761else
9762 default_lpdconfigfile="default"
9763fi
9764
9765
9766if test x$default_lpdconfigfile != xno; then
9767 if test "x$default_lpdconfigfile" = "xdefault"; then
105922ec
MS
9768 case $host_os_name in
9769 darwin*)
d9f356c5
MS
9770 CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
9771 ;;
9772 *)
9773 if test "x$XINETD" != x; then
9774 CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd://$XINETD/cups-lpd"
9775 else
9776 CUPS_DEFAULT_LPD_CONFIG_FILE=""
9777 fi
9778 ;;
9779 esac
9780 else
9781 CUPS_DEFAULT_LPD_CONFIG_FILE="$default_lpdconfigfile"
9782 fi
9783else
9784 CUPS_DEFAULT_LPD_CONFIG_FILE=""
9785fi
9786
9787cat >>confdefs.h <<_ACEOF
9788#define CUPS_DEFAULT_LPD_CONFIG_FILE "$CUPS_DEFAULT_LPD_CONFIG_FILE"
9789_ACEOF
9790
9791
9792
9793
9794# Check whether --with-smbconfigfile was given.
9795if test "${with_smbconfigfile+set}" = set; then :
9796 withval=$with_smbconfigfile; default_smbconfigfile="$withval"
9797else
9798 default_smbconfigfile="default"
9799fi
9800
9801
9802if test x$default_smbconfigfile != xno; then
9803 if test "x$default_smbconfigfile" = "xdefault"; then
9804 if test -f /etc/smb.conf; then
9805 CUPS_DEFAULT_SMB_CONFIG_FILE="samba:///etc/smb.conf"
9806 else
9807 CUPS_DEFAULT_SMB_CONFIG_FILE=""
9808 fi
9809 else
9810 CUPS_DEFAULT_SMB_CONFIG_FILE="$default_smbconfigfile"
9811 fi
9812else
9813 CUPS_DEFAULT_SMB_CONFIG_FILE=""
9814fi
9815
9816cat >>confdefs.h <<_ACEOF
9817#define CUPS_DEFAULT_SMB_CONFIG_FILE "$CUPS_DEFAULT_SMB_CONFIG_FILE"
9818_ACEOF
9819
9820
9821
9822
9823# Check whether --with-max-copies was given.
9824if test "${with_max_copies+set}" = set; then :
9825 withval=$with_max_copies; CUPS_MAX_COPIES="$withval"
9826else
9827 CUPS_MAX_COPIES="9999"
9828fi
9829
9830
9831
9832cat >>confdefs.h <<_ACEOF
9833#define CUPS_DEFAULT_MAX_COPIES $CUPS_MAX_COPIES
9834_ACEOF
9835
9836
9837# Check whether --enable-raw_printing was given.
9838if test "${enable_raw_printing+set}" = set; then :
9839 enableval=$enable_raw_printing;
9840fi
9841
9842if test "x$enable_raw_printing" != xno; then
9843 DEFAULT_RAW_PRINTING=""
9844else
9845 DEFAULT_RAW_PRINTING="#"
9846fi
9847
9848
9849
9850# Check whether --with-snmp-address was given.
9851if test "${with_snmp_address+set}" = set; then :
9852 withval=$with_snmp_address; if test "x$withval" = x; then
9853 CUPS_SNMP_ADDRESS=""
9854 else
9855 CUPS_SNMP_ADDRESS="Address $withval"
9856 fi
9857else
105922ec 9858 if test "x$host_os_name" = xdarwin; then
d9f356c5
MS
9859 CUPS_SNMP_ADDRESS=""
9860 else
9861 CUPS_SNMP_ADDRESS="Address @LOCAL"
9862 fi
9863fi
9864
9865
9866
9867# Check whether --with-snmp-community was given.
9868if test "${with_snmp_community+set}" = set; then :
9869 withval=$with_snmp_community; CUPS_SNMP_COMMUNITY="Community $withval"
9870else
9871 CUPS_SNMP_COMMUNITY="Community public"
9872fi
9873
9874
9875
9876
9877
9878
9879# Check whether --with-ipp-port was given.
9880if test "${with_ipp_port+set}" = set; then :
9881 withval=$with_ipp_port; DEFAULT_IPP_PORT="$withval"
9882else
9883 DEFAULT_IPP_PORT="631"
9884fi
9885
9886
9887
9888cat >>confdefs.h <<_ACEOF
9889#define CUPS_DEFAULT_IPP_PORT $DEFAULT_IPP_PORT
9890_ACEOF
9891
9892
9893# Check whether --enable-webif was given.
9894if test "${enable_webif+set}" = set; then :
9895 enableval=$enable_webif;
9896fi
9897
9898case "x$enable_webif" in
9899 xno)
9900 CUPS_WEBIF=No
9901 CUPS_DEFAULT_WEBIF=0
9902 ;;
9903 xyes)
9904 CUPS_WEBIF=Yes
9905 CUPS_DEFAULT_WEBIF=1
9906 ;;
9907 *)
105922ec 9908 if test $host_os_name = darwin; then
d9f356c5
MS
9909 CUPS_WEBIF=No
9910 CUPS_DEFAULT_WEBIF=0
9911 else
9912 CUPS_WEBIF=Yes
9913 CUPS_DEFAULT_WEBIF=1
9914 fi
9915 ;;
9916esac
9917
9918
9919cat >>confdefs.h <<_ACEOF
9920#define CUPS_DEFAULT_WEBIF $CUPS_DEFAULT_WEBIF
9921_ACEOF
9922
9923
9924
d9f356c5
MS
9925INSTALL_LANGUAGES=""
9926UNINSTALL_LANGUAGES=""
9927LANGFILES=""
9928if test "x$LANGUAGES" != x; then
9929 INSTALL_LANGUAGES="install-languages"
9930 UNINSTALL_LANGUAGES="uninstall-languages"
9931 for lang in $LANGUAGES; do
9932 if test -f doc/$lang/index.html.in; then
9933 LANGFILES="$LANGFILES doc/$lang/index.html"
9934 fi
9935
9936 if test -f templates/$lang/header.tmpl.in; then
9937 LANGFILES="$LANGFILES templates/$lang/header.tmpl"
9938 fi
9939 done
9940elif test "x$CUPS_BUNDLEDIR" != x; then
9941 INSTALL_LANGUAGES="install-langbundle"
9942 UNINSTALL_LANGUAGES="uninstall-langbundle"
9943fi
9944
9945
9946
9947
f1def5b8 9948ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups-config desktop/cups.desktop doc/index.html man/client.conf.man man/cups-files.conf.man man/cups-lpd.man man/cups-snmp.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cups-lpdAT.service scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket templates/header.tmpl packaging/cups.list $LANGFILES"
d9f356c5
MS
9949
9950cat >confcache <<\_ACEOF
9951# This file is a shell script that caches the results of configure
9952# tests run on this system so they can be shared between configure
9953# scripts and configure runs, see configure's option --config-cache.
9954# It is not useful on other systems. If it contains results you don't
9955# want to keep, you may remove or edit it.
9956#
9957# config.status only pays attention to the cache file if you give it
9958# the --recheck option to rerun configure.
9959#
9960# `ac_cv_env_foo' variables (set or unset) will be overridden when
9961# loading this file, other *unset* `ac_cv_foo' will be assigned the
9962# following values.
9963
9964_ACEOF
9965
9966# The following way of writing the cache mishandles newlines in values,
9967# but we know of no workaround that is simple, portable, and efficient.
9968# So, we kill variables containing newlines.
9969# Ultrix sh set writes to stderr and can't be redirected directly,
9970# and sets the high bit in the cache file unless we assign to the vars.
9971(
9972 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9973 eval ac_val=\$$ac_var
9974 case $ac_val in #(
9975 *${as_nl}*)
9976 case $ac_var in #(
9977 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
9978$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
9979 esac
9980 case $ac_var in #(
9981 _ | IFS | as_nl) ;; #(
9982 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9983 *) { eval $ac_var=; unset $ac_var;} ;;
9984 esac ;;
9985 esac
9986 done
9987
9988 (set) 2>&1 |
9989 case $as_nl`(ac_space=' '; set) 2>&1` in #(
9990 *${as_nl}ac_space=\ *)
9991 # `set' does not quote correctly, so add quotes: double-quote
9992 # substitution turns \\\\ into \\, and sed turns \\ into \.
9993 sed -n \
9994 "s/'/'\\\\''/g;
9995 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
9996 ;; #(
9997 *)
9998 # `set' quotes correctly as required by POSIX, so do not add quotes.
9999 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10000 ;;
10001 esac |
10002 sort
10003) |
10004 sed '
10005 /^ac_cv_env_/b end
10006 t clear
10007 :clear
10008 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10009 t end
10010 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10011 :end' >>confcache
10012if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10013 if test -w "$cache_file"; then
10014 if test "x$cache_file" != "x/dev/null"; then
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
10016$as_echo "$as_me: updating cache $cache_file" >&6;}
10017 if test ! -f "$cache_file" || test -h "$cache_file"; then
10018 cat confcache >"$cache_file"
10019 else
10020 case $cache_file in #(
10021 */* | ?:*)
10022 mv -f confcache "$cache_file"$$ &&
10023 mv -f "$cache_file"$$ "$cache_file" ;; #(
10024 *)
10025 mv -f confcache "$cache_file" ;;
10026 esac
10027 fi
10028 fi
10029 else
10030 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
10031$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10032 fi
10033fi
10034rm -f confcache
10035
10036test "x$prefix" = xNONE && prefix=$ac_default_prefix
10037# Let make expand exec_prefix.
10038test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10039
10040DEFS=-DHAVE_CONFIG_H
10041
10042ac_libobjs=
10043ac_ltlibobjs=
10044U=
10045for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10046 # 1. Remove the extension, and $U if already installed.
10047 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10048 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
10049 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
10050 # will be set to the directory where LIBOBJS objects are built.
10051 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10052 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
10053done
10054LIBOBJS=$ac_libobjs
10055
10056LTLIBOBJS=$ac_ltlibobjs
10057
10058
10059
10060: "${CONFIG_STATUS=./config.status}"
10061ac_write_fail=0
10062ac_clean_files_save=$ac_clean_files
10063ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
10065$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
10066as_write_fail=0
10067cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
10068#! $SHELL
10069# Generated by $as_me.
10070# Run this file to recreate the current configuration.
10071# Compiler output produced by configure, useful for debugging
10072# configure, is in config.log if it exists.
10073
10074debug=false
10075ac_cs_recheck=false
10076ac_cs_silent=false
10077
10078SHELL=\${CONFIG_SHELL-$SHELL}
10079export SHELL
10080_ASEOF
10081cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
10082## -------------------- ##
10083## M4sh Initialization. ##
10084## -------------------- ##
10085
10086# Be more Bourne compatible
10087DUALCASE=1; export DUALCASE # for MKS sh
10088if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
10089 emulate sh
10090 NULLCMD=:
10091 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
10092 # is contrary to our usage. Disable this feature.
10093 alias -g '${1+"$@"}'='"$@"'
10094 setopt NO_GLOB_SUBST
10095else
10096 case `(set -o) 2>/dev/null` in #(
10097 *posix*) :
10098 set -o posix ;; #(
10099 *) :
10100 ;;
10101esac
10102fi
10103
10104
10105as_nl='
10106'
10107export as_nl
10108# Printing a long string crashes Solaris 7 /usr/bin/printf.
10109as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
10110as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
10111as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
10112# Prefer a ksh shell builtin over an external printf program on Solaris,
10113# but without wasting forks for bash or zsh.
10114if test -z "$BASH_VERSION$ZSH_VERSION" \
10115 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
10116 as_echo='print -r --'
10117 as_echo_n='print -rn --'
10118elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
10119 as_echo='printf %s\n'
10120 as_echo_n='printf %s'
10121else
10122 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
10123 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
10124 as_echo_n='/usr/ucb/echo -n'
10125 else
10126 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
10127 as_echo_n_body='eval
10128 arg=$1;
10129 case $arg in #(
10130 *"$as_nl"*)
10131 expr "X$arg" : "X\\(.*\\)$as_nl";
10132 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
10133 esac;
10134 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
10135 '
10136 export as_echo_n_body
10137 as_echo_n='sh -c $as_echo_n_body as_echo'
10138 fi
10139 export as_echo_body
10140 as_echo='sh -c $as_echo_body as_echo'
10141fi
10142
10143# The user is always right.
10144if test "${PATH_SEPARATOR+set}" != set; then
10145 PATH_SEPARATOR=:
10146 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
10147 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
10148 PATH_SEPARATOR=';'
10149 }
10150fi
10151
10152
10153# IFS
10154# We need space, tab and new line, in precisely that order. Quoting is
10155# there to prevent editors from complaining about space-tab.
10156# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10157# splitting by setting IFS to empty value.)
10158IFS=" "" $as_nl"
10159
10160# Find who we are. Look in the path if we contain no directory separator.
10161as_myself=
10162case $0 in #((
10163 *[\\/]* ) as_myself=$0 ;;
10164 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165for as_dir in $PATH
10166do
10167 IFS=$as_save_IFS
10168 test -z "$as_dir" && as_dir=.
10169 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10170 done
10171IFS=$as_save_IFS
10172
10173 ;;
10174esac
10175# We did not find ourselves, most probably we were run as `sh COMMAND'
10176# in which case we are not to be found in the path.
10177if test "x$as_myself" = x; then
10178 as_myself=$0
10179fi
10180if test ! -f "$as_myself"; then
10181 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10182 exit 1
10183fi
10184
10185# Unset variables that we do not need and which cause bugs (e.g. in
10186# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
10187# suppresses any "Segmentation fault" message there. '((' could
10188# trigger a bug in pdksh 5.2.14.
10189for as_var in BASH_ENV ENV MAIL MAILPATH
10190do eval test x\${$as_var+set} = xset \
10191 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
10192done
10193PS1='$ '
10194PS2='> '
10195PS4='+ '
10196
10197# NLS nuisances.
10198LC_ALL=C
10199export LC_ALL
10200LANGUAGE=C
10201export LANGUAGE
10202
10203# CDPATH.
10204(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10205
10206
10207# as_fn_error STATUS ERROR [LINENO LOG_FD]
10208# ----------------------------------------
10209# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
10210# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
10211# script with STATUS, using 1 if that was 0.
10212as_fn_error ()
10213{
10214 as_status=$1; test $as_status -eq 0 && as_status=1
10215 if test "$4"; then
10216 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
10217 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
10218 fi
10219 $as_echo "$as_me: error: $2" >&2
10220 as_fn_exit $as_status
10221} # as_fn_error
10222
10223
10224# as_fn_set_status STATUS
10225# -----------------------
10226# Set $? to STATUS, without forking.
10227as_fn_set_status ()
10228{
10229 return $1
10230} # as_fn_set_status
10231
10232# as_fn_exit STATUS
10233# -----------------
10234# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
10235as_fn_exit ()
10236{
10237 set +e
10238 as_fn_set_status $1
10239 exit $1
10240} # as_fn_exit
10241
10242# as_fn_unset VAR
10243# ---------------
10244# Portably unset VAR.
10245as_fn_unset ()
10246{
10247 { eval $1=; unset $1;}
10248}
10249as_unset=as_fn_unset
10250# as_fn_append VAR VALUE
10251# ----------------------
10252# Append the text in VALUE to the end of the definition contained in VAR. Take
10253# advantage of any shell optimizations that allow amortized linear growth over
10254# repeated appends, instead of the typical quadratic growth present in naive
10255# implementations.
10256if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
10257 eval 'as_fn_append ()
10258 {
10259 eval $1+=\$2
10260 }'
10261else
10262 as_fn_append ()
10263 {
10264 eval $1=\$$1\$2
10265 }
10266fi # as_fn_append
10267
10268# as_fn_arith ARG...
10269# ------------------
10270# Perform arithmetic evaluation on the ARGs, and store the result in the
10271# global $as_val. Take advantage of shells that can avoid forks. The arguments
10272# must be portable across $(()) and expr.
10273if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
10274 eval 'as_fn_arith ()
10275 {
10276 as_val=$(( $* ))
10277 }'
10278else
10279 as_fn_arith ()
10280 {
10281 as_val=`expr "$@" || test $? -eq 1`
10282 }
10283fi # as_fn_arith
10284
10285
10286if expr a : '\(a\)' >/dev/null 2>&1 &&
10287 test "X`expr 00001 : '.*\(...\)'`" = X001; then
10288 as_expr=expr
10289else
10290 as_expr=false
10291fi
10292
10293if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
10294 as_basename=basename
10295else
10296 as_basename=false
10297fi
10298
10299if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
10300 as_dirname=dirname
10301else
10302 as_dirname=false
10303fi
10304
10305as_me=`$as_basename -- "$0" ||
10306$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
10307 X"$0" : 'X\(//\)$' \| \
10308 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
10309$as_echo X/"$0" |
10310 sed '/^.*\/\([^/][^/]*\)\/*$/{
10311 s//\1/
10312 q
10313 }
10314 /^X\/\(\/\/\)$/{
10315 s//\1/
10316 q
10317 }
10318 /^X\/\(\/\).*/{
10319 s//\1/
10320 q
10321 }
10322 s/.*/./; q'`
10323
10324# Avoid depending upon Character Ranges.
10325as_cr_letters='abcdefghijklmnopqrstuvwxyz'
10326as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
10327as_cr_Letters=$as_cr_letters$as_cr_LETTERS
10328as_cr_digits='0123456789'
10329as_cr_alnum=$as_cr_Letters$as_cr_digits
10330
10331ECHO_C= ECHO_N= ECHO_T=
10332case `echo -n x` in #(((((
10333-n*)
10334 case `echo 'xy\c'` in
10335 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
10336 xy) ECHO_C='\c';;
10337 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
10338 ECHO_T=' ';;
10339 esac;;
10340*)
10341 ECHO_N='-n';;
10342esac
10343
10344rm -f conf$$ conf$$.exe conf$$.file
10345if test -d conf$$.dir; then
10346 rm -f conf$$.dir/conf$$.file
10347else
10348 rm -f conf$$.dir
10349 mkdir conf$$.dir 2>/dev/null
10350fi
10351if (echo >conf$$.file) 2>/dev/null; then
10352 if ln -s conf$$.file conf$$ 2>/dev/null; then
10353 as_ln_s='ln -s'
10354 # ... but there are two gotchas:
10355 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
10356 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
3c2cb822 10357 # In both cases, we have to default to `cp -pR'.
d9f356c5 10358 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
3c2cb822 10359 as_ln_s='cp -pR'
d9f356c5
MS
10360 elif ln conf$$.file conf$$ 2>/dev/null; then
10361 as_ln_s=ln
10362 else
3c2cb822 10363 as_ln_s='cp -pR'
d9f356c5
MS
10364 fi
10365else
3c2cb822 10366 as_ln_s='cp -pR'
d9f356c5
MS
10367fi
10368rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
10369rmdir conf$$.dir 2>/dev/null
10370
10371
10372# as_fn_mkdir_p
10373# -------------
10374# Create "$as_dir" as a directory, including parents if necessary.
10375as_fn_mkdir_p ()
10376{
10377
10378 case $as_dir in #(
10379 -*) as_dir=./$as_dir;;
10380 esac
10381 test -d "$as_dir" || eval $as_mkdir_p || {
10382 as_dirs=
10383 while :; do
10384 case $as_dir in #(
10385 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
10386 *) as_qdir=$as_dir;;
10387 esac
10388 as_dirs="'$as_qdir' $as_dirs"
10389 as_dir=`$as_dirname -- "$as_dir" ||
10390$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10391 X"$as_dir" : 'X\(//\)[^/]' \| \
10392 X"$as_dir" : 'X\(//\)$' \| \
10393 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
10394$as_echo X"$as_dir" |
10395 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10396 s//\1/
10397 q
10398 }
10399 /^X\(\/\/\)[^/].*/{
10400 s//\1/
10401 q
10402 }
10403 /^X\(\/\/\)$/{
10404 s//\1/
10405 q
10406 }
10407 /^X\(\/\).*/{
10408 s//\1/
10409 q
10410 }
10411 s/.*/./; q'`
10412 test -d "$as_dir" && break
10413 done
10414 test -z "$as_dirs" || eval "mkdir $as_dirs"
10415 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
10416
10417
10418} # as_fn_mkdir_p
10419if mkdir -p . 2>/dev/null; then
10420 as_mkdir_p='mkdir -p "$as_dir"'
10421else
10422 test -d ./-p && rmdir ./-p
10423 as_mkdir_p=false
10424fi
10425
3c2cb822
MS
10426
10427# as_fn_executable_p FILE
10428# -----------------------
10429# Test if FILE is an executable regular file.
10430as_fn_executable_p ()
10431{
10432 test -f "$1" && test -x "$1"
10433} # as_fn_executable_p
10434as_test_x='test -x'
10435as_executable_p=as_fn_executable_p
d9f356c5
MS
10436
10437# Sed expression to map a string onto a valid CPP name.
10438as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
10439
10440# Sed expression to map a string onto a valid variable name.
10441as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
10442
10443
10444exec 6>&1
10445## ----------------------------------- ##
10446## Main body of $CONFIG_STATUS script. ##
10447## ----------------------------------- ##
10448_ASEOF
10449test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
10450
10451cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10452# Save the log message, to keep $0 and so on meaningful, and to
10453# report actual input values of CONFIG_FILES etc. instead of their
10454# values after options handling.
10455ac_log="
8a763079 10456This file was extended by CUPS $as_me 2.3b7, which was
3c2cb822 10457generated by GNU Autoconf 2.69. Invocation command line was
d9f356c5
MS
10458
10459 CONFIG_FILES = $CONFIG_FILES
10460 CONFIG_HEADERS = $CONFIG_HEADERS
10461 CONFIG_LINKS = $CONFIG_LINKS
10462 CONFIG_COMMANDS = $CONFIG_COMMANDS
10463 $ $0 $@
10464
10465on `(hostname || uname -n) 2>/dev/null | sed 1q`
10466"
10467
10468_ACEOF
10469
10470case $ac_config_files in *"
10471"*) set x $ac_config_files; shift; ac_config_files=$*;;
10472esac
10473
10474case $ac_config_headers in *"
10475"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
10476esac
10477
10478
10479cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10480# Files that config.status was made for.
10481config_files="$ac_config_files"
10482config_headers="$ac_config_headers"
10483
10484_ACEOF
10485
10486cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10487ac_cs_usage="\
10488\`$as_me' instantiates files and other configuration actions
10489from templates according to the current configuration. Unless the files
10490and actions are specified as TAGs, all are instantiated by default.
10491
10492Usage: $0 [OPTION]... [TAG]...
10493
10494 -h, --help print this help, then exit
10495 -V, --version print version number and configuration settings, then exit
10496 --config print configuration, then exit
10497 -q, --quiet, --silent
10498 do not print progress messages
10499 -d, --debug don't remove temporary files
10500 --recheck update $as_me by reconfiguring in the same conditions
10501 --file=FILE[:TEMPLATE]
10502 instantiate the configuration file FILE
10503 --header=FILE[:TEMPLATE]
10504 instantiate the configuration header FILE
10505
10506Configuration files:
10507$config_files
10508
10509Configuration headers:
10510$config_headers
10511
24343173 10512Report bugs to <https://github.com/apple/cups/issues>.
d9f356c5
MS
10513CUPS home page: <https://www.cups.org/>."
10514
10515_ACEOF
10516cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10517ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
10518ac_cs_version="\\
8a763079 10519CUPS config.status 2.3b7
3c2cb822 10520configured by $0, generated by GNU Autoconf 2.69,
d9f356c5
MS
10521 with options \\"\$ac_cs_config\\"
10522
3c2cb822 10523Copyright (C) 2012 Free Software Foundation, Inc.
d9f356c5
MS
10524This config.status script is free software; the Free Software Foundation
10525gives unlimited permission to copy, distribute and modify it."
10526
10527ac_pwd='$ac_pwd'
10528srcdir='$srcdir'
10529AWK='$AWK'
10530test -n "\$AWK" || AWK=awk
10531_ACEOF
10532
10533cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10534# The default lists apply if the user does not specify any file.
10535ac_need_defaults=:
10536while test $# != 0
10537do
10538 case $1 in
10539 --*=?*)
10540 ac_option=`expr "X$1" : 'X\([^=]*\)='`
10541 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
10542 ac_shift=:
10543 ;;
10544 --*=)
10545 ac_option=`expr "X$1" : 'X\([^=]*\)='`
10546 ac_optarg=
10547 ac_shift=:
10548 ;;
10549 *)
10550 ac_option=$1
10551 ac_optarg=$2
10552 ac_shift=shift
10553 ;;
10554 esac
10555
10556 case $ac_option in
10557 # Handling of the options.
10558 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10559 ac_cs_recheck=: ;;
10560 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
10561 $as_echo "$ac_cs_version"; exit ;;
10562 --config | --confi | --conf | --con | --co | --c )
10563 $as_echo "$ac_cs_config"; exit ;;
10564 --debug | --debu | --deb | --de | --d | -d )
10565 debug=: ;;
10566 --file | --fil | --fi | --f )
10567 $ac_shift
10568 case $ac_optarg in
10569 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
10570 '') as_fn_error $? "missing file argument" ;;
10571 esac
10572 as_fn_append CONFIG_FILES " '$ac_optarg'"
10573 ac_need_defaults=false;;
10574 --header | --heade | --head | --hea )
10575 $ac_shift
10576 case $ac_optarg in
10577 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
10578 esac
10579 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
10580 ac_need_defaults=false;;
10581 --he | --h)
10582 # Conflict between --help and --header
10583 as_fn_error $? "ambiguous option: \`$1'
10584Try \`$0 --help' for more information.";;
10585 --help | --hel | -h )
10586 $as_echo "$ac_cs_usage"; exit ;;
10587 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10588 | -silent | --silent | --silen | --sile | --sil | --si | --s)
10589 ac_cs_silent=: ;;
10590
10591 # This is an error.
10592 -*) as_fn_error $? "unrecognized option: \`$1'
10593Try \`$0 --help' for more information." ;;
10594
10595 *) as_fn_append ac_config_targets " $1"
10596 ac_need_defaults=false ;;
10597
10598 esac
10599 shift
10600done
10601
10602ac_configure_extra_args=
10603
10604if $ac_cs_silent; then
10605 exec 6>/dev/null
10606 ac_configure_extra_args="$ac_configure_extra_args --silent"
10607fi
10608
10609_ACEOF
10610cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10611if \$ac_cs_recheck; then
3c2cb822 10612 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
d9f356c5
MS
10613 shift
10614 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
10615 CONFIG_SHELL='$SHELL'
10616 export CONFIG_SHELL
10617 exec "\$@"
10618fi
10619
10620_ACEOF
10621cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10622exec 5>>config.log
10623{
10624 echo
10625 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
10626## Running $as_me. ##
10627_ASBOX
10628 $as_echo "$ac_log"
10629} >&5
10630
10631_ACEOF
10632cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10633_ACEOF
10634
10635cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10636
10637# Handling of arguments.
10638for ac_config_target in $ac_config_targets
10639do
10640 case $ac_config_target in
10641 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
10642 "Makedefs") CONFIG_FILES="$CONFIG_FILES Makedefs" ;;
10643 "conf/cups-files.conf") CONFIG_FILES="$CONFIG_FILES conf/cups-files.conf" ;;
10644 "conf/cupsd.conf") CONFIG_FILES="$CONFIG_FILES conf/cupsd.conf" ;;
10645 "conf/mime.convs") CONFIG_FILES="$CONFIG_FILES conf/mime.convs" ;;
10646 "conf/pam.std") CONFIG_FILES="$CONFIG_FILES conf/pam.std" ;;
10647 "conf/snmp.conf") CONFIG_FILES="$CONFIG_FILES conf/snmp.conf" ;;
10648 "cups-config") CONFIG_FILES="$CONFIG_FILES cups-config" ;;
10649 "desktop/cups.desktop") CONFIG_FILES="$CONFIG_FILES desktop/cups.desktop" ;;
10650 "doc/index.html") CONFIG_FILES="$CONFIG_FILES doc/index.html" ;;
10651 "man/client.conf.man") CONFIG_FILES="$CONFIG_FILES man/client.conf.man" ;;
10652 "man/cups-files.conf.man") CONFIG_FILES="$CONFIG_FILES man/cups-files.conf.man" ;;
10653 "man/cups-lpd.man") CONFIG_FILES="$CONFIG_FILES man/cups-lpd.man" ;;
10654 "man/cups-snmp.man") CONFIG_FILES="$CONFIG_FILES man/cups-snmp.man" ;;
d9f356c5
MS
10655 "man/cupsd.conf.man") CONFIG_FILES="$CONFIG_FILES man/cupsd.conf.man" ;;
10656 "man/cupsd.man") CONFIG_FILES="$CONFIG_FILES man/cupsd.man" ;;
10657 "man/lpoptions.man") CONFIG_FILES="$CONFIG_FILES man/lpoptions.man" ;;
10658 "scheduler/cups-lpd.xinetd") CONFIG_FILES="$CONFIG_FILES scheduler/cups-lpd.xinetd" ;;
10659 "scheduler/cups.sh") CONFIG_FILES="$CONFIG_FILES scheduler/cups.sh" ;;
10660 "scheduler/cups.xml") CONFIG_FILES="$CONFIG_FILES scheduler/cups.xml" ;;
10661 "scheduler/org.cups.cups-lpd.plist") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cups-lpd.plist" ;;
10662 "scheduler/org.cups.cups-lpdAT.service") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cups-lpdAT.service" ;;
10663 "scheduler/org.cups.cupsd.path") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cupsd.path" ;;
10664 "scheduler/org.cups.cupsd.service") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cupsd.service" ;;
10665 "scheduler/org.cups.cupsd.socket") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cupsd.socket" ;;
10666 "templates/header.tmpl") CONFIG_FILES="$CONFIG_FILES templates/header.tmpl" ;;
10667 "packaging/cups.list") CONFIG_FILES="$CONFIG_FILES packaging/cups.list" ;;
10668 "$LANGFILES") CONFIG_FILES="$CONFIG_FILES $LANGFILES" ;;
10669
10670 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
10671 esac
10672done
10673
10674
10675# If the user did not use the arguments to specify the items to instantiate,
10676# then the envvar interface is used. Set only those that are not.
10677# We use the long form for the default assignment because of an extremely
10678# bizarre bug on SunOS 4.1.3.
10679if $ac_need_defaults; then
10680 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
10681 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
10682fi
10683
10684# Have a temporary directory for convenience. Make it in the build tree
10685# simply because there is no reason against having it here, and in addition,
10686# creating and moving files from /tmp can sometimes cause problems.
10687# Hook for its removal unless debugging.
10688# Note that there is a small window in which the directory will not be cleaned:
10689# after its creation but before its name has been assigned to `$tmp'.
10690$debug ||
10691{
10692 tmp= ac_tmp=
10693 trap 'exit_status=$?
10694 : "${ac_tmp:=$tmp}"
10695 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
10696' 0
10697 trap 'as_fn_exit 1' 1 2 13 15
10698}
10699# Create a (secure) tmp directory for tmp files.
10700
10701{
10702 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
10703 test -d "$tmp"
10704} ||
10705{
10706 tmp=./conf$$-$RANDOM
10707 (umask 077 && mkdir "$tmp")
10708} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
10709ac_tmp=$tmp
10710
10711# Set up the scripts for CONFIG_FILES section.
10712# No need to generate them if there are no CONFIG_FILES.
10713# This happens for instance with `./config.status config.h'.
10714if test -n "$CONFIG_FILES"; then
10715
10716
10717ac_cr=`echo X | tr X '\015'`
10718# On cygwin, bash can eat \r inside `` if the user requested igncr.
10719# But we know of no other shell where ac_cr would be empty at this
10720# point, so we can use a bashism as a fallback.
10721if test "x$ac_cr" = x; then
10722 eval ac_cr=\$\'\\r\'
10723fi
10724ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
10725if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
10726 ac_cs_awk_cr='\\r'
10727else
10728 ac_cs_awk_cr=$ac_cr
10729fi
10730
10731echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
10732_ACEOF
10733
10734
10735{
10736 echo "cat >conf$$subs.awk <<_ACEOF" &&
10737 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
10738 echo "_ACEOF"
10739} >conf$$subs.sh ||
10740 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10741ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
10742ac_delim='%!_!# '
10743for ac_last_try in false false false false false :; do
10744 . ./conf$$subs.sh ||
10745 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10746
10747 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
10748 if test $ac_delim_n = $ac_delim_num; then
10749 break
10750 elif $ac_last_try; then
10751 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10752 else
10753 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10754 fi
10755done
10756rm -f conf$$subs.sh
10757
10758cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10759cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
10760_ACEOF
10761sed -n '
10762h
10763s/^/S["/; s/!.*/"]=/
10764p
10765g
10766s/^[^!]*!//
10767:repl
10768t repl
10769s/'"$ac_delim"'$//
10770t delim
10771:nl
10772h
10773s/\(.\{148\}\)..*/\1/
10774t more1
10775s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
10776p
10777n
10778b repl
10779:more1
10780s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10781p
10782g
10783s/.\{148\}//
10784t nl
10785:delim
10786h
10787s/\(.\{148\}\)..*/\1/
10788t more2
10789s/["\\]/\\&/g; s/^/"/; s/$/"/
10790p
10791b
10792:more2
10793s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10794p
10795g
10796s/.\{148\}//
10797t delim
10798' <conf$$subs.awk | sed '
10799/^[^""]/{
10800 N
10801 s/\n//
10802}
10803' >>$CONFIG_STATUS || ac_write_fail=1
10804rm -f conf$$subs.awk
10805cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10806_ACAWK
10807cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
10808 for (key in S) S_is_set[key] = 1
10809 FS = "\a"
10810
10811}
10812{
10813 line = $ 0
10814 nfields = split(line, field, "@")
10815 substed = 0
10816 len = length(field[1])
10817 for (i = 2; i < nfields; i++) {
10818 key = field[i]
10819 keylen = length(key)
10820 if (S_is_set[key]) {
10821 value = S[key]
10822 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
10823 len += length(value) + length(field[++i])
10824 substed = 1
10825 } else
10826 len += 1 + keylen
10827 }
10828
10829 print line
10830}
10831
10832_ACAWK
10833_ACEOF
10834cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10835if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
10836 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
10837else
10838 cat
10839fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
10840 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
10841_ACEOF
10842
10843# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
10844# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
10845# trailing colons and then remove the whole line if VPATH becomes empty
10846# (actually we leave an empty line to preserve line numbers).
10847if test "x$srcdir" = x.; then
10848 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
10849h
10850s///
10851s/^/:/
10852s/[ ]*$/:/
10853s/:\$(srcdir):/:/g
10854s/:\${srcdir}:/:/g
10855s/:@srcdir@:/:/g
10856s/^:*//
10857s/:*$//
10858x
10859s/\(=[ ]*\).*/\1/
10860G
10861s/\n//
10862s/^[^=]*=[ ]*$//
10863}'
10864fi
10865
10866cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10867fi # test -n "$CONFIG_FILES"
10868
10869# Set up the scripts for CONFIG_HEADERS section.
10870# No need to generate them if there are no CONFIG_HEADERS.
10871# This happens for instance with `./config.status Makefile'.
10872if test -n "$CONFIG_HEADERS"; then
10873cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
10874BEGIN {
10875_ACEOF
10876
10877# Transform confdefs.h into an awk script `defines.awk', embedded as
10878# here-document in config.status, that substitutes the proper values into
10879# config.h.in to produce config.h.
10880
10881# Create a delimiter string that does not exist in confdefs.h, to ease
10882# handling of long lines.
10883ac_delim='%!_!# '
10884for ac_last_try in false false :; do
10885 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
10886 if test -z "$ac_tt"; then
10887 break
10888 elif $ac_last_try; then
10889 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
10890 else
10891 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10892 fi
10893done
10894
10895# For the awk script, D is an array of macro values keyed by name,
10896# likewise P contains macro parameters if any. Preserve backslash
10897# newline sequences.
10898
10899ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
10900sed -n '
10901s/.\{148\}/&'"$ac_delim"'/g
10902t rset
10903:rset
10904s/^[ ]*#[ ]*define[ ][ ]*/ /
10905t def
10906d
10907:def
10908s/\\$//
10909t bsnl
10910s/["\\]/\\&/g
10911s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
10912D["\1"]=" \3"/p
10913s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
10914d
10915:bsnl
10916s/["\\]/\\&/g
10917s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
10918D["\1"]=" \3\\\\\\n"\\/p
10919t cont
10920s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
10921t cont
10922d
10923:cont
10924n
10925s/.\{148\}/&'"$ac_delim"'/g
10926t clear
10927:clear
10928s/\\$//
10929t bsnlc
10930s/["\\]/\\&/g; s/^/"/; s/$/"/p
10931d
10932:bsnlc
10933s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
10934b cont
10935' <confdefs.h | sed '
10936s/'"$ac_delim"'/"\\\
10937"/g' >>$CONFIG_STATUS || ac_write_fail=1
10938
10939cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10940 for (key in D) D_is_set[key] = 1
10941 FS = "\a"
10942}
10943/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
10944 line = \$ 0
10945 split(line, arg, " ")
10946 if (arg[1] == "#") {
10947 defundef = arg[2]
10948 mac1 = arg[3]
10949 } else {
10950 defundef = substr(arg[1], 2)
10951 mac1 = arg[2]
10952 }
10953 split(mac1, mac2, "(") #)
10954 macro = mac2[1]
10955 prefix = substr(line, 1, index(line, defundef) - 1)
10956 if (D_is_set[macro]) {
10957 # Preserve the white space surrounding the "#".
10958 print prefix "define", macro P[macro] D[macro]
10959 next
10960 } else {
10961 # Replace #undef with comments. This is necessary, for example,
10962 # in the case of _POSIX_SOURCE, which is predefined and required
10963 # on some systems where configure will not decide to define it.
10964 if (defundef == "undef") {
10965 print "/*", prefix defundef, macro, "*/"
10966 next
10967 }
10968 }
10969}
10970{ print }
10971_ACAWK
10972_ACEOF
10973cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10974 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
10975fi # test -n "$CONFIG_HEADERS"
10976
10977
10978eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
10979shift
10980for ac_tag
10981do
10982 case $ac_tag in
10983 :[FHLC]) ac_mode=$ac_tag; continue;;
10984 esac
10985 case $ac_mode$ac_tag in
10986 :[FHL]*:*);;
10987 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
10988 :[FH]-) ac_tag=-:-;;
10989 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
10990 esac
10991 ac_save_IFS=$IFS
10992 IFS=:
10993 set x $ac_tag
10994 IFS=$ac_save_IFS
10995 shift
10996 ac_file=$1
10997 shift
10998
10999 case $ac_mode in
11000 :L) ac_source=$1;;
11001 :[FH])
11002 ac_file_inputs=
11003 for ac_f
11004 do
11005 case $ac_f in
11006 -) ac_f="$ac_tmp/stdin";;
11007 *) # Look for the file first in the build tree, then in the source tree
11008 # (if the path is not absolute). The absolute path cannot be DOS-style,
11009 # because $ac_f cannot contain `:'.
11010 test -f "$ac_f" ||
11011 case $ac_f in
11012 [\\/$]*) false;;
11013 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11014 esac ||
11015 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
11016 esac
11017 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11018 as_fn_append ac_file_inputs " '$ac_f'"
11019 done
11020
11021 # Let's still pretend it is `configure' which instantiates (i.e., don't
11022 # use $as_me), people would be surprised to read:
11023 # /* config.h. Generated by config.status. */
11024 configure_input='Generated from '`
11025 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11026 `' by configure.'
11027 if test x"$ac_file" != x-; then
11028 configure_input="$ac_file. $configure_input"
11029 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
11030$as_echo "$as_me: creating $ac_file" >&6;}
11031 fi
11032 # Neutralize special characters interpreted by sed in replacement strings.
11033 case $configure_input in #(
11034 *\&* | *\|* | *\\* )
11035 ac_sed_conf_input=`$as_echo "$configure_input" |
11036 sed 's/[\\\\&|]/\\\\&/g'`;; #(
11037 *) ac_sed_conf_input=$configure_input;;
11038 esac
11039
11040 case $ac_tag in
11041 *:-:* | *:-) cat >"$ac_tmp/stdin" \
11042 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
11043 esac
11044 ;;
11045 esac
11046
11047 ac_dir=`$as_dirname -- "$ac_file" ||
11048$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11049 X"$ac_file" : 'X\(//\)[^/]' \| \
11050 X"$ac_file" : 'X\(//\)$' \| \
11051 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11052$as_echo X"$ac_file" |
11053 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11054 s//\1/
11055 q
11056 }
11057 /^X\(\/\/\)[^/].*/{
11058 s//\1/
11059 q
11060 }
11061 /^X\(\/\/\)$/{
11062 s//\1/
11063 q
11064 }
11065 /^X\(\/\).*/{
11066 s//\1/
11067 q
11068 }
11069 s/.*/./; q'`
11070 as_dir="$ac_dir"; as_fn_mkdir_p
11071 ac_builddir=.
11072
11073case "$ac_dir" in
11074.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11075*)
11076 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
11077 # A ".." for each directory in $ac_dir_suffix.
11078 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
11079 case $ac_top_builddir_sub in
11080 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11081 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11082 esac ;;
11083esac
11084ac_abs_top_builddir=$ac_pwd
11085ac_abs_builddir=$ac_pwd$ac_dir_suffix
11086# for backward compatibility:
11087ac_top_builddir=$ac_top_build_prefix
11088
11089case $srcdir in
11090 .) # We are building in place.
11091 ac_srcdir=.
11092 ac_top_srcdir=$ac_top_builddir_sub
11093 ac_abs_top_srcdir=$ac_pwd ;;
11094 [\\/]* | ?:[\\/]* ) # Absolute name.
11095 ac_srcdir=$srcdir$ac_dir_suffix;
11096 ac_top_srcdir=$srcdir
11097 ac_abs_top_srcdir=$srcdir ;;
11098 *) # Relative name.
11099 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11100 ac_top_srcdir=$ac_top_build_prefix$srcdir
11101 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11102esac
11103ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11104
11105
11106 case $ac_mode in
11107 :F)
11108 #
11109 # CONFIG_FILE
11110 #
11111
11112_ACEOF
11113
11114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11115# If the template does not know about datarootdir, expand it.
11116# FIXME: This hack should be removed a few years after 2.60.
11117ac_datarootdir_hack=; ac_datarootdir_seen=
11118ac_sed_dataroot='
11119/datarootdir/ {
11120 p
11121 q
11122}
11123/@datadir@/p
11124/@docdir@/p
11125/@infodir@/p
11126/@localedir@/p
11127/@mandir@/p'
11128case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
11129*datarootdir*) ac_datarootdir_seen=yes;;
11130*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11132$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11133_ACEOF
11134cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11135 ac_datarootdir_hack='
11136 s&@datadir@&$datadir&g
11137 s&@docdir@&$docdir&g
11138 s&@infodir@&$infodir&g
11139 s&@localedir@&$localedir&g
11140 s&@mandir@&$mandir&g
11141 s&\\\${datarootdir}&$datarootdir&g' ;;
11142esac
11143_ACEOF
11144
11145# Neutralize VPATH when `$srcdir' = `.'.
11146# Shell code in configure.ac might set extrasub.
11147# FIXME: do we really want to maintain this feature?
11148cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11149ac_sed_extra="$ac_vpsub
11150$extrasub
11151_ACEOF
11152cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11153:t
11154/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11155s|@configure_input@|$ac_sed_conf_input|;t t
11156s&@top_builddir@&$ac_top_builddir_sub&;t t
11157s&@top_build_prefix@&$ac_top_build_prefix&;t t
11158s&@srcdir@&$ac_srcdir&;t t
11159s&@abs_srcdir@&$ac_abs_srcdir&;t t
11160s&@top_srcdir@&$ac_top_srcdir&;t t
11161s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11162s&@builddir@&$ac_builddir&;t t
11163s&@abs_builddir@&$ac_abs_builddir&;t t
11164s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11165$ac_datarootdir_hack
11166"
11167eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
11168 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11169
11170test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11171 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
11172 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
11173 "$ac_tmp/out"`; test -z "$ac_out"; } &&
11174 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11175which seems to be undefined. Please make sure it is defined" >&5
11176$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11177which seems to be undefined. Please make sure it is defined" >&2;}
11178
11179 rm -f "$ac_tmp/stdin"
11180 case $ac_file in
11181 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
11182 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
11183 esac \
11184 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11185 ;;
11186 :H)
11187 #
11188 # CONFIG_HEADER
11189 #
11190 if test x"$ac_file" != x-; then
11191 {
11192 $as_echo "/* $configure_input */" \
11193 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
11194 } >"$ac_tmp/config.h" \
11195 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11196 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
11197 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
11198$as_echo "$as_me: $ac_file is unchanged" >&6;}
11199 else
11200 rm -f "$ac_file"
11201 mv "$ac_tmp/config.h" "$ac_file" \
11202 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11203 fi
11204 else
11205 $as_echo "/* $configure_input */" \
11206 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
11207 || as_fn_error $? "could not create -" "$LINENO" 5
11208 fi
11209 ;;
11210
11211
11212 esac
11213
11214done # for ac_tag
11215
11216
11217as_fn_exit 0
11218_ACEOF
11219ac_clean_files=$ac_clean_files_save
11220
11221test $ac_write_fail = 0 ||
11222 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
11223
11224
11225# configure is writing to config.log, and then calls config.status.
11226# config.status does its own redirection, appending to config.log.
11227# Unfortunately, on DOS this fails, as config.log is still kept open
11228# by configure, so config.status won't be able to write to it; its
11229# output is simply discarded. So we exec the FD to /dev/null,
11230# effectively closing config.log, so it can be properly (re)opened and
11231# appended to by config.status. When coming back to configure, we
11232# need to make the FD available again.
11233if test "$no_create" != yes; then
11234 ac_cs_success=:
11235 ac_config_status_args=
11236 test "$silent" = yes &&
11237 ac_config_status_args="$ac_config_status_args --quiet"
11238 exec 5>/dev/null
11239 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11240 exec 5>>config.log
11241 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11242 # would make configure fail if this is the last instruction.
11243 $ac_cs_success || as_fn_exit 1
11244fi
11245if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
11247$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
11248fi
11249
11250
11251chmod +x cups-config