check for liblber separately
[nivanova/samba-autobuild/.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug          turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-developer      turn on developer warnings and debugging [default=no]"
19 ac_help="$ac_help
20   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
21 ac_help="$ac_help
22   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
23 ac_help="$ac_help
24   --with-smbwrapper       Include SMB wrapper support (default=no) "
25 ac_help="$ac_help
26   --with-afs              Include AFS clear-text auth support (default=no) "
27 ac_help="$ac_help
28   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
29 ac_help="$ac_help
30   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
31 ac_help="$ac_help
32   --with-automount        Include AUTOMOUNT support (default=no)"
33 ac_help="$ac_help
34   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
35 ac_help="$ac_help
36   --with-pam              Include PAM support (default=no)"
37 ac_help="$ac_help
38   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
39 ac_help="$ac_help
40   --with-tdbsam           Include experimental TDB SAM support (default=no)"
41 ac_help="$ac_help
42   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
43 ac_help="$ac_help
44   --with-nisplussam       Include NISPLUS SAM support (default=no)"
45 ac_help="$ac_help
46   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
47 ac_help="$ac_help
48   --with-ssl              Include SSL support (default=no)
49   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
50   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
51 ac_help="$ac_help
52   --with-syslog           Include experimental SYSLOG support (default=no)"
53 ac_help="$ac_help
54   --with-profiling-data   Include gathering source code profile information (default=no)"
55 ac_help="$ac_help
56   --with-quotas           Include experimental disk-quota support (default=no)"
57 ac_help="$ac_help
58   --with-utmp             Include experimental utmp accounting (default=no)"
59 ac_help="$ac_help
60   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
61 ac_help="$ac_help
62   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
63 ac_help="$ac_help
64   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
65 ac_help="$ac_help
66   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
67 ac_help="$ac_help
68   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
69 ac_help="$ac_help
70   --with-acl-support      Include ACL support (default=no)"
71 ac_help="$ac_help
72   --with-winbind          Build winbind (default, if supported by OS)"
73 ac_help="$ac_help
74   --with-included-popt    use bundled popt library, not from system"
75
76 # Initialize some variables set by options.
77 # The variables have the same names as the options, with
78 # dashes changed to underlines.
79 build=NONE
80 cache_file=./config.cache
81 exec_prefix=NONE
82 host=NONE
83 no_create=
84 nonopt=NONE
85 no_recursion=
86 prefix=NONE
87 program_prefix=NONE
88 program_suffix=NONE
89 program_transform_name=s,x,x,
90 silent=
91 site=
92 srcdir=
93 target=NONE
94 verbose=
95 x_includes=NONE
96 x_libraries=NONE
97 bindir='${exec_prefix}/bin'
98 sbindir='${exec_prefix}/sbin'
99 libexecdir='${exec_prefix}/libexec'
100 datadir='${prefix}/share'
101 sysconfdir='${prefix}/etc'
102 sharedstatedir='${prefix}/com'
103 localstatedir='${prefix}/var'
104 libdir='${exec_prefix}/lib'
105 includedir='${prefix}/include'
106 oldincludedir='/usr/include'
107 infodir='${prefix}/info'
108 mandir='${prefix}/man'
109
110 # Initialize some other variables.
111 subdirs=
112 MFLAGS= MAKEFLAGS=
113 SHELL=${CONFIG_SHELL-/bin/sh}
114 # Maximum number of lines to put in a shell here document.
115 ac_max_here_lines=12
116
117 ac_prev=
118 for ac_option
119 do
120
121   # If the previous option needs an argument, assign it.
122   if test -n "$ac_prev"; then
123     eval "$ac_prev=\$ac_option"
124     ac_prev=
125     continue
126   fi
127
128   case "$ac_option" in
129   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
130   *) ac_optarg= ;;
131   esac
132
133   # Accept the important Cygnus configure options, so we can diagnose typos.
134
135   case "$ac_option" in
136
137   -bindir | --bindir | --bindi | --bind | --bin | --bi)
138     ac_prev=bindir ;;
139   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
140     bindir="$ac_optarg" ;;
141
142   -build | --build | --buil | --bui | --bu)
143     ac_prev=build ;;
144   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
145     build="$ac_optarg" ;;
146
147   -cache-file | --cache-file | --cache-fil | --cache-fi \
148   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
149     ac_prev=cache_file ;;
150   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
151   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
152     cache_file="$ac_optarg" ;;
153
154   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
155     ac_prev=datadir ;;
156   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
157   | --da=*)
158     datadir="$ac_optarg" ;;
159
160   -disable-* | --disable-*)
161     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
162     # Reject names that are not valid shell variable names.
163     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
164       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165     fi
166     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167     eval "enable_${ac_feature}=no" ;;
168
169   -enable-* | --enable-*)
170     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
171     # Reject names that are not valid shell variable names.
172     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
173       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
174     fi
175     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
176     case "$ac_option" in
177       *=*) ;;
178       *) ac_optarg=yes ;;
179     esac
180     eval "enable_${ac_feature}='$ac_optarg'" ;;
181
182   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
183   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
184   | --exec | --exe | --ex)
185     ac_prev=exec_prefix ;;
186   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
187   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
188   | --exec=* | --exe=* | --ex=*)
189     exec_prefix="$ac_optarg" ;;
190
191   -gas | --gas | --ga | --g)
192     # Obsolete; use --with-gas.
193     with_gas=yes ;;
194
195   -help | --help | --hel | --he)
196     # Omit some internal or obsolete options to make the list less imposing.
197     # This message is too long to be a string in the A/UX 3.1 sh.
198     cat << EOF
199 Usage: configure [options] [host]
200 Options: [defaults in brackets after descriptions]
201 Configuration:
202   --cache-file=FILE       cache test results in FILE
203   --help                  print this message
204   --no-create             do not create output files
205   --quiet, --silent       do not print \`checking...' messages
206   --version               print the version of autoconf that created configure
207 Directory and file names:
208   --prefix=PREFIX         install architecture-independent files in PREFIX
209                           [$ac_default_prefix]
210   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
211                           [same as prefix]
212   --bindir=DIR            user executables in DIR [EPREFIX/bin]
213   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
214   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
215   --datadir=DIR           read-only architecture-independent data in DIR
216                           [PREFIX/share]
217   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
218   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
219                           [PREFIX/com]
220   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
221   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
222   --includedir=DIR        C header files in DIR [PREFIX/include]
223   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
224   --infodir=DIR           info documentation in DIR [PREFIX/info]
225   --mandir=DIR            man documentation in DIR [PREFIX/man]
226   --srcdir=DIR            find the sources in DIR [configure dir or ..]
227   --program-prefix=PREFIX prepend PREFIX to installed program names
228   --program-suffix=SUFFIX append SUFFIX to installed program names
229   --program-transform-name=PROGRAM
230                           run sed PROGRAM on installed program names
231 EOF
232     cat << EOF
233 Host type:
234   --build=BUILD           configure for building on BUILD [BUILD=HOST]
235   --host=HOST             configure for HOST [guessed]
236   --target=TARGET         configure for TARGET [TARGET=HOST]
237 Features and packages:
238   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
239   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
240   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
241   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
242   --x-includes=DIR        X include files are in DIR
243   --x-libraries=DIR       X library files are in DIR
244 EOF
245     if test -n "$ac_help"; then
246       echo "--enable and --with options recognized:$ac_help"
247     fi
248     exit 0 ;;
249
250   -host | --host | --hos | --ho)
251     ac_prev=host ;;
252   -host=* | --host=* | --hos=* | --ho=*)
253     host="$ac_optarg" ;;
254
255   -includedir | --includedir | --includedi | --included | --include \
256   | --includ | --inclu | --incl | --inc)
257     ac_prev=includedir ;;
258   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
259   | --includ=* | --inclu=* | --incl=* | --inc=*)
260     includedir="$ac_optarg" ;;
261
262   -infodir | --infodir | --infodi | --infod | --info | --inf)
263     ac_prev=infodir ;;
264   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
265     infodir="$ac_optarg" ;;
266
267   -libdir | --libdir | --libdi | --libd)
268     ac_prev=libdir ;;
269   -libdir=* | --libdir=* | --libdi=* | --libd=*)
270     libdir="$ac_optarg" ;;
271
272   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
273   | --libexe | --libex | --libe)
274     ac_prev=libexecdir ;;
275   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
276   | --libexe=* | --libex=* | --libe=*)
277     libexecdir="$ac_optarg" ;;
278
279   -localstatedir | --localstatedir | --localstatedi | --localstated \
280   | --localstate | --localstat | --localsta | --localst \
281   | --locals | --local | --loca | --loc | --lo)
282     ac_prev=localstatedir ;;
283   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
284   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
285   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
286     localstatedir="$ac_optarg" ;;
287
288   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
289     ac_prev=mandir ;;
290   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
291     mandir="$ac_optarg" ;;
292
293   -nfp | --nfp | --nf)
294     # Obsolete; use --without-fp.
295     with_fp=no ;;
296
297   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
298   | --no-cr | --no-c)
299     no_create=yes ;;
300
301   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
302   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
303     no_recursion=yes ;;
304
305   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
306   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
307   | --oldin | --oldi | --old | --ol | --o)
308     ac_prev=oldincludedir ;;
309   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
310   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
311   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
312     oldincludedir="$ac_optarg" ;;
313
314   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
315     ac_prev=prefix ;;
316   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
317     prefix="$ac_optarg" ;;
318
319   -program-prefix | --program-prefix | --program-prefi | --program-pref \
320   | --program-pre | --program-pr | --program-p)
321     ac_prev=program_prefix ;;
322   -program-prefix=* | --program-prefix=* | --program-prefi=* \
323   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
324     program_prefix="$ac_optarg" ;;
325
326   -program-suffix | --program-suffix | --program-suffi | --program-suff \
327   | --program-suf | --program-su | --program-s)
328     ac_prev=program_suffix ;;
329   -program-suffix=* | --program-suffix=* | --program-suffi=* \
330   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
331     program_suffix="$ac_optarg" ;;
332
333   -program-transform-name | --program-transform-name \
334   | --program-transform-nam | --program-transform-na \
335   | --program-transform-n | --program-transform- \
336   | --program-transform | --program-transfor \
337   | --program-transfo | --program-transf \
338   | --program-trans | --program-tran \
339   | --progr-tra | --program-tr | --program-t)
340     ac_prev=program_transform_name ;;
341   -program-transform-name=* | --program-transform-name=* \
342   | --program-transform-nam=* | --program-transform-na=* \
343   | --program-transform-n=* | --program-transform-=* \
344   | --program-transform=* | --program-transfor=* \
345   | --program-transfo=* | --program-transf=* \
346   | --program-trans=* | --program-tran=* \
347   | --progr-tra=* | --program-tr=* | --program-t=*)
348     program_transform_name="$ac_optarg" ;;
349
350   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
351   | -silent | --silent | --silen | --sile | --sil)
352     silent=yes ;;
353
354   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
355     ac_prev=sbindir ;;
356   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
357   | --sbi=* | --sb=*)
358     sbindir="$ac_optarg" ;;
359
360   -sharedstatedir | --sharedstatedir | --sharedstatedi \
361   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
362   | --sharedst | --shareds | --shared | --share | --shar \
363   | --sha | --sh)
364     ac_prev=sharedstatedir ;;
365   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
366   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
367   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
368   | --sha=* | --sh=*)
369     sharedstatedir="$ac_optarg" ;;
370
371   -site | --site | --sit)
372     ac_prev=site ;;
373   -site=* | --site=* | --sit=*)
374     site="$ac_optarg" ;;
375
376   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
377     ac_prev=srcdir ;;
378   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
379     srcdir="$ac_optarg" ;;
380
381   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
382   | --syscon | --sysco | --sysc | --sys | --sy)
383     ac_prev=sysconfdir ;;
384   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
385   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
386     sysconfdir="$ac_optarg" ;;
387
388   -target | --target | --targe | --targ | --tar | --ta | --t)
389     ac_prev=target ;;
390   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
391     target="$ac_optarg" ;;
392
393   -v | -verbose | --verbose | --verbos | --verbo | --verb)
394     verbose=yes ;;
395
396   -version | --version | --versio | --versi | --vers)
397     echo "configure generated by autoconf version 2.13"
398     exit 0 ;;
399
400   -with-* | --with-*)
401     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
402     # Reject names that are not valid shell variable names.
403     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
404       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405     fi
406     ac_package=`echo $ac_package| sed 's/-/_/g'`
407     case "$ac_option" in
408       *=*) ;;
409       *) ac_optarg=yes ;;
410     esac
411     eval "with_${ac_package}='$ac_optarg'" ;;
412
413   -without-* | --without-*)
414     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
417       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
418     fi
419     ac_package=`echo $ac_package| sed 's/-/_/g'`
420     eval "with_${ac_package}=no" ;;
421
422   --x)
423     # Obsolete; use --with-x.
424     with_x=yes ;;
425
426   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
427   | --x-incl | --x-inc | --x-in | --x-i)
428     ac_prev=x_includes ;;
429   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
430   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
431     x_includes="$ac_optarg" ;;
432
433   -x-libraries | --x-libraries | --x-librarie | --x-librari \
434   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
435     ac_prev=x_libraries ;;
436   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
437   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
438     x_libraries="$ac_optarg" ;;
439
440   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
441     ;;
442
443   *)
444     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
445       echo "configure: warning: $ac_option: invalid host type" 1>&2
446     fi
447     if test "x$nonopt" != xNONE; then
448       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
449     fi
450     nonopt="$ac_option"
451     ;;
452
453   esac
454 done
455
456 if test -n "$ac_prev"; then
457   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
458 fi
459
460 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
461
462 # File descriptor usage:
463 # 0 standard input
464 # 1 file creation
465 # 2 errors and warnings
466 # 3 some systems may open it to /dev/tty
467 # 4 used on the Kubota Titan
468 # 6 checking for... messages and results
469 # 5 compiler messages saved in config.log
470 if test "$silent" = yes; then
471   exec 6>/dev/null
472 else
473   exec 6>&1
474 fi
475 exec 5>./config.log
476
477 echo "\
478 This file contains any messages produced by compilers while
479 running configure, to aid debugging if configure makes a mistake.
480 " 1>&5
481
482 # Strip out --no-create and --no-recursion so they do not pile up.
483 # Also quote any args containing shell metacharacters.
484 ac_configure_args=
485 for ac_arg
486 do
487   case "$ac_arg" in
488   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
489   | --no-cr | --no-c) ;;
490   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
491   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
492   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
493   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
494   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
495   esac
496 done
497
498 # NLS nuisances.
499 # Only set these to C if already set.  These must not be set unconditionally
500 # because not all systems understand e.g. LANG=C (notably SCO).
501 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
502 # Non-C LC_CTYPE values break the ctype check.
503 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
504 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
505 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
506 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
507
508 # confdefs.h avoids OS command line length limits that DEFS can exceed.
509 rm -rf conftest* confdefs.h
510 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
511 echo > confdefs.h
512
513 # A filename unique to this package, relative to the directory that
514 # configure is in, which we can look for to find out if srcdir is correct.
515 ac_unique_file=include/includes.h
516
517 # Find the source files, if location was not specified.
518 if test -z "$srcdir"; then
519   ac_srcdir_defaulted=yes
520   # Try the directory containing this script, then its parent.
521   ac_prog=$0
522   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
523   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
524   srcdir=$ac_confdir
525   if test ! -r $srcdir/$ac_unique_file; then
526     srcdir=..
527   fi
528 else
529   ac_srcdir_defaulted=no
530 fi
531 if test ! -r $srcdir/$ac_unique_file; then
532   if test "$ac_srcdir_defaulted" = yes; then
533     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
534   else
535     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
536   fi
537 fi
538 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
539
540 # Prefer explicitly selected file to automatically selected ones.
541 if test -z "$CONFIG_SITE"; then
542   if test "x$prefix" != xNONE; then
543     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
544   else
545     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
546   fi
547 fi
548 for ac_site_file in $CONFIG_SITE; do
549   if test -r "$ac_site_file"; then
550     echo "loading site script $ac_site_file"
551     . "$ac_site_file"
552   fi
553 done
554
555 if test -r "$cache_file"; then
556   echo "loading cache $cache_file"
557   . $cache_file
558 else
559   echo "creating cache $cache_file"
560   > $cache_file
561 fi
562
563 ac_ext=c
564 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
565 ac_cpp='$CPP $CPPFLAGS'
566 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
567 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
568 cross_compiling=$ac_cv_prog_cc_cross
569
570 ac_exeext=
571 ac_objext=o
572 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
573   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
574   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
575     ac_n= ac_c='
576 ' ac_t='        '
577   else
578     ac_n=-n ac_c= ac_t=
579   fi
580 else
581   ac_n= ac_c='\c' ac_t=
582 fi
583
584
585
586 # we want to be compatibe with older versions of Samba
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604 # compile with optimisation and without debugging by default
605 CFLAGS="-O ${CFLAGS}"
606
607 # Check whether --enable-debug or --disable-debug was given.
608 if test "${enable_debug+set}" = set; then
609   enableval="$enable_debug"
610   if eval "test x$enable_debug = xyes"; then
611         CFLAGS="${CFLAGS} -g"
612     fi
613 fi
614
615
616 # Check whether --enable-developer or --disable-developer was given.
617 if test "${enable_developer+set}" = set; then
618   enableval="$enable_developer"
619   if eval "test x$enable_developer = xyes"; then
620         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
621     fi
622 fi
623
624
625 # Extract the first word of "gcc", so it can be a program name with args.
626 set dummy gcc; ac_word=$2
627 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
628 echo "configure:629: checking for $ac_word" >&5
629 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
630   echo $ac_n "(cached) $ac_c" 1>&6
631 else
632   if test -n "$CC"; then
633   ac_cv_prog_CC="$CC" # Let the user override the test.
634 else
635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
636   ac_dummy="$PATH"
637   for ac_dir in $ac_dummy; do
638     test -z "$ac_dir" && ac_dir=.
639     if test -f $ac_dir/$ac_word; then
640       ac_cv_prog_CC="gcc"
641       break
642     fi
643   done
644   IFS="$ac_save_ifs"
645 fi
646 fi
647 CC="$ac_cv_prog_CC"
648 if test -n "$CC"; then
649   echo "$ac_t""$CC" 1>&6
650 else
651   echo "$ac_t""no" 1>&6
652 fi
653
654 if test -z "$CC"; then
655   # Extract the first word of "cc", so it can be a program name with args.
656 set dummy cc; ac_word=$2
657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
658 echo "configure:659: checking for $ac_word" >&5
659 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
660   echo $ac_n "(cached) $ac_c" 1>&6
661 else
662   if test -n "$CC"; then
663   ac_cv_prog_CC="$CC" # Let the user override the test.
664 else
665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
666   ac_prog_rejected=no
667   ac_dummy="$PATH"
668   for ac_dir in $ac_dummy; do
669     test -z "$ac_dir" && ac_dir=.
670     if test -f $ac_dir/$ac_word; then
671       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
672         ac_prog_rejected=yes
673         continue
674       fi
675       ac_cv_prog_CC="cc"
676       break
677     fi
678   done
679   IFS="$ac_save_ifs"
680 if test $ac_prog_rejected = yes; then
681   # We found a bogon in the path, so make sure we never use it.
682   set dummy $ac_cv_prog_CC
683   shift
684   if test $# -gt 0; then
685     # We chose a different compiler from the bogus one.
686     # However, it has the same basename, so the bogon will be chosen
687     # first if we set CC to just the basename; use the full file name.
688     shift
689     set dummy "$ac_dir/$ac_word" "$@"
690     shift
691     ac_cv_prog_CC="$@"
692   fi
693 fi
694 fi
695 fi
696 CC="$ac_cv_prog_CC"
697 if test -n "$CC"; then
698   echo "$ac_t""$CC" 1>&6
699 else
700   echo "$ac_t""no" 1>&6
701 fi
702
703   if test -z "$CC"; then
704     case "`uname -s`" in
705     *win32* | *WIN32*)
706       # Extract the first word of "cl", so it can be a program name with args.
707 set dummy cl; ac_word=$2
708 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
709 echo "configure:710: checking for $ac_word" >&5
710 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
711   echo $ac_n "(cached) $ac_c" 1>&6
712 else
713   if test -n "$CC"; then
714   ac_cv_prog_CC="$CC" # Let the user override the test.
715 else
716   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
717   ac_dummy="$PATH"
718   for ac_dir in $ac_dummy; do
719     test -z "$ac_dir" && ac_dir=.
720     if test -f $ac_dir/$ac_word; then
721       ac_cv_prog_CC="cl"
722       break
723     fi
724   done
725   IFS="$ac_save_ifs"
726 fi
727 fi
728 CC="$ac_cv_prog_CC"
729 if test -n "$CC"; then
730   echo "$ac_t""$CC" 1>&6
731 else
732   echo "$ac_t""no" 1>&6
733 fi
734  ;;
735     esac
736   fi
737   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
738 fi
739
740 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
741 echo "configure:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
742
743 ac_ext=c
744 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
745 ac_cpp='$CPP $CPPFLAGS'
746 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
747 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
748 cross_compiling=$ac_cv_prog_cc_cross
749
750 cat > conftest.$ac_ext << EOF
751
752 #line 753 "configure"
753 #include "confdefs.h"
754
755 main(){return(0);}
756 EOF
757 if { (eval echo configure:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
758   ac_cv_prog_cc_works=yes
759   # If we can't run a trivial program, we are probably using a cross compiler.
760   if (./conftest; exit) 2>/dev/null; then
761     ac_cv_prog_cc_cross=no
762   else
763     ac_cv_prog_cc_cross=yes
764   fi
765 else
766   echo "configure: failed program was:" >&5
767   cat conftest.$ac_ext >&5
768   ac_cv_prog_cc_works=no
769 fi
770 rm -fr conftest*
771 ac_ext=c
772 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
773 ac_cpp='$CPP $CPPFLAGS'
774 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
775 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
776 cross_compiling=$ac_cv_prog_cc_cross
777
778 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
779 if test $ac_cv_prog_cc_works = no; then
780   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
781 fi
782 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
783 echo "configure:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
784 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
785 cross_compiling=$ac_cv_prog_cc_cross
786
787 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
788 echo "configure:789: checking whether we are using GNU C" >&5
789 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
790   echo $ac_n "(cached) $ac_c" 1>&6
791 else
792   cat > conftest.c <<EOF
793 #ifdef __GNUC__
794   yes;
795 #endif
796 EOF
797 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
798   ac_cv_prog_gcc=yes
799 else
800   ac_cv_prog_gcc=no
801 fi
802 fi
803
804 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
805
806 if test $ac_cv_prog_gcc = yes; then
807   GCC=yes
808 else
809   GCC=
810 fi
811
812 ac_test_CFLAGS="${CFLAGS+set}"
813 ac_save_CFLAGS="$CFLAGS"
814 CFLAGS=
815 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
816 echo "configure:817: checking whether ${CC-cc} accepts -g" >&5
817 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
818   echo $ac_n "(cached) $ac_c" 1>&6
819 else
820   echo 'void f(){}' > conftest.c
821 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
822   ac_cv_prog_cc_g=yes
823 else
824   ac_cv_prog_cc_g=no
825 fi
826 rm -f conftest*
827
828 fi
829
830 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
831 if test "$ac_test_CFLAGS" = set; then
832   CFLAGS="$ac_save_CFLAGS"
833 elif test $ac_cv_prog_cc_g = yes; then
834   if test "$GCC" = yes; then
835     CFLAGS="-g -O2"
836   else
837     CFLAGS="-g"
838   fi
839 else
840   if test "$GCC" = yes; then
841     CFLAGS="-O2"
842   else
843     CFLAGS=
844   fi
845 fi
846
847 ac_aux_dir=
848 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
849   if test -f $ac_dir/install-sh; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/install-sh -c"
852     break
853   elif test -f $ac_dir/install.sh; then
854     ac_aux_dir=$ac_dir
855     ac_install_sh="$ac_aux_dir/install.sh -c"
856     break
857   fi
858 done
859 if test -z "$ac_aux_dir"; then
860   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
861 fi
862 ac_config_guess=$ac_aux_dir/config.guess
863 ac_config_sub=$ac_aux_dir/config.sub
864 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
865
866 # Find a good install program.  We prefer a C program (faster),
867 # so one script is as good as another.  But avoid the broken or
868 # incompatible versions:
869 # SysV /etc/install, /usr/sbin/install
870 # SunOS /usr/etc/install
871 # IRIX /sbin/install
872 # AIX /bin/install
873 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
874 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
875 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
876 # ./install, which can be erroneously created by make from ./install.sh.
877 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
878 echo "configure:879: checking for a BSD compatible install" >&5
879 if test -z "$INSTALL"; then
880 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
881   echo $ac_n "(cached) $ac_c" 1>&6
882 else
883     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
884   for ac_dir in $PATH; do
885     # Account for people who put trailing slashes in PATH elements.
886     case "$ac_dir/" in
887     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
888     *)
889       # OSF1 and SCO ODT 3.0 have their own names for install.
890       # Don't use installbsd from OSF since it installs stuff as root
891       # by default.
892       for ac_prog in ginstall scoinst install; do
893         if test -f $ac_dir/$ac_prog; then
894           if test $ac_prog = install &&
895             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
896             # AIX install.  It has an incompatible calling convention.
897             :
898           else
899             ac_cv_path_install="$ac_dir/$ac_prog -c"
900             break 2
901           fi
902         fi
903       done
904       ;;
905     esac
906   done
907   IFS="$ac_save_IFS"
908
909 fi
910   if test "${ac_cv_path_install+set}" = set; then
911     INSTALL="$ac_cv_path_install"
912   else
913     # As a last resort, use the slow shell script.  We don't cache a
914     # path for INSTALL within a source directory, because that will
915     # break other packages using the cache if that directory is
916     # removed, or if the path is relative.
917     INSTALL="$ac_install_sh"
918   fi
919 fi
920 echo "$ac_t""$INSTALL" 1>&6
921
922 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
923 # It thinks the first close brace ends the variable substitution.
924 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
925
926 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
927
928 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
929
930 for ac_prog in mawk gawk nawk awk
931 do
932 # Extract the first word of "$ac_prog", so it can be a program name with args.
933 set dummy $ac_prog; ac_word=$2
934 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
935 echo "configure:936: checking for $ac_word" >&5
936 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
937   echo $ac_n "(cached) $ac_c" 1>&6
938 else
939   if test -n "$AWK"; then
940   ac_cv_prog_AWK="$AWK" # Let the user override the test.
941 else
942   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
943   ac_dummy="$PATH"
944   for ac_dir in $ac_dummy; do
945     test -z "$ac_dir" && ac_dir=.
946     if test -f $ac_dir/$ac_word; then
947       ac_cv_prog_AWK="$ac_prog"
948       break
949     fi
950   done
951   IFS="$ac_save_ifs"
952 fi
953 fi
954 AWK="$ac_cv_prog_AWK"
955 if test -n "$AWK"; then
956   echo "$ac_t""$AWK" 1>&6
957 else
958   echo "$ac_t""no" 1>&6
959 fi
960
961 test -n "$AWK" && break
962 done
963
964
965 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
966 echo "configure:967: checking for POSIXized ISC" >&5
967 if test -d /etc/conf/kconfig.d &&
968   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
969 then
970   echo "$ac_t""yes" 1>&6
971   ISC=yes # If later tests want to check for ISC.
972   cat >> confdefs.h <<\EOF
973 #define _POSIX_SOURCE 1
974 EOF
975
976   if test "$GCC" = yes; then
977     CC="$CC -posix"
978   else
979     CC="$CC -Xp"
980   fi
981 else
982   echo "$ac_t""no" 1>&6
983   ISC=
984 fi
985
986
987 if test "x$CC" != xcc; then
988   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
989 echo "configure:990: checking whether $CC and cc understand -c and -o together" >&5
990 else
991   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
992 echo "configure:993: checking whether cc understands -c and -o together" >&5
993 fi
994 set dummy $CC; ac_cc="`echo $2 |
995                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
996 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
997   echo $ac_n "(cached) $ac_c" 1>&6
998 else
999   echo 'foo(){}' > conftest.c
1000 # Make sure it works both with $CC and with simple cc.
1001 # We do the test twice because some compilers refuse to overwrite an
1002 # existing .o file with -o, though they will create one.
1003 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1004 if { (eval echo configure:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1005    test -f conftest.o && { (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1006 then
1007   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1008   if test "x$CC" != xcc; then
1009     # Test first that cc exists at all.
1010     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1011       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1012       if { (eval echo configure:1013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1013          test -f conftest.o && { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1014       then
1015         # cc works too.
1016         :
1017       else
1018         # cc exists but doesn't like -o.
1019         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1020       fi
1021     fi
1022   fi
1023 else
1024   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1025 fi
1026 rm -f conftest*
1027
1028 fi
1029 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1030   echo "$ac_t""yes" 1>&6
1031 else
1032   echo "$ac_t""no" 1>&6
1033   cat >> confdefs.h <<\EOF
1034 #define NO_MINUS_C_MINUS_O 1
1035 EOF
1036
1037 fi
1038
1039 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1040       BROKEN_CC=
1041 else
1042       BROKEN_CC=#
1043 fi
1044
1045
1046 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1047 echo "configure:1048: checking that the C compiler understands volatile" >&5
1048 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1049   echo $ac_n "(cached) $ac_c" 1>&6
1050 else
1051   
1052     cat > conftest.$ac_ext <<EOF
1053 #line 1054 "configure"
1054 #include "confdefs.h"
1055 #include <sys/types.h>
1056 int main() {
1057 volatile int i = 0
1058 ; return 0; }
1059 EOF
1060 if { (eval echo configure:1061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1061   rm -rf conftest*
1062   samba_cv_volatile=yes
1063 else
1064   echo "configure: failed program was:" >&5
1065   cat conftest.$ac_ext >&5
1066   rm -rf conftest*
1067   samba_cv_volatile=no
1068 fi
1069 rm -f conftest*
1070 fi
1071
1072 echo "$ac_t""$samba_cv_volatile" 1>&6
1073 if test x"$samba_cv_volatile" = x"yes"; then
1074    cat >> confdefs.h <<\EOF
1075 #define HAVE_VOLATILE 1
1076 EOF
1077
1078 fi
1079
1080
1081
1082 # Do some error checking and defaulting for the host and target type.
1083 # The inputs are:
1084 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1085 #
1086 # The rules are:
1087 # 1. You are not allowed to specify --host, --target, and nonopt at the
1088 #    same time.
1089 # 2. Host defaults to nonopt.
1090 # 3. If nonopt is not specified, then host defaults to the current host,
1091 #    as determined by config.guess.
1092 # 4. Target and build default to nonopt.
1093 # 5. If nonopt is not specified, then target and build default to host.
1094
1095 # The aliases save the names the user supplied, while $host etc.
1096 # will get canonicalized.
1097 case $host---$target---$nonopt in
1098 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1099 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1100 esac
1101
1102
1103 # Make sure we can run config.sub.
1104 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1105 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1106 fi
1107
1108 echo $ac_n "checking host system type""... $ac_c" 1>&6
1109 echo "configure:1110: checking host system type" >&5
1110
1111 host_alias=$host
1112 case "$host_alias" in
1113 NONE)
1114   case $nonopt in
1115   NONE)
1116     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1117     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1118     fi ;;
1119   *) host_alias=$nonopt ;;
1120   esac ;;
1121 esac
1122
1123 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1124 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1125 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1126 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1127 echo "$ac_t""$host" 1>&6
1128
1129 echo $ac_n "checking target system type""... $ac_c" 1>&6
1130 echo "configure:1131: checking target system type" >&5
1131
1132 target_alias=$target
1133 case "$target_alias" in
1134 NONE)
1135   case $nonopt in
1136   NONE) target_alias=$host_alias ;;
1137   *) target_alias=$nonopt ;;
1138   esac ;;
1139 esac
1140
1141 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1142 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1143 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1144 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1145 echo "$ac_t""$target" 1>&6
1146
1147 echo $ac_n "checking build system type""... $ac_c" 1>&6
1148 echo "configure:1149: checking build system type" >&5
1149
1150 build_alias=$build
1151 case "$build_alias" in
1152 NONE)
1153   case $nonopt in
1154   NONE) build_alias=$host_alias ;;
1155   *) build_alias=$nonopt ;;
1156   esac ;;
1157 esac
1158
1159 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1160 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1161 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1162 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 echo "$ac_t""$build" 1>&6
1164
1165 test "$host_alias" != "$target_alias" &&
1166   test "$program_prefix$program_suffix$program_transform_name" = \
1167     NONENONEs,x,x, &&
1168   program_prefix=${target_alias}-
1169
1170
1171   case "$host_os" in
1172         *irix6*) cat >> confdefs.h <<\EOF
1173 #include <standards.h>
1174 EOF
1175
1176         ;;
1177 esac
1178
1179
1180     
1181     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1182 echo "configure:1183: checking config.cache system type" >&5
1183     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1184          test x"$ac_cv_host_system_type" != x"$host"; } ||
1185        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1186          test x"$ac_cv_build_system_type" != x"$build"; } ||
1187        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1188          test x"$ac_cv_target_system_type" != x"$target"; }; then
1189         echo "$ac_t""different" 1>&6
1190         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1191     else
1192         echo "$ac_t""same" 1>&6
1193     fi
1194     ac_cv_host_system_type="$host"
1195     ac_cv_build_system_type="$build"
1196     ac_cv_target_system_type="$target"
1197
1198
1199 #
1200 # Config CPPFLAG settings for strange OS's that must be set
1201 # before other tests.
1202 #
1203 case "$host_os" in
1204 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1205     *hpux*)
1206       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1207 echo "configure:1208: checking whether ${CC-cc} accepts -Ae" >&5
1208 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1209   echo $ac_n "(cached) $ac_c" 1>&6
1210 else
1211   echo 'void f(){}' > conftest.c
1212 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1213   ac_cv_prog_cc_Ae=yes
1214 else
1215   ac_cv_prog_cc_Ae=no
1216 fi
1217 rm -f conftest*
1218
1219 fi
1220
1221 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1222       # mmap on HPUX is completely broken...
1223       cat >> confdefs.h <<\EOF
1224 #define MMAP_BLACKLIST 1
1225 EOF
1226
1227       if test $ac_cv_prog_cc_Ae = yes; then
1228         CPPFLAGS="$CPPFLAGS -Ae"
1229       fi
1230 #
1231 # Defines needed for HPUX support.
1232 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1233 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1234 #
1235       case `uname -r` in
1236                         *9*|*10*)
1237                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1238                                 cat >> confdefs.h <<\EOF
1239 #define USE_BOTH_CRYPT_CALLS 1
1240 EOF
1241
1242                                 ;;
1243                         *11*)
1244                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1245                                 cat >> confdefs.h <<\EOF
1246 #define USE_BOTH_CRYPT_CALLS 1
1247 EOF
1248
1249                                 ;;
1250       esac
1251       ;;
1252 #
1253 # AIX4.x doesn't even admit to having large
1254 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1255 #
1256     *aix4*)
1257           echo "$ac_t""enabling large file support" 1>&6
1258       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1259       ;;    
1260 #
1261 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1262 # to the existance of large files..
1263 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1264 # recommendations on large file support, however it makes the
1265 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1266 # recommendation makes the compile fail on gcc2.7. JRA.
1267 #
1268         *solaris*)
1269                 case `uname -r` in
1270                         5.0*|5.1*|5.2*|5.3*|5.5*)
1271                                 echo "$ac_t""no large file support" 1>&6
1272                                 ;;
1273                         5.*)
1274                         echo "$ac_t""enabling large file support" 1>&6
1275                         if test "$ac_cv_prog_gcc" = yes; then
1276                                 ${CC-cc} -v >conftest.c 2>&1
1277                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1278                                 rm -fr conftest.c
1279                                 case "$ac_cv_gcc_compiler_version_number" in
1280                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1281                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1282                                                 ;;
1283                                         *)
1284                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1285                                                 ;;
1286                                 esac
1287                         else
1288                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1289                         fi
1290                         ;;
1291                 esac
1292                 ;;
1293 #
1294 # Tests needed for SINIX large file support.
1295 #
1296     *sysv4*)
1297       if test $host = mips-sni-sysv4 ; then
1298         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1299 echo "configure:1300: checking for LFS support" >&5
1300         old_CPPFLAGS="$CPPFLAGS"
1301         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1302         if test "$cross_compiling" = yes; then
1303   SINIX_LFS_SUPPORT=cross
1304 else
1305   cat > conftest.$ac_ext <<EOF
1306 #line 1307 "configure"
1307 #include "confdefs.h"
1308
1309 #include <unistd.h>
1310 main () {
1311 #if _LFS64_LARGEFILE == 1
1312 exit(0);
1313 #else
1314 exit(1);
1315 #endif
1316 }
1317 EOF
1318 if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1319 then
1320   SINIX_LFS_SUPPORT=yes
1321 else
1322   echo "configure: failed program was:" >&5
1323   cat conftest.$ac_ext >&5
1324   rm -fr conftest*
1325   SINIX_LFS_SUPPORT=no
1326 fi
1327 rm -fr conftest*
1328 fi
1329
1330         CPPFLAGS="$old_CPPFLAGS"
1331         if test x$SINIX_LFS_SUPPORT = xyes ; then
1332           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1333           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1334           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1335           LIBS="`getconf LFS64_LIBS` $LIBS"
1336         fi
1337       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1338       fi
1339     ;;
1340
1341 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1342 #
1343     *linux*)
1344         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1345 echo "configure:1346: checking for LFS support" >&5
1346         old_CPPFLAGS="$CPPFLAGS"
1347         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1348        if test "$cross_compiling" = yes; then
1349   LINUX_LFS_SUPPORT=cross
1350 else
1351   cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354
1355 #include <unistd.h>
1356 #include <sys/utsname.h>
1357 main() {
1358 #if _LFS64_LARGEFILE == 1
1359        struct utsname uts;
1360        char *release;
1361        int major, minor;
1362
1363        /* Ensure this is glibc 2.2 or higher */
1364 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1365        int libc_major = __GLIBC__;
1366        int libc_minor = __GLIBC_MINOR__;
1367
1368        if (libc_major < 2)
1369               exit(1);
1370        if (libc_minor < 2)
1371               exit(1);
1372 #endif
1373
1374        /* Ensure this is kernel 2.4 or higher */
1375
1376        uname(&uts);
1377        release = uts.release;
1378        major = atoi(strsep(&release, "."));
1379        minor = atoi(strsep(&release, "."));
1380
1381        if (major > 2 || (major == 2 && minor > 3))
1382                exit(0);
1383        exit(1);
1384 #else
1385        exit(1);
1386 #endif
1387 }
1388
1389 EOF
1390 if { (eval echo configure:1391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1391 then
1392   LINUX_LFS_SUPPORT=yes
1393 else
1394   echo "configure: failed program was:" >&5
1395   cat conftest.$ac_ext >&5
1396   rm -fr conftest*
1397   LINUX_LFS_SUPPORT=no
1398 fi
1399 rm -fr conftest*
1400 fi
1401
1402         CPPFLAGS="$old_CPPFLAGS"
1403         if test x$LINUX_LFS_SUPPORT = xyes ; then
1404           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1405         fi
1406        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1407                 ;;
1408
1409     *hurd*)
1410         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1411 echo "configure:1412: checking for LFS support" >&5
1412         old_CPPFLAGS="$CPPFLAGS"
1413         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1414         if test "$cross_compiling" = yes; then
1415   GLIBC_LFS_SUPPORT=cross
1416 else
1417   cat > conftest.$ac_ext <<EOF
1418 #line 1419 "configure"
1419 #include "confdefs.h"
1420
1421 #include <unistd.h>
1422 main () {
1423 #if _LFS64_LARGEFILE == 1
1424 exit(0);
1425 #else
1426 exit(1);
1427 #endif
1428 }
1429 EOF
1430 if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1431 then
1432   GLIBC_LFS_SUPPORT=yes
1433 else
1434   echo "configure: failed program was:" >&5
1435   cat conftest.$ac_ext >&5
1436   rm -fr conftest*
1437   GLIBC_LFS_SUPPORT=no
1438 fi
1439 rm -fr conftest*
1440 fi
1441
1442         CPPFLAGS="$old_CPPFLAGS"
1443         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1444           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1445         fi
1446       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1447     ;;
1448
1449 esac
1450
1451 echo $ac_n "checking for inline""... $ac_c" 1>&6
1452 echo "configure:1453: checking for inline" >&5
1453 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1454   echo $ac_n "(cached) $ac_c" 1>&6
1455 else
1456   ac_cv_c_inline=no
1457 for ac_kw in inline __inline__ __inline; do
1458   cat > conftest.$ac_ext <<EOF
1459 #line 1460 "configure"
1460 #include "confdefs.h"
1461
1462 int main() {
1463 } $ac_kw foo() {
1464 ; return 0; }
1465 EOF
1466 if { (eval echo configure:1467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1467   rm -rf conftest*
1468   ac_cv_c_inline=$ac_kw; break
1469 else
1470   echo "configure: failed program was:" >&5
1471   cat conftest.$ac_ext >&5
1472 fi
1473 rm -f conftest*
1474 done
1475
1476 fi
1477
1478 echo "$ac_t""$ac_cv_c_inline" 1>&6
1479 case "$ac_cv_c_inline" in
1480   inline | yes) ;;
1481   no) cat >> confdefs.h <<\EOF
1482 #define inline 
1483 EOF
1484  ;;
1485   *)  cat >> confdefs.h <<EOF
1486 #define inline $ac_cv_c_inline
1487 EOF
1488  ;;
1489 esac
1490
1491 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1492 echo "configure:1493: checking how to run the C preprocessor" >&5
1493 # On Suns, sometimes $CPP names a directory.
1494 if test -n "$CPP" && test -d "$CPP"; then
1495   CPP=
1496 fi
1497 if test -z "$CPP"; then
1498 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1499   echo $ac_n "(cached) $ac_c" 1>&6
1500 else
1501     # This must be in double quotes, not single quotes, because CPP may get
1502   # substituted into the Makefile and "${CC-cc}" will confuse make.
1503   CPP="${CC-cc} -E"
1504   # On the NeXT, cc -E runs the code through the compiler's parser,
1505   # not just through cpp.
1506   cat > conftest.$ac_ext <<EOF
1507 #line 1508 "configure"
1508 #include "confdefs.h"
1509 #include <assert.h>
1510 Syntax Error
1511 EOF
1512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1513 { (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1515 if test -z "$ac_err"; then
1516   :
1517 else
1518   echo "$ac_err" >&5
1519   echo "configure: failed program was:" >&5
1520   cat conftest.$ac_ext >&5
1521   rm -rf conftest*
1522   CPP="${CC-cc} -E -traditional-cpp"
1523   cat > conftest.$ac_ext <<EOF
1524 #line 1525 "configure"
1525 #include "confdefs.h"
1526 #include <assert.h>
1527 Syntax Error
1528 EOF
1529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1530 { (eval echo configure:1531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1532 if test -z "$ac_err"; then
1533   :
1534 else
1535   echo "$ac_err" >&5
1536   echo "configure: failed program was:" >&5
1537   cat conftest.$ac_ext >&5
1538   rm -rf conftest*
1539   CPP="${CC-cc} -nologo -E"
1540   cat > conftest.$ac_ext <<EOF
1541 #line 1542 "configure"
1542 #include "confdefs.h"
1543 #include <assert.h>
1544 Syntax Error
1545 EOF
1546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1547 { (eval echo configure:1548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1549 if test -z "$ac_err"; then
1550   :
1551 else
1552   echo "$ac_err" >&5
1553   echo "configure: failed program was:" >&5
1554   cat conftest.$ac_ext >&5
1555   rm -rf conftest*
1556   CPP=/lib/cpp
1557 fi
1558 rm -f conftest*
1559 fi
1560 rm -f conftest*
1561 fi
1562 rm -f conftest*
1563   ac_cv_prog_CPP="$CPP"
1564 fi
1565   CPP="$ac_cv_prog_CPP"
1566 else
1567   ac_cv_prog_CPP="$CPP"
1568 fi
1569 echo "$ac_t""$CPP" 1>&6
1570
1571 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1572 echo "configure:1573: checking for ANSI C header files" >&5
1573 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1574   echo $ac_n "(cached) $ac_c" 1>&6
1575 else
1576   cat > conftest.$ac_ext <<EOF
1577 #line 1578 "configure"
1578 #include "confdefs.h"
1579 #include <stdlib.h>
1580 #include <stdarg.h>
1581 #include <string.h>
1582 #include <float.h>
1583 EOF
1584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1585 { (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1587 if test -z "$ac_err"; then
1588   rm -rf conftest*
1589   ac_cv_header_stdc=yes
1590 else
1591   echo "$ac_err" >&5
1592   echo "configure: failed program was:" >&5
1593   cat conftest.$ac_ext >&5
1594   rm -rf conftest*
1595   ac_cv_header_stdc=no
1596 fi
1597 rm -f conftest*
1598
1599 if test $ac_cv_header_stdc = yes; then
1600   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1601 cat > conftest.$ac_ext <<EOF
1602 #line 1603 "configure"
1603 #include "confdefs.h"
1604 #include <string.h>
1605 EOF
1606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1607   egrep "memchr" >/dev/null 2>&1; then
1608   :
1609 else
1610   rm -rf conftest*
1611   ac_cv_header_stdc=no
1612 fi
1613 rm -f conftest*
1614
1615 fi
1616
1617 if test $ac_cv_header_stdc = yes; then
1618   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1619 cat > conftest.$ac_ext <<EOF
1620 #line 1621 "configure"
1621 #include "confdefs.h"
1622 #include <stdlib.h>
1623 EOF
1624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1625   egrep "free" >/dev/null 2>&1; then
1626   :
1627 else
1628   rm -rf conftest*
1629   ac_cv_header_stdc=no
1630 fi
1631 rm -f conftest*
1632
1633 fi
1634
1635 if test $ac_cv_header_stdc = yes; then
1636   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1637 if test "$cross_compiling" = yes; then
1638   :
1639 else
1640   cat > conftest.$ac_ext <<EOF
1641 #line 1642 "configure"
1642 #include "confdefs.h"
1643 #include <ctype.h>
1644 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1645 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1646 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1647 int main () { int i; for (i = 0; i < 256; i++)
1648 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1649 exit (0); }
1650
1651 EOF
1652 if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1653 then
1654   :
1655 else
1656   echo "configure: failed program was:" >&5
1657   cat conftest.$ac_ext >&5
1658   rm -fr conftest*
1659   ac_cv_header_stdc=no
1660 fi
1661 rm -fr conftest*
1662 fi
1663
1664 fi
1665 fi
1666
1667 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1668 if test $ac_cv_header_stdc = yes; then
1669   cat >> confdefs.h <<\EOF
1670 #define STDC_HEADERS 1
1671 EOF
1672
1673 fi
1674
1675 ac_header_dirent=no
1676 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1677 do
1678 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1679 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1680 echo "configure:1681: checking for $ac_hdr that defines DIR" >&5
1681 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1682   echo $ac_n "(cached) $ac_c" 1>&6
1683 else
1684   cat > conftest.$ac_ext <<EOF
1685 #line 1686 "configure"
1686 #include "confdefs.h"
1687 #include <sys/types.h>
1688 #include <$ac_hdr>
1689 int main() {
1690 DIR *dirp = 0;
1691 ; return 0; }
1692 EOF
1693 if { (eval echo configure:1694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1694   rm -rf conftest*
1695   eval "ac_cv_header_dirent_$ac_safe=yes"
1696 else
1697   echo "configure: failed program was:" >&5
1698   cat conftest.$ac_ext >&5
1699   rm -rf conftest*
1700   eval "ac_cv_header_dirent_$ac_safe=no"
1701 fi
1702 rm -f conftest*
1703 fi
1704 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1705   echo "$ac_t""yes" 1>&6
1706     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1707   cat >> confdefs.h <<EOF
1708 #define $ac_tr_hdr 1
1709 EOF
1710  ac_header_dirent=$ac_hdr; break
1711 else
1712   echo "$ac_t""no" 1>&6
1713 fi
1714 done
1715 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1716 if test $ac_header_dirent = dirent.h; then
1717 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1718 echo "configure:1719: checking for opendir in -ldir" >&5
1719 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1720 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1721   echo $ac_n "(cached) $ac_c" 1>&6
1722 else
1723   ac_save_LIBS="$LIBS"
1724 LIBS="-ldir  $LIBS"
1725 cat > conftest.$ac_ext <<EOF
1726 #line 1727 "configure"
1727 #include "confdefs.h"
1728 /* Override any gcc2 internal prototype to avoid an error.  */
1729 /* We use char because int might match the return type of a gcc2
1730     builtin and then its argument prototype would still apply.  */
1731 char opendir();
1732
1733 int main() {
1734 opendir()
1735 ; return 0; }
1736 EOF
1737 if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1738   rm -rf conftest*
1739   eval "ac_cv_lib_$ac_lib_var=yes"
1740 else
1741   echo "configure: failed program was:" >&5
1742   cat conftest.$ac_ext >&5
1743   rm -rf conftest*
1744   eval "ac_cv_lib_$ac_lib_var=no"
1745 fi
1746 rm -f conftest*
1747 LIBS="$ac_save_LIBS"
1748
1749 fi
1750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1751   echo "$ac_t""yes" 1>&6
1752   LIBS="$LIBS -ldir"
1753 else
1754   echo "$ac_t""no" 1>&6
1755 fi
1756
1757 else
1758 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1759 echo "configure:1760: checking for opendir in -lx" >&5
1760 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1762   echo $ac_n "(cached) $ac_c" 1>&6
1763 else
1764   ac_save_LIBS="$LIBS"
1765 LIBS="-lx  $LIBS"
1766 cat > conftest.$ac_ext <<EOF
1767 #line 1768 "configure"
1768 #include "confdefs.h"
1769 /* Override any gcc2 internal prototype to avoid an error.  */
1770 /* We use char because int might match the return type of a gcc2
1771     builtin and then its argument prototype would still apply.  */
1772 char opendir();
1773
1774 int main() {
1775 opendir()
1776 ; return 0; }
1777 EOF
1778 if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1779   rm -rf conftest*
1780   eval "ac_cv_lib_$ac_lib_var=yes"
1781 else
1782   echo "configure: failed program was:" >&5
1783   cat conftest.$ac_ext >&5
1784   rm -rf conftest*
1785   eval "ac_cv_lib_$ac_lib_var=no"
1786 fi
1787 rm -f conftest*
1788 LIBS="$ac_save_LIBS"
1789
1790 fi
1791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1792   echo "$ac_t""yes" 1>&6
1793   LIBS="$LIBS -lx"
1794 else
1795   echo "$ac_t""no" 1>&6
1796 fi
1797
1798 fi
1799
1800 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1801 echo "configure:1802: checking whether time.h and sys/time.h may both be included" >&5
1802 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1803   echo $ac_n "(cached) $ac_c" 1>&6
1804 else
1805   cat > conftest.$ac_ext <<EOF
1806 #line 1807 "configure"
1807 #include "confdefs.h"
1808 #include <sys/types.h>
1809 #include <sys/time.h>
1810 #include <time.h>
1811 int main() {
1812 struct tm *tp;
1813 ; return 0; }
1814 EOF
1815 if { (eval echo configure:1816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1816   rm -rf conftest*
1817   ac_cv_header_time=yes
1818 else
1819   echo "configure: failed program was:" >&5
1820   cat conftest.$ac_ext >&5
1821   rm -rf conftest*
1822   ac_cv_header_time=no
1823 fi
1824 rm -f conftest*
1825 fi
1826
1827 echo "$ac_t""$ac_cv_header_time" 1>&6
1828 if test $ac_cv_header_time = yes; then
1829   cat >> confdefs.h <<\EOF
1830 #define TIME_WITH_SYS_TIME 1
1831 EOF
1832
1833 fi
1834
1835 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1836 echo "configure:1837: checking for sys/wait.h that is POSIX.1 compatible" >&5
1837 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1838   echo $ac_n "(cached) $ac_c" 1>&6
1839 else
1840   cat > conftest.$ac_ext <<EOF
1841 #line 1842 "configure"
1842 #include "confdefs.h"
1843 #include <sys/types.h>
1844 #include <sys/wait.h>
1845 #ifndef WEXITSTATUS
1846 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1847 #endif
1848 #ifndef WIFEXITED
1849 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1850 #endif
1851 int main() {
1852 int s;
1853 wait (&s);
1854 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1855 ; return 0; }
1856 EOF
1857 if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1858   rm -rf conftest*
1859   ac_cv_header_sys_wait_h=yes
1860 else
1861   echo "configure: failed program was:" >&5
1862   cat conftest.$ac_ext >&5
1863   rm -rf conftest*
1864   ac_cv_header_sys_wait_h=no
1865 fi
1866 rm -f conftest*
1867 fi
1868
1869 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1870 if test $ac_cv_header_sys_wait_h = yes; then
1871   cat >> confdefs.h <<\EOF
1872 #define HAVE_SYS_WAIT_H 1
1873 EOF
1874
1875 fi
1876
1877 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1878 do
1879 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1880 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1881 echo "configure:1882: checking for $ac_hdr" >&5
1882 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1883   echo $ac_n "(cached) $ac_c" 1>&6
1884 else
1885   cat > conftest.$ac_ext <<EOF
1886 #line 1887 "configure"
1887 #include "confdefs.h"
1888 #include <$ac_hdr>
1889 EOF
1890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1891 { (eval echo configure:1892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1893 if test -z "$ac_err"; then
1894   rm -rf conftest*
1895   eval "ac_cv_header_$ac_safe=yes"
1896 else
1897   echo "$ac_err" >&5
1898   echo "configure: failed program was:" >&5
1899   cat conftest.$ac_ext >&5
1900   rm -rf conftest*
1901   eval "ac_cv_header_$ac_safe=no"
1902 fi
1903 rm -f conftest*
1904 fi
1905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1906   echo "$ac_t""yes" 1>&6
1907     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1908   cat >> confdefs.h <<EOF
1909 #define $ac_tr_hdr 1
1910 EOF
1911  
1912 else
1913   echo "$ac_t""no" 1>&6
1914 fi
1915 done
1916
1917 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1918 do
1919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1921 echo "configure:1922: checking for $ac_hdr" >&5
1922 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1923   echo $ac_n "(cached) $ac_c" 1>&6
1924 else
1925   cat > conftest.$ac_ext <<EOF
1926 #line 1927 "configure"
1927 #include "confdefs.h"
1928 #include <$ac_hdr>
1929 EOF
1930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1931 { (eval echo configure:1932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1933 if test -z "$ac_err"; then
1934   rm -rf conftest*
1935   eval "ac_cv_header_$ac_safe=yes"
1936 else
1937   echo "$ac_err" >&5
1938   echo "configure: failed program was:" >&5
1939   cat conftest.$ac_ext >&5
1940   rm -rf conftest*
1941   eval "ac_cv_header_$ac_safe=no"
1942 fi
1943 rm -f conftest*
1944 fi
1945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1946   echo "$ac_t""yes" 1>&6
1947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1948   cat >> confdefs.h <<EOF
1949 #define $ac_tr_hdr 1
1950 EOF
1951  
1952 else
1953   echo "$ac_t""no" 1>&6
1954 fi
1955 done
1956
1957 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1958 do
1959 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1960 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1961 echo "configure:1962: checking for $ac_hdr" >&5
1962 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1963   echo $ac_n "(cached) $ac_c" 1>&6
1964 else
1965   cat > conftest.$ac_ext <<EOF
1966 #line 1967 "configure"
1967 #include "confdefs.h"
1968 #include <$ac_hdr>
1969 EOF
1970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1971 { (eval echo configure:1972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1973 if test -z "$ac_err"; then
1974   rm -rf conftest*
1975   eval "ac_cv_header_$ac_safe=yes"
1976 else
1977   echo "$ac_err" >&5
1978   echo "configure: failed program was:" >&5
1979   cat conftest.$ac_ext >&5
1980   rm -rf conftest*
1981   eval "ac_cv_header_$ac_safe=no"
1982 fi
1983 rm -f conftest*
1984 fi
1985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1986   echo "$ac_t""yes" 1>&6
1987     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1988   cat >> confdefs.h <<EOF
1989 #define $ac_tr_hdr 1
1990 EOF
1991  
1992 else
1993   echo "$ac_t""no" 1>&6
1994 fi
1995 done
1996
1997 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
1998 do
1999 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2000 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2001 echo "configure:2002: checking for $ac_hdr" >&5
2002 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2003   echo $ac_n "(cached) $ac_c" 1>&6
2004 else
2005   cat > conftest.$ac_ext <<EOF
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2008 #include <$ac_hdr>
2009 EOF
2010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2011 { (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2013 if test -z "$ac_err"; then
2014   rm -rf conftest*
2015   eval "ac_cv_header_$ac_safe=yes"
2016 else
2017   echo "$ac_err" >&5
2018   echo "configure: failed program was:" >&5
2019   cat conftest.$ac_ext >&5
2020   rm -rf conftest*
2021   eval "ac_cv_header_$ac_safe=no"
2022 fi
2023 rm -f conftest*
2024 fi
2025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2026   echo "$ac_t""yes" 1>&6
2027     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2028   cat >> confdefs.h <<EOF
2029 #define $ac_tr_hdr 1
2030 EOF
2031  
2032 else
2033   echo "$ac_t""no" 1>&6
2034 fi
2035 done
2036
2037 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
2038 do
2039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2041 echo "configure:2042: checking for $ac_hdr" >&5
2042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2043   echo $ac_n "(cached) $ac_c" 1>&6
2044 else
2045   cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048 #include <$ac_hdr>
2049 EOF
2050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2051 { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2053 if test -z "$ac_err"; then
2054   rm -rf conftest*
2055   eval "ac_cv_header_$ac_safe=yes"
2056 else
2057   echo "$ac_err" >&5
2058   echo "configure: failed program was:" >&5
2059   cat conftest.$ac_ext >&5
2060   rm -rf conftest*
2061   eval "ac_cv_header_$ac_safe=no"
2062 fi
2063 rm -f conftest*
2064 fi
2065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2066   echo "$ac_t""yes" 1>&6
2067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2068   cat >> confdefs.h <<EOF
2069 #define $ac_tr_hdr 1
2070 EOF
2071  
2072 else
2073   echo "$ac_t""no" 1>&6
2074 fi
2075 done
2076
2077 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2078 do
2079 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2080 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2081 echo "configure:2082: checking for $ac_hdr" >&5
2082 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2083   echo $ac_n "(cached) $ac_c" 1>&6
2084 else
2085   cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 #include <$ac_hdr>
2089 EOF
2090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2091 { (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2093 if test -z "$ac_err"; then
2094   rm -rf conftest*
2095   eval "ac_cv_header_$ac_safe=yes"
2096 else
2097   echo "$ac_err" >&5
2098   echo "configure: failed program was:" >&5
2099   cat conftest.$ac_ext >&5
2100   rm -rf conftest*
2101   eval "ac_cv_header_$ac_safe=no"
2102 fi
2103 rm -f conftest*
2104 fi
2105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2106   echo "$ac_t""yes" 1>&6
2107     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2108   cat >> confdefs.h <<EOF
2109 #define $ac_tr_hdr 1
2110 EOF
2111  
2112 else
2113   echo "$ac_t""no" 1>&6
2114 fi
2115 done
2116
2117 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2118 do
2119 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2120 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2121 echo "configure:2122: checking for $ac_hdr" >&5
2122 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2123   echo $ac_n "(cached) $ac_c" 1>&6
2124 else
2125   cat > conftest.$ac_ext <<EOF
2126 #line 2127 "configure"
2127 #include "confdefs.h"
2128 #include <$ac_hdr>
2129 EOF
2130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2131 { (eval echo configure:2132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2133 if test -z "$ac_err"; then
2134   rm -rf conftest*
2135   eval "ac_cv_header_$ac_safe=yes"
2136 else
2137   echo "$ac_err" >&5
2138   echo "configure: failed program was:" >&5
2139   cat conftest.$ac_ext >&5
2140   rm -rf conftest*
2141   eval "ac_cv_header_$ac_safe=no"
2142 fi
2143 rm -f conftest*
2144 fi
2145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2146   echo "$ac_t""yes" 1>&6
2147     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2148   cat >> confdefs.h <<EOF
2149 #define $ac_tr_hdr 1
2150 EOF
2151  
2152 else
2153   echo "$ac_t""no" 1>&6
2154 fi
2155 done
2156
2157 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h sasl.h
2158 do
2159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2161 echo "configure:2162: checking for $ac_hdr" >&5
2162 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2163   echo $ac_n "(cached) $ac_c" 1>&6
2164 else
2165   cat > conftest.$ac_ext <<EOF
2166 #line 2167 "configure"
2167 #include "confdefs.h"
2168 #include <$ac_hdr>
2169 EOF
2170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2171 { (eval echo configure:2172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2173 if test -z "$ac_err"; then
2174   rm -rf conftest*
2175   eval "ac_cv_header_$ac_safe=yes"
2176 else
2177   echo "$ac_err" >&5
2178   echo "configure: failed program was:" >&5
2179   cat conftest.$ac_ext >&5
2180   rm -rf conftest*
2181   eval "ac_cv_header_$ac_safe=no"
2182 fi
2183 rm -f conftest*
2184 fi
2185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2186   echo "$ac_t""yes" 1>&6
2187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2188   cat >> confdefs.h <<EOF
2189 #define $ac_tr_hdr 1
2190 EOF
2191  
2192 else
2193   echo "$ac_t""no" 1>&6
2194 fi
2195 done
2196
2197
2198 #
2199 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2200 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2201 #
2202 case "$host_os" in
2203     *hpux*)
2204                 cat > conftest.$ac_ext <<EOF
2205 #line 2206 "configure"
2206 #include "confdefs.h"
2207 #include <shadow.h>
2208 int main() {
2209 struct spwd testme
2210 ; return 0; }
2211 EOF
2212 if { (eval echo configure:2213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2213   rm -rf conftest*
2214   ac_cv_header_shadow_h=yes
2215 else
2216   echo "configure: failed program was:" >&5
2217   cat conftest.$ac_ext >&5
2218   rm -rf conftest*
2219   ac_cv_header_shadow_h=no
2220 fi
2221 rm -f conftest*
2222                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2223                    cat >> confdefs.h <<\EOF
2224 #define HAVE_SHADOW_H 1
2225 EOF
2226
2227                 fi
2228         ;;
2229 esac
2230 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2231 do
2232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2234 echo "configure:2235: checking for $ac_hdr" >&5
2235 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2236   echo $ac_n "(cached) $ac_c" 1>&6
2237 else
2238   cat > conftest.$ac_ext <<EOF
2239 #line 2240 "configure"
2240 #include "confdefs.h"
2241 #include <$ac_hdr>
2242 EOF
2243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2244 { (eval echo configure:2245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2246 if test -z "$ac_err"; then
2247   rm -rf conftest*
2248   eval "ac_cv_header_$ac_safe=yes"
2249 else
2250   echo "$ac_err" >&5
2251   echo "configure: failed program was:" >&5
2252   cat conftest.$ac_ext >&5
2253   rm -rf conftest*
2254   eval "ac_cv_header_$ac_safe=no"
2255 fi
2256 rm -f conftest*
2257 fi
2258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2259   echo "$ac_t""yes" 1>&6
2260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2261   cat >> confdefs.h <<EOF
2262 #define $ac_tr_hdr 1
2263 EOF
2264  
2265 else
2266   echo "$ac_t""no" 1>&6
2267 fi
2268 done
2269
2270 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2271 do
2272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2274 echo "configure:2275: checking for $ac_hdr" >&5
2275 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2276   echo $ac_n "(cached) $ac_c" 1>&6
2277 else
2278   cat > conftest.$ac_ext <<EOF
2279 #line 2280 "configure"
2280 #include "confdefs.h"
2281 #include <$ac_hdr>
2282 EOF
2283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2284 { (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2286 if test -z "$ac_err"; then
2287   rm -rf conftest*
2288   eval "ac_cv_header_$ac_safe=yes"
2289 else
2290   echo "$ac_err" >&5
2291   echo "configure: failed program was:" >&5
2292   cat conftest.$ac_ext >&5
2293   rm -rf conftest*
2294   eval "ac_cv_header_$ac_safe=no"
2295 fi
2296 rm -f conftest*
2297 fi
2298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2299   echo "$ac_t""yes" 1>&6
2300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2301   cat >> confdefs.h <<EOF
2302 #define $ac_tr_hdr 1
2303 EOF
2304  
2305 else
2306   echo "$ac_t""no" 1>&6
2307 fi
2308 done
2309
2310 for ac_hdr in stropts.h poll.h
2311 do
2312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2314 echo "configure:2315: checking for $ac_hdr" >&5
2315 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316   echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318   cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2321 #include <$ac_hdr>
2322 EOF
2323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2324 { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326 if test -z "$ac_err"; then
2327   rm -rf conftest*
2328   eval "ac_cv_header_$ac_safe=yes"
2329 else
2330   echo "$ac_err" >&5
2331   echo "configure: failed program was:" >&5
2332   cat conftest.$ac_ext >&5
2333   rm -rf conftest*
2334   eval "ac_cv_header_$ac_safe=no"
2335 fi
2336 rm -f conftest*
2337 fi
2338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339   echo "$ac_t""yes" 1>&6
2340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2341   cat >> confdefs.h <<EOF
2342 #define $ac_tr_hdr 1
2343 EOF
2344  
2345 else
2346   echo "$ac_t""no" 1>&6
2347 fi
2348 done
2349
2350 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2351 do
2352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2354 echo "configure:2355: checking for $ac_hdr" >&5
2355 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2356   echo $ac_n "(cached) $ac_c" 1>&6
2357 else
2358   cat > conftest.$ac_ext <<EOF
2359 #line 2360 "configure"
2360 #include "confdefs.h"
2361 #include <$ac_hdr>
2362 EOF
2363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2364 { (eval echo configure:2365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2366 if test -z "$ac_err"; then
2367   rm -rf conftest*
2368   eval "ac_cv_header_$ac_safe=yes"
2369 else
2370   echo "$ac_err" >&5
2371   echo "configure: failed program was:" >&5
2372   cat conftest.$ac_ext >&5
2373   rm -rf conftest*
2374   eval "ac_cv_header_$ac_safe=no"
2375 fi
2376 rm -f conftest*
2377 fi
2378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2379   echo "$ac_t""yes" 1>&6
2380     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2381   cat >> confdefs.h <<EOF
2382 #define $ac_tr_hdr 1
2383 EOF
2384  
2385 else
2386   echo "$ac_t""no" 1>&6
2387 fi
2388 done
2389
2390 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2391 do
2392 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2393 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2394 echo "configure:2395: checking for $ac_hdr" >&5
2395 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2396   echo $ac_n "(cached) $ac_c" 1>&6
2397 else
2398   cat > conftest.$ac_ext <<EOF
2399 #line 2400 "configure"
2400 #include "confdefs.h"
2401 #include <$ac_hdr>
2402 EOF
2403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2404 { (eval echo configure:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2406 if test -z "$ac_err"; then
2407   rm -rf conftest*
2408   eval "ac_cv_header_$ac_safe=yes"
2409 else
2410   echo "$ac_err" >&5
2411   echo "configure: failed program was:" >&5
2412   cat conftest.$ac_ext >&5
2413   rm -rf conftest*
2414   eval "ac_cv_header_$ac_safe=no"
2415 fi
2416 rm -f conftest*
2417 fi
2418 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2419   echo "$ac_t""yes" 1>&6
2420     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2421   cat >> confdefs.h <<EOF
2422 #define $ac_tr_hdr 1
2423 EOF
2424  
2425 else
2426   echo "$ac_t""no" 1>&6
2427 fi
2428 done
2429
2430
2431 # For experimental utmp support (lastlog on some BSD-like systems)
2432 for ac_hdr in utmp.h utmpx.h lastlog.h
2433 do
2434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2436 echo "configure:2437: checking for $ac_hdr" >&5
2437 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2438   echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440   cat > conftest.$ac_ext <<EOF
2441 #line 2442 "configure"
2442 #include "confdefs.h"
2443 #include <$ac_hdr>
2444 EOF
2445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2446 { (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2448 if test -z "$ac_err"; then
2449   rm -rf conftest*
2450   eval "ac_cv_header_$ac_safe=yes"
2451 else
2452   echo "$ac_err" >&5
2453   echo "configure: failed program was:" >&5
2454   cat conftest.$ac_ext >&5
2455   rm -rf conftest*
2456   eval "ac_cv_header_$ac_safe=no"
2457 fi
2458 rm -f conftest*
2459 fi
2460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2461   echo "$ac_t""yes" 1>&6
2462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2463   cat >> confdefs.h <<EOF
2464 #define $ac_tr_hdr 1
2465 EOF
2466  
2467 else
2468   echo "$ac_t""no" 1>&6
2469 fi
2470 done
2471
2472  
2473 # For quotas on Veritas VxFS filesystems
2474 for ac_hdr in sys/fs/vx_quota.h
2475 do
2476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2478 echo "configure:2479: checking for $ac_hdr" >&5
2479 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2480   echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482   cat > conftest.$ac_ext <<EOF
2483 #line 2484 "configure"
2484 #include "confdefs.h"
2485 #include <$ac_hdr>
2486 EOF
2487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2488 { (eval echo configure:2489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2490 if test -z "$ac_err"; then
2491   rm -rf conftest*
2492   eval "ac_cv_header_$ac_safe=yes"
2493 else
2494   echo "$ac_err" >&5
2495   echo "configure: failed program was:" >&5
2496   cat conftest.$ac_ext >&5
2497   rm -rf conftest*
2498   eval "ac_cv_header_$ac_safe=no"
2499 fi
2500 rm -f conftest*
2501 fi
2502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2503   echo "$ac_t""yes" 1>&6
2504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2505   cat >> confdefs.h <<EOF
2506 #define $ac_tr_hdr 1
2507 EOF
2508  
2509 else
2510   echo "$ac_t""no" 1>&6
2511 fi
2512 done
2513
2514
2515 echo $ac_n "checking size of int""... $ac_c" 1>&6
2516 echo "configure:2517: checking size of int" >&5
2517 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2518   echo $ac_n "(cached) $ac_c" 1>&6
2519 else
2520   if test "$cross_compiling" = yes; then
2521   ac_cv_sizeof_int=cross
2522 else
2523   cat > conftest.$ac_ext <<EOF
2524 #line 2525 "configure"
2525 #include "confdefs.h"
2526 #include <stdio.h>
2527 #include <sys/types.h>
2528 main()
2529 {
2530   FILE *f=fopen("conftestval", "w");
2531   if (!f) exit(1);
2532   fprintf(f, "%d\n", sizeof(int));
2533   exit(0);
2534 }
2535 EOF
2536 if { (eval echo configure:2537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2537 then
2538   ac_cv_sizeof_int=`cat conftestval`
2539 else
2540   echo "configure: failed program was:" >&5
2541   cat conftest.$ac_ext >&5
2542   rm -fr conftest*
2543   ac_cv_sizeof_int=0
2544 fi
2545 rm -fr conftest*
2546 fi
2547
2548 fi
2549 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2550 cat >> confdefs.h <<EOF
2551 #define SIZEOF_INT $ac_cv_sizeof_int
2552 EOF
2553
2554
2555 echo $ac_n "checking size of long""... $ac_c" 1>&6
2556 echo "configure:2557: checking size of long" >&5
2557 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2558   echo $ac_n "(cached) $ac_c" 1>&6
2559 else
2560   if test "$cross_compiling" = yes; then
2561   ac_cv_sizeof_long=cross
2562 else
2563   cat > conftest.$ac_ext <<EOF
2564 #line 2565 "configure"
2565 #include "confdefs.h"
2566 #include <stdio.h>
2567 #include <sys/types.h>
2568 main()
2569 {
2570   FILE *f=fopen("conftestval", "w");
2571   if (!f) exit(1);
2572   fprintf(f, "%d\n", sizeof(long));
2573   exit(0);
2574 }
2575 EOF
2576 if { (eval echo configure:2577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2577 then
2578   ac_cv_sizeof_long=`cat conftestval`
2579 else
2580   echo "configure: failed program was:" >&5
2581   cat conftest.$ac_ext >&5
2582   rm -fr conftest*
2583   ac_cv_sizeof_long=0
2584 fi
2585 rm -fr conftest*
2586 fi
2587
2588 fi
2589 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2590 cat >> confdefs.h <<EOF
2591 #define SIZEOF_LONG $ac_cv_sizeof_long
2592 EOF
2593
2594
2595 echo $ac_n "checking size of short""... $ac_c" 1>&6
2596 echo "configure:2597: checking size of short" >&5
2597 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2598   echo $ac_n "(cached) $ac_c" 1>&6
2599 else
2600   if test "$cross_compiling" = yes; then
2601   ac_cv_sizeof_short=cross
2602 else
2603   cat > conftest.$ac_ext <<EOF
2604 #line 2605 "configure"
2605 #include "confdefs.h"
2606 #include <stdio.h>
2607 #include <sys/types.h>
2608 main()
2609 {
2610   FILE *f=fopen("conftestval", "w");
2611   if (!f) exit(1);
2612   fprintf(f, "%d\n", sizeof(short));
2613   exit(0);
2614 }
2615 EOF
2616 if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2617 then
2618   ac_cv_sizeof_short=`cat conftestval`
2619 else
2620   echo "configure: failed program was:" >&5
2621   cat conftest.$ac_ext >&5
2622   rm -fr conftest*
2623   ac_cv_sizeof_short=0
2624 fi
2625 rm -fr conftest*
2626 fi
2627
2628 fi
2629 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2630 cat >> confdefs.h <<EOF
2631 #define SIZEOF_SHORT $ac_cv_sizeof_short
2632 EOF
2633
2634
2635
2636 echo $ac_n "checking for working const""... $ac_c" 1>&6
2637 echo "configure:2638: checking for working const" >&5
2638 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2639   echo $ac_n "(cached) $ac_c" 1>&6
2640 else
2641   cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644
2645 int main() {
2646
2647 /* Ultrix mips cc rejects this.  */
2648 typedef int charset[2]; const charset x;
2649 /* SunOS 4.1.1 cc rejects this.  */
2650 char const *const *ccp;
2651 char **p;
2652 /* NEC SVR4.0.2 mips cc rejects this.  */
2653 struct point {int x, y;};
2654 static struct point const zero = {0,0};
2655 /* AIX XL C 1.02.0.0 rejects this.
2656    It does not let you subtract one const X* pointer from another in an arm
2657    of an if-expression whose if-part is not a constant expression */
2658 const char *g = "string";
2659 ccp = &g + (g ? g-g : 0);
2660 /* HPUX 7.0 cc rejects these. */
2661 ++ccp;
2662 p = (char**) ccp;
2663 ccp = (char const *const *) p;
2664 { /* SCO 3.2v4 cc rejects this.  */
2665   char *t;
2666   char const *s = 0 ? (char *) 0 : (char const *) 0;
2667
2668   *t++ = 0;
2669 }
2670 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2671   int x[] = {25, 17};
2672   const int *foo = &x[0];
2673   ++foo;
2674 }
2675 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2676   typedef const int *iptr;
2677   iptr p = 0;
2678   ++p;
2679 }
2680 { /* AIX XL C 1.02.0.0 rejects this saying
2681      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2682   struct s { int j; const int *ap[3]; };
2683   struct s *b; b->j = 5;
2684 }
2685 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2686   const int foo = 10;
2687 }
2688
2689 ; return 0; }
2690 EOF
2691 if { (eval echo configure:2692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2692   rm -rf conftest*
2693   ac_cv_c_const=yes
2694 else
2695   echo "configure: failed program was:" >&5
2696   cat conftest.$ac_ext >&5
2697   rm -rf conftest*
2698   ac_cv_c_const=no
2699 fi
2700 rm -f conftest*
2701 fi
2702
2703 echo "$ac_t""$ac_cv_c_const" 1>&6
2704 if test $ac_cv_c_const = no; then
2705   cat >> confdefs.h <<\EOF
2706 #define const 
2707 EOF
2708
2709 fi
2710
2711 echo $ac_n "checking for inline""... $ac_c" 1>&6
2712 echo "configure:2713: checking for inline" >&5
2713 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2714   echo $ac_n "(cached) $ac_c" 1>&6
2715 else
2716   ac_cv_c_inline=no
2717 for ac_kw in inline __inline__ __inline; do
2718   cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721
2722 int main() {
2723 } $ac_kw foo() {
2724 ; return 0; }
2725 EOF
2726 if { (eval echo configure:2727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2727   rm -rf conftest*
2728   ac_cv_c_inline=$ac_kw; break
2729 else
2730   echo "configure: failed program was:" >&5
2731   cat conftest.$ac_ext >&5
2732 fi
2733 rm -f conftest*
2734 done
2735
2736 fi
2737
2738 echo "$ac_t""$ac_cv_c_inline" 1>&6
2739 case "$ac_cv_c_inline" in
2740   inline | yes) ;;
2741   no) cat >> confdefs.h <<\EOF
2742 #define inline 
2743 EOF
2744  ;;
2745   *)  cat >> confdefs.h <<EOF
2746 #define inline $ac_cv_c_inline
2747 EOF
2748  ;;
2749 esac
2750
2751 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2752 echo "configure:2753: checking whether byte ordering is bigendian" >&5
2753 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2754   echo $ac_n "(cached) $ac_c" 1>&6
2755 else
2756   ac_cv_c_bigendian=unknown
2757 # See if sys/param.h defines the BYTE_ORDER macro.
2758 cat > conftest.$ac_ext <<EOF
2759 #line 2760 "configure"
2760 #include "confdefs.h"
2761 #include <sys/types.h>
2762 #include <sys/param.h>
2763 int main() {
2764
2765 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2766  bogus endian macros
2767 #endif
2768 ; return 0; }
2769 EOF
2770 if { (eval echo configure:2771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2771   rm -rf conftest*
2772   # It does; now see whether it defined to BIG_ENDIAN or not.
2773 cat > conftest.$ac_ext <<EOF
2774 #line 2775 "configure"
2775 #include "confdefs.h"
2776 #include <sys/types.h>
2777 #include <sys/param.h>
2778 int main() {
2779
2780 #if BYTE_ORDER != BIG_ENDIAN
2781  not big endian
2782 #endif
2783 ; return 0; }
2784 EOF
2785 if { (eval echo configure:2786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2786   rm -rf conftest*
2787   ac_cv_c_bigendian=yes
2788 else
2789   echo "configure: failed program was:" >&5
2790   cat conftest.$ac_ext >&5
2791   rm -rf conftest*
2792   ac_cv_c_bigendian=no
2793 fi
2794 rm -f conftest*
2795 else
2796   echo "configure: failed program was:" >&5
2797   cat conftest.$ac_ext >&5
2798 fi
2799 rm -f conftest*
2800 if test $ac_cv_c_bigendian = unknown; then
2801 if test "$cross_compiling" = yes; then
2802     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2803 else
2804   cat > conftest.$ac_ext <<EOF
2805 #line 2806 "configure"
2806 #include "confdefs.h"
2807 main () {
2808   /* Are we little or big endian?  From Harbison&Steele.  */
2809   union
2810   {
2811     long l;
2812     char c[sizeof (long)];
2813   } u;
2814   u.l = 1;
2815   exit (u.c[sizeof (long) - 1] == 1);
2816 }
2817 EOF
2818 if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2819 then
2820   ac_cv_c_bigendian=no
2821 else
2822   echo "configure: failed program was:" >&5
2823   cat conftest.$ac_ext >&5
2824   rm -fr conftest*
2825   ac_cv_c_bigendian=yes
2826 fi
2827 rm -fr conftest*
2828 fi
2829
2830 fi
2831 fi
2832
2833 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2834 if test $ac_cv_c_bigendian = yes; then
2835   cat >> confdefs.h <<\EOF
2836 #define WORDS_BIGENDIAN 1
2837 EOF
2838
2839 fi
2840
2841 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2842 echo "configure:2843: checking whether char is unsigned" >&5
2843 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2844   echo $ac_n "(cached) $ac_c" 1>&6
2845 else
2846   if test "$GCC" = yes; then
2847   # GCC predefines this symbol on systems where it applies.
2848 cat > conftest.$ac_ext <<EOF
2849 #line 2850 "configure"
2850 #include "confdefs.h"
2851 #ifdef __CHAR_UNSIGNED__
2852   yes
2853 #endif
2854
2855 EOF
2856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2857   egrep "yes" >/dev/null 2>&1; then
2858   rm -rf conftest*
2859   ac_cv_c_char_unsigned=yes
2860 else
2861   rm -rf conftest*
2862   ac_cv_c_char_unsigned=no
2863 fi
2864 rm -f conftest*
2865
2866 else
2867 if test "$cross_compiling" = yes; then
2868     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2869 else
2870   cat > conftest.$ac_ext <<EOF
2871 #line 2872 "configure"
2872 #include "confdefs.h"
2873 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2874 #if !defined(__STDC__) || __STDC__ != 1
2875 #define volatile
2876 #endif
2877 main() {
2878   volatile char c = 255; exit(c < 0);
2879 }
2880 EOF
2881 if { (eval echo configure:2882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2882 then
2883   ac_cv_c_char_unsigned=yes
2884 else
2885   echo "configure: failed program was:" >&5
2886   cat conftest.$ac_ext >&5
2887   rm -fr conftest*
2888   ac_cv_c_char_unsigned=no
2889 fi
2890 rm -fr conftest*
2891 fi
2892
2893 fi
2894 fi
2895
2896 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2897 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2898   cat >> confdefs.h <<\EOF
2899 #define __CHAR_UNSIGNED__ 1
2900 EOF
2901
2902 fi
2903
2904
2905 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2906 echo "configure:2907: checking return type of signal handlers" >&5
2907 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910   cat > conftest.$ac_ext <<EOF
2911 #line 2912 "configure"
2912 #include "confdefs.h"
2913 #include <sys/types.h>
2914 #include <signal.h>
2915 #ifdef signal
2916 #undef signal
2917 #endif
2918 #ifdef __cplusplus
2919 extern "C" void (*signal (int, void (*)(int)))(int);
2920 #else
2921 void (*signal ()) ();
2922 #endif
2923
2924 int main() {
2925 int i;
2926 ; return 0; }
2927 EOF
2928 if { (eval echo configure:2929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2929   rm -rf conftest*
2930   ac_cv_type_signal=void
2931 else
2932   echo "configure: failed program was:" >&5
2933   cat conftest.$ac_ext >&5
2934   rm -rf conftest*
2935   ac_cv_type_signal=int
2936 fi
2937 rm -f conftest*
2938 fi
2939
2940 echo "$ac_t""$ac_cv_type_signal" 1>&6
2941 cat >> confdefs.h <<EOF
2942 #define RETSIGTYPE $ac_cv_type_signal
2943 EOF
2944
2945
2946 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2947 echo "configure:2948: checking for uid_t in sys/types.h" >&5
2948 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2949   echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951   cat > conftest.$ac_ext <<EOF
2952 #line 2953 "configure"
2953 #include "confdefs.h"
2954 #include <sys/types.h>
2955 EOF
2956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2957   egrep "uid_t" >/dev/null 2>&1; then
2958   rm -rf conftest*
2959   ac_cv_type_uid_t=yes
2960 else
2961   rm -rf conftest*
2962   ac_cv_type_uid_t=no
2963 fi
2964 rm -f conftest*
2965
2966 fi
2967
2968 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2969 if test $ac_cv_type_uid_t = no; then
2970   cat >> confdefs.h <<\EOF
2971 #define uid_t int
2972 EOF
2973
2974   cat >> confdefs.h <<\EOF
2975 #define gid_t int
2976 EOF
2977
2978 fi
2979
2980 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2981 echo "configure:2982: checking for mode_t" >&5
2982 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   cat > conftest.$ac_ext <<EOF
2986 #line 2987 "configure"
2987 #include "confdefs.h"
2988 #include <sys/types.h>
2989 #if STDC_HEADERS
2990 #include <stdlib.h>
2991 #include <stddef.h>
2992 #endif
2993 EOF
2994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2995   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2996   rm -rf conftest*
2997   ac_cv_type_mode_t=yes
2998 else
2999   rm -rf conftest*
3000   ac_cv_type_mode_t=no
3001 fi
3002 rm -f conftest*
3003
3004 fi
3005 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3006 if test $ac_cv_type_mode_t = no; then
3007   cat >> confdefs.h <<\EOF
3008 #define mode_t int
3009 EOF
3010
3011 fi
3012
3013 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3014 echo "configure:3015: checking for off_t" >&5
3015 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3016   echo $ac_n "(cached) $ac_c" 1>&6
3017 else
3018   cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021 #include <sys/types.h>
3022 #if STDC_HEADERS
3023 #include <stdlib.h>
3024 #include <stddef.h>
3025 #endif
3026 EOF
3027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3028   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3029   rm -rf conftest*
3030   ac_cv_type_off_t=yes
3031 else
3032   rm -rf conftest*
3033   ac_cv_type_off_t=no
3034 fi
3035 rm -f conftest*
3036
3037 fi
3038 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3039 if test $ac_cv_type_off_t = no; then
3040   cat >> confdefs.h <<\EOF
3041 #define off_t long
3042 EOF
3043
3044 fi
3045
3046 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3047 echo "configure:3048: checking for size_t" >&5
3048 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3049   echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051   cat > conftest.$ac_ext <<EOF
3052 #line 3053 "configure"
3053 #include "confdefs.h"
3054 #include <sys/types.h>
3055 #if STDC_HEADERS
3056 #include <stdlib.h>
3057 #include <stddef.h>
3058 #endif
3059 EOF
3060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3061   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3062   rm -rf conftest*
3063   ac_cv_type_size_t=yes
3064 else
3065   rm -rf conftest*
3066   ac_cv_type_size_t=no
3067 fi
3068 rm -f conftest*
3069
3070 fi
3071 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3072 if test $ac_cv_type_size_t = no; then
3073   cat >> confdefs.h <<\EOF
3074 #define size_t unsigned
3075 EOF
3076
3077 fi
3078
3079 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3080 echo "configure:3081: checking for pid_t" >&5
3081 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087 #include <sys/types.h>
3088 #if STDC_HEADERS
3089 #include <stdlib.h>
3090 #include <stddef.h>
3091 #endif
3092 EOF
3093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3094   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3095   rm -rf conftest*
3096   ac_cv_type_pid_t=yes
3097 else
3098   rm -rf conftest*
3099   ac_cv_type_pid_t=no
3100 fi
3101 rm -f conftest*
3102
3103 fi
3104 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3105 if test $ac_cv_type_pid_t = no; then
3106   cat >> confdefs.h <<\EOF
3107 #define pid_t int
3108 EOF
3109
3110 fi
3111
3112 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3113 echo "configure:3114: checking for st_rdev in struct stat" >&5
3114 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117   cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <sys/types.h>
3121 #include <sys/stat.h>
3122 int main() {
3123 struct stat s; s.st_rdev;
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3127   rm -rf conftest*
3128   ac_cv_struct_st_rdev=yes
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   ac_cv_struct_st_rdev=no
3134 fi
3135 rm -f conftest*
3136 fi
3137
3138 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3139 if test $ac_cv_struct_st_rdev = yes; then
3140   cat >> confdefs.h <<\EOF
3141 #define HAVE_ST_RDEV 1
3142 EOF
3143
3144 fi
3145
3146 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3147 echo "configure:3148: checking for d_off in dirent" >&5
3148 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3154
3155 #include <unistd.h>
3156 #include <sys/types.h>
3157 #include <dirent.h>
3158 int main() {
3159 struct dirent d; d.d_off;
3160 ; return 0; }
3161 EOF
3162 if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3163   rm -rf conftest*
3164   ac_cv_dirent_d_off=yes
3165 else
3166   echo "configure: failed program was:" >&5
3167   cat conftest.$ac_ext >&5
3168   rm -rf conftest*
3169   ac_cv_dirent_d_off=no
3170 fi
3171 rm -f conftest*
3172 fi
3173
3174 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3175 if test $ac_cv_dirent_d_off = yes; then
3176   cat >> confdefs.h <<\EOF
3177 #define HAVE_DIRENT_D_OFF 1
3178 EOF
3179
3180 fi
3181
3182 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3183 echo "configure:3184: checking for ino_t" >&5
3184 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3185   echo $ac_n "(cached) $ac_c" 1>&6
3186 else
3187   cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190 #include <sys/types.h>
3191 #if STDC_HEADERS
3192 #include <stdlib.h>
3193 #include <stddef.h>
3194 #endif
3195 EOF
3196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3197   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3198   rm -rf conftest*
3199   ac_cv_type_ino_t=yes
3200 else
3201   rm -rf conftest*
3202   ac_cv_type_ino_t=no
3203 fi
3204 rm -f conftest*
3205
3206 fi
3207 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3208 if test $ac_cv_type_ino_t = no; then
3209   cat >> confdefs.h <<\EOF
3210 #define ino_t unsigned
3211 EOF
3212
3213 fi
3214
3215 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3216 echo "configure:3217: checking for loff_t" >&5
3217 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   cat > conftest.$ac_ext <<EOF
3221 #line 3222 "configure"
3222 #include "confdefs.h"
3223 #include <sys/types.h>
3224 #if STDC_HEADERS
3225 #include <stdlib.h>
3226 #include <stddef.h>
3227 #endif
3228 EOF
3229 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3230   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3231   rm -rf conftest*
3232   ac_cv_type_loff_t=yes
3233 else
3234   rm -rf conftest*
3235   ac_cv_type_loff_t=no
3236 fi
3237 rm -f conftest*
3238
3239 fi
3240 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3241 if test $ac_cv_type_loff_t = no; then
3242   cat >> confdefs.h <<\EOF
3243 #define loff_t off_t
3244 EOF
3245
3246 fi
3247
3248 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3249 echo "configure:3250: checking for offset_t" >&5
3250 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3251   echo $ac_n "(cached) $ac_c" 1>&6
3252 else
3253   cat > conftest.$ac_ext <<EOF
3254 #line 3255 "configure"
3255 #include "confdefs.h"
3256 #include <sys/types.h>
3257 #if STDC_HEADERS
3258 #include <stdlib.h>
3259 #include <stddef.h>
3260 #endif
3261 EOF
3262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3263   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3264   rm -rf conftest*
3265   ac_cv_type_offset_t=yes
3266 else
3267   rm -rf conftest*
3268   ac_cv_type_offset_t=no
3269 fi
3270 rm -f conftest*
3271
3272 fi
3273 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3274 if test $ac_cv_type_offset_t = no; then
3275   cat >> confdefs.h <<\EOF
3276 #define offset_t loff_t
3277 EOF
3278
3279 fi
3280
3281 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3282 echo "configure:3283: checking for ssize_t" >&5
3283 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3284   echo $ac_n "(cached) $ac_c" 1>&6
3285 else
3286   cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3289 #include <sys/types.h>
3290 #if STDC_HEADERS
3291 #include <stdlib.h>
3292 #include <stddef.h>
3293 #endif
3294 EOF
3295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3296   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3297   rm -rf conftest*
3298   ac_cv_type_ssize_t=yes
3299 else
3300   rm -rf conftest*
3301   ac_cv_type_ssize_t=no
3302 fi
3303 rm -f conftest*
3304
3305 fi
3306 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3307 if test $ac_cv_type_ssize_t = no; then
3308   cat >> confdefs.h <<\EOF
3309 #define ssize_t int
3310 EOF
3311
3312 fi
3313
3314 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3315 echo "configure:3316: checking for wchar_t" >&5
3316 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   cat > conftest.$ac_ext <<EOF
3320 #line 3321 "configure"
3321 #include "confdefs.h"
3322 #include <sys/types.h>
3323 #if STDC_HEADERS
3324 #include <stdlib.h>
3325 #include <stddef.h>
3326 #endif
3327 EOF
3328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3329   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3330   rm -rf conftest*
3331   ac_cv_type_wchar_t=yes
3332 else
3333   rm -rf conftest*
3334   ac_cv_type_wchar_t=no
3335 fi
3336 rm -f conftest*
3337
3338 fi
3339 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3340 if test $ac_cv_type_wchar_t = no; then
3341   cat >> confdefs.h <<\EOF
3342 #define wchar_t unsigned short
3343 EOF
3344
3345 fi
3346
3347
3348 ############################################
3349 # for cups support we need libcups, and a handful of header files
3350
3351 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3352 echo "configure:3353: checking for httpConnect in -lcups" >&5
3353 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   ac_save_LIBS="$LIBS"
3358 LIBS="-lcups  $LIBS"
3359 cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 /* Override any gcc2 internal prototype to avoid an error.  */
3363 /* We use char because int might match the return type of a gcc2
3364     builtin and then its argument prototype would still apply.  */
3365 char httpConnect();
3366
3367 int main() {
3368 httpConnect()
3369 ; return 0; }
3370 EOF
3371 if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3372   rm -rf conftest*
3373   eval "ac_cv_lib_$ac_lib_var=yes"
3374 else
3375   echo "configure: failed program was:" >&5
3376   cat conftest.$ac_ext >&5
3377   rm -rf conftest*
3378   eval "ac_cv_lib_$ac_lib_var=no"
3379 fi
3380 rm -f conftest*
3381 LIBS="$ac_save_LIBS"
3382
3383 fi
3384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3385   echo "$ac_t""yes" 1>&6
3386     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3387     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3388   cat >> confdefs.h <<EOF
3389 #define $ac_tr_lib 1
3390 EOF
3391
3392   LIBS="-lcups $LIBS"
3393
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398
3399 # I wonder if there is a nicer way of doing this?
3400
3401 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3402         for ac_hdr in cups/cups.h cups/language.h
3403 do
3404 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3405 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_hdr" >&5
3407 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <$ac_hdr>
3414 EOF
3415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3416 { (eval echo configure:3417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3418 if test -z "$ac_err"; then
3419   rm -rf conftest*
3420   eval "ac_cv_header_$ac_safe=yes"
3421 else
3422   echo "$ac_err" >&5
3423   echo "configure: failed program was:" >&5
3424   cat conftest.$ac_ext >&5
3425   rm -rf conftest*
3426   eval "ac_cv_header_$ac_safe=no"
3427 fi
3428 rm -f conftest*
3429 fi
3430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3431   echo "$ac_t""yes" 1>&6
3432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3433   cat >> confdefs.h <<EOF
3434 #define $ac_tr_hdr 1
3435 EOF
3436  
3437 else
3438   echo "$ac_t""no" 1>&6
3439 fi
3440 done
3441
3442         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3443                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3444                         cat >> confdefs.h <<\EOF
3445 #define HAVE_CUPS 1
3446 EOF
3447
3448                 fi
3449         fi
3450 fi
3451
3452 ############################################
3453 # we need libdl for PAM and the new VFS code
3454 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3455 echo "configure:3456: checking for dlopen in -ldl" >&5
3456 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   ac_save_LIBS="$LIBS"
3461 LIBS="-ldl  $LIBS"
3462 cat > conftest.$ac_ext <<EOF
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465 /* Override any gcc2 internal prototype to avoid an error.  */
3466 /* We use char because int might match the return type of a gcc2
3467     builtin and then its argument prototype would still apply.  */
3468 char dlopen();
3469
3470 int main() {
3471 dlopen()
3472 ; return 0; }
3473 EOF
3474 if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3475   rm -rf conftest*
3476   eval "ac_cv_lib_$ac_lib_var=yes"
3477 else
3478   echo "configure: failed program was:" >&5
3479   cat conftest.$ac_ext >&5
3480   rm -rf conftest*
3481   eval "ac_cv_lib_$ac_lib_var=no"
3482 fi
3483 rm -f conftest*
3484 LIBS="$ac_save_LIBS"
3485
3486 fi
3487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3488   echo "$ac_t""yes" 1>&6
3489   LIBS="$LIBS -ldl";
3490         cat >> confdefs.h <<\EOF
3491 #define HAVE_LIBDL 1
3492 EOF
3493
3494 else
3495   echo "$ac_t""no" 1>&6
3496 fi
3497
3498
3499 ############################################
3500 # check if the compiler can do immediate structures
3501 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3502 echo "configure:3503: checking for immediate structures" >&5
3503 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3504   echo $ac_n "(cached) $ac_c" 1>&6
3505 else
3506   
3507     cat > conftest.$ac_ext <<EOF
3508 #line 3509 "configure"
3509 #include "confdefs.h"
3510
3511 #include <stdio.h>
3512 int main() {
3513
3514    #define X_FOOBAR(x) ((FOOBAR) { x })
3515    typedef struct {unsigned x;} FOOBAR;
3516    FOOBAR f = X_FOOBAR(1);   
3517
3518 ; return 0; }
3519 EOF
3520 if { (eval echo configure:3521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3521   rm -rf conftest*
3522   samba_cv_immediate_structures=yes
3523 else
3524   echo "configure: failed program was:" >&5
3525   cat conftest.$ac_ext >&5
3526   rm -rf conftest*
3527   samba_cv_immediate_structures=no
3528 fi
3529 rm -f conftest*
3530 fi
3531
3532 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3533 if test x"$samba_cv_immediate_structures" = x"yes"; then
3534    cat >> confdefs.h <<\EOF
3535 #define HAVE_IMMEDIATE_STRUCTURES 1
3536 EOF
3537
3538 fi
3539
3540 ############################################
3541 # check for unix domain sockets
3542 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3543 echo "configure:3544: checking for unix domain sockets" >&5
3544 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3545   echo $ac_n "(cached) $ac_c" 1>&6
3546 else
3547   
3548     cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551
3552 #include <sys/types.h>
3553 #include <stdlib.h>
3554 #include <stddef.h>
3555 #include <sys/socket.h>
3556 #include <sys/un.h>
3557 int main() {
3558
3559   struct sockaddr_un sunaddr; 
3560   sunaddr.sun_family = AF_UNIX;
3561
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3565   rm -rf conftest*
3566   samba_cv_unixsocket=yes
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   samba_cv_unixsocket=no
3572 fi
3573 rm -f conftest*
3574 fi
3575
3576 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3577 if test x"$samba_cv_unixsocket" = x"yes"; then
3578    cat >> confdefs.h <<\EOF
3579 #define HAVE_UNIXSOCKET 1
3580 EOF
3581
3582 fi
3583
3584
3585 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3586 echo "configure:3587: checking for socklen_t type" >&5
3587 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3588   echo $ac_n "(cached) $ac_c" 1>&6
3589 else
3590   
3591     cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594
3595 #include <sys/types.h>
3596 #if STDC_HEADERS
3597 #include <stdlib.h>
3598 #include <stddef.h>
3599 #endif
3600 #include <sys/socket.h>
3601 int main() {
3602 socklen_t i = 0
3603 ; return 0; }
3604 EOF
3605 if { (eval echo configure:3606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3606   rm -rf conftest*
3607   samba_cv_socklen_t=yes
3608 else
3609   echo "configure: failed program was:" >&5
3610   cat conftest.$ac_ext >&5
3611   rm -rf conftest*
3612   samba_cv_socklen_t=no
3613 fi
3614 rm -f conftest*
3615 fi
3616
3617 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3618 if test x"$samba_cv_socklen_t" = x"yes"; then
3619    cat >> confdefs.h <<\EOF
3620 #define HAVE_SOCKLEN_T_TYPE 1
3621 EOF
3622
3623 fi
3624
3625 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3626 echo "configure:3627: checking for sig_atomic_t type" >&5
3627 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630   
3631     cat > conftest.$ac_ext <<EOF
3632 #line 3633 "configure"
3633 #include "confdefs.h"
3634
3635 #include <sys/types.h>
3636 #if STDC_HEADERS
3637 #include <stdlib.h>
3638 #include <stddef.h>
3639 #endif
3640 #include <signal.h>
3641 int main() {
3642 sig_atomic_t i = 0
3643 ; return 0; }
3644 EOF
3645 if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3646   rm -rf conftest*
3647   samba_cv_sig_atomic_t=yes
3648 else
3649   echo "configure: failed program was:" >&5
3650   cat conftest.$ac_ext >&5
3651   rm -rf conftest*
3652   samba_cv_sig_atomic_t=no
3653 fi
3654 rm -f conftest*
3655 fi
3656
3657 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3658 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3659    cat >> confdefs.h <<\EOF
3660 #define HAVE_SIG_ATOMIC_T_TYPE 1
3661 EOF
3662
3663 fi
3664
3665 # stupid headers have the functions but no declaration. grrrr.
3666
3667  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3668 echo "configure:3669: checking for errno declaration" >&5
3669 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3670   echo $ac_n "(cached) $ac_c" 1>&6
3671 else
3672   
3673     cat > conftest.$ac_ext <<EOF
3674 #line 3675 "configure"
3675 #include "confdefs.h"
3676 #include <errno.h>
3677 int main() {
3678 int i = (int)errno
3679 ; return 0; }
3680 EOF
3681 if { (eval echo configure:3682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3682   rm -rf conftest*
3683   ac_cv_have_errno_decl=yes
3684 else
3685   echo "configure: failed program was:" >&5
3686   cat conftest.$ac_ext >&5
3687   rm -rf conftest*
3688   ac_cv_have_errno_decl=no
3689 fi
3690 rm -f conftest*
3691 fi
3692
3693 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3694  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3695     cat >> confdefs.h <<\EOF
3696 #define HAVE_ERRNO_DECL 1
3697 EOF
3698
3699  fi
3700
3701
3702  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3703 echo "configure:3704: checking for setresuid declaration" >&5
3704 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3705   echo $ac_n "(cached) $ac_c" 1>&6
3706 else
3707   
3708     cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #include <unistd.h>
3712 int main() {
3713 int i = (int)setresuid
3714 ; return 0; }
3715 EOF
3716 if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3717   rm -rf conftest*
3718   ac_cv_have_setresuid_decl=yes
3719 else
3720   echo "configure: failed program was:" >&5
3721   cat conftest.$ac_ext >&5
3722   rm -rf conftest*
3723   ac_cv_have_setresuid_decl=no
3724 fi
3725 rm -f conftest*
3726 fi
3727
3728 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3729  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3730     cat >> confdefs.h <<\EOF
3731 #define HAVE_SETRESUID_DECL 1
3732 EOF
3733
3734  fi
3735
3736
3737  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3738 echo "configure:3739: checking for setresgid declaration" >&5
3739 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3740   echo $ac_n "(cached) $ac_c" 1>&6
3741 else
3742   
3743     cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 #include <unistd.h>
3747 int main() {
3748 int i = (int)setresgid
3749 ; return 0; }
3750 EOF
3751 if { (eval echo configure:3752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3752   rm -rf conftest*
3753   ac_cv_have_setresgid_decl=yes
3754 else
3755   echo "configure: failed program was:" >&5
3756   cat conftest.$ac_ext >&5
3757   rm -rf conftest*
3758   ac_cv_have_setresgid_decl=no
3759 fi
3760 rm -f conftest*
3761 fi
3762
3763 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3764  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3765     cat >> confdefs.h <<\EOF
3766 #define HAVE_SETRESGID_DECL 1
3767 EOF
3768
3769  fi
3770
3771
3772  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3773 echo "configure:3774: checking for asprintf declaration" >&5
3774 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3775   echo $ac_n "(cached) $ac_c" 1>&6
3776 else
3777   
3778     cat > conftest.$ac_ext <<EOF
3779 #line 3780 "configure"
3780 #include "confdefs.h"
3781 #include <stdio.h>
3782 int main() {
3783 int i = (int)asprintf
3784 ; return 0; }
3785 EOF
3786 if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3787   rm -rf conftest*
3788   ac_cv_have_asprintf_decl=yes
3789 else
3790   echo "configure: failed program was:" >&5
3791   cat conftest.$ac_ext >&5
3792   rm -rf conftest*
3793   ac_cv_have_asprintf_decl=no
3794 fi
3795 rm -f conftest*
3796 fi
3797
3798 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3799  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3800     cat >> confdefs.h <<\EOF
3801 #define HAVE_ASPRINTF_DECL 1
3802 EOF
3803
3804  fi
3805
3806
3807  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3808 echo "configure:3809: checking for vasprintf declaration" >&5
3809 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3810   echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812   
3813     cat > conftest.$ac_ext <<EOF
3814 #line 3815 "configure"
3815 #include "confdefs.h"
3816 #include <stdio.h>
3817 int main() {
3818 int i = (int)vasprintf
3819 ; return 0; }
3820 EOF
3821 if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3822   rm -rf conftest*
3823   ac_cv_have_vasprintf_decl=yes
3824 else
3825   echo "configure: failed program was:" >&5
3826   cat conftest.$ac_ext >&5
3827   rm -rf conftest*
3828   ac_cv_have_vasprintf_decl=no
3829 fi
3830 rm -f conftest*
3831 fi
3832
3833 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3834  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3835     cat >> confdefs.h <<\EOF
3836 #define HAVE_VASPRINTF_DECL 1
3837 EOF
3838
3839  fi
3840
3841
3842  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3843 echo "configure:3844: checking for vsnprintf declaration" >&5
3844 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3845   echo $ac_n "(cached) $ac_c" 1>&6
3846 else
3847   
3848     cat > conftest.$ac_ext <<EOF
3849 #line 3850 "configure"
3850 #include "confdefs.h"
3851 #include <stdio.h>
3852 int main() {
3853 int i = (int)vsnprintf
3854 ; return 0; }
3855 EOF
3856 if { (eval echo configure:3857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3857   rm -rf conftest*
3858   ac_cv_have_vsnprintf_decl=yes
3859 else
3860   echo "configure: failed program was:" >&5
3861   cat conftest.$ac_ext >&5
3862   rm -rf conftest*
3863   ac_cv_have_vsnprintf_decl=no
3864 fi
3865 rm -f conftest*
3866 fi
3867
3868 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3869  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3870     cat >> confdefs.h <<\EOF
3871 #define HAVE_VSNPRINTF_DECL 1
3872 EOF
3873
3874  fi
3875
3876
3877  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3878 echo "configure:3879: checking for snprintf declaration" >&5
3879 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3880   echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882   
3883     cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <stdio.h>
3887 int main() {
3888 int i = (int)snprintf
3889 ; return 0; }
3890 EOF
3891 if { (eval echo configure:3892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3892   rm -rf conftest*
3893   ac_cv_have_snprintf_decl=yes
3894 else
3895   echo "configure: failed program was:" >&5
3896   cat conftest.$ac_ext >&5
3897   rm -rf conftest*
3898   ac_cv_have_snprintf_decl=no
3899 fi
3900 rm -f conftest*
3901 fi
3902
3903 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3904  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3905     cat >> confdefs.h <<\EOF
3906 #define HAVE_SNPRINTF_DECL 1
3907 EOF
3908
3909  fi
3910
3911
3912 # and glibc has setresuid under linux but the function does
3913 # nothing until kernel 2.1.44! very dumb.
3914 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3915 echo "configure:3916: checking for real setresuid" >&5
3916 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3917   echo $ac_n "(cached) $ac_c" 1>&6
3918 else
3919   
3920     if test "$cross_compiling" = yes; then
3921   samba_cv_have_setresuid=cross
3922 else
3923   cat > conftest.$ac_ext <<EOF
3924 #line 3925 "configure"
3925 #include "confdefs.h"
3926 #include <errno.h>
3927 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3930 then
3931   samba_cv_have_setresuid=yes
3932 else
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -fr conftest*
3936   samba_cv_have_setresuid=no
3937 fi
3938 rm -fr conftest*
3939 fi
3940
3941 fi
3942
3943 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3944 if test x"$samba_cv_have_setresuid" = x"yes"; then
3945     cat >> confdefs.h <<\EOF
3946 #define HAVE_SETRESUID 1
3947 EOF
3948
3949 fi
3950
3951 # Do the same check for setresguid...
3952 #
3953 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3954 echo "configure:3955: checking for real setresgid" >&5
3955 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3956   echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958   
3959     if test "$cross_compiling" = yes; then
3960   samba_cv_have_setresgid=cross
3961 else
3962   cat > conftest.$ac_ext <<EOF
3963 #line 3964 "configure"
3964 #include "confdefs.h"
3965 #include <unistd.h>
3966 #include <errno.h>
3967 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3968 EOF
3969 if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3970 then
3971   samba_cv_have_setresgid=yes
3972 else
3973   echo "configure: failed program was:" >&5
3974   cat conftest.$ac_ext >&5
3975   rm -fr conftest*
3976   samba_cv_have_setresgid=no
3977 fi
3978 rm -fr conftest*
3979 fi
3980
3981 fi
3982
3983 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3984 if test x"$samba_cv_have_setresgid" = x"yes"; then
3985     cat >> confdefs.h <<\EOF
3986 #define HAVE_SETRESGID 1
3987 EOF
3988
3989 fi
3990
3991 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3992 echo "configure:3993: checking for 8-bit clean memcmp" >&5
3993 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3994   echo $ac_n "(cached) $ac_c" 1>&6
3995 else
3996   if test "$cross_compiling" = yes; then
3997   ac_cv_func_memcmp_clean=no
3998 else
3999   cat > conftest.$ac_ext <<EOF
4000 #line 4001 "configure"
4001 #include "confdefs.h"
4002
4003 main()
4004 {
4005   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4006   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4007 }
4008
4009 EOF
4010 if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4011 then
4012   ac_cv_func_memcmp_clean=yes
4013 else
4014   echo "configure: failed program was:" >&5
4015   cat conftest.$ac_ext >&5
4016   rm -fr conftest*
4017   ac_cv_func_memcmp_clean=no
4018 fi
4019 rm -fr conftest*
4020 fi
4021
4022 fi
4023
4024 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4025 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4026
4027
4028 ###############################################
4029 # test for where we get crypt() from
4030 for ac_func in crypt
4031 do
4032 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4033 echo "configure:4034: checking for $ac_func" >&5
4034 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4035   echo $ac_n "(cached) $ac_c" 1>&6
4036 else
4037   cat > conftest.$ac_ext <<EOF
4038 #line 4039 "configure"
4039 #include "confdefs.h"
4040 /* System header to define __stub macros and hopefully few prototypes,
4041     which can conflict with char $ac_func(); below.  */
4042 #include <assert.h>
4043 /* Override any gcc2 internal prototype to avoid an error.  */
4044 /* We use char because int might match the return type of a gcc2
4045     builtin and then its argument prototype would still apply.  */
4046 char $ac_func();
4047
4048 int main() {
4049
4050 /* The GNU C library defines this for functions which it implements
4051     to always fail with ENOSYS.  Some functions are actually named
4052     something starting with __ and the normal name is an alias.  */
4053 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4054 choke me
4055 #else
4056 $ac_func();
4057 #endif
4058
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4062   rm -rf conftest*
4063   eval "ac_cv_func_$ac_func=yes"
4064 else
4065   echo "configure: failed program was:" >&5
4066   cat conftest.$ac_ext >&5
4067   rm -rf conftest*
4068   eval "ac_cv_func_$ac_func=no"
4069 fi
4070 rm -f conftest*
4071 fi
4072
4073 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4074   echo "$ac_t""yes" 1>&6
4075     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4076   cat >> confdefs.h <<EOF
4077 #define $ac_tr_func 1
4078 EOF
4079  
4080 else
4081   echo "$ac_t""no" 1>&6
4082 fi
4083 done
4084
4085 if test x"$ac_cv_func_crypt" = x"no"; then
4086     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4087 echo "configure:4088: checking for crypt in -lcrypt" >&5
4088 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4089 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4090   echo $ac_n "(cached) $ac_c" 1>&6
4091 else
4092   ac_save_LIBS="$LIBS"
4093 LIBS="-lcrypt  $LIBS"
4094 cat > conftest.$ac_ext <<EOF
4095 #line 4096 "configure"
4096 #include "confdefs.h"
4097 /* Override any gcc2 internal prototype to avoid an error.  */
4098 /* We use char because int might match the return type of a gcc2
4099     builtin and then its argument prototype would still apply.  */
4100 char crypt();
4101
4102 int main() {
4103 crypt()
4104 ; return 0; }
4105 EOF
4106 if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4107   rm -rf conftest*
4108   eval "ac_cv_lib_$ac_lib_var=yes"
4109 else
4110   echo "configure: failed program was:" >&5
4111   cat conftest.$ac_ext >&5
4112   rm -rf conftest*
4113   eval "ac_cv_lib_$ac_lib_var=no"
4114 fi
4115 rm -f conftest*
4116 LIBS="$ac_save_LIBS"
4117
4118 fi
4119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4120   echo "$ac_t""yes" 1>&6
4121   LIBS="$LIBS -lcrypt";
4122         cat >> confdefs.h <<\EOF
4123 #define HAVE_CRYPT 1
4124 EOF
4125
4126 else
4127   echo "$ac_t""no" 1>&6
4128 fi
4129
4130 fi
4131
4132
4133 ###############################################
4134 # Readline included by default unless explicitly asked not to
4135 test "${with_readline+set}" != "set" && with_readline=yes
4136
4137 # test for where we get readline() from
4138 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4139 echo "configure:4140: checking whether to use readline" >&5
4140 # Check whether --with-readline or --without-readline was given.
4141 if test "${with_readline+set}" = set; then
4142   withval="$with_readline"
4143     case "$with_readline" in
4144   yes)
4145     echo "$ac_t""yes" 1>&6
4146
4147     for ac_hdr in readline.h history.h readline/readline.h
4148 do
4149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4151 echo "configure:4152: checking for $ac_hdr" >&5
4152 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4153   echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155   cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <$ac_hdr>
4159 EOF
4160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4161 { (eval echo configure:4162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4163 if test -z "$ac_err"; then
4164   rm -rf conftest*
4165   eval "ac_cv_header_$ac_safe=yes"
4166 else
4167   echo "$ac_err" >&5
4168   echo "configure: failed program was:" >&5
4169   cat conftest.$ac_ext >&5
4170   rm -rf conftest*
4171   eval "ac_cv_header_$ac_safe=no"
4172 fi
4173 rm -f conftest*
4174 fi
4175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4176   echo "$ac_t""yes" 1>&6
4177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4178   cat >> confdefs.h <<EOF
4179 #define $ac_tr_hdr 1
4180 EOF
4181  
4182 else
4183   echo "$ac_t""no" 1>&6
4184 fi
4185 done
4186
4187     for ac_hdr in readline/history.h
4188 do
4189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4191 echo "configure:4192: checking for $ac_hdr" >&5
4192 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4193   echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195   cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <$ac_hdr>
4199 EOF
4200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4201 { (eval echo configure:4202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4203 if test -z "$ac_err"; then
4204   rm -rf conftest*
4205   eval "ac_cv_header_$ac_safe=yes"
4206 else
4207   echo "$ac_err" >&5
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   eval "ac_cv_header_$ac_safe=no"
4212 fi
4213 rm -f conftest*
4214 fi
4215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4216   echo "$ac_t""yes" 1>&6
4217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4218   cat >> confdefs.h <<EOF
4219 #define $ac_tr_hdr 1
4220 EOF
4221  
4222 else
4223   echo "$ac_t""no" 1>&6
4224 fi
4225 done
4226
4227
4228     for ac_hdr in readline.h readline/readline.h
4229 do
4230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4232 echo "configure:4233: checking for $ac_hdr" >&5
4233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4234   echo $ac_n "(cached) $ac_c" 1>&6
4235 else
4236   cat > conftest.$ac_ext <<EOF
4237 #line 4238 "configure"
4238 #include "confdefs.h"
4239 #include <$ac_hdr>
4240 EOF
4241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4242 { (eval echo configure:4243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4244 if test -z "$ac_err"; then
4245   rm -rf conftest*
4246   eval "ac_cv_header_$ac_safe=yes"
4247 else
4248   echo "$ac_err" >&5
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -rf conftest*
4252   eval "ac_cv_header_$ac_safe=no"
4253 fi
4254 rm -f conftest*
4255 fi
4256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4257   echo "$ac_t""yes" 1>&6
4258     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4259   cat >> confdefs.h <<EOF
4260 #define $ac_tr_hdr 1
4261 EOF
4262  
4263       for termlib in ncurses curses termcap terminfo termlib; do
4264        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4265 echo "configure:4266: checking for tgetent in -l${termlib}" >&5
4266 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4267 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4268   echo $ac_n "(cached) $ac_c" 1>&6
4269 else
4270   ac_save_LIBS="$LIBS"
4271 LIBS="-l${termlib}  $LIBS"
4272 cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275 /* Override any gcc2 internal prototype to avoid an error.  */
4276 /* We use char because int might match the return type of a gcc2
4277     builtin and then its argument prototype would still apply.  */
4278 char tgetent();
4279
4280 int main() {
4281 tgetent()
4282 ; return 0; }
4283 EOF
4284 if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4285   rm -rf conftest*
4286   eval "ac_cv_lib_$ac_lib_var=yes"
4287 else
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -rf conftest*
4291   eval "ac_cv_lib_$ac_lib_var=no"
4292 fi
4293 rm -f conftest*
4294 LIBS="$ac_save_LIBS"
4295
4296 fi
4297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4298   echo "$ac_t""yes" 1>&6
4299   TERMLIBS="-l${termlib}"; break
4300 else
4301   echo "$ac_t""no" 1>&6
4302 fi
4303
4304       done
4305       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4306 echo "configure:4307: checking for rl_callback_handler_install in -lreadline" >&5
4307 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4309   echo $ac_n "(cached) $ac_c" 1>&6
4310 else
4311   ac_save_LIBS="$LIBS"
4312 LIBS="-lreadline $TERMLIBS $LIBS"
4313 cat > conftest.$ac_ext <<EOF
4314 #line 4315 "configure"
4315 #include "confdefs.h"
4316 /* Override any gcc2 internal prototype to avoid an error.  */
4317 /* We use char because int might match the return type of a gcc2
4318     builtin and then its argument prototype would still apply.  */
4319 char rl_callback_handler_install();
4320
4321 int main() {
4322 rl_callback_handler_install()
4323 ; return 0; }
4324 EOF
4325 if { (eval echo configure:4326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4326   rm -rf conftest*
4327   eval "ac_cv_lib_$ac_lib_var=yes"
4328 else
4329   echo "configure: failed program was:" >&5
4330   cat conftest.$ac_ext >&5
4331   rm -rf conftest*
4332   eval "ac_cv_lib_$ac_lib_var=no"
4333 fi
4334 rm -f conftest*
4335 LIBS="$ac_save_LIBS"
4336
4337 fi
4338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4339   echo "$ac_t""yes" 1>&6
4340   TERMLIBS="-lreadline $TERMLIBS"
4341        cat >> confdefs.h <<\EOF
4342 #define HAVE_LIBREADLINE 1
4343 EOF
4344
4345        break
4346 else
4347   echo "$ac_t""no" 1>&6
4348 TERMLIBS=
4349 fi
4350
4351 else
4352   echo "$ac_t""no" 1>&6
4353 fi
4354 done
4355
4356     ;;
4357   no)
4358     echo "$ac_t""no" 1>&6
4359     ;;
4360   *)
4361     echo "$ac_t""yes" 1>&6
4362
4363     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4364     # alternate readline path
4365     _ldflags=${LDFLAGS}
4366     _cppflags=${CPPFLAGS}
4367
4368     # Add additional search path
4369     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4370     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4371
4372     for ac_hdr in readline.h history.h readline/readline.h
4373 do
4374 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4375 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4376 echo "configure:4377: checking for $ac_hdr" >&5
4377 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4378   echo $ac_n "(cached) $ac_c" 1>&6
4379 else
4380   cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383 #include <$ac_hdr>
4384 EOF
4385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4386 { (eval echo configure:4387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4388 if test -z "$ac_err"; then
4389   rm -rf conftest*
4390   eval "ac_cv_header_$ac_safe=yes"
4391 else
4392   echo "$ac_err" >&5
4393   echo "configure: failed program was:" >&5
4394   cat conftest.$ac_ext >&5
4395   rm -rf conftest*
4396   eval "ac_cv_header_$ac_safe=no"
4397 fi
4398 rm -f conftest*
4399 fi
4400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4401   echo "$ac_t""yes" 1>&6
4402     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4403   cat >> confdefs.h <<EOF
4404 #define $ac_tr_hdr 1
4405 EOF
4406  
4407 else
4408   echo "$ac_t""no" 1>&6
4409 fi
4410 done
4411
4412     for ac_hdr in readline/history.h
4413 do
4414 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4415 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4416 echo "configure:4417: checking for $ac_hdr" >&5
4417 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4418   echo $ac_n "(cached) $ac_c" 1>&6
4419 else
4420   cat > conftest.$ac_ext <<EOF
4421 #line 4422 "configure"
4422 #include "confdefs.h"
4423 #include <$ac_hdr>
4424 EOF
4425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4426 { (eval echo configure:4427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4428 if test -z "$ac_err"; then
4429   rm -rf conftest*
4430   eval "ac_cv_header_$ac_safe=yes"
4431 else
4432   echo "$ac_err" >&5
4433   echo "configure: failed program was:" >&5
4434   cat conftest.$ac_ext >&5
4435   rm -rf conftest*
4436   eval "ac_cv_header_$ac_safe=no"
4437 fi
4438 rm -f conftest*
4439 fi
4440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4441   echo "$ac_t""yes" 1>&6
4442     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4443   cat >> confdefs.h <<EOF
4444 #define $ac_tr_hdr 1
4445 EOF
4446  
4447 else
4448   echo "$ac_t""no" 1>&6
4449 fi
4450 done
4451
4452
4453     for ac_hdr in readline.h readline/readline.h
4454 do
4455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4456 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4457 echo "configure:4458: checking for $ac_hdr" >&5
4458 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4459   echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461   cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4464 #include <$ac_hdr>
4465 EOF
4466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4467 { (eval echo configure:4468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4469 if test -z "$ac_err"; then
4470   rm -rf conftest*
4471   eval "ac_cv_header_$ac_safe=yes"
4472 else
4473   echo "$ac_err" >&5
4474   echo "configure: failed program was:" >&5
4475   cat conftest.$ac_ext >&5
4476   rm -rf conftest*
4477   eval "ac_cv_header_$ac_safe=no"
4478 fi
4479 rm -f conftest*
4480 fi
4481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4482   echo "$ac_t""yes" 1>&6
4483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4484   cat >> confdefs.h <<EOF
4485 #define $ac_tr_hdr 1
4486 EOF
4487  
4488       for termlib in ncurses curses termcap terminfo termlib; do
4489        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4490 echo "configure:4491: checking for tgetent in -l${termlib}" >&5
4491 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4492 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4493   echo $ac_n "(cached) $ac_c" 1>&6
4494 else
4495   ac_save_LIBS="$LIBS"
4496 LIBS="-l${termlib}  $LIBS"
4497 cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 /* Override any gcc2 internal prototype to avoid an error.  */
4501 /* We use char because int might match the return type of a gcc2
4502     builtin and then its argument prototype would still apply.  */
4503 char tgetent();
4504
4505 int main() {
4506 tgetent()
4507 ; return 0; }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510   rm -rf conftest*
4511   eval "ac_cv_lib_$ac_lib_var=yes"
4512 else
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -rf conftest*
4516   eval "ac_cv_lib_$ac_lib_var=no"
4517 fi
4518 rm -f conftest*
4519 LIBS="$ac_save_LIBS"
4520
4521 fi
4522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4523   echo "$ac_t""yes" 1>&6
4524   TERMLIBS="-l${termlib}"; break
4525 else
4526   echo "$ac_t""no" 1>&6
4527 fi
4528
4529       done
4530       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4531 echo "configure:4532: checking for rl_callback_handler_install in -lreadline" >&5
4532 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4533 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4534   echo $ac_n "(cached) $ac_c" 1>&6
4535 else
4536   ac_save_LIBS="$LIBS"
4537 LIBS="-lreadline $TERMLIBS $LIBS"
4538 cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 /* Override any gcc2 internal prototype to avoid an error.  */
4542 /* We use char because int might match the return type of a gcc2
4543     builtin and then its argument prototype would still apply.  */
4544 char rl_callback_handler_install();
4545
4546 int main() {
4547 rl_callback_handler_install()
4548 ; return 0; }
4549 EOF
4550 if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4551   rm -rf conftest*
4552   eval "ac_cv_lib_$ac_lib_var=yes"
4553 else
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -rf conftest*
4557   eval "ac_cv_lib_$ac_lib_var=no"
4558 fi
4559 rm -f conftest*
4560 LIBS="$ac_save_LIBS"
4561
4562 fi
4563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4564   echo "$ac_t""yes" 1>&6
4565   TERMLDFLAGS="-L$with_readline/lib"
4566        TERMCPPFLAGS="-I$with_readline/include"
4567        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4568        TERMLIBS="-lreadline $TERMLIBS"
4569        cat >> confdefs.h <<\EOF
4570 #define HAVE_LIBREADLINE 1
4571 EOF
4572
4573        break
4574 else
4575   echo "$ac_t""no" 1>&6
4576 TERMLIBS= CPPFLAGS=$_cppflags
4577 fi
4578
4579 else
4580   echo "$ac_t""no" 1>&6
4581 fi
4582 done
4583
4584
4585     LDFLAGS=$_ldflags
4586     ;;
4587   esac
4588 else
4589   echo "$ac_t""no" 1>&6
4590
4591 fi
4592
4593
4594
4595
4596 # The readline API changed slightly from readline3 to readline4, so
4597 # code will generate warnings on one of them unless we have a few
4598 # special cases.
4599 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4600 echo "configure:4601: checking for rl_completion_matches in -lreadline" >&5
4601 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   ac_save_LIBS="$LIBS"
4606 LIBS="-lreadline $TERMLIBS $LIBS"
4607 cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610 /* Override any gcc2 internal prototype to avoid an error.  */
4611 /* We use char because int might match the return type of a gcc2
4612     builtin and then its argument prototype would still apply.  */
4613 char rl_completion_matches();
4614
4615 int main() {
4616 rl_completion_matches()
4617 ; return 0; }
4618 EOF
4619 if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4620   rm -rf conftest*
4621   eval "ac_cv_lib_$ac_lib_var=yes"
4622 else
4623   echo "configure: failed program was:" >&5
4624   cat conftest.$ac_ext >&5
4625   rm -rf conftest*
4626   eval "ac_cv_lib_$ac_lib_var=no"
4627 fi
4628 rm -f conftest*
4629 LIBS="$ac_save_LIBS"
4630
4631 fi
4632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4633   echo "$ac_t""yes" 1>&6
4634   cat >> confdefs.h <<\EOF
4635 #define HAVE_NEW_LIBREADLINE 1
4636 EOF
4637
4638 else
4639   echo "$ac_t""no" 1>&6
4640 fi
4641
4642
4643 # The following test taken from the cvs sources
4644 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4645 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4646 # libsocket.so which has a bad implementation of gethostbyname (it
4647 # only looks in /etc/hosts), so we only look for -lsocket if we need
4648 # it.
4649 for ac_func in connect
4650 do
4651 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4652 echo "configure:4653: checking for $ac_func" >&5
4653 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656   cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 /* System header to define __stub macros and hopefully few prototypes,
4660     which can conflict with char $ac_func(); below.  */
4661 #include <assert.h>
4662 /* Override any gcc2 internal prototype to avoid an error.  */
4663 /* We use char because int might match the return type of a gcc2
4664     builtin and then its argument prototype would still apply.  */
4665 char $ac_func();
4666
4667 int main() {
4668
4669 /* The GNU C library defines this for functions which it implements
4670     to always fail with ENOSYS.  Some functions are actually named
4671     something starting with __ and the normal name is an alias.  */
4672 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4673 choke me
4674 #else
4675 $ac_func();
4676 #endif
4677
4678 ; return 0; }
4679 EOF
4680 if { (eval echo configure:4681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4681   rm -rf conftest*
4682   eval "ac_cv_func_$ac_func=yes"
4683 else
4684   echo "configure: failed program was:" >&5
4685   cat conftest.$ac_ext >&5
4686   rm -rf conftest*
4687   eval "ac_cv_func_$ac_func=no"
4688 fi
4689 rm -f conftest*
4690 fi
4691
4692 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4693   echo "$ac_t""yes" 1>&6
4694     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4695   cat >> confdefs.h <<EOF
4696 #define $ac_tr_func 1
4697 EOF
4698  
4699 else
4700   echo "$ac_t""no" 1>&6
4701 fi
4702 done
4703
4704 if test x"$ac_cv_func_connect" = x"no"; then
4705     case "$LIBS" in
4706     *-lnsl*) ;;
4707     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4708 echo "configure:4709: checking for printf in -lnsl_s" >&5
4709 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4710 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4711   echo $ac_n "(cached) $ac_c" 1>&6
4712 else
4713   ac_save_LIBS="$LIBS"
4714 LIBS="-lnsl_s  $LIBS"
4715 cat > conftest.$ac_ext <<EOF
4716 #line 4717 "configure"
4717 #include "confdefs.h"
4718 /* Override any gcc2 internal prototype to avoid an error.  */
4719 /* We use char because int might match the return type of a gcc2
4720     builtin and then its argument prototype would still apply.  */
4721 char printf();
4722
4723 int main() {
4724 printf()
4725 ; return 0; }
4726 EOF
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4728   rm -rf conftest*
4729   eval "ac_cv_lib_$ac_lib_var=yes"
4730 else
4731   echo "configure: failed program was:" >&5
4732   cat conftest.$ac_ext >&5
4733   rm -rf conftest*
4734   eval "ac_cv_lib_$ac_lib_var=no"
4735 fi
4736 rm -f conftest*
4737 LIBS="$ac_save_LIBS"
4738
4739 fi
4740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4741   echo "$ac_t""yes" 1>&6
4742     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4743     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4744   cat >> confdefs.h <<EOF
4745 #define $ac_tr_lib 1
4746 EOF
4747
4748   LIBS="-lnsl_s $LIBS"
4749
4750 else
4751   echo "$ac_t""no" 1>&6
4752 fi
4753  ;;
4754     esac
4755     case "$LIBS" in
4756     *-lnsl*) ;;
4757     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4758 echo "configure:4759: checking for printf in -lnsl" >&5
4759 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4760 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4761   echo $ac_n "(cached) $ac_c" 1>&6
4762 else
4763   ac_save_LIBS="$LIBS"
4764 LIBS="-lnsl  $LIBS"
4765 cat > conftest.$ac_ext <<EOF
4766 #line 4767 "configure"
4767 #include "confdefs.h"
4768 /* Override any gcc2 internal prototype to avoid an error.  */
4769 /* We use char because int might match the return type of a gcc2
4770     builtin and then its argument prototype would still apply.  */
4771 char printf();
4772
4773 int main() {
4774 printf()
4775 ; return 0; }
4776 EOF
4777 if { (eval echo configure:4778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4778   rm -rf conftest*
4779   eval "ac_cv_lib_$ac_lib_var=yes"
4780 else
4781   echo "configure: failed program was:" >&5
4782   cat conftest.$ac_ext >&5
4783   rm -rf conftest*
4784   eval "ac_cv_lib_$ac_lib_var=no"
4785 fi
4786 rm -f conftest*
4787 LIBS="$ac_save_LIBS"
4788
4789 fi
4790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4791   echo "$ac_t""yes" 1>&6
4792     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4793     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4794   cat >> confdefs.h <<EOF
4795 #define $ac_tr_lib 1
4796 EOF
4797
4798   LIBS="-lnsl $LIBS"
4799
4800 else
4801   echo "$ac_t""no" 1>&6
4802 fi
4803  ;;
4804     esac
4805     case "$LIBS" in
4806     *-lsocket*) ;;
4807     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4808 echo "configure:4809: checking for connect in -lsocket" >&5
4809 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4811   echo $ac_n "(cached) $ac_c" 1>&6
4812 else
4813   ac_save_LIBS="$LIBS"
4814 LIBS="-lsocket  $LIBS"
4815 cat > conftest.$ac_ext <<EOF
4816 #line 4817 "configure"
4817 #include "confdefs.h"
4818 /* Override any gcc2 internal prototype to avoid an error.  */
4819 /* We use char because int might match the return type of a gcc2
4820     builtin and then its argument prototype would still apply.  */
4821 char connect();
4822
4823 int main() {
4824 connect()
4825 ; return 0; }
4826 EOF
4827 if { (eval echo configure:4828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4828   rm -rf conftest*
4829   eval "ac_cv_lib_$ac_lib_var=yes"
4830 else
4831   echo "configure: failed program was:" >&5
4832   cat conftest.$ac_ext >&5
4833   rm -rf conftest*
4834   eval "ac_cv_lib_$ac_lib_var=no"
4835 fi
4836 rm -f conftest*
4837 LIBS="$ac_save_LIBS"
4838
4839 fi
4840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4841   echo "$ac_t""yes" 1>&6
4842     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4843     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4844   cat >> confdefs.h <<EOF
4845 #define $ac_tr_lib 1
4846 EOF
4847
4848   LIBS="-lsocket $LIBS"
4849
4850 else
4851   echo "$ac_t""no" 1>&6
4852 fi
4853  ;;
4854     esac
4855     case "$LIBS" in
4856     *-linet*) ;;
4857     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4858 echo "configure:4859: checking for connect in -linet" >&5
4859 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4860 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4861   echo $ac_n "(cached) $ac_c" 1>&6
4862 else
4863   ac_save_LIBS="$LIBS"
4864 LIBS="-linet  $LIBS"
4865 cat > conftest.$ac_ext <<EOF
4866 #line 4867 "configure"
4867 #include "confdefs.h"
4868 /* Override any gcc2 internal prototype to avoid an error.  */
4869 /* We use char because int might match the return type of a gcc2
4870     builtin and then its argument prototype would still apply.  */
4871 char connect();
4872
4873 int main() {
4874 connect()
4875 ; return 0; }
4876 EOF
4877 if { (eval echo configure:4878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4878   rm -rf conftest*
4879   eval "ac_cv_lib_$ac_lib_var=yes"
4880 else
4881   echo "configure: failed program was:" >&5
4882   cat conftest.$ac_ext >&5
4883   rm -rf conftest*
4884   eval "ac_cv_lib_$ac_lib_var=no"
4885 fi
4886 rm -f conftest*
4887 LIBS="$ac_save_LIBS"
4888
4889 fi
4890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4891   echo "$ac_t""yes" 1>&6
4892     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4893     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4894   cat >> confdefs.h <<EOF
4895 #define $ac_tr_lib 1
4896 EOF
4897
4898   LIBS="-linet $LIBS"
4899
4900 else
4901   echo "$ac_t""no" 1>&6
4902 fi
4903  ;;
4904     esac
4905             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4906        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4907         # ac_cv_func_connect=yes
4908         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4909         cat >> confdefs.h <<\EOF
4910 #define HAVE_CONNECT 1
4911 EOF
4912
4913     fi
4914 fi
4915
4916 ###############################################
4917 # test for where we get get_yp_default_domain() from
4918 for ac_func in yp_get_default_domain
4919 do
4920 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4921 echo "configure:4922: checking for $ac_func" >&5
4922 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4923   echo $ac_n "(cached) $ac_c" 1>&6
4924 else
4925   cat > conftest.$ac_ext <<EOF
4926 #line 4927 "configure"
4927 #include "confdefs.h"
4928 /* System header to define __stub macros and hopefully few prototypes,
4929     which can conflict with char $ac_func(); below.  */
4930 #include <assert.h>
4931 /* Override any gcc2 internal prototype to avoid an error.  */
4932 /* We use char because int might match the return type of a gcc2
4933     builtin and then its argument prototype would still apply.  */
4934 char $ac_func();
4935
4936 int main() {
4937
4938 /* The GNU C library defines this for functions which it implements
4939     to always fail with ENOSYS.  Some functions are actually named
4940     something starting with __ and the normal name is an alias.  */
4941 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4942 choke me
4943 #else
4944 $ac_func();
4945 #endif
4946
4947 ; return 0; }
4948 EOF
4949 if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4950   rm -rf conftest*
4951   eval "ac_cv_func_$ac_func=yes"
4952 else
4953   echo "configure: failed program was:" >&5
4954   cat conftest.$ac_ext >&5
4955   rm -rf conftest*
4956   eval "ac_cv_func_$ac_func=no"
4957 fi
4958 rm -f conftest*
4959 fi
4960
4961 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4962   echo "$ac_t""yes" 1>&6
4963     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4964   cat >> confdefs.h <<EOF
4965 #define $ac_tr_func 1
4966 EOF
4967  
4968 else
4969   echo "$ac_t""no" 1>&6
4970 fi
4971 done
4972
4973 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4974         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4975 echo "configure:4976: checking for yp_get_default_domain in -lnsl" >&5
4976 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4977 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4978   echo $ac_n "(cached) $ac_c" 1>&6
4979 else
4980   ac_save_LIBS="$LIBS"
4981 LIBS="-lnsl  $LIBS"
4982 cat > conftest.$ac_ext <<EOF
4983 #line 4984 "configure"
4984 #include "confdefs.h"
4985 /* Override any gcc2 internal prototype to avoid an error.  */
4986 /* We use char because int might match the return type of a gcc2
4987     builtin and then its argument prototype would still apply.  */
4988 char yp_get_default_domain();
4989
4990 int main() {
4991 yp_get_default_domain()
4992 ; return 0; }
4993 EOF
4994 if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4995   rm -rf conftest*
4996   eval "ac_cv_lib_$ac_lib_var=yes"
4997 else
4998   echo "configure: failed program was:" >&5
4999   cat conftest.$ac_ext >&5
5000   rm -rf conftest*
5001   eval "ac_cv_lib_$ac_lib_var=no"
5002 fi
5003 rm -f conftest*
5004 LIBS="$ac_save_LIBS"
5005
5006 fi
5007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5008   echo "$ac_t""yes" 1>&6
5009   LIBS="$LIBS -lnsl";
5010         cat >> confdefs.h <<\EOF
5011 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5012 EOF
5013
5014 else
5015   echo "$ac_t""no" 1>&6
5016 fi
5017  
5018 fi
5019
5020 # Check if we have execl, if not we need to compile smbrun.
5021 for ac_func in execl
5022 do
5023 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5024 echo "configure:5025: checking for $ac_func" >&5
5025 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5026   echo $ac_n "(cached) $ac_c" 1>&6
5027 else
5028   cat > conftest.$ac_ext <<EOF
5029 #line 5030 "configure"
5030 #include "confdefs.h"
5031 /* System header to define __stub macros and hopefully few prototypes,
5032     which can conflict with char $ac_func(); below.  */
5033 #include <assert.h>
5034 /* Override any gcc2 internal prototype to avoid an error.  */
5035 /* We use char because int might match the return type of a gcc2
5036     builtin and then its argument prototype would still apply.  */
5037 char $ac_func();
5038
5039 int main() {
5040
5041 /* The GNU C library defines this for functions which it implements
5042     to always fail with ENOSYS.  Some functions are actually named
5043     something starting with __ and the normal name is an alias.  */
5044 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5045 choke me
5046 #else
5047 $ac_func();
5048 #endif
5049
5050 ; return 0; }
5051 EOF
5052 if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5053   rm -rf conftest*
5054   eval "ac_cv_func_$ac_func=yes"
5055 else
5056   echo "configure: failed program was:" >&5
5057   cat conftest.$ac_ext >&5
5058   rm -rf conftest*
5059   eval "ac_cv_func_$ac_func=no"
5060 fi
5061 rm -f conftest*
5062 fi
5063
5064 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5065   echo "$ac_t""yes" 1>&6
5066     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5067   cat >> confdefs.h <<EOF
5068 #define $ac_tr_func 1
5069 EOF
5070  
5071 else
5072   echo "$ac_t""no" 1>&6
5073 fi
5074 done
5075
5076 if test x"$ac_cv_func_execl" = x"no"; then
5077     RUNPROG="bin/smbrun"
5078 else
5079     RUNPROG=""
5080 fi
5081
5082 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5083 do
5084 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5085 echo "configure:5086: checking for $ac_func" >&5
5086 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5087   echo $ac_n "(cached) $ac_c" 1>&6
5088 else
5089   cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092 /* System header to define __stub macros and hopefully few prototypes,
5093     which can conflict with char $ac_func(); below.  */
5094 #include <assert.h>
5095 /* Override any gcc2 internal prototype to avoid an error.  */
5096 /* We use char because int might match the return type of a gcc2
5097     builtin and then its argument prototype would still apply.  */
5098 char $ac_func();
5099
5100 int main() {
5101
5102 /* The GNU C library defines this for functions which it implements
5103     to always fail with ENOSYS.  Some functions are actually named
5104     something starting with __ and the normal name is an alias.  */
5105 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5106 choke me
5107 #else
5108 $ac_func();
5109 #endif
5110
5111 ; return 0; }
5112 EOF
5113 if { (eval echo configure:5114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5114   rm -rf conftest*
5115   eval "ac_cv_func_$ac_func=yes"
5116 else
5117   echo "configure: failed program was:" >&5
5118   cat conftest.$ac_ext >&5
5119   rm -rf conftest*
5120   eval "ac_cv_func_$ac_func=no"
5121 fi
5122 rm -f conftest*
5123 fi
5124
5125 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5126   echo "$ac_t""yes" 1>&6
5127     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5128   cat >> confdefs.h <<EOF
5129 #define $ac_tr_func 1
5130 EOF
5131  
5132 else
5133   echo "$ac_t""no" 1>&6
5134 fi
5135 done
5136
5137 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat
5138 do
5139 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5140 echo "configure:5141: checking for $ac_func" >&5
5141 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5142   echo $ac_n "(cached) $ac_c" 1>&6
5143 else
5144   cat > conftest.$ac_ext <<EOF
5145 #line 5146 "configure"
5146 #include "confdefs.h"
5147 /* System header to define __stub macros and hopefully few prototypes,
5148     which can conflict with char $ac_func(); below.  */
5149 #include <assert.h>
5150 /* Override any gcc2 internal prototype to avoid an error.  */
5151 /* We use char because int might match the return type of a gcc2
5152     builtin and then its argument prototype would still apply.  */
5153 char $ac_func();
5154
5155 int main() {
5156
5157 /* The GNU C library defines this for functions which it implements
5158     to always fail with ENOSYS.  Some functions are actually named
5159     something starting with __ and the normal name is an alias.  */
5160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5161 choke me
5162 #else
5163 $ac_func();
5164 #endif
5165
5166 ; return 0; }
5167 EOF
5168 if { (eval echo configure:5169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5169   rm -rf conftest*
5170   eval "ac_cv_func_$ac_func=yes"
5171 else
5172   echo "configure: failed program was:" >&5
5173   cat conftest.$ac_ext >&5
5174   rm -rf conftest*
5175   eval "ac_cv_func_$ac_func=no"
5176 fi
5177 rm -f conftest*
5178 fi
5179
5180 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5181   echo "$ac_t""yes" 1>&6
5182     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5183   cat >> confdefs.h <<EOF
5184 #define $ac_tr_func 1
5185 EOF
5186  
5187 else
5188   echo "$ac_t""no" 1>&6
5189 fi
5190 done
5191
5192 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5193 do
5194 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5195 echo "configure:5196: checking for $ac_func" >&5
5196 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199   cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202 /* System header to define __stub macros and hopefully few prototypes,
5203     which can conflict with char $ac_func(); below.  */
5204 #include <assert.h>
5205 /* Override any gcc2 internal prototype to avoid an error.  */
5206 /* We use char because int might match the return type of a gcc2
5207     builtin and then its argument prototype would still apply.  */
5208 char $ac_func();
5209
5210 int main() {
5211
5212 /* The GNU C library defines this for functions which it implements
5213     to always fail with ENOSYS.  Some functions are actually named
5214     something starting with __ and the normal name is an alias.  */
5215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5216 choke me
5217 #else
5218 $ac_func();
5219 #endif
5220
5221 ; return 0; }
5222 EOF
5223 if { (eval echo configure:5224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5224   rm -rf conftest*
5225   eval "ac_cv_func_$ac_func=yes"
5226 else
5227   echo "configure: failed program was:" >&5
5228   cat conftest.$ac_ext >&5
5229   rm -rf conftest*
5230   eval "ac_cv_func_$ac_func=no"
5231 fi
5232 rm -f conftest*
5233 fi
5234
5235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5236   echo "$ac_t""yes" 1>&6
5237     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5238   cat >> confdefs.h <<EOF
5239 #define $ac_tr_func 1
5240 EOF
5241  
5242 else
5243   echo "$ac_t""no" 1>&6
5244 fi
5245 done
5246
5247 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5248 do
5249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5250 echo "configure:5251: checking for $ac_func" >&5
5251 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5252   echo $ac_n "(cached) $ac_c" 1>&6
5253 else
5254   cat > conftest.$ac_ext <<EOF
5255 #line 5256 "configure"
5256 #include "confdefs.h"
5257 /* System header to define __stub macros and hopefully few prototypes,
5258     which can conflict with char $ac_func(); below.  */
5259 #include <assert.h>
5260 /* Override any gcc2 internal prototype to avoid an error.  */
5261 /* We use char because int might match the return type of a gcc2
5262     builtin and then its argument prototype would still apply.  */
5263 char $ac_func();
5264
5265 int main() {
5266
5267 /* The GNU C library defines this for functions which it implements
5268     to always fail with ENOSYS.  Some functions are actually named
5269     something starting with __ and the normal name is an alias.  */
5270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5271 choke me
5272 #else
5273 $ac_func();
5274 #endif
5275
5276 ; return 0; }
5277 EOF
5278 if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5279   rm -rf conftest*
5280   eval "ac_cv_func_$ac_func=yes"
5281 else
5282   echo "configure: failed program was:" >&5
5283   cat conftest.$ac_ext >&5
5284   rm -rf conftest*
5285   eval "ac_cv_func_$ac_func=no"
5286 fi
5287 rm -f conftest*
5288 fi
5289
5290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5291   echo "$ac_t""yes" 1>&6
5292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5293   cat >> confdefs.h <<EOF
5294 #define $ac_tr_func 1
5295 EOF
5296  
5297 else
5298   echo "$ac_t""no" 1>&6
5299 fi
5300 done
5301
5302 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5303 do
5304 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5305 echo "configure:5306: checking for $ac_func" >&5
5306 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5307   echo $ac_n "(cached) $ac_c" 1>&6
5308 else
5309   cat > conftest.$ac_ext <<EOF
5310 #line 5311 "configure"
5311 #include "confdefs.h"
5312 /* System header to define __stub macros and hopefully few prototypes,
5313     which can conflict with char $ac_func(); below.  */
5314 #include <assert.h>
5315 /* Override any gcc2 internal prototype to avoid an error.  */
5316 /* We use char because int might match the return type of a gcc2
5317     builtin and then its argument prototype would still apply.  */
5318 char $ac_func();
5319
5320 int main() {
5321
5322 /* The GNU C library defines this for functions which it implements
5323     to always fail with ENOSYS.  Some functions are actually named
5324     something starting with __ and the normal name is an alias.  */
5325 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5326 choke me
5327 #else
5328 $ac_func();
5329 #endif
5330
5331 ; return 0; }
5332 EOF
5333 if { (eval echo configure:5334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5334   rm -rf conftest*
5335   eval "ac_cv_func_$ac_func=yes"
5336 else
5337   echo "configure: failed program was:" >&5
5338   cat conftest.$ac_ext >&5
5339   rm -rf conftest*
5340   eval "ac_cv_func_$ac_func=no"
5341 fi
5342 rm -f conftest*
5343 fi
5344
5345 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5346   echo "$ac_t""yes" 1>&6
5347     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5348   cat >> confdefs.h <<EOF
5349 #define $ac_tr_func 1
5350 EOF
5351  
5352 else
5353   echo "$ac_t""no" 1>&6
5354 fi
5355 done
5356
5357 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5358 do
5359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5360 echo "configure:5361: checking for $ac_func" >&5
5361 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5362   echo $ac_n "(cached) $ac_c" 1>&6
5363 else
5364   cat > conftest.$ac_ext <<EOF
5365 #line 5366 "configure"
5366 #include "confdefs.h"
5367 /* System header to define __stub macros and hopefully few prototypes,
5368     which can conflict with char $ac_func(); below.  */
5369 #include <assert.h>
5370 /* Override any gcc2 internal prototype to avoid an error.  */
5371 /* We use char because int might match the return type of a gcc2
5372     builtin and then its argument prototype would still apply.  */
5373 char $ac_func();
5374
5375 int main() {
5376
5377 /* The GNU C library defines this for functions which it implements
5378     to always fail with ENOSYS.  Some functions are actually named
5379     something starting with __ and the normal name is an alias.  */
5380 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5381 choke me
5382 #else
5383 $ac_func();
5384 #endif
5385
5386 ; return 0; }
5387 EOF
5388 if { (eval echo configure:5389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5389   rm -rf conftest*
5390   eval "ac_cv_func_$ac_func=yes"
5391 else
5392   echo "configure: failed program was:" >&5
5393   cat conftest.$ac_ext >&5
5394   rm -rf conftest*
5395   eval "ac_cv_func_$ac_func=no"
5396 fi
5397 rm -f conftest*
5398 fi
5399
5400 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5401   echo "$ac_t""yes" 1>&6
5402     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5403   cat >> confdefs.h <<EOF
5404 #define $ac_tr_func 1
5405 EOF
5406  
5407 else
5408   echo "$ac_t""no" 1>&6
5409 fi
5410 done
5411
5412 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5413 do
5414 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5415 echo "configure:5416: checking for $ac_func" >&5
5416 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5417   echo $ac_n "(cached) $ac_c" 1>&6
5418 else
5419   cat > conftest.$ac_ext <<EOF
5420 #line 5421 "configure"
5421 #include "confdefs.h"
5422 /* System header to define __stub macros and hopefully few prototypes,
5423     which can conflict with char $ac_func(); below.  */
5424 #include <assert.h>
5425 /* Override any gcc2 internal prototype to avoid an error.  */
5426 /* We use char because int might match the return type of a gcc2
5427     builtin and then its argument prototype would still apply.  */
5428 char $ac_func();
5429
5430 int main() {
5431
5432 /* The GNU C library defines this for functions which it implements
5433     to always fail with ENOSYS.  Some functions are actually named
5434     something starting with __ and the normal name is an alias.  */
5435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5436 choke me
5437 #else
5438 $ac_func();
5439 #endif
5440
5441 ; return 0; }
5442 EOF
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5444   rm -rf conftest*
5445   eval "ac_cv_func_$ac_func=yes"
5446 else
5447   echo "configure: failed program was:" >&5
5448   cat conftest.$ac_ext >&5
5449   rm -rf conftest*
5450   eval "ac_cv_func_$ac_func=no"
5451 fi
5452 rm -f conftest*
5453 fi
5454
5455 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5456   echo "$ac_t""yes" 1>&6
5457     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5458   cat >> confdefs.h <<EOF
5459 #define $ac_tr_func 1
5460 EOF
5461  
5462 else
5463   echo "$ac_t""no" 1>&6
5464 fi
5465 done
5466
5467 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5468 do
5469 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5470 echo "configure:5471: checking for $ac_func" >&5
5471 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5472   echo $ac_n "(cached) $ac_c" 1>&6
5473 else
5474   cat > conftest.$ac_ext <<EOF
5475 #line 5476 "configure"
5476 #include "confdefs.h"
5477 /* System header to define __stub macros and hopefully few prototypes,
5478     which can conflict with char $ac_func(); below.  */
5479 #include <assert.h>
5480 /* Override any gcc2 internal prototype to avoid an error.  */
5481 /* We use char because int might match the return type of a gcc2
5482     builtin and then its argument prototype would still apply.  */
5483 char $ac_func();
5484
5485 int main() {
5486
5487 /* The GNU C library defines this for functions which it implements
5488     to always fail with ENOSYS.  Some functions are actually named
5489     something starting with __ and the normal name is an alias.  */
5490 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5491 choke me
5492 #else
5493 $ac_func();
5494 #endif
5495
5496 ; return 0; }
5497 EOF
5498 if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5499   rm -rf conftest*
5500   eval "ac_cv_func_$ac_func=yes"
5501 else
5502   echo "configure: failed program was:" >&5
5503   cat conftest.$ac_ext >&5
5504   rm -rf conftest*
5505   eval "ac_cv_func_$ac_func=no"
5506 fi
5507 rm -f conftest*
5508 fi
5509
5510 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5511   echo "$ac_t""yes" 1>&6
5512     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5513   cat >> confdefs.h <<EOF
5514 #define $ac_tr_func 1
5515 EOF
5516  
5517 else
5518   echo "$ac_t""no" 1>&6
5519 fi
5520 done
5521
5522 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5523 do
5524 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5525 echo "configure:5526: checking for $ac_func" >&5
5526 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5527   echo $ac_n "(cached) $ac_c" 1>&6
5528 else
5529   cat > conftest.$ac_ext <<EOF
5530 #line 5531 "configure"
5531 #include "confdefs.h"
5532 /* System header to define __stub macros and hopefully few prototypes,
5533     which can conflict with char $ac_func(); below.  */
5534 #include <assert.h>
5535 /* Override any gcc2 internal prototype to avoid an error.  */
5536 /* We use char because int might match the return type of a gcc2
5537     builtin and then its argument prototype would still apply.  */
5538 char $ac_func();
5539
5540 int main() {
5541
5542 /* The GNU C library defines this for functions which it implements
5543     to always fail with ENOSYS.  Some functions are actually named
5544     something starting with __ and the normal name is an alias.  */
5545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5546 choke me
5547 #else
5548 $ac_func();
5549 #endif
5550
5551 ; return 0; }
5552 EOF
5553 if { (eval echo configure:5554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5554   rm -rf conftest*
5555   eval "ac_cv_func_$ac_func=yes"
5556 else
5557   echo "configure: failed program was:" >&5
5558   cat conftest.$ac_ext >&5
5559   rm -rf conftest*
5560   eval "ac_cv_func_$ac_func=no"
5561 fi
5562 rm -f conftest*
5563 fi
5564
5565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5566   echo "$ac_t""yes" 1>&6
5567     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5568   cat >> confdefs.h <<EOF
5569 #define $ac_tr_func 1
5570 EOF
5571  
5572 else
5573   echo "$ac_t""no" 1>&6
5574 fi
5575 done
5576
5577 # setbuffer is needed for smbtorture
5578 for ac_func in setbuffer
5579 do
5580 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5581 echo "configure:5582: checking for $ac_func" >&5
5582 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5583   echo $ac_n "(cached) $ac_c" 1>&6
5584 else
5585   cat > conftest.$ac_ext <<EOF
5586 #line 5587 "configure"
5587 #include "confdefs.h"
5588 /* System header to define __stub macros and hopefully few prototypes,
5589     which can conflict with char $ac_func(); below.  */
5590 #include <assert.h>
5591 /* Override any gcc2 internal prototype to avoid an error.  */
5592 /* We use char because int might match the return type of a gcc2
5593     builtin and then its argument prototype would still apply.  */
5594 char $ac_func();
5595
5596 int main() {
5597
5598 /* The GNU C library defines this for functions which it implements
5599     to always fail with ENOSYS.  Some functions are actually named
5600     something starting with __ and the normal name is an alias.  */
5601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5602 choke me
5603 #else
5604 $ac_func();
5605 #endif
5606
5607 ; return 0; }
5608 EOF
5609 if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5610   rm -rf conftest*
5611   eval "ac_cv_func_$ac_func=yes"
5612 else
5613   echo "configure: failed program was:" >&5
5614   cat conftest.$ac_ext >&5
5615   rm -rf conftest*
5616   eval "ac_cv_func_$ac_func=no"
5617 fi
5618 rm -f conftest*
5619 fi
5620
5621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5622   echo "$ac_t""yes" 1>&6
5623     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5624   cat >> confdefs.h <<EOF
5625 #define $ac_tr_func 1
5626 EOF
5627  
5628 else
5629   echo "$ac_t""no" 1>&6
5630 fi
5631 done
5632
5633
5634 # syscall() is needed for smbwrapper.
5635 for ac_func in syscall
5636 do
5637 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5638 echo "configure:5639: checking for $ac_func" >&5
5639 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5640   echo $ac_n "(cached) $ac_c" 1>&6
5641 else
5642   cat > conftest.$ac_ext <<EOF
5643 #line 5644 "configure"
5644 #include "confdefs.h"
5645 /* System header to define __stub macros and hopefully few prototypes,
5646     which can conflict with char $ac_func(); below.  */
5647 #include <assert.h>
5648 /* Override any gcc2 internal prototype to avoid an error.  */
5649 /* We use char because int might match the return type of a gcc2
5650     builtin and then its argument prototype would still apply.  */
5651 char $ac_func();
5652
5653 int main() {
5654
5655 /* The GNU C library defines this for functions which it implements
5656     to always fail with ENOSYS.  Some functions are actually named
5657     something starting with __ and the normal name is an alias.  */
5658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5659 choke me
5660 #else
5661 $ac_func();
5662 #endif
5663
5664 ; return 0; }
5665 EOF
5666 if { (eval echo configure:5667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5667   rm -rf conftest*
5668   eval "ac_cv_func_$ac_func=yes"
5669 else
5670   echo "configure: failed program was:" >&5
5671   cat conftest.$ac_ext >&5
5672   rm -rf conftest*
5673   eval "ac_cv_func_$ac_func=no"
5674 fi
5675 rm -f conftest*
5676 fi
5677
5678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5679   echo "$ac_t""yes" 1>&6
5680     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5681   cat >> confdefs.h <<EOF
5682 #define $ac_tr_func 1
5683 EOF
5684  
5685 else
5686   echo "$ac_t""no" 1>&6
5687 fi
5688 done
5689
5690
5691 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5692 do
5693 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5694 echo "configure:5695: checking for $ac_func" >&5
5695 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5696   echo $ac_n "(cached) $ac_c" 1>&6
5697 else
5698   cat > conftest.$ac_ext <<EOF
5699 #line 5700 "configure"
5700 #include "confdefs.h"
5701 /* System header to define __stub macros and hopefully few prototypes,
5702     which can conflict with char $ac_func(); below.  */
5703 #include <assert.h>
5704 /* Override any gcc2 internal prototype to avoid an error.  */
5705 /* We use char because int might match the return type of a gcc2
5706     builtin and then its argument prototype would still apply.  */
5707 char $ac_func();
5708
5709 int main() {
5710
5711 /* The GNU C library defines this for functions which it implements
5712     to always fail with ENOSYS.  Some functions are actually named
5713     something starting with __ and the normal name is an alias.  */
5714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5715 choke me
5716 #else
5717 $ac_func();
5718 #endif
5719
5720 ; return 0; }
5721 EOF
5722 if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5723   rm -rf conftest*
5724   eval "ac_cv_func_$ac_func=yes"
5725 else
5726   echo "configure: failed program was:" >&5
5727   cat conftest.$ac_ext >&5
5728   rm -rf conftest*
5729   eval "ac_cv_func_$ac_func=no"
5730 fi
5731 rm -f conftest*
5732 fi
5733
5734 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5735   echo "$ac_t""yes" 1>&6
5736     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5737   cat >> confdefs.h <<EOF
5738 #define $ac_tr_func 1
5739 EOF
5740  
5741 else
5742   echo "$ac_t""no" 1>&6
5743 fi
5744 done
5745
5746 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5747 do
5748 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5749 echo "configure:5750: checking for $ac_func" >&5
5750 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5751   echo $ac_n "(cached) $ac_c" 1>&6
5752 else
5753   cat > conftest.$ac_ext <<EOF
5754 #line 5755 "configure"
5755 #include "confdefs.h"
5756 /* System header to define __stub macros and hopefully few prototypes,
5757     which can conflict with char $ac_func(); below.  */
5758 #include <assert.h>
5759 /* Override any gcc2 internal prototype to avoid an error.  */
5760 /* We use char because int might match the return type of a gcc2
5761     builtin and then its argument prototype would still apply.  */
5762 char $ac_func();
5763
5764 int main() {
5765
5766 /* The GNU C library defines this for functions which it implements
5767     to always fail with ENOSYS.  Some functions are actually named
5768     something starting with __ and the normal name is an alias.  */
5769 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5770 choke me
5771 #else
5772 $ac_func();
5773 #endif
5774
5775 ; return 0; }
5776 EOF
5777 if { (eval echo configure:5778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5778   rm -rf conftest*
5779   eval "ac_cv_func_$ac_func=yes"
5780 else
5781   echo "configure: failed program was:" >&5
5782   cat conftest.$ac_ext >&5
5783   rm -rf conftest*
5784   eval "ac_cv_func_$ac_func=no"
5785 fi
5786 rm -f conftest*
5787 fi
5788
5789 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5790   echo "$ac_t""yes" 1>&6
5791     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5792   cat >> confdefs.h <<EOF
5793 #define $ac_tr_func 1
5794 EOF
5795  
5796 else
5797   echo "$ac_t""no" 1>&6
5798 fi
5799 done
5800
5801 for ac_func in __getcwd _getcwd
5802 do
5803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5804 echo "configure:5805: checking for $ac_func" >&5
5805 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5806   echo $ac_n "(cached) $ac_c" 1>&6
5807 else
5808   cat > conftest.$ac_ext <<EOF
5809 #line 5810 "configure"
5810 #include "confdefs.h"
5811 /* System header to define __stub macros and hopefully few prototypes,
5812     which can conflict with char $ac_func(); below.  */
5813 #include <assert.h>
5814 /* Override any gcc2 internal prototype to avoid an error.  */
5815 /* We use char because int might match the return type of a gcc2
5816     builtin and then its argument prototype would still apply.  */
5817 char $ac_func();
5818
5819 int main() {
5820
5821 /* The GNU C library defines this for functions which it implements
5822     to always fail with ENOSYS.  Some functions are actually named
5823     something starting with __ and the normal name is an alias.  */
5824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5825 choke me
5826 #else
5827 $ac_func();
5828 #endif
5829
5830 ; return 0; }
5831 EOF
5832 if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5833   rm -rf conftest*
5834   eval "ac_cv_func_$ac_func=yes"
5835 else
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   eval "ac_cv_func_$ac_func=no"
5840 fi
5841 rm -f conftest*
5842 fi
5843
5844 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5845   echo "$ac_t""yes" 1>&6
5846     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5847   cat >> confdefs.h <<EOF
5848 #define $ac_tr_func 1
5849 EOF
5850  
5851 else
5852   echo "$ac_t""no" 1>&6
5853 fi
5854 done
5855
5856 for ac_func in __xstat __fxstat __lxstat
5857 do
5858 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5859 echo "configure:5860: checking for $ac_func" >&5
5860 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5861   echo $ac_n "(cached) $ac_c" 1>&6
5862 else
5863   cat > conftest.$ac_ext <<EOF
5864 #line 5865 "configure"
5865 #include "confdefs.h"
5866 /* System header to define __stub macros and hopefully few prototypes,
5867     which can conflict with char $ac_func(); below.  */
5868 #include <assert.h>
5869 /* Override any gcc2 internal prototype to avoid an error.  */
5870 /* We use char because int might match the return type of a gcc2
5871     builtin and then its argument prototype would still apply.  */
5872 char $ac_func();
5873
5874 int main() {
5875
5876 /* The GNU C library defines this for functions which it implements
5877     to always fail with ENOSYS.  Some functions are actually named
5878     something starting with __ and the normal name is an alias.  */
5879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5880 choke me
5881 #else
5882 $ac_func();
5883 #endif
5884
5885 ; return 0; }
5886 EOF
5887 if { (eval echo configure:5888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5888   rm -rf conftest*
5889   eval "ac_cv_func_$ac_func=yes"
5890 else
5891   echo "configure: failed program was:" >&5
5892   cat conftest.$ac_ext >&5
5893   rm -rf conftest*
5894   eval "ac_cv_func_$ac_func=no"
5895 fi
5896 rm -f conftest*
5897 fi
5898
5899 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5900   echo "$ac_t""yes" 1>&6
5901     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5902   cat >> confdefs.h <<EOF
5903 #define $ac_tr_func 1
5904 EOF
5905  
5906 else
5907   echo "$ac_t""no" 1>&6
5908 fi
5909 done
5910
5911 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5912 do
5913 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5914 echo "configure:5915: checking for $ac_func" >&5
5915 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5916   echo $ac_n "(cached) $ac_c" 1>&6
5917 else
5918   cat > conftest.$ac_ext <<EOF
5919 #line 5920 "configure"
5920 #include "confdefs.h"
5921 /* System header to define __stub macros and hopefully few prototypes,
5922     which can conflict with char $ac_func(); below.  */
5923 #include <assert.h>
5924 /* Override any gcc2 internal prototype to avoid an error.  */
5925 /* We use char because int might match the return type of a gcc2
5926     builtin and then its argument prototype would still apply.  */
5927 char $ac_func();
5928
5929 int main() {
5930
5931 /* The GNU C library defines this for functions which it implements
5932     to always fail with ENOSYS.  Some functions are actually named
5933     something starting with __ and the normal name is an alias.  */
5934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5935 choke me
5936 #else
5937 $ac_func();
5938 #endif
5939
5940 ; return 0; }
5941 EOF
5942 if { (eval echo configure:5943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5943   rm -rf conftest*
5944   eval "ac_cv_func_$ac_func=yes"
5945 else
5946   echo "configure: failed program was:" >&5
5947   cat conftest.$ac_ext >&5
5948   rm -rf conftest*
5949   eval "ac_cv_func_$ac_func=no"
5950 fi
5951 rm -f conftest*
5952 fi
5953
5954 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5955   echo "$ac_t""yes" 1>&6
5956     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5957   cat >> confdefs.h <<EOF
5958 #define $ac_tr_func 1
5959 EOF
5960  
5961 else
5962   echo "$ac_t""no" 1>&6
5963 fi
5964 done
5965
5966 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5967 do
5968 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5969 echo "configure:5970: checking for $ac_func" >&5
5970 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5971   echo $ac_n "(cached) $ac_c" 1>&6
5972 else
5973   cat > conftest.$ac_ext <<EOF
5974 #line 5975 "configure"
5975 #include "confdefs.h"
5976 /* System header to define __stub macros and hopefully few prototypes,
5977     which can conflict with char $ac_func(); below.  */
5978 #include <assert.h>
5979 /* Override any gcc2 internal prototype to avoid an error.  */
5980 /* We use char because int might match the return type of a gcc2
5981     builtin and then its argument prototype would still apply.  */
5982 char $ac_func();
5983
5984 int main() {
5985
5986 /* The GNU C library defines this for functions which it implements
5987     to always fail with ENOSYS.  Some functions are actually named
5988     something starting with __ and the normal name is an alias.  */
5989 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5990 choke me
5991 #else
5992 $ac_func();
5993 #endif
5994
5995 ; return 0; }
5996 EOF
5997 if { (eval echo configure:5998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5998   rm -rf conftest*
5999   eval "ac_cv_func_$ac_func=yes"
6000 else
6001   echo "configure: failed program was:" >&5
6002   cat conftest.$ac_ext >&5
6003   rm -rf conftest*
6004   eval "ac_cv_func_$ac_func=no"
6005 fi
6006 rm -f conftest*
6007 fi
6008
6009 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6010   echo "$ac_t""yes" 1>&6
6011     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6012   cat >> confdefs.h <<EOF
6013 #define $ac_tr_func 1
6014 EOF
6015  
6016 else
6017   echo "$ac_t""no" 1>&6
6018 fi
6019 done
6020
6021 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6022 do
6023 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6024 echo "configure:6025: checking for $ac_func" >&5
6025 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6026   echo $ac_n "(cached) $ac_c" 1>&6
6027 else
6028   cat > conftest.$ac_ext <<EOF
6029 #line 6030 "configure"
6030 #include "confdefs.h"
6031 /* System header to define __stub macros and hopefully few prototypes,
6032     which can conflict with char $ac_func(); below.  */
6033 #include <assert.h>
6034 /* Override any gcc2 internal prototype to avoid an error.  */
6035 /* We use char because int might match the return type of a gcc2
6036     builtin and then its argument prototype would still apply.  */
6037 char $ac_func();
6038
6039 int main() {
6040
6041 /* The GNU C library defines this for functions which it implements
6042     to always fail with ENOSYS.  Some functions are actually named
6043     something starting with __ and the normal name is an alias.  */
6044 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6045 choke me
6046 #else
6047 $ac_func();
6048 #endif
6049
6050 ; return 0; }
6051 EOF
6052 if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6053   rm -rf conftest*
6054   eval "ac_cv_func_$ac_func=yes"
6055 else
6056   echo "configure: failed program was:" >&5
6057   cat conftest.$ac_ext >&5
6058   rm -rf conftest*
6059   eval "ac_cv_func_$ac_func=no"
6060 fi
6061 rm -f conftest*
6062 fi
6063
6064 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6065   echo "$ac_t""yes" 1>&6
6066     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6067   cat >> confdefs.h <<EOF
6068 #define $ac_tr_func 1
6069 EOF
6070  
6071 else
6072   echo "$ac_t""no" 1>&6
6073 fi
6074 done
6075
6076 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6077 do
6078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6079 echo "configure:6080: checking for $ac_func" >&5
6080 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6081   echo $ac_n "(cached) $ac_c" 1>&6
6082 else
6083   cat > conftest.$ac_ext <<EOF
6084 #line 6085 "configure"
6085 #include "confdefs.h"
6086 /* System header to define __stub macros and hopefully few prototypes,
6087     which can conflict with char $ac_func(); below.  */
6088 #include <assert.h>
6089 /* Override any gcc2 internal prototype to avoid an error.  */
6090 /* We use char because int might match the return type of a gcc2
6091     builtin and then its argument prototype would still apply.  */
6092 char $ac_func();
6093
6094 int main() {
6095
6096 /* The GNU C library defines this for functions which it implements
6097     to always fail with ENOSYS.  Some functions are actually named
6098     something starting with __ and the normal name is an alias.  */
6099 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6100 choke me
6101 #else
6102 $ac_func();
6103 #endif
6104
6105 ; return 0; }
6106 EOF
6107 if { (eval echo configure:6108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6108   rm -rf conftest*
6109   eval "ac_cv_func_$ac_func=yes"
6110 else
6111   echo "configure: failed program was:" >&5
6112   cat conftest.$ac_ext >&5
6113   rm -rf conftest*
6114   eval "ac_cv_func_$ac_func=no"
6115 fi
6116 rm -f conftest*
6117 fi
6118
6119 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6120   echo "$ac_t""yes" 1>&6
6121     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6122   cat >> confdefs.h <<EOF
6123 #define $ac_tr_func 1
6124 EOF
6125  
6126 else
6127   echo "$ac_t""no" 1>&6
6128 fi
6129 done
6130
6131 for ac_func in _write __write _fork __fork
6132 do
6133 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6134 echo "configure:6135: checking for $ac_func" >&5
6135 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6136   echo $ac_n "(cached) $ac_c" 1>&6
6137 else
6138   cat > conftest.$ac_ext <<EOF
6139 #line 6140 "configure"
6140 #include "confdefs.h"
6141 /* System header to define __stub macros and hopefully few prototypes,
6142     which can conflict with char $ac_func(); below.  */
6143 #include <assert.h>
6144 /* Override any gcc2 internal prototype to avoid an error.  */
6145 /* We use char because int might match the return type of a gcc2
6146     builtin and then its argument prototype would still apply.  */
6147 char $ac_func();
6148
6149 int main() {
6150
6151 /* The GNU C library defines this for functions which it implements
6152     to always fail with ENOSYS.  Some functions are actually named
6153     something starting with __ and the normal name is an alias.  */
6154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6155 choke me
6156 #else
6157 $ac_func();
6158 #endif
6159
6160 ; return 0; }
6161 EOF
6162 if { (eval echo configure:6163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6163   rm -rf conftest*
6164   eval "ac_cv_func_$ac_func=yes"
6165 else
6166   echo "configure: failed program was:" >&5
6167   cat conftest.$ac_ext >&5
6168   rm -rf conftest*
6169   eval "ac_cv_func_$ac_func=no"
6170 fi
6171 rm -f conftest*
6172 fi
6173
6174 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6175   echo "$ac_t""yes" 1>&6
6176     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6177   cat >> confdefs.h <<EOF
6178 #define $ac_tr_func 1
6179 EOF
6180  
6181 else
6182   echo "$ac_t""no" 1>&6
6183 fi
6184 done
6185
6186 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6187 do
6188 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6189 echo "configure:6190: checking for $ac_func" >&5
6190 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6191   echo $ac_n "(cached) $ac_c" 1>&6
6192 else
6193   cat > conftest.$ac_ext <<EOF
6194 #line 6195 "configure"
6195 #include "confdefs.h"
6196 /* System header to define __stub macros and hopefully few prototypes,
6197     which can conflict with char $ac_func(); below.  */
6198 #include <assert.h>
6199 /* Override any gcc2 internal prototype to avoid an error.  */
6200 /* We use char because int might match the return type of a gcc2
6201     builtin and then its argument prototype would still apply.  */
6202 char $ac_func();
6203
6204 int main() {
6205
6206 /* The GNU C library defines this for functions which it implements
6207     to always fail with ENOSYS.  Some functions are actually named
6208     something starting with __ and the normal name is an alias.  */
6209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6210 choke me
6211 #else
6212 $ac_func();
6213 #endif
6214
6215 ; return 0; }
6216 EOF
6217 if { (eval echo configure:6218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6218   rm -rf conftest*
6219   eval "ac_cv_func_$ac_func=yes"
6220 else
6221   echo "configure: failed program was:" >&5
6222   cat conftest.$ac_ext >&5
6223   rm -rf conftest*
6224   eval "ac_cv_func_$ac_func=no"
6225 fi
6226 rm -f conftest*
6227 fi
6228
6229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6230   echo "$ac_t""yes" 1>&6
6231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6232   cat >> confdefs.h <<EOF
6233 #define $ac_tr_func 1
6234 EOF
6235  
6236 else
6237   echo "$ac_t""no" 1>&6
6238 fi
6239 done
6240
6241 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6242 do
6243 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6244 echo "configure:6245: checking for $ac_func" >&5
6245 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6246   echo $ac_n "(cached) $ac_c" 1>&6
6247 else
6248   cat > conftest.$ac_ext <<EOF
6249 #line 6250 "configure"
6250 #include "confdefs.h"
6251 /* System header to define __stub macros and hopefully few prototypes,
6252     which can conflict with char $ac_func(); below.  */
6253 #include <assert.h>
6254 /* Override any gcc2 internal prototype to avoid an error.  */
6255 /* We use char because int might match the return type of a gcc2
6256     builtin and then its argument prototype would still apply.  */
6257 char $ac_func();
6258
6259 int main() {
6260
6261 /* The GNU C library defines this for functions which it implements
6262     to always fail with ENOSYS.  Some functions are actually named
6263     something starting with __ and the normal name is an alias.  */
6264 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6265 choke me
6266 #else
6267 $ac_func();
6268 #endif
6269
6270 ; return 0; }
6271 EOF
6272 if { (eval echo configure:6273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6273   rm -rf conftest*
6274   eval "ac_cv_func_$ac_func=yes"
6275 else
6276   echo "configure: failed program was:" >&5
6277   cat conftest.$ac_ext >&5
6278   rm -rf conftest*
6279   eval "ac_cv_func_$ac_func=no"
6280 fi
6281 rm -f conftest*
6282 fi
6283
6284 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6285   echo "$ac_t""yes" 1>&6
6286     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6287   cat >> confdefs.h <<EOF
6288 #define $ac_tr_func 1
6289 EOF
6290  
6291 else
6292   echo "$ac_t""no" 1>&6
6293 fi
6294 done
6295
6296 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6297 do
6298 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6299 echo "configure:6300: checking for $ac_func" >&5
6300 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6301   echo $ac_n "(cached) $ac_c" 1>&6
6302 else
6303   cat > conftest.$ac_ext <<EOF
6304 #line 6305 "configure"
6305 #include "confdefs.h"
6306 /* System header to define __stub macros and hopefully few prototypes,
6307     which can conflict with char $ac_func(); below.  */
6308 #include <assert.h>
6309 /* Override any gcc2 internal prototype to avoid an error.  */
6310 /* We use char because int might match the return type of a gcc2
6311     builtin and then its argument prototype would still apply.  */
6312 char $ac_func();
6313
6314 int main() {
6315
6316 /* The GNU C library defines this for functions which it implements
6317     to always fail with ENOSYS.  Some functions are actually named
6318     something starting with __ and the normal name is an alias.  */
6319 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6320 choke me
6321 #else
6322 $ac_func();
6323 #endif
6324
6325 ; return 0; }
6326 EOF
6327 if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6328   rm -rf conftest*
6329   eval "ac_cv_func_$ac_func=yes"
6330 else
6331   echo "configure: failed program was:" >&5
6332   cat conftest.$ac_ext >&5
6333   rm -rf conftest*
6334   eval "ac_cv_func_$ac_func=no"
6335 fi
6336 rm -f conftest*
6337 fi
6338
6339 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6340   echo "$ac_t""yes" 1>&6
6341     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6342   cat >> confdefs.h <<EOF
6343 #define $ac_tr_func 1
6344 EOF
6345  
6346 else
6347   echo "$ac_t""no" 1>&6
6348 fi
6349 done
6350
6351 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6352 do
6353 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6354 echo "configure:6355: checking for $ac_func" >&5
6355 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6356   echo $ac_n "(cached) $ac_c" 1>&6
6357 else
6358   cat > conftest.$ac_ext <<EOF
6359 #line 6360 "configure"
6360 #include "confdefs.h"
6361 /* System header to define __stub macros and hopefully few prototypes,
6362     which can conflict with char $ac_func(); below.  */
6363 #include <assert.h>
6364 /* Override any gcc2 internal prototype to avoid an error.  */
6365 /* We use char because int might match the return type of a gcc2
6366     builtin and then its argument prototype would still apply.  */
6367 char $ac_func();
6368
6369 int main() {
6370
6371 /* The GNU C library defines this for functions which it implements
6372     to always fail with ENOSYS.  Some functions are actually named
6373     something starting with __ and the normal name is an alias.  */
6374 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6375 choke me
6376 #else
6377 $ac_func();
6378 #endif
6379
6380 ; return 0; }
6381 EOF
6382 if { (eval echo configure:6383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6383   rm -rf conftest*
6384   eval "ac_cv_func_$ac_func=yes"
6385 else
6386   echo "configure: failed program was:" >&5
6387   cat conftest.$ac_ext >&5
6388   rm -rf conftest*
6389   eval "ac_cv_func_$ac_func=no"
6390 fi
6391 rm -f conftest*
6392 fi
6393
6394 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6395   echo "$ac_t""yes" 1>&6
6396     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6397   cat >> confdefs.h <<EOF
6398 #define $ac_tr_func 1
6399 EOF
6400  
6401 else
6402   echo "$ac_t""no" 1>&6
6403 fi
6404 done
6405
6406 for ac_func in open64 _open64 __open64 creat64
6407 do
6408 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6409 echo "configure:6410: checking for $ac_func" >&5
6410 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6411   echo $ac_n "(cached) $ac_c" 1>&6
6412 else
6413   cat > conftest.$ac_ext <<EOF
6414 #line 6415 "configure"
6415 #include "confdefs.h"
6416 /* System header to define __stub macros and hopefully few prototypes,
6417     which can conflict with char $ac_func(); below.  */
6418 #include <assert.h>
6419 /* Override any gcc2 internal prototype to avoid an error.  */
6420 /* We use char because int might match the return type of a gcc2
6421     builtin and then its argument prototype would still apply.  */
6422 char $ac_func();
6423
6424 int main() {
6425
6426 /* The GNU C library defines this for functions which it implements
6427     to always fail with ENOSYS.  Some functions are actually named
6428     something starting with __ and the normal name is an alias.  */
6429 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6430 choke me
6431 #else
6432 $ac_func();
6433 #endif
6434
6435 ; return 0; }
6436 EOF
6437 if { (eval echo configure:6438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6438   rm -rf conftest*
6439   eval "ac_cv_func_$ac_func=yes"
6440 else
6441   echo "configure: failed program was:" >&5
6442   cat conftest.$ac_ext >&5
6443   rm -rf conftest*
6444   eval "ac_cv_func_$ac_func=no"
6445 fi
6446 rm -f conftest*
6447 fi
6448
6449 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6450   echo "$ac_t""yes" 1>&6
6451     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6452   cat >> confdefs.h <<EOF
6453 #define $ac_tr_func 1
6454 EOF
6455  
6456 else
6457   echo "$ac_t""no" 1>&6
6458 fi
6459 done
6460
6461
6462 #
6463 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6464 #
6465
6466 if test x$ac_cv_func_stat64 = xno ; then
6467   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6468 echo "configure:6469: checking for stat64 in <sys/stat.h>" >&5
6469   cat > conftest.$ac_ext <<EOF
6470 #line 6471 "configure"
6471 #include "confdefs.h"
6472
6473 #if defined(HAVE_UNISTD_H)
6474 #include <unistd.h>
6475 #endif
6476 #include <sys/stat.h>
6477
6478 int main() {
6479 struct stat64 st64; exit(stat64(".",&st64));
6480 ; return 0; }
6481 EOF
6482 if { (eval echo configure:6483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6483   rm -rf conftest*
6484   ac_cv_func_stat64=yes
6485 else
6486   echo "configure: failed program was:" >&5
6487   cat conftest.$ac_ext >&5
6488 fi
6489 rm -f conftest*
6490   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6491   if test x$ac_cv_func_stat64 = xyes ; then
6492     cat >> confdefs.h <<\EOF
6493 #define HAVE_STAT64 1
6494 EOF
6495
6496   fi
6497 fi
6498
6499 if test x$ac_cv_func_lstat64 = xno ; then
6500   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6501 echo "configure:6502: checking for lstat64 in <sys/stat.h>" >&5
6502   cat > conftest.$ac_ext <<EOF
6503 #line 6504 "configure"
6504 #include "confdefs.h"
6505
6506 #if defined(HAVE_UNISTD_H)
6507 #include <unistd.h>
6508 #endif
6509 #include <sys/stat.h>
6510
6511 int main() {
6512 struct stat64 st64; exit(lstat64(".",&st64));
6513 ; return 0; }
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6516   rm -rf conftest*
6517   ac_cv_func_lstat64=yes
6518 else
6519   echo "configure: failed program was:" >&5
6520   cat conftest.$ac_ext >&5
6521 fi
6522 rm -f conftest*
6523   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6524   if test x$ac_cv_func_lstat64 = xyes ; then
6525     cat >> confdefs.h <<\EOF
6526 #define HAVE_LSTAT64 1
6527 EOF
6528
6529   fi
6530 fi
6531
6532 if test x$ac_cv_func_fstat64 = xno ; then
6533   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6534 echo "configure:6535: checking for fstat64 in <sys/stat.h>" >&5
6535   cat > conftest.$ac_ext <<EOF
6536 #line 6537 "configure"
6537 #include "confdefs.h"
6538
6539 #if defined(HAVE_UNISTD_H)
6540 #include <unistd.h>
6541 #endif
6542 #include <sys/stat.h>
6543
6544 int main() {
6545 struct stat64 st64; exit(fstat64(0,&st64));
6546 ; return 0; }
6547 EOF
6548 if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6549   rm -rf conftest*
6550   ac_cv_func_fstat64=yes
6551 else
6552   echo "configure: failed program was:" >&5
6553   cat conftest.$ac_ext >&5
6554 fi
6555 rm -f conftest*
6556   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6557   if test x$ac_cv_func_fstat64 = xyes ; then
6558     cat >> confdefs.h <<\EOF
6559 #define HAVE_FSTAT64 1
6560 EOF
6561
6562   fi
6563 fi
6564
6565 #####################################
6566 # we might need the resolv library on some systems
6567 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6568 echo "configure:6569: checking for dn_expand in -lresolv" >&5
6569 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6570 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6571   echo $ac_n "(cached) $ac_c" 1>&6
6572 else
6573   ac_save_LIBS="$LIBS"
6574 LIBS="-lresolv  $LIBS"
6575 cat > conftest.$ac_ext <<EOF
6576 #line 6577 "configure"
6577 #include "confdefs.h"
6578 /* Override any gcc2 internal prototype to avoid an error.  */
6579 /* We use char because int might match the return type of a gcc2
6580     builtin and then its argument prototype would still apply.  */
6581 char dn_expand();
6582
6583 int main() {
6584 dn_expand()
6585 ; return 0; }
6586 EOF
6587 if { (eval echo configure:6588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6588   rm -rf conftest*
6589   eval "ac_cv_lib_$ac_lib_var=yes"
6590 else
6591   echo "configure: failed program was:" >&5
6592   cat conftest.$ac_ext >&5
6593   rm -rf conftest*
6594   eval "ac_cv_lib_$ac_lib_var=no"
6595 fi
6596 rm -f conftest*
6597 LIBS="$ac_save_LIBS"
6598
6599 fi
6600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6601   echo "$ac_t""yes" 1>&6
6602     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6603     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6604   cat >> confdefs.h <<EOF
6605 #define $ac_tr_lib 1
6606 EOF
6607
6608   LIBS="-lresolv $LIBS"
6609
6610 else
6611   echo "$ac_t""no" 1>&6
6612 fi
6613
6614
6615 #
6616 # Check for the functions putprpwnam, set_auth_parameters,
6617 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6618 # Needed for OSF1 and HPUX.
6619 #
6620
6621 case "$LIBS" in
6622   *-lsecurity*) for ac_func in putprpwnam
6623 do
6624 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6625 echo "configure:6626: checking for $ac_func" >&5
6626 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6627   echo $ac_n "(cached) $ac_c" 1>&6
6628 else
6629   cat > conftest.$ac_ext <<EOF
6630 #line 6631 "configure"
6631 #include "confdefs.h"
6632 /* System header to define __stub macros and hopefully few prototypes,
6633     which can conflict with char $ac_func(); below.  */
6634 #include <assert.h>
6635 /* Override any gcc2 internal prototype to avoid an error.  */
6636 /* We use char because int might match the return type of a gcc2
6637     builtin and then its argument prototype would still apply.  */
6638 char $ac_func();
6639
6640 int main() {
6641
6642 /* The GNU C library defines this for functions which it implements
6643     to always fail with ENOSYS.  Some functions are actually named
6644     something starting with __ and the normal name is an alias.  */
6645 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6646 choke me
6647 #else
6648 $ac_func();
6649 #endif
6650
6651 ; return 0; }
6652 EOF
6653 if { (eval echo configure:6654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6654   rm -rf conftest*
6655   eval "ac_cv_func_$ac_func=yes"
6656 else
6657   echo "configure: failed program was:" >&5
6658   cat conftest.$ac_ext >&5
6659   rm -rf conftest*
6660   eval "ac_cv_func_$ac_func=no"
6661 fi
6662 rm -f conftest*
6663 fi
6664
6665 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6666   echo "$ac_t""yes" 1>&6
6667     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6668   cat >> confdefs.h <<EOF
6669 #define $ac_tr_func 1
6670 EOF
6671  
6672 else
6673   echo "$ac_t""no" 1>&6
6674 fi
6675 done
6676  ;;
6677   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6678 echo "configure:6679: checking for putprpwnam in -lsecurity" >&5
6679 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6680 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6681   echo $ac_n "(cached) $ac_c" 1>&6
6682 else
6683   ac_save_LIBS="$LIBS"
6684 LIBS="-lsecurity  $LIBS"
6685 cat > conftest.$ac_ext <<EOF
6686 #line 6687 "configure"
6687 #include "confdefs.h"
6688 /* Override any gcc2 internal prototype to avoid an error.  */
6689 /* We use char because int might match the return type of a gcc2
6690     builtin and then its argument prototype would still apply.  */
6691 char putprpwnam();
6692
6693 int main() {
6694 putprpwnam()
6695 ; return 0; }
6696 EOF
6697 if { (eval echo configure:6698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6698   rm -rf conftest*
6699   eval "ac_cv_lib_$ac_lib_var=yes"
6700 else
6701   echo "configure: failed program was:" >&5
6702   cat conftest.$ac_ext >&5
6703   rm -rf conftest*
6704   eval "ac_cv_lib_$ac_lib_var=no"
6705 fi
6706 rm -f conftest*
6707 LIBS="$ac_save_LIBS"
6708
6709 fi
6710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6711   echo "$ac_t""yes" 1>&6
6712     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6713     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6714   cat >> confdefs.h <<EOF
6715 #define $ac_tr_lib 1
6716 EOF
6717
6718   LIBS="-lsecurity $LIBS"
6719
6720 else
6721   echo "$ac_t""no" 1>&6
6722 fi
6723  
6724      for ac_func in putprpwnam
6725 do
6726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6727 echo "configure:6728: checking for $ac_func" >&5
6728 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6729   echo $ac_n "(cached) $ac_c" 1>&6
6730 else
6731   cat > conftest.$ac_ext <<EOF
6732 #line 6733 "configure"
6733 #include "confdefs.h"
6734 /* System header to define __stub macros and hopefully few prototypes,
6735     which can conflict with char $ac_func(); below.  */
6736 #include <assert.h>
6737 /* Override any gcc2 internal prototype to avoid an error.  */
6738 /* We use char because int might match the return type of a gcc2
6739     builtin and then its argument prototype would still apply.  */
6740 char $ac_func();
6741
6742 int main() {
6743
6744 /* The GNU C library defines this for functions which it implements
6745     to always fail with ENOSYS.  Some functions are actually named
6746     something starting with __ and the normal name is an alias.  */
6747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6748 choke me
6749 #else
6750 $ac_func();
6751 #endif
6752
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6756   rm -rf conftest*
6757   eval "ac_cv_func_$ac_func=yes"
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   eval "ac_cv_func_$ac_func=no"
6763 fi
6764 rm -f conftest*
6765 fi
6766
6767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6768   echo "$ac_t""yes" 1>&6
6769     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6770   cat >> confdefs.h <<EOF
6771 #define $ac_tr_func 1
6772 EOF
6773  
6774 else
6775   echo "$ac_t""no" 1>&6
6776 fi
6777 done
6778
6779   ;;
6780   esac
6781
6782 case "$LIBS" in
6783   *-lsec*) for ac_func in putprpwnam
6784 do
6785 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6786 echo "configure:6787: checking for $ac_func" >&5
6787 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790   cat > conftest.$ac_ext <<EOF
6791 #line 6792 "configure"
6792 #include "confdefs.h"
6793 /* System header to define __stub macros and hopefully few prototypes,
6794     which can conflict with char $ac_func(); below.  */
6795 #include <assert.h>
6796 /* Override any gcc2 internal prototype to avoid an error.  */
6797 /* We use char because int might match the return type of a gcc2
6798     builtin and then its argument prototype would still apply.  */
6799 char $ac_func();
6800
6801 int main() {
6802
6803 /* The GNU C library defines this for functions which it implements
6804     to always fail with ENOSYS.  Some functions are actually named
6805     something starting with __ and the normal name is an alias.  */
6806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6807 choke me
6808 #else
6809 $ac_func();
6810 #endif
6811
6812 ; return 0; }
6813 EOF
6814 if { (eval echo configure:6815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6815   rm -rf conftest*
6816   eval "ac_cv_func_$ac_func=yes"
6817 else
6818   echo "configure: failed program was:" >&5
6819   cat conftest.$ac_ext >&5
6820   rm -rf conftest*
6821   eval "ac_cv_func_$ac_func=no"
6822 fi
6823 rm -f conftest*
6824 fi
6825
6826 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6827   echo "$ac_t""yes" 1>&6
6828     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6829   cat >> confdefs.h <<EOF
6830 #define $ac_tr_func 1
6831 EOF
6832  
6833 else
6834   echo "$ac_t""no" 1>&6
6835 fi
6836 done
6837  ;;
6838   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6839 echo "configure:6840: checking for putprpwnam in -lsec" >&5
6840 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6841 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6842   echo $ac_n "(cached) $ac_c" 1>&6
6843 else
6844   ac_save_LIBS="$LIBS"
6845 LIBS="-lsec  $LIBS"
6846 cat > conftest.$ac_ext <<EOF
6847 #line 6848 "configure"
6848 #include "confdefs.h"
6849 /* Override any gcc2 internal prototype to avoid an error.  */
6850 /* We use char because int might match the return type of a gcc2
6851     builtin and then its argument prototype would still apply.  */
6852 char putprpwnam();
6853
6854 int main() {
6855 putprpwnam()
6856 ; return 0; }
6857 EOF
6858 if { (eval echo configure:6859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6859   rm -rf conftest*
6860   eval "ac_cv_lib_$ac_lib_var=yes"
6861 else
6862   echo "configure: failed program was:" >&5
6863   cat conftest.$ac_ext >&5
6864   rm -rf conftest*
6865   eval "ac_cv_lib_$ac_lib_var=no"
6866 fi
6867 rm -f conftest*
6868 LIBS="$ac_save_LIBS"
6869
6870 fi
6871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6872   echo "$ac_t""yes" 1>&6
6873     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6874     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6875   cat >> confdefs.h <<EOF
6876 #define $ac_tr_lib 1
6877 EOF
6878
6879   LIBS="-lsec $LIBS"
6880
6881 else
6882   echo "$ac_t""no" 1>&6
6883 fi
6884  
6885      for ac_func in putprpwnam
6886 do
6887 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6888 echo "configure:6889: checking for $ac_func" >&5
6889 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6890   echo $ac_n "(cached) $ac_c" 1>&6
6891 else
6892   cat > conftest.$ac_ext <<EOF
6893 #line 6894 "configure"
6894 #include "confdefs.h"
6895 /* System header to define __stub macros and hopefully few prototypes,
6896     which can conflict with char $ac_func(); below.  */
6897 #include <assert.h>
6898 /* Override any gcc2 internal prototype to avoid an error.  */
6899 /* We use char because int might match the return type of a gcc2
6900     builtin and then its argument prototype would still apply.  */
6901 char $ac_func();
6902
6903 int main() {
6904
6905 /* The GNU C library defines this for functions which it implements
6906     to always fail with ENOSYS.  Some functions are actually named
6907     something starting with __ and the normal name is an alias.  */
6908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6909 choke me
6910 #else
6911 $ac_func();
6912 #endif
6913
6914 ; return 0; }
6915 EOF
6916 if { (eval echo configure:6917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6917   rm -rf conftest*
6918   eval "ac_cv_func_$ac_func=yes"
6919 else
6920   echo "configure: failed program was:" >&5
6921   cat conftest.$ac_ext >&5
6922   rm -rf conftest*
6923   eval "ac_cv_func_$ac_func=no"
6924 fi
6925 rm -f conftest*
6926 fi
6927
6928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6929   echo "$ac_t""yes" 1>&6
6930     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6931   cat >> confdefs.h <<EOF
6932 #define $ac_tr_func 1
6933 EOF
6934  
6935 else
6936   echo "$ac_t""no" 1>&6
6937 fi
6938 done
6939
6940   ;;
6941   esac
6942
6943
6944 case "$LIBS" in
6945   *-lsecurity*) for ac_func in set_auth_parameters
6946 do
6947 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6948 echo "configure:6949: checking for $ac_func" >&5
6949 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6950   echo $ac_n "(cached) $ac_c" 1>&6
6951 else
6952   cat > conftest.$ac_ext <<EOF
6953 #line 6954 "configure"
6954 #include "confdefs.h"
6955 /* System header to define __stub macros and hopefully few prototypes,
6956     which can conflict with char $ac_func(); below.  */
6957 #include <assert.h>
6958 /* Override any gcc2 internal prototype to avoid an error.  */
6959 /* We use char because int might match the return type of a gcc2
6960     builtin and then its argument prototype would still apply.  */
6961 char $ac_func();
6962
6963 int main() {
6964
6965 /* The GNU C library defines this for functions which it implements
6966     to always fail with ENOSYS.  Some functions are actually named
6967     something starting with __ and the normal name is an alias.  */
6968 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6969 choke me
6970 #else
6971 $ac_func();
6972 #endif
6973
6974 ; return 0; }
6975 EOF
6976 if { (eval echo configure:6977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6977   rm -rf conftest*
6978   eval "ac_cv_func_$ac_func=yes"
6979 else
6980   echo "configure: failed program was:" >&5
6981   cat conftest.$ac_ext >&5
6982   rm -rf conftest*
6983   eval "ac_cv_func_$ac_func=no"
6984 fi
6985 rm -f conftest*
6986 fi
6987
6988 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6989   echo "$ac_t""yes" 1>&6
6990     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6991   cat >> confdefs.h <<EOF
6992 #define $ac_tr_func 1
6993 EOF
6994  
6995 else
6996   echo "$ac_t""no" 1>&6
6997 fi
6998 done
6999  ;;
7000   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7001 echo "configure:7002: checking for set_auth_parameters in -lsecurity" >&5
7002 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7003 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7004   echo $ac_n "(cached) $ac_c" 1>&6
7005 else
7006   ac_save_LIBS="$LIBS"
7007 LIBS="-lsecurity  $LIBS"
7008 cat > conftest.$ac_ext <<EOF
7009 #line 7010 "configure"
7010 #include "confdefs.h"
7011 /* Override any gcc2 internal prototype to avoid an error.  */
7012 /* We use char because int might match the return type of a gcc2
7013     builtin and then its argument prototype would still apply.  */
7014 char set_auth_parameters();
7015
7016 int main() {
7017 set_auth_parameters()
7018 ; return 0; }
7019 EOF
7020 if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7021   rm -rf conftest*
7022   eval "ac_cv_lib_$ac_lib_var=yes"
7023 else
7024   echo "configure: failed program was:" >&5
7025   cat conftest.$ac_ext >&5
7026   rm -rf conftest*
7027   eval "ac_cv_lib_$ac_lib_var=no"
7028 fi
7029 rm -f conftest*
7030 LIBS="$ac_save_LIBS"
7031
7032 fi
7033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7034   echo "$ac_t""yes" 1>&6
7035     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7036     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7037   cat >> confdefs.h <<EOF
7038 #define $ac_tr_lib 1
7039 EOF
7040
7041   LIBS="-lsecurity $LIBS"
7042
7043 else
7044   echo "$ac_t""no" 1>&6
7045 fi
7046  
7047      for ac_func in set_auth_parameters
7048 do
7049 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7050 echo "configure:7051: checking for $ac_func" >&5
7051 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7052   echo $ac_n "(cached) $ac_c" 1>&6
7053 else
7054   cat > conftest.$ac_ext <<EOF
7055 #line 7056 "configure"
7056 #include "confdefs.h"
7057 /* System header to define __stub macros and hopefully few prototypes,
7058     which can conflict with char $ac_func(); below.  */
7059 #include <assert.h>
7060 /* Override any gcc2 internal prototype to avoid an error.  */
7061 /* We use char because int might match the return type of a gcc2
7062     builtin and then its argument prototype would still apply.  */
7063 char $ac_func();
7064
7065 int main() {
7066
7067 /* The GNU C library defines this for functions which it implements
7068     to always fail with ENOSYS.  Some functions are actually named
7069     something starting with __ and the normal name is an alias.  */
7070 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7071 choke me
7072 #else
7073 $ac_func();
7074 #endif
7075
7076 ; return 0; }
7077 EOF
7078 if { (eval echo configure:7079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7079   rm -rf conftest*
7080   eval "ac_cv_func_$ac_func=yes"
7081 else
7082   echo "configure: failed program was:" >&5
7083   cat conftest.$ac_ext >&5
7084   rm -rf conftest*
7085   eval "ac_cv_func_$ac_func=no"
7086 fi
7087 rm -f conftest*
7088 fi
7089
7090 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7091   echo "$ac_t""yes" 1>&6
7092     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7093   cat >> confdefs.h <<EOF
7094 #define $ac_tr_func 1
7095 EOF
7096  
7097 else
7098   echo "$ac_t""no" 1>&6
7099 fi
7100 done
7101
7102   ;;
7103   esac
7104
7105 case "$LIBS" in
7106   *-lsec*) for ac_func in set_auth_parameters
7107 do
7108 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7109 echo "configure:7110: checking for $ac_func" >&5
7110 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7111   echo $ac_n "(cached) $ac_c" 1>&6
7112 else
7113   cat > conftest.$ac_ext <<EOF
7114 #line 7115 "configure"
7115 #include "confdefs.h"
7116 /* System header to define __stub macros and hopefully few prototypes,
7117     which can conflict with char $ac_func(); below.  */
7118 #include <assert.h>
7119 /* Override any gcc2 internal prototype to avoid an error.  */
7120 /* We use char because int might match the return type of a gcc2
7121     builtin and then its argument prototype would still apply.  */
7122 char $ac_func();
7123
7124 int main() {
7125
7126 /* The GNU C library defines this for functions which it implements
7127     to always fail with ENOSYS.  Some functions are actually named
7128     something starting with __ and the normal name is an alias.  */
7129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7130 choke me
7131 #else
7132 $ac_func();
7133 #endif
7134
7135 ; return 0; }
7136 EOF
7137 if { (eval echo configure:7138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7138   rm -rf conftest*
7139   eval "ac_cv_func_$ac_func=yes"
7140 else
7141   echo "configure: failed program was:" >&5
7142   cat conftest.$ac_ext >&5
7143   rm -rf conftest*
7144   eval "ac_cv_func_$ac_func=no"
7145 fi
7146 rm -f conftest*
7147 fi
7148
7149 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7150   echo "$ac_t""yes" 1>&6
7151     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7152   cat >> confdefs.h <<EOF
7153 #define $ac_tr_func 1
7154 EOF
7155  
7156 else
7157   echo "$ac_t""no" 1>&6
7158 fi
7159 done
7160  ;;
7161   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7162 echo "configure:7163: checking for set_auth_parameters in -lsec" >&5
7163 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7164 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7165   echo $ac_n "(cached) $ac_c" 1>&6
7166 else
7167   ac_save_LIBS="$LIBS"
7168 LIBS="-lsec  $LIBS"
7169 cat > conftest.$ac_ext <<EOF
7170 #line 7171 "configure"
7171 #include "confdefs.h"
7172 /* Override any gcc2 internal prototype to avoid an error.  */
7173 /* We use char because int might match the return type of a gcc2
7174     builtin and then its argument prototype would still apply.  */
7175 char set_auth_parameters();
7176
7177 int main() {
7178 set_auth_parameters()
7179 ; return 0; }
7180 EOF
7181 if { (eval echo configure:7182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7182   rm -rf conftest*
7183   eval "ac_cv_lib_$ac_lib_var=yes"
7184 else
7185   echo "configure: failed program was:" >&5
7186   cat conftest.$ac_ext >&5
7187   rm -rf conftest*
7188   eval "ac_cv_lib_$ac_lib_var=no"
7189 fi
7190 rm -f conftest*
7191 LIBS="$ac_save_LIBS"
7192
7193 fi
7194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7195   echo "$ac_t""yes" 1>&6
7196     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7197     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7198   cat >> confdefs.h <<EOF
7199 #define $ac_tr_lib 1
7200 EOF
7201
7202   LIBS="-lsec $LIBS"
7203
7204 else
7205   echo "$ac_t""no" 1>&6
7206 fi
7207  
7208      for ac_func in set_auth_parameters
7209 do
7210 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7211 echo "configure:7212: checking for $ac_func" >&5
7212 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7213   echo $ac_n "(cached) $ac_c" 1>&6
7214 else
7215   cat > conftest.$ac_ext <<EOF
7216 #line 7217 "configure"
7217 #include "confdefs.h"
7218 /* System header to define __stub macros and hopefully few prototypes,
7219     which can conflict with char $ac_func(); below.  */
7220 #include <assert.h>
7221 /* Override any gcc2 internal prototype to avoid an error.  */
7222 /* We use char because int might match the return type of a gcc2
7223     builtin and then its argument prototype would still apply.  */
7224 char $ac_func();
7225
7226 int main() {
7227
7228 /* The GNU C library defines this for functions which it implements
7229     to always fail with ENOSYS.  Some functions are actually named
7230     something starting with __ and the normal name is an alias.  */
7231 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7232 choke me
7233 #else
7234 $ac_func();
7235 #endif
7236
7237 ; return 0; }
7238 EOF
7239 if { (eval echo configure:7240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7240   rm -rf conftest*
7241   eval "ac_cv_func_$ac_func=yes"
7242 else
7243   echo "configure: failed program was:" >&5
7244   cat conftest.$ac_ext >&5
7245   rm -rf conftest*
7246   eval "ac_cv_func_$ac_func=no"
7247 fi
7248 rm -f conftest*
7249 fi
7250
7251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7252   echo "$ac_t""yes" 1>&6
7253     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7254   cat >> confdefs.h <<EOF
7255 #define $ac_tr_func 1
7256 EOF
7257  
7258 else
7259   echo "$ac_t""no" 1>&6
7260 fi
7261 done
7262
7263   ;;
7264   esac
7265
7266
7267 # UnixWare 7.x has its getspnam in -lgen
7268 case "$LIBS" in
7269   *-lgen*) for ac_func in getspnam
7270 do
7271 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7272 echo "configure:7273: checking for $ac_func" >&5
7273 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7274   echo $ac_n "(cached) $ac_c" 1>&6
7275 else
7276   cat > conftest.$ac_ext <<EOF
7277 #line 7278 "configure"
7278 #include "confdefs.h"
7279 /* System header to define __stub macros and hopefully few prototypes,
7280     which can conflict with char $ac_func(); below.  */
7281 #include <assert.h>
7282 /* Override any gcc2 internal prototype to avoid an error.  */
7283 /* We use char because int might match the return type of a gcc2
7284     builtin and then its argument prototype would still apply.  */
7285 char $ac_func();
7286
7287 int main() {
7288
7289 /* The GNU C library defines this for functions which it implements
7290     to always fail with ENOSYS.  Some functions are actually named
7291     something starting with __ and the normal name is an alias.  */
7292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7293 choke me
7294 #else
7295 $ac_func();
7296 #endif
7297
7298 ; return 0; }
7299 EOF
7300 if { (eval echo configure:7301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7301   rm -rf conftest*
7302   eval "ac_cv_func_$ac_func=yes"
7303 else
7304   echo "configure: failed program was:" >&5
7305   cat conftest.$ac_ext >&5
7306   rm -rf conftest*
7307   eval "ac_cv_func_$ac_func=no"
7308 fi
7309 rm -f conftest*
7310 fi
7311
7312 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7313   echo "$ac_t""yes" 1>&6
7314     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7315   cat >> confdefs.h <<EOF
7316 #define $ac_tr_func 1
7317 EOF
7318  
7319 else
7320   echo "$ac_t""no" 1>&6
7321 fi
7322 done
7323  ;;
7324   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7325 echo "configure:7326: checking for getspnam in -lgen" >&5
7326 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7327 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7328   echo $ac_n "(cached) $ac_c" 1>&6
7329 else
7330   ac_save_LIBS="$LIBS"
7331 LIBS="-lgen  $LIBS"
7332 cat > conftest.$ac_ext <<EOF
7333 #line 7334 "configure"
7334 #include "confdefs.h"
7335 /* Override any gcc2 internal prototype to avoid an error.  */
7336 /* We use char because int might match the return type of a gcc2
7337     builtin and then its argument prototype would still apply.  */
7338 char getspnam();
7339
7340 int main() {
7341 getspnam()
7342 ; return 0; }
7343 EOF
7344 if { (eval echo configure:7345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7345   rm -rf conftest*
7346   eval "ac_cv_lib_$ac_lib_var=yes"
7347 else
7348   echo "configure: failed program was:" >&5
7349   cat conftest.$ac_ext >&5
7350   rm -rf conftest*
7351   eval "ac_cv_lib_$ac_lib_var=no"
7352 fi
7353 rm -f conftest*
7354 LIBS="$ac_save_LIBS"
7355
7356 fi
7357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7358   echo "$ac_t""yes" 1>&6
7359     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7360     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7361   cat >> confdefs.h <<EOF
7362 #define $ac_tr_lib 1
7363 EOF
7364
7365   LIBS="-lgen $LIBS"
7366
7367 else
7368   echo "$ac_t""no" 1>&6
7369 fi
7370  
7371      for ac_func in getspnam
7372 do
7373 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7374 echo "configure:7375: checking for $ac_func" >&5
7375 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7376   echo $ac_n "(cached) $ac_c" 1>&6
7377 else
7378   cat > conftest.$ac_ext <<EOF
7379 #line 7380 "configure"
7380 #include "confdefs.h"
7381 /* System header to define __stub macros and hopefully few prototypes,
7382     which can conflict with char $ac_func(); below.  */
7383 #include <assert.h>
7384 /* Override any gcc2 internal prototype to avoid an error.  */
7385 /* We use char because int might match the return type of a gcc2
7386     builtin and then its argument prototype would still apply.  */
7387 char $ac_func();
7388
7389 int main() {
7390
7391 /* The GNU C library defines this for functions which it implements
7392     to always fail with ENOSYS.  Some functions are actually named
7393     something starting with __ and the normal name is an alias.  */
7394 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7395 choke me
7396 #else
7397 $ac_func();
7398 #endif
7399
7400 ; return 0; }
7401 EOF
7402 if { (eval echo configure:7403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7403   rm -rf conftest*
7404   eval "ac_cv_func_$ac_func=yes"
7405 else
7406   echo "configure: failed program was:" >&5
7407   cat conftest.$ac_ext >&5
7408   rm -rf conftest*
7409   eval "ac_cv_func_$ac_func=no"
7410 fi
7411 rm -f conftest*
7412 fi
7413
7414 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7415   echo "$ac_t""yes" 1>&6
7416     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7417   cat >> confdefs.h <<EOF
7418 #define $ac_tr_func 1
7419 EOF
7420  
7421 else
7422   echo "$ac_t""no" 1>&6
7423 fi
7424 done
7425
7426   ;;
7427   esac
7428
7429
7430 case "$LIBS" in
7431   *-lsecurity*) for ac_func in getspnam
7432 do
7433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7434 echo "configure:7435: checking for $ac_func" >&5
7435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7436   echo $ac_n "(cached) $ac_c" 1>&6
7437 else
7438   cat > conftest.$ac_ext <<EOF
7439 #line 7440 "configure"
7440 #include "confdefs.h"
7441 /* System header to define __stub macros and hopefully few prototypes,
7442     which can conflict with char $ac_func(); below.  */
7443 #include <assert.h>
7444 /* Override any gcc2 internal prototype to avoid an error.  */
7445 /* We use char because int might match the return type of a gcc2
7446     builtin and then its argument prototype would still apply.  */
7447 char $ac_func();
7448
7449 int main() {
7450
7451 /* The GNU C library defines this for functions which it implements
7452     to always fail with ENOSYS.  Some functions are actually named
7453     something starting with __ and the normal name is an alias.  */
7454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7455 choke me
7456 #else
7457 $ac_func();
7458 #endif
7459
7460 ; return 0; }
7461 EOF
7462 if { (eval echo configure:7463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7463   rm -rf conftest*
7464   eval "ac_cv_func_$ac_func=yes"
7465 else
7466   echo "configure: failed program was:" >&5
7467   cat conftest.$ac_ext >&5
7468   rm -rf conftest*
7469   eval "ac_cv_func_$ac_func=no"
7470 fi
7471 rm -f conftest*
7472 fi
7473
7474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7475   echo "$ac_t""yes" 1>&6
7476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7477   cat >> confdefs.h <<EOF
7478 #define $ac_tr_func 1
7479 EOF
7480  
7481 else
7482   echo "$ac_t""no" 1>&6
7483 fi
7484 done
7485  ;;
7486   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7487 echo "configure:7488: checking for getspnam in -lsecurity" >&5
7488 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7489 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7490   echo $ac_n "(cached) $ac_c" 1>&6
7491 else
7492   ac_save_LIBS="$LIBS"
7493 LIBS="-lsecurity  $LIBS"
7494 cat > conftest.$ac_ext <<EOF
7495 #line 7496 "configure"
7496 #include "confdefs.h"
7497 /* Override any gcc2 internal prototype to avoid an error.  */
7498 /* We use char because int might match the return type of a gcc2
7499     builtin and then its argument prototype would still apply.  */
7500 char getspnam();
7501
7502 int main() {
7503 getspnam()
7504 ; return 0; }
7505 EOF
7506 if { (eval echo configure:7507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7507   rm -rf conftest*
7508   eval "ac_cv_lib_$ac_lib_var=yes"
7509 else
7510   echo "configure: failed program was:" >&5
7511   cat conftest.$ac_ext >&5
7512   rm -rf conftest*
7513   eval "ac_cv_lib_$ac_lib_var=no"
7514 fi
7515 rm -f conftest*
7516 LIBS="$ac_save_LIBS"
7517
7518 fi
7519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7520   echo "$ac_t""yes" 1>&6
7521     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7522     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7523   cat >> confdefs.h <<EOF
7524 #define $ac_tr_lib 1
7525 EOF
7526
7527   LIBS="-lsecurity $LIBS"
7528
7529 else
7530   echo "$ac_t""no" 1>&6
7531 fi
7532  
7533      for ac_func in getspnam
7534 do
7535 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7536 echo "configure:7537: checking for $ac_func" >&5
7537 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7538   echo $ac_n "(cached) $ac_c" 1>&6
7539 else
7540   cat > conftest.$ac_ext <<EOF
7541 #line 7542 "configure"
7542 #include "confdefs.h"
7543 /* System header to define __stub macros and hopefully few prototypes,
7544     which can conflict with char $ac_func(); below.  */
7545 #include <assert.h>
7546 /* Override any gcc2 internal prototype to avoid an error.  */
7547 /* We use char because int might match the return type of a gcc2
7548     builtin and then its argument prototype would still apply.  */
7549 char $ac_func();
7550
7551 int main() {
7552
7553 /* The GNU C library defines this for functions which it implements
7554     to always fail with ENOSYS.  Some functions are actually named
7555     something starting with __ and the normal name is an alias.  */
7556 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7557 choke me
7558 #else
7559 $ac_func();
7560 #endif
7561
7562 ; return 0; }
7563 EOF
7564 if { (eval echo configure:7565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7565   rm -rf conftest*
7566   eval "ac_cv_func_$ac_func=yes"
7567 else
7568   echo "configure: failed program was:" >&5
7569   cat conftest.$ac_ext >&5
7570   rm -rf conftest*
7571   eval "ac_cv_func_$ac_func=no"
7572 fi
7573 rm -f conftest*
7574 fi
7575
7576 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7577   echo "$ac_t""yes" 1>&6
7578     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7579   cat >> confdefs.h <<EOF
7580 #define $ac_tr_func 1
7581 EOF
7582  
7583 else
7584   echo "$ac_t""no" 1>&6
7585 fi
7586 done
7587
7588   ;;
7589   esac
7590
7591 case "$LIBS" in
7592   *-lsec*) for ac_func in getspnam
7593 do
7594 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7595 echo "configure:7596: checking for $ac_func" >&5
7596 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7597   echo $ac_n "(cached) $ac_c" 1>&6
7598 else
7599   cat > conftest.$ac_ext <<EOF
7600 #line 7601 "configure"
7601 #include "confdefs.h"
7602 /* System header to define __stub macros and hopefully few prototypes,
7603     which can conflict with char $ac_func(); below.  */
7604 #include <assert.h>
7605 /* Override any gcc2 internal prototype to avoid an error.  */
7606 /* We use char because int might match the return type of a gcc2
7607     builtin and then its argument prototype would still apply.  */
7608 char $ac_func();
7609
7610 int main() {
7611
7612 /* The GNU C library defines this for functions which it implements
7613     to always fail with ENOSYS.  Some functions are actually named
7614     something starting with __ and the normal name is an alias.  */
7615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7616 choke me
7617 #else
7618 $ac_func();
7619 #endif
7620
7621 ; return 0; }
7622 EOF
7623 if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7624   rm -rf conftest*
7625   eval "ac_cv_func_$ac_func=yes"
7626 else
7627   echo "configure: failed program was:" >&5
7628   cat conftest.$ac_ext >&5
7629   rm -rf conftest*
7630   eval "ac_cv_func_$ac_func=no"
7631 fi
7632 rm -f conftest*
7633 fi
7634
7635 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7636   echo "$ac_t""yes" 1>&6
7637     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7638   cat >> confdefs.h <<EOF
7639 #define $ac_tr_func 1
7640 EOF
7641  
7642 else
7643   echo "$ac_t""no" 1>&6
7644 fi
7645 done
7646  ;;
7647   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7648 echo "configure:7649: checking for getspnam in -lsec" >&5
7649 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7650 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7651   echo $ac_n "(cached) $ac_c" 1>&6
7652 else
7653   ac_save_LIBS="$LIBS"
7654 LIBS="-lsec  $LIBS"
7655 cat > conftest.$ac_ext <<EOF
7656 #line 7657 "configure"
7657 #include "confdefs.h"
7658 /* Override any gcc2 internal prototype to avoid an error.  */
7659 /* We use char because int might match the return type of a gcc2
7660     builtin and then its argument prototype would still apply.  */
7661 char getspnam();
7662
7663 int main() {
7664 getspnam()
7665 ; return 0; }
7666 EOF
7667 if { (eval echo configure:7668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7668   rm -rf conftest*
7669   eval "ac_cv_lib_$ac_lib_var=yes"
7670 else
7671   echo "configure: failed program was:" >&5
7672   cat conftest.$ac_ext >&5
7673   rm -rf conftest*
7674   eval "ac_cv_lib_$ac_lib_var=no"
7675 fi
7676 rm -f conftest*
7677 LIBS="$ac_save_LIBS"
7678
7679 fi
7680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7681   echo "$ac_t""yes" 1>&6
7682     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7683     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7684   cat >> confdefs.h <<EOF
7685 #define $ac_tr_lib 1
7686 EOF
7687
7688   LIBS="-lsec $LIBS"
7689
7690 else
7691   echo "$ac_t""no" 1>&6
7692 fi
7693  
7694      for ac_func in getspnam
7695 do
7696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7697 echo "configure:7698: checking for $ac_func" >&5
7698 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7699   echo $ac_n "(cached) $ac_c" 1>&6
7700 else
7701   cat > conftest.$ac_ext <<EOF
7702 #line 7703 "configure"
7703 #include "confdefs.h"
7704 /* System header to define __stub macros and hopefully few prototypes,
7705     which can conflict with char $ac_func(); below.  */
7706 #include <assert.h>
7707 /* Override any gcc2 internal prototype to avoid an error.  */
7708 /* We use char because int might match the return type of a gcc2
7709     builtin and then its argument prototype would still apply.  */
7710 char $ac_func();
7711
7712 int main() {
7713
7714 /* The GNU C library defines this for functions which it implements
7715     to always fail with ENOSYS.  Some functions are actually named
7716     something starting with __ and the normal name is an alias.  */
7717 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7718 choke me
7719 #else
7720 $ac_func();
7721 #endif
7722
7723 ; return 0; }
7724 EOF
7725 if { (eval echo configure:7726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7726   rm -rf conftest*
7727   eval "ac_cv_func_$ac_func=yes"
7728 else
7729   echo "configure: failed program was:" >&5
7730   cat conftest.$ac_ext >&5
7731   rm -rf conftest*
7732   eval "ac_cv_func_$ac_func=no"
7733 fi
7734 rm -f conftest*
7735 fi
7736
7737 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7738   echo "$ac_t""yes" 1>&6
7739     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7740   cat >> confdefs.h <<EOF
7741 #define $ac_tr_func 1
7742 EOF
7743  
7744 else
7745   echo "$ac_t""no" 1>&6
7746 fi
7747 done
7748
7749   ;;
7750   esac
7751
7752
7753 case "$LIBS" in
7754   *-lsecurity*) for ac_func in bigcrypt
7755 do
7756 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7757 echo "configure:7758: checking for $ac_func" >&5
7758 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7759   echo $ac_n "(cached) $ac_c" 1>&6
7760 else
7761   cat > conftest.$ac_ext <<EOF
7762 #line 7763 "configure"
7763 #include "confdefs.h"
7764 /* System header to define __stub macros and hopefully few prototypes,
7765     which can conflict with char $ac_func(); below.  */
7766 #include <assert.h>
7767 /* Override any gcc2 internal prototype to avoid an error.  */
7768 /* We use char because int might match the return type of a gcc2
7769     builtin and then its argument prototype would still apply.  */
7770 char $ac_func();
7771
7772 int main() {
7773
7774 /* The GNU C library defines this for functions which it implements
7775     to always fail with ENOSYS.  Some functions are actually named
7776     something starting with __ and the normal name is an alias.  */
7777 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7778 choke me
7779 #else
7780 $ac_func();
7781 #endif
7782
7783 ; return 0; }
7784 EOF
7785 if { (eval echo configure:7786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7786   rm -rf conftest*
7787   eval "ac_cv_func_$ac_func=yes"
7788 else
7789   echo "configure: failed program was:" >&5
7790   cat conftest.$ac_ext >&5
7791   rm -rf conftest*
7792   eval "ac_cv_func_$ac_func=no"
7793 fi
7794 rm -f conftest*
7795 fi
7796
7797 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7798   echo "$ac_t""yes" 1>&6
7799     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7800   cat >> confdefs.h <<EOF
7801 #define $ac_tr_func 1
7802 EOF
7803  
7804 else
7805   echo "$ac_t""no" 1>&6
7806 fi
7807 done
7808  ;;
7809   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7810 echo "configure:7811: checking for bigcrypt in -lsecurity" >&5
7811 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7812 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7813   echo $ac_n "(cached) $ac_c" 1>&6
7814 else
7815   ac_save_LIBS="$LIBS"
7816 LIBS="-lsecurity  $LIBS"
7817 cat > conftest.$ac_ext <<EOF
7818 #line 7819 "configure"
7819 #include "confdefs.h"
7820 /* Override any gcc2 internal prototype to avoid an error.  */
7821 /* We use char because int might match the return type of a gcc2
7822     builtin and then its argument prototype would still apply.  */
7823 char bigcrypt();
7824
7825 int main() {
7826 bigcrypt()
7827 ; return 0; }
7828 EOF
7829 if { (eval echo configure:7830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7830   rm -rf conftest*
7831   eval "ac_cv_lib_$ac_lib_var=yes"
7832 else
7833   echo "configure: failed program was:" >&5
7834   cat conftest.$ac_ext >&5
7835   rm -rf conftest*
7836   eval "ac_cv_lib_$ac_lib_var=no"
7837 fi
7838 rm -f conftest*
7839 LIBS="$ac_save_LIBS"
7840
7841 fi
7842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7843   echo "$ac_t""yes" 1>&6
7844     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7845     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7846   cat >> confdefs.h <<EOF
7847 #define $ac_tr_lib 1
7848 EOF
7849
7850   LIBS="-lsecurity $LIBS"
7851
7852 else
7853   echo "$ac_t""no" 1>&6
7854 fi
7855  
7856      for ac_func in bigcrypt
7857 do
7858 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7859 echo "configure:7860: checking for $ac_func" >&5
7860 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7861   echo $ac_n "(cached) $ac_c" 1>&6
7862 else
7863   cat > conftest.$ac_ext <<EOF
7864 #line 7865 "configure"
7865 #include "confdefs.h"
7866 /* System header to define __stub macros and hopefully few prototypes,
7867     which can conflict with char $ac_func(); below.  */
7868 #include <assert.h>
7869 /* Override any gcc2 internal prototype to avoid an error.  */
7870 /* We use char because int might match the return type of a gcc2
7871     builtin and then its argument prototype would still apply.  */
7872 char $ac_func();
7873
7874 int main() {
7875
7876 /* The GNU C library defines this for functions which it implements
7877     to always fail with ENOSYS.  Some functions are actually named
7878     something starting with __ and the normal name is an alias.  */
7879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7880 choke me
7881 #else
7882 $ac_func();
7883 #endif
7884
7885 ; return 0; }
7886 EOF
7887 if { (eval echo configure:7888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7888   rm -rf conftest*
7889   eval "ac_cv_func_$ac_func=yes"
7890 else
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   eval "ac_cv_func_$ac_func=no"
7895 fi
7896 rm -f conftest*
7897 fi
7898
7899 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7900   echo "$ac_t""yes" 1>&6
7901     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7902   cat >> confdefs.h <<EOF
7903 #define $ac_tr_func 1
7904 EOF
7905  
7906 else
7907   echo "$ac_t""no" 1>&6
7908 fi
7909 done
7910
7911   ;;
7912   esac
7913
7914 case "$LIBS" in
7915   *-lsec*) for ac_func in bigcrypt
7916 do
7917 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7918 echo "configure:7919: checking for $ac_func" >&5
7919 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7920   echo $ac_n "(cached) $ac_c" 1>&6
7921 else
7922   cat > conftest.$ac_ext <<EOF
7923 #line 7924 "configure"
7924 #include "confdefs.h"
7925 /* System header to define __stub macros and hopefully few prototypes,
7926     which can conflict with char $ac_func(); below.  */
7927 #include <assert.h>
7928 /* Override any gcc2 internal prototype to avoid an error.  */
7929 /* We use char because int might match the return type of a gcc2
7930     builtin and then its argument prototype would still apply.  */
7931 char $ac_func();
7932
7933 int main() {
7934
7935 /* The GNU C library defines this for functions which it implements
7936     to always fail with ENOSYS.  Some functions are actually named
7937     something starting with __ and the normal name is an alias.  */
7938 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7939 choke me
7940 #else
7941 $ac_func();
7942 #endif
7943
7944 ; return 0; }
7945 EOF
7946 if { (eval echo configure:7947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7947   rm -rf conftest*
7948   eval "ac_cv_func_$ac_func=yes"
7949 else
7950   echo "configure: failed program was:" >&5
7951   cat conftest.$ac_ext >&5
7952   rm -rf conftest*
7953   eval "ac_cv_func_$ac_func=no"
7954 fi
7955 rm -f conftest*
7956 fi
7957
7958 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7959   echo "$ac_t""yes" 1>&6
7960     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7961   cat >> confdefs.h <<EOF
7962 #define $ac_tr_func 1
7963 EOF
7964  
7965 else
7966   echo "$ac_t""no" 1>&6
7967 fi
7968 done
7969  ;;
7970   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7971 echo "configure:7972: checking for bigcrypt in -lsec" >&5
7972 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7973 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7974   echo $ac_n "(cached) $ac_c" 1>&6
7975 else
7976   ac_save_LIBS="$LIBS"
7977 LIBS="-lsec  $LIBS"
7978 cat > conftest.$ac_ext <<EOF
7979 #line 7980 "configure"
7980 #include "confdefs.h"
7981 /* Override any gcc2 internal prototype to avoid an error.  */
7982 /* We use char because int might match the return type of a gcc2
7983     builtin and then its argument prototype would still apply.  */
7984 char bigcrypt();
7985
7986 int main() {
7987 bigcrypt()
7988 ; return 0; }
7989 EOF
7990 if { (eval echo configure:7991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7991   rm -rf conftest*
7992   eval "ac_cv_lib_$ac_lib_var=yes"
7993 else
7994   echo "configure: failed program was:" >&5
7995   cat conftest.$ac_ext >&5
7996   rm -rf conftest*
7997   eval "ac_cv_lib_$ac_lib_var=no"
7998 fi
7999 rm -f conftest*
8000 LIBS="$ac_save_LIBS"
8001
8002 fi
8003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8004   echo "$ac_t""yes" 1>&6
8005     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8006     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8007   cat >> confdefs.h <<EOF
8008 #define $ac_tr_lib 1
8009 EOF
8010
8011   LIBS="-lsec $LIBS"
8012
8013 else
8014   echo "$ac_t""no" 1>&6
8015 fi
8016  
8017      for ac_func in bigcrypt
8018 do
8019 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8020 echo "configure:8021: checking for $ac_func" >&5
8021 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8022   echo $ac_n "(cached) $ac_c" 1>&6
8023 else
8024   cat > conftest.$ac_ext <<EOF
8025 #line 8026 "configure"
8026 #include "confdefs.h"
8027 /* System header to define __stub macros and hopefully few prototypes,
8028     which can conflict with char $ac_func(); below.  */
8029 #include <assert.h>
8030 /* Override any gcc2 internal prototype to avoid an error.  */
8031 /* We use char because int might match the return type of a gcc2
8032     builtin and then its argument prototype would still apply.  */
8033 char $ac_func();
8034
8035 int main() {
8036
8037 /* The GNU C library defines this for functions which it implements
8038     to always fail with ENOSYS.  Some functions are actually named
8039     something starting with __ and the normal name is an alias.  */
8040 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8041 choke me
8042 #else
8043 $ac_func();
8044 #endif
8045
8046 ; return 0; }
8047 EOF
8048 if { (eval echo configure:8049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8049   rm -rf conftest*
8050   eval "ac_cv_func_$ac_func=yes"
8051 else
8052   echo "configure: failed program was:" >&5
8053   cat conftest.$ac_ext >&5
8054   rm -rf conftest*
8055   eval "ac_cv_func_$ac_func=no"
8056 fi
8057 rm -f conftest*
8058 fi
8059
8060 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8061   echo "$ac_t""yes" 1>&6
8062     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8063   cat >> confdefs.h <<EOF
8064 #define $ac_tr_func 1
8065 EOF
8066  
8067 else
8068   echo "$ac_t""no" 1>&6
8069 fi
8070 done
8071
8072   ;;
8073   esac
8074
8075
8076 case "$LIBS" in
8077   *-lsecurity*) for ac_func in getprpwnam
8078 do
8079 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8080 echo "configure:8081: checking for $ac_func" >&5
8081 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8082   echo $ac_n "(cached) $ac_c" 1>&6
8083 else
8084   cat > conftest.$ac_ext <<EOF
8085 #line 8086 "configure"
8086 #include "confdefs.h"
8087 /* System header to define __stub macros and hopefully few prototypes,
8088     which can conflict with char $ac_func(); below.  */
8089 #include <assert.h>
8090 /* Override any gcc2 internal prototype to avoid an error.  */
8091 /* We use char because int might match the return type of a gcc2
8092     builtin and then its argument prototype would still apply.  */
8093 char $ac_func();
8094
8095 int main() {
8096
8097 /* The GNU C library defines this for functions which it implements
8098     to always fail with ENOSYS.  Some functions are actually named
8099     something starting with __ and the normal name is an alias.  */
8100 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8101 choke me
8102 #else
8103 $ac_func();
8104 #endif
8105
8106 ; return 0; }
8107 EOF
8108 if { (eval echo configure:8109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8109   rm -rf conftest*
8110   eval "ac_cv_func_$ac_func=yes"
8111 else
8112   echo "configure: failed program was:" >&5
8113   cat conftest.$ac_ext >&5
8114   rm -rf conftest*
8115   eval "ac_cv_func_$ac_func=no"
8116 fi
8117 rm -f conftest*
8118 fi
8119
8120 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8121   echo "$ac_t""yes" 1>&6
8122     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8123   cat >> confdefs.h <<EOF
8124 #define $ac_tr_func 1
8125 EOF
8126  
8127 else
8128   echo "$ac_t""no" 1>&6
8129 fi
8130 done
8131  ;;
8132   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8133 echo "configure:8134: checking for getprpwnam in -lsecurity" >&5
8134 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8135 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8136   echo $ac_n "(cached) $ac_c" 1>&6
8137 else
8138   ac_save_LIBS="$LIBS"
8139 LIBS="-lsecurity  $LIBS"
8140 cat > conftest.$ac_ext <<EOF
8141 #line 8142 "configure"
8142 #include "confdefs.h"
8143 /* Override any gcc2 internal prototype to avoid an error.  */
8144 /* We use char because int might match the return type of a gcc2
8145     builtin and then its argument prototype would still apply.  */
8146 char getprpwnam();
8147
8148 int main() {
8149 getprpwnam()
8150 ; return 0; }
8151 EOF
8152 if { (eval echo configure:8153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8153   rm -rf conftest*
8154   eval "ac_cv_lib_$ac_lib_var=yes"
8155 else
8156   echo "configure: failed program was:" >&5
8157   cat conftest.$ac_ext >&5
8158   rm -rf conftest*
8159   eval "ac_cv_lib_$ac_lib_var=no"
8160 fi
8161 rm -f conftest*
8162 LIBS="$ac_save_LIBS"
8163
8164 fi
8165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8166   echo "$ac_t""yes" 1>&6
8167     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8168     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8169   cat >> confdefs.h <<EOF
8170 #define $ac_tr_lib 1
8171 EOF
8172
8173   LIBS="-lsecurity $LIBS"
8174
8175 else
8176   echo "$ac_t""no" 1>&6
8177 fi
8178  
8179      for ac_func in getprpwnam
8180 do
8181 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8182 echo "configure:8183: checking for $ac_func" >&5
8183 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8184   echo $ac_n "(cached) $ac_c" 1>&6
8185 else
8186   cat > conftest.$ac_ext <<EOF
8187 #line 8188 "configure"
8188 #include "confdefs.h"
8189 /* System header to define __stub macros and hopefully few prototypes,
8190     which can conflict with char $ac_func(); below.  */
8191 #include <assert.h>
8192 /* Override any gcc2 internal prototype to avoid an error.  */
8193 /* We use char because int might match the return type of a gcc2
8194     builtin and then its argument prototype would still apply.  */
8195 char $ac_func();
8196
8197 int main() {
8198
8199 /* The GNU C library defines this for functions which it implements
8200     to always fail with ENOSYS.  Some functions are actually named
8201     something starting with __ and the normal name is an alias.  */
8202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8203 choke me
8204 #else
8205 $ac_func();
8206 #endif
8207
8208 ; return 0; }
8209 EOF
8210 if { (eval echo configure:8211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8211   rm -rf conftest*
8212   eval "ac_cv_func_$ac_func=yes"
8213 else
8214   echo "configure: failed program was:" >&5
8215   cat conftest.$ac_ext >&5
8216   rm -rf conftest*
8217   eval "ac_cv_func_$ac_func=no"
8218 fi
8219 rm -f conftest*
8220 fi
8221
8222 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8223   echo "$ac_t""yes" 1>&6
8224     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8225   cat >> confdefs.h <<EOF
8226 #define $ac_tr_func 1
8227 EOF
8228  
8229 else
8230   echo "$ac_t""no" 1>&6
8231 fi
8232 done
8233
8234   ;;
8235   esac
8236
8237 case "$LIBS" in
8238   *-lsec*) for ac_func in getprpwnam
8239 do
8240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8241 echo "configure:8242: checking for $ac_func" >&5
8242 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8243   echo $ac_n "(cached) $ac_c" 1>&6
8244 else
8245   cat > conftest.$ac_ext <<EOF
8246 #line 8247 "configure"
8247 #include "confdefs.h"
8248 /* System header to define __stub macros and hopefully few prototypes,
8249     which can conflict with char $ac_func(); below.  */
8250 #include <assert.h>
8251 /* Override any gcc2 internal prototype to avoid an error.  */
8252 /* We use char because int might match the return type of a gcc2
8253     builtin and then its argument prototype would still apply.  */
8254 char $ac_func();
8255
8256 int main() {
8257
8258 /* The GNU C library defines this for functions which it implements
8259     to always fail with ENOSYS.  Some functions are actually named
8260     something starting with __ and the normal name is an alias.  */
8261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8262 choke me
8263 #else
8264 $ac_func();
8265 #endif
8266
8267 ; return 0; }
8268 EOF
8269 if { (eval echo configure:8270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8270   rm -rf conftest*
8271   eval "ac_cv_func_$ac_func=yes"
8272 else
8273   echo "configure: failed program was:" >&5
8274   cat conftest.$ac_ext >&5
8275   rm -rf conftest*
8276   eval "ac_cv_func_$ac_func=no"
8277 fi
8278 rm -f conftest*
8279 fi
8280
8281 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8282   echo "$ac_t""yes" 1>&6
8283     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8284   cat >> confdefs.h <<EOF
8285 #define $ac_tr_func 1
8286 EOF
8287  
8288 else
8289   echo "$ac_t""no" 1>&6
8290 fi
8291 done
8292  ;;
8293   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8294 echo "configure:8295: checking for getprpwnam in -lsec" >&5
8295 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8296 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8297   echo $ac_n "(cached) $ac_c" 1>&6
8298 else
8299   ac_save_LIBS="$LIBS"
8300 LIBS="-lsec  $LIBS"
8301 cat > conftest.$ac_ext <<EOF
8302 #line 8303 "configure"
8303 #include "confdefs.h"
8304 /* Override any gcc2 internal prototype to avoid an error.  */
8305 /* We use char because int might match the return type of a gcc2
8306     builtin and then its argument prototype would still apply.  */
8307 char getprpwnam();
8308
8309 int main() {
8310 getprpwnam()
8311 ; return 0; }
8312 EOF
8313 if { (eval echo configure:8314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8314   rm -rf conftest*
8315   eval "ac_cv_lib_$ac_lib_var=yes"
8316 else
8317   echo "configure: failed program was:" >&5
8318   cat conftest.$ac_ext >&5
8319   rm -rf conftest*
8320   eval "ac_cv_lib_$ac_lib_var=no"
8321 fi
8322 rm -f conftest*
8323 LIBS="$ac_save_LIBS"
8324
8325 fi
8326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8327   echo "$ac_t""yes" 1>&6
8328     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8329     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8330   cat >> confdefs.h <<EOF
8331 #define $ac_tr_lib 1
8332 EOF
8333
8334   LIBS="-lsec $LIBS"
8335
8336 else
8337   echo "$ac_t""no" 1>&6
8338 fi
8339  
8340      for ac_func in getprpwnam
8341 do
8342 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8343 echo "configure:8344: checking for $ac_func" >&5
8344 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8345   echo $ac_n "(cached) $ac_c" 1>&6
8346 else
8347   cat > conftest.$ac_ext <<EOF
8348 #line 8349 "configure"
8349 #include "confdefs.h"
8350 /* System header to define __stub macros and hopefully few prototypes,
8351     which can conflict with char $ac_func(); below.  */
8352 #include <assert.h>
8353 /* Override any gcc2 internal prototype to avoid an error.  */
8354 /* We use char because int might match the return type of a gcc2
8355     builtin and then its argument prototype would still apply.  */
8356 char $ac_func();
8357
8358 int main() {
8359
8360 /* The GNU C library defines this for functions which it implements
8361     to always fail with ENOSYS.  Some functions are actually named
8362     something starting with __ and the normal name is an alias.  */
8363 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8364 choke me
8365 #else
8366 $ac_func();
8367 #endif
8368
8369 ; return 0; }
8370 EOF
8371 if { (eval echo configure:8372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8372   rm -rf conftest*
8373   eval "ac_cv_func_$ac_func=yes"
8374 else
8375   echo "configure: failed program was:" >&5
8376   cat conftest.$ac_ext >&5
8377   rm -rf conftest*
8378   eval "ac_cv_func_$ac_func=no"
8379 fi
8380 rm -f conftest*
8381 fi
8382
8383 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8384   echo "$ac_t""yes" 1>&6
8385     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8386   cat >> confdefs.h <<EOF
8387 #define $ac_tr_func 1
8388 EOF
8389  
8390 else
8391   echo "$ac_t""no" 1>&6
8392 fi
8393 done
8394
8395   ;;
8396   esac
8397
8398
8399 # this bit needs to be modified for each OS that is suported by
8400 # smbwrapper. You need to specify how to created a shared library and
8401 # how to compile C code to produce PIC object files
8402
8403 # these are the defaults, good for lots of systems
8404 HOST_OS="$host_os"
8405 LDSHFLAGS="-shared"
8406 SHLD="\${CC}"
8407 PICFLAG=""
8408 PICSUFFIX="po"
8409 POBAD_CC="#"
8410 SHLIBEXT="so"
8411 BLDSHARED="false"
8412
8413 # and these are for particular systems
8414 case "$host_os" in
8415                 *linux*)   cat >> confdefs.h <<\EOF
8416 #define LINUX 1
8417 EOF
8418
8419                         BLDSHARED="true"
8420                         LDSHFLAGS="-shared" 
8421                         PICFLAG="-fPIC"
8422                 ;;
8423                 *solaris*) cat >> confdefs.h <<\EOF
8424 #define SUNOS5 1
8425 EOF
8426
8427                         BLDSHARED="true"
8428                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8429                         if test "${ac_cv_prog_CC}" = "gcc"; then
8430                                 PICFLAG="-fPIC"
8431                         else
8432                                 PICFLAG="-KPIC"
8433                                 POBAD_CC=""
8434                                 PICSUFFIX="po.o"
8435                         fi
8436                 ;;
8437                 *sunos*) cat >> confdefs.h <<\EOF
8438 #define SUNOS4 1
8439 EOF
8440
8441                         BLDSHARED="true"
8442                         LDSHFLAGS="-Wl,-h,\$@ -G"
8443                         PICFLAG="-KPIC"   # Is this correct for SunOS
8444                 ;;
8445                 *bsd*)  BLDSHARED="true"
8446                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8447                         PICFLAG="-fPIC"
8448                 ;;
8449                 *irix*) cat >> confdefs.h <<\EOF
8450 #define IRIX 1
8451 EOF
8452
8453                         case "$host_os" in
8454                         *irix6*) cat >> confdefs.h <<\EOF
8455 #define IRIX6 1
8456 EOF
8457
8458                         ;;
8459                         esac
8460                         ATTEMPT_WRAP32_BUILD=yes
8461                         BLDSHARED="true"
8462                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8463                         if test "${ac_cv_prog_CC}" = "gcc"; then
8464                                 PICFLAG="-fPIC"
8465                         else 
8466                                 PICFLAG="-KPIC"
8467                         fi
8468                 ;;
8469                 *aix*) cat >> confdefs.h <<\EOF
8470 #define AIX 1
8471 EOF
8472
8473                         BLDSHARED="true"
8474                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8475                         PICFLAG="-O2 -qmaxmem=6000"
8476                 ;;
8477                 *hpux*) cat >> confdefs.h <<\EOF
8478 #define HPUX 1
8479 EOF
8480
8481                         SHLIBEXT="sl"
8482                         # Use special PIC flags for the native HP-UX compiler.
8483                         if test $ac_cv_prog_cc_Ae = yes; then
8484                                 #BLDSHARED="true"
8485                                 LDSHFLAGS="-b -z +h \$@"
8486                                 PICFLAG="+z"
8487                         fi
8488                 ;;
8489                 *qnx*) cat >> confdefs.h <<\EOF
8490 #define QNX 1
8491 EOF
8492 ;;
8493                 *osf*) cat >> confdefs.h <<\EOF
8494 #define OSF1 1
8495 EOF
8496
8497                         BLDSHARED="true"
8498                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8499                         PICFLAG="-fPIC"
8500                 ;;
8501                 *sco*) cat >> confdefs.h <<\EOF
8502 #define SCO 1
8503 EOF
8504 ;;
8505                 *unixware*) cat >> confdefs.h <<\EOF
8506 #define UNIXWARE 1
8507 EOF
8508
8509                         BLDSHARED="true"
8510                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8511                         PICFLAG="-KPIC"
8512                 ;;
8513                 *next2*) cat >> confdefs.h <<\EOF
8514 #define NEXT2 1
8515 EOF
8516 ;;
8517                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8518 set dummy groff; ac_word=$2
8519 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8520 echo "configure:8521: checking for $ac_word" >&5
8521 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8522   echo $ac_n "(cached) $ac_c" 1>&6
8523 else
8524   if test -n "$ROFF"; then
8525   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8526 else
8527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8528   ac_dummy="$PATH"
8529   for ac_dir in $ac_dummy; do
8530     test -z "$ac_dir" && ac_dir=.
8531     if test -f $ac_dir/$ac_word; then
8532       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8533       break
8534     fi
8535   done
8536   IFS="$ac_save_ifs"
8537 fi
8538 fi
8539 ROFF="$ac_cv_prog_ROFF"
8540 if test -n "$ROFF"; then
8541   echo "$ac_t""$ROFF" 1>&6
8542 else
8543   echo "$ac_t""no" 1>&6
8544 fi
8545 ;;
8546                 *sysv4*)
8547                         case "$host" in
8548                                 *-univel-*)     if  test "$GCC" != yes ; then
8549                                                                         cat >> confdefs.h <<\EOF
8550 #define HAVE_MEMSET 1
8551 EOF
8552
8553                                                                 fi
8554                                                                 LDSHFLAGS="-G"
8555                                 ;;
8556                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8557 #define RELIANTUNIX 1
8558 EOF
8559 ;;
8560                         esac
8561                         ;;
8562                 *sysv5*)
8563                         if  test "$GCC" != yes ; then
8564                                 cat >> confdefs.h <<\EOF
8565 #define HAVE_MEMSET 1
8566 EOF
8567
8568                         fi
8569                         LDSHFLAGS="-G"
8570                         ;;
8571 esac
8572
8573 # this updates our target list if we can build shared libs
8574 if test $BLDSHARED = true; then
8575    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8576 else
8577    LIBSMBCLIENT_SHARED=
8578 fi
8579
8580 ################
8581
8582 echo $ac_n "checking for long long""... $ac_c" 1>&6
8583 echo "configure:8584: checking for long long" >&5
8584 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8585   echo $ac_n "(cached) $ac_c" 1>&6
8586 else
8587   
8588 if test "$cross_compiling" = yes; then
8589   samba_cv_have_longlong=cross
8590 else
8591   cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 #include <stdio.h>
8595 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8596 EOF
8597 if { (eval echo configure:8598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8598 then
8599   samba_cv_have_longlong=yes
8600 else
8601   echo "configure: failed program was:" >&5
8602   cat conftest.$ac_ext >&5
8603   rm -fr conftest*
8604   samba_cv_have_longlong=no
8605 fi
8606 rm -fr conftest*
8607 fi
8608
8609 fi
8610
8611 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8612 if test x"$samba_cv_have_longlong" = x"yes"; then
8613     cat >> confdefs.h <<\EOF
8614 #define HAVE_LONGLONG 1
8615 EOF
8616
8617 fi
8618
8619 #
8620 # Check if the compiler supports the LL prefix on long long integers.
8621 # AIX needs this.
8622
8623 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8624 echo "configure:8625: checking for LL suffix on long long integers" >&5
8625 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8626   echo $ac_n "(cached) $ac_c" 1>&6
8627 else
8628   
8629     cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 #include <stdio.h>
8633 int main() {
8634 long long i = 0x8000000000LL
8635 ; return 0; }
8636 EOF
8637 if { (eval echo configure:8638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8638   rm -rf conftest*
8639   samba_cv_compiler_supports_ll=yes
8640 else
8641   echo "configure: failed program was:" >&5
8642   cat conftest.$ac_ext >&5
8643   rm -rf conftest*
8644   samba_cv_compiler_supports_ll=no
8645 fi
8646 rm -f conftest*
8647 fi
8648
8649 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8650 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8651    cat >> confdefs.h <<\EOF
8652 #define COMPILER_SUPPORTS_LL 1
8653 EOF
8654
8655 fi
8656
8657   
8658 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8659 echo "configure:8660: checking for 64 bit off_t" >&5
8660 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8661   echo $ac_n "(cached) $ac_c" 1>&6
8662 else
8663   
8664 if test "$cross_compiling" = yes; then
8665   samba_cv_SIZEOF_OFF_T=cross
8666 else
8667   cat > conftest.$ac_ext <<EOF
8668 #line 8669 "configure"
8669 #include "confdefs.h"
8670 #include <stdio.h>
8671 #include <sys/stat.h>
8672 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8673 EOF
8674 if { (eval echo configure:8675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8675 then
8676   samba_cv_SIZEOF_OFF_T=yes
8677 else
8678   echo "configure: failed program was:" >&5
8679   cat conftest.$ac_ext >&5
8680   rm -fr conftest*
8681   samba_cv_SIZEOF_OFF_T=no
8682 fi
8683 rm -fr conftest*
8684 fi
8685
8686 fi
8687
8688 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8689 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8690     cat >> confdefs.h <<\EOF
8691 #define SIZEOF_OFF_T 8
8692 EOF
8693
8694 fi
8695
8696 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8697 echo "configure:8698: checking for off64_t" >&5
8698 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8699   echo $ac_n "(cached) $ac_c" 1>&6
8700 else
8701   
8702 if test "$cross_compiling" = yes; then
8703   samba_cv_HAVE_OFF64_T=cross
8704 else
8705   cat > conftest.$ac_ext <<EOF
8706 #line 8707 "configure"
8707 #include "confdefs.h"
8708
8709 #if defined(HAVE_UNISTD_H)
8710 #include <unistd.h>
8711 #endif
8712 #include <stdio.h>
8713 #include <sys/stat.h>
8714 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8715 EOF
8716 if { (eval echo configure:8717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8717 then
8718   samba_cv_HAVE_OFF64_T=yes
8719 else
8720   echo "configure: failed program was:" >&5
8721   cat conftest.$ac_ext >&5
8722   rm -fr conftest*
8723   samba_cv_HAVE_OFF64_T=no
8724 fi
8725 rm -fr conftest*
8726 fi
8727
8728 fi
8729
8730 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8731 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8732     cat >> confdefs.h <<\EOF
8733 #define HAVE_OFF64_T 1
8734 EOF
8735
8736 fi
8737
8738 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8739 echo "configure:8740: checking for 64 bit ino_t" >&5
8740 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8741   echo $ac_n "(cached) $ac_c" 1>&6
8742 else
8743   
8744 if test "$cross_compiling" = yes; then
8745   samba_cv_SIZEOF_INO_T=cross
8746 else
8747   cat > conftest.$ac_ext <<EOF
8748 #line 8749 "configure"
8749 #include "confdefs.h"
8750 #include <stdio.h>
8751 #include <sys/stat.h>
8752 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8753 EOF
8754 if { (eval echo configure:8755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8755 then
8756   samba_cv_SIZEOF_INO_T=yes
8757 else
8758   echo "configure: failed program was:" >&5
8759   cat conftest.$ac_ext >&5
8760   rm -fr conftest*
8761   samba_cv_SIZEOF_INO_T=no
8762 fi
8763 rm -fr conftest*
8764 fi
8765
8766 fi
8767
8768 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8769 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8770     cat >> confdefs.h <<\EOF
8771 #define SIZEOF_INO_T 8
8772 EOF
8773
8774 fi
8775
8776 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8777 echo "configure:8778: checking for ino64_t" >&5
8778 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8779   echo $ac_n "(cached) $ac_c" 1>&6
8780 else
8781   
8782 if test "$cross_compiling" = yes; then
8783   samba_cv_HAVE_INO64_T=cross
8784 else
8785   cat > conftest.$ac_ext <<EOF
8786 #line 8787 "configure"
8787 #include "confdefs.h"
8788
8789 #if defined(HAVE_UNISTD_H)
8790 #include <unistd.h>
8791 #endif
8792 #include <stdio.h>
8793 #include <sys/stat.h>
8794 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8795 EOF
8796 if { (eval echo configure:8797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8797 then
8798   samba_cv_HAVE_INO64_T=yes
8799 else
8800   echo "configure: failed program was:" >&5
8801   cat conftest.$ac_ext >&5
8802   rm -fr conftest*
8803   samba_cv_HAVE_INO64_T=no
8804 fi
8805 rm -fr conftest*
8806 fi
8807
8808 fi
8809
8810 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8811 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8812     cat >> confdefs.h <<\EOF
8813 #define HAVE_INO64_T 1
8814 EOF
8815
8816 fi
8817
8818 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8819 echo "configure:8820: checking for struct dirent64" >&5
8820 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8821   echo $ac_n "(cached) $ac_c" 1>&6
8822 else
8823   
8824 cat > conftest.$ac_ext <<EOF
8825 #line 8826 "configure"
8826 #include "confdefs.h"
8827
8828 #if defined(HAVE_UNISTD_H)
8829 #include <unistd.h>
8830 #endif
8831 #include <sys/types.h>
8832 #include <dirent.h>
8833 int main() {
8834 struct dirent64 de;
8835 ; return 0; }
8836 EOF
8837 if { (eval echo configure:8838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8838   rm -rf conftest*
8839   samba_cv_HAVE_STRUCT_DIRENT64=yes
8840 else
8841   echo "configure: failed program was:" >&5
8842   cat conftest.$ac_ext >&5
8843   rm -rf conftest*
8844   samba_cv_HAVE_STRUCT_DIRENT64=no
8845 fi
8846 rm -f conftest*
8847 fi
8848
8849 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8850 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8851     cat >> confdefs.h <<\EOF
8852 #define HAVE_STRUCT_DIRENT64 1
8853 EOF
8854
8855 fi
8856
8857 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8858 echo "configure:8859: checking for unsigned char" >&5
8859 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8860   echo $ac_n "(cached) $ac_c" 1>&6
8861 else
8862   
8863 if test "$cross_compiling" = yes; then
8864   samba_cv_HAVE_UNSIGNED_CHAR=cross
8865 else
8866   cat > conftest.$ac_ext <<EOF
8867 #line 8868 "configure"
8868 #include "confdefs.h"
8869 #include <stdio.h>
8870 main() { char c; c=250; exit((c > 0)?0:1); }
8871 EOF
8872 if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8873 then
8874   samba_cv_HAVE_UNSIGNED_CHAR=yes
8875 else
8876   echo "configure: failed program was:" >&5
8877   cat conftest.$ac_ext >&5
8878   rm -fr conftest*
8879   samba_cv_HAVE_UNSIGNED_CHAR=no
8880 fi
8881 rm -fr conftest*
8882 fi
8883
8884 fi
8885
8886 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8887 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8888     cat >> confdefs.h <<\EOF
8889 #define HAVE_UNSIGNED_CHAR 1
8890 EOF
8891
8892 fi
8893
8894 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8895 echo "configure:8896: checking for sin_len in sock" >&5
8896 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8897   echo $ac_n "(cached) $ac_c" 1>&6
8898 else
8899   
8900 cat > conftest.$ac_ext <<EOF
8901 #line 8902 "configure"
8902 #include "confdefs.h"
8903 #include <sys/types.h>
8904 #include <sys/socket.h>
8905 #include <netinet/in.h>
8906 int main() {
8907 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8908 ; return 0; }
8909 EOF
8910 if { (eval echo configure:8911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8911   rm -rf conftest*
8912   samba_cv_HAVE_SOCK_SIN_LEN=yes
8913 else
8914   echo "configure: failed program was:" >&5
8915   cat conftest.$ac_ext >&5
8916   rm -rf conftest*
8917   samba_cv_HAVE_SOCK_SIN_LEN=no
8918 fi
8919 rm -f conftest*
8920 fi
8921
8922 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8923 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8924     cat >> confdefs.h <<\EOF
8925 #define HAVE_SOCK_SIN_LEN 1
8926 EOF
8927
8928 fi
8929
8930 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8931 echo "configure:8932: checking whether seekdir returns void" >&5
8932 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8933   echo $ac_n "(cached) $ac_c" 1>&6
8934 else
8935   
8936 cat > conftest.$ac_ext <<EOF
8937 #line 8938 "configure"
8938 #include "confdefs.h"
8939 #include <sys/types.h>
8940 #include <dirent.h>
8941 void seekdir(DIR *d, long loc) { return; }
8942 int main() {
8943 return 0;
8944 ; return 0; }
8945 EOF
8946 if { (eval echo configure:8947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8947   rm -rf conftest*
8948   samba_cv_SEEKDIR_RETURNS_VOID=yes
8949 else
8950   echo "configure: failed program was:" >&5
8951   cat conftest.$ac_ext >&5
8952   rm -rf conftest*
8953   samba_cv_SEEKDIR_RETURNS_VOID=no
8954 fi
8955 rm -f conftest*
8956 fi
8957
8958 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8959 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8960     cat >> confdefs.h <<\EOF
8961 #define SEEKDIR_RETURNS_VOID 1
8962 EOF
8963
8964 fi
8965
8966 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8967 echo "configure:8968: checking for __FILE__ macro" >&5
8968 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8969   echo $ac_n "(cached) $ac_c" 1>&6
8970 else
8971   
8972 cat > conftest.$ac_ext <<EOF
8973 #line 8974 "configure"
8974 #include "confdefs.h"
8975 #include <stdio.h>
8976 int main() {
8977 printf("%s\n", __FILE__);
8978 ; return 0; }
8979 EOF
8980 if { (eval echo configure:8981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8981   rm -rf conftest*
8982   samba_cv_HAVE_FILE_MACRO=yes
8983 else
8984   echo "configure: failed program was:" >&5
8985   cat conftest.$ac_ext >&5
8986   rm -rf conftest*
8987   samba_cv_HAVE_FILE_MACRO=no
8988 fi
8989 rm -f conftest*
8990 fi
8991
8992 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8993 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8994     cat >> confdefs.h <<\EOF
8995 #define HAVE_FILE_MACRO 1
8996 EOF
8997
8998 fi
8999
9000 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9001 echo "configure:9002: checking for __FUNCTION__ macro" >&5
9002 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9003   echo $ac_n "(cached) $ac_c" 1>&6
9004 else
9005   
9006 cat > conftest.$ac_ext <<EOF
9007 #line 9008 "configure"
9008 #include "confdefs.h"
9009 #include <stdio.h>
9010 int main() {
9011 printf("%s\n", __FUNCTION__);
9012 ; return 0; }
9013 EOF
9014 if { (eval echo configure:9015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9015   rm -rf conftest*
9016   samba_cv_HAVE_FUNCTION_MACRO=yes
9017 else
9018   echo "configure: failed program was:" >&5
9019   cat conftest.$ac_ext >&5
9020   rm -rf conftest*
9021   samba_cv_HAVE_FUNCTION_MACRO=no
9022 fi
9023 rm -f conftest*
9024 fi
9025
9026 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9027 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9028     cat >> confdefs.h <<\EOF
9029 #define HAVE_FUNCTION_MACRO 1
9030 EOF
9031
9032 fi
9033
9034 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9035 echo "configure:9036: checking if gettimeofday takes tz argument" >&5
9036 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9037   echo $ac_n "(cached) $ac_c" 1>&6
9038 else
9039   
9040 if test "$cross_compiling" = yes; then
9041   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9042 else
9043   cat > conftest.$ac_ext <<EOF
9044 #line 9045 "configure"
9045 #include "confdefs.h"
9046
9047 #include <sys/time.h>
9048 #include <unistd.h>
9049 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9052 then
9053   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -fr conftest*
9058   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9059 fi
9060 rm -fr conftest*
9061 fi
9062
9063 fi
9064
9065 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9066 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9067     cat >> confdefs.h <<\EOF
9068 #define HAVE_GETTIMEOFDAY_TZ 1
9069 EOF
9070
9071 fi
9072
9073 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9074 echo "configure:9075: checking for C99 vsnprintf" >&5
9075 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9076   echo $ac_n "(cached) $ac_c" 1>&6
9077 else
9078   
9079 if test "$cross_compiling" = yes; then
9080   samba_cv_HAVE_C99_VSNPRINTF=cross
9081 else
9082   cat > conftest.$ac_ext <<EOF
9083 #line 9084 "configure"
9084 #include "confdefs.h"
9085
9086 #include <sys/types.h>
9087 #include <stdarg.h>
9088 void foo(const char *format, ...) { 
9089        va_list ap;
9090        int len;
9091        char buf[5];
9092
9093        va_start(ap, format);
9094        len = vsnprintf(0, 0, format, ap);
9095        va_end(ap);
9096        if (len != 5) exit(1);
9097
9098        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9099
9100        exit(0);
9101 }
9102 main() { foo("hello"); }
9103
9104 EOF
9105 if { (eval echo configure:9106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9106 then
9107   samba_cv_HAVE_C99_VSNPRINTF=yes
9108 else
9109   echo "configure: failed program was:" >&5
9110   cat conftest.$ac_ext >&5
9111   rm -fr conftest*
9112   samba_cv_HAVE_C99_VSNPRINTF=no
9113 fi
9114 rm -fr conftest*
9115 fi
9116
9117 fi
9118
9119 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9120 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9121     cat >> confdefs.h <<\EOF
9122 #define HAVE_C99_VSNPRINTF 1
9123 EOF
9124
9125 fi
9126
9127 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9128 echo "configure:9129: checking for broken readdir" >&5
9129 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9130   echo $ac_n "(cached) $ac_c" 1>&6
9131 else
9132   
9133 if test "$cross_compiling" = yes; then
9134   samba_cv_HAVE_BROKEN_READDIR=cross
9135 else
9136   cat > conftest.$ac_ext <<EOF
9137 #line 9138 "configure"
9138 #include "confdefs.h"
9139 #include <sys/types.h>
9140 #include <dirent.h>
9141 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9142 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9143 di->d_name[0] == 0) exit(0); exit(1);} 
9144 EOF
9145 if { (eval echo configure:9146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9146 then
9147   samba_cv_HAVE_BROKEN_READDIR=yes
9148 else
9149   echo "configure: failed program was:" >&5
9150   cat conftest.$ac_ext >&5
9151   rm -fr conftest*
9152   samba_cv_HAVE_BROKEN_READDIR=no
9153 fi
9154 rm -fr conftest*
9155 fi
9156
9157 fi
9158
9159 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9160 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9161     cat >> confdefs.h <<\EOF
9162 #define HAVE_BROKEN_READDIR 1
9163 EOF
9164
9165 fi
9166
9167 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9168 echo "configure:9169: checking for utimbuf" >&5
9169 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9170   echo $ac_n "(cached) $ac_c" 1>&6
9171 else
9172   
9173 cat > conftest.$ac_ext <<EOF
9174 #line 9175 "configure"
9175 #include "confdefs.h"
9176 #include <sys/types.h>
9177 #include <utime.h>
9178 int main() {
9179 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9180 ; return 0; }
9181 EOF
9182 if { (eval echo configure:9183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9183   rm -rf conftest*
9184   samba_cv_HAVE_UTIMBUF=yes
9185 else
9186   echo "configure: failed program was:" >&5
9187   cat conftest.$ac_ext >&5
9188   rm -rf conftest*
9189   samba_cv_HAVE_UTIMBUF=no
9190 fi
9191 rm -f conftest*
9192 fi
9193
9194 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9195 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9196     cat >> confdefs.h <<\EOF
9197 #define HAVE_UTIMBUF 1
9198 EOF
9199
9200 fi
9201
9202
9203 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9204 do
9205 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9206 echo "configure:9207: checking for $ac_func" >&5
9207 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9208   echo $ac_n "(cached) $ac_c" 1>&6
9209 else
9210   cat > conftest.$ac_ext <<EOF
9211 #line 9212 "configure"
9212 #include "confdefs.h"
9213 /* System header to define __stub macros and hopefully few prototypes,
9214     which can conflict with char $ac_func(); below.  */
9215 #include <assert.h>
9216 /* Override any gcc2 internal prototype to avoid an error.  */
9217 /* We use char because int might match the return type of a gcc2
9218     builtin and then its argument prototype would still apply.  */
9219 char $ac_func();
9220
9221 int main() {
9222
9223 /* The GNU C library defines this for functions which it implements
9224     to always fail with ENOSYS.  Some functions are actually named
9225     something starting with __ and the normal name is an alias.  */
9226 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9227 choke me
9228 #else
9229 $ac_func();
9230 #endif
9231
9232 ; return 0; }
9233 EOF
9234 if { (eval echo configure:9235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9235   rm -rf conftest*
9236   eval "ac_cv_func_$ac_func=yes"
9237 else
9238   echo "configure: failed program was:" >&5
9239   cat conftest.$ac_ext >&5
9240   rm -rf conftest*
9241   eval "ac_cv_func_$ac_func=no"
9242 fi
9243 rm -f conftest*
9244 fi
9245
9246 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9247   echo "$ac_t""yes" 1>&6
9248     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9249   cat >> confdefs.h <<EOF
9250 #define $ac_tr_func 1
9251 EOF
9252  
9253 else
9254   echo "$ac_t""no" 1>&6
9255 fi
9256 done
9257
9258
9259 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9260 echo "configure:9261: checking for ut_name in utmp" >&5
9261 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9262   echo $ac_n "(cached) $ac_c" 1>&6
9263 else
9264   
9265 cat > conftest.$ac_ext <<EOF
9266 #line 9267 "configure"
9267 #include "confdefs.h"
9268 #include <sys/types.h>
9269 #include <utmp.h>
9270 int main() {
9271 struct utmp ut;  ut.ut_name[0] = 'a';
9272 ; return 0; }
9273 EOF
9274 if { (eval echo configure:9275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9275   rm -rf conftest*
9276   samba_cv_HAVE_UT_UT_NAME=yes
9277 else
9278   echo "configure: failed program was:" >&5
9279   cat conftest.$ac_ext >&5
9280   rm -rf conftest*
9281   samba_cv_HAVE_UT_UT_NAME=no
9282 fi
9283 rm -f conftest*
9284 fi
9285
9286 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9287 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9288     cat >> confdefs.h <<\EOF
9289 #define HAVE_UT_UT_NAME 1
9290 EOF
9291
9292 fi 
9293
9294 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9295 echo "configure:9296: checking for ut_user in utmp" >&5
9296 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9297   echo $ac_n "(cached) $ac_c" 1>&6
9298 else
9299   
9300 cat > conftest.$ac_ext <<EOF
9301 #line 9302 "configure"
9302 #include "confdefs.h"
9303 #include <sys/types.h>
9304 #include <utmp.h>
9305 int main() {
9306 struct utmp ut;  ut.ut_user[0] = 'a';
9307 ; return 0; }
9308 EOF
9309 if { (eval echo configure:9310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9310   rm -rf conftest*
9311   samba_cv_HAVE_UT_UT_USER=yes
9312 else
9313   echo "configure: failed program was:" >&5
9314   cat conftest.$ac_ext >&5
9315   rm -rf conftest*
9316   samba_cv_HAVE_UT_UT_USER=no
9317 fi
9318 rm -f conftest*
9319 fi
9320
9321 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9322 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9323     cat >> confdefs.h <<\EOF
9324 #define HAVE_UT_UT_USER 1
9325 EOF
9326
9327 fi 
9328
9329 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9330 echo "configure:9331: checking for ut_id in utmp" >&5
9331 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9332   echo $ac_n "(cached) $ac_c" 1>&6
9333 else
9334   
9335 cat > conftest.$ac_ext <<EOF
9336 #line 9337 "configure"
9337 #include "confdefs.h"
9338 #include <sys/types.h>
9339 #include <utmp.h>
9340 int main() {
9341 struct utmp ut;  ut.ut_id[0] = 'a';
9342 ; return 0; }
9343 EOF
9344 if { (eval echo configure:9345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9345   rm -rf conftest*
9346   samba_cv_HAVE_UT_UT_ID=yes
9347 else
9348   echo "configure: failed program was:" >&5
9349   cat conftest.$ac_ext >&5
9350   rm -rf conftest*
9351   samba_cv_HAVE_UT_UT_ID=no
9352 fi
9353 rm -f conftest*
9354 fi
9355
9356 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9357 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9358     cat >> confdefs.h <<\EOF
9359 #define HAVE_UT_UT_ID 1
9360 EOF
9361
9362 fi 
9363
9364 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9365 echo "configure:9366: checking for ut_host in utmp" >&5
9366 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9367   echo $ac_n "(cached) $ac_c" 1>&6
9368 else
9369   
9370 cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373 #include <sys/types.h>
9374 #include <utmp.h>
9375 int main() {
9376 struct utmp ut;  ut.ut_host[0] = 'a';
9377 ; return 0; }
9378 EOF
9379 if { (eval echo configure:9380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9380   rm -rf conftest*
9381   samba_cv_HAVE_UT_UT_HOST=yes
9382 else
9383   echo "configure: failed program was:" >&5
9384   cat conftest.$ac_ext >&5
9385   rm -rf conftest*
9386   samba_cv_HAVE_UT_UT_HOST=no
9387 fi
9388 rm -f conftest*
9389 fi
9390
9391 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9392 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9393     cat >> confdefs.h <<\EOF
9394 #define HAVE_UT_UT_HOST 1
9395 EOF
9396
9397 fi 
9398
9399 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9400 echo "configure:9401: checking for ut_time in utmp" >&5
9401 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9402   echo $ac_n "(cached) $ac_c" 1>&6
9403 else
9404   
9405 cat > conftest.$ac_ext <<EOF
9406 #line 9407 "configure"
9407 #include "confdefs.h"
9408 #include <sys/types.h>
9409 #include <utmp.h>
9410 int main() {
9411 struct utmp ut;  time_t t; ut.ut_time = t;
9412 ; return 0; }
9413 EOF
9414 if { (eval echo configure:9415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9415   rm -rf conftest*
9416   samba_cv_HAVE_UT_UT_TIME=yes
9417 else
9418   echo "configure: failed program was:" >&5
9419   cat conftest.$ac_ext >&5
9420   rm -rf conftest*
9421   samba_cv_HAVE_UT_UT_TIME=no
9422 fi
9423 rm -f conftest*
9424 fi
9425
9426 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9427 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9428     cat >> confdefs.h <<\EOF
9429 #define HAVE_UT_UT_TIME 1
9430 EOF
9431
9432 fi 
9433
9434 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9435 echo "configure:9436: checking for ut_tv in utmp" >&5
9436 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9437   echo $ac_n "(cached) $ac_c" 1>&6
9438 else
9439   
9440 cat > conftest.$ac_ext <<EOF
9441 #line 9442 "configure"
9442 #include "confdefs.h"
9443 #include <sys/types.h>
9444 #include <utmp.h>
9445 int main() {
9446 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9447 ; return 0; }
9448 EOF
9449 if { (eval echo configure:9450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9450   rm -rf conftest*
9451   samba_cv_HAVE_UT_UT_TV=yes
9452 else
9453   echo "configure: failed program was:" >&5
9454   cat conftest.$ac_ext >&5
9455   rm -rf conftest*
9456   samba_cv_HAVE_UT_UT_TV=no
9457 fi
9458 rm -f conftest*
9459 fi
9460
9461 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9462 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9463     cat >> confdefs.h <<\EOF
9464 #define HAVE_UT_UT_TV 1
9465 EOF
9466
9467 fi 
9468
9469 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9470 echo "configure:9471: checking for ut_type in utmp" >&5
9471 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9472   echo $ac_n "(cached) $ac_c" 1>&6
9473 else
9474   
9475 cat > conftest.$ac_ext <<EOF
9476 #line 9477 "configure"
9477 #include "confdefs.h"
9478 #include <sys/types.h>
9479 #include <utmp.h>
9480 int main() {
9481 struct utmp ut;  ut.ut_type = 0;
9482 ; return 0; }
9483 EOF
9484 if { (eval echo configure:9485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9485   rm -rf conftest*
9486   samba_cv_HAVE_UT_UT_TYPE=yes
9487 else
9488   echo "configure: failed program was:" >&5
9489   cat conftest.$ac_ext >&5
9490   rm -rf conftest*
9491   samba_cv_HAVE_UT_UT_TYPE=no
9492 fi
9493 rm -f conftest*
9494 fi
9495
9496 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9497 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9498     cat >> confdefs.h <<\EOF
9499 #define HAVE_UT_UT_TYPE 1
9500 EOF
9501
9502 fi 
9503
9504 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9505 echo "configure:9506: checking for ut_pid in utmp" >&5
9506 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9507   echo $ac_n "(cached) $ac_c" 1>&6
9508 else
9509   
9510 cat > conftest.$ac_ext <<EOF
9511 #line 9512 "configure"
9512 #include "confdefs.h"
9513 #include <sys/types.h>
9514 #include <utmp.h>
9515 int main() {
9516 struct utmp ut;  ut.ut_pid = 0;
9517 ; return 0; }
9518 EOF
9519 if { (eval echo configure:9520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9520   rm -rf conftest*
9521   samba_cv_HAVE_UT_UT_PID=yes
9522 else
9523   echo "configure: failed program was:" >&5
9524   cat conftest.$ac_ext >&5
9525   rm -rf conftest*
9526   samba_cv_HAVE_UT_UT_PID=no
9527 fi
9528 rm -f conftest*
9529 fi
9530
9531 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9532 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9533     cat >> confdefs.h <<\EOF
9534 #define HAVE_UT_UT_PID 1
9535 EOF
9536
9537 fi 
9538
9539 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9540 echo "configure:9541: checking for ut_exit in utmp" >&5
9541 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9542   echo $ac_n "(cached) $ac_c" 1>&6
9543 else
9544   
9545 cat > conftest.$ac_ext <<EOF
9546 #line 9547 "configure"
9547 #include "confdefs.h"
9548 #include <sys/types.h>
9549 #include <utmp.h>
9550 int main() {
9551 struct utmp ut;  ut.ut_exit.e_exit = 0;
9552 ; return 0; }
9553 EOF
9554 if { (eval echo configure:9555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9555   rm -rf conftest*
9556   samba_cv_HAVE_UT_UT_EXIT=yes
9557 else
9558   echo "configure: failed program was:" >&5
9559   cat conftest.$ac_ext >&5
9560   rm -rf conftest*
9561   samba_cv_HAVE_UT_UT_EXIT=no
9562 fi
9563 rm -f conftest*
9564 fi
9565
9566 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9567 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9568     cat >> confdefs.h <<\EOF
9569 #define HAVE_UT_UT_EXIT 1
9570 EOF
9571
9572 fi 
9573
9574 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9575 echo "configure:9576: checking for ut_addr in utmp" >&5
9576 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9577   echo $ac_n "(cached) $ac_c" 1>&6
9578 else
9579   
9580 cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583 #include <sys/types.h>
9584 #include <utmp.h>
9585 int main() {
9586 struct utmp ut;  ut.ut_addr = 0;
9587 ; return 0; }
9588 EOF
9589 if { (eval echo configure:9590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9590   rm -rf conftest*
9591   samba_cv_HAVE_UT_UT_ADDR=yes
9592 else
9593   echo "configure: failed program was:" >&5
9594   cat conftest.$ac_ext >&5
9595   rm -rf conftest*
9596   samba_cv_HAVE_UT_UT_ADDR=no
9597 fi
9598 rm -f conftest*
9599 fi
9600
9601 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9602 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9603     cat >> confdefs.h <<\EOF
9604 #define HAVE_UT_UT_ADDR 1
9605 EOF
9606
9607 fi 
9608
9609 if test x$ac_cv_func_pututline = xyes ; then
9610   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9611 echo "configure:9612: checking whether pututline returns pointer" >&5
9612 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9613   echo $ac_n "(cached) $ac_c" 1>&6
9614 else
9615   
9616   cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619 #include <sys/types.h>
9620 #include <utmp.h>
9621 int main() {
9622 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9623 ; return 0; }
9624 EOF
9625 if { (eval echo configure:9626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9626   rm -rf conftest*
9627   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9628 else
9629   echo "configure: failed program was:" >&5
9630   cat conftest.$ac_ext >&5
9631   rm -rf conftest*
9632   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9633 fi
9634 rm -f conftest*
9635 fi
9636
9637 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9638   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9639       cat >> confdefs.h <<\EOF
9640 #define PUTUTLINE_RETURNS_UTMP 1
9641 EOF
9642
9643   fi
9644 fi
9645
9646 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9647 echo "configure:9648: checking for ut_syslen in utmpx" >&5
9648 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9649   echo $ac_n "(cached) $ac_c" 1>&6
9650 else
9651   
9652 cat > conftest.$ac_ext <<EOF
9653 #line 9654 "configure"
9654 #include "confdefs.h"
9655 #include <sys/types.h>
9656 #include <utmpx.h>
9657 int main() {
9658 struct utmpx ux;  ux.ut_syslen = 0;
9659 ; return 0; }
9660 EOF
9661 if { (eval echo configure:9662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9662   rm -rf conftest*
9663   samba_cv_HAVE_UX_UT_SYSLEN=yes
9664 else
9665   echo "configure: failed program was:" >&5
9666   cat conftest.$ac_ext >&5
9667   rm -rf conftest*
9668   samba_cv_HAVE_UX_UT_SYSLEN=no
9669 fi
9670 rm -f conftest*
9671 fi
9672
9673 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9674 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9675     cat >> confdefs.h <<\EOF
9676 #define HAVE_UX_UT_SYSLEN 1
9677 EOF
9678
9679 fi 
9680
9681
9682 #################################################
9683 # check for libiconv support
9684 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9685 echo "configure:9686: checking whether to use libiconv" >&5
9686 # Check whether --with-libiconv or --without-libiconv was given.
9687 if test "${with_libiconv+set}" = set; then
9688   withval="$with_libiconv"
9689    case "$withval" in
9690   no)
9691     echo "$ac_t""no" 1>&6
9692     ;;
9693   *)
9694     echo "$ac_t""yes" 1>&6
9695     CFLAGS="$CFLAGS -I$withval/include"
9696     LDFLAGS="$LDFLAGS -L$withval/lib"
9697     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9698 echo "configure:9699: checking for iconv_open in -liconv" >&5
9699 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9700 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9701   echo $ac_n "(cached) $ac_c" 1>&6
9702 else
9703   ac_save_LIBS="$LIBS"
9704 LIBS="-liconv  $LIBS"
9705 cat > conftest.$ac_ext <<EOF
9706 #line 9707 "configure"
9707 #include "confdefs.h"
9708 /* Override any gcc2 internal prototype to avoid an error.  */
9709 /* We use char because int might match the return type of a gcc2
9710     builtin and then its argument prototype would still apply.  */
9711 char iconv_open();
9712
9713 int main() {
9714 iconv_open()
9715 ; return 0; }
9716 EOF
9717 if { (eval echo configure:9718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9718   rm -rf conftest*
9719   eval "ac_cv_lib_$ac_lib_var=yes"
9720 else
9721   echo "configure: failed program was:" >&5
9722   cat conftest.$ac_ext >&5
9723   rm -rf conftest*
9724   eval "ac_cv_lib_$ac_lib_var=no"
9725 fi
9726 rm -f conftest*
9727 LIBS="$ac_save_LIBS"
9728
9729 fi
9730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9731   echo "$ac_t""yes" 1>&6
9732     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9733     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9734   cat >> confdefs.h <<EOF
9735 #define $ac_tr_lib 1
9736 EOF
9737
9738   LIBS="-liconv $LIBS"
9739
9740 else
9741   echo "$ac_t""no" 1>&6
9742 fi
9743
9744     cat >> confdefs.h <<EOF
9745 #define WITH_LIBICONV "${withval}"
9746 EOF
9747
9748     ;;
9749   esac 
9750 else
9751   echo "$ac_t""no" 1>&6
9752
9753 fi
9754
9755
9756
9757 ############
9758 # check for iconv in libc
9759 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9760 echo "configure:9761: checking for working iconv" >&5
9761 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9762   echo $ac_n "(cached) $ac_c" 1>&6
9763 else
9764   
9765 if test "$cross_compiling" = yes; then
9766   samba_cv_HAVE_NATIVE_ICONV=cross
9767 else
9768   cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771
9772 #include <iconv.h>
9773 main() {
9774        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9775        if (cd == 0 || cd == (iconv_t)-1) return -1;
9776        return 0;
9777 }
9778
9779 EOF
9780 if { (eval echo configure:9781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9781 then
9782   samba_cv_HAVE_NATIVE_ICONV=yes
9783 else
9784   echo "configure: failed program was:" >&5
9785   cat conftest.$ac_ext >&5
9786   rm -fr conftest*
9787   samba_cv_HAVE_NATIVE_ICONV=no
9788 fi
9789 rm -fr conftest*
9790 fi
9791
9792 fi
9793
9794 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9795 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9796     cat >> confdefs.h <<\EOF
9797 #define HAVE_NATIVE_ICONV 1
9798 EOF
9799
9800 fi
9801
9802
9803 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9804 echo "configure:9805: checking for Linux kernel oplocks" >&5
9805 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9806   echo $ac_n "(cached) $ac_c" 1>&6
9807 else
9808   
9809 if test "$cross_compiling" = yes; then
9810   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9811 else
9812   cat > conftest.$ac_ext <<EOF
9813 #line 9814 "configure"
9814 #include "confdefs.h"
9815
9816 #include <sys/types.h>
9817 #include <fcntl.h>
9818 #ifndef F_GETLEASE
9819 #define F_GETLEASE      1025
9820 #endif
9821 main() {
9822        int fd = open("/dev/null", O_RDONLY);
9823        return fcntl(fd, F_GETLEASE, 0) == -1;
9824 }
9825
9826 EOF
9827 if { (eval echo configure:9828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9828 then
9829   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9830 else
9831   echo "configure: failed program was:" >&5
9832   cat conftest.$ac_ext >&5
9833   rm -fr conftest*
9834   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9835 fi
9836 rm -fr conftest*
9837 fi
9838
9839 fi
9840
9841 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9842 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9843     cat >> confdefs.h <<\EOF
9844 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9845 EOF
9846
9847 fi
9848
9849 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9850 echo "configure:9851: checking for kernel change notify support" >&5
9851 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9852   echo $ac_n "(cached) $ac_c" 1>&6
9853 else
9854   
9855 if test "$cross_compiling" = yes; then
9856   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9857 else
9858   cat > conftest.$ac_ext <<EOF
9859 #line 9860 "configure"
9860 #include "confdefs.h"
9861
9862 #include <sys/types.h>
9863 #include <fcntl.h>
9864 #include <signal.h>
9865 #ifndef F_NOTIFY
9866 #define F_NOTIFY 1026
9867 #endif
9868 main() {
9869         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9870 }
9871
9872 EOF
9873 if { (eval echo configure:9874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9874 then
9875   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9876 else
9877   echo "configure: failed program was:" >&5
9878   cat conftest.$ac_ext >&5
9879   rm -fr conftest*
9880   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9881 fi
9882 rm -fr conftest*
9883 fi
9884
9885 fi
9886
9887 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9888 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9889     cat >> confdefs.h <<\EOF
9890 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9891 EOF
9892
9893 fi
9894
9895 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9896 echo "configure:9897: checking for kernel share modes" >&5
9897 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9898   echo $ac_n "(cached) $ac_c" 1>&6
9899 else
9900   
9901 if test "$cross_compiling" = yes; then
9902   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9903 else
9904   cat > conftest.$ac_ext <<EOF
9905 #line 9906 "configure"
9906 #include "confdefs.h"
9907
9908 #include <sys/types.h>
9909 #include <fcntl.h>
9910 #include <signal.h>
9911 #include <sys/file.h>
9912 #ifndef LOCK_MAND
9913 #define LOCK_MAND       32
9914 #define LOCK_READ       64
9915 #endif
9916 main() {
9917         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9918 }
9919
9920 EOF
9921 if { (eval echo configure:9922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9922 then
9923   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9924 else
9925   echo "configure: failed program was:" >&5
9926   cat conftest.$ac_ext >&5
9927   rm -fr conftest*
9928   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9929 fi
9930 rm -fr conftest*
9931 fi
9932
9933 fi
9934
9935 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9936 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9937     cat >> confdefs.h <<\EOF
9938 #define HAVE_KERNEL_SHARE_MODES 1
9939 EOF
9940
9941 fi
9942
9943
9944
9945
9946 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9947 echo "configure:9948: checking for IRIX kernel oplock type definitions" >&5
9948 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9949   echo $ac_n "(cached) $ac_c" 1>&6
9950 else
9951   
9952 cat > conftest.$ac_ext <<EOF
9953 #line 9954 "configure"
9954 #include "confdefs.h"
9955 #include <sys/types.h>
9956 #include <fcntl.h>
9957 int main() {
9958 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9959 ; return 0; }
9960 EOF
9961 if { (eval echo configure:9962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9962   rm -rf conftest*
9963   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9964 else
9965   echo "configure: failed program was:" >&5
9966   cat conftest.$ac_ext >&5
9967   rm -rf conftest*
9968   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9969 fi
9970 rm -f conftest*
9971 fi
9972
9973 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9974 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9975     cat >> confdefs.h <<\EOF
9976 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9977 EOF
9978
9979 fi
9980
9981 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9982 echo "configure:9983: checking for irix specific capabilities" >&5
9983 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9984   echo $ac_n "(cached) $ac_c" 1>&6
9985 else
9986   
9987 if test "$cross_compiling" = yes; then
9988   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9989 else
9990   cat > conftest.$ac_ext <<EOF
9991 #line 9992 "configure"
9992 #include "confdefs.h"
9993 #include <sys/types.h>
9994 #include <sys/capability.h>
9995 main() {
9996  cap_t cap;
9997  if ((cap = cap_get_proc()) == NULL)
9998    exit(1);
9999  cap->cap_effective |= CAP_NETWORK_MGT;
10000  cap->cap_inheritable |= CAP_NETWORK_MGT;
10001  cap_set_proc(cap);
10002  exit(0);
10003 }
10004
10005 EOF
10006 if { (eval echo configure:10007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10007 then
10008   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10009 else
10010   echo "configure: failed program was:" >&5
10011   cat conftest.$ac_ext >&5
10012   rm -fr conftest*
10013   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10014 fi
10015 rm -fr conftest*
10016 fi
10017
10018 fi
10019
10020 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10021 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10022     cat >> confdefs.h <<\EOF
10023 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10024 EOF
10025
10026 fi
10027
10028 #
10029 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10030 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10031 #
10032
10033 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10034 echo "configure:10035: checking for int16 typedef included by rpc/rpc.h" >&5
10035 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10036   echo $ac_n "(cached) $ac_c" 1>&6
10037 else
10038   
10039 cat > conftest.$ac_ext <<EOF
10040 #line 10041 "configure"
10041 #include "confdefs.h"
10042 #include <sys/types.h>
10043 #if defined(HAVE_RPC_RPC_H)
10044 #include <rpc/rpc.h>
10045 #endif
10046 int main() {
10047 int16 testvar;
10048 ; return 0; }
10049 EOF
10050 if { (eval echo configure:10051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10051   rm -rf conftest*
10052   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10053 else
10054   echo "configure: failed program was:" >&5
10055   cat conftest.$ac_ext >&5
10056   rm -rf conftest*
10057   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10058 fi
10059 rm -f conftest*
10060 fi
10061
10062 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10063 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10064     cat >> confdefs.h <<\EOF
10065 #define HAVE_INT16_FROM_RPC_RPC_H 1
10066 EOF
10067
10068 fi
10069
10070 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10071 echo "configure:10072: checking for uint16 typedef included by rpc/rpc.h" >&5
10072 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10073   echo $ac_n "(cached) $ac_c" 1>&6
10074 else
10075   
10076 cat > conftest.$ac_ext <<EOF
10077 #line 10078 "configure"
10078 #include "confdefs.h"
10079 #include <sys/types.h>
10080 #if defined(HAVE_RPC_RPC_H)
10081 #include <rpc/rpc.h>
10082 #endif
10083 int main() {
10084 uint16 testvar;
10085 ; return 0; }
10086 EOF
10087 if { (eval echo configure:10088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10088   rm -rf conftest*
10089   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10090 else
10091   echo "configure: failed program was:" >&5
10092   cat conftest.$ac_ext >&5
10093   rm -rf conftest*
10094   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10095 fi
10096 rm -f conftest*
10097 fi
10098
10099 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10100 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10101     cat >> confdefs.h <<\EOF
10102 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10103 EOF
10104
10105 fi
10106
10107 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10108 echo "configure:10109: checking for int32 typedef included by rpc/rpc.h" >&5
10109 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10110   echo $ac_n "(cached) $ac_c" 1>&6
10111 else
10112   
10113 cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 #include <sys/types.h>
10117 #if defined(HAVE_RPC_RPC_H)
10118 #include <rpc/rpc.h>
10119 #endif
10120 int main() {
10121 int32 testvar;
10122 ; return 0; }
10123 EOF
10124 if { (eval echo configure:10125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10125   rm -rf conftest*
10126   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10127 else
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10132 fi
10133 rm -f conftest*
10134 fi
10135
10136 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10137 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10138     cat >> confdefs.h <<\EOF
10139 #define HAVE_INT32_FROM_RPC_RPC_H 1
10140 EOF
10141
10142 fi
10143
10144 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10145 echo "configure:10146: checking for uint32 typedef included by rpc/rpc.h" >&5
10146 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10147   echo $ac_n "(cached) $ac_c" 1>&6
10148 else
10149   
10150 cat > conftest.$ac_ext <<EOF
10151 #line 10152 "configure"
10152 #include "confdefs.h"
10153 #include <sys/types.h>
10154 #if defined(HAVE_RPC_RPC_H)
10155 #include <rpc/rpc.h>
10156 #endif
10157 int main() {
10158 uint32 testvar;
10159 ; return 0; }
10160 EOF
10161 if { (eval echo configure:10162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10162   rm -rf conftest*
10163   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10164 else
10165   echo "configure: failed program was:" >&5
10166   cat conftest.$ac_ext >&5
10167   rm -rf conftest*
10168   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10169 fi
10170 rm -f conftest*
10171 fi
10172
10173 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10174 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10175     cat >> confdefs.h <<\EOF
10176 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10177 EOF
10178
10179 fi
10180
10181
10182 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10183 echo "configure:10184: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10184 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10185   echo $ac_n "(cached) $ac_c" 1>&6
10186 else
10187   
10188 cat > conftest.$ac_ext <<EOF
10189 #line 10190 "configure"
10190 #include "confdefs.h"
10191 #include <sys/types.h>
10192 #ifdef HAVE_SYS_SECURITY_H
10193 #include <sys/security.h>
10194 #include <prot.h>
10195 #endif  /* HAVE_SYS_SECURITY_H */
10196 #if defined(HAVE_RPC_RPC_H)
10197 #include <rpc/rpc.h>
10198 #endif
10199 int main() {
10200 int testvar;
10201 ; return 0; }
10202 EOF
10203 if { (eval echo configure:10204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10204   rm -rf conftest*
10205   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10206 else
10207   echo "configure: failed program was:" >&5
10208   cat conftest.$ac_ext >&5
10209   rm -rf conftest*
10210   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10211 fi
10212 rm -f conftest*
10213 fi
10214
10215 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10216 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10217     cat >> confdefs.h <<\EOF
10218 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10219 EOF
10220
10221 fi
10222
10223 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10224 echo "configure:10225: checking for test routines" >&5
10225 if test "$cross_compiling" = yes; then
10226   echo "configure: warning: cannot run when cross-compiling" 1>&2
10227 else
10228   cat > conftest.$ac_ext <<EOF
10229 #line 10230 "configure"
10230 #include "confdefs.h"
10231 #include "${srcdir-.}/tests/trivial.c"
10232 EOF
10233 if { (eval echo configure:10234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10234 then
10235   echo "$ac_t""yes" 1>&6
10236 else
10237   echo "configure: failed program was:" >&5
10238   cat conftest.$ac_ext >&5
10239   rm -fr conftest*
10240   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10241 fi
10242 rm -fr conftest*
10243 fi
10244
10245
10246 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10247 echo "configure:10248: checking for ftruncate extend" >&5
10248 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10249   echo $ac_n "(cached) $ac_c" 1>&6
10250 else
10251   
10252 if test "$cross_compiling" = yes; then
10253   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10254 else
10255   cat > conftest.$ac_ext <<EOF
10256 #line 10257 "configure"
10257 #include "confdefs.h"
10258 #include "${srcdir-.}/tests/ftruncate.c"
10259 EOF
10260 if { (eval echo configure:10261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10261 then
10262   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10263 else
10264   echo "configure: failed program was:" >&5
10265   cat conftest.$ac_ext >&5
10266   rm -fr conftest*
10267   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10268 fi
10269 rm -fr conftest*
10270 fi
10271
10272 fi
10273
10274 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10275 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10276     cat >> confdefs.h <<\EOF
10277 #define HAVE_FTRUNCATE_EXTEND 1
10278 EOF
10279
10280 fi
10281
10282 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10283 echo "configure:10284: checking for AF_LOCAL socket support" >&5
10284 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10285   echo $ac_n "(cached) $ac_c" 1>&6
10286 else
10287   
10288 if test "$cross_compiling" = yes; then
10289   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10290 else
10291   cat > conftest.$ac_ext <<EOF
10292 #line 10293 "configure"
10293 #include "confdefs.h"
10294 #include "${srcdir-.}/tests/unixsock.c"
10295 EOF
10296 if { (eval echo configure:10297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10297 then
10298   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10299 else
10300   echo "configure: failed program was:" >&5
10301   cat conftest.$ac_ext >&5
10302   rm -fr conftest*
10303   samba_cv_HAVE_WORKING_AF_LOCAL=no
10304 fi
10305 rm -fr conftest*
10306 fi
10307
10308 fi
10309
10310 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10311 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10312 then
10313     cat >> confdefs.h <<\EOF
10314 #define HAVE_WORKING_AF_LOCAL 1
10315 EOF
10316
10317 fi
10318
10319 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10320 echo "configure:10321: checking for broken getgroups" >&5
10321 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10322   echo $ac_n "(cached) $ac_c" 1>&6
10323 else
10324   
10325 if test "$cross_compiling" = yes; then
10326   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10327 else
10328   cat > conftest.$ac_ext <<EOF
10329 #line 10330 "configure"
10330 #include "confdefs.h"
10331 #include "${srcdir-.}/tests/getgroups.c"
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10334 then
10335   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -fr conftest*
10340   samba_cv_HAVE_BROKEN_GETGROUPS=no
10341 fi
10342 rm -fr conftest*
10343 fi
10344
10345 fi
10346
10347 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10348 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10349     cat >> confdefs.h <<\EOF
10350 #define HAVE_BROKEN_GETGROUPS 1
10351 EOF
10352
10353 fi
10354
10355 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10356 echo "configure:10357: checking whether getpass should be replaced" >&5
10357 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10358   echo $ac_n "(cached) $ac_c" 1>&6
10359 else
10360   
10361 SAVE_CPPFLAGS="$CPPFLAGS"
10362 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10363 cat > conftest.$ac_ext <<EOF
10364 #line 10365 "configure"
10365 #include "confdefs.h"
10366
10367 #define REPLACE_GETPASS 1
10368 #define NO_CONFIG_H 1
10369 #define main dont_declare_main
10370 #include "${srcdir-.}/lib/getsmbpass.c"
10371 #undef main
10372
10373 int main() {
10374
10375 ; return 0; }
10376 EOF
10377 if { (eval echo configure:10378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10378   rm -rf conftest*
10379   samba_cv_REPLACE_GETPASS=yes
10380 else
10381   echo "configure: failed program was:" >&5
10382   cat conftest.$ac_ext >&5
10383   rm -rf conftest*
10384   samba_cv_REPLACE_GETPASS=no
10385 fi
10386 rm -f conftest*
10387 CPPFLAGS="$SAVE_CPPFLAGS"
10388
10389 fi
10390
10391 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10392 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10393         cat >> confdefs.h <<\EOF
10394 #define REPLACE_GETPASS 1
10395 EOF
10396
10397 fi
10398
10399 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10400 echo "configure:10401: checking for broken inet_ntoa" >&5
10401 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10402   echo $ac_n "(cached) $ac_c" 1>&6
10403 else
10404   
10405 if test "$cross_compiling" = yes; then
10406   samba_cv_REPLACE_INET_NTOA=cross
10407 else
10408   cat > conftest.$ac_ext <<EOF
10409 #line 10410 "configure"
10410 #include "confdefs.h"
10411
10412 #include <stdio.h>
10413 #include <sys/types.h>
10414 #include <netinet/in.h>
10415 #ifdef HAVE_ARPA_INET_H
10416 #include <arpa/inet.h>
10417 #endif
10418 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10419 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10420     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10421 exit(1);}
10422 EOF
10423 if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10424 then
10425   samba_cv_REPLACE_INET_NTOA=yes
10426 else
10427   echo "configure: failed program was:" >&5
10428   cat conftest.$ac_ext >&5
10429   rm -fr conftest*
10430   samba_cv_REPLACE_INET_NTOA=no
10431 fi
10432 rm -fr conftest*
10433 fi
10434
10435 fi
10436
10437 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10438 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10439     cat >> confdefs.h <<\EOF
10440 #define REPLACE_INET_NTOA 1
10441 EOF
10442
10443 fi
10444
10445 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10446 echo "configure:10447: checking for secure mkstemp" >&5
10447 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10448   echo $ac_n "(cached) $ac_c" 1>&6
10449 else
10450   
10451 if test "$cross_compiling" = yes; then
10452   samba_cv_HAVE_SECURE_MKSTEMP=cross
10453 else
10454   cat > conftest.$ac_ext <<EOF
10455 #line 10456 "configure"
10456 #include "confdefs.h"
10457 #include <stdlib.h>
10458 #include <sys/types.h>
10459 #include <sys/stat.h>
10460 #include <unistd.h>
10461 main() { 
10462   struct stat st;
10463   char tpl[20]="/tmp/test.XXXXXX"; 
10464   int fd = mkstemp(tpl); 
10465   if (fd == -1) exit(1);
10466   unlink(tpl);
10467   if (fstat(fd, &st) != 0) exit(1);
10468   if ((st.st_mode & 0777) != 0600) exit(1);
10469   exit(0);
10470 }
10471 EOF
10472 if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10473 then
10474   samba_cv_HAVE_SECURE_MKSTEMP=yes
10475 else
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -fr conftest*
10479   samba_cv_HAVE_SECURE_MKSTEMP=no
10480 fi
10481 rm -fr conftest*
10482 fi
10483
10484 fi
10485
10486 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10487 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10488     cat >> confdefs.h <<\EOF
10489 #define HAVE_SECURE_MKSTEMP 1
10490 EOF
10491
10492 fi
10493
10494 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10495 echo "configure:10496: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10496 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10497   echo $ac_n "(cached) $ac_c" 1>&6
10498 else
10499   
10500 if test "$cross_compiling" = yes; then
10501   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10502 else
10503   cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506 #include <unistd.h>
10507 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10508 EOF
10509 if { (eval echo configure:10510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10510 then
10511   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10512 else
10513   echo "configure: failed program was:" >&5
10514   cat conftest.$ac_ext >&5
10515   rm -fr conftest*
10516   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10517 fi
10518 rm -fr conftest*
10519 fi
10520
10521 fi
10522
10523 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10524 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10525     cat >> confdefs.h <<\EOF
10526 #define SYSCONF_SC_NGROUPS_MAX 1
10527 EOF
10528
10529 fi
10530
10531 echo $ac_n "checking for root""... $ac_c" 1>&6
10532 echo "configure:10533: checking for root" >&5
10533 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10534   echo $ac_n "(cached) $ac_c" 1>&6
10535 else
10536   
10537 if test "$cross_compiling" = yes; then
10538   samba_cv_HAVE_ROOT=cross
10539 else
10540   cat > conftest.$ac_ext <<EOF
10541 #line 10542 "configure"
10542 #include "confdefs.h"
10543 main() { exit(getuid() != 0); }
10544 EOF
10545 if { (eval echo configure:10546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10546 then
10547   samba_cv_HAVE_ROOT=yes
10548 else
10549   echo "configure: failed program was:" >&5
10550   cat conftest.$ac_ext >&5
10551   rm -fr conftest*
10552   samba_cv_HAVE_ROOT=no
10553 fi
10554 rm -fr conftest*
10555 fi
10556
10557 fi
10558
10559 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10560 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10561     cat >> confdefs.h <<\EOF
10562 #define HAVE_ROOT 1
10563 EOF
10564
10565 else
10566     echo "configure: warning: running as non-root will disable some tests" 1>&2
10567 fi
10568
10569 ##################
10570 # look for a method of finding the list of network interfaces
10571 iface=no;
10572 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10573 echo "configure:10574: checking for iface AIX" >&5
10574 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10575   echo $ac_n "(cached) $ac_c" 1>&6
10576 else
10577   
10578 if test "$cross_compiling" = yes; then
10579   samba_cv_HAVE_IFACE_AIX=cross
10580 else
10581   cat > conftest.$ac_ext <<EOF
10582 #line 10583 "configure"
10583 #include "confdefs.h"
10584
10585 #define HAVE_IFACE_AIX 1
10586 #define AUTOCONF_TEST 1
10587 #include "confdefs.h"
10588 #include "${srcdir-.}/lib/interfaces.c"
10589 EOF
10590 if { (eval echo configure:10591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10591 then
10592   samba_cv_HAVE_IFACE_AIX=yes
10593 else
10594   echo "configure: failed program was:" >&5
10595   cat conftest.$ac_ext >&5
10596   rm -fr conftest*
10597   samba_cv_HAVE_IFACE_AIX=no
10598 fi
10599 rm -fr conftest*
10600 fi
10601
10602 fi
10603
10604 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10605 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10606     iface=yes;cat >> confdefs.h <<\EOF
10607 #define HAVE_IFACE_AIX 1
10608 EOF
10609
10610 fi
10611
10612 if test $iface = no; then
10613 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10614 echo "configure:10615: checking for iface ifconf" >&5
10615 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10616   echo $ac_n "(cached) $ac_c" 1>&6
10617 else
10618   
10619 if test "$cross_compiling" = yes; then
10620   samba_cv_HAVE_IFACE_IFCONF=cross
10621 else
10622   cat > conftest.$ac_ext <<EOF
10623 #line 10624 "configure"
10624 #include "confdefs.h"
10625
10626 #define HAVE_IFACE_IFCONF 1
10627 #define AUTOCONF_TEST 1
10628 #include "confdefs.h"
10629 #include "${srcdir-.}/lib/interfaces.c"
10630 EOF
10631 if { (eval echo configure:10632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10632 then
10633   samba_cv_HAVE_IFACE_IFCONF=yes
10634 else
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -fr conftest*
10638   samba_cv_HAVE_IFACE_IFCONF=no
10639 fi
10640 rm -fr conftest*
10641 fi
10642
10643 fi
10644
10645 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10646 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10647     iface=yes;cat >> confdefs.h <<\EOF
10648 #define HAVE_IFACE_IFCONF 1
10649 EOF
10650
10651 fi
10652 fi
10653
10654 if test $iface = no; then
10655 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10656 echo "configure:10657: checking for iface ifreq" >&5
10657 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10658   echo $ac_n "(cached) $ac_c" 1>&6
10659 else
10660   
10661 if test "$cross_compiling" = yes; then
10662   samba_cv_HAVE_IFACE_IFREQ=cross
10663 else
10664   cat > conftest.$ac_ext <<EOF
10665 #line 10666 "configure"
10666 #include "confdefs.h"
10667
10668 #define HAVE_IFACE_IFREQ 1
10669 #define AUTOCONF_TEST 1
10670 #include "confdefs.h"
10671 #include "${srcdir-.}/lib/interfaces.c"
10672 EOF
10673 if { (eval echo configure:10674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10674 then
10675   samba_cv_HAVE_IFACE_IFREQ=yes
10676 else
10677   echo "configure: failed program was:" >&5
10678   cat conftest.$ac_ext >&5
10679   rm -fr conftest*
10680   samba_cv_HAVE_IFACE_IFREQ=no
10681 fi
10682 rm -fr conftest*
10683 fi
10684
10685 fi
10686
10687 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10688 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10689     iface=yes;cat >> confdefs.h <<\EOF
10690 #define HAVE_IFACE_IFREQ 1
10691 EOF
10692
10693 fi
10694 fi
10695
10696
10697 ################################################
10698 # look for a method of setting the effective uid
10699 seteuid=no;
10700 if test $seteuid = no; then
10701 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10702 echo "configure:10703: checking for setresuid" >&5
10703 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10704   echo $ac_n "(cached) $ac_c" 1>&6
10705 else
10706   
10707 if test "$cross_compiling" = yes; then
10708   samba_cv_USE_SETRESUID=cross
10709 else
10710   cat > conftest.$ac_ext <<EOF
10711 #line 10712 "configure"
10712 #include "confdefs.h"
10713
10714 #define AUTOCONF_TEST 1
10715 #define USE_SETRESUID 1
10716 #include "confdefs.h"
10717 #include "${srcdir-.}/lib/util_sec.c"
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10720 then
10721   samba_cv_USE_SETRESUID=yes
10722 else
10723   echo "configure: failed program was:" >&5
10724   cat conftest.$ac_ext >&5
10725   rm -fr conftest*
10726   samba_cv_USE_SETRESUID=no
10727 fi
10728 rm -fr conftest*
10729 fi
10730
10731 fi
10732
10733 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10734 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10735     seteuid=yes;cat >> confdefs.h <<\EOF
10736 #define USE_SETRESUID 1
10737 EOF
10738
10739 fi
10740 fi
10741
10742
10743 if test $seteuid = no; then
10744 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10745 echo "configure:10746: checking for setreuid" >&5
10746 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10747   echo $ac_n "(cached) $ac_c" 1>&6
10748 else
10749   
10750 if test "$cross_compiling" = yes; then
10751   samba_cv_USE_SETREUID=cross
10752 else
10753   cat > conftest.$ac_ext <<EOF
10754 #line 10755 "configure"
10755 #include "confdefs.h"
10756
10757 #define AUTOCONF_TEST 1
10758 #define USE_SETREUID 1
10759 #include "confdefs.h"
10760 #include "${srcdir-.}/lib/util_sec.c"
10761 EOF
10762 if { (eval echo configure:10763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10763 then
10764   samba_cv_USE_SETREUID=yes
10765 else
10766   echo "configure: failed program was:" >&5
10767   cat conftest.$ac_ext >&5
10768   rm -fr conftest*
10769   samba_cv_USE_SETREUID=no
10770 fi
10771 rm -fr conftest*
10772 fi
10773
10774 fi
10775
10776 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10777 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10778     seteuid=yes;cat >> confdefs.h <<\EOF
10779 #define USE_SETREUID 1
10780 EOF
10781
10782 fi
10783 fi
10784
10785 if test $seteuid = no; then
10786 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10787 echo "configure:10788: checking for seteuid" >&5
10788 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10789   echo $ac_n "(cached) $ac_c" 1>&6
10790 else
10791   
10792 if test "$cross_compiling" = yes; then
10793   samba_cv_USE_SETEUID=cross
10794 else
10795   cat > conftest.$ac_ext <<EOF
10796 #line 10797 "configure"
10797 #include "confdefs.h"
10798
10799 #define AUTOCONF_TEST 1
10800 #define USE_SETEUID 1
10801 #include "confdefs.h"
10802 #include "${srcdir-.}/lib/util_sec.c"
10803 EOF
10804 if { (eval echo configure:10805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10805 then
10806   samba_cv_USE_SETEUID=yes
10807 else
10808   echo "configure: failed program was:" >&5
10809   cat conftest.$ac_ext >&5
10810   rm -fr conftest*
10811   samba_cv_USE_SETEUID=no
10812 fi
10813 rm -fr conftest*
10814 fi
10815
10816 fi
10817
10818 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10819 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10820     seteuid=yes;cat >> confdefs.h <<\EOF
10821 #define USE_SETEUID 1
10822 EOF
10823
10824 fi
10825 fi
10826
10827 if test $seteuid = no; then
10828 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10829 echo "configure:10830: checking for setuidx" >&5
10830 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10831   echo $ac_n "(cached) $ac_c" 1>&6
10832 else
10833   
10834 if test "$cross_compiling" = yes; then
10835   samba_cv_USE_SETUIDX=cross
10836 else
10837   cat > conftest.$ac_ext <<EOF
10838 #line 10839 "configure"
10839 #include "confdefs.h"
10840
10841 #define AUTOCONF_TEST 1
10842 #define USE_SETUIDX 1
10843 #include "confdefs.h"
10844 #include "${srcdir-.}/lib/util_sec.c"
10845 EOF
10846 if { (eval echo configure:10847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10847 then
10848   samba_cv_USE_SETUIDX=yes
10849 else
10850   echo "configure: failed program was:" >&5
10851   cat conftest.$ac_ext >&5
10852   rm -fr conftest*
10853   samba_cv_USE_SETUIDX=no
10854 fi
10855 rm -fr conftest*
10856 fi
10857
10858 fi
10859
10860 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10861 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10862     seteuid=yes;cat >> confdefs.h <<\EOF
10863 #define USE_SETUIDX 1
10864 EOF
10865
10866 fi
10867 fi
10868
10869
10870 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10871 echo "configure:10872: checking for working mmap" >&5
10872 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10873   echo $ac_n "(cached) $ac_c" 1>&6
10874 else
10875   
10876 if test "$cross_compiling" = yes; then
10877   samba_cv_HAVE_MMAP=cross
10878 else
10879   cat > conftest.$ac_ext <<EOF
10880 #line 10881 "configure"
10881 #include "confdefs.h"
10882 #include "${srcdir-.}/tests/shared_mmap.c"
10883 EOF
10884 if { (eval echo configure:10885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10885 then
10886   samba_cv_HAVE_MMAP=yes
10887 else
10888   echo "configure: failed program was:" >&5
10889   cat conftest.$ac_ext >&5
10890   rm -fr conftest*
10891   samba_cv_HAVE_MMAP=no
10892 fi
10893 rm -fr conftest*
10894 fi
10895
10896 fi
10897
10898 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10899 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10900     cat >> confdefs.h <<\EOF
10901 #define HAVE_MMAP 1
10902 EOF
10903
10904 fi
10905
10906 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10907 echo "configure:10908: checking for ftruncate needs root" >&5
10908 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10909   echo $ac_n "(cached) $ac_c" 1>&6
10910 else
10911   
10912 if test "$cross_compiling" = yes; then
10913   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10914 else
10915   cat > conftest.$ac_ext <<EOF
10916 #line 10917 "configure"
10917 #include "confdefs.h"
10918 #include "${srcdir-.}/tests/ftruncroot.c"
10919 EOF
10920 if { (eval echo configure:10921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10921 then
10922   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10923 else
10924   echo "configure: failed program was:" >&5
10925   cat conftest.$ac_ext >&5
10926   rm -fr conftest*
10927   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10928 fi
10929 rm -fr conftest*
10930 fi
10931
10932 fi
10933
10934 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10935 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10936     cat >> confdefs.h <<\EOF
10937 #define FTRUNCATE_NEEDS_ROOT 1
10938 EOF
10939
10940 fi
10941
10942 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10943 echo "configure:10944: checking for fcntl locking" >&5
10944 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10945   echo $ac_n "(cached) $ac_c" 1>&6
10946 else
10947   
10948 if test "$cross_compiling" = yes; then
10949   samba_cv_HAVE_FCNTL_LOCK=cross
10950 else
10951   cat > conftest.$ac_ext <<EOF
10952 #line 10953 "configure"
10953 #include "confdefs.h"
10954 #include "${srcdir-.}/tests/fcntl_lock.c"
10955 EOF
10956 if { (eval echo configure:10957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10957 then
10958   samba_cv_HAVE_FCNTL_LOCK=yes
10959 else
10960   echo "configure: failed program was:" >&5
10961   cat conftest.$ac_ext >&5
10962   rm -fr conftest*
10963   samba_cv_HAVE_FCNTL_LOCK=no
10964 fi
10965 rm -fr conftest*
10966 fi
10967
10968 fi
10969
10970 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10971 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10972     cat >> confdefs.h <<\EOF
10973 #define HAVE_FCNTL_LOCK 1
10974 EOF
10975
10976 fi
10977
10978 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10979 echo "configure:10980: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10980 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10981   echo $ac_n "(cached) $ac_c" 1>&6
10982 else
10983   
10984 if test "$cross_compiling" = yes; then
10985   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10986 else
10987   cat > conftest.$ac_ext <<EOF
10988 #line 10989 "configure"
10989 #include "confdefs.h"
10990 #include "${srcdir-.}/tests/fcntl_lock64.c"
10991 EOF
10992 if { (eval echo configure:10993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10993 then
10994   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10995 else
10996   echo "configure: failed program was:" >&5
10997   cat conftest.$ac_ext >&5
10998   rm -fr conftest*
10999   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11000 fi
11001 rm -fr conftest*
11002 fi
11003
11004 fi
11005
11006 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11007 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11008     cat >> confdefs.h <<\EOF
11009 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11010 EOF
11011
11012
11013 else
11014
11015
11016   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11017 echo "configure:11018: checking for 64 bit fcntl locking" >&5
11018 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11019   echo $ac_n "(cached) $ac_c" 1>&6
11020 else
11021   
11022   if test "$cross_compiling" = yes; then
11023   samba_cv_HAVE_STRUCT_FLOCK64=cross
11024 else
11025   cat > conftest.$ac_ext <<EOF
11026 #line 11027 "configure"
11027 #include "confdefs.h"
11028
11029 #if defined(HAVE_UNISTD_H)
11030 #include <unistd.h>
11031 #endif
11032 #include <stdio.h>
11033 #include <stdlib.h>
11034
11035 #ifdef HAVE_FCNTL_H
11036 #include <fcntl.h>
11037 #endif
11038
11039 #ifdef HAVE_SYS_FCNTL_H
11040 #include <sys/fcntl.h>
11041 #endif
11042 main() { struct flock64 fl64;
11043 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11044 exit(0);
11045 #else
11046 exit(1);
11047 #endif
11048 }
11049 EOF
11050 if { (eval echo configure:11051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11051 then
11052   samba_cv_HAVE_STRUCT_FLOCK64=yes
11053 else
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -fr conftest*
11057   samba_cv_HAVE_STRUCT_FLOCK64=no
11058 fi
11059 rm -fr conftest*
11060 fi
11061
11062 fi
11063
11064 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11065
11066   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11067       cat >> confdefs.h <<\EOF
11068 #define HAVE_STRUCT_FLOCK64 1
11069 EOF
11070
11071   fi
11072 fi
11073
11074
11075 case "$host_os" in
11076 *linux*)
11077 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11078 echo "configure:11079: checking for broken RedHat 7.2 system header files" >&5
11079 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11080   echo $ac_n "(cached) $ac_c" 1>&6
11081 else
11082   
11083 cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086
11087 #ifdef HAVE_SYS_VFS_H
11088 #include <sys/vfs.h>
11089 #endif
11090 #ifdef HAVE_SYS_CAPABILITY_H
11091 #include <sys/capability.h>
11092 #endif
11093
11094 int main() {
11095 int i;
11096 ; return 0; }
11097 EOF
11098 if { (eval echo configure:11099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11099   rm -rf conftest*
11100   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11101 else
11102   echo "configure: failed program was:" >&5
11103   cat conftest.$ac_ext >&5
11104   rm -rf conftest*
11105   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11106 fi
11107 rm -f conftest*
11108 fi
11109
11110 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11111 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11112    cat >> confdefs.h <<\EOF
11113 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11114 EOF
11115
11116 fi
11117 ;;
11118 esac
11119
11120 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11121 echo "configure:11122: checking for broken nisplus include files" >&5
11122 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11123   echo $ac_n "(cached) $ac_c" 1>&6
11124 else
11125   
11126 cat > conftest.$ac_ext <<EOF
11127 #line 11128 "configure"
11128 #include "confdefs.h"
11129 #include <sys/acl.h>
11130 #if defined(HAVE_RPCSVC_NIS_H)
11131 #include <rpcsvc/nis.h>
11132 #endif
11133 int main() {
11134 int i;
11135 ; return 0; }
11136 EOF
11137 if { (eval echo configure:11138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11138   rm -rf conftest*
11139   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11140 else
11141   echo "configure: failed program was:" >&5
11142   cat conftest.$ac_ext >&5
11143   rm -rf conftest*
11144   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11145 fi
11146 rm -f conftest*
11147 fi
11148
11149 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11150 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11151     cat >> confdefs.h <<\EOF
11152 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11153 EOF
11154
11155 fi
11156
11157
11158 #################################################
11159 # check for smbwrapper support
11160 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11161 echo "configure:11162: checking whether to use smbwrapper" >&5
11162 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11163 if test "${with_smbwrapper+set}" = set; then
11164   withval="$with_smbwrapper"
11165    case "$withval" in
11166   yes)
11167     echo "$ac_t""yes" 1>&6
11168     cat >> confdefs.h <<\EOF
11169 #define WITH_SMBWRAPPER 1
11170 EOF
11171
11172         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11173
11174         if test x$ATTEMPT_WRAP32_BUILD = x; then
11175                 WRAP32=""
11176         else
11177                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11178         fi
11179
11180 # Conditions under which smbwrapper should not be built.
11181
11182         if test x$PICFLAG = x; then
11183            echo No support for PIC code - disabling smbwrapper and smbsh
11184            WRAP=""
11185            WRAP32=""
11186         elif test x$ac_cv_func_syscall = xno; then
11187            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11188            WRAP=""
11189            WRAP32=""
11190         fi
11191     ;;
11192   *)
11193     echo "$ac_t""no" 1>&6
11194     ;;
11195   esac 
11196 else
11197   echo "$ac_t""no" 1>&6
11198
11199 fi
11200
11201
11202 #################################################
11203 # check for AFS clear-text auth support
11204 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11205 echo "configure:11206: checking whether to use AFS clear-text auth" >&5
11206 # Check whether --with-afs or --without-afs was given.
11207 if test "${with_afs+set}" = set; then
11208   withval="$with_afs"
11209    case "$withval" in
11210   yes)
11211     echo "$ac_t""yes" 1>&6
11212     cat >> confdefs.h <<\EOF
11213 #define WITH_AFS 1
11214 EOF
11215
11216     ;;
11217   *)
11218     echo "$ac_t""no" 1>&6
11219     ;;
11220   esac 
11221 else
11222   echo "$ac_t""no" 1>&6
11223
11224 fi
11225
11226
11227
11228 #################################################
11229 # check for the DFS clear-text auth system
11230 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11231 echo "configure:11232: checking whether to use DFS clear-text auth" >&5
11232 # Check whether --with-dfs or --without-dfs was given.
11233 if test "${with_dfs+set}" = set; then
11234   withval="$with_dfs"
11235    case "$withval" in
11236   yes)
11237     echo "$ac_t""yes" 1>&6
11238     cat >> confdefs.h <<\EOF
11239 #define WITH_DFS 1
11240 EOF
11241
11242     ;;
11243   *)
11244     echo "$ac_t""no" 1>&6
11245     ;;
11246   esac 
11247 else
11248   echo "$ac_t""no" 1>&6
11249
11250 fi
11251
11252
11253
11254 #################################################
11255 # check for location of Kerberos 5 install
11256 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11257 echo "configure:11258: checking for kerberos 5 install path" >&5
11258 # Check whether --with-krb5 or --without-krb5 was given.
11259 if test "${with_krb5+set}" = set; then
11260   withval="$with_krb5"
11261    case "$withval" in
11262   no)
11263     echo "$ac_t""no" 1>&6
11264     ;;
11265   *)
11266     echo "$ac_t""yes" 1>&6
11267     LIBS="$LIBS -lkrb5"
11268     CFLAGS="$CFLAGS -I$withval/include"
11269     LDFLAGS="$LDFLAGS -L$withval/lib"
11270     cat >> confdefs.h <<\EOF
11271 #define HAVE_KRB5 1
11272 EOF
11273
11274     have_krb5=yes;
11275     ;;
11276   esac 
11277 else
11278   echo "$ac_t""no" 1>&6
11279
11280 fi
11281
11282
11283 ##################################################################
11284 # we might need the k5crypto and com_err libraries on some systems
11285 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11286 echo "configure:11287: checking for _et_list in -lcom_err" >&5
11287 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11288 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   ac_save_LIBS="$LIBS"
11292 LIBS="-lcom_err  $LIBS"
11293 cat > conftest.$ac_ext <<EOF
11294 #line 11295 "configure"
11295 #include "confdefs.h"
11296 /* Override any gcc2 internal prototype to avoid an error.  */
11297 /* We use char because int might match the return type of a gcc2
11298     builtin and then its argument prototype would still apply.  */
11299 char _et_list();
11300
11301 int main() {
11302 _et_list()
11303 ; return 0; }
11304 EOF
11305 if { (eval echo configure:11306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11306   rm -rf conftest*
11307   eval "ac_cv_lib_$ac_lib_var=yes"
11308 else
11309   echo "configure: failed program was:" >&5
11310   cat conftest.$ac_ext >&5
11311   rm -rf conftest*
11312   eval "ac_cv_lib_$ac_lib_var=no"
11313 fi
11314 rm -f conftest*
11315 LIBS="$ac_save_LIBS"
11316
11317 fi
11318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11319   echo "$ac_t""yes" 1>&6
11320   LIBS="$LIBS -lcom_err"
11321 else
11322   echo "$ac_t""no" 1>&6
11323 fi
11324
11325 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11326 echo "configure:11327: checking for krb5_encrypt_data in -lk5crypto" >&5
11327 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11328 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11329   echo $ac_n "(cached) $ac_c" 1>&6
11330 else
11331   ac_save_LIBS="$LIBS"
11332 LIBS="-lk5crypto  $LIBS"
11333 cat > conftest.$ac_ext <<EOF
11334 #line 11335 "configure"
11335 #include "confdefs.h"
11336 /* Override any gcc2 internal prototype to avoid an error.  */
11337 /* We use char because int might match the return type of a gcc2
11338     builtin and then its argument prototype would still apply.  */
11339 char krb5_encrypt_data();
11340
11341 int main() {
11342 krb5_encrypt_data()
11343 ; return 0; }
11344 EOF
11345 if { (eval echo configure:11346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11346   rm -rf conftest*
11347   eval "ac_cv_lib_$ac_lib_var=yes"
11348 else
11349   echo "configure: failed program was:" >&5
11350   cat conftest.$ac_ext >&5
11351   rm -rf conftest*
11352   eval "ac_cv_lib_$ac_lib_var=no"
11353 fi
11354 rm -f conftest*
11355 LIBS="$ac_save_LIBS"
11356
11357 fi
11358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11359   echo "$ac_t""yes" 1>&6
11360   LIBS="$LIBS -lk5crypto"
11361 else
11362   echo "$ac_t""no" 1>&6
11363 fi
11364
11365
11366
11367 ########################################################
11368 # now see if we can find the krb5 libs in standard paths
11369 if test x$have_krb5 != xyes; then
11370 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11371 echo "configure:11372: checking for krb5_mk_req_extended in -lkrb5" >&5
11372 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11374   echo $ac_n "(cached) $ac_c" 1>&6
11375 else
11376   ac_save_LIBS="$LIBS"
11377 LIBS="-lkrb5  $LIBS"
11378 cat > conftest.$ac_ext <<EOF
11379 #line 11380 "configure"
11380 #include "confdefs.h"
11381 /* Override any gcc2 internal prototype to avoid an error.  */
11382 /* We use char because int might match the return type of a gcc2
11383     builtin and then its argument prototype would still apply.  */
11384 char krb5_mk_req_extended();
11385
11386 int main() {
11387 krb5_mk_req_extended()
11388 ; return 0; }
11389 EOF
11390 if { (eval echo configure:11391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11391   rm -rf conftest*
11392   eval "ac_cv_lib_$ac_lib_var=yes"
11393 else
11394   echo "configure: failed program was:" >&5
11395   cat conftest.$ac_ext >&5
11396   rm -rf conftest*
11397   eval "ac_cv_lib_$ac_lib_var=no"
11398 fi
11399 rm -f conftest*
11400 LIBS="$ac_save_LIBS"
11401
11402 fi
11403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11404   echo "$ac_t""yes" 1>&6
11405   LIBS="$LIBS -lkrb5";
11406         cat >> confdefs.h <<\EOF
11407 #define HAVE_KRB5 1
11408 EOF
11409
11410 else
11411   echo "$ac_t""no" 1>&6
11412 fi
11413
11414 fi
11415
11416 ########################################################
11417 # now see if we can find the ldap libs in standard paths
11418 if test x$have_ldap != xyes; then
11419 echo $ac_n "checking for ldap_open in -lldap""... $ac_c" 1>&6
11420 echo "configure:11421: checking for ldap_open in -lldap" >&5
11421 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
11422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11423   echo $ac_n "(cached) $ac_c" 1>&6
11424 else
11425   ac_save_LIBS="$LIBS"
11426 LIBS="-lldap  $LIBS"
11427 cat > conftest.$ac_ext <<EOF
11428 #line 11429 "configure"
11429 #include "confdefs.h"
11430 /* Override any gcc2 internal prototype to avoid an error.  */
11431 /* We use char because int might match the return type of a gcc2
11432     builtin and then its argument prototype would still apply.  */
11433 char ldap_open();
11434
11435 int main() {
11436 ldap_open()
11437 ; return 0; }
11438 EOF
11439 if { (eval echo configure:11440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11440   rm -rf conftest*
11441   eval "ac_cv_lib_$ac_lib_var=yes"
11442 else
11443   echo "configure: failed program was:" >&5
11444   cat conftest.$ac_ext >&5
11445   rm -rf conftest*
11446   eval "ac_cv_lib_$ac_lib_var=no"
11447 fi
11448 rm -f conftest*
11449 LIBS="$ac_save_LIBS"
11450
11451 fi
11452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11453   echo "$ac_t""yes" 1>&6
11454   LIBS="$LIBS -lldap";
11455         cat >> confdefs.h <<\EOF
11456 #define HAVE_LDAP 1
11457 EOF
11458
11459 else
11460   echo "$ac_t""no" 1>&6
11461 fi
11462
11463 fi
11464 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11465 echo "configure:11466: checking for ber_scanf in -llber" >&5
11466 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11467 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11468   echo $ac_n "(cached) $ac_c" 1>&6
11469 else
11470   ac_save_LIBS="$LIBS"
11471 LIBS="-llber  $LIBS"
11472 cat > conftest.$ac_ext <<EOF
11473 #line 11474 "configure"
11474 #include "confdefs.h"
11475 /* Override any gcc2 internal prototype to avoid an error.  */
11476 /* We use char because int might match the return type of a gcc2
11477     builtin and then its argument prototype would still apply.  */
11478 char ber_scanf();
11479
11480 int main() {
11481 ber_scanf()
11482 ; return 0; }
11483 EOF
11484 if { (eval echo configure:11485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11485   rm -rf conftest*
11486   eval "ac_cv_lib_$ac_lib_var=yes"
11487 else
11488   echo "configure: failed program was:" >&5
11489   cat conftest.$ac_ext >&5
11490   rm -rf conftest*
11491   eval "ac_cv_lib_$ac_lib_var=no"
11492 fi
11493 rm -f conftest*
11494 LIBS="$ac_save_LIBS"
11495
11496 fi
11497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11498   echo "$ac_t""yes" 1>&6
11499   LIBS="$LIBS -llber"
11500 else
11501   echo "$ac_t""no" 1>&6
11502 fi
11503
11504
11505
11506 #################################################
11507 # check for automount support
11508 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11509 echo "configure:11510: checking whether to use AUTOMOUNT" >&5
11510 # Check whether --with-automount or --without-automount was given.
11511 if test "${with_automount+set}" = set; then
11512   withval="$with_automount"
11513    case "$withval" in
11514   yes)
11515     echo "$ac_t""yes" 1>&6
11516     cat >> confdefs.h <<\EOF
11517 #define WITH_AUTOMOUNT 1
11518 EOF
11519
11520     ;;
11521   *)
11522     echo "$ac_t""no" 1>&6
11523     ;;
11524   esac 
11525 else
11526   echo "$ac_t""no" 1>&6
11527
11528 fi
11529
11530
11531 #################################################
11532 # check for smbmount support
11533 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11534 echo "configure:11535: checking whether to use SMBMOUNT" >&5
11535 # Check whether --with-smbmount or --without-smbmount was given.
11536 if test "${with_smbmount+set}" = set; then
11537   withval="$with_smbmount"
11538    case "$withval" in
11539   yes)
11540         case "$host_os" in
11541         *linux*)
11542                 echo "$ac_t""yes" 1>&6
11543                 cat >> confdefs.h <<\EOF
11544 #define WITH_SMBMOUNT 1
11545 EOF
11546
11547                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11548                 ;;
11549         *)
11550                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11551                 ;;
11552         esac
11553     ;;
11554   *)
11555     echo "$ac_t""no" 1>&6
11556     MPROGS=
11557     ;;
11558   esac 
11559 else
11560   echo "$ac_t""no" 1>&6
11561   MPROGS=
11562
11563 fi
11564
11565
11566
11567 #################################################
11568 # check for a PAM clear-text auth, accounts, password and session support
11569 with_pam_for_crypt=no
11570 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
11571 echo "configure:11572: checking whether to use PAM" >&5
11572 # Check whether --with-pam or --without-pam was given.
11573 if test "${with_pam+set}" = set; then
11574   withval="$with_pam"
11575    case "$withval" in
11576   yes)
11577     echo "$ac_t""yes" 1>&6
11578     cat >> confdefs.h <<\EOF
11579 #define WITH_PAM 1
11580 EOF
11581
11582     LIBS="$LIBS -lpam"
11583     with_pam_for_crypt=yes
11584     ;;
11585   *)
11586     echo "$ac_t""no" 1>&6
11587     ;;
11588   esac 
11589 else
11590   echo "$ac_t""no" 1>&6
11591
11592 fi
11593
11594
11595 # we can't build a pam module if we don't have pam.
11596 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11597 echo "configure:11598: checking for pam_get_data in -lpam" >&5
11598 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11599 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11600   echo $ac_n "(cached) $ac_c" 1>&6
11601 else
11602   ac_save_LIBS="$LIBS"
11603 LIBS="-lpam  $LIBS"
11604 cat > conftest.$ac_ext <<EOF
11605 #line 11606 "configure"
11606 #include "confdefs.h"
11607 /* Override any gcc2 internal prototype to avoid an error.  */
11608 /* We use char because int might match the return type of a gcc2
11609     builtin and then its argument prototype would still apply.  */
11610 char pam_get_data();
11611
11612 int main() {
11613 pam_get_data()
11614 ; return 0; }
11615 EOF
11616 if { (eval echo configure:11617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11617   rm -rf conftest*
11618   eval "ac_cv_lib_$ac_lib_var=yes"
11619 else
11620   echo "configure: failed program was:" >&5
11621   cat conftest.$ac_ext >&5
11622   rm -rf conftest*
11623   eval "ac_cv_lib_$ac_lib_var=no"
11624 fi
11625 rm -f conftest*
11626 LIBS="$ac_save_LIBS"
11627
11628 fi
11629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11630   echo "$ac_t""yes" 1>&6
11631   cat >> confdefs.h <<\EOF
11632 #define HAVE_LIBPAM 1
11633 EOF
11634
11635 else
11636   echo "$ac_t""no" 1>&6
11637 fi
11638
11639
11640 #################################################
11641 # check for pam_smbpass support
11642 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11643 echo "configure:11644: checking whether to use pam_smbpass" >&5
11644 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11645 if test "${with_pam_smbpass+set}" = set; then
11646   withval="$with_pam_smbpass"
11647    case "$withval" in
11648   yes)
11649     echo "$ac_t""yes" 1>&6
11650
11651 # Conditions under which pam_smbpass should not be built.
11652
11653        if test x$PICFLAG = x; then
11654           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11655           PAM_MOD=""
11656        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11657           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11658           PAM_MOD=""
11659        else
11660           PAM_MOD="bin/pam_smbpass.so"
11661        fi
11662     ;;
11663   *)
11664     echo "$ac_t""no" 1>&6
11665     ;;
11666   esac 
11667 else
11668   echo "$ac_t""no" 1>&6
11669
11670 fi
11671
11672
11673
11674 ###############################################
11675 # test for where we get crypt() from, but only
11676 # if not using PAM
11677 if test $with_pam_for_crypt = no; then
11678 for ac_func in crypt
11679 do
11680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11681 echo "configure:11682: checking for $ac_func" >&5
11682 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11683   echo $ac_n "(cached) $ac_c" 1>&6
11684 else
11685   cat > conftest.$ac_ext <<EOF
11686 #line 11687 "configure"
11687 #include "confdefs.h"
11688 /* System header to define __stub macros and hopefully few prototypes,
11689     which can conflict with char $ac_func(); below.  */
11690 #include <assert.h>
11691 /* Override any gcc2 internal prototype to avoid an error.  */
11692 /* We use char because int might match the return type of a gcc2
11693     builtin and then its argument prototype would still apply.  */
11694 char $ac_func();
11695
11696 int main() {
11697
11698 /* The GNU C library defines this for functions which it implements
11699     to always fail with ENOSYS.  Some functions are actually named
11700     something starting with __ and the normal name is an alias.  */
11701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11702 choke me
11703 #else
11704 $ac_func();
11705 #endif
11706
11707 ; return 0; }
11708 EOF
11709 if { (eval echo configure:11710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11710   rm -rf conftest*
11711   eval "ac_cv_func_$ac_func=yes"
11712 else
11713   echo "configure: failed program was:" >&5
11714   cat conftest.$ac_ext >&5
11715   rm -rf conftest*
11716   eval "ac_cv_func_$ac_func=no"
11717 fi
11718 rm -f conftest*
11719 fi
11720
11721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11722   echo "$ac_t""yes" 1>&6
11723     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11724   cat >> confdefs.h <<EOF
11725 #define $ac_tr_func 1
11726 EOF
11727  
11728 else
11729   echo "$ac_t""no" 1>&6
11730 fi
11731 done
11732
11733 if test x"$ac_cv_func_crypt" = x"no"; then
11734     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11735 echo "configure:11736: checking for crypt in -lcrypt" >&5
11736 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11737 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11738   echo $ac_n "(cached) $ac_c" 1>&6
11739 else
11740   ac_save_LIBS="$LIBS"
11741 LIBS="-lcrypt  $LIBS"
11742 cat > conftest.$ac_ext <<EOF
11743 #line 11744 "configure"
11744 #include "confdefs.h"
11745 /* Override any gcc2 internal prototype to avoid an error.  */
11746 /* We use char because int might match the return type of a gcc2
11747     builtin and then its argument prototype would still apply.  */
11748 char crypt();
11749
11750 int main() {
11751 crypt()
11752 ; return 0; }
11753 EOF
11754 if { (eval echo configure:11755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11755   rm -rf conftest*
11756   eval "ac_cv_lib_$ac_lib_var=yes"
11757 else
11758   echo "configure: failed program was:" >&5
11759   cat conftest.$ac_ext >&5
11760   rm -rf conftest*
11761   eval "ac_cv_lib_$ac_lib_var=no"
11762 fi
11763 rm -f conftest*
11764 LIBS="$ac_save_LIBS"
11765
11766 fi
11767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11768   echo "$ac_t""yes" 1>&6
11769   LIBS="$LIBS -lcrypt";
11770         cat >> confdefs.h <<\EOF
11771 #define HAVE_CRYPT 1
11772 EOF
11773
11774 else
11775   echo "$ac_t""no" 1>&6
11776 fi
11777
11778 fi
11779 fi
11780
11781 ##
11782 ## moved after the check for -lcrypt in order to
11783 ## ensure that the necessary libraries are included
11784 ## check checking for truncated salt.  Wrapped by the
11785 ## $with_pam_for_crypt variable as above   --jerry
11786 ##
11787 if test $with_pam_for_crypt = no; then
11788 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11789 echo "configure:11790: checking for a crypt that needs truncated salt" >&5
11790 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11791   echo $ac_n "(cached) $ac_c" 1>&6
11792 else
11793   
11794 if test "$cross_compiling" = yes; then
11795   samba_cv_HAVE_TRUNCATED_SALT=cross
11796 else
11797   cat > conftest.$ac_ext <<EOF
11798 #line 11799 "configure"
11799 #include "confdefs.h"
11800 #include "${srcdir-.}/tests/crypttest.c"
11801 EOF
11802 if { (eval echo configure:11803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11803 then
11804   samba_cv_HAVE_TRUNCATED_SALT=no
11805 else
11806   echo "configure: failed program was:" >&5
11807   cat conftest.$ac_ext >&5
11808   rm -fr conftest*
11809   samba_cv_HAVE_TRUNCATED_SALT=yes
11810 fi
11811 rm -fr conftest*
11812 fi
11813
11814 fi
11815
11816 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11817 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11818         cat >> confdefs.h <<\EOF
11819 #define HAVE_TRUNCATED_SALT 1
11820 EOF
11821
11822 fi
11823 fi
11824
11825
11826
11827 ########################################################################################
11828 ##
11829 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
11830 ##
11831 ########################################################################################
11832
11833 ## set the with_smbpasswd_sam as the default
11834 with_smbpasswd_sam=yes
11835
11836
11837 #################################################
11838 # check for a TDB password database
11839 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
11840 echo "configure:11841: checking whether to use TDB SAM database" >&5
11841 # Check whether --with-tdbsam or --without-tdbsam was given.
11842 if test "${with_tdbsam+set}" = set; then
11843   withval="$with_tdbsam"
11844    case "$withval" in
11845   yes)
11846     echo "$ac_t""yes" 1>&6
11847     cat >> confdefs.h <<\EOF
11848 #define WITH_TDB_SAM 1
11849 EOF
11850
11851     with_smbpasswd_sam=no
11852     ;;
11853   *)
11854     echo "$ac_t""no" 1>&6
11855     ;;
11856   esac 
11857 else
11858   echo "$ac_t""no" 1>&6
11859
11860 fi
11861
11862
11863 #################################################
11864 # check for a LDAP password database
11865 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
11866 echo "configure:11867: checking whether to use LDAP SAM database" >&5
11867 # Check whether --with-ldapsam or --without-ldapsam was given.
11868 if test "${with_ldapsam+set}" = set; then
11869   withval="$with_ldapsam"
11870    case "$withval" in
11871   yes)
11872     echo "$ac_t""yes" 1>&6
11873     cat >> confdefs.h <<\EOF
11874 #define WITH_LDAP_SAM 1
11875 EOF
11876
11877     LIBS="-lldap -llber $LIBS"
11878     with_smbpasswd_sam=no
11879     ;;
11880   *)
11881     echo "$ac_t""no" 1>&6
11882     ;;
11883   esac 
11884 else
11885   echo "$ac_t""no" 1>&6
11886
11887 fi
11888
11889
11890 #################################################
11891 # check for a NISPLUS password database
11892 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
11893 echo "configure:11894: checking whether to use NISPLUS SAM database" >&5
11894 # Check whether --with-nisplussam or --without-nisplussam was given.
11895 if test "${with_nisplussam+set}" = set; then
11896   withval="$with_nisplussam"
11897    case "$withval" in
11898   yes)
11899     echo "$ac_t""yes" 1>&6
11900     cat >> confdefs.h <<\EOF
11901 #define WITH_NISPLUS_SAM 1
11902 EOF
11903
11904     with_smbpasswd_sam=no
11905     ;;
11906   *)
11907     echo "$ac_t""no" 1>&6
11908     ;;
11909   esac 
11910 else
11911   echo "$ac_t""no" 1>&6
11912
11913 fi
11914
11915
11916 ################################################
11917 # This test should come last because the
11918 # smbpasswd SAM is only used if another format
11919 # has not been defined
11920 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
11921 echo "configure:11922: checking whether to use traditional smbpasswd file" >&5
11922 if test $with_smbpasswd_sam = yes; then
11923         echo "$ac_t""yes" 1>&6
11924         cat >> confdefs.h <<\EOF
11925 #define WITH_SMBPASSWD_SAM 1
11926 EOF
11927
11928 else
11929         echo "$ac_t""no" 1>&6
11930 fi
11931
11932 ########################################################################################
11933 ##
11934 ## END OF TESTS FOR SAM BACKENDS.  
11935 ##
11936 ########################################################################################
11937
11938 #################################################
11939 # check for a NISPLUS_HOME support 
11940 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11941 echo "configure:11942: checking whether to use NISPLUS_HOME" >&5
11942 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11943 if test "${with_nisplus_home+set}" = set; then
11944   withval="$with_nisplus_home"
11945    case "$withval" in
11946   yes)
11947     echo "$ac_t""yes" 1>&6
11948     cat >> confdefs.h <<\EOF
11949 #define WITH_NISPLUS_HOME 1
11950 EOF
11951
11952     ;;
11953   *)
11954     echo "$ac_t""no" 1>&6
11955     ;;
11956   esac 
11957 else
11958   echo "$ac_t""no" 1>&6
11959
11960 fi
11961
11962
11963 #################################################
11964 # check for the secure socket layer
11965 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11966 echo "configure:11967: checking whether to use SSL" >&5
11967 # Check whether --with-ssl or --without-ssl was given.
11968 if test "${with_ssl+set}" = set; then
11969   withval="$with_ssl"
11970    case "$withval" in
11971   yes)
11972     echo "$ac_t""yes" 1>&6
11973     cat >> confdefs.h <<\EOF
11974 #define WITH_SSL 1
11975 EOF
11976
11977     withval="/usr/local/ssl"     # default
11978
11979     if test "${with_sslinc+set}" = set; then
11980
11981         withval="$with_sslinc"
11982         case "$withval" in
11983         yes|no)
11984           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11985           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11986         ;;
11987         * )
11988           CFLAGS="-I${withval} $CFLAGS"
11989         ;;
11990         esac
11991
11992     else
11993
11994         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11995
11996     fi
11997
11998     if test "${with_ssllib+set}" = set; then
11999
12000         withval="$with_ssllib"
12001         case "$withval" in
12002         yes|no)
12003           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12004           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12005         ;;
12006         * )
12007           LDFLAGS="-L${withval}/lib $LDFLAGS"
12008         ;;
12009         esac
12010
12011     else
12012
12013         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12014
12015     fi
12016
12017     LIBS="-lssl -lcrypto $LIBS"
12018
12019 #    if test ! -d ${withval}; then
12020 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12021 #      exit 1
12022 #    fi 
12023
12024     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12025
12026     ;;
12027   *)
12028     echo "$ac_t""no" 1>&6
12029     ;;
12030   esac 
12031 else
12032   echo "$ac_t""no" 1>&6
12033
12034 fi
12035
12036
12037 #################################################
12038 # check for syslog logging
12039 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12040 echo "configure:12041: checking whether to use syslog logging" >&5
12041 # Check whether --with-syslog or --without-syslog was given.
12042 if test "${with_syslog+set}" = set; then
12043   withval="$with_syslog"
12044    case "$withval" in
12045   yes)
12046     echo "$ac_t""yes" 1>&6
12047     cat >> confdefs.h <<\EOF
12048 #define WITH_SYSLOG 1
12049 EOF
12050
12051     ;;
12052   *)
12053     echo "$ac_t""no" 1>&6
12054     ;;
12055   esac 
12056 else
12057   echo "$ac_t""no" 1>&6
12058
12059 fi
12060
12061
12062 #################################################
12063 # check for a shared memory profiling support
12064 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12065 echo "configure:12066: checking whether to use profiling" >&5
12066 # Check whether --with-profiling-data or --without-profiling-data was given.
12067 if test "${with_profiling_data+set}" = set; then
12068   withval="$with_profiling_data"
12069    case "$withval" in
12070   yes)
12071     echo "$ac_t""yes" 1>&6
12072     cat >> confdefs.h <<\EOF
12073 #define WITH_PROFILE 1
12074 EOF
12075
12076     ;;
12077   *)
12078     echo "$ac_t""no" 1>&6
12079     ;;
12080   esac 
12081 else
12082   echo "$ac_t""no" 1>&6
12083
12084 fi
12085
12086
12087
12088 #################################################
12089 # check for experimental disk-quotas support
12090 QUOTAOBJS=smbd/noquotas.o
12091
12092 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12093 echo "configure:12094: checking whether to support disk-quotas" >&5
12094 # Check whether --with-quotas or --without-quotas was given.
12095 if test "${with_quotas+set}" = set; then
12096   withval="$with_quotas"
12097    case "$withval" in
12098   yes)
12099     echo "$ac_t""yes" 1>&6
12100     case "$host_os" in
12101       *linux*)
12102         # Check for kernel 2.4.x quota braindamage...
12103         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12104 echo "configure:12105: checking for linux 2.4.x quota braindamage.." >&5
12105 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12106   echo $ac_n "(cached) $ac_c" 1>&6
12107 else
12108   
12109         cat > conftest.$ac_ext <<EOF
12110 #line 12111 "configure"
12111 #include "confdefs.h"
12112 #include <stdio.h>
12113 #include <sys/types.h>
12114 #include <asm/types.h>
12115 #include <linux/quota.h>
12116 #include <mntent.h>
12117 #include <linux/unistd.h>
12118 int main() {
12119 struct mem_dqblk D;
12120 ; return 0; }
12121 EOF
12122 if { (eval echo configure:12123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12123   rm -rf conftest*
12124   samba_cv_linux_2_4_quota_braindamage=yes
12125 else
12126   echo "configure: failed program was:" >&5
12127   cat conftest.$ac_ext >&5
12128   rm -rf conftest*
12129   samba_cv_linux_2_4_quota_braindamage=no
12130 fi
12131 rm -f conftest*
12132 fi
12133
12134 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12135 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12136         cat >> confdefs.h <<\EOF
12137 #define LINUX_QUOTAS_2 1
12138 EOF
12139
12140 else
12141         cat >> confdefs.h <<\EOF
12142 #define LINUX_QUOTAS_1 1
12143 EOF
12144
12145 fi
12146         ;;
12147       *)
12148         ;;
12149     esac
12150     QUOTAOBJS=smbd/quotas.o
12151     cat >> confdefs.h <<\EOF
12152 #define WITH_QUOTAS 1
12153 EOF
12154
12155     ;;
12156   *)
12157     echo "$ac_t""no" 1>&6
12158     ;;
12159   esac 
12160 else
12161   echo "$ac_t""no" 1>&6
12162
12163 fi
12164
12165
12166
12167 #################################################
12168 # check for experimental utmp accounting
12169
12170 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12171 echo "configure:12172: checking whether to support utmp accounting" >&5
12172 # Check whether --with-utmp or --without-utmp was given.
12173 if test "${with_utmp+set}" = set; then
12174   withval="$with_utmp"
12175    case "$withval" in
12176   yes)
12177     echo "$ac_t""yes" 1>&6
12178     cat >> confdefs.h <<\EOF
12179 #define WITH_UTMP 1
12180 EOF
12181
12182     ;;
12183   *)
12184     echo "$ac_t""no" 1>&6
12185     ;;
12186   esac 
12187 else
12188   echo "$ac_t""no" 1>&6
12189
12190 fi
12191
12192
12193 #################################################
12194 # set private directory location
12195 # Check whether --with-privatedir or --without-privatedir was given.
12196 if test "${with_privatedir+set}" = set; then
12197   withval="$with_privatedir"
12198    case "$withval" in
12199   yes|no)
12200   #
12201   # Just in case anybody calls it without argument
12202   #
12203     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12204     privatedir='${prefix}/private'
12205   ;;
12206   * )
12207     privatedir="$withval"
12208     ;;
12209   esac
12210   
12211 else
12212   privatedir='${prefix}/private'
12213    
12214
12215 fi
12216
12217
12218 #################################################
12219 # set lock directory location
12220 # Check whether --with-lockdir or --without-lockdir was given.
12221 if test "${with_lockdir+set}" = set; then
12222   withval="$with_lockdir"
12223    case "$withval" in
12224   yes|no)
12225   #
12226   # Just in case anybody calls it without argument
12227   #
12228     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12229     lockdir='$(VARDIR)/locks'
12230   ;;
12231   * )
12232     lockdir="$withval"
12233     ;;
12234   esac
12235   
12236 else
12237   lockdir='$(VARDIR)/locks'
12238    
12239
12240 fi
12241
12242
12243 #################################################
12244 # set SWAT directory location
12245 # Check whether --with-swatdir or --without-swatdir was given.
12246 if test "${with_swatdir+set}" = set; then
12247   withval="$with_swatdir"
12248    case "$withval" in
12249   yes|no)
12250   #
12251   # Just in case anybody does it
12252   #
12253     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12254     swatdir='${prefix}/swat'
12255   ;;
12256   * )
12257     swatdir="$withval"
12258     ;;
12259   esac
12260   
12261 else
12262   swatdir='${prefix}/swat'
12263    
12264
12265 fi
12266
12267
12268 #################################################
12269 # choose native language(s) of man pages
12270 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12271 echo "configure:12272: checking chosen man pages' language(s)" >&5
12272 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12273 if test "${with_manpages_langs+set}" = set; then
12274   withval="$with_manpages_langs"
12275    case "$withval" in
12276   yes|no)
12277     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12278     manlangs="en"
12279   ;;
12280   *)
12281     manlangs="$withval"
12282   ;;
12283   esac
12284
12285   echo "$ac_t""$manlangs" 1>&6
12286   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12287   
12288 else
12289   manlangs="en"
12290   echo "$ac_t""$manlangs" 1>&6
12291   
12292
12293 fi
12294
12295
12296 #################################################
12297 # these tests are taken from the GNU fileutils package
12298 echo "checking how to get filesystem space usage" 1>&6
12299 echo "configure:12300: checking how to get filesystem space usage" >&5
12300 space=no
12301
12302 # Test for statvfs64.
12303 if test $space = no; then
12304   # SVR4
12305   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12306 echo "configure:12307: checking statvfs64 function (SVR4)" >&5
12307 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12308   echo $ac_n "(cached) $ac_c" 1>&6
12309 else
12310   if test "$cross_compiling" = yes; then
12311   fu_cv_sys_stat_statvfs64=cross
12312 else
12313   cat > conftest.$ac_ext <<EOF
12314 #line 12315 "configure"
12315 #include "confdefs.h"
12316
12317 #if defined(HAVE_UNISTD_H)
12318 #include <unistd.h>
12319 #endif
12320 #include <sys/types.h>
12321 #include <sys/statvfs.h>
12322   main ()
12323   {
12324     struct statvfs64 fsd;
12325     exit (statvfs64 (".", &fsd));
12326   }
12327 EOF
12328 if { (eval echo configure:12329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12329 then
12330   fu_cv_sys_stat_statvfs64=yes
12331 else
12332   echo "configure: failed program was:" >&5
12333   cat conftest.$ac_ext >&5
12334   rm -fr conftest*
12335   fu_cv_sys_stat_statvfs64=no
12336 fi
12337 rm -fr conftest*
12338 fi
12339
12340 fi
12341
12342 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12343   if test $fu_cv_sys_stat_statvfs64 = yes; then
12344     space=yes
12345     cat >> confdefs.h <<\EOF
12346 #define STAT_STATVFS64 1
12347 EOF
12348
12349   fi
12350 fi
12351
12352 # Perform only the link test since it seems there are no variants of the
12353 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12354 # because that got a false positive on SCO OSR5.  Adding the declaration
12355 # of a `struct statvfs' causes this test to fail (as it should) on such
12356 # systems.  That system is reported to work fine with STAT_STATFS4 which
12357 # is what it gets when this test fails.
12358 if test $space = no; then
12359   # SVR4
12360   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12361 echo "configure:12362: checking statvfs function (SVR4)" >&5
12362 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12363   echo $ac_n "(cached) $ac_c" 1>&6
12364 else
12365   cat > conftest.$ac_ext <<EOF
12366 #line 12367 "configure"
12367 #include "confdefs.h"
12368 #include <sys/types.h>
12369 #include <sys/statvfs.h>
12370 int main() {
12371 struct statvfs fsd; statvfs (0, &fsd);
12372 ; return 0; }
12373 EOF
12374 if { (eval echo configure:12375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12375   rm -rf conftest*
12376   fu_cv_sys_stat_statvfs=yes
12377 else
12378   echo "configure: failed program was:" >&5
12379   cat conftest.$ac_ext >&5
12380   rm -rf conftest*
12381   fu_cv_sys_stat_statvfs=no
12382 fi
12383 rm -f conftest*
12384 fi
12385
12386 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12387   if test $fu_cv_sys_stat_statvfs = yes; then
12388     space=yes
12389     cat >> confdefs.h <<\EOF
12390 #define STAT_STATVFS 1
12391 EOF
12392
12393   fi
12394 fi
12395
12396 if test $space = no; then
12397   # DEC Alpha running OSF/1
12398   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12399 echo "configure:12400: checking for 3-argument statfs function (DEC OSF/1)" >&5
12400   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12401   echo $ac_n "(cached) $ac_c" 1>&6
12402 else
12403   if test "$cross_compiling" = yes; then
12404   fu_cv_sys_stat_statfs3_osf1=no
12405 else
12406   cat > conftest.$ac_ext <<EOF
12407 #line 12408 "configure"
12408 #include "confdefs.h"
12409
12410 #include <sys/param.h>
12411 #include <sys/types.h>
12412 #include <sys/mount.h>
12413   main ()
12414   {
12415     struct statfs fsd;
12416     fsd.f_fsize = 0;
12417     exit (statfs (".", &fsd, sizeof (struct statfs)));
12418   }
12419 EOF
12420 if { (eval echo configure:12421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12421 then
12422   fu_cv_sys_stat_statfs3_osf1=yes
12423 else
12424   echo "configure: failed program was:" >&5
12425   cat conftest.$ac_ext >&5
12426   rm -fr conftest*
12427   fu_cv_sys_stat_statfs3_osf1=no
12428 fi
12429 rm -fr conftest*
12430 fi
12431
12432 fi
12433
12434   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12435   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12436     space=yes
12437     cat >> confdefs.h <<\EOF
12438 #define STAT_STATFS3_OSF1 1
12439 EOF
12440
12441   fi
12442 fi
12443
12444 if test $space = no; then
12445 # AIX
12446   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12447 echo "configure:12448: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12448   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12449   echo $ac_n "(cached) $ac_c" 1>&6
12450 else
12451   if test "$cross_compiling" = yes; then
12452   fu_cv_sys_stat_statfs2_bsize=no
12453 else
12454   cat > conftest.$ac_ext <<EOF
12455 #line 12456 "configure"
12456 #include "confdefs.h"
12457
12458 #ifdef HAVE_SYS_PARAM_H
12459 #include <sys/param.h>
12460 #endif
12461 #ifdef HAVE_SYS_MOUNT_H
12462 #include <sys/mount.h>
12463 #endif
12464 #ifdef HAVE_SYS_VFS_H
12465 #include <sys/vfs.h>
12466 #endif
12467   main ()
12468   {
12469   struct statfs fsd;
12470   fsd.f_bsize = 0;
12471   exit (statfs (".", &fsd));
12472   }
12473 EOF
12474 if { (eval echo configure:12475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12475 then
12476   fu_cv_sys_stat_statfs2_bsize=yes
12477 else
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -fr conftest*
12481   fu_cv_sys_stat_statfs2_bsize=no
12482 fi
12483 rm -fr conftest*
12484 fi
12485
12486 fi
12487
12488   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12489   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12490     space=yes
12491     cat >> confdefs.h <<\EOF
12492 #define STAT_STATFS2_BSIZE 1
12493 EOF
12494
12495   fi
12496 fi
12497
12498 if test $space = no; then
12499 # SVR3
12500   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12501 echo "configure:12502: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12502   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12503   echo $ac_n "(cached) $ac_c" 1>&6
12504 else
12505   if test "$cross_compiling" = yes; then
12506   fu_cv_sys_stat_statfs4=no
12507 else
12508   cat > conftest.$ac_ext <<EOF
12509 #line 12510 "configure"
12510 #include "confdefs.h"
12511 #include <sys/types.h>
12512 #include <sys/statfs.h>
12513   main ()
12514   {
12515   struct statfs fsd;
12516   exit (statfs (".", &fsd, sizeof fsd, 0));
12517   }
12518 EOF
12519 if { (eval echo configure:12520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12520 then
12521   fu_cv_sys_stat_statfs4=yes
12522 else
12523   echo "configure: failed program was:" >&5
12524   cat conftest.$ac_ext >&5
12525   rm -fr conftest*
12526   fu_cv_sys_stat_statfs4=no
12527 fi
12528 rm -fr conftest*
12529 fi
12530
12531 fi
12532
12533   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12534   if test $fu_cv_sys_stat_statfs4 = yes; then
12535     space=yes
12536     cat >> confdefs.h <<\EOF
12537 #define STAT_STATFS4 1
12538 EOF
12539
12540   fi
12541 fi
12542
12543 if test $space = no; then
12544 # 4.4BSD and NetBSD
12545   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12546 echo "configure:12547: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12547   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12548   echo $ac_n "(cached) $ac_c" 1>&6
12549 else
12550   if test "$cross_compiling" = yes; then
12551   fu_cv_sys_stat_statfs2_fsize=no
12552 else
12553   cat > conftest.$ac_ext <<EOF
12554 #line 12555 "configure"
12555 #include "confdefs.h"
12556 #include <sys/types.h>
12557 #ifdef HAVE_SYS_PARAM_H
12558 #include <sys/param.h>
12559 #endif
12560 #ifdef HAVE_SYS_MOUNT_H
12561 #include <sys/mount.h>
12562 #endif
12563   main ()
12564   {
12565   struct statfs fsd;
12566   fsd.f_fsize = 0;
12567   exit (statfs (".", &fsd));
12568   }
12569 EOF
12570 if { (eval echo configure:12571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12571 then
12572   fu_cv_sys_stat_statfs2_fsize=yes
12573 else
12574   echo "configure: failed program was:" >&5
12575   cat conftest.$ac_ext >&5
12576   rm -fr conftest*
12577   fu_cv_sys_stat_statfs2_fsize=no
12578 fi
12579 rm -fr conftest*
12580 fi
12581
12582 fi
12583
12584   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12585   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12586     space=yes
12587     cat >> confdefs.h <<\EOF
12588 #define STAT_STATFS2_FSIZE 1
12589 EOF
12590
12591   fi
12592 fi
12593
12594 if test $space = no; then
12595   # Ultrix
12596   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12597 echo "configure:12598: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12598   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12599   echo $ac_n "(cached) $ac_c" 1>&6
12600 else
12601   if test "$cross_compiling" = yes; then
12602   fu_cv_sys_stat_fs_data=no
12603 else
12604   cat > conftest.$ac_ext <<EOF
12605 #line 12606 "configure"
12606 #include "confdefs.h"
12607 #include <sys/types.h>
12608 #ifdef HAVE_SYS_PARAM_H
12609 #include <sys/param.h>
12610 #endif
12611 #ifdef HAVE_SYS_MOUNT_H
12612 #include <sys/mount.h>
12613 #endif
12614 #ifdef HAVE_SYS_FS_TYPES_H
12615 #include <sys/fs_types.h>
12616 #endif
12617   main ()
12618   {
12619   struct fs_data fsd;
12620   /* Ultrix's statfs returns 1 for success,
12621      0 for not mounted, -1 for failure.  */
12622   exit (statfs (".", &fsd) != 1);
12623   }
12624 EOF
12625 if { (eval echo configure:12626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12626 then
12627   fu_cv_sys_stat_fs_data=yes
12628 else
12629   echo "configure: failed program was:" >&5
12630   cat conftest.$ac_ext >&5
12631   rm -fr conftest*
12632   fu_cv_sys_stat_fs_data=no
12633 fi
12634 rm -fr conftest*
12635 fi
12636
12637 fi
12638
12639   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12640   if test $fu_cv_sys_stat_fs_data = yes; then
12641     space=yes
12642     cat >> confdefs.h <<\EOF
12643 #define STAT_STATFS2_FS_DATA 1
12644 EOF
12645
12646   fi
12647 fi
12648
12649 #
12650 # As a gating factor for large file support, in order to
12651 # use <4GB files we must have the following minimal support
12652 # available.
12653 # long long, and a 64 bit off_t or off64_t.
12654 # If we don't have all of these then disable large
12655 # file support.
12656 #
12657 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12658 echo "configure:12659: checking if large file support can be enabled" >&5
12659 cat > conftest.$ac_ext <<EOF
12660 #line 12661 "configure"
12661 #include "confdefs.h"
12662
12663 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12664 #include <sys/types.h>
12665 #else
12666 __COMPILE_ERROR_
12667 #endif
12668
12669 int main() {
12670 int i
12671 ; return 0; }
12672 EOF
12673 if { (eval echo configure:12674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12674   rm -rf conftest*
12675   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12676 else
12677   echo "configure: failed program was:" >&5
12678   cat conftest.$ac_ext >&5
12679   rm -rf conftest*
12680   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12681 fi
12682 rm -f conftest*
12683 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12684     cat >> confdefs.h <<\EOF
12685 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12686 EOF
12687
12688 fi
12689 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12690
12691 # Check whether --with-spinlocks or --without-spinlocks was given.
12692 if test "${with_spinlocks+set}" = set; then
12693   withval="$with_spinlocks"
12694   :
12695 fi
12696
12697 if test "x$with_spinlocks" = "xyes"; then
12698     cat >> confdefs.h <<\EOF
12699 #define USE_SPINLOCKS 1
12700 EOF
12701
12702
12703     case "$host_cpu" in
12704         sparc)
12705             cat >> confdefs.h <<\EOF
12706 #define SPARC_SPINLOCKS 1
12707 EOF
12708
12709             ;;
12710
12711         i386|i486|i586|i686)
12712             cat >> confdefs.h <<\EOF
12713 #define INTEL_SPINLOCKS 1
12714 EOF
12715
12716             ;;
12717
12718         mips)
12719             cat >> confdefs.h <<\EOF
12720 #define MIPS_SPINLOCKS 1
12721 EOF
12722
12723             ;;
12724
12725         powerpc)
12726             cat >> confdefs.h <<\EOF
12727 #define POWERPC_SPINLOCKS 1
12728 EOF
12729
12730             ;;
12731     esac
12732 fi
12733
12734 #################################################
12735 # check for ACL support
12736
12737 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12738 echo "configure:12739: checking whether to support ACLs" >&5
12739 # Check whether --with-acl-support or --without-acl-support was given.
12740 if test "${with_acl_support+set}" = set; then
12741   withval="$with_acl_support"
12742    case "$withval" in
12743   yes)
12744
12745         case "$host_os" in
12746         *sysv5*)
12747             echo "$ac_t""Using UnixWare ACLs" 1>&6
12748             cat >> confdefs.h <<\EOF
12749 #define HAVE_UNIXWARE_ACLS 1
12750 EOF
12751
12752             ;;
12753         *solaris*)
12754             echo "$ac_t""Using solaris ACLs" 1>&6
12755             cat >> confdefs.h <<\EOF
12756 #define HAVE_SOLARIS_ACLS 1
12757 EOF
12758
12759             ;;
12760                 *irix*)
12761                         echo "$ac_t""Using IRIX ACLs" 1>&6
12762                         cat >> confdefs.h <<\EOF
12763 #define HAVE_IRIX_ACLS 1
12764 EOF
12765
12766                         ;;
12767                 *aix*)
12768                         echo "$ac_t""Using AIX ACLs" 1>&6
12769                         cat >> confdefs.h <<\EOF
12770 #define HAVE_AIX_ACLS 1
12771 EOF
12772
12773                         ;;
12774                 *osf*)
12775                         echo "$ac_t""Using Tru64 ACLs" 1>&6
12776                         cat >> confdefs.h <<\EOF
12777 #define HAVE_TRU64_ACLS 1
12778 EOF
12779
12780                         LIBS="$LIBS -lpacl"
12781                         ;;
12782         *)
12783                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12784 echo "configure:12785: checking for acl_get_file in -lacl" >&5
12785 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12786 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12787   echo $ac_n "(cached) $ac_c" 1>&6
12788 else
12789   ac_save_LIBS="$LIBS"
12790 LIBS="-lacl  $LIBS"
12791 cat > conftest.$ac_ext <<EOF
12792 #line 12793 "configure"
12793 #include "confdefs.h"
12794 /* Override any gcc2 internal prototype to avoid an error.  */
12795 /* We use char because int might match the return type of a gcc2
12796     builtin and then its argument prototype would still apply.  */
12797 char acl_get_file();
12798
12799 int main() {
12800 acl_get_file()
12801 ; return 0; }
12802 EOF
12803 if { (eval echo configure:12804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12804   rm -rf conftest*
12805   eval "ac_cv_lib_$ac_lib_var=yes"
12806 else
12807   echo "configure: failed program was:" >&5
12808   cat conftest.$ac_ext >&5
12809   rm -rf conftest*
12810   eval "ac_cv_lib_$ac_lib_var=no"
12811 fi
12812 rm -f conftest*
12813 LIBS="$ac_save_LIBS"
12814
12815 fi
12816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12817   echo "$ac_t""yes" 1>&6
12818     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12819     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12820   cat >> confdefs.h <<EOF
12821 #define $ac_tr_lib 1
12822 EOF
12823
12824   LIBS="-lacl $LIBS"
12825
12826 else
12827   echo "$ac_t""no" 1>&6
12828 fi
12829
12830                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12831 echo "configure:12832: checking for ACL support" >&5
12832 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12833   echo $ac_n "(cached) $ac_c" 1>&6
12834 else
12835   
12836                         cat > conftest.$ac_ext <<EOF
12837 #line 12838 "configure"
12838 #include "confdefs.h"
12839 #include <sys/types.h>
12840 #include <sys/acl.h>
12841 int main() {
12842  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12843 ; return 0; }
12844 EOF
12845 if { (eval echo configure:12846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12846   rm -rf conftest*
12847   samba_cv_HAVE_POSIX_ACLS=yes
12848 else
12849   echo "configure: failed program was:" >&5
12850   cat conftest.$ac_ext >&5
12851   rm -rf conftest*
12852   samba_cv_HAVE_POSIX_ACLS=no
12853 fi
12854 rm -f conftest*
12855 fi
12856
12857 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12858                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12859                                 echo "$ac_t""Using posix ACLs" 1>&6
12860                                 cat >> confdefs.h <<\EOF
12861 #define HAVE_POSIX_ACLS 1
12862 EOF
12863
12864                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12865 echo "configure:12866: checking for acl_get_perm_np" >&5
12866 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12867   echo $ac_n "(cached) $ac_c" 1>&6
12868 else
12869   
12870                                 cat > conftest.$ac_ext <<EOF
12871 #line 12872 "configure"
12872 #include "confdefs.h"
12873 #include <sys/types.h>
12874 #include <sys/acl.h>
12875 int main() {
12876  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12877 ; return 0; }
12878 EOF
12879 if { (eval echo configure:12880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12880   rm -rf conftest*
12881   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12882 else
12883   echo "configure: failed program was:" >&5
12884   cat conftest.$ac_ext >&5
12885   rm -rf conftest*
12886   samba_cv_HAVE_ACL_GET_PERM_NP=no
12887 fi
12888 rm -f conftest*
12889 fi
12890
12891 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12892                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12893                                         cat >> confdefs.h <<\EOF
12894 #define HAVE_ACL_GET_PERM_NP 1
12895 EOF
12896
12897                                 fi
12898                         fi
12899             ;;
12900         esac
12901         ;;
12902   *)
12903     echo "$ac_t""no" 1>&6
12904     cat >> confdefs.h <<\EOF
12905 #define HAVE_NO_ACLS 1
12906 EOF
12907
12908     ;;
12909   esac 
12910 else
12911   cat >> confdefs.h <<\EOF
12912 #define HAVE_NO_ACLS 1
12913 EOF
12914
12915   echo "$ac_t""no" 1>&6
12916
12917 fi
12918
12919
12920 #################################################
12921 # Check whether winbind is supported on this platform.  If so we need to
12922 # build and install client programs (WINBIND_TARGETS), sbin programs
12923 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
12924
12925 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
12926 echo "configure:12927: checking whether to build winbind" >&5
12927
12928 # Initially, the value of $host_os decides whether winbind is supported
12929
12930 case "$host_os" in 
12931         *linux*|*solaris*)
12932                 HAVE_WINBIND=yes
12933                 ;;
12934         *)
12935                 HAVE_WINBIND=no
12936                 winbind_no_reason=", unsupported on $host_os"
12937                 ;;
12938 esac
12939
12940 # Check the setting of --with-winbindd
12941
12942 # Check whether --with-winbind or --without-winbind was given.
12943 if test "${with_winbind+set}" = set; then
12944   withval="$with_winbind"
12945    
12946   case "$withval" in
12947         yes)
12948                 HAVE_WINBIND=yes
12949                 ;;
12950         no)
12951                 HAVE_WINBIND=no
12952                 winbind_reason=""
12953                 ;;
12954   esac 
12955 fi
12956
12957
12958 # We need unix domain sockets for winbind
12959
12960 if test x"$HAVE_WINBIND" = x"yes"; then
12961         if test x"$samba_cv_unixsocket" = x"no"; then
12962                 winbind_no_reason=", no unix domain socket support on $host_os"
12963                 HAVE_WINBIND=no
12964         fi
12965 fi
12966
12967 # Display test results
12968
12969 if test x"$HAVE_WINBIND" = x"yes"; then
12970
12971         echo "$ac_t""yes" 1>&6
12972
12973         WINBIND_TARGETS="\$(WINBIND_PROGS)"
12974         WINBIND_STARGETS="\$(WINBIND_SPROGS)"
12975         WINBIND_LTARGETS="\$(WINBIND_LPROGS)"
12976         case "$with_pam" in
12977                 yes)
12978                         WINBIND_PAM_PROGS="\$(WINBIND_PAM_PROGS)"
12979                 ;;
12980         esac
12981 else
12982         echo "$ac_t""no$winbind_no_reason" 1>&6
12983
12984         WINBIND_TARGETS=""
12985         WINBIND_STARGETS=""
12986         WINBIND_LTARGETS=""
12987         WINBIND_PAM_PROGS=""
12988 fi
12989
12990 # Substitution time!
12991
12992
12993
12994
12995
12996
12997 #################################################
12998 # Check to see if we should use the included popt 
12999
13000 # Check whether --with-included-popt or --without-included-popt was given.
13001 if test "${with_included_popt+set}" = set; then
13002   withval="$with_included_popt"
13003    
13004   case "$withval" in
13005         yes)
13006                 INCLUDED_POPT=yes
13007                 ;;
13008         no)
13009                 INCLUDED_POPT=no
13010                 ;;
13011   esac 
13012 fi
13013
13014 if test x"$INCLUDED_POPT" != x"yes"; then
13015     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13016 echo "configure:13017: checking for poptGetContext in -lpopt" >&5
13017 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13018 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13019   echo $ac_n "(cached) $ac_c" 1>&6
13020 else
13021   ac_save_LIBS="$LIBS"
13022 LIBS="-lpopt  $LIBS"
13023 cat > conftest.$ac_ext <<EOF
13024 #line 13025 "configure"
13025 #include "confdefs.h"
13026 /* Override any gcc2 internal prototype to avoid an error.  */
13027 /* We use char because int might match the return type of a gcc2
13028     builtin and then its argument prototype would still apply.  */
13029 char poptGetContext();
13030
13031 int main() {
13032 poptGetContext()
13033 ; return 0; }
13034 EOF
13035 if { (eval echo configure:13036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13036   rm -rf conftest*
13037   eval "ac_cv_lib_$ac_lib_var=yes"
13038 else
13039   echo "configure: failed program was:" >&5
13040   cat conftest.$ac_ext >&5
13041   rm -rf conftest*
13042   eval "ac_cv_lib_$ac_lib_var=no"
13043 fi
13044 rm -f conftest*
13045 LIBS="$ac_save_LIBS"
13046
13047 fi
13048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13049   echo "$ac_t""yes" 1>&6
13050   INCLUDED_POPT=no
13051 else
13052   echo "$ac_t""no" 1>&6
13053 INCLUDED_POPT=yes
13054 fi
13055
13056 fi
13057
13058 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13059 echo "configure:13060: checking whether to use included popt" >&5
13060 if test x"$INCLUDED_POPT" = x"yes"; then
13061     echo "$ac_t""$srcdir/popt" 1>&6
13062     BUILD_POPT='$(POPT_OBJS)'
13063     CFLAGS="$CFLAGS -I$srcdir/popt"
13064 else
13065     echo "$ac_t""no" 1>&6
13066     LIBS="$LIBS -lpopt"
13067 fi
13068
13069
13070 #################################################
13071 # final configure stuff
13072
13073 echo "checking configure summary"
13074 if test "$cross_compiling" = yes; then
13075   :
13076 else
13077   cat > conftest.$ac_ext <<EOF
13078 #line 13079 "configure"
13079 #include "confdefs.h"
13080 #include "${srcdir-.}/tests/summary.c"
13081 EOF
13082 if { (eval echo configure:13083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13083 then
13084   echo "configure OK";
13085 else
13086   echo "configure: failed program was:" >&5
13087   cat conftest.$ac_ext >&5
13088   rm -fr conftest*
13089   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13090 fi
13091 rm -fr conftest*
13092 fi
13093
13094
13095 builddir=`pwd`
13096
13097
13098 trap '' 1 2 15
13099 cat > confcache <<\EOF
13100 # This file is a shell script that caches the results of configure
13101 # tests run on this system so they can be shared between configure
13102 # scripts and configure runs.  It is not useful on other systems.
13103 # If it contains results you don't want to keep, you may remove or edit it.
13104 #
13105 # By default, configure uses ./config.cache as the cache file,
13106 # creating it if it does not exist already.  You can give configure
13107 # the --cache-file=FILE option to use a different cache file; that is
13108 # what configure does when it calls configure scripts in
13109 # subdirectories, so they share the cache.
13110 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13111 # config.status only pays attention to the cache file if you give it the
13112 # --recheck option to rerun configure.
13113 #
13114 EOF
13115 # The following way of writing the cache mishandles newlines in values,
13116 # but we know of no workaround that is simple, portable, and efficient.
13117 # So, don't put newlines in cache variables' values.
13118 # Ultrix sh set writes to stderr and can't be redirected directly,
13119 # and sets the high bit in the cache file unless we assign to the vars.
13120 (set) 2>&1 |
13121   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13122   *ac_space=\ *)
13123     # `set' does not quote correctly, so add quotes (double-quote substitution
13124     # turns \\\\ into \\, and sed turns \\ into \).
13125     sed -n \
13126       -e "s/'/'\\\\''/g" \
13127       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13128     ;;
13129   *)
13130     # `set' quotes correctly as required by POSIX, so do not add quotes.
13131     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13132     ;;
13133   esac >> confcache
13134 if cmp -s $cache_file confcache; then
13135   :
13136 else
13137   if test -w $cache_file; then
13138     echo "updating cache $cache_file"
13139     cat confcache > $cache_file
13140   else
13141     echo "not updating unwritable cache $cache_file"
13142   fi
13143 fi
13144 rm -f confcache
13145
13146 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13147
13148 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13149 # Let make expand exec_prefix.
13150 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13151
13152 # Any assignment to VPATH causes Sun make to only execute
13153 # the first set of double-colon rules, so remove it if not needed.
13154 # If there is a colon in the path, we need to keep it.
13155 if test "x$srcdir" = x.; then
13156   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13157 fi
13158
13159 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13160
13161 DEFS=-DHAVE_CONFIG_H
13162
13163 # Without the "./", some shells look in PATH for config.status.
13164 : ${CONFIG_STATUS=./config.status}
13165
13166 echo creating $CONFIG_STATUS
13167 rm -f $CONFIG_STATUS
13168 cat > $CONFIG_STATUS <<EOF
13169 #! /bin/sh
13170 # Generated automatically by configure.
13171 # Run this file to recreate the current configuration.
13172 # This directory was configured as follows,
13173 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13174 #
13175 # $0 $ac_configure_args
13176 #
13177 # Compiler output produced by configure, useful for debugging
13178 # configure, is in ./config.log if it exists.
13179
13180 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13181 for ac_option
13182 do
13183   case "\$ac_option" in
13184   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13185     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13186     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13187   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13188     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13189     exit 0 ;;
13190   -help | --help | --hel | --he | --h)
13191     echo "\$ac_cs_usage"; exit 0 ;;
13192   *) echo "\$ac_cs_usage"; exit 1 ;;
13193   esac
13194 done
13195
13196 ac_given_srcdir=$srcdir
13197 ac_given_INSTALL="$INSTALL"
13198
13199 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13200 EOF
13201 cat >> $CONFIG_STATUS <<EOF
13202
13203 # Protect against being on the right side of a sed subst in config.status.
13204 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13205  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13206 $ac_vpsub
13207 $extrasub
13208 s%@SHELL@%$SHELL%g
13209 s%@CFLAGS@%$CFLAGS%g
13210 s%@CPPFLAGS@%$CPPFLAGS%g
13211 s%@CXXFLAGS@%$CXXFLAGS%g
13212 s%@FFLAGS@%$FFLAGS%g
13213 s%@DEFS@%$DEFS%g
13214 s%@LDFLAGS@%$LDFLAGS%g
13215 s%@LIBS@%$LIBS%g
13216 s%@exec_prefix@%$exec_prefix%g
13217 s%@prefix@%$prefix%g
13218 s%@program_transform_name@%$program_transform_name%g
13219 s%@bindir@%$bindir%g
13220 s%@sbindir@%$sbindir%g
13221 s%@libexecdir@%$libexecdir%g
13222 s%@datadir@%$datadir%g
13223 s%@sysconfdir@%$sysconfdir%g
13224 s%@sharedstatedir@%$sharedstatedir%g
13225 s%@localstatedir@%$localstatedir%g
13226 s%@libdir@%$libdir%g
13227 s%@includedir@%$includedir%g
13228 s%@oldincludedir@%$oldincludedir%g
13229 s%@infodir@%$infodir%g
13230 s%@mandir@%$mandir%g
13231 s%@RUNPROG@%$RUNPROG%g
13232 s%@MPROGS@%$MPROGS%g
13233 s%@LDSHFLAGS@%$LDSHFLAGS%g
13234 s%@SHLD@%$SHLD%g
13235 s%@HOST_OS@%$HOST_OS%g
13236 s%@PAM_MOD@%$PAM_MOD%g
13237 s%@WRAP@%$WRAP%g
13238 s%@WRAP32@%$WRAP32%g
13239 s%@PICFLAG@%$PICFLAG%g
13240 s%@PICSUFFIX@%$PICSUFFIX%g
13241 s%@POBAD_CC@%$POBAD_CC%g
13242 s%@SHLIBEXT@%$SHLIBEXT%g
13243 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13244 s%@CC@%$CC%g
13245 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13246 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13247 s%@INSTALL_DATA@%$INSTALL_DATA%g
13248 s%@AWK@%$AWK%g
13249 s%@BROKEN_CC@%$BROKEN_CC%g
13250 s%@host@%$host%g
13251 s%@host_alias@%$host_alias%g
13252 s%@host_cpu@%$host_cpu%g
13253 s%@host_vendor@%$host_vendor%g
13254 s%@host_os@%$host_os%g
13255 s%@target@%$target%g
13256 s%@target_alias@%$target_alias%g
13257 s%@target_cpu@%$target_cpu%g
13258 s%@target_vendor@%$target_vendor%g
13259 s%@target_os@%$target_os%g
13260 s%@build@%$build%g
13261 s%@build_alias@%$build_alias%g
13262 s%@build_cpu@%$build_cpu%g
13263 s%@build_vendor@%$build_vendor%g
13264 s%@build_os@%$build_os%g
13265 s%@CPP@%$CPP%g
13266 s%@LIBOBJS@%$LIBOBJS%g
13267 s%@TERMLIBS@%$TERMLIBS%g
13268 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13269 s%@ROFF@%$ROFF%g
13270 s%@QUOTAOBJS@%$QUOTAOBJS%g
13271 s%@privatedir@%$privatedir%g
13272 s%@lockdir@%$lockdir%g
13273 s%@swatdir@%$swatdir%g
13274 s%@manlangs@%$manlangs%g
13275 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13276 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13277 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13278 s%@WINBIND_PAM_PROGS@%$WINBIND_PAM_PROGS%g
13279 s%@BUILD_POPT@%$BUILD_POPT%g
13280 s%@builddir@%$builddir%g
13281
13282 CEOF
13283 EOF
13284
13285 cat >> $CONFIG_STATUS <<\EOF
13286
13287 # Split the substitutions into bite-sized pieces for seds with
13288 # small command number limits, like on Digital OSF/1 and HP-UX.
13289 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13290 ac_file=1 # Number of current file.
13291 ac_beg=1 # First line for current file.
13292 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13293 ac_more_lines=:
13294 ac_sed_cmds=""
13295 while $ac_more_lines; do
13296   if test $ac_beg -gt 1; then
13297     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13298   else
13299     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13300   fi
13301   if test ! -s conftest.s$ac_file; then
13302     ac_more_lines=false
13303     rm -f conftest.s$ac_file
13304   else
13305     if test -z "$ac_sed_cmds"; then
13306       ac_sed_cmds="sed -f conftest.s$ac_file"
13307     else
13308       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13309     fi
13310     ac_file=`expr $ac_file + 1`
13311     ac_beg=$ac_end
13312     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13313   fi
13314 done
13315 if test -z "$ac_sed_cmds"; then
13316   ac_sed_cmds=cat
13317 fi
13318 EOF
13319
13320 cat >> $CONFIG_STATUS <<EOF
13321
13322 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13323 EOF
13324 cat >> $CONFIG_STATUS <<\EOF
13325 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13326   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13327   case "$ac_file" in
13328   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13329        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13330   *) ac_file_in="${ac_file}.in" ;;
13331   esac
13332
13333   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13334
13335   # Remove last slash and all that follows it.  Not all systems have dirname.
13336   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13337   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13338     # The file is in a subdirectory.
13339     test ! -d "$ac_dir" && mkdir "$ac_dir"
13340     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13341     # A "../" for each directory in $ac_dir_suffix.
13342     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13343   else
13344     ac_dir_suffix= ac_dots=
13345   fi
13346
13347   case "$ac_given_srcdir" in
13348   .)  srcdir=.
13349       if test -z "$ac_dots"; then top_srcdir=.
13350       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13351   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13352   *) # Relative path.
13353     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13354     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13355   esac
13356
13357   case "$ac_given_INSTALL" in
13358   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13359   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13360   esac
13361
13362   echo creating "$ac_file"
13363   rm -f "$ac_file"
13364   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13365   case "$ac_file" in
13366   *Makefile*) ac_comsub="1i\\
13367 # $configure_input" ;;
13368   *) ac_comsub= ;;
13369   esac
13370
13371   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13372   sed -e "$ac_comsub
13373 s%@configure_input@%$configure_input%g
13374 s%@srcdir@%$srcdir%g
13375 s%@top_srcdir@%$top_srcdir%g
13376 s%@INSTALL@%$INSTALL%g
13377 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13378 fi; done
13379 rm -f conftest.s*
13380
13381 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13382 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13383 #
13384 # ac_d sets the value in "#define NAME VALUE" lines.
13385 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13386 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13387 ac_dC='\3'
13388 ac_dD='%g'
13389 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13390 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13391 ac_uB='\([      ]\)%\1#\2define\3'
13392 ac_uC=' '
13393 ac_uD='\4%g'
13394 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13395 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13396 ac_eB='$%\1#\2define\3'
13397 ac_eC=' '
13398 ac_eD='%g'
13399
13400 if test "${CONFIG_HEADERS+set}" != set; then
13401 EOF
13402 cat >> $CONFIG_STATUS <<EOF
13403   CONFIG_HEADERS="include/config.h"
13404 EOF
13405 cat >> $CONFIG_STATUS <<\EOF
13406 fi
13407 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13408   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13409   case "$ac_file" in
13410   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13411        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13412   *) ac_file_in="${ac_file}.in" ;;
13413   esac
13414
13415   echo creating $ac_file
13416
13417   rm -f conftest.frag conftest.in conftest.out
13418   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13419   cat $ac_file_inputs > conftest.in
13420
13421 EOF
13422
13423 # Transform confdefs.h into a sed script conftest.vals that substitutes
13424 # the proper values into config.h.in to produce config.h.  And first:
13425 # Protect against being on the right side of a sed subst in config.status.
13426 # Protect against being in an unquoted here document in config.status.
13427 rm -f conftest.vals
13428 cat > conftest.hdr <<\EOF
13429 s/[\\&%]/\\&/g
13430 s%[\\$`]%\\&%g
13431 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13432 s%ac_d%ac_u%gp
13433 s%ac_u%ac_e%gp
13434 EOF
13435 sed -n -f conftest.hdr confdefs.h > conftest.vals
13436 rm -f conftest.hdr
13437
13438 # This sed command replaces #undef with comments.  This is necessary, for
13439 # example, in the case of _POSIX_SOURCE, which is predefined and required
13440 # on some systems where configure will not decide to define it.
13441 cat >> conftest.vals <<\EOF
13442 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13443 EOF
13444
13445 # Break up conftest.vals because some shells have a limit on
13446 # the size of here documents, and old seds have small limits too.
13447
13448 rm -f conftest.tail
13449 while :
13450 do
13451   ac_lines=`grep -c . conftest.vals`
13452   # grep -c gives empty output for an empty file on some AIX systems.
13453   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13454   # Write a limited-size here document to conftest.frag.
13455   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13456   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13457   echo 'CEOF
13458   sed -f conftest.frag conftest.in > conftest.out
13459   rm -f conftest.in
13460   mv conftest.out conftest.in
13461 ' >> $CONFIG_STATUS
13462   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13463   rm -f conftest.vals
13464   mv conftest.tail conftest.vals
13465 done
13466 rm -f conftest.vals
13467
13468 cat >> $CONFIG_STATUS <<\EOF
13469   rm -f conftest.frag conftest.h
13470   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13471   cat conftest.in >> conftest.h
13472   rm -f conftest.in
13473   if cmp -s $ac_file conftest.h 2>/dev/null; then
13474     echo "$ac_file is unchanged"
13475     rm -f conftest.h
13476   else
13477     # Remove last slash and all that follows it.  Not all systems have dirname.
13478       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13479       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13480       # The file is in a subdirectory.
13481       test ! -d "$ac_dir" && mkdir "$ac_dir"
13482     fi
13483     rm -f $ac_file
13484     mv conftest.h $ac_file
13485   fi
13486 fi; done
13487
13488 EOF
13489 cat >> $CONFIG_STATUS <<EOF
13490
13491 EOF
13492 cat >> $CONFIG_STATUS <<\EOF
13493
13494 exit 0
13495 EOF
13496 chmod +x $CONFIG_STATUS
13497 rm -fr confdefs* $ac_clean_files
13498 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13499