comparison configure @ 0:c7f6b056b673

First import of vendor version
author Peter Gervai <grin@grin.hu>
date Tue, 10 Mar 2009 13:49:58 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c7f6b056b673
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4
5 # --S-LICENSE--
6
7 # Defaults:
8 ac_help=
9 ac_default_prefix=/usr/local
10 # Any additions from configure.in:
11 ac_default_prefix=/var/dcc
12 if test -n " --with-updatedcc_pfile=FILE of updatedcc parameters"; then
13 ac_help="$ac_help --with-updatedcc_pfile=FILE of updatedcc parameters
14 "
15 fi
16 if test -n " --with-installroot=DIR prefix DIR to installation directory paths"; then
17 ac_help="$ac_help --with-installroot=DIR prefix DIR to installation directory paths
18 "
19 fi
20 if test -n " --with-configsuffix=STR append STR to installed configuration file names"; then
21 ac_help="$ac_help --with-configsuffix=STR append STR to installed configuration file names
22 "
23 fi
24 if test " --enable-64-bits compile for 64-bits on Solaris and Linux PowerPC"; then
25 ac_help="$ac_help --enable-64-bits compile for 64-bits on Solaris and Linux PowerPC
26 "
27 fi
28 if test -n ""; then
29 ac_help="$ac_help
30 "
31 fi
32 if test -n " --with-DCC-MD5 use MD5 code in the DCC source"; then
33 ac_help="$ac_help --with-DCC-MD5 use MD5 code in the DCC source
34 "
35 fi
36 if test -n " --with-uid=UID set-UID user name for cdcc, dccproc, & dccsight"; then
37 ac_help="$ac_help --with-uid=UID set-UID user name for cdcc, dccproc, & dccsight
38 "
39 fi
40 if test " --disable-sys-inst install in private directories and no set-UID"; then
41 ac_help="$ac_help --disable-sys-inst install in private directories and no set-UID
42 "
43 fi
44 if test " --disable-server do not build DCC server, dccd"; then
45 ac_help="$ac_help --disable-server do not build DCC server, dccd
46 "
47 fi
48 if test " --disable-dccifd do not build DCC program interface, dccifd"; then
49 ac_help="$ac_help --disable-dccifd do not build DCC program interface, dccifd
50 "
51 fi
52 if test " --disable-dccm do not build DCC sendmail interface, dccm"; then
53 ac_help="$ac_help --disable-dccm do not build DCC sendmail interface, dccm
54 "
55 fi
56 if test -n " --with-sendmail=DIR build dccm with sendmail milter interface in dir"; then
57 ac_help="$ac_help --with-sendmail=DIR build dccm with sendmail milter interface in dir
58 "
59 fi
60 if test -n " --with-cgibin=DIR for whitelist CGI scripts [HOMEDIR/cgibin]"; then
61 ac_help="$ac_help --with-cgibin=DIR for whitelist CGI scripts [HOMEDIR/cgibin]
62 "
63 fi
64 if test -n " --with-rundir=DIR for PID files and milter socket [/var/run/dcc]"; then
65 ac_help="$ac_help --with-rundir=DIR for PID files and milter socket [/var/run/dcc]
66 "
67 fi
68 if test -n " --with-db-memory=MB minimum server database buffer size 32-49152 MBytes"; then
69 ac_help="$ac_help --with-db-memory=MB minimum server database buffer size 32-49152 MBytes
70 "
71 fi
72 if test -n " --with-max-db-mem=MB maximum server database buffer size 32-49152 MBytes"; then
73 ac_help="$ac_help --with-max-db-mem=MB maximum server database buffer size 32-49152 MBytes
74 "
75 fi
76 if test -n " --with-max-log-size=KB maximum log file size; 0=no limit [32]"; then
77 ac_help="$ac_help --with-max-log-size=KB maximum log file size; 0=no limit [32]
78 "
79 fi
80 if test -n ""; then
81 ac_help="$ac_help
82 "
83 fi
84 if test " --disable-IPv6 no IPv6 support"; then
85 ac_help="$ac_help --disable-IPv6 no IPv6 support
86 "
87 fi
88 if test -n " --with-kludge=FILE include header FILE"; then
89 ac_help="$ac_help --with-kludge=FILE include header FILE
90 "
91 fi
92 if test -n " --with-socks[=lib] build DCC clients with SOCKS support"; then
93 ac_help="$ac_help --with-socks[=lib] build DCC clients with SOCKS support
94 "
95 fi
96
97 # Initialize some variables set by options.
98 # The variables have the same names as the options, with
99 # dashes changed to underlines.
100 build=NONE
101 cache_file=./config.cache
102 exec_prefix=NONE
103 host=NONE
104 no_create=
105 nonopt=NONE
106 no_recursion=
107 prefix=NONE
108 program_prefix=NONE
109 program_suffix=NONE
110 program_transform_name=s,x,x,
111 silent=
112 site=
113 sitefile=
114 srcdir=
115 target=NONE
116 x_includes=NONE
117 x_libraries=NONE
118 bindir='${exec_prefix}/bin'
119 libexecdir='${exec_prefix}/libexec'
120 mandir='${prefix}/man'
121
122 # Initialize some other variables.
123 subdirs=
124 MFLAGS= MAKEFLAGS=
125 SHELL=${CONFIG_SHELL-/bin/sh}
126 # Maximum number of lines to put in a shell here document.
127 ac_max_here_lines=12
128
129 ac_prev=
130 for ac_option
131 do
132
133 # If the previous option needs an argument, assign it.
134 if test -n "$ac_prev"; then
135 eval "$ac_prev=\$ac_option"
136 ac_prev=
137 continue
138 fi
139
140 case "$ac_option" in
141 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
142 *) ac_optarg= ;;
143 esac
144
145 # Accept the important Cygnus configure options, so we can diagnose typos.
146
147 case "$ac_option" in
148
149 -bindir | --bindir | --bindi | --bind | --bin | --bi)
150 ac_prev=bindir ;;
151 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
152 bindir="$ac_optarg" ;;
153
154 -cache-file | --cache-file | --cache-fil | --cache-fi \
155 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
156 ac_prev=cache_file ;;
157 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
158 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
159 cache_file="$ac_optarg" ;;
160
161 -disable-* | --disable-*)
162 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
163 # Reject names that are not valid shell variable names.
164 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
165 { echo "error: $ac_feature: invalid feature name" 1>&2; exit 1; }
166 fi
167 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
168 eval "enable_${ac_feature}=no" ;;
169
170 -enable-* | --enable-*)
171 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
172 # Reject names that are not valid shell variable names.
173 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
174 { echo "error: $ac_feature: invalid feature name" 1>&2; exit 1; }
175 fi
176 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
177 case "$ac_option" in
178 *=*) ;;
179 *) ac_optarg=yes ;;
180 esac
181 eval "enable_${ac_feature}='$ac_optarg'" ;;
182
183 -help | --help | --hel | --he)
184 # Omit some internal or obsolete options to make the list less imposing.
185 # This message is too long to be a string in the A/UX 3.1 sh.
186 cat << EOF
187 Usage: configure [options]
188 Options: [defaults in brackets after descriptions]
189 Configuration:
190 --help print this message
191 --no-create do not create output files
192 --quiet do not print "checking..." messages
193 --homedir=HOMEDIR DCC home directory [/var/dcc]
194 --bindir=DIR user executables [/usr/local/bin]
195 --libexecdir=DIR program executables [HOMEDIR/libexec]
196 --mandir=DIR documentation [/usr/local/man]
197 EOF
198 if test -n "$ac_help"; then
199 echo "$ac_help"
200 fi
201 exit 0 ;;
202
203 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
204 | --libexe | --libex | --libe)
205 ac_prev=libexecdir ;;
206 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
207 | --libexe=* | --libex=* | --libe=*)
208 libexecdir="$ac_optarg" ;;
209
210 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
211 ac_prev=mandir ;;
212 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
213 mandir="$ac_optarg" ;;
214
215 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
216 | --no-cr | --no-c)
217 no_create=yes ;;
218
219 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
220 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
221 no_recursion=yes ;;
222
223 --homedir | -homedir | --home | -home)
224 ac_prev=homedir ;;
225 --homedir=* | -homedir=* | --home=* | -home=*)
226 # make homedir absolute to prevent problems with updatedcc
227 cwd=`pwd`
228 prefix=`echo "$ac_optarg" | sed -e "s@^[^/]@$cwd/&@"`
229 if expr "$prefix" : '/.*' >/dev/null; then :
230 else
231 { echo "error: --could not make --homedir=$ac_optarg absolute" 1>&2; exit 1; } fi
232 ;;
233
234
235 -prefix | --prefix | -prefix=* | --prefix=*)
236 { echo "error: --prefix is not what you think it is.
237 Use --homedir, --bindir, --libexecdir, --mandir, --with-installroot,
238 and perhaps --disable-sys-inst" 1>&2; exit 1; } ;;
239
240 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
241 | -silent | --silent | --silen | --sile | --sil)
242 silent=yes ;;
243
244 -with-* | --with-*)
245 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
246 # Reject names that are not valid shell variable names.
247 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
248 { echo "error: $ac_package: invalid package name" 1>&2; exit 1; }
249 fi
250 ac_package=`echo $ac_package| sed 's/-/_/g'`
251 case "$ac_option" in
252 *=*) ;;
253 *) ac_optarg=yes ;;
254 esac
255 eval "with_${ac_package}='$ac_optarg'" ;;
256
257 -without-* | --without-*)
258 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
259 # Reject names that are not valid shell variable names.
260 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
261 { echo "error: $ac_package: invalid package name" 1>&2; exit 1; }
262 fi
263 ac_package=`echo $ac_package| sed 's/-/_/g'`
264 eval "with_${ac_package}=no" ;;
265
266 --x)
267 # Obsolete; use --with-x.
268 with_x=yes ;;
269
270 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
271 | --x-incl | --x-inc | --x-in | --x-i)
272 ac_prev=x_includes ;;
273 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
274 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
275 x_includes="$ac_optarg" ;;
276
277 -x-libraries | --x-libraries | --x-librarie | --x-librari \
278 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
279 ac_prev=x_libraries ;;
280 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
281 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
282 x_libraries="$ac_optarg" ;;
283
284 -*) { echo "error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
285 ;;
286
287 *)
288 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
289 echo "warning: $ac_option: invalid host type" 1>&2
290 fi
291 if test "x$nonopt" != xNONE; then
292 { echo "error: can only configure for one host and one target at a time" 1>&2; exit 1; }
293 fi
294 nonopt="$ac_option"
295 ;;
296
297 esac
298 done
299
300 if test -n "$ac_prev"; then
301 { echo "error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
302 fi
303
304 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
305
306 # File descriptor usage:
307 # 0 standard input
308 # 1 file creation
309 # 2 errors and warnings
310 # 3 some systems may open it to /dev/tty
311 # 4 used on the Kubota Titan
312 # 6 checking for... messages and results
313 # 5 compiler messages saved in config.log
314 if test "$silent" = yes; then
315 exec 6>/dev/null
316 else
317 exec 6>&1
318 fi
319 exec 5>./config.log
320
321 echo "\
322 This file contains any messages produced by compilers while
323 running configure, to aid debugging if configure makes a mistake.
324 " 1>&5
325
326 # Strip out --no-create and --no-recursion so they do not pile up.
327 # Also quote any args containing shell metacharacters.
328 ac_configure_args=
329 for ac_arg
330 do
331 case "$ac_arg" in
332 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
333 | --no-cr | --no-c) ;;
334 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
336 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
337 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
338 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
339 esac
340 done
341
342 # NLS nuisances.
343 # Only set these to C if already set. These must not be set unconditionally
344 # because not all systems understand e.g. LANG=C (notably SCO).
345 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
346 # Non-C LC_CTYPE values break the ctype check.
347 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
348 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
349 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
350 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
351
352 # confdefs.h avoids OS command line length limits that DEFS can exceed.
353 rm -rf conftest* confdefs.h
354 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
355 echo > confdefs.h
356
357 # A filename unique to this package, relative to the directory that
358 # configure is in, which we can look for to find out if srcdir is correct.
359 ac_unique_file=dccproc/dccproc.c
360
361 # Find the source files, if location was not specified.
362 if test -z "$srcdir"; then
363 ac_srcdir_defaulted=yes
364 # Try the directory containing this script, then its parent.
365 ac_prog=$0
366 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
367 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
368 srcdir=$ac_confdir
369 if test ! -r $srcdir/$ac_unique_file; then
370 srcdir=..
371 fi
372 else
373 ac_srcdir_defaulted=no
374 fi
375 if test ! -r $srcdir/$ac_unique_file; then
376 if test "$ac_srcdir_defaulted" = yes; then
377 { echo "error: cannot find sources in $ac_confdir or .." 1>&2; exit 1; }
378 else
379 { echo "error: cannot find sources in $srcdir" 1>&2; exit 1; }
380 fi
381 fi
382 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
383
384 # Prefer explicitly selected file to automatically selected ones.
385 if test -z "$sitefile"; then
386 if test -z "$CONFIG_SITE"; then
387 if test "x$prefix" != xNONE; then
388 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
389 else
390 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
391 fi
392 fi
393 else
394 CONFIG_SITE="$sitefile"
395 fi
396 for ac_site_file in $CONFIG_SITE; do
397 if test -r "$ac_site_file"; then
398 echo "loading site script $ac_site_file"
399 . "$ac_site_file"
400 fi
401 done
402
403 # pay no attention to old autoconf cache files in case the target system
404 # has been upgraded
405 if test -f "$cache_file"; then
406 old_cache_file=`find "$cache_file" -mtime +1 -type f -size +1c -print`
407 if test "$cache_file" = "$old_cache_file"; then
408 echo "ignore old cache $cache_file"
409 rm $cache_file
410 else
411 if grep '^ac_cv_DCC_VERSION.*1.3.103' $cache_file 2>&1 1>/dev/null; then : ;
412 else
413 echo "ignore stray $cache_file"
414 rm -f $cache_file
415 fi
416 fi
417 fi
418 ac_cv_DCC_VERSION=1.3.103
419 if test -r "$cache_file"; then
420 if test "$silent" != yes; then
421 echo "loading cache $cache_file"
422 fi
423 . $cache_file
424 else
425 if test "$silent" != yes; then
426 echo "creating cache $cache_file"
427 fi
428 > $cache_file
429 fi
430
431 ac_ext=c
432 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
433 ac_cpp='$CPP $CPPFLAGS'
434 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
435 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
436 cross_compiling=$ac_cv_prog_cc_cross
437
438 ac_exeext=
439 ac_objext=o
440 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
441 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
442 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
443 ac_n= ac_c='
444 ' ac_t=' '
445 else
446 ac_n=-n ac_c= ac_t=
447 fi
448 else
449 ac_n= ac_c='\c' ac_t=
450 fi
451
452
453
454 ac_aux_dir=
455 for ac_dir in autoconf $srcdir/autoconf; do
456 if test -f $ac_dir/install-sh; then
457 ac_aux_dir=$ac_dir
458 ac_install_sh="$ac_aux_dir/install-sh -c"
459 break
460 elif test -f $ac_dir/install.sh; then
461 ac_aux_dir=$ac_dir
462 ac_install_sh="$ac_aux_dir/install.sh -c"
463 break
464 fi
465 done
466 if test -z "$ac_aux_dir"; then
467 { echo "error: cannot find install-sh or install.sh in autoconf $srcdir/autoconf" 1>&2; exit 1; }
468 fi
469 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
470
471
472 RCS_REVISION="`echo 'Rhyolite Software DCC 1.3.103-1.204' | sed -e 's/-.*//'`"
473 echo "$ac_t"""$RCS_REVISION"" 1>&6
474
475
476 TARGET_SYS="`uname`"
477
478
479 # How were we started?
480 # Mangle $ac_configure_args to prevent duplicates from updatedcc -cwhatever
481 DCC_PARMS='
482 PARM_CACHE PARM_HOMEDIR PARM_BINDIR
483 PARM_LIBEXECDIR PARM_MANDIR PARM_MD5
484 PARM_SYS_INST PARM_UID PARM_SERVER
485 PARM_DCCIFD PARM_DCCM PARM_SENDMAIL
486 PARM_CGIBIN PARM_RUNDIR PARM_DB_MEMORY
487 PARM_MAX_DB_MEM PARM_MAX_LOG PARM_RL_MIN_MAX
488 PARM_IPV6 PARM_64BITS PARM_KLUDGE
489 PARM_SOCKS PARM_WITH_C_WARNINGS PARM_UPDATEDCC_PFILE
490 PARM_FETCH_CMD'
491 for var in $DCC_PARMS; do
492 eval $var=
493 done
494 var=
495 for c in $ac_configure_args; do
496 if test -z "$var"; then
497 var="$c"
498 case $var in
499 -[[a-z]]*) var="-$var";;
500 esac
501 else
502 var="$var=$c"
503 fi
504
505 case $var in
506 # allow blank instead of '='
507 --homedir|--home|--bindir|--libexecdir|--mandir)
508 continue;;
509
510 # allow these but do not record them in updatedcc
511 --with-installroot*) continue;;
512 --with-configsuffix*) continue;;
513
514
515 # remember these for updatedcc
516 --cache-file=*) PARM_CACHE=" $var";;
517 --homedir=*|--home=*)
518 PARM_HOMEDIR=" --homedir=`expr X$var : '.*=\(.*\)'`";;
519 --quiet|--silent|--no-create) ;;
520 --bindir=*) PARM_BINDIR=" $var";;
521 --libexecdir=*) PARM_LIBEXECDIR=" $var";;
522 --mandir=*) PARM_MANDIR=" $var";;
523 --with-DCC[-_]MD5) PARM_MD5=" $var";;
524 --without-DCC[-_]MD5) PARM_MD5=;;
525 --disable-sys[-_]inst) PARM_SYS_INST=" $var";;
526 --enable-sys[-_]inst) PARM_SYS_INST=;;
527 --with-uid=*) PARM_UID=" $var";;
528 --without-uid) PARM_UID=;;
529 --disable-server) PARM_SERVER=" $var";;
530 --enable-server) PARM_SERVER=;;
531 --disable-dccifd) PARM_DCCIFD=" $var";;
532 --enable-dccifd) PARM_DCCIFD=;;
533 --disable-dccm) PARM_DCCM=" $var";;
534 --enable-dccm) PARM_DCCM=;;
535 --with*-sendmail*) PARM_SENDMAIL=" $var";;
536 --with-cgibin=*) PARM_CGIBIN=" $var";;
537 --without-cgibin) PARM_CGIBIN=;;
538 --with-rundir=*) PARM_RUNDIR=" $var";;
539 --without-rundir) PARM_RUNDIR=;;
540 --enable-big[-_]db);; # obsolete with 1.2.31
541 --with-db[-_]memory=*) PARM_DB_MEMORY=" $var";;
542 --without-db[-_]memory) PARM_DB_MEMORY=;;
543 --with-max[-_]db[-_]mem=*) PARM_MAX_DB_MEM=" $var";;
544 --without-max[-_]db[-_]mem) PARM_MAX_DB_MEM=;;
545 --with-max[-_]log[-_]size=*) PARM_MAX_LOG=" $var";;
546 --without-max[-_]log[-_]size) PARM_MAX_LOG=;;
547 --with-rl[-_]min[-_]max=*) PARM_RL_MIN_MAX=" $var";;
548 --without-rl[-_]min[-_]max=*) PARM_RL_MIN_MAX=;;
549 --with-bad[-_]locks);; # obsolete with 1.3.81
550 --without-bad[-_]locks);; # obsolete with 1.3.81
551 --*able-IPv6) PARM_IPV6=" $var";;
552 --*able-64[-_]bits) PARM_64BITS=" $var";;
553 --without-socks) PARM_SOCKS=;;
554 --with*-socks*) PARM_SOCKS=" $var";;
555 --with-kludge=*) PARM_KLUDGE=" $var";;
556 --without-kludge) PARM_KLUDGE=;;
557 --with-c[-_]warnings*) PARM_WITH_C_WARNINGS=" $var";;
558 --without-c[-_]warnings) PARM_WITH_C_WARNINGS=;;
559 --with-updatedcc[-_]pfile=*) PARM_UPDATEDCC_PFILE=" $var";;
560 --without-updatedcc[-_]pfile) PARM_UPDATEDCC_PFILE=;;
561 --with-fetch[-_]cmd=*) PARM_FETCH_CMD=" $var";;
562 --without-fetch[-_]cmd=*) PARM_FETCH_CMD=;;
563 *) echo "unofficial configure parameter: $var";;
564 esac
565 var=
566 done
567 eval UPDATEDCC_PARMS=\"`echo $DCC_PARMS | sed -e 's/ *PARM_/$PARM_/g'`\"
568
569
570 # We cannot
571 # - use `env -` because that clears $PATH.
572 # - just set variables because CC= breaks the C compiler on Solaris.
573 # - just unset variables, because unsetting a variable that is not
574 # set generates errors in some versions of sh or bash..
575 # - export unset variables because that sets them to null on NetBSD.
576 UPDATEDCC_ENV='NOMAN DCC_OWN DCC_GRP DCC_MODE MANOWN MANGRP CFLAGS DCC_CFLAGS PTHREAD_CFLAGS LDFLAGS DCC_LDFLAGS PTHREAD_LDFLAGS LIBS PTHREAD_LIBS CC INSTALL DCCD_MAX_FLOODS DBGFLAGS DCC_UPDATEDCC_FAST'
577 # This assumes that a null value any dcc ./configure environment variable
578 # is the same as not setting it. That is made true by updatedcc even for
579 # the BSD /usr/share/mk NOMAN switch.
580 if test -z "`set | grep '^NOMAN='`"; then
581 unset NOMAN
582 else
583 NOMAN=no
584 fi
585 UPDATEDCC_ENV_SET=
586 UPDATEDCC_ENV_EXPORT=
587 for var in $UPDATEDCC_ENV; do
588 # escape characters that might confuse the shell
589 val=`eval echo '$'$var | sed -e 's/\([^-_/:=+,.a-zA-Z0-9]\)/\\\\\1/g'`
590 if test -n "$val"; then
591 UPDATEDCC_ENV_SET="$UPDATEDCC_ENV_SET$var=$val "
592 UPDATEDCC_ENV_EXPORT="$UPDATEDCC_ENV_EXPORT $var"
593 fi
594 done
595 if test -n "$UPDATEDCC_ENV_EXPORT"; then
596 UPDATEDCC_ENV_EXPORT="export$UPDATEDCC_ENV_EXPORT"
597 fi
598
599 # Check whether --with-updatedcc-pfile or --without-updatedcc-pfile was given.
600 if test "${with_updatedcc_pfile+set}" = set; then
601 withval="$with_updatedcc_pfile"
602 :
603 fi
604 if test -n "$with_updatedcc_pfile" -a "$with_updatedcc_pfile" != no \
605 -a "$with_updatedcc_pfile" != yes; then
606 UPDATEDCC_PFILE="$with_updatedcc_pfile"
607 else
608 UPDATEDCC_PFILE=""
609 fi
610
611
612 # Check whether --with-installroot or --without-installroot was given.
613 if test "${with_installroot+set}" = set; then
614 withval="$with_installroot"
615 :
616 fi
617 if test -n "$with_installroot" -a "$with_installroot" != no; then
618 installroot=$with_installroot
619 fi
620
621 # Check whether --with-configsuffix or --without-configsuffix was given.
622 if test "${with_configsuffix+set}" = set; then
623 withval="$with_configsuffix"
624 :
625 fi
626 if test -n "$with_configsuffix" -a "$with_configsuffix" != no; then
627 configsuffix=$with_configsuffix
628 fi
629
630
631 # add to a shell variable without duplication
632 appendvar () {
633 nm=$1
634 eval cur="\$$nm"
635 shift
636
637 # echo -n "appending '$*' to $nm='$cur' ... "
638 for v in "$*"; do
639 pat=`echo "$v" | sed -e 's/[./\]/&/g'`
640 if expr " $cur " : ".* $pat " >/dev/null; then
641 continue
642 else
643 cur="$cur $v"
644 fi
645 done
646 cur=`echo "$cur" | sed -e 's/^ *//' -e 's/ *$//'`
647 eval "$nm='$cur'"
648 # eval echo "$nm=\$$nm"
649 }
650
651
652 # add to the start of a shell variable without duplication
653 prependvar () {
654 nm=$1
655 eval cur="\$$nm"
656 shift
657
658 # echo -n "prepending '$*' to $nm='$cur' ... "
659 for v in "$*"; do
660 pat=`echo "$v" | sed -e 's/[./\]/&/g'`
661 cur=`echo " $cur " | sed -e "s/ *$pat */ /g" -e 's/^ *//'`
662 cur="$v $cur"
663 done
664 cur=`echo "$cur" | sed -e 's/^ *//' -e 's/ *$//'`
665 eval "$nm='$cur'"
666 # eval echo "$nm=\$$nm"
667 }
668
669
670 saveflags () {
671 OLD_CFLAGS="$CFLAGS"
672 OLD_LDFLAGS="$LDFLAGS"
673 OLD_LIBS="$LIBS"
674 }
675
676
677 restoreflags () {
678 CFLAGS="$OLD_CFLAGS"
679 LDFLAGS="$OLD_LDFLAGS"
680 LIBS="$OLD_LIBS"
681 }
682
683 SUBDIR_DISABLED=
684
685
686 # Look for the C compiler only if it is not set explicitly because the
687 # autoconf system prefers gcc if gcc is present even if cc is also present
688 # and is not gcc.
689 DCC_CC="#CC="
690 if test "$TARGET_SYS" = SunOS -a -z "$CC"; then
691 # detect the free, non-compilers shipped by Sun
692 CC_INST="`${CC-cc} -v 2>&1 | head -1`"
693 if expr X"$CC_INST" : '.*package not installed.*' >/dev/null; then
694 echo "$ac_t""$CC_INST; setting CC=gcc" 1>&6
695 CC=gcc
696 DCC_CC="CC=gcc"
697 fi
698 fi
699 # the cache conflicts with users alternating `CC=gcc ./configure`
700 # with `./configure`, so remove the definition of CC from the cache
701 unset ac_cv_prog_CC
702 OLD_CC="$CC"
703 if test -z "$CC"; then
704 # Extract the first word of "cc", so it can be a program name with args.
705 set dummy cc; ac_word=$2
706 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
707 echo "configure: checking for $ac_word" >&5
708 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
709 echo $ac_n "(cached) $ac_c" 1>&6
710 else
711 if test -n "$CC"; then
712 ac_cv_prog_CC="$CC" # Let the user override the test.
713 else
714 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
715 ac_dummy="$PATH"
716 for ac_dir in $ac_dummy; do
717 test -z "$ac_dir" && ac_dir=.
718 if test -f $ac_dir/$ac_word; then
719 ac_cv_prog_CC="cc"
720 break
721 fi
722 done
723 IFS="$ac_save_ifs"
724 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC=""""
725 fi
726 fi
727 CC="$ac_cv_prog_CC"
728 if test -n "$CC"; then
729 echo "$ac_t""$CC" 1>&6
730 else
731 echo "$ac_t""no" 1>&6
732 fi
733 fi
734 # Extract the first word of "gcc", so it can be a program name with args.
735 set dummy gcc; ac_word=$2
736 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
737 echo "configure: checking for $ac_word" >&5
738 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
739 echo $ac_n "(cached) $ac_c" 1>&6
740 else
741 if test -n "$CC"; then
742 ac_cv_prog_CC="$CC" # Let the user override the test.
743 else
744 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
745 ac_dummy="$PATH"
746 for ac_dir in $ac_dummy; do
747 test -z "$ac_dir" && ac_dir=.
748 if test -f $ac_dir/$ac_word; then
749 ac_cv_prog_CC="gcc"
750 break
751 fi
752 done
753 IFS="$ac_save_ifs"
754 fi
755 fi
756 CC="$ac_cv_prog_CC"
757 if test -n "$CC"; then
758 echo "$ac_t""$CC" 1>&6
759 else
760 echo "$ac_t""no" 1>&6
761 fi
762
763 if test -z "$CC"; then
764 # Extract the first word of "cc", so it can be a program name with args.
765 set dummy cc; ac_word=$2
766 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
767 echo "configure: checking for $ac_word" >&5
768 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
769 echo $ac_n "(cached) $ac_c" 1>&6
770 else
771 if test -n "$CC"; then
772 ac_cv_prog_CC="$CC" # Let the user override the test.
773 else
774 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
775 ac_prog_rejected=no
776 ac_dummy="$PATH"
777 for ac_dir in $ac_dummy; do
778 test -z "$ac_dir" && ac_dir=.
779 if test -f $ac_dir/$ac_word; then
780 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
781 ac_prog_rejected=yes
782 continue
783 fi
784 ac_cv_prog_CC="cc"
785 break
786 fi
787 done
788 IFS="$ac_save_ifs"
789 if test $ac_prog_rejected = yes; then
790 # We found a bogon in the path, so make sure we never use it.
791 set dummy $ac_cv_prog_CC
792 shift
793 if test $# -gt 0; then
794 # We chose a different compiler from the bogus one.
795 # However, it has the same basename, so the bogon will be chosen
796 # first if we set CC to just the basename; use the full file name.
797 shift
798 set dummy "$ac_dir/$ac_word" "$@"
799 shift
800 ac_cv_prog_CC="$@"
801 fi
802 fi
803 fi
804 fi
805 CC="$ac_cv_prog_CC"
806 if test -n "$CC"; then
807 echo "$ac_t""$CC" 1>&6
808 else
809 echo "$ac_t""no" 1>&6
810 fi
811
812 if test -z "$CC"; then
813 case "`uname -s`" in
814 *win32* | *WIN32*)
815 # Extract the first word of "cl", so it can be a program name with args.
816 set dummy cl; ac_word=$2
817 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
818 echo "configure: checking for $ac_word" >&5
819 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
820 echo $ac_n "(cached) $ac_c" 1>&6
821 else
822 if test -n "$CC"; then
823 ac_cv_prog_CC="$CC" # Let the user override the test.
824 else
825 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
826 ac_dummy="$PATH"
827 for ac_dir in $ac_dummy; do
828 test -z "$ac_dir" && ac_dir=.
829 if test -f $ac_dir/$ac_word; then
830 ac_cv_prog_CC="cl"
831 break
832 fi
833 done
834 IFS="$ac_save_ifs"
835 fi
836 fi
837 CC="$ac_cv_prog_CC"
838 if test -n "$CC"; then
839 echo "$ac_t""$CC" 1>&6
840 else
841 echo "$ac_t""no" 1>&6
842 fi
843 ;;
844 esac
845 fi
846 test -z "$CC" && { echo "error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
847 fi
848
849 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
850 echo "configure: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
851
852 ac_ext=c
853 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
854 ac_cpp='$CPP $CPPFLAGS'
855 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
856 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
857 cross_compiling=$ac_cv_prog_cc_cross
858
859 cat > conftest.$ac_ext << EOF
860
861 #include "confdefs.h"
862
863 main(){return(0);}
864 EOF
865 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
866 ac_cv_prog_cc_works=yes
867 # If we can't run a trivial program, we are probably using a cross compiler.
868 if (./conftest; exit) 2>/dev/null; then
869 ac_cv_prog_cc_cross=no
870 else
871 ac_cv_prog_cc_cross=yes
872 fi
873 else
874 echo "configure: failed program was:" >&5
875 cat conftest.$ac_ext >&5
876 ac_cv_prog_cc_works=no
877 fi
878 rm -fr conftest*
879 ac_ext=c
880 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
881 ac_cpp='$CPP $CPPFLAGS'
882 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
883 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
884 cross_compiling=$ac_cv_prog_cc_cross
885
886 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
887 if test $ac_cv_prog_cc_works = no; then
888 { echo "error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
889 fi
890 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
891 echo "configure: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
892 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
893 cross_compiling=$ac_cv_prog_cc_cross
894
895 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
896 echo "configure: checking whether we are using GNU C" >&5
897 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
898 echo $ac_n "(cached) $ac_c" 1>&6
899 else
900 cat > conftest.c <<EOF
901 #ifdef __GNUC__
902 yes;
903 #endif
904 EOF
905 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
906 ac_cv_prog_gcc=yes
907 else
908 ac_cv_prog_gcc=no
909 fi
910 fi
911
912 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
913
914 if test $ac_cv_prog_gcc = yes; then
915 GCC=yes
916 else
917 GCC=
918 fi
919
920 ac_test_CFLAGS="${CFLAGS+set}"
921 ac_save_CFLAGS="$CFLAGS"
922 CFLAGS=
923 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
924 echo "configure: checking whether ${CC-cc} accepts -g" >&5
925 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
926 echo $ac_n "(cached) $ac_c" 1>&6
927 else
928 echo 'void f(){}' > conftest.c
929 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
930 ac_cv_prog_cc_g=yes
931 else
932 ac_cv_prog_cc_g=no
933 fi
934 rm -f conftest*
935
936 fi
937
938 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
939 if test "$ac_test_CFLAGS" = set; then
940 CFLAGS="$ac_save_CFLAGS"
941 elif test $ac_cv_prog_cc_g = yes; then
942 if test "$GCC" = yes; then
943 CFLAGS="-g -O2"
944 else
945 CFLAGS="-g"
946 fi
947 else
948 if test "$GCC" = yes; then
949 CFLAGS="-O2"
950 else
951 CFLAGS=
952 fi
953 fi
954 if test "$OLD_CC" != "$CC" -a -n "$OLD_CC"; then
955 echo "$ac_t"" *** Setting CC=$CC instead of $OLD_CC ***" 1>&6
956 DCC_CC="CC=$CC"
957 fi
958 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
959 echo "configure: checking how to run the C preprocessor" >&5
960 # On Suns, sometimes $CPP names a directory.
961 if test -n "$CPP" && test -d "$CPP"; then
962 CPP=
963 fi
964 if test -z "$CPP"; then
965 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
966 echo $ac_n "(cached) $ac_c" 1>&6
967 else
968 # This must be in double quotes, not single quotes, because CPP may get
969 # substituted into the Makefile and "${CC-cc}" will confuse make.
970 CPP="${CC-cc} -E"
971 # On the NeXT, cc -E runs the code through the compiler's parser,
972 # not just through cpp.
973 cat > conftest.$ac_ext <<EOF
974 #include "confdefs.h"
975 #include <assert.h>
976 Syntax Error
977 EOF
978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
979 { (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
981 if test -z "$ac_err"; then
982 :
983 else
984 echo "$ac_err" >&5
985 echo "configure: failed program was:" >&5
986 cat conftest.$ac_ext >&5
987 rm -rf conftest*
988 CPP="${CC-cc} -E -traditional-cpp"
989 cat > conftest.$ac_ext <<EOF
990 #include "confdefs.h"
991 #include <assert.h>
992 Syntax Error
993 EOF
994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
995 { (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
997 if test -z "$ac_err"; then
998 :
999 else
1000 echo "$ac_err" >&5
1001 echo "configure: failed program was:" >&5
1002 cat conftest.$ac_ext >&5
1003 rm -rf conftest*
1004 CPP="${CC-cc} -nologo -E"
1005 cat > conftest.$ac_ext <<EOF
1006 #include "confdefs.h"
1007 #include <assert.h>
1008 Syntax Error
1009 EOF
1010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1011 { (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1013 if test -z "$ac_err"; then
1014 :
1015 else
1016 echo "$ac_err" >&5
1017 echo "configure: failed program was:" >&5
1018 cat conftest.$ac_ext >&5
1019 rm -rf conftest*
1020 CPP=/lib/cpp
1021 fi
1022 rm -f conftest*
1023 fi
1024 rm -f conftest*
1025 fi
1026 rm -f conftest*
1027 ac_cv_prog_CPP="$CPP"
1028 fi
1029 CPP="$ac_cv_prog_CPP"
1030 else
1031 ac_cv_prog_CPP="$CPP"
1032 fi
1033 echo "$ac_t""$CPP" 1>&6
1034
1035
1036 # how do we run the C compiler?
1037
1038 # Check whether --enable-64-bits or --disable-64-bits was given.
1039 if test "${enable_64_bits+set}" = set; then
1040 enableval="$enable_64_bits"
1041 :
1042 fi
1043
1044 HAVE_CC_M='#do not have cc -M'
1045 appendvar LIBS -lm
1046 RANLIB="ranlib"
1047 HAVE_PTHREADS=
1048 case "$TARGET_SYS" in
1049 BSD/OS)
1050 appendvar PTHREAD_LDFLAGS -pthread
1051 ;;
1052 FreeBSD)
1053 if test 0`/sbin/sysctl -n kern.osreldate 2>/dev/null` -ge 602000; then
1054 # use new POSIX threads starting with 6.2
1055 # http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html
1056 appendvar PTHREAD_LIBS -lpthread
1057 else
1058 appendvar PTHREAD_LDFLAGS -pthread
1059 # use libc_r on ancient versions
1060 if test -s /usr/lib/libc_r.a; then
1061 appendvar PTHREAD_LIBS -lc_r
1062 fi
1063 fi
1064 ;;
1065 DragonFly)
1066 appendvar PTHREAD_LDFLAGS -pthread
1067 if test -s /usr/lib/libc_r.a; then
1068 # use libc_r on ancient versions
1069 appendvar PTHREAD_LIBS -lc_r
1070 fi
1071 ;;
1072 Darwin)
1073 RANLIB="ranlib -c"
1074 appendvar LIBS -lresolv
1075 ;;
1076 SunOS)
1077 appendvar PTHREAD_LIBS -lpthread
1078 prependvar DCC_CFLAGS -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1079 prependvar CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1080 appendvar LIBS -lsocket -lnsl -lresolv
1081 # manual 64-bit versions on Solaris, because it seems to be impossible
1082 # to figure out whether a 32-bit version of the milter library is used
1083 if test "$enable_64_bits" != yes \
1084 -o "`isainfo -b 2>/dev/null`" != 64; then
1085 ac_cv_have_64bits=no
1086 else
1087 # see if we have a 64-bit system with a 64-bit compiler
1088 echo $ac_n "checking compiling 64-bit void*""... $ac_c" 1>&6
1089 echo "configure: checking compiling 64-bit void*" >&5
1090 if eval "test \"`echo '$''{'ac_cv_have_64bits'+set}'`\" = set"; then
1091 echo $ac_n "(cached) $ac_c" 1>&6
1092 else
1093 saveflags
1094 ac_cv_have_64bits=no
1095 for OPT in -m64 -xarch=generic64 -xarch=v9; do
1096 CFLAGS="$OPT $OLD_CFLAGS"
1097 if test "$cross_compiling" = yes; then
1098 continue
1099 else
1100 cat > conftest.$ac_ext <<EOF
1101 #include "confdefs.h"
1102 main()
1103 {exit(sizeof(void*)==8 ? 0 : sizeof(void*));}
1104 EOF
1105 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1106 then
1107 ac_cv_have_64bits="$OPT"; break
1108 else
1109 echo "configure: failed program was:" >&5
1110 cat conftest.$ac_ext >&5
1111 rm -fr conftest*
1112 continue
1113 fi
1114 rm -fr conftest*
1115 fi
1116
1117 done
1118 restoreflags
1119 fi
1120
1121 echo "$ac_t""$ac_cv_have_64bits" 1>&6
1122 # if we have a 64-bit system with a 64-bit compiler, adjust
1123 # the flags and libraries so that we will later find that
1124 # sizeof(long) and sizeof(void*)=8
1125 if test -n "$ac_cv_have_64bits" -a "$ac_cv_have_64bits" != no; then
1126 prependvar CFLAGS $ac_cv_have_64bits
1127 prependvar DCC_CFLAGS $ac_cv_have_64bits
1128 prependvar LIBS $ac_cv_have_64bits
1129 fi
1130 fi
1131 ;;
1132 HP-UX)
1133 prependvar DCC_CFLAGS-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
1134 appendvar PTHREAD_LIBS -lpthread
1135 ;;
1136 AIX)
1137 cat >> confdefs.h <<\EOF
1138 #define _ALL_SOURCE 1
1139 EOF
1140 prependvar DCC_CFLAGS -D_THREAD_SAFE
1141 appendvar PTHREAD_LDFLAGS -pthread
1142 appendvar PTHREAD_LIBS -lpthreads
1143 appendvar LIBS -lbsd -lc_r
1144 ;;
1145 IRIX*)
1146 appendvar PTHREAD_LIBS -lpthread
1147 prependvar DCC_CFLAGS -woff 1185
1148 prependvar CFLAGS -woff 1185
1149 prependvar DCC_LDFLAGS -LD_MSG:OFF=84
1150 RANLIB="@#ranlib"
1151 HAVE_CC_M='HAVE_CC_M=yes'
1152 ;;
1153 Linux)
1154 appendvar LIBS -lresolv
1155 appendvar PTHREAD_LDFLAGS -pthread
1156 prependvar DCC_CFLAGS -D_FILE_OFFSET_BITS=64
1157 prependvar CFLAGS -D_FILE_OFFSET_BITS=64
1158 # generate 64-bit code for 64-bit PowerPC
1159 if test "$enable_64_bits" = yes \
1160 -a -n "`uname -a | grep 'ppc64 GNU/Linux'`"; then
1161 appendvar DCC_CFLAGS -m64
1162 appendvar CFLAGS -m64
1163 appendvar DCC_LDFLAGS -m64
1164 appendvar LDFLAGS -m64
1165 fi
1166 ;;
1167 OpenBSD)
1168 appendvar PTHREAD_LDFLAGS -pthread
1169 ;;
1170 NetBSD)
1171 appendvar PTHREAD_LDFLAGS -lpthread
1172 appendvar PTHREAD_CFLAGS -I/usr/pkg/include
1173 appendvar CPPFLAGS -I/usr/pkg/include
1174 appendvar PTHREAD_LDFLAGS -L/usr/pkg/lib
1175 ;;
1176 OSF1)
1177 # OSF1 is too messy for AC_CHECK_FUNC(pthread_mutex_lock...)
1178 HAVE_PTHREADS=yes
1179 appendvar PTHREAD_CFLAGS -pthread -D_REENTRANT
1180 appendvar PTHREAD_LDFLAGS -pthread
1181 appendvar PTHREAD_LIBS -lpthread -lexc
1182 HAVE_CC_M='HAVE_CC_M=yes'
1183 ;;
1184 OpenUNIX)
1185 prependvar DCC_CFLAGS -Kthread
1186 appendvar PTHREAD_LIBS -Kthread
1187 appendvar LIBS -lsocket -lnsl
1188 RANLIB="@#ranlib"
1189 ;;
1190 *)
1191 echo "warning: *** unrecognized system $TARGET_SYS ***" 1>&2
1192 # Extract the first word of "ranlib", so it can be a program name with args.
1193 set dummy ranlib; ac_word=$2
1194 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1195 echo "configure: checking for $ac_word" >&5
1196 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1197 echo $ac_n "(cached) $ac_c" 1>&6
1198 else
1199 if test -n "$RANLIB"; then
1200 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1201 else
1202 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1203 ac_dummy="$PATH"
1204 for ac_dir in $ac_dummy; do
1205 test -z "$ac_dir" && ac_dir=.
1206 if test -f $ac_dir/$ac_word; then
1207 ac_cv_prog_RANLIB="ranlib"
1208 break
1209 fi
1210 done
1211 IFS="$ac_save_ifs"
1212 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1213 fi
1214 fi
1215 RANLIB="$ac_cv_prog_RANLIB"
1216 if test -n "$RANLIB"; then
1217 echo "$ac_t""$RANLIB" 1>&6
1218 else
1219 echo "$ac_t""no" 1>&6
1220 fi
1221
1222 if test "$RANLIB" = ':'; then
1223 RANLIB="@#ranlib"
1224 fi
1225 appendvar PTHREAD_LDFLAGS -pthread
1226 ;;
1227 esac
1228
1229 # decide if we have POSIX threads
1230 if test "$HAVE_PTHREADS" != yes; then
1231 saveflags
1232 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1233 LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
1234 LIBS="$LIBS $PTHREAD_LIBS"
1235 echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
1236 echo "configure: checking for pthread_mutex_lock" >&5
1237 if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
1238 echo $ac_n "(cached) $ac_c" 1>&6
1239 else
1240 cat > conftest.$ac_ext <<EOF
1241 #include "confdefs.h"
1242 /* System header to define __stub macros and hopefully few prototypes,
1243 which can conflict with char pthread_mutex_lock(); below. */
1244 #include <assert.h>
1245 /* Override any gcc2 internal prototype to avoid an error. */
1246 /* We use char because int might match the return type of a gcc2
1247 builtin and then its argument prototype would still apply. */
1248 char pthread_mutex_lock();
1249
1250 int main() {
1251
1252 /* The GNU C library defines this for functions which it implements
1253 to always fail with ENOSYS. Some functions are actually named
1254 something starting with __ and the normal name is an alias. */
1255 #if defined (__stub_pthread_mutex_lock) || defined (__stub___pthread_mutex_lock)
1256 choke me
1257 #else
1258 pthread_mutex_lock();
1259 #endif
1260
1261 ; return 0; }
1262 EOF
1263 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1264 rm -rf conftest*
1265 eval "ac_cv_func_pthread_mutex_lock=yes"
1266 else
1267 echo "configure: failed program was:" >&5
1268 cat conftest.$ac_ext >&5
1269 rm -rf conftest*
1270 eval "ac_cv_func_pthread_mutex_lock=no"
1271 fi
1272 rm -f conftest*
1273 fi
1274
1275 if eval "test \"`echo '$ac_cv_func_'pthread_mutex_lock`\" = yes"; then
1276 echo "$ac_t""yes" 1>&6
1277 HAVE_PTHREADS=yes
1278 else
1279 echo "$ac_t""no" 1>&6
1280 fi
1281 restoreflags
1282 fi
1283 cat > conftest.$ac_ext <<EOF
1284 #include "confdefs.h"
1285 #include <sys/mman.h>
1286 MS_ASYNC
1287 EOF
1288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1289 egrep "^MS_ASYNC$" >/dev/null 2>&1; then
1290 rm -rf conftest*
1291 cat >> confdefs.h <<\EOF
1292 #define HAVE_OLD_MSYNC
1293 EOF
1294
1295 fi
1296 rm -f conftest*
1297 if test "$HAVE_PTHREADS" = yes; then
1298 cat >> confdefs.h <<\EOF
1299 #define HAVE_PTHREADS 1
1300 EOF
1301
1302 fi
1303
1304 echo $ac_n "checking for gcc __attribute__""... $ac_c" 1>&6
1305 echo "configure: checking for gcc __attribute__" >&5
1306 if eval "test \"`echo '$''{'ac_cv_have_gcc_attributes'+set}'`\" = set"; then
1307 echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309 cat > conftest.$ac_ext <<EOF
1310 #include "confdefs.h"
1311
1312 int main() {
1313 extern void __attribute((noreturn)) ck(); ck();
1314 ; return 0; }
1315 EOF
1316 if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1317 rm -rf conftest*
1318 ac_cv_have_gcc_attributes=yes
1319 else
1320 echo "configure: failed program was:" >&5
1321 cat conftest.$ac_ext >&5
1322 rm -rf conftest*
1323 ac_cv_have_gcc_attributes=no
1324 fi
1325 rm -f conftest*
1326 fi
1327
1328 echo "$ac_t""$ac_cv_have_gcc_attributes" 1>&6
1329 if test "$ac_cv_have_gcc_attributes" = yes; then
1330 cat >> confdefs.h <<\EOF
1331 #define HAVE_GCC_ATTRIBUTES 1
1332 EOF
1333 cat >> confdefs.h <<\EOF
1334 #define HAVE_GCC_INLINE 1
1335 EOF
1336 # if we have gcc attributes, see if we have the real gcc instead of
1337 # Sun Studio compilers that use -xM for gcc -M
1338 if test -n "`${CC-cc} -v 2>&1 | grep '^gcc version'`"; then
1339 HAVE_CC_M='HAVE_CC_M=yes'
1340 fi
1341 fi
1342
1343
1344 # Check whether --with-c-warnings or --without-c-warnings was given.
1345 if test "${with_c_warnings+set}" = set; then
1346 withval="$with_c_warnings"
1347 :
1348 fi
1349 CWRN1="#CWARN"
1350 CWRN2="#CWARN"
1351 CWRN3="#CWARN"
1352 if test "$with_c_warnings" = yes; then
1353 with_c_warnings=1
1354 fi
1355 if test -z "$with_c_warnings" -o "$with_c_warnings" = no; then
1356 with_c_warnings=0
1357 fi
1358 if test "$with_c_warnings" -ge 1; then
1359 CWRN1="CWARN"
1360 fi
1361 if test "$with_c_warnings" -ge 2; then
1362 CWRN2="CWARN"
1363 fi
1364 if test "$with_c_warnings" -ge 3; then
1365 CWRN3="CWARN"
1366 fi
1367
1368 # does this system have 64 bit longs, pointers and off_t?
1369 echo $ac_n "checking sizeof(long)""... $ac_c" 1>&6
1370 echo "configure: checking sizeof(long)" >&5
1371 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1372 echo $ac_n "(cached) $ac_c" 1>&6
1373 else
1374 if test "$cross_compiling" = yes; then
1375 ac_cv_sizeof_long=0
1376 else
1377 cat > conftest.$ac_ext <<EOF
1378 #include "confdefs.h"
1379 #include <stdio.h>
1380 #include <sys/stat.h>
1381 #include <sys/types.h>
1382 main()
1383 {
1384 FILE *f=fopen("conftestval", "w");
1385 if (!f) exit(1);
1386 fprintf(f, "ac_cv_sizeof_long=%d\n", sizeof(long));
1387 fprintf(f, "ac_cv_sizeof_ptr=%d\n", sizeof((void *)0));
1388 fprintf(f, "ac_cv_sizeof_off_t=%d\n", sizeof(off_t));
1389 exit(0);
1390 }
1391 EOF
1392 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1393 then
1394 . ./conftestval
1395 else
1396 echo "configure: failed program was:" >&5
1397 cat conftest.$ac_ext >&5
1398 rm -fr conftest*
1399 echo "test type size program failed"
1400 fi
1401 rm -fr conftest*
1402 fi
1403
1404 fi
1405
1406 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1407 if test 0$ac_cv_sizeof_long -eq 8; then
1408 cat >> confdefs.h <<\EOF
1409 #define HAVE_64BIT_LONG 1
1410 EOF
1411 fi
1412 if test 0$ac_cv_sizeof_ptr -eq 8; then
1413 cat >> confdefs.h <<\EOF
1414 #define HAVE_64BIT_PTR 1
1415 EOF
1416 fi
1417 if test 0$ac_cv_sizeof_off_t -eq 8; then
1418 cat >> confdefs.h <<\EOF
1419 #define HAVE_BIG_FILES 1
1420 EOF
1421 fi
1422
1423
1424 # set switches to generate the meat of a makefile
1425 echo $ac_n "checking for gmake""... $ac_c" 1>&6
1426 echo "configure: checking for gmake" >&5
1427 if make -v nosuchtarget 2>&1 | grep '^GNU Make' >/dev/null; then
1428 echo "$ac_t""yes, make is gmake but called make" 1>&6
1429 MAKE_TYPE=gmake
1430 DCCMAKE=make
1431 else
1432 if test -f /usr/share/mk/bsd.prog.mk; then
1433 echo "$ac_t""no, assume 4.4BSD make" 1>&6
1434 MAKE_TYPE=make
1435 DCCMAKE=make
1436 else
1437 echo "warning: *** You must install and use gmake on $TARGET_SYS ***" 1>&2
1438 MAKE_TYPE=gmake
1439 DCCMAKE=gmake
1440 fi
1441 fi
1442 DEPTH=.
1443 if test "$MAKE_TYPE" = gmake; then
1444 MAKE_DOT=
1445 MAKE_INC='#include "$(DEPTH)/Makefile.inc"'
1446 MAKE_INC2='include $(DEPTH)/Makefile.inc2'
1447 MAKE_PROG='include $(DEPTH)/gmake.inc'
1448 MAKE_SUBDIR='include $(DEPTH)/gmake.inc'
1449 MAKE_LIB='include $(DEPTH)/gmake.inc\
1450 include $(DEPTH)/Makefile.inc2'
1451 else
1452 MAKE_DOT="."
1453 MAKE_INC='.include "$(DEPTH)/Makefile.inc"'
1454 MAKE_INC2='.include "$(DEPTH)/Makefile.inc2"'
1455 MAKE_PROG='.include <bsd.prog.mk>'
1456 if test "$TARGET_SYS" = 'NetBSD'; then
1457 MAKE_SUBDIR='.include <bsd.subdir.mk>'
1458 else
1459 MAKE_SUBDIR='.include <bsd.prog.mk>'
1460 fi
1461 MAKE_LIB='.include <bsd.lib.mk>\
1462 .include "$(DEPTH)/Makefile.inc2"\
1463 LDADD = # BSD/OS 4.2 gives $(LDADD) to ar'
1464 fi
1465
1466
1467 # On some systems `logger` does not have -s
1468 case "$TARGET_SYS" in
1469 SunOS|AIX|OSF1)
1470 DCC_LOGGER="\$DCC_LIBEXEC/logger -p \${DCC_ERROR_LOG_FACILITY-mail.err} -t \${LOGGER_TAG-DCC}"
1471 ;;
1472 BSD/OS|FreeBSD|DragonFly|Darwin|Linux|OpenBSD|NetBSD)
1473 DCC_LOGGER="logger -s -p \${DCC_ERROR_LOG_FACILITY-mail.err} -t \${LOGGER_TAG-DCC}"
1474 ;;
1475 *)
1476 # Extract the first word of "logger", so it can be a program name with args.
1477 set dummy logger; ac_word=$2
1478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1479 echo "configure: checking for $ac_word" >&5
1480 if eval "test \"`echo '$''{'ac_cv_prog_DCC_LOGGER'+set}'`\" = set"; then
1481 echo $ac_n "(cached) $ac_c" 1>&6
1482 else
1483 if test -n "$DCC_LOGGER"; then
1484 ac_cv_prog_DCC_LOGGER="$DCC_LOGGER" # Let the user override the test.
1485 else
1486 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1487 ac_dummy="$PATH"
1488 for ac_dir in $ac_dummy; do
1489 test -z "$ac_dir" && ac_dir=.
1490 if test -f $ac_dir/$ac_word; then
1491 ac_cv_prog_DCC_LOGGER="logger -s -p \${DCC_ERROR_LOG_FACILITY-mail.err} -t \${LOGGER_TAG-DCC}"
1492 break
1493 fi
1494 done
1495 IFS="$ac_save_ifs"
1496 test -z "$ac_cv_prog_DCC_LOGGER" && ac_cv_prog_DCC_LOGGER="echo 1>&2"
1497 fi
1498 fi
1499 DCC_LOGGER="$ac_cv_prog_DCC_LOGGER"
1500 if test -n "$DCC_LOGGER"; then
1501 echo "$ac_t""$DCC_LOGGER" 1>&6
1502 else
1503 echo "$ac_t""no" 1>&6
1504 fi
1505
1506 ;;
1507 esac
1508
1509 # Deal xargs that run even if there is nothing to do.
1510 # GNU's version has -r but does the wrong thing with only -n
1511 # Solaris does not have -r but does nothing with xargs -n1000 </dev/null
1512 # Get the absolute path of the command to prevent confusion on Solaris systems
1513 # with confused paths.
1514 # Extract the first word of "xargs", so it can be a program name with args.
1515 set dummy xargs; ac_word=$2
1516 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1517 echo "configure: checking for $ac_word" >&5
1518 if eval "test \"`echo '$''{'ac_cv_path_DCC_XARGS'+set}'`\" = set"; then
1519 echo $ac_n "(cached) $ac_c" 1>&6
1520 else
1521 case "$DCC_XARGS" in
1522 /*)
1523 ac_cv_path_DCC_XARGS="$DCC_XARGS" # Let the user override the test with a path.
1524 ;;
1525 ?:/*)
1526 ac_cv_path_DCC_XARGS="$DCC_XARGS" # Let the user override the test with a dos path.
1527 ;;
1528 *)
1529 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1530 ac_dummy="$PATH"
1531 for ac_dir in $ac_dummy; do
1532 test -z "$ac_dir" && ac_dir=.
1533 if test -f $ac_dir/$ac_word; then
1534 ac_cv_path_DCC_XARGS="$ac_dir/$ac_word"
1535 break
1536 fi
1537 done
1538 IFS="$ac_save_ifs"
1539 test -z "$ac_cv_path_DCC_XARGS" && ac_cv_path_DCC_XARGS="xargs"
1540 ;;
1541 esac
1542 fi
1543 DCC_XARGS="$ac_cv_path_DCC_XARGS"
1544 if test -n "$DCC_XARGS"; then
1545 echo "$ac_t""$DCC_XARGS" 1>&6
1546 else
1547 echo "$ac_t""no" 1>&6
1548 fi
1549 if test -n "`$DCC_XARGS echo bad </dev/null 2>&1`"; then
1550 if test -z "`$DCC_XARGS -r echo bad </dev/null 2>&1`"; then
1551 DCC_XARGS="$DCC_XARGS -r"
1552 else
1553 if test -z "`$DCC_XARGS -n1000 echo bad </dev/null 2>&1`"; then
1554 DCC_XARGS="$DCC_XARGS -n1000"
1555 fi
1556 fi
1557 fi
1558
1559 # How can we fetch a file specified by URL?
1560 # Fall back to ftp and just hope it understands URL.
1561 if test -n "$with_fetch_cmd" -a "$with_fetch_cmd" != yes; then
1562 FETCH_CMD="$with_fetch_cmd"
1563 else
1564 for ac_prog in wget fetch curl
1565 do
1566 # Extract the first word of "$ac_prog", so it can be a program name with args.
1567 set dummy $ac_prog; ac_word=$2
1568 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1569 echo "configure: checking for $ac_word" >&5
1570 if eval "test \"`echo '$''{'ac_cv_path_FETCH_CMD'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572 else
1573 case "$FETCH_CMD" in
1574 /*)
1575 ac_cv_path_FETCH_CMD="$FETCH_CMD" # Let the user override the test with a path.
1576 ;;
1577 ?:/*)
1578 ac_cv_path_FETCH_CMD="$FETCH_CMD" # Let the user override the test with a dos path.
1579 ;;
1580 *)
1581 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1582 ac_dummy="$PATH"
1583 for ac_dir in $ac_dummy; do
1584 test -z "$ac_dir" && ac_dir=.
1585 if test -f $ac_dir/$ac_word; then
1586 ac_cv_path_FETCH_CMD="$ac_dir/$ac_word"
1587 break
1588 fi
1589 done
1590 IFS="$ac_save_ifs"
1591 ;;
1592 esac
1593 fi
1594 FETCH_CMD="$ac_cv_path_FETCH_CMD"
1595 if test -n "$FETCH_CMD"; then
1596 echo "$ac_t""$FETCH_CMD" 1>&6
1597 else
1598 echo "$ac_t""no" 1>&6
1599 fi
1600
1601 test -n "$FETCH_CMD" && break
1602 done
1603 test -n "$FETCH_CMD" || FETCH_CMD="ftp"
1604
1605 fi
1606 FETCH_WGET_OPTS=
1607 if expr "$FETCH_CMD" : '.*wget' >/dev/null 2>&1; then
1608 if test -n "`wget --help </dev/null 2>&1 | grep 'referer.*URL'`"; then
1609 FETCH_WGET_OPTS="$FETCH_WGET_OPTS --referer=\$HTTP_REFERER"
1610 fi
1611 #default 20 retries is far, far too many
1612 if test -n "`wget --help </dev/null 2>&1 | grep 'tries=NUMBER'`"; then
1613 FETCH_WGET_OPTS="$FETCH_WGET_OPTS --tries=1"
1614 fi
1615 fi
1616 if expr "$FETCH_CMD" : '.*curl' >/dev/null 2>&1; then
1617 if test -n "`curl --help </dev/null 2>&1 | grep 'referer.*URL'`"; then
1618 FETCH_CURL_OPTS="--referer \$HTTP_REFERER"
1619 fi
1620 fi
1621
1622 # Extract the first word of "perl", so it can be a program name with args.
1623 set dummy perl; ac_word=$2
1624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1625 echo "configure: checking for $ac_word" >&5
1626 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
1627 echo $ac_n "(cached) $ac_c" 1>&6
1628 else
1629 case "$PERL" in
1630 /*)
1631 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
1632 ;;
1633 ?:/*)
1634 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
1635 ;;
1636 *)
1637 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1638 ac_dummy="$PATH"
1639 for ac_dir in $ac_dummy; do
1640 test -z "$ac_dir" && ac_dir=.
1641 if test -f $ac_dir/$ac_word; then
1642 ac_cv_path_PERL="$ac_dir/$ac_word"
1643 break
1644 fi
1645 done
1646 IFS="$ac_save_ifs"
1647 test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
1648 ;;
1649 esac
1650 fi
1651 PERL="$ac_cv_path_PERL"
1652 if test -n "$PERL"; then
1653 echo "$ac_t""$PERL" 1>&6
1654 else
1655 echo "$ac_t""no" 1>&6
1656 fi
1657
1658 # for cgi-bin/webuser-notify
1659 # Extract the first word of "sendmail", so it can be a program name with args.
1660 set dummy sendmail; ac_word=$2
1661 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1662 echo "configure: checking for $ac_word" >&5
1663 if eval "test \"`echo '$''{'ac_cv_path_NOTIFYMAILER'+set}'`\" = set"; then
1664 echo $ac_n "(cached) $ac_c" 1>&6
1665 else
1666 case "$NOTIFYMAILER" in
1667 /*)
1668 ac_cv_path_NOTIFYMAILER="$NOTIFYMAILER" # Let the user override the test with a path.
1669 ;;
1670 ?:/*)
1671 ac_cv_path_NOTIFYMAILER="$NOTIFYMAILER" # Let the user override the test with a dos path.
1672 ;;
1673 *)
1674 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1675 ac_dummy="$PATH:/usr/sbin:/usr/lib"
1676 for ac_dir in $ac_dummy; do
1677 test -z "$ac_dir" && ac_dir=.
1678 if test -f $ac_dir/$ac_word; then
1679 ac_cv_path_NOTIFYMAILER="$ac_dir/$ac_word"
1680 break
1681 fi
1682 done
1683 IFS="$ac_save_ifs"
1684 test -z "$ac_cv_path_NOTIFYMAILER" && ac_cv_path_NOTIFYMAILER="mail"
1685 ;;
1686 esac
1687 fi
1688 NOTIFYMAILER="$ac_cv_path_NOTIFYMAILER"
1689 if test -n "$NOTIFYMAILER"; then
1690 echo "$ac_t""$NOTIFYMAILER" 1>&6
1691 else
1692 echo "$ac_t""no" 1>&6
1693 fi
1694
1695 # for the CGI-bin scripts
1696 # Extract the first word of "htpasswd", so it can be a program name with args.
1697 set dummy htpasswd; ac_word=$2
1698 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1699 echo "configure: checking for $ac_word" >&5
1700 if eval "test \"`echo '$''{'ac_cv_path_HTPASSWD'+set}'`\" = set"; then
1701 echo $ac_n "(cached) $ac_c" 1>&6
1702 else
1703 case "$HTPASSWD" in
1704 /*)
1705 ac_cv_path_HTPASSWD="$HTPASSWD" # Let the user override the test with a path.
1706 ;;
1707 ?:/*)
1708 ac_cv_path_HTPASSWD="$HTPASSWD" # Let the user override the test with a dos path.
1709 ;;
1710 *)
1711 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1712 ac_dummy="$PATH"
1713 for ac_dir in $ac_dummy; do
1714 test -z "$ac_dir" && ac_dir=.
1715 if test -f $ac_dir/$ac_word; then
1716 ac_cv_path_HTPASSWD="$ac_dir/$ac_word"
1717 break
1718 fi
1719 done
1720 IFS="$ac_save_ifs"
1721 test -z "$ac_cv_path_HTPASSWD" && ac_cv_path_HTPASSWD="/usr/local/bin/htpasswd"
1722 ;;
1723 esac
1724 fi
1725 HTPASSWD="$ac_cv_path_HTPASSWD"
1726 if test -n "$HTPASSWD"; then
1727 echo "$ac_t""$HTPASSWD" 1>&6
1728 else
1729 echo "$ac_t""no" 1>&6
1730 fi
1731
1732 # for the graphs
1733 # Extract the first word of "rrdtool", so it can be a program name with args.
1734 set dummy rrdtool; ac_word=$2
1735 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1736 echo "configure: checking for $ac_word" >&5
1737 if eval "test \"`echo '$''{'ac_cv_path_RRDTOOL'+set}'`\" = set"; then
1738 echo $ac_n "(cached) $ac_c" 1>&6
1739 else
1740 case "$RRDTOOL" in
1741 /*)
1742 ac_cv_path_RRDTOOL="$RRDTOOL" # Let the user override the test with a path.
1743 ;;
1744 ?:/*)
1745 ac_cv_path_RRDTOOL="$RRDTOOL" # Let the user override the test with a dos path.
1746 ;;
1747 *)
1748 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1749 ac_dummy="$PATH"
1750 for ac_dir in $ac_dummy; do
1751 test -z "$ac_dir" && ac_dir=.
1752 if test -f $ac_dir/$ac_word; then
1753 ac_cv_path_RRDTOOL="$ac_dir/$ac_word"
1754 break
1755 fi
1756 done
1757 IFS="$ac_save_ifs"
1758 test -z "$ac_cv_path_RRDTOOL" && ac_cv_path_RRDTOOL="/usr/local/bin/rrdtool"
1759 ;;
1760 esac
1761 fi
1762 RRDTOOL="$ac_cv_path_RRDTOOL"
1763 if test -n "$RRDTOOL"; then
1764 echo "$ac_t""$RRDTOOL" 1>&6
1765 else
1766 echo "$ac_t""no" 1>&6
1767 fi
1768
1769 # choose between `su` and `su -`
1770 case "$TARGET_SYS" in
1771 Linux|BSD/OS|FreeBSD|NetBSD|DragonFly)
1772 # `su -` is required on Linux and desirable where it works
1773 # clear $TERM because some too smart by half systems spew /etc/motd
1774 DCC_SU="TERM= su -";;
1775 SunOS|Darwin)
1776 # `su -` is known to not work or has bad side effects on some systems
1777 DCC_SU="su";;
1778 *)
1779 # be considervative the rest of the time
1780 DCC_SU="su";;
1781 esac
1782
1783 # check for 4.4BSD sockets
1784 # look for sockets with lengths
1785 echo $ac_n "checking for sa_len""... $ac_c" 1>&6
1786 echo "configure: checking for sa_len" >&5
1787 if eval "test \"`echo '$''{'ac_cv_have_sa_len'+set}'`\" = set"; then
1788 echo $ac_n "(cached) $ac_c" 1>&6
1789 else
1790 cat > conftest.$ac_ext <<EOF
1791 #include "confdefs.h"
1792 #include <sys/socket.h>
1793 EOF
1794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1795 egrep "[^_]sa_len[^_a-z0-9]" >/dev/null 2>&1; then
1796 rm -rf conftest*
1797 ac_cv_have_sa_len=yes
1798 else
1799 rm -rf conftest*
1800 ac_cv_have_sa_len=no
1801 fi
1802 rm -f conftest*
1803
1804 fi
1805
1806 echo "$ac_t""$ac_cv_have_sa_len" 1>&6
1807 if test "$ac_cv_have_sa_len" = yes; then
1808 cat >> confdefs.h <<\EOF
1809 #define HAVE_SA_LEN 1
1810 EOF
1811 fi
1812 # many systems want recvfrom() to use a pointer to a socklen_t
1813 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
1814 echo "configure: checking for socklen_t" >&5
1815 if eval "test \"`echo '$''{'ac_cv_have_socklen_t'+set}'`\" = set"; then
1816 echo $ac_n "(cached) $ac_c" 1>&6
1817 else
1818 cat > conftest.$ac_ext <<EOF
1819 #include "confdefs.h"
1820 #include <sys/socket.h>
1821 EOF
1822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1823 egrep "typedef.*[^_]socklen_t[^_a-z0-9]" >/dev/null 2>&1; then
1824 rm -rf conftest*
1825 ac_cv_have_socklen_t=yes
1826 else
1827 rm -rf conftest*
1828 ac_cv_have_socklen_t=no
1829 fi
1830 rm -f conftest*
1831
1832 fi
1833
1834 echo "$ac_t""$ac_cv_have_socklen_t" 1>&6
1835 if test "$ac_cv_have_socklen_t" = yes; then
1836 cat >> confdefs.h <<\EOF
1837 #define HAVE_SOCKLEN_T 1
1838 EOF
1839 fi
1840
1841 echo $ac_n "checking for AF_LOCAL""... $ac_c" 1>&6
1842 echo "configure: checking for AF_LOCAL" >&5
1843 if eval "test \"`echo '$''{'ac_cv_have_af_local'+set}'`\" = set"; then
1844 echo $ac_n "(cached) $ac_c" 1>&6
1845 else
1846 cat > conftest.$ac_ext <<EOF
1847 #include "confdefs.h"
1848 #include <sys/socket.h>
1849 #ifdef AF_LOCAL
1850 have_af_local
1851 #endif
1852 EOF
1853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1854 egrep "have_af_local" >/dev/null 2>&1; then
1855 rm -rf conftest*
1856 ac_cv_have_af_local=yes
1857 else
1858 rm -rf conftest*
1859 ac_cv_have_af_local=no
1860 fi
1861 rm -f conftest*
1862
1863 fi
1864
1865 echo "$ac_t""$ac_cv_have_af_local" 1>&6
1866 if test "$ac_cv_have_af_local" = yes; then
1867 cat >> confdefs.h <<\EOF
1868 #define HAVE_AF_LOCAL 1
1869 EOF
1870 fi
1871
1872 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1873 echo "configure: checking for ANSI C header files" >&5
1874 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1875 echo $ac_n "(cached) $ac_c" 1>&6
1876 else
1877 cat > conftest.$ac_ext <<EOF
1878 #include "confdefs.h"
1879 #include <stdlib.h>
1880 #include <stdarg.h>
1881 #include <string.h>
1882 #include <float.h>
1883 EOF
1884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1885 { (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1887 if test -z "$ac_err"; then
1888 rm -rf conftest*
1889 ac_cv_header_stdc=yes
1890 else
1891 echo "$ac_err" >&5
1892 echo "configure: failed program was:" >&5
1893 cat conftest.$ac_ext >&5
1894 rm -rf conftest*
1895 ac_cv_header_stdc=no
1896 fi
1897 rm -f conftest*
1898
1899 if test $ac_cv_header_stdc = yes; then
1900 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1901 cat > conftest.$ac_ext <<EOF
1902 #include "confdefs.h"
1903 #include <string.h>
1904 EOF
1905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1906 egrep "memchr" >/dev/null 2>&1; then
1907 :
1908 else
1909 rm -rf conftest*
1910 ac_cv_header_stdc=no
1911 fi
1912 rm -f conftest*
1913
1914 fi
1915
1916 if test $ac_cv_header_stdc = yes; then
1917 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1918 cat > conftest.$ac_ext <<EOF
1919 #include "confdefs.h"
1920 #include <stdlib.h>
1921 EOF
1922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1923 egrep "free" >/dev/null 2>&1; then
1924 :
1925 else
1926 rm -rf conftest*
1927 ac_cv_header_stdc=no
1928 fi
1929 rm -f conftest*
1930
1931 fi
1932
1933 if test $ac_cv_header_stdc = yes; then
1934 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1935 if test "$cross_compiling" = yes; then
1936 :
1937 else
1938 cat > conftest.$ac_ext <<EOF
1939 #include "confdefs.h"
1940 #include <ctype.h>
1941 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1942 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1943 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1944 int main () { int i; for (i = 0; i < 256; i++)
1945 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1946 exit (0); }
1947
1948 EOF
1949 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1950 then
1951 :
1952 else
1953 echo "configure: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1955 rm -fr conftest*
1956 ac_cv_header_stdc=no
1957 fi
1958 rm -fr conftest*
1959 fi
1960
1961 fi
1962 fi
1963
1964 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1965 if test $ac_cv_header_stdc = yes; then
1966 cat >> confdefs.h <<\EOF
1967 #define STDC_HEADERS 1
1968 EOF
1969
1970 fi
1971
1972 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1973 echo "configure: checking for pid_t" >&5
1974 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1975 echo $ac_n "(cached) $ac_c" 1>&6
1976 else
1977 cat > conftest.$ac_ext <<EOF
1978 #include "confdefs.h"
1979 #include <sys/types.h>
1980 #if STDC_HEADERS
1981 #include <stdlib.h>
1982 #include <stddef.h>
1983 #endif
1984 EOF
1985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1986 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1987 rm -rf conftest*
1988 ac_cv_type_pid_t=yes
1989 else
1990 rm -rf conftest*
1991 ac_cv_type_pid_t=no
1992 fi
1993 rm -f conftest*
1994
1995 fi
1996 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1997 if test $ac_cv_type_pid_t = no; then
1998 cat >> confdefs.h <<\EOF
1999 #define pid_t int
2000 EOF
2001
2002 fi
2003
2004 if test "$ac_cv_type_pid_t" != no; then
2005 cat >> confdefs.h <<\EOF
2006 #define HAVE_PID_T 1
2007 EOF
2008 fi
2009
2010 # Some systems have uint32_t, others have u_int32_t, and some have both.
2011 # Then there is OpenUNIX but in sys/types.h and */bitypes.h which
2012 # is included by network header files.
2013 echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
2014 echo "configure: checking for u_int32_t" >&5
2015 if eval "test \"`echo '$''{'ac_cv_have_u_int32_t'+set}'`\" = set"; then
2016 echo $ac_n "(cached) $ac_c" 1>&6
2017 else
2018 cat > conftest.$ac_ext <<EOF
2019 #include "confdefs.h"
2020 #include <sys/types.h>
2021 #include <sys/socket.h>
2022 EOF
2023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2024 egrep "u_int32_t" >/dev/null 2>&1; then
2025 rm -rf conftest*
2026 ac_cv_have_u_int32_t=yes
2027 else
2028 rm -rf conftest*
2029 ac_cv_have_u_int32_t=no
2030 fi
2031 rm -f conftest*
2032
2033 fi
2034
2035 echo "$ac_t""$ac_cv_have_u_int32_t" 1>&6
2036 if test "$ac_cv_have_u_int32_t" = yes; then
2037 cat >> confdefs.h <<\EOF
2038 #define DCC_HAVE_U_INT32_T 1
2039 EOF
2040 fi
2041 # and then there is u_*int64_t
2042 echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6
2043 echo "configure: checking for u_int64_t" >&5
2044 if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then
2045 echo $ac_n "(cached) $ac_c" 1>&6
2046 else
2047 cat > conftest.$ac_ext <<EOF
2048 #include "confdefs.h"
2049 #include <sys/types.h>
2050 EOF
2051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2052 egrep "u_int64_t" >/dev/null 2>&1; then
2053 rm -rf conftest*
2054 ac_cv_have_u_int64_t=yes
2055 else
2056 rm -rf conftest*
2057 ac_cv_have_u_int64_t=no
2058 fi
2059 rm -f conftest*
2060
2061 fi
2062
2063 echo "$ac_t""$ac_cv_have_u_int64_t" 1>&6
2064 if test "$ac_cv_have_u_int64_t" = yes; then
2065 cat >> confdefs.h <<\EOF
2066 #define DCC_HAVE_U_INT64_T 1
2067 EOF
2068 fi
2069
2070 echo $ac_n "checking need for string.h""... $ac_c" 1>&6
2071 echo "configure: checking need for string.h" >&5
2072 if eval "test \"`echo '$''{'ac_cv_need_strings_h'+set}'`\" = set"; then
2073 echo $ac_n "(cached) $ac_c" 1>&6
2074 else
2075 cat > conftest.$ac_ext <<EOF
2076 #include "confdefs.h"
2077 #include <string.h>
2078 EOF
2079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2080 egrep "strcasecmp" >/dev/null 2>&1; then
2081 rm -rf conftest*
2082 ac_cv_need_strings_h=no
2083 else
2084 rm -rf conftest*
2085 ac_cv_need_strings_h=yes
2086 fi
2087 rm -f conftest*
2088
2089 fi
2090
2091 echo "$ac_t""$ac_cv_need_strings_h" 1>&6
2092 if test "$ac_cv_need_strings_h" = yes; then
2093 cat >> confdefs.h <<\EOF
2094 #define NEED_STRINGS_H 1
2095 EOF
2096 fi
2097
2098 # Checks for library functions and headers.
2099 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2100 echo "configure: checking whether time.h and sys/time.h may both be included" >&5
2101 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2102 echo $ac_n "(cached) $ac_c" 1>&6
2103 else
2104 cat > conftest.$ac_ext <<EOF
2105 #include "confdefs.h"
2106 #include <sys/types.h>
2107 #include <sys/time.h>
2108 #include <time.h>
2109 int main() {
2110 struct tm *tp;
2111 ; return 0; }
2112 EOF
2113 if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2114 rm -rf conftest*
2115 ac_cv_header_time=yes
2116 else
2117 echo "configure: failed program was:" >&5
2118 cat conftest.$ac_ext >&5
2119 rm -rf conftest*
2120 ac_cv_header_time=no
2121 fi
2122 rm -f conftest*
2123 fi
2124
2125 echo "$ac_t""$ac_cv_header_time" 1>&6
2126 if test $ac_cv_header_time = yes; then
2127 cat >> confdefs.h <<\EOF
2128 #define TIME_WITH_SYS_TIME 1
2129 EOF
2130
2131 fi
2132
2133 for ac_hdr in strings.h paths.h sys/cdefs.h pthread.h arpa/nameser.h resolv.h utime.h
2134 do
2135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2137 echo "configure: checking for $ac_hdr" >&5
2138 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2139 echo $ac_n "(cached) $ac_c" 1>&6
2140 else
2141 cat > conftest.$ac_ext <<EOF
2142 #include "confdefs.h"
2143 #include <$ac_hdr>
2144 EOF
2145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2146 { (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2148 if test -z "$ac_err"; then
2149 rm -rf conftest*
2150 eval "ac_cv_header_$ac_safe=yes"
2151 else
2152 echo "$ac_err" >&5
2153 echo "configure: failed program was:" >&5
2154 cat conftest.$ac_ext >&5
2155 rm -rf conftest*
2156 eval "ac_cv_header_$ac_safe=no"
2157 fi
2158 rm -f conftest*
2159 fi
2160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2161 echo "$ac_t""yes" 1>&6
2162 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2163 cat >> confdefs.h <<EOF
2164 #define $ac_tr_hdr 1
2165 EOF
2166
2167 else
2168 echo "$ac_t""no" 1>&6
2169 fi
2170 done
2171
2172 for ac_func in vsyslog getipnodebyname getipnodebyaddr freehostent getaddrinfo getnameinfo freeaddrinfo gai_strerror hstrerror _res res_init res_query dn_expand inet_ntop inet_aton gethostid localtime_r gmtime_r timegm altzone futimes setpgid poll strlcpy strlcat getprogname daemon siginterrupt eaccess
2173 do
2174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2175 echo "configure: checking for $ac_func" >&5
2176 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2177 echo $ac_n "(cached) $ac_c" 1>&6
2178 else
2179 cat > conftest.$ac_ext <<EOF
2180 #include "confdefs.h"
2181 /* System header to define __stub macros and hopefully few prototypes,
2182 which can conflict with char $ac_func(); below. */
2183 #include <assert.h>
2184 /* Override any gcc2 internal prototype to avoid an error. */
2185 /* We use char because int might match the return type of a gcc2
2186 builtin and then its argument prototype would still apply. */
2187 char $ac_func();
2188
2189 int main() {
2190
2191 /* The GNU C library defines this for functions which it implements
2192 to always fail with ENOSYS. Some functions are actually named
2193 something starting with __ and the normal name is an alias. */
2194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2195 choke me
2196 #else
2197 $ac_func();
2198 #endif
2199
2200 ; return 0; }
2201 EOF
2202 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2203 rm -rf conftest*
2204 eval "ac_cv_func_$ac_func=yes"
2205 else
2206 echo "configure: failed program was:" >&5
2207 cat conftest.$ac_ext >&5
2208 rm -rf conftest*
2209 eval "ac_cv_func_$ac_func=no"
2210 fi
2211 rm -f conftest*
2212 fi
2213
2214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2215 echo "$ac_t""yes" 1>&6
2216 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2217 cat >> confdefs.h <<EOF
2218 #define $ac_tr_func 1
2219 EOF
2220
2221 else
2222 echo "$ac_t""no" 1>&6
2223 fi
2224 done
2225
2226
2227 # deal with Linux "improvements" to the BIND resolver library
2228 # They #define the standard BIND names in resolv.h
2229 if test "$ac_cv_func__res" = no -a "$ac_cv_header_resolv_h" = yes \
2230 -a "$TARGET_SYS" = Linux; then
2231 for ac_func in __res_state __res_init __res_query __dn_expand
2232 do
2233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2234 echo "configure: checking for $ac_func" >&5
2235 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2236 echo $ac_n "(cached) $ac_c" 1>&6
2237 else
2238 cat > conftest.$ac_ext <<EOF
2239 #include "confdefs.h"
2240 /* System header to define __stub macros and hopefully few prototypes,
2241 which can conflict with char $ac_func(); below. */
2242 #include <assert.h>
2243 /* Override any gcc2 internal prototype to avoid an error. */
2244 /* We use char because int might match the return type of a gcc2
2245 builtin and then its argument prototype would still apply. */
2246 char $ac_func();
2247
2248 int main() {
2249
2250 /* The GNU C library defines this for functions which it implements
2251 to always fail with ENOSYS. Some functions are actually named
2252 something starting with __ and the normal name is an alias. */
2253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2254 choke me
2255 #else
2256 $ac_func();
2257 #endif
2258
2259 ; return 0; }
2260 EOF
2261 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2262 rm -rf conftest*
2263 eval "ac_cv_func_$ac_func=yes"
2264 else
2265 echo "configure: failed program was:" >&5
2266 cat conftest.$ac_ext >&5
2267 rm -rf conftest*
2268 eval "ac_cv_func_$ac_func=no"
2269 fi
2270 rm -f conftest*
2271 fi
2272
2273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2274 echo "$ac_t""yes" 1>&6
2275 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2276 cat >> confdefs.h <<EOF
2277 #define $ac_tr_func 1
2278 EOF
2279
2280 else
2281 echo "$ac_t""no" 1>&6
2282 fi
2283 done
2284
2285 if test "$ac_cv_func___res_state" = yes; then
2286 cat >> confdefs.h <<\EOF
2287 #define HAVE__RES 1
2288 EOF
2289
2290 fi
2291 if test "$ac_cv_func___res_init" = yes; then
2292 cat >> confdefs.h <<\EOF
2293 #define HAVE_RES_INIT 1
2294 EOF
2295
2296 fi
2297 if test "$ac_cv_func___res_query" = yes; then
2298 cat >> confdefs.h <<\EOF
2299 #define HAVE_RES_QUERY 1
2300 EOF
2301
2302 fi
2303 if test "$ac_cv_func___dn_expand" = yes; then
2304 cat >> confdefs.h <<\EOF
2305 #define HAVE_DN_EXPAND 1
2306 EOF
2307
2308 fi
2309 fi
2310
2311 for ac_func in getifaddrs
2312 do
2313 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2314 echo "configure: checking for $ac_func" >&5
2315 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318 cat > conftest.$ac_ext <<EOF
2319 #include "confdefs.h"
2320 /* System header to define __stub macros and hopefully few prototypes,
2321 which can conflict with char $ac_func(); below. */
2322 #include <assert.h>
2323 /* Override any gcc2 internal prototype to avoid an error. */
2324 /* We use char because int might match the return type of a gcc2
2325 builtin and then its argument prototype would still apply. */
2326 char $ac_func();
2327
2328 int main() {
2329
2330 /* The GNU C library defines this for functions which it implements
2331 to always fail with ENOSYS. Some functions are actually named
2332 something starting with __ and the normal name is an alias. */
2333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2334 choke me
2335 #else
2336 $ac_func();
2337 #endif
2338
2339 ; return 0; }
2340 EOF
2341 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2342 rm -rf conftest*
2343 eval "ac_cv_func_$ac_func=yes"
2344 else
2345 echo "configure: failed program was:" >&5
2346 cat conftest.$ac_ext >&5
2347 rm -rf conftest*
2348 eval "ac_cv_func_$ac_func=no"
2349 fi
2350 rm -f conftest*
2351 fi
2352
2353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2354 echo "$ac_t""yes" 1>&6
2355 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2356 cat >> confdefs.h <<EOF
2357 #define $ac_tr_func 1
2358 EOF
2359
2360 else
2361 echo "$ac_t""no" 1>&6
2362 fi
2363 done
2364 if test "$ac_cv_func_getifaddrs" = yes; then
2365 for ac_func in freeifaddrs
2366 do
2367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2368 echo "configure: checking for $ac_func" >&5
2369 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2370 echo $ac_n "(cached) $ac_c" 1>&6
2371 else
2372 cat > conftest.$ac_ext <<EOF
2373 #include "confdefs.h"
2374 /* System header to define __stub macros and hopefully few prototypes,
2375 which can conflict with char $ac_func(); below. */
2376 #include <assert.h>
2377 /* Override any gcc2 internal prototype to avoid an error. */
2378 /* We use char because int might match the return type of a gcc2
2379 builtin and then its argument prototype would still apply. */
2380 char $ac_func();
2381
2382 int main() {
2383
2384 /* The GNU C library defines this for functions which it implements
2385 to always fail with ENOSYS. Some functions are actually named
2386 something starting with __ and the normal name is an alias. */
2387 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2388 choke me
2389 #else
2390 $ac_func();
2391 #endif
2392
2393 ; return 0; }
2394 EOF
2395 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2396 rm -rf conftest*
2397 eval "ac_cv_func_$ac_func=yes"
2398 else
2399 echo "configure: failed program was:" >&5
2400 cat conftest.$ac_ext >&5
2401 rm -rf conftest*
2402 eval "ac_cv_func_$ac_func=no"
2403 fi
2404 rm -f conftest*
2405 fi
2406
2407 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2408 echo "$ac_t""yes" 1>&6
2409 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2410 cat >> confdefs.h <<EOF
2411 #define $ac_tr_func 1
2412 EOF
2413
2414 else
2415 echo "$ac_t""no" 1>&6
2416 fi
2417 done
2418 else
2419 echo $ac_n "checking getifaddrs replacement""... $ac_c" 1>&6
2420 echo "configure: checking getifaddrs replacement" >&5
2421 if eval "test \"`echo '$''{'ac_cv_use_dcc_getifaddrs'+set}'`\" = set"; then
2422 echo $ac_n "(cached) $ac_c" 1>&6
2423 else
2424 saveflags
2425 CFLAGS="$CFLAGS -I include"
2426 cat > conftest.$ac_ext <<EOF
2427 #include "confdefs.h"
2428 #define TEST_DCC_GETIFADDRS
2429 #include "dcclib/getifaddrs.c"
2430 int main() {
2431
2432 ; return 0; }
2433 EOF
2434 if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2435 rm -rf conftest*
2436 ac_cv_use_dcc_getifaddrs=yes
2437 else
2438 echo "configure: failed program was:" >&5
2439 cat conftest.$ac_ext >&5
2440 rm -rf conftest*
2441 ac_cv_use_dcc_getifaddrs=no
2442 fi
2443 rm -f conftest*
2444 fi
2445
2446 echo "$ac_t""$ac_cv_use_dcc_getifaddrs" 1>&6
2447 restoreflags
2448 if test "$ac_cv_use_dcc_getifaddrs" = yes; then
2449 cat >> confdefs.h <<\EOF
2450 #define USE_DCC_GETIFADDRS 1
2451 EOF
2452 fi
2453 fi
2454
2455 # Try to use a local md5.h and md5.c. Some systems such as RedHat 7.3
2456 # have versions of /usr/include/md5.h that are not directly usable.
2457 # Then there are the odd versions that are installed on systems.
2458 # Check whether --with-DCC-MD5 or --without-DCC-MD5 was given.
2459 if test "${with_DCC_MD5+set}" = set; then
2460 withval="$with_DCC_MD5"
2461 :
2462 fi
2463 if test "$with_DCC_MD5" = yes; then
2464 unset ac_cv_header_md5_h
2465 unset ac_cv_search_MD5Init
2466 else
2467 ac_safe=`echo "md5.h" | sed 'y%./+-%__p_%'`
2468 echo $ac_n "checking for md5.h""... $ac_c" 1>&6
2469 echo "configure: checking for md5.h" >&5
2470 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473 cat > conftest.$ac_ext <<EOF
2474 #include "confdefs.h"
2475 #include <md5.h>
2476 EOF
2477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2478 { (eval echo configure: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2480 if test -z "$ac_err"; then
2481 rm -rf conftest*
2482 eval "ac_cv_header_$ac_safe=yes"
2483 else
2484 echo "$ac_err" >&5
2485 echo "configure: failed program was:" >&5
2486 cat conftest.$ac_ext >&5
2487 rm -rf conftest*
2488 eval "ac_cv_header_$ac_safe=no"
2489 fi
2490 rm -f conftest*
2491 fi
2492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2493 echo "$ac_t""yes" 1>&6
2494 cat > conftest.$ac_ext <<EOF
2495 #include "confdefs.h"
2496 #include <unistd.h>
2497 #include <stdlib.h>
2498 #include <stdio.h>
2499 #include <sys/param.h>
2500 #include <md5.h>
2501 int main() {
2502
2503 ; return 0; }
2504 EOF
2505 if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2506 rm -rf conftest*
2507 echo $ac_n "checking for library containing MD5Init""... $ac_c" 1>&6
2508 echo "configure: checking for library containing MD5Init" >&5
2509 if eval "test \"`echo '$''{'ac_cv_search_MD5Init'+set}'`\" = set"; then
2510 echo $ac_n "(cached) $ac_c" 1>&6
2511 else
2512 ac_func_search_save_LIBS="$LIBS"
2513 ac_cv_search_MD5Init="no"
2514 cat > conftest.$ac_ext <<EOF
2515 #include "confdefs.h"
2516 /* Override any gcc2 internal prototype to avoid an error. */
2517 /* We use char because int might match the return type of a gcc2
2518 builtin and then its argument prototype would still apply. */
2519 char MD5Init();
2520
2521 int main() {
2522 MD5Init()
2523 ; return 0; }
2524 EOF
2525 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2526 rm -rf conftest*
2527 ac_cv_search_MD5Init="none required"
2528 else
2529 echo "configure: failed program was:" >&5
2530 cat conftest.$ac_ext >&5
2531 fi
2532 rm -f conftest*
2533 test "$ac_cv_search_MD5Init" = "no" && for i in md md5; do
2534 LIBS="-l$i $ac_func_search_save_LIBS"
2535 cat > conftest.$ac_ext <<EOF
2536 #include "confdefs.h"
2537 /* Override any gcc2 internal prototype to avoid an error. */
2538 /* We use char because int might match the return type of a gcc2
2539 builtin and then its argument prototype would still apply. */
2540 char MD5Init();
2541
2542 int main() {
2543 MD5Init()
2544 ; return 0; }
2545 EOF
2546 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2547 rm -rf conftest*
2548 ac_cv_search_MD5Init="-l$i"
2549 break
2550 else
2551 echo "configure: failed program was:" >&5
2552 cat conftest.$ac_ext >&5
2553 fi
2554 rm -f conftest*
2555 done
2556 LIBS="$ac_func_search_save_LIBS"
2557 fi
2558
2559 echo "$ac_t""$ac_cv_search_MD5Init" 1>&6
2560 if test "$ac_cv_search_MD5Init" != "no"; then
2561 test "$ac_cv_search_MD5Init" = "none required" || LIBS="$ac_cv_search_MD5Init $LIBS"
2562 cat >> confdefs.h <<\EOF
2563 #define HAVE_MD5 1
2564 EOF
2565
2566 else :
2567 ac_cv_header_md5_h=no
2568 fi
2569 else
2570 echo "configure: failed program was:" >&5
2571 cat conftest.$ac_ext >&5
2572 rm -rf conftest*
2573 echo "$ac_t"" but that md5.h does not compile" 1>&6; ac_cv_header_md5_h=no
2574 fi
2575 rm -f conftest*
2576 else
2577 echo "$ac_t""no" 1>&6
2578 fi
2579 fi
2580
2581 # How can the database code discover the size of physical memory?
2582 GOT_PHYSMEM=
2583 # Solaris sysconf()
2584 if test -z "$GOT_PHYSMEM"; then
2585 echo $ac_n "checking for sysconf(_SC_PHYS_PAGES)+sysconf(_SC_PAGESIZE)""... $ac_c" 1>&6
2586 echo "configure: checking for sysconf(_SC_PHYS_PAGES)+sysconf(_SC_PAGESIZE)" >&5
2587 if eval "test \"`echo '$''{'ac_cv_have_sysconf_pages'+set}'`\" = set"; then
2588 echo $ac_n "(cached) $ac_c" 1>&6
2589 else
2590 cat > conftest.$ac_ext <<EOF
2591 #include "confdefs.h"
2592 #include <unistd.h>
2593 int main() {
2594 sysconf(_SC_PHYS_PAGES)+sysconf(_SC_PAGESIZE)
2595 ; return 0; }
2596 EOF
2597 if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2598 rm -rf conftest*
2599 ac_cv_have_sysconf_pages=yes
2600 else
2601 echo "configure: failed program was:" >&5
2602 cat conftest.$ac_ext >&5
2603 rm -rf conftest*
2604 ac_cv_have_sysconf_pages=no
2605 fi
2606 rm -f conftest*
2607 fi
2608
2609 echo "$ac_t""$ac_cv_have_sysconf_pages" 1>&6
2610 if test "$ac_cv_have_sysconf_pages" = yes; then
2611 GOT_PHYSMEM=1
2612 cat >> confdefs.h <<\EOF
2613 #define HAVE__SC_PHYS_PAGES 1
2614 EOF
2615 fi
2616 fi
2617 # BSD sysctl()
2618 if test -z "$GOT_PHYSMEM"; then
2619 echo $ac_n "checking for sysctl(HW_PHYSMEM)""... $ac_c" 1>&6
2620 echo "configure: checking for sysctl(HW_PHYSMEM)" >&5
2621 if eval "test \"`echo '$''{'ac_cv_have_hw_physmem'+set}'`\" = set"; then
2622 echo $ac_n "(cached) $ac_c" 1>&6
2623 else
2624 cat > conftest.$ac_ext <<EOF
2625 #include "confdefs.h"
2626 #include <sys/types.h>
2627 #include <sys/param.h>
2628 #include <sys/sysctl.h>
2629 int main() {
2630 sysctl(0,CTL_HW+HW_PHYSMEM,0,0,0,0)
2631 ; return 0; }
2632 EOF
2633 if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2634 rm -rf conftest*
2635 ac_cv_have_hw_physmem=yes
2636 else
2637 echo "configure: failed program was:" >&5
2638 cat conftest.$ac_ext >&5
2639 rm -rf conftest*
2640 ac_cv_have_hw_physmem=no
2641 fi
2642 rm -f conftest*
2643 fi
2644
2645 echo "$ac_t""$ac_cv_have_hw_physmem" 1>&6
2646 if test "$ac_cv_have_hw_physmem" = yes; then
2647 GOT_PHYSMEM=1
2648 cat >> confdefs.h <<\EOF
2649 #define HAVE_HW_PHYSMEM 1
2650 EOF
2651 fi
2652 fi
2653 # HP-UX pstat_getstatic()
2654 if test -z "$GOT_PHYSMEM"; then
2655 echo $ac_n "checking for pstat_getstatic()""... $ac_c" 1>&6
2656 echo "configure: checking for pstat_getstatic()" >&5
2657 if eval "test \"`echo '$''{'ac_cv_have_pstat_getstatic'+set}'`\" = set"; then
2658 echo $ac_n "(cached) $ac_c" 1>&6
2659 else
2660 cat > conftest.$ac_ext <<EOF
2661 #include "confdefs.h"
2662 #include <sys/types.h>
2663 #include <sys/pstat.h>
2664 int main() {
2665 struct pst_static pss; pstat_getstatic(&pss, sizeof(pss), 1, 0)
2666 ; return 0; }
2667 EOF
2668 if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2669 rm -rf conftest*
2670 ac_cv_have_pstat_getstatic=yes
2671 else
2672 echo "configure: failed program was:" >&5
2673 cat conftest.$ac_ext >&5
2674 rm -rf conftest*
2675 ac_cv_have_pstat_getstatic=no
2676 fi
2677 rm -f conftest*
2678 fi
2679
2680 echo "$ac_t""$ac_cv_have_pstat_getstatic" 1>&6
2681 if test "$ac_cv_have_pstat_getstatic" = yes; then
2682 GOT_PHYSMEM=1
2683 cat >> confdefs.h <<\EOF
2684 #define HAVE_PSTAT_GETSTATIC 1
2685 EOF
2686 fi
2687 fi
2688 if test -n "$GOT_PHYSMEM"; then
2689 cat >> confdefs.h <<\EOF
2690 #define GOT_PHYSMEM 1
2691 EOF
2692 fi
2693
2694 echo $ac_n "checking for __progname""... $ac_c" 1>&6
2695 echo "configure: checking for __progname" >&5
2696 if eval "test \"`echo '$''{'ac_cv_have___progname'+set}'`\" = set"; then
2697 echo $ac_n "(cached) $ac_c" 1>&6
2698 else
2699 cat > conftest.$ac_ext <<EOF
2700 #include "confdefs.h"
2701
2702 int main() {
2703 extern char *__progname;
2704 return __progname[0];
2705 ; return 0; }
2706 EOF
2707 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2708 rm -rf conftest*
2709 ac_cv_have___progname=yes
2710 else
2711 echo "configure: failed program was:" >&5
2712 cat conftest.$ac_ext >&5
2713 rm -rf conftest*
2714 ac_cv_have___progname=no
2715 fi
2716 rm -f conftest*
2717 fi
2718
2719 echo "$ac_t""$ac_cv_have___progname" 1>&6
2720 if test "$ac_cv_have___progname" = yes; then
2721 cat >> confdefs.h <<\EOF
2722 #define HAVE___PROGNAME 1
2723 EOF
2724 fi
2725
2726
2727 # how big is NUM_CWFS
2728 echo $ac_n "checking FD_SETSIZE to compute NUM_CWFS""... $ac_c" 1>&6
2729 echo "configure: checking FD_SETSIZE to compute NUM_CWFS" >&5
2730 if eval "test \"`echo '$''{'ac_cv_num_cwfs'+set}'`\" = set"; then
2731 echo $ac_n "(cached) $ac_c" 1>&6
2732 else
2733 if test "$cross_compiling" = yes; then
2734 ac_cv_num_cwfs=32
2735 else
2736 cat > conftest.$ac_ext <<EOF
2737 #include "confdefs.h"
2738 #include <stdio.h>
2739 #include <sys/types.h>
2740 #include <sys/socket.h>
2741 #undef max
2742 #define max(a,b) ((a) > (b) ? (a) : (b))
2743 #undef min
2744 #define min(a,b) ((a) < (b) ? (a) : (b))
2745 main()
2746 {
2747 FILE *f=fopen("conftestval", "w");
2748 if (!f) exit(1);
2749 fprintf(f, "%d\n", max(2, min(20, FD_SETSIZE-32)));
2750 exit(0);
2751 }
2752 EOF
2753 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2754 then
2755 ac_cv_num_cwfs=`cat conftestval`
2756 else
2757 echo "configure: failed program was:" >&5
2758 cat conftest.$ac_ext >&5
2759 rm -fr conftest*
2760 ac_cv_num_cwfs=32
2761 fi
2762 rm -fr conftest*
2763 fi
2764
2765 fi
2766
2767 echo "$ac_t""$ac_cv_num_cwfs" 1>&6
2768 cat >> confdefs.h <<EOF
2769 #define NUM_CWFS $ac_cv_num_cwfs
2770 EOF
2771
2772
2773 # Check whether --with-uid or --without-uid was given.
2774 if test "${with_uid+set}" = set; then
2775 withval="$with_uid"
2776 :
2777 fi
2778
2779 # Check whether --enable-chown or --disable-chown was given.
2780 if test "${enable_chown+set}" = set; then
2781 enableval="$enable_chown"
2782 :
2783 fi
2784
2785 case "$TARGET_SYS" in
2786 Darwin)
2787 DCCSUID=root
2788 DCC_OWN=daemon
2789 DCC_GRP=daemon
2790 ;;
2791 FreeBSD|NetBSD)
2792 DCCSUID=root
2793 DCC_OWN=root
2794 DCC_GRP=wheel
2795 ;;
2796 *)
2797 DCCSUID=root
2798 DCC_OWN=bin
2799 DCC_GRP=bin
2800 ;;
2801 esac
2802
2803 if test -n "$with_uid" -a "$with_uid" != no; then
2804 DCCSUID="$with_uid"
2805 else
2806 with_uid=
2807 PARM_UID=
2808 fi
2809
2810 if test "$enable_sys_install" = no; then
2811 #correct common misspelling
2812 enable_sys_inst=no
2813 PARM_SYS_INST="--disable-sys-inst"
2814 fi
2815 if test "$enable_sys_inst" != no; then
2816 NO_SYS_INSTALL="#install man pages"
2817 NO_SUID="#cdcc, dccproc, ... set-UID $DCCSUID"
2818 else
2819 # Do not install the man pages if not installing on the system.
2820 NO_SYS_INSTALL="NO_SYS_INSTALL=not-system-install"
2821
2822 # avoid chown and chgrp if we are not root
2823 # not all systems have `id -n`
2824 uid=`id | sed -n \
2825 -e 's/.*uid=[0-9][0-9]*(\([^)][^)]*\)).*/\1/p' \
2826 -e 's/.*uid=\([0-9][0-9]*\).*/\1/p'`
2827 if test -n "$uid"; then
2828 DCC_OWN="$uid"
2829 fi
2830 gid=`id | sed -n \
2831 -e 's/.*gid=[0-9][0-9]*(\([^)][^)]*\)).*/\1/p' \
2832 -e 's/.*gid=\([0-9][0-9]*\).*/\1/p'`
2833 if test -n "$gid"; then
2834 DCC_GRP="$gid"
2835 fi
2836
2837 # set-UID even with disable-sys-inst if we been given a UID
2838 if test -n "$with_uid"; then
2839 NO_SUID="#./configure run as root; cdcc, dccproc, ... set-UID $DCCSUID"
2840 else
2841 NO_SUID="NO_SUID=no-set-UID"
2842 if test -n "$uid"; then
2843 DCCSUID="$uid"
2844 fi
2845 fi
2846 fi
2847
2848 if test -s dccd/dccd.c; then
2849 # Check whether --enable-server or --disable-server was given.
2850 if test "${enable_server+set}" = set; then
2851 enableval="$enable_server"
2852 :
2853 fi
2854 fi
2855 # Check whether --enable-dccifd or --disable-dccifd was given.
2856 if test "${enable_dccifd+set}" = set; then
2857 enableval="$enable_dccifd"
2858 :
2859 fi
2860 # Check whether --enable-dccm or --disable-dccm was given.
2861 if test "${enable_dccm+set}" = set; then
2862 enableval="$enable_dccm"
2863 :
2864 fi
2865
2866 # Look for sendmail
2867 # dccm requires the sendmail milter header file and library.
2868 # Without an explicit hint in the SENDMAIL environment variable,
2869 # look for them first in a sendmail directory parallel to the DCC
2870 # source directory containing a standard sendmail source and build tree
2871 # from sendmail.org
2872 # Check whether --with-sendmail or --without-sendmail was given.
2873 if test "${with_sendmail+set}" = set; then
2874 withval="$with_sendmail"
2875 :
2876 fi
2877 if test "$enable_dccm" = no -o "$with_sendmail" = no -o ! -d dccm; then
2878 with_sendmail=no
2879 enable_dccm=no
2880 SENDMAIL=no
2881 SENDMAIL_OBJ=/dev/null
2882 SENDMAIL_LIB=/usr/lib
2883 else
2884 SENDMAIL_OBJ=
2885 SENDMAIL_LIB=
2886 fi
2887 if test -n "$with_sendmail" -a "$with_sendmail" != yes -a "$with_sendmail" != no; then
2888 SENDMAIL="$with_sendmail"
2889 SENDMAIL_EVAL="$SENDMAIL"
2890 with_sendmail=yes
2891 fi
2892 if test -z "$SENDMAIL"; then
2893 # prefer a parallel ../sendmail directory
2894 DEPTH=.
2895 SENDMAIL='${DEPTH}/../sendmail'
2896 eval SENDMAIL_EVAL=$SENDMAIL
2897 # notice native sendmail installation on FreeBSD 4.6 and elsewhere
2898 # prefer a shared library, without depending on test getting the
2899 # precedent of -a and -o right. One might hope that a FreeBSD system
2900 # with native sendmail milter would not have an old broken test command,
2901 # but who knows?
2902 if test ! -d $SENDMAIL_EVAL \
2903 -a -f /usr/include/libmilter/mfapi.h; then
2904 if test -f /usr/lib/libmilter.so; then
2905 SENDMAIL=/usr/include
2906 SENDMAIL_EVAL=$SENDMAIL
2907 SENDMAIL_OBJ=/usr/lib
2908 SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
2909 SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.so
2910 fi
2911 if test ! -d $SENDMAIL_EVAL \
2912 -a -f /usr/lib/libmilter.a; then
2913 SENDMAIL=/usr/include
2914 SENDMAIL_EVAL=$SENDMAIL
2915 SENDMAIL_OBJ=/usr/lib
2916 SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
2917 SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
2918 # RedHat 7.3 put old libsmutil.a in /usr/lib
2919 if test -f /usr/lib/libsmutil.a; then
2920 SENDMAIL_LIB="$SENDMAIL_LIB /usr/lib/libsmutil.a"
2921 fi
2922 fi
2923 fi
2924 # notice a FreeBSD sendmail package if there is only one
2925 if test ! -d $SENDMAIL_EVAL; then
2926 SENDMAIL_PKG=`echo /usr/ports/mail/sendmail/work/sendmail*`
2927 if test -d "$SENDMAIL_PKG"; then
2928 SENDMAIL="$SENDMAIL_PKG"
2929 SENDMAIL_EVAL="$SENDMAIL"
2930 fi
2931 fi
2932 # notice native installation on some versions of NetBSD
2933 if test ! -d $SENDMAIL_EVAL \
2934 -a -f /usr/pkg/include/libmilter/mfapi.h \
2935 -a -f /usr/pkg/lib/libmilter.a; then
2936 SENDMAIL=/usr/pkg/include
2937 SENDMAIL_EVAL=$SENDMAIL
2938 SENDMAIL_OBJ=/usr/pkg/lib
2939 SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
2940 SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
2941 fi
2942 # notice native installation on some flavors of Linux
2943 if test ! -d $SENDMAIL_EVAL \
2944 -a -f /usr/include/libmilter/mfapi.h \
2945 -a -f /usr/lib/libmilter/libmilter.a; then
2946 SENDMAIL=/usr/include
2947 SENDMAIL_EVAL=$SENDMAIL
2948 SENDMAIL_OBJ=/usr/lib/libmilter
2949 SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
2950 SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
2951 # RedHat 7.3 put old libsmutil.a in /usr/lib
2952 if test -f /usr/lib/libsmutil.a; then
2953 SENDMAIL_LIB="$SENDMAIL_LIB /usr/lib/libsmutil.a"
2954 fi
2955 fi
2956 fi
2957 # Look for an object directory in a standard sendmail.org distribution tree
2958 # if we still lack libmilter.a
2959 if test -z "$SENDMAIL_LIB"; then
2960 case "$TARGET_SYS" in
2961 AIX)
2962 # sendmail thinks all AIX systems are "PPC"
2963 PLATFORM=`uname -vs | tr ' /' '.\-'`.`uname -r`.PPC;;
2964 SunOS)
2965 # sendmail does not like the trailing 'u' in sun4u
2966 PLATFORM=`uname -rsm | tr ' /' '.\-' \
2967 | sed -e 's/sun4u$/sun4/'`;;
2968 Darwin)
2969 # sendmail does not like the period in the middle of Power.Macintosh
2970 PLATFORM=`uname -rsm | tr ' /' '.\-' \
2971 | sed -e 's/Power.Macintosh/PowerMacintosh/'`;;
2972 *)
2973 PLATFORM=`uname -rsm | tr ' /' '.\-'`;;
2974 esac
2975 SENDMAIL_OBJ="$SENDMAIL/obj.$PLATFORM"
2976 SENDMAIL_LIB="$SENDMAIL_OBJ/libmilter/libmilter.a"
2977
2978 # If there is no libmilter.a in the sendmail.org standard place,
2979 # then maybe we are being run by a FreeBSD port
2980 if test ! -f $SENDMAIL_LIB -a -f $SENDMAIL/include/libmilter/mfapi.h \
2981 -a -f $SENDMAIL/lib/libmilter.a; then
2982 SENDMAIL_OBJ=$SENDMAIL/lib
2983 SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
2984 SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
2985 fi
2986
2987 eval SENDMAIL_OBJ_EVAL="\"$SENDMAIL_OBJ\""
2988
2989 # add the odd old sendmail 8.11 milter extra library
2990 if test -f "$SENDMAIL_OBJ_EVAL/libsmutil/libsmutil.a"; then
2991 SENDMAIL_LIB="$SENDMAIL_LIB $SENDMAIL_OBJ/libsmutil/libsmutil.a"
2992 fi
2993 # and the odd libsm.a that 8.12.1 needs for sm_printf()
2994 if test -f "$SENDMAIL_OBJ_EVAL/libsm/libsm.a"; then
2995 SENDMAIL_LIB="$SENDMAIL_LIB $SENDMAIL_OBJ/libsm/libsm.a"
2996 fi
2997 fi
2998
2999 # figure out -I for dccm/Makefile
3000 # If we are using a sendmail source directory, then cc must look in both
3001 # the sendmail and include directories.
3002 SENDMAIL_INC=
3003 SENDMAIL_INC_DIRS=
3004 if test -n "$SENDMAIL"; then
3005 for DIR in $SENDMAIL $SENDMAIL/sendmail $SENDMAIL/include; do
3006 eval DIR_EVAL="$DIR"
3007 if test -d "$DIR_EVAL" -a "$DIR" != /usr/include -a "$DIR" != /usr; then
3008 appendvar SENDMAIL_INC -I$DIR
3009 appendvar SENDMAIL_INC_DIRS $DIR_EVAL
3010 fi
3011 done
3012 fi
3013
3014
3015 # Check whether --with-cgibin or --without-cgibin was given.
3016 if test "${with_cgibin+set}" = set; then
3017 withval="$with_cgibin"
3018 :
3019 fi
3020 if test -n "$with_cgibin" -a "$with_cgi_bin" != no; then
3021 cgibin="$with_cgibin"
3022 fi
3023
3024
3025 # where is a good place to put the dccm and dccifd sockets and PID files?
3026 # Check whether --with-rundir or --without-rundir was given.
3027 if test "${with_rundir+set}" = set; then
3028 withval="$with_rundir"
3029 :
3030 fi
3031 dcc_rundir=/var/run/dcc
3032 if test -n "$with_rundir" -a "$with_rundir" != no; then
3033 unset ac_cv_path_varrun
3034 dcc_rundir="$with_rundir"
3035 else
3036 echo $ac_n "checking run directory""... $ac_c" 1>&6
3037 echo "configure: checking run directory" >&5
3038 if eval "test \"`echo '$''{'ac_cv_path_varrun'+set}'`\" = set"; then
3039 echo $ac_n "(cached) $ac_c" 1>&6
3040 else
3041 if test "$cross_compiling" = yes; then
3042 ac_cv_path_varrun=/var/run
3043 else
3044 cat > conftest.$ac_ext <<EOF
3045 #include "confdefs.h"
3046 #include <stdio.h>
3047 #include "include/dcc_paths.h"
3048 main()
3049 {
3050 FILE *f=fopen("conftestval", "w");
3051 if (!f) exit(1);
3052 fprintf(f, _PATH_VARRUN"\n");
3053 exit(0);
3054 }
3055 EOF
3056 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3057 then
3058 x=`cat conftestval`; ac_cv_path_varrun=`expr "$x" \: '\(.*\)/$' \| "$x"`
3059 else
3060 echo "configure: failed program was:" >&5
3061 cat conftest.$ac_ext >&5
3062 rm -fr conftest*
3063 ac_cv_path_varrun=/var/run
3064 fi
3065 rm -fr conftest*
3066 fi
3067
3068 fi
3069
3070 echo "$ac_t""$ac_cv_path_varrun" 1>&6
3071 dcc_rundir=$ac_cv_path_varrun/dcc
3072 fi
3073 cat >> confdefs.h <<EOF
3074 #define DCC_RUNDIR "$dcc_rundir"
3075 EOF
3076
3077
3078
3079 # Check whether --with-db-memory or --without-db-memory was given.
3080 if test "${with_db_memory+set}" = set; then
3081 withval="$with_db_memory"
3082 :
3083 fi
3084 if test -z "$with_db_memory" -o "$with_db_memory" = no; then
3085 with_db_memory=0
3086 fi
3087 if test -n "`expr "$with_db_memory" : '[0-9]*\(.*\)'`"; then
3088 echo "warning: --with-db-memory=X requires a number" 1>&2
3089 with_db_memory=0
3090 fi
3091 if test "$with_db_memory" -ne 0; then
3092 # related to MAX_MAX_DB_MBYTE in db.c, help string here, and INSTALL.html
3093 if test "$with_db_memory" -lt 32 -o $with_db_memory -gt 49152; then
3094 echo "warning: --with-db-memory=X must be between 32 MBytes and 49152 MBytes" 1>&2
3095 with_db_memory=0
3096 fi
3097 fi
3098 cat >> confdefs.h <<EOF
3099 #define DB_MIN_MBYTE $with_db_memory
3100 EOF
3101
3102 # Check whether --with-max-db-mem or --without-max-db-mem was given.
3103 if test "${with_max_db_mem+set}" = set; then
3104 withval="$with_max_db_mem"
3105 :
3106 fi
3107 if test -z "$with_max_db_mem" -o "$with_max_db_mem" = no; then
3108 with_max_db_mem=0
3109 fi
3110 if test -n "`expr "$with_max_db_mem" : '[0-9]*\(.*\)'`"; then
3111 echo "warning: --with-max-db_mem=X requires a number" 1>&2
3112 with_max_db_mem=0
3113 fi
3114 if test "$with_max_db_mem" -ne 0; then
3115 if test "$with_max_db_mem" -lt 32 -o $with_max_db_mem -gt 49152; then
3116 echo "warning: --with-max-db_mem=X must be between 32 MBytes and 49152 MBytes" 1>&2
3117 with_max_db_mem=0
3118 fi
3119 if test "$with_db_memory" -ne 0 \
3120 -a "$with_max_db_mem" -lt $with_db_memory; then
3121 echo "warning: --with-max-db_mem=$with_max_db_mem less than --with-db-memory=$with_db_memory" 1>&2
3122 with_max_db_mem=0
3123 fi
3124 fi
3125
3126 cat >> confdefs.h <<EOF
3127 #define DB_MAX_MBYTE $with_max_db_mem
3128 EOF
3129
3130
3131 # Check whether --with-max-log-size or --without-max-log-size was given.
3132 if test "${with_max_log_size+set}" = set; then
3133 withval="$with_max_log_size"
3134 :
3135 fi
3136 if test "$with_max_log_size" = no; then
3137 with_max_log_size=
3138 fi
3139 if test -n "$with_max_log_size" \
3140 -a -n "`expr 0$with_max_log_size : '[0-9]*\(.*\)'`"; then
3141 echo "warning: --with-max-log-size=X requires a number" 1>&2
3142 with_max_log_size=
3143 fi
3144 if test -z "$with_max_log_size"; then
3145 with_max_log_size=32
3146 fi
3147 # assume it is in bytes instead of KBytes if it is more than 2*1024*1024,
3148 if test 0$with_max_log_size -ge 2097152; then
3149 with_max_log_size=`expr \( 0$with_max_log_size + 1023 \) / 1024`
3150 fi
3151 # "unlimited is really 2 GBbyte
3152 if test $with_max_log_size -eq 0; then
3153 with_max_log_size=2097152
3154 fi
3155 cat >> confdefs.h <<EOF
3156 #define MAX_LOG_KBYTE $with_max_log_size
3157 EOF
3158
3159
3160 # Check whether --with-rl-min-max or --without-rl-min-max was given.
3161 if test "${with_rl_min_max+set}" = set; then
3162 withval="$with_rl_min_max"
3163 :
3164 fi
3165 if test "$with_rl_min_max" = no; then
3166 with_rl_min_max=
3167 fi
3168 if test -n "$with_rl_min_max" \
3169 -a -n "`expr 0$with_rl_min_max : '[0-9]*\(.*\)'`"; then
3170 echo "warning: --with-rl-min-max=X requires a number" 1>&2
3171 with_rl_min_max=
3172 fi
3173 if test -n "$with_rl_min_max"; then
3174 cat >> confdefs.h <<EOF
3175 #define RL_MIN_MAX $with_rl_min_max
3176 EOF
3177 fi
3178
3179
3180 echo $ac_n "checking for sysctl(kern.boottime)""... $ac_c" 1>&6
3181 echo "configure: checking for sysctl(kern.boottime)" >&5
3182 if eval "test \"`echo '$''{'ac_cv_have_boottime'+set}'`\" = set"; then
3183 echo $ac_n "(cached) $ac_c" 1>&6
3184 else
3185 cat > conftest.$ac_ext <<EOF
3186 #include "confdefs.h"
3187 #include <sys/types.h>
3188 #include <sys/param.h>
3189 #include <sys/sysctl.h>
3190 int main() {
3191 sysctl(0,CTL_KERN+KERN_BOOTTIME,0,0,0,0)
3192 ; return 0; }
3193 EOF
3194 if { (eval echo configure: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3195 rm -rf conftest*
3196 ac_cv_have_boottime=yes
3197 else
3198 echo "configure: failed program was:" >&5
3199 cat conftest.$ac_ext >&5
3200 rm -rf conftest*
3201 ac_cv_have_boottime=no
3202 fi
3203 rm -f conftest*
3204 fi
3205
3206 echo "$ac_t""$ac_cv_have_boottime" 1>&6
3207 if test "$ac_cv_have_boottime" = yes; then
3208 cat >> confdefs.h <<\EOF
3209 #define HAVE_BOOTTIME 1
3210 EOF
3211 fi
3212
3213
3214 # Decide whether we should try to build IPv6 support. Be conservative
3215 # and give up at the first sign of trouble.
3216 # Also check for some other network related system oddities.
3217 # Check whether --enable-IPv6 or --disable-IPv6 was given.
3218 if test "${enable_IPv6+set}" = set; then
3219 enableval="$enable_IPv6"
3220 :
3221 fi
3222 # some systems think they have IPv6 but don't or have odd definitions
3223 # for the structure tags
3224 case "$TARGET_SYS" in
3225 SunOS)
3226 cat >> confdefs.h <<\EOF
3227 #define CONF_S6_ADDR32 _S6_un._S6_u32
3228 EOF
3229 # use poll() instead of select() on Solaris because socket() can yield
3230 # file descriptors larger than FD_SETSIZE
3231 if test "$ac_cv_func_poll" = yes; then
3232 cat >> confdefs.h <<\EOF
3233 #define USE_POLL 1
3234 EOF
3235 fi
3236 # use `dbclean -F` on Solaris to force less unneeded disk I/O
3237 cat >> confdefs.h <<\EOF
3238 #define USE_DBCLEAN_F 1
3239 EOF
3240 cat >> confdefs.h <<\EOF
3241 #define HAVE_COHERENT_MMAP 1
3242 EOF
3243 ;;
3244 OSF1)
3245 cat >> confdefs.h <<\EOF
3246 #define CONF_S6_ADDR32 s6_laddr
3247 EOF
3248 ;;
3249 OpenUNIX)
3250 enable_IPv6=no
3251 cat >> confdefs.h <<\EOF
3252 #define CONF_S6_ADDR32 S6_un.S6_l
3253 EOF
3254 ;;
3255 Linux)
3256 # allow file descriptors larger than FD_SETSIZE
3257 if test "$ac_cv_func_poll" = yes; then
3258 cat >> confdefs.h <<\EOF
3259 #define USE_POLL 1
3260 EOF
3261 fi
3262 ;;
3263 FreeBSD|DragonFly)
3264 # allow file descriptors larger than FD_SETSIZE
3265 if test "$ac_cv_func_poll" = yes; then
3266 cat >> confdefs.h <<\EOF
3267 #define USE_POLL 1
3268 EOF
3269 fi
3270 cat >> confdefs.h <<\EOF
3271 #define CONF_S6_ADDR32 __u6_addr.__u6_addr32
3272 EOF
3273 cat >> confdefs.h <<\EOF
3274 #define HAVE_COHERENT_MMAP 1
3275 EOF
3276 ;;
3277 HP-UX)
3278 # allow file descriptors larger than FD_SETSIZE
3279 if test "$ac_cv_func_poll" = yes; then
3280 cat >> confdefs.h <<\EOF
3281 #define USE_POLL 1
3282 EOF
3283 fi
3284 # at least some versions of HP-UX do not have working select()
3285 # poll(), and shutdown() on AF_UNIX sockets.
3286 if test `uname -r | sed -e 's/^[A-Z.]*//' -e 's/\.//g'` -le 1100; then
3287 cat >> confdefs.h <<\EOF
3288 #define HP_UX_BAD_AF_UNIX 1
3289 EOF
3290 fi
3291 ;;
3292 *)
3293 cat >> confdefs.h <<\EOF
3294 #define CONF_S6_ADDR32 __u6_addr.__u6_addr32
3295 EOF
3296 ;;
3297 esac
3298 if test "$enable_IPv6"SET = noSET -o "$enable_IPV6"SET = noSET \
3299 -o "$enable_ipv6"SET = noSET; then
3300 NO_IPV6="disabled"
3301 else
3302 if test "$ac_cv_func_gai_strerror" != yes; then
3303 no_getaddrinfo="no gai_strerror()"
3304 fi
3305 if test "$ac_cv_func_freeaddrinfo" != yes; then
3306 no_getaddrinfo="no freeaddrinfo()"
3307 fi
3308 if test "$ac_cv_func_getaddrinfo" != yes; then
3309 no_getaddrinfo="no getaddrinfo()"
3310 fi
3311 if test "$ac_cv_func_freehostent" != yes; then
3312 no_getipnodebyname="no freehostent()"
3313 fi
3314 if test "$ac_cv_func_getipnodebyaddr" != yes; then
3315 no_getipnodebyname="no getipnodebyaddr()"
3316 fi
3317 if test "$ac_cv_func_getipnodebyname" != yes; then
3318 no_getipnodebyname="no getipnodebyname()"
3319 fi
3320 if test -n "$no_getipnodebyname" -a -n "$no_getaddrinfo"; then
3321 NO_IPV6="$no_getipnodebyname and $no_getaddrinfo"
3322 fi
3323 fi
3324 echo $ac_n "checking for IPv6""... $ac_c" 1>&6
3325 echo "configure: checking for IPv6" >&5
3326 cat > conftest.$ac_ext <<EOF
3327 #include "confdefs.h"
3328 #include <netinet/in.h>
3329 EOF
3330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3331 egrep "sockaddr_in6" >/dev/null 2>&1; then
3332 :
3333 else
3334 rm -rf conftest*
3335 NO_IPV6="no sockaddr_in6"
3336 fi
3337 rm -f conftest*
3338 cat > conftest.$ac_ext <<EOF
3339 #include "confdefs.h"
3340 #include <netinet/in.h>
3341 EOF
3342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3343 egrep "in6_addr" >/dev/null 2>&1; then
3344 :
3345 else
3346 rm -rf conftest*
3347 NO_IPV6="no in6_addr"
3348 fi
3349 rm -f conftest*
3350 cat > conftest.$ac_ext <<EOF
3351 #include "confdefs.h"
3352 #include<sys/socket.h>
3353 AF_INET6
3354 EOF
3355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3356 egrep "^AF_INET6$" >/dev/null 2>&1; then
3357 rm -rf conftest*
3358 NO_IPV6="no AF_INET6"
3359 cat >> confdefs.h <<\EOF
3360 #define NO_AF_INET6 1
3361 EOF
3362
3363 fi
3364 rm -f conftest*
3365
3366 if test -z "$NO_IPV6"; then
3367 echo "$ac_t""yes" 1>&6
3368 else
3369 echo "$ac_t""$NO_IPV6" 1>&6
3370 cat >> confdefs.h <<EOF
3371 #define NO_IPV6 "$NO_IPV6"
3372 EOF
3373 fi
3374
3375
3376
3377 # Decide about man pages and what to build
3378 if test "$prefix" = NONE; then
3379 if test -z "$DCC_HOMEDIR"; then
3380 DCC_HOMEDIR=$ac_default_prefix
3381 fi
3382 prefix=$DCC_HOMEDIR
3383 fi
3384 cat >> confdefs.h <<EOF
3385 #define DCC_HOMEDIR "$prefix"
3386 EOF
3387 if test "$libexecdir" = '${exec_prefix}/libexec'; then
3388 libexecdir=$prefix/libexec
3389 fi
3390 cat >> confdefs.h <<EOF
3391 #define DCC_LIBEXECDIR "$libexecdir"
3392 EOF
3393 if test "$bindir" = '${exec_prefix}/bin'; then
3394 if test "$enable_sys_inst" = no -a ! -w /usr/local/bin -a -d $HOME/bin; then
3395 bindir=$HOME/bin
3396 echo "$ac_t""install binaries in $bindir" 1>&6
3397 else
3398 bindir=/usr/local/bin
3399 fi
3400 fi
3401
3402 # default cgibin after $prefix has been figured out
3403 if test -z "$cgibin"; then
3404 cgibin="$prefix/cgi-bin"
3405 fi
3406
3407 # Pick the default target location of the man pages and
3408 # decide whether to install .8 or .0 files.
3409 case "$TARGET_SYS" in
3410 Linux)
3411 # default to /usr/local/man/man8 and use roff files
3412 mancat=man
3413 MAN8='dcc.8 $(SUBDIR_MAN8)'
3414 MAN8INST=''
3415 USE_DCCMANINSTALL='maninstall:dccmaninstall'
3416 ;;
3417 OpenBSD)
3418 # default to /usr/local/man/cat8 and whatever.0 names
3419 mancat=cat
3420 MAN8='dcc.0 $(SUBDIR_MAN0)'
3421 MAN8INST=''
3422 USE_DCCMANINSTALL='maninstall:dccmaninstall'
3423 ;;
3424 HP-UX)
3425 # default to /usr/local/man/cat8 and use cleartext files and
3426 # whatever.8 names
3427 mancat=cat
3428 MAN8='dcc.0 $(SUBDIR_MAN0)'
3429 MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
3430 USE_DCCMANINSTALL='maninstall:dccmaninstall'
3431 ;;
3432 IRIX*)
3433 # default to /usr/local/man/man8 and use cleartext files and
3434 # whatever.8 names
3435 mancat=man
3436 MAN8='dcc.0 $(SUBDIR_MAN0)'
3437 MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
3438 USE_DCCMANINSTALL='maninstall:dccmaninstall'
3439 ;;
3440 SunOS)
3441 # default to /usr/local/man/cat8 and use cleartext files,
3442 # use our installation rule, and whatever.8 names
3443 mancat=cat
3444 MAN8='dcc.0 $(SUBDIR_MAN0)'
3445 MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
3446 USE_DCCMANINSTALL='maninstall:dccmaninstall'
3447 ;;
3448 FreeBSD)
3449 # default to /usr/local/man/man8 and use nroff files, possibly
3450 # compressed via /usr/share/mk
3451 mancat=man
3452 MAN8='dcc.8 $(SUBDIR_MAN8)'
3453 MAN8INST=''
3454 USE_DCCMANINSTALL='# do not use dccmaninstall; instead use the built in maninstall'
3455 ;;
3456 DragonFly)
3457 # default to /usr/local/man/man8 and use nroff files, possibly
3458 # compressed via /usr/share/mk
3459 mancat=man
3460 MAN8='dcc.8 $(SUBDIR_MAN8)'
3461 MAN8INST=''
3462 USE_DCCMANINSTALL='# do not use dccmaninstall; instead use the built in maninstall'
3463 ;;
3464 Darwin)
3465 # default to /usr/local/man/man8 and use nroff files
3466 mancat=man
3467 MAN8='dcc.8 $(SUBDIR_MAN8)'
3468 MAN8INST=''
3469 USE_DCCMANINSTALL='maninstall:dccmaninstall'
3470 ;;
3471 NetBSD)
3472 # default to /usr/local/man/man8 and use nroff files, possibly
3473 # compressed via /usr/share/mk on versions well after 1.4.2.
3474 mancat=cat
3475 MAN8='dcc.0 $(SUBDIR_MAN0)'
3476 MAN8INST=''
3477 # force NetBSD to install the man pages
3478 USE_DCCMANINSTALL='install maninstall: dccmaninstall'
3479 ;;
3480 BSD/OS)
3481 # default to /usr/local/man/cat8 and use cleartext files, possibly
3482 # compressed via /usr/share/mk, and named whatever.0
3483 mancat=cat
3484 MAN8='dcc.0 $(SUBDIR_MAN0)'
3485 MAN8INST=''
3486 USE_DCCMANINSTALL='# do not use dccmaninstall; instead use the built in maninstall'
3487 ;;
3488 AIX)
3489 # default to /usr/local/man/cat8, use our installation rule,
3490 # and use cleartext files named whatever.8
3491 mancat=cat
3492 MAN8='dcc.0 $(SUBDIR_MAN0)'
3493 MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
3494 USE_DCCMANINSTALL='maninstall:dccmaninstall'
3495 ;;
3496 OpenUNIX)
3497 # default to /usr/local/man/cat8 and use cleartext files named
3498 # whatever.8
3499 mancat=cat
3500 MAN8='dcc.0 $(SUBDIR_MAN0)'
3501 MAN8INST='/`expr $$NM : "\(.*\)".0`.8'
3502 USE_DCCMANINSTALL='maninstall:dccmaninstall'
3503 ;;
3504 *)
3505 echo "warning: *** Cannot install man pages on unfamiliar systems ***" 1>&2
3506 mancat=fixme
3507 MAN8=
3508 MAN8INST=
3509 USE_DCCMANINSTALL='maninstall:dccmaninstall'
3510 ;;
3511 esac
3512 if test "$mandir" = '${prefix}/man'; then
3513 if test "$DCC_MANDIR"SET != SET; then
3514 mandir="$DCC_MANDIR"
3515 else
3516 mandir=/usr/local/man
3517 fi
3518 fi
3519 mandir="$mandir/$mancat"
3520 USE_GROFF='USE_GROFF=no'
3521 if expr "$MAN8" : 'dcc\.0' >/dev/null; then
3522 if groff -Tascii -mtty-char -mdoc </dev/null >/dev/null; then
3523 USE_GROFF='USE_GROFF=yes'
3524 echo "$ac_t""use groff to customize .0 man pages" 1>&6
3525 else
3526 echo "$ac_t""need to but cannot use groff to customize .0 man pages" 1>&6
3527 fi
3528 else
3529 echo "$ac_t""ignore .0 man pages" 1>&6
3530 fi
3531
3532 # Enough systems have idiosyncratic native install programs and we install
3533 # few enough files that it is usually best to use the autoconf script.
3534 # A few systems cannot tolerate the autoconf script.
3535 case "$TARGET_SYS" in
3536 CYGWIN*)
3537 DCCINSTALL=install
3538 ;;
3539 *)
3540 DCCINSTALL='$(DEPTH)/autoconf/install-sh -c'
3541 # some systems do not have UNIX file permissions
3542 cat >> confdefs.h <<\EOF
3543 #define HAVE_PRIVATE_FILES 1
3544 EOF
3545 ;;
3546 esac
3547
3548 SUBDIR_DCCIFD=
3549 if test "$enable_dccifd" != no; then
3550 if test "$HAVE_PTHREADS" = yes; then
3551 SUBDIR_DCCIFD=dccifd
3552 else
3553 echo "warning: *** cannot build dccifd without threads ***" 1>&2
3554 fi
3555 fi
3556 if test -z "$SUBDIR_DCCIFD"; then
3557 SUBDIR_DISABLED="$SUBDIR_DISABLED dccifd"
3558 fi
3559
3560 # disable server for DCC Reputation trials
3561 if test ! -s dccd/dccd.c; then
3562 enable_server=no
3563 fi
3564 # allow varient --disable-dccd
3565 if test "$enable_server" = no -o "$enable_dccd" = no; then
3566 SUBDIR_DCCD=
3567 SUBDIR_SRVRLIB=
3568 SUBDIR_DISABLED="$SUBDIR_DISABLED dccd dbclean dblist srvrlib"
3569 else
3570 SUBDIR_DCCD="dbclean dccd dblist"
3571 SUBDIR_SRVRLIB="srvrlib"
3572 fi
3573
3574 # We have already chosen the sendmail source directory. Here we only
3575 # check that the milter library is present and turn dccm on or off.
3576 SUBDIR_DCCM=
3577 if test "$with_sendmail"SET != noSET -a "$enable_dccm"SET != noSET; then
3578 SUBDIR_DCCM=dccm
3579 if test -n "$SENDMAIL_INC"; then
3580 echo "$ac_t""look for milter headers in $SENDMAIL_INC_DIRS" 1>&6
3581 else
3582 echo "$ac_t""look for milter headers only in common directory" 1>&6
3583 fi
3584 MFAPI=`find $SENDMAIL_INC_DIRS /usr/include \
3585 -type d -name libmilter 2>/dev/null`
3586 if test -n "$MFAPI"; then
3587 MFAPI="`find $MFAPI -name mfapi.h`"
3588 fi
3589 if test -z "$MFAPI"; then
3590 echo "warning: *** cannot build dccm without mfapi.h ***" 1>&2
3591 SUBDIR_DCCM=
3592 fi
3593 echo "$ac_t""look for milter library in $SENDMAIL_OBJ_EVAL" 1>&6
3594 if test ! -d $SENDMAIL_OBJ_EVAL; then
3595 echo "warning: *** cannot build dccm without sendmail libraries in $SENDMAIL_OBJ_EVAL ***" 1>&2
3596 SUBDIR_DCCM=
3597 fi
3598 if test "$HAVE_PTHREADS" != yes; then
3599 echo "warning: *** cannot build dccm without threads ***" 1>&2
3600 SUBDIR_DCCM=
3601 fi
3602 # If dccm has been installed but there is no sendmail library or headers,
3603 # then assume something is recently broken and try to build dccm regardless.
3604 # This prevents bad things like losing a sendmail directory from letting
3605 # a DCC build appear to succeed.
3606 if test -x "$libexecdir/dccm"; then
3607 if test -z "$SUBDIR_DCCM"; then
3608 echo "$ac_t"" *** try to rebuild dccm because it is already installed ***" 1>&6
3609 fi
3610 SUBDIR_DCCM=dccm
3611 fi
3612 fi
3613 if test -z "$SUBDIR_DCCM"; then
3614 SUBDIR_DISABLED="$SUBDIR_DISABLED dccm"
3615 fi
3616 if test -z "$SUBDIR_DCCM$SUBDIR_DCCIFD"; then
3617 SUBDIR_DISABLED="$SUBDIR_DISABLED thrlib"
3618 SUBDIR_THRLIB=
3619 else
3620 SUBDIR_THRLIB="dns-helper thrlib"
3621 fi
3622
3623
3624 # Check whether --with-kludge or --without-kludge was given.
3625 if test "${with_kludge+set}" = set; then
3626 withval="$with_kludge"
3627 :
3628 fi
3629 if test -n "$with_kludge" -a "$with_kludge" != no; then
3630 kludge_h="$with_kludge"
3631 cat >> confdefs.h <<\EOF
3632 #define NEED_KLUDGE_H 1
3633 EOF
3634 else
3635 kludge_h="@kludge_h@"
3636 fi
3637
3638
3639 # Check whether --with-socks or --without-socks was given.
3640 if test "${with_socks+set}" = set; then
3641 withval="$with_socks"
3642 :
3643 fi
3644 if test "$with_socks" = no; then
3645 with_socks=
3646 fi
3647 if test "$ac_cv_lib_socks" != "$with_socks"; then
3648 unset ac_cv_func_Rsendto
3649 fi
3650 ac_cv_lib_socks="$with_socks"
3651 if test "$with_socks" != yes -a -n "$with_socks"; then
3652 if expr "$with_socks" : '.*/.*' >/dev/null; then
3653 LIBS="$LIBS $with_socks"
3654 else
3655 LIBS="$LIBS -l$with_socks"
3656 fi
3657 fi
3658 for ac_func in Rsendto
3659 do
3660 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3661 echo "configure: checking for $ac_func" >&5
3662 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3663 echo $ac_n "(cached) $ac_c" 1>&6
3664 else
3665 cat > conftest.$ac_ext <<EOF
3666 #include "confdefs.h"
3667 /* System header to define __stub macros and hopefully few prototypes,
3668 which can conflict with char $ac_func(); below. */
3669 #include <assert.h>
3670 /* Override any gcc2 internal prototype to avoid an error. */
3671 /* We use char because int might match the return type of a gcc2
3672 builtin and then its argument prototype would still apply. */
3673 char $ac_func();
3674
3675 int main() {
3676
3677 /* The GNU C library defines this for functions which it implements
3678 to always fail with ENOSYS. Some functions are actually named
3679 something starting with __ and the normal name is an alias. */
3680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3681 choke me
3682 #else
3683 $ac_func();
3684 #endif
3685
3686 ; return 0; }
3687 EOF
3688 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3689 rm -rf conftest*
3690 eval "ac_cv_func_$ac_func=yes"
3691 else
3692 echo "configure: failed program was:" >&5
3693 cat conftest.$ac_ext >&5
3694 rm -rf conftest*
3695 eval "ac_cv_func_$ac_func=no"
3696 fi
3697 rm -f conftest*
3698 fi
3699
3700 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3701 echo "$ac_t""yes" 1>&6
3702 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3703 cat >> confdefs.h <<EOF
3704 #define $ac_tr_func 1
3705 EOF
3706
3707 else
3708 echo "$ac_t""no" 1>&6
3709 if test "$with_socks" != yes -a -n "$with_socks"; then
3710 echo "$ac_t"" warning: SOCKS functions including Rsendto() not found in -l$with_socks" 1>&6
3711 unset ac_cv_func_Rsendto
3712 fi
3713 if test "$with_socks" = yes; then
3714 echo "$ac_t"" warning: SOCKS functions including Rsendto() not found" 1>&6
3715 unset ac_cv_func_Rsendto
3716 fi
3717 fi
3718 done
3719
3720
3721 trap '' 1 2 15
3722 cat > confcache <<\EOF
3723 # This file is a shell script that caches the results of configure
3724 # tests run on this system so they can be shared between configure
3725 # scripts and configure runs. It is not useful on other systems.
3726 # If it contains results you don't want to keep, you may remove or edit it.
3727 #
3728 # By default, configure uses ./config.cache as the cache file,
3729 # creating it if it does not exist already. You can give configure
3730 # the --cache-file=FILE option to use a different cache file; that is
3731 # what configure does when it calls configure scripts in
3732 # subdirectories, so they share the cache.
3733 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3734 # config.status only pays attention to the cache file if you give it the
3735 # --recheck option to rerun configure.
3736 #
3737 EOF
3738 # The following way of writing the cache mishandles newlines in values,
3739 # but we know of no workaround that is simple, portable, and efficient.
3740 # So, don't put newlines in cache variables' values.
3741 # Ultrix sh set writes to stderr and can't be redirected directly,
3742 # and sets the high bit in the cache file unless we assign to the vars.
3743 (set) 2>&1 |
3744 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3745 *ac_space=\ *)
3746 # `set' does not quote correctly, so add quotes (double-quote substitution
3747 # turns \\\\ into \\, and sed turns \\ into \).
3748 sed -n \
3749 -e "s/'/'\\\\''/g" \
3750 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3751 ;;
3752 *)
3753 # `set' quotes correctly as required by POSIX, so do not add quotes.
3754 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3755 ;;
3756 esac >> confcache
3757 if cmp -s $cache_file confcache; then
3758 :
3759 else
3760 if test -w $cache_file; then
3761 if test "$silent" != yes; then
3762 echo "updating cache $cache_file"
3763 fi
3764 cat confcache > $cache_file
3765 else
3766 echo "not updating unwritable cache $cache_file"
3767 fi
3768 fi
3769 rm -f confcache
3770
3771 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3772
3773 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3774 # Let make expand exec_prefix.
3775 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3776
3777 # Any assignment to VPATH causes Sun make to only execute
3778 # the first set of double-colon rules, so remove it if not needed.
3779 # If there is a colon in the path, we need to keep it.
3780 if test "x$srcdir" = x.; then
3781 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3782 fi
3783
3784 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3785
3786 DEFS=-DHAVE_CONFIG_H
3787
3788 # Without the "./", some shells look in PATH for config.status.
3789 : ${CONFIG_STATUS=./config.status}
3790
3791 if test "$silent" != yes; then
3792 echo creating $CONFIG_STATUS
3793 fi
3794 rm -f $CONFIG_STATUS
3795 cat > $CONFIG_STATUS <<EOF
3796 #! /bin/sh
3797 # Generated automatically by configure.
3798 # Run this file to recreate the current configuration.
3799 # This directory was configured as follows,
3800 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3801 #
3802 # $0 $ac_configure_args
3803 #
3804 # Compiler output produced by configure, useful for debugging
3805 # configure, is in ./config.log if it exists.
3806
3807 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3808 for ac_option
3809 do
3810 case "\$ac_option" in
3811 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3812 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3813 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3814 -help | --help | --hel | --he | --h)
3815 echo "\$ac_cs_usage"; exit 0 ;;
3816 *) echo "\$ac_cs_usage"; exit 1 ;;
3817 esac
3818 done
3819
3820 ac_given_srcdir=$srcdir
3821
3822 trap 'rm -fr `echo "./Makefile ./Makefile.inc ./Makefile.inc2 ./cdcc/Makefile ./cgi-bin/Makefile ./cgi-bin/chgpasswd ./cgi-bin/common ./cgi-bin/edit-whiteclnt ./cgi-bin/list-log ./cgi-bin/list-msg ./cgi-bin/webuser-notify ./dbclean/Makefile ./dblist/Makefile ./dccd/Makefile ./dccd/dump-clients/Makefile ./dccifd/Makefile ./dccifd/dccif-test/Makefile ./dccifd/dccif.pl ./dcclib/Makefile ./dccm/Makefile ./dccproc/Makefile ./dccsight/Makefile ./dns-helper/Makefile ./gmake.inc ./homedir/Makefile ./homedir/dcc_conf ./include/kludge.h ./misc/Makefile ./misc/cron-dccd ./misc/crontab ./misc/dcc-stats-collect ./misc/dcc-stats-graph ./misc/dcc-stats-init ./misc/dcc.m4 ./misc/fetch-testmsg-whitelist ./misc/fetchblack ./misc/fetchids ./misc/list-clients ./misc/newwebuser ./misc/rcDCC ./misc/start-dccd ./misc/start-dccifd ./misc/start-dccm ./misc/start-grey ./misc/stats-get ./misc/stop-dccd ./misc/uninstalldcc ./misc/updatedcc ./rrd-combine/Makefile ./srvrlib/Makefile ./thrlib/Makefile ./cdcc.8 ./dbclean.8 ./dblist.8 ./dcc.8 ./dccd.8 ./dccifd.8 ./dccm.8 ./dccproc.8 ./dccsight.8 ./FAQ.html ./INSTALL.html ./cdcc.html ./dbclean.html ./dblist.html ./dcc.html ./dccd.html ./dccifd.html ./dccm.html ./dccproc.html ./dccsight.html include/dcc_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3823 EOF
3824 cat >> $CONFIG_STATUS <<EOF
3825
3826 # Protect against being on the right side of a sed subst in config.status.
3827 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3828 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3829 $ac_vpsub
3830 $extrasub
3831 s%@SHELL@%$SHELL%g
3832 s%@CFLAGS@%$CFLAGS%g
3833 s%@CPPFLAGS@%$CPPFLAGS%g
3834 s%@CXXFLAGS@%$CXXFLAGS%g
3835 s%@FFLAGS@%$FFLAGS%g
3836 s%@DEFS@%$DEFS%g
3837 s%@LDFLAGS@%$LDFLAGS%g
3838 s%@LIBS@%$LIBS%g
3839 s%@exec_prefix@%$exec_prefix%g
3840 s%@prefix@%$prefix%g
3841 s%@program_transform_name@%$program_transform_name%g
3842 s%@bindir@%$bindir%g
3843 s%@libexecdir@%$libexecdir%g
3844 s%@mandir@%$mandir%g
3845 s%@UPDATEDCC_PARMS@%$UPDATEDCC_PARMS%g
3846 s%@UPDATEDCC_ENV@%$UPDATEDCC_ENV%g
3847 s%@UPDATEDCC_ENV_SET@%$UPDATEDCC_ENV_SET%g
3848 s%@UPDATEDCC_ENV_EXPORT@%$UPDATEDCC_ENV_EXPORT%g
3849 s%@UPDATEDCC_PFILE@%$UPDATEDCC_PFILE%g
3850 s%@installroot@%$installroot%g
3851 s%@configsuffix@%$configsuffix%g
3852 s%@CC@%$CC%g
3853 s%@DCC_CC@%$DCC_CC%g
3854 s%@RANLIB@%$RANLIB%g
3855 s%@CPP@%$CPP%g
3856 s%@DCC_CFLAGS@%$DCC_CFLAGS%g
3857 s%@DCC_LDFLAGS@%$DCC_LDFLAGS%g
3858 s%@PTHREAD_CFLAGS@%$PTHREAD_CFLAGS%g
3859 s%@PTHREAD_LDFLAGS@%$PTHREAD_LDFLAGS%g
3860 s%@PTHREAD_LIBS@%$PTHREAD_LIBS%g
3861 s%@HAVE_CC_M@%$HAVE_CC_M%g
3862 s%@CWRN1@%$CWRN1%g
3863 s%@CWRN2@%$CWRN2%g
3864 s%@CWRN3@%$CWRN3%g
3865 s%@DCCMAKE@%$DCCMAKE%g
3866 s%@MAKE_INC@%$MAKE_INC%g
3867 s%@MAKE_INC2@%$MAKE_INC2%g
3868 s%@MAKE_PROG@%$MAKE_PROG%g
3869 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
3870 s%@MAKE_LIB@%$MAKE_LIB%g
3871 s%@MAKE_DOT@%$MAKE_DOT%g
3872 s%@DCC_LOGGER@%$DCC_LOGGER%g
3873 s%@DCC_XARGS@%$DCC_XARGS%g
3874 s%@FETCH_CMD@%$FETCH_CMD%g
3875 s%@FETCH_WGET_OPTS@%$FETCH_WGET_OPTS%g
3876 s%@FETCH_CURL_OPTS@%$FETCH_CURL_OPTS%g
3877 s%@PERL@%$PERL%g
3878 s%@NOTIFYMAILER@%$NOTIFYMAILER%g
3879 s%@HTPASSWD@%$HTPASSWD%g
3880 s%@RRDTOOL@%$RRDTOOL%g
3881 s%@DCC_SU@%$DCC_SU%g
3882 s%@NO_SYS_INSTALL@%$NO_SYS_INSTALL%g
3883 s%@NO_SUID@%$NO_SUID%g
3884 s%@DCCSUID@%$DCCSUID%g
3885 s%@DCC_OWN@%$DCC_OWN%g
3886 s%@DCC_GRP@%$DCC_GRP%g
3887 s%@SENDMAIL_LIB@%$SENDMAIL_LIB%g
3888 s%@SENDMAIL_INC@%$SENDMAIL_INC%g
3889 s%@cgibin@%$cgibin%g
3890 s%@dcc_rundir@%$dcc_rundir%g
3891 s%@MAN8@%$MAN8%g
3892 s%@MAN8INST@%$MAN8INST%g
3893 s%@USE_DCCMANINSTALL@%$USE_DCCMANINSTALL%g
3894 s%@USE_GROFF@%$USE_GROFF%g
3895 s%@DCCINSTALL@%$DCCINSTALL%g
3896 s%@SUBDIR_DCCIFD@%$SUBDIR_DCCIFD%g
3897 s%@SUBDIR_DCCD@%$SUBDIR_DCCD%g
3898 s%@SUBDIR_SRVRLIB@%$SUBDIR_SRVRLIB%g
3899 s%@SUBDIR_DCCM@%$SUBDIR_DCCM%g
3900 s%@SUBDIR_THRLIB@%$SUBDIR_THRLIB%g
3901 s%@SUBDIR_DISABLED@%$SUBDIR_DISABLED%g
3902 s%@kludge_h@%$kludge_h%g
3903
3904 CEOF
3905 EOF
3906
3907 cat >> $CONFIG_STATUS <<\EOF
3908
3909 # Split the substitutions into bite-sized pieces for seds with
3910 # small command number limits, like on Digital OSF/1 and HP-UX.
3911 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3912 ac_file=1 # Number of current file.
3913 ac_beg=1 # First line for current file.
3914 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3915 ac_more_lines=:
3916 ac_sed_cmds=""
3917 while $ac_more_lines; do
3918 if test $ac_beg -gt 1; then
3919 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3920 else
3921 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3922 fi
3923 if test ! -s conftest.s$ac_file; then
3924 ac_more_lines=false
3925 rm -f conftest.s$ac_file
3926 else
3927 if test -z "$ac_sed_cmds"; then
3928 ac_sed_cmds="sed -f conftest.s$ac_file"
3929 else
3930 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3931 fi
3932 ac_file=`expr $ac_file + 1`
3933 ac_beg=$ac_end
3934 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3935 fi
3936 done
3937 if test -z "$ac_sed_cmds"; then
3938 ac_sed_cmds=cat
3939 fi
3940 EOF
3941
3942 cat >> $CONFIG_STATUS <<EOF
3943
3944 CONFIG_FILES=\${CONFIG_FILES-"./Makefile ./Makefile.inc ./Makefile.inc2 ./cdcc/Makefile ./cgi-bin/Makefile ./cgi-bin/chgpasswd ./cgi-bin/common ./cgi-bin/edit-whiteclnt ./cgi-bin/list-log ./cgi-bin/list-msg ./cgi-bin/webuser-notify ./dbclean/Makefile ./dblist/Makefile ./dccd/Makefile ./dccd/dump-clients/Makefile ./dccifd/Makefile ./dccifd/dccif-test/Makefile ./dccifd/dccif.pl ./dcclib/Makefile ./dccm/Makefile ./dccproc/Makefile ./dccsight/Makefile ./dns-helper/Makefile ./gmake.inc ./homedir/Makefile ./homedir/dcc_conf ./include/kludge.h ./misc/Makefile ./misc/cron-dccd ./misc/crontab ./misc/dcc-stats-collect ./misc/dcc-stats-graph ./misc/dcc-stats-init ./misc/dcc.m4 ./misc/fetch-testmsg-whitelist ./misc/fetchblack ./misc/fetchids ./misc/list-clients ./misc/newwebuser ./misc/rcDCC ./misc/start-dccd ./misc/start-dccifd ./misc/start-dccm ./misc/start-grey ./misc/stats-get ./misc/stop-dccd ./misc/uninstalldcc ./misc/updatedcc ./rrd-combine/Makefile ./srvrlib/Makefile ./thrlib/Makefile ./cdcc.8 ./dbclean.8 ./dblist.8 ./dcc.8 ./dccd.8 ./dccifd.8 ./dccm.8 ./dccproc.8 ./dccsight.8 ./FAQ.html ./INSTALL.html ./cdcc.html ./dbclean.html ./dblist.html ./dcc.html ./dccd.html ./dccifd.html ./dccm.html ./dccproc.html ./dccsight.html "}
3945 EOF
3946 cat >> $CONFIG_STATUS <<\EOF
3947 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3948 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3949 case "$ac_file" in
3950 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3951 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3952 *) ac_file_in="${ac_file}.in" ;;
3953 esac
3954
3955 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3956
3957 # Remove last slash and all that follows it. Not all systems have dirname.
3958 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3959 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3960 # The file is in a subdirectory.
3961 test ! -d "$ac_dir" && mkdir "$ac_dir"
3962 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3963 # A "../" for each directory in $ac_dir_suffix.
3964 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3965 else
3966 ac_dir_suffix= ac_dots=
3967 fi
3968
3969 case "$ac_given_srcdir" in
3970 .) srcdir=.
3971 if test -z "$ac_dots"; then top_srcdir=.
3972 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3973 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3974 *) # Relative path.
3975 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3976 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3977 esac
3978
3979
3980 echo . | tr -d '\n'
3981 rm -f "$ac_file"
3982 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3983
3984 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3985 sed -e "s%@configure_input@%$configure_input%g
3986 s%@srcdir@%$srcdir%g
3987 s%@top_srcdir@%$top_srcdir%g
3988 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3989 fi; done
3990 rm -f conftest.s*
3991
3992 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3993 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3994 #
3995 # ac_d sets the value in "#define NAME VALUE" lines.
3996 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3997 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3998 ac_dC='\3'
3999 ac_dD='%g'
4000 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4001 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4002 ac_uB='\([ ]\)%\1#\2define\3'
4003 ac_uC=' '
4004 ac_uD='\4%g'
4005 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4006 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4007 ac_eB='$%\1#\2define\3'
4008 ac_eC=' '
4009 ac_eD='%g'
4010
4011 if test "${CONFIG_HEADERS+set}" != set; then
4012 EOF
4013 cat >> $CONFIG_STATUS <<EOF
4014 CONFIG_HEADERS="include/dcc_config.h"
4015 EOF
4016 cat >> $CONFIG_STATUS <<\EOF
4017 fi
4018 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4019 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4020 case "$ac_file" in
4021 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4022 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4023 *) ac_file_in="${ac_file}.in" ;;
4024 esac
4025
4026 echo creating $ac_file
4027
4028 rm -f conftest.frag conftest.in conftest.out
4029 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4030 cat $ac_file_inputs > conftest.in
4031
4032 EOF
4033
4034 # Transform confdefs.h into a sed script conftest.vals that substitutes
4035 # the proper values into config.h.in to produce config.h. And first:
4036 # Protect against being on the right side of a sed subst in config.status.
4037 # Protect against being in an unquoted here document in config.status.
4038 rm -f conftest.vals
4039 cat > conftest.hdr <<\EOF
4040 s/[\\&%]/\\&/g
4041 s%[\\$`]%\\&%g
4042 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4043 s%ac_d%ac_u%gp
4044 s%ac_u%ac_e%gp
4045 EOF
4046 sed -n -f conftest.hdr confdefs.h > conftest.vals
4047 rm -f conftest.hdr
4048
4049 # Break up conftest.vals because some shells have a limit on
4050 # the size of here documents, and old seds have small limits too.
4051
4052 rm -f conftest.tail
4053 while :
4054 do
4055 ac_lines=`grep -c . conftest.vals`
4056 # grep -c gives empty output for an empty file on some AIX systems.
4057 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4058 # Write a limited-size here document to conftest.frag.
4059 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4060 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4061 echo 'CEOF
4062 sed -f conftest.frag conftest.in > conftest.out
4063 rm -f conftest.in
4064 mv conftest.out conftest.in
4065 ' >> $CONFIG_STATUS
4066 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4067 rm -f conftest.vals
4068 mv conftest.tail conftest.vals
4069 done
4070 rm -f conftest.vals
4071
4072 cat >> $CONFIG_STATUS <<\EOF
4073 rm -f conftest.frag conftest.h
4074 sed -e "s%@configure_input@%Generated automatically by configure%g" conftest.in >conftest.h
4075 rm -f conftest.in
4076 if cmp -s $ac_file conftest.h 2>/dev/null; then
4077 echo "$ac_file is unchanged"
4078 rm -f conftest.h
4079 else
4080 # Remove last slash and all that follows it. Not all systems have dirname.
4081 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4082 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4083 # The file is in a subdirectory.
4084 test ! -d "$ac_dir" && mkdir "$ac_dir"
4085 fi
4086 rm -f $ac_file
4087 mv conftest.h $ac_file
4088 fi
4089 fi; done
4090
4091 EOF
4092 cat >> $CONFIG_STATUS <<EOF
4093
4094 EOF
4095 cat >> $CONFIG_STATUS <<\EOF
4096
4097 exit 0
4098 EOF
4099 chmod +x $CONFIG_STATUS
4100 rm -fr confdefs* $ac_clean_files
4101 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4102
4103
4104
4105
4106
4107
4108
4109 sed -e 's@\(HREF="[^"]*\)\.in">@\1">@' INSTALL.html > INSTALL.html$$
4110 /bin/rm -f INSTALL.html; mv INSTALL.html$$ INSTALL.html
4111
4112
4113 sed -e 's@\(HREF="[^"]*\)\.in">@\1">@' FAQ.html > FAQ.html$$
4114 /bin/rm -f FAQ.html; mv FAQ.html$$ FAQ.html
4115
4116
4117