Fix up the ./configure tests for kerberos. This ensures a more consistant
[ira/wip.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 gawk mawk 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 int main()
2528 {
2529   FILE *f=fopen("conftestval", "w");
2530   if (!f) return(1);
2531   fprintf(f, "%d\n", sizeof(int));
2532   return(0);
2533 }
2534 EOF
2535 if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2536 then
2537   ac_cv_sizeof_int=`cat conftestval`
2538 else
2539   echo "configure: failed program was:" >&5
2540   cat conftest.$ac_ext >&5
2541   rm -fr conftest*
2542   ac_cv_sizeof_int=0
2543 fi
2544 rm -fr conftest*
2545 fi
2546
2547 fi
2548 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2549 cat >> confdefs.h <<EOF
2550 #define SIZEOF_INT $ac_cv_sizeof_int
2551 EOF
2552
2553
2554 echo $ac_n "checking size of long""... $ac_c" 1>&6
2555 echo "configure:2556: checking size of long" >&5
2556 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2557   echo $ac_n "(cached) $ac_c" 1>&6
2558 else
2559   if test "$cross_compiling" = yes; then
2560   ac_cv_sizeof_long=cross
2561 else
2562   cat > conftest.$ac_ext <<EOF
2563 #line 2564 "configure"
2564 #include "confdefs.h"
2565 #include <stdio.h>
2566 int main()
2567 {
2568   FILE *f=fopen("conftestval", "w");
2569   if (!f) return(1);
2570   fprintf(f, "%d\n", sizeof(long));
2571   return(0);
2572 }
2573 EOF
2574 if { (eval echo configure:2575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2575 then
2576   ac_cv_sizeof_long=`cat conftestval`
2577 else
2578   echo "configure: failed program was:" >&5
2579   cat conftest.$ac_ext >&5
2580   rm -fr conftest*
2581   ac_cv_sizeof_long=0
2582 fi
2583 rm -fr conftest*
2584 fi
2585
2586 fi
2587 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2588 cat >> confdefs.h <<EOF
2589 #define SIZEOF_LONG $ac_cv_sizeof_long
2590 EOF
2591
2592
2593 echo $ac_n "checking size of short""... $ac_c" 1>&6
2594 echo "configure:2595: checking size of short" >&5
2595 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2596   echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598   if test "$cross_compiling" = yes; then
2599   ac_cv_sizeof_short=cross
2600 else
2601   cat > conftest.$ac_ext <<EOF
2602 #line 2603 "configure"
2603 #include "confdefs.h"
2604 #include <stdio.h>
2605 int main()
2606 {
2607   FILE *f=fopen("conftestval", "w");
2608   if (!f) return(1);
2609   fprintf(f, "%d\n", sizeof(short));
2610   return(0);
2611 }
2612 EOF
2613 if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2614 then
2615   ac_cv_sizeof_short=`cat conftestval`
2616 else
2617   echo "configure: failed program was:" >&5
2618   cat conftest.$ac_ext >&5
2619   rm -fr conftest*
2620   ac_cv_sizeof_short=0
2621 fi
2622 rm -fr conftest*
2623 fi
2624
2625 fi
2626 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2627 cat >> confdefs.h <<EOF
2628 #define SIZEOF_SHORT $ac_cv_sizeof_short
2629 EOF
2630
2631
2632
2633 echo $ac_n "checking for working const""... $ac_c" 1>&6
2634 echo "configure:2635: checking for working const" >&5
2635 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2636   echo $ac_n "(cached) $ac_c" 1>&6
2637 else
2638   cat > conftest.$ac_ext <<EOF
2639 #line 2640 "configure"
2640 #include "confdefs.h"
2641
2642 int main() {
2643
2644 /* Ultrix mips cc rejects this.  */
2645 typedef int charset[2]; const charset x;
2646 /* SunOS 4.1.1 cc rejects this.  */
2647 char const *const *ccp;
2648 char **p;
2649 /* NEC SVR4.0.2 mips cc rejects this.  */
2650 struct point {int x, y;};
2651 static struct point const zero = {0,0};
2652 /* AIX XL C 1.02.0.0 rejects this.
2653    It does not let you subtract one const X* pointer from another in an arm
2654    of an if-expression whose if-part is not a constant expression */
2655 const char *g = "string";
2656 ccp = &g + (g ? g-g : 0);
2657 /* HPUX 7.0 cc rejects these. */
2658 ++ccp;
2659 p = (char**) ccp;
2660 ccp = (char const *const *) p;
2661 { /* SCO 3.2v4 cc rejects this.  */
2662   char *t;
2663   char const *s = 0 ? (char *) 0 : (char const *) 0;
2664
2665   *t++ = 0;
2666 }
2667 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2668   int x[] = {25, 17};
2669   const int *foo = &x[0];
2670   ++foo;
2671 }
2672 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2673   typedef const int *iptr;
2674   iptr p = 0;
2675   ++p;
2676 }
2677 { /* AIX XL C 1.02.0.0 rejects this saying
2678      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2679   struct s { int j; const int *ap[3]; };
2680   struct s *b; b->j = 5;
2681 }
2682 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2683   const int foo = 10;
2684 }
2685
2686 ; return 0; }
2687 EOF
2688 if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2689   rm -rf conftest*
2690   ac_cv_c_const=yes
2691 else
2692   echo "configure: failed program was:" >&5
2693   cat conftest.$ac_ext >&5
2694   rm -rf conftest*
2695   ac_cv_c_const=no
2696 fi
2697 rm -f conftest*
2698 fi
2699
2700 echo "$ac_t""$ac_cv_c_const" 1>&6
2701 if test $ac_cv_c_const = no; then
2702   cat >> confdefs.h <<\EOF
2703 #define const 
2704 EOF
2705
2706 fi
2707
2708 echo $ac_n "checking for inline""... $ac_c" 1>&6
2709 echo "configure:2710: checking for inline" >&5
2710 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2711   echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713   ac_cv_c_inline=no
2714 for ac_kw in inline __inline__ __inline; do
2715   cat > conftest.$ac_ext <<EOF
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718
2719 int main() {
2720 } $ac_kw foo() {
2721 ; return 0; }
2722 EOF
2723 if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2724   rm -rf conftest*
2725   ac_cv_c_inline=$ac_kw; break
2726 else
2727   echo "configure: failed program was:" >&5
2728   cat conftest.$ac_ext >&5
2729 fi
2730 rm -f conftest*
2731 done
2732
2733 fi
2734
2735 echo "$ac_t""$ac_cv_c_inline" 1>&6
2736 case "$ac_cv_c_inline" in
2737   inline | yes) ;;
2738   no) cat >> confdefs.h <<\EOF
2739 #define inline 
2740 EOF
2741  ;;
2742   *)  cat >> confdefs.h <<EOF
2743 #define inline $ac_cv_c_inline
2744 EOF
2745  ;;
2746 esac
2747
2748 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2749 echo "configure:2750: checking whether byte ordering is bigendian" >&5
2750 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2751   echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753   ac_cv_c_bigendian=unknown
2754 # See if sys/param.h defines the BYTE_ORDER macro.
2755 cat > conftest.$ac_ext <<EOF
2756 #line 2757 "configure"
2757 #include "confdefs.h"
2758 #include <sys/types.h>
2759 #include <sys/param.h>
2760 int main() {
2761
2762 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2763  bogus endian macros
2764 #endif
2765 ; return 0; }
2766 EOF
2767 if { (eval echo configure:2768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2768   rm -rf conftest*
2769   # It does; now see whether it defined to BIG_ENDIAN or not.
2770 cat > conftest.$ac_ext <<EOF
2771 #line 2772 "configure"
2772 #include "confdefs.h"
2773 #include <sys/types.h>
2774 #include <sys/param.h>
2775 int main() {
2776
2777 #if BYTE_ORDER != BIG_ENDIAN
2778  not big endian
2779 #endif
2780 ; return 0; }
2781 EOF
2782 if { (eval echo configure:2783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2783   rm -rf conftest*
2784   ac_cv_c_bigendian=yes
2785 else
2786   echo "configure: failed program was:" >&5
2787   cat conftest.$ac_ext >&5
2788   rm -rf conftest*
2789   ac_cv_c_bigendian=no
2790 fi
2791 rm -f conftest*
2792 else
2793   echo "configure: failed program was:" >&5
2794   cat conftest.$ac_ext >&5
2795 fi
2796 rm -f conftest*
2797 if test $ac_cv_c_bigendian = unknown; then
2798 if test "$cross_compiling" = yes; then
2799     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2800 else
2801   cat > conftest.$ac_ext <<EOF
2802 #line 2803 "configure"
2803 #include "confdefs.h"
2804 main () {
2805   /* Are we little or big endian?  From Harbison&Steele.  */
2806   union
2807   {
2808     long l;
2809     char c[sizeof (long)];
2810   } u;
2811   u.l = 1;
2812   exit (u.c[sizeof (long) - 1] == 1);
2813 }
2814 EOF
2815 if { (eval echo configure:2816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2816 then
2817   ac_cv_c_bigendian=no
2818 else
2819   echo "configure: failed program was:" >&5
2820   cat conftest.$ac_ext >&5
2821   rm -fr conftest*
2822   ac_cv_c_bigendian=yes
2823 fi
2824 rm -fr conftest*
2825 fi
2826
2827 fi
2828 fi
2829
2830 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2831 if test $ac_cv_c_bigendian = yes; then
2832   cat >> confdefs.h <<\EOF
2833 #define WORDS_BIGENDIAN 1
2834 EOF
2835
2836 fi
2837
2838 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2839 echo "configure:2840: checking whether char is unsigned" >&5
2840 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2841   echo $ac_n "(cached) $ac_c" 1>&6
2842 else
2843   if test "$GCC" = yes; then
2844   # GCC predefines this symbol on systems where it applies.
2845 cat > conftest.$ac_ext <<EOF
2846 #line 2847 "configure"
2847 #include "confdefs.h"
2848 #ifdef __CHAR_UNSIGNED__
2849   yes
2850 #endif
2851
2852 EOF
2853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2854   egrep "yes" >/dev/null 2>&1; then
2855   rm -rf conftest*
2856   ac_cv_c_char_unsigned=yes
2857 else
2858   rm -rf conftest*
2859   ac_cv_c_char_unsigned=no
2860 fi
2861 rm -f conftest*
2862
2863 else
2864 if test "$cross_compiling" = yes; then
2865     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2866 else
2867   cat > conftest.$ac_ext <<EOF
2868 #line 2869 "configure"
2869 #include "confdefs.h"
2870 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2871 #if !defined(__STDC__) || __STDC__ != 1
2872 #define volatile
2873 #endif
2874 main() {
2875   volatile char c = 255; exit(c < 0);
2876 }
2877 EOF
2878 if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2879 then
2880   ac_cv_c_char_unsigned=yes
2881 else
2882   echo "configure: failed program was:" >&5
2883   cat conftest.$ac_ext >&5
2884   rm -fr conftest*
2885   ac_cv_c_char_unsigned=no
2886 fi
2887 rm -fr conftest*
2888 fi
2889
2890 fi
2891 fi
2892
2893 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2894 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2895   cat >> confdefs.h <<\EOF
2896 #define __CHAR_UNSIGNED__ 1
2897 EOF
2898
2899 fi
2900
2901
2902 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2903 echo "configure:2904: checking return type of signal handlers" >&5
2904 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2905   echo $ac_n "(cached) $ac_c" 1>&6
2906 else
2907   cat > conftest.$ac_ext <<EOF
2908 #line 2909 "configure"
2909 #include "confdefs.h"
2910 #include <sys/types.h>
2911 #include <signal.h>
2912 #ifdef signal
2913 #undef signal
2914 #endif
2915 #ifdef __cplusplus
2916 extern "C" void (*signal (int, void (*)(int)))(int);
2917 #else
2918 void (*signal ()) ();
2919 #endif
2920
2921 int main() {
2922 int i;
2923 ; return 0; }
2924 EOF
2925 if { (eval echo configure:2926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2926   rm -rf conftest*
2927   ac_cv_type_signal=void
2928 else
2929   echo "configure: failed program was:" >&5
2930   cat conftest.$ac_ext >&5
2931   rm -rf conftest*
2932   ac_cv_type_signal=int
2933 fi
2934 rm -f conftest*
2935 fi
2936
2937 echo "$ac_t""$ac_cv_type_signal" 1>&6
2938 cat >> confdefs.h <<EOF
2939 #define RETSIGTYPE $ac_cv_type_signal
2940 EOF
2941
2942
2943 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2944 echo "configure:2945: checking for uid_t in sys/types.h" >&5
2945 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2946   echo $ac_n "(cached) $ac_c" 1>&6
2947 else
2948   cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 #include <sys/types.h>
2952 EOF
2953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2954   egrep "uid_t" >/dev/null 2>&1; then
2955   rm -rf conftest*
2956   ac_cv_type_uid_t=yes
2957 else
2958   rm -rf conftest*
2959   ac_cv_type_uid_t=no
2960 fi
2961 rm -f conftest*
2962
2963 fi
2964
2965 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2966 if test $ac_cv_type_uid_t = no; then
2967   cat >> confdefs.h <<\EOF
2968 #define uid_t int
2969 EOF
2970
2971   cat >> confdefs.h <<\EOF
2972 #define gid_t int
2973 EOF
2974
2975 fi
2976
2977 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2978 echo "configure:2979: checking for mode_t" >&5
2979 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2980   echo $ac_n "(cached) $ac_c" 1>&6
2981 else
2982   cat > conftest.$ac_ext <<EOF
2983 #line 2984 "configure"
2984 #include "confdefs.h"
2985 #include <sys/types.h>
2986 #if STDC_HEADERS
2987 #include <stdlib.h>
2988 #include <stddef.h>
2989 #endif
2990 EOF
2991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2992   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2993   rm -rf conftest*
2994   ac_cv_type_mode_t=yes
2995 else
2996   rm -rf conftest*
2997   ac_cv_type_mode_t=no
2998 fi
2999 rm -f conftest*
3000
3001 fi
3002 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3003 if test $ac_cv_type_mode_t = no; then
3004   cat >> confdefs.h <<\EOF
3005 #define mode_t int
3006 EOF
3007
3008 fi
3009
3010 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3011 echo "configure:3012: checking for off_t" >&5
3012 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3013   echo $ac_n "(cached) $ac_c" 1>&6
3014 else
3015   cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018 #include <sys/types.h>
3019 #if STDC_HEADERS
3020 #include <stdlib.h>
3021 #include <stddef.h>
3022 #endif
3023 EOF
3024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3025   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3026   rm -rf conftest*
3027   ac_cv_type_off_t=yes
3028 else
3029   rm -rf conftest*
3030   ac_cv_type_off_t=no
3031 fi
3032 rm -f conftest*
3033
3034 fi
3035 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3036 if test $ac_cv_type_off_t = no; then
3037   cat >> confdefs.h <<\EOF
3038 #define off_t long
3039 EOF
3040
3041 fi
3042
3043 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3044 echo "configure:3045: checking for size_t" >&5
3045 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3046   echo $ac_n "(cached) $ac_c" 1>&6
3047 else
3048   cat > conftest.$ac_ext <<EOF
3049 #line 3050 "configure"
3050 #include "confdefs.h"
3051 #include <sys/types.h>
3052 #if STDC_HEADERS
3053 #include <stdlib.h>
3054 #include <stddef.h>
3055 #endif
3056 EOF
3057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3058   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3059   rm -rf conftest*
3060   ac_cv_type_size_t=yes
3061 else
3062   rm -rf conftest*
3063   ac_cv_type_size_t=no
3064 fi
3065 rm -f conftest*
3066
3067 fi
3068 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3069 if test $ac_cv_type_size_t = no; then
3070   cat >> confdefs.h <<\EOF
3071 #define size_t unsigned
3072 EOF
3073
3074 fi
3075
3076 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3077 echo "configure:3078: checking for pid_t" >&5
3078 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3079   echo $ac_n "(cached) $ac_c" 1>&6
3080 else
3081   cat > conftest.$ac_ext <<EOF
3082 #line 3083 "configure"
3083 #include "confdefs.h"
3084 #include <sys/types.h>
3085 #if STDC_HEADERS
3086 #include <stdlib.h>
3087 #include <stddef.h>
3088 #endif
3089 EOF
3090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3091   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3092   rm -rf conftest*
3093   ac_cv_type_pid_t=yes
3094 else
3095   rm -rf conftest*
3096   ac_cv_type_pid_t=no
3097 fi
3098 rm -f conftest*
3099
3100 fi
3101 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3102 if test $ac_cv_type_pid_t = no; then
3103   cat >> confdefs.h <<\EOF
3104 #define pid_t int
3105 EOF
3106
3107 fi
3108
3109 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3110 echo "configure:3111: checking for st_rdev in struct stat" >&5
3111 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3112   echo $ac_n "(cached) $ac_c" 1>&6
3113 else
3114   cat > conftest.$ac_ext <<EOF
3115 #line 3116 "configure"
3116 #include "confdefs.h"
3117 #include <sys/types.h>
3118 #include <sys/stat.h>
3119 int main() {
3120 struct stat s; s.st_rdev;
3121 ; return 0; }
3122 EOF
3123 if { (eval echo configure:3124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3124   rm -rf conftest*
3125   ac_cv_struct_st_rdev=yes
3126 else
3127   echo "configure: failed program was:" >&5
3128   cat conftest.$ac_ext >&5
3129   rm -rf conftest*
3130   ac_cv_struct_st_rdev=no
3131 fi
3132 rm -f conftest*
3133 fi
3134
3135 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3136 if test $ac_cv_struct_st_rdev = yes; then
3137   cat >> confdefs.h <<\EOF
3138 #define HAVE_ST_RDEV 1
3139 EOF
3140
3141 fi
3142
3143 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3144 echo "configure:3145: checking for d_off in dirent" >&5
3145 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3146   echo $ac_n "(cached) $ac_c" 1>&6
3147 else
3148   cat > conftest.$ac_ext <<EOF
3149 #line 3150 "configure"
3150 #include "confdefs.h"
3151
3152 #include <unistd.h>
3153 #include <sys/types.h>
3154 #include <dirent.h>
3155 int main() {
3156 struct dirent d; d.d_off;
3157 ; return 0; }
3158 EOF
3159 if { (eval echo configure:3160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3160   rm -rf conftest*
3161   ac_cv_dirent_d_off=yes
3162 else
3163   echo "configure: failed program was:" >&5
3164   cat conftest.$ac_ext >&5
3165   rm -rf conftest*
3166   ac_cv_dirent_d_off=no
3167 fi
3168 rm -f conftest*
3169 fi
3170
3171 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3172 if test $ac_cv_dirent_d_off = yes; then
3173   cat >> confdefs.h <<\EOF
3174 #define HAVE_DIRENT_D_OFF 1
3175 EOF
3176
3177 fi
3178
3179 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3180 echo "configure:3181: checking for ino_t" >&5
3181 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3182   echo $ac_n "(cached) $ac_c" 1>&6
3183 else
3184   cat > conftest.$ac_ext <<EOF
3185 #line 3186 "configure"
3186 #include "confdefs.h"
3187 #include <sys/types.h>
3188 #if STDC_HEADERS
3189 #include <stdlib.h>
3190 #include <stddef.h>
3191 #endif
3192 EOF
3193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3194   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3195   rm -rf conftest*
3196   ac_cv_type_ino_t=yes
3197 else
3198   rm -rf conftest*
3199   ac_cv_type_ino_t=no
3200 fi
3201 rm -f conftest*
3202
3203 fi
3204 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3205 if test $ac_cv_type_ino_t = no; then
3206   cat >> confdefs.h <<\EOF
3207 #define ino_t unsigned
3208 EOF
3209
3210 fi
3211
3212 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3213 echo "configure:3214: checking for loff_t" >&5
3214 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3215   echo $ac_n "(cached) $ac_c" 1>&6
3216 else
3217   cat > conftest.$ac_ext <<EOF
3218 #line 3219 "configure"
3219 #include "confdefs.h"
3220 #include <sys/types.h>
3221 #if STDC_HEADERS
3222 #include <stdlib.h>
3223 #include <stddef.h>
3224 #endif
3225 EOF
3226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3227   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3228   rm -rf conftest*
3229   ac_cv_type_loff_t=yes
3230 else
3231   rm -rf conftest*
3232   ac_cv_type_loff_t=no
3233 fi
3234 rm -f conftest*
3235
3236 fi
3237 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3238 if test $ac_cv_type_loff_t = no; then
3239   cat >> confdefs.h <<\EOF
3240 #define loff_t off_t
3241 EOF
3242
3243 fi
3244
3245 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3246 echo "configure:3247: checking for offset_t" >&5
3247 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3248   echo $ac_n "(cached) $ac_c" 1>&6
3249 else
3250   cat > conftest.$ac_ext <<EOF
3251 #line 3252 "configure"
3252 #include "confdefs.h"
3253 #include <sys/types.h>
3254 #if STDC_HEADERS
3255 #include <stdlib.h>
3256 #include <stddef.h>
3257 #endif
3258 EOF
3259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3260   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3261   rm -rf conftest*
3262   ac_cv_type_offset_t=yes
3263 else
3264   rm -rf conftest*
3265   ac_cv_type_offset_t=no
3266 fi
3267 rm -f conftest*
3268
3269 fi
3270 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3271 if test $ac_cv_type_offset_t = no; then
3272   cat >> confdefs.h <<\EOF
3273 #define offset_t loff_t
3274 EOF
3275
3276 fi
3277
3278 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3279 echo "configure:3280: checking for ssize_t" >&5
3280 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3281   echo $ac_n "(cached) $ac_c" 1>&6
3282 else
3283   cat > conftest.$ac_ext <<EOF
3284 #line 3285 "configure"
3285 #include "confdefs.h"
3286 #include <sys/types.h>
3287 #if STDC_HEADERS
3288 #include <stdlib.h>
3289 #include <stddef.h>
3290 #endif
3291 EOF
3292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3293   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3294   rm -rf conftest*
3295   ac_cv_type_ssize_t=yes
3296 else
3297   rm -rf conftest*
3298   ac_cv_type_ssize_t=no
3299 fi
3300 rm -f conftest*
3301
3302 fi
3303 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3304 if test $ac_cv_type_ssize_t = no; then
3305   cat >> confdefs.h <<\EOF
3306 #define ssize_t int
3307 EOF
3308
3309 fi
3310
3311 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3312 echo "configure:3313: checking for wchar_t" >&5
3313 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3314   echo $ac_n "(cached) $ac_c" 1>&6
3315 else
3316   cat > conftest.$ac_ext <<EOF
3317 #line 3318 "configure"
3318 #include "confdefs.h"
3319 #include <sys/types.h>
3320 #if STDC_HEADERS
3321 #include <stdlib.h>
3322 #include <stddef.h>
3323 #endif
3324 EOF
3325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3326   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3327   rm -rf conftest*
3328   ac_cv_type_wchar_t=yes
3329 else
3330   rm -rf conftest*
3331   ac_cv_type_wchar_t=no
3332 fi
3333 rm -f conftest*
3334
3335 fi
3336 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3337 if test $ac_cv_type_wchar_t = no; then
3338   cat >> confdefs.h <<\EOF
3339 #define wchar_t unsigned short
3340 EOF
3341
3342 fi
3343
3344
3345 ############################################
3346 # for cups support we need libcups, and a handful of header files
3347
3348 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3349 echo "configure:3350: checking for httpConnect in -lcups" >&5
3350 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3351 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3352   echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354   ac_save_LIBS="$LIBS"
3355 LIBS="-lcups  $LIBS"
3356 cat > conftest.$ac_ext <<EOF
3357 #line 3358 "configure"
3358 #include "confdefs.h"
3359 /* Override any gcc2 internal prototype to avoid an error.  */
3360 /* We use char because int might match the return type of a gcc2
3361     builtin and then its argument prototype would still apply.  */
3362 char httpConnect();
3363
3364 int main() {
3365 httpConnect()
3366 ; return 0; }
3367 EOF
3368 if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3369   rm -rf conftest*
3370   eval "ac_cv_lib_$ac_lib_var=yes"
3371 else
3372   echo "configure: failed program was:" >&5
3373   cat conftest.$ac_ext >&5
3374   rm -rf conftest*
3375   eval "ac_cv_lib_$ac_lib_var=no"
3376 fi
3377 rm -f conftest*
3378 LIBS="$ac_save_LIBS"
3379
3380 fi
3381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3382   echo "$ac_t""yes" 1>&6
3383     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3384     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3385   cat >> confdefs.h <<EOF
3386 #define $ac_tr_lib 1
3387 EOF
3388
3389   LIBS="-lcups $LIBS"
3390
3391 else
3392   echo "$ac_t""no" 1>&6
3393 fi
3394
3395
3396 # I wonder if there is a nicer way of doing this?
3397
3398 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3399         for ac_hdr in cups/cups.h cups/language.h
3400 do
3401 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3402 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3403 echo "configure:3404: checking for $ac_hdr" >&5
3404 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3405   echo $ac_n "(cached) $ac_c" 1>&6
3406 else
3407   cat > conftest.$ac_ext <<EOF
3408 #line 3409 "configure"
3409 #include "confdefs.h"
3410 #include <$ac_hdr>
3411 EOF
3412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3413 { (eval echo configure:3414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3415 if test -z "$ac_err"; then
3416   rm -rf conftest*
3417   eval "ac_cv_header_$ac_safe=yes"
3418 else
3419   echo "$ac_err" >&5
3420   echo "configure: failed program was:" >&5
3421   cat conftest.$ac_ext >&5
3422   rm -rf conftest*
3423   eval "ac_cv_header_$ac_safe=no"
3424 fi
3425 rm -f conftest*
3426 fi
3427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3428   echo "$ac_t""yes" 1>&6
3429     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3430   cat >> confdefs.h <<EOF
3431 #define $ac_tr_hdr 1
3432 EOF
3433  
3434 else
3435   echo "$ac_t""no" 1>&6
3436 fi
3437 done
3438
3439         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3440                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3441                         cat >> confdefs.h <<\EOF
3442 #define HAVE_CUPS 1
3443 EOF
3444
3445                 fi
3446         fi
3447 fi
3448
3449 ############################################
3450 # we need libdl for PAM and the new VFS code
3451 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3452 echo "configure:3453: checking for dlopen in -ldl" >&5
3453 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3454 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3455   echo $ac_n "(cached) $ac_c" 1>&6
3456 else
3457   ac_save_LIBS="$LIBS"
3458 LIBS="-ldl  $LIBS"
3459 cat > conftest.$ac_ext <<EOF
3460 #line 3461 "configure"
3461 #include "confdefs.h"
3462 /* Override any gcc2 internal prototype to avoid an error.  */
3463 /* We use char because int might match the return type of a gcc2
3464     builtin and then its argument prototype would still apply.  */
3465 char dlopen();
3466
3467 int main() {
3468 dlopen()
3469 ; return 0; }
3470 EOF
3471 if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3472   rm -rf conftest*
3473   eval "ac_cv_lib_$ac_lib_var=yes"
3474 else
3475   echo "configure: failed program was:" >&5
3476   cat conftest.$ac_ext >&5
3477   rm -rf conftest*
3478   eval "ac_cv_lib_$ac_lib_var=no"
3479 fi
3480 rm -f conftest*
3481 LIBS="$ac_save_LIBS"
3482
3483 fi
3484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3485   echo "$ac_t""yes" 1>&6
3486   LIBS="$LIBS -ldl";
3487         cat >> confdefs.h <<\EOF
3488 #define HAVE_LIBDL 1
3489 EOF
3490
3491 else
3492   echo "$ac_t""no" 1>&6
3493 fi
3494
3495
3496 ############################################
3497 # check if the compiler can do immediate structures
3498 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3499 echo "configure:3500: checking for immediate structures" >&5
3500 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3501   echo $ac_n "(cached) $ac_c" 1>&6
3502 else
3503   
3504     cat > conftest.$ac_ext <<EOF
3505 #line 3506 "configure"
3506 #include "confdefs.h"
3507
3508 #include <stdio.h>
3509 int main() {
3510
3511    #define X_FOOBAR(x) ((FOOBAR) { x })
3512    typedef struct {unsigned x;} FOOBAR;
3513    FOOBAR f = X_FOOBAR(1);   
3514
3515 ; return 0; }
3516 EOF
3517 if { (eval echo configure:3518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3518   rm -rf conftest*
3519   samba_cv_immediate_structures=yes
3520 else
3521   echo "configure: failed program was:" >&5
3522   cat conftest.$ac_ext >&5
3523   rm -rf conftest*
3524   samba_cv_immediate_structures=no
3525 fi
3526 rm -f conftest*
3527 fi
3528
3529 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3530 if test x"$samba_cv_immediate_structures" = x"yes"; then
3531    cat >> confdefs.h <<\EOF
3532 #define HAVE_IMMEDIATE_STRUCTURES 1
3533 EOF
3534
3535 fi
3536
3537 ############################################
3538 # check for unix domain sockets
3539 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3540 echo "configure:3541: checking for unix domain sockets" >&5
3541 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   
3545     cat > conftest.$ac_ext <<EOF
3546 #line 3547 "configure"
3547 #include "confdefs.h"
3548
3549 #include <sys/types.h>
3550 #include <stdlib.h>
3551 #include <stddef.h>
3552 #include <sys/socket.h>
3553 #include <sys/un.h>
3554 int main() {
3555
3556   struct sockaddr_un sunaddr; 
3557   sunaddr.sun_family = AF_UNIX;
3558
3559 ; return 0; }
3560 EOF
3561 if { (eval echo configure:3562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3562   rm -rf conftest*
3563   samba_cv_unixsocket=yes
3564 else
3565   echo "configure: failed program was:" >&5
3566   cat conftest.$ac_ext >&5
3567   rm -rf conftest*
3568   samba_cv_unixsocket=no
3569 fi
3570 rm -f conftest*
3571 fi
3572
3573 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3574 if test x"$samba_cv_unixsocket" = x"yes"; then
3575    cat >> confdefs.h <<\EOF
3576 #define HAVE_UNIXSOCKET 1
3577 EOF
3578
3579 fi
3580
3581
3582 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3583 echo "configure:3584: checking for socklen_t type" >&5
3584 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3585   echo $ac_n "(cached) $ac_c" 1>&6
3586 else
3587   
3588     cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3591
3592 #include <sys/types.h>
3593 #if STDC_HEADERS
3594 #include <stdlib.h>
3595 #include <stddef.h>
3596 #endif
3597 #include <sys/socket.h>
3598 int main() {
3599 socklen_t i = 0
3600 ; return 0; }
3601 EOF
3602 if { (eval echo configure:3603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3603   rm -rf conftest*
3604   samba_cv_socklen_t=yes
3605 else
3606   echo "configure: failed program was:" >&5
3607   cat conftest.$ac_ext >&5
3608   rm -rf conftest*
3609   samba_cv_socklen_t=no
3610 fi
3611 rm -f conftest*
3612 fi
3613
3614 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3615 if test x"$samba_cv_socklen_t" = x"yes"; then
3616    cat >> confdefs.h <<\EOF
3617 #define HAVE_SOCKLEN_T_TYPE 1
3618 EOF
3619
3620 fi
3621
3622 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3623 echo "configure:3624: checking for sig_atomic_t type" >&5
3624 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3625   echo $ac_n "(cached) $ac_c" 1>&6
3626 else
3627   
3628     cat > conftest.$ac_ext <<EOF
3629 #line 3630 "configure"
3630 #include "confdefs.h"
3631
3632 #include <sys/types.h>
3633 #if STDC_HEADERS
3634 #include <stdlib.h>
3635 #include <stddef.h>
3636 #endif
3637 #include <signal.h>
3638 int main() {
3639 sig_atomic_t i = 0
3640 ; return 0; }
3641 EOF
3642 if { (eval echo configure:3643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3643   rm -rf conftest*
3644   samba_cv_sig_atomic_t=yes
3645 else
3646   echo "configure: failed program was:" >&5
3647   cat conftest.$ac_ext >&5
3648   rm -rf conftest*
3649   samba_cv_sig_atomic_t=no
3650 fi
3651 rm -f conftest*
3652 fi
3653
3654 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3655 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3656    cat >> confdefs.h <<\EOF
3657 #define HAVE_SIG_ATOMIC_T_TYPE 1
3658 EOF
3659
3660 fi
3661
3662 # stupid headers have the functions but no declaration. grrrr.
3663
3664  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3665 echo "configure:3666: checking for errno declaration" >&5
3666 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3667   echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669   
3670     cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673 #include <errno.h>
3674 int main() {
3675 int i = (int)errno
3676 ; return 0; }
3677 EOF
3678 if { (eval echo configure:3679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3679   rm -rf conftest*
3680   ac_cv_have_errno_decl=yes
3681 else
3682   echo "configure: failed program was:" >&5
3683   cat conftest.$ac_ext >&5
3684   rm -rf conftest*
3685   ac_cv_have_errno_decl=no
3686 fi
3687 rm -f conftest*
3688 fi
3689
3690 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3691  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3692     cat >> confdefs.h <<\EOF
3693 #define HAVE_ERRNO_DECL 1
3694 EOF
3695
3696  fi
3697
3698
3699  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3700 echo "configure:3701: checking for setresuid declaration" >&5
3701 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3702   echo $ac_n "(cached) $ac_c" 1>&6
3703 else
3704   
3705     cat > conftest.$ac_ext <<EOF
3706 #line 3707 "configure"
3707 #include "confdefs.h"
3708 #include <unistd.h>
3709 int main() {
3710 int i = (int)setresuid
3711 ; return 0; }
3712 EOF
3713 if { (eval echo configure:3714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3714   rm -rf conftest*
3715   ac_cv_have_setresuid_decl=yes
3716 else
3717   echo "configure: failed program was:" >&5
3718   cat conftest.$ac_ext >&5
3719   rm -rf conftest*
3720   ac_cv_have_setresuid_decl=no
3721 fi
3722 rm -f conftest*
3723 fi
3724
3725 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3726  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3727     cat >> confdefs.h <<\EOF
3728 #define HAVE_SETRESUID_DECL 1
3729 EOF
3730
3731  fi
3732
3733
3734  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3735 echo "configure:3736: checking for setresgid declaration" >&5
3736 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3737   echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739   
3740     cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743 #include <unistd.h>
3744 int main() {
3745 int i = (int)setresgid
3746 ; return 0; }
3747 EOF
3748 if { (eval echo configure:3749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3749   rm -rf conftest*
3750   ac_cv_have_setresgid_decl=yes
3751 else
3752   echo "configure: failed program was:" >&5
3753   cat conftest.$ac_ext >&5
3754   rm -rf conftest*
3755   ac_cv_have_setresgid_decl=no
3756 fi
3757 rm -f conftest*
3758 fi
3759
3760 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3761  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3762     cat >> confdefs.h <<\EOF
3763 #define HAVE_SETRESGID_DECL 1
3764 EOF
3765
3766  fi
3767
3768
3769  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3770 echo "configure:3771: checking for asprintf declaration" >&5
3771 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3772   echo $ac_n "(cached) $ac_c" 1>&6
3773 else
3774   
3775     cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778 #include <stdio.h>
3779 int main() {
3780 int i = (int)asprintf
3781 ; return 0; }
3782 EOF
3783 if { (eval echo configure:3784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3784   rm -rf conftest*
3785   ac_cv_have_asprintf_decl=yes
3786 else
3787   echo "configure: failed program was:" >&5
3788   cat conftest.$ac_ext >&5
3789   rm -rf conftest*
3790   ac_cv_have_asprintf_decl=no
3791 fi
3792 rm -f conftest*
3793 fi
3794
3795 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3796  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3797     cat >> confdefs.h <<\EOF
3798 #define HAVE_ASPRINTF_DECL 1
3799 EOF
3800
3801  fi
3802
3803
3804  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3805 echo "configure:3806: checking for vasprintf declaration" >&5
3806 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3807   echo $ac_n "(cached) $ac_c" 1>&6
3808 else
3809   
3810     cat > conftest.$ac_ext <<EOF
3811 #line 3812 "configure"
3812 #include "confdefs.h"
3813 #include <stdio.h>
3814 int main() {
3815 int i = (int)vasprintf
3816 ; return 0; }
3817 EOF
3818 if { (eval echo configure:3819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3819   rm -rf conftest*
3820   ac_cv_have_vasprintf_decl=yes
3821 else
3822   echo "configure: failed program was:" >&5
3823   cat conftest.$ac_ext >&5
3824   rm -rf conftest*
3825   ac_cv_have_vasprintf_decl=no
3826 fi
3827 rm -f conftest*
3828 fi
3829
3830 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3831  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3832     cat >> confdefs.h <<\EOF
3833 #define HAVE_VASPRINTF_DECL 1
3834 EOF
3835
3836  fi
3837
3838
3839  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3840 echo "configure:3841: checking for vsnprintf declaration" >&5
3841 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3842   echo $ac_n "(cached) $ac_c" 1>&6
3843 else
3844   
3845     cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848 #include <stdio.h>
3849 int main() {
3850 int i = (int)vsnprintf
3851 ; return 0; }
3852 EOF
3853 if { (eval echo configure:3854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3854   rm -rf conftest*
3855   ac_cv_have_vsnprintf_decl=yes
3856 else
3857   echo "configure: failed program was:" >&5
3858   cat conftest.$ac_ext >&5
3859   rm -rf conftest*
3860   ac_cv_have_vsnprintf_decl=no
3861 fi
3862 rm -f conftest*
3863 fi
3864
3865 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3866  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3867     cat >> confdefs.h <<\EOF
3868 #define HAVE_VSNPRINTF_DECL 1
3869 EOF
3870
3871  fi
3872
3873
3874  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3875 echo "configure:3876: checking for snprintf declaration" >&5
3876 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3877   echo $ac_n "(cached) $ac_c" 1>&6
3878 else
3879   
3880     cat > conftest.$ac_ext <<EOF
3881 #line 3882 "configure"
3882 #include "confdefs.h"
3883 #include <stdio.h>
3884 int main() {
3885 int i = (int)snprintf
3886 ; return 0; }
3887 EOF
3888 if { (eval echo configure:3889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3889   rm -rf conftest*
3890   ac_cv_have_snprintf_decl=yes
3891 else
3892   echo "configure: failed program was:" >&5
3893   cat conftest.$ac_ext >&5
3894   rm -rf conftest*
3895   ac_cv_have_snprintf_decl=no
3896 fi
3897 rm -f conftest*
3898 fi
3899
3900 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3901  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3902     cat >> confdefs.h <<\EOF
3903 #define HAVE_SNPRINTF_DECL 1
3904 EOF
3905
3906  fi
3907
3908
3909 # and glibc has setresuid under linux but the function does
3910 # nothing until kernel 2.1.44! very dumb.
3911 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3912 echo "configure:3913: checking for real setresuid" >&5
3913 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3914   echo $ac_n "(cached) $ac_c" 1>&6
3915 else
3916   
3917     if test "$cross_compiling" = yes; then
3918   samba_cv_have_setresuid=cross
3919 else
3920   cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3923 #include <errno.h>
3924 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3925 EOF
3926 if { (eval echo configure:3927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3927 then
3928   samba_cv_have_setresuid=yes
3929 else
3930   echo "configure: failed program was:" >&5
3931   cat conftest.$ac_ext >&5
3932   rm -fr conftest*
3933   samba_cv_have_setresuid=no
3934 fi
3935 rm -fr conftest*
3936 fi
3937
3938 fi
3939
3940 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3941 if test x"$samba_cv_have_setresuid" = x"yes"; then
3942     cat >> confdefs.h <<\EOF
3943 #define HAVE_SETRESUID 1
3944 EOF
3945
3946 fi
3947
3948 # Do the same check for setresguid...
3949 #
3950 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3951 echo "configure:3952: checking for real setresgid" >&5
3952 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3953   echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955   
3956     if test "$cross_compiling" = yes; then
3957   samba_cv_have_setresgid=cross
3958 else
3959   cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962 #include <unistd.h>
3963 #include <errno.h>
3964 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3967 then
3968   samba_cv_have_setresgid=yes
3969 else
3970   echo "configure: failed program was:" >&5
3971   cat conftest.$ac_ext >&5
3972   rm -fr conftest*
3973   samba_cv_have_setresgid=no
3974 fi
3975 rm -fr conftest*
3976 fi
3977
3978 fi
3979
3980 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3981 if test x"$samba_cv_have_setresgid" = x"yes"; then
3982     cat >> confdefs.h <<\EOF
3983 #define HAVE_SETRESGID 1
3984 EOF
3985
3986 fi
3987
3988 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3989 echo "configure:3990: checking for 8-bit clean memcmp" >&5
3990 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3991   echo $ac_n "(cached) $ac_c" 1>&6
3992 else
3993   if test "$cross_compiling" = yes; then
3994   ac_cv_func_memcmp_clean=no
3995 else
3996   cat > conftest.$ac_ext <<EOF
3997 #line 3998 "configure"
3998 #include "confdefs.h"
3999
4000 main()
4001 {
4002   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4003   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4004 }
4005
4006 EOF
4007 if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4008 then
4009   ac_cv_func_memcmp_clean=yes
4010 else
4011   echo "configure: failed program was:" >&5
4012   cat conftest.$ac_ext >&5
4013   rm -fr conftest*
4014   ac_cv_func_memcmp_clean=no
4015 fi
4016 rm -fr conftest*
4017 fi
4018
4019 fi
4020
4021 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4022 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4023
4024
4025 ###############################################
4026 # test for where we get crypt() from
4027 for ac_func in crypt
4028 do
4029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4030 echo "configure:4031: checking for $ac_func" >&5
4031 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4032   echo $ac_n "(cached) $ac_c" 1>&6
4033 else
4034   cat > conftest.$ac_ext <<EOF
4035 #line 4036 "configure"
4036 #include "confdefs.h"
4037 /* System header to define __stub macros and hopefully few prototypes,
4038     which can conflict with char $ac_func(); below.  */
4039 #include <assert.h>
4040 /* Override any gcc2 internal prototype to avoid an error.  */
4041 /* We use char because int might match the return type of a gcc2
4042     builtin and then its argument prototype would still apply.  */
4043 char $ac_func();
4044
4045 int main() {
4046
4047 /* The GNU C library defines this for functions which it implements
4048     to always fail with ENOSYS.  Some functions are actually named
4049     something starting with __ and the normal name is an alias.  */
4050 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4051 choke me
4052 #else
4053 $ac_func();
4054 #endif
4055
4056 ; return 0; }
4057 EOF
4058 if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4059   rm -rf conftest*
4060   eval "ac_cv_func_$ac_func=yes"
4061 else
4062   echo "configure: failed program was:" >&5
4063   cat conftest.$ac_ext >&5
4064   rm -rf conftest*
4065   eval "ac_cv_func_$ac_func=no"
4066 fi
4067 rm -f conftest*
4068 fi
4069
4070 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4071   echo "$ac_t""yes" 1>&6
4072     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4073   cat >> confdefs.h <<EOF
4074 #define $ac_tr_func 1
4075 EOF
4076  
4077 else
4078   echo "$ac_t""no" 1>&6
4079 fi
4080 done
4081
4082 if test x"$ac_cv_func_crypt" = x"no"; then
4083     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4084 echo "configure:4085: checking for crypt in -lcrypt" >&5
4085 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4086 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4087   echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089   ac_save_LIBS="$LIBS"
4090 LIBS="-lcrypt  $LIBS"
4091 cat > conftest.$ac_ext <<EOF
4092 #line 4093 "configure"
4093 #include "confdefs.h"
4094 /* Override any gcc2 internal prototype to avoid an error.  */
4095 /* We use char because int might match the return type of a gcc2
4096     builtin and then its argument prototype would still apply.  */
4097 char crypt();
4098
4099 int main() {
4100 crypt()
4101 ; return 0; }
4102 EOF
4103 if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4104   rm -rf conftest*
4105   eval "ac_cv_lib_$ac_lib_var=yes"
4106 else
4107   echo "configure: failed program was:" >&5
4108   cat conftest.$ac_ext >&5
4109   rm -rf conftest*
4110   eval "ac_cv_lib_$ac_lib_var=no"
4111 fi
4112 rm -f conftest*
4113 LIBS="$ac_save_LIBS"
4114
4115 fi
4116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4117   echo "$ac_t""yes" 1>&6
4118   LIBS="$LIBS -lcrypt";
4119         cat >> confdefs.h <<\EOF
4120 #define HAVE_CRYPT 1
4121 EOF
4122
4123 else
4124   echo "$ac_t""no" 1>&6
4125 fi
4126
4127 fi
4128
4129
4130 ###############################################
4131 # Readline included by default unless explicitly asked not to
4132 test "${with_readline+set}" != "set" && with_readline=yes
4133
4134 # test for where we get readline() from
4135 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4136 echo "configure:4137: checking whether to use readline" >&5
4137 # Check whether --with-readline or --without-readline was given.
4138 if test "${with_readline+set}" = set; then
4139   withval="$with_readline"
4140     case "$with_readline" in
4141   yes)
4142     echo "$ac_t""yes" 1>&6
4143
4144     for ac_hdr in readline.h history.h readline/readline.h
4145 do
4146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4148 echo "configure:4149: checking for $ac_hdr" >&5
4149 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4150   echo $ac_n "(cached) $ac_c" 1>&6
4151 else
4152   cat > conftest.$ac_ext <<EOF
4153 #line 4154 "configure"
4154 #include "confdefs.h"
4155 #include <$ac_hdr>
4156 EOF
4157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4158 { (eval echo configure:4159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4160 if test -z "$ac_err"; then
4161   rm -rf conftest*
4162   eval "ac_cv_header_$ac_safe=yes"
4163 else
4164   echo "$ac_err" >&5
4165   echo "configure: failed program was:" >&5
4166   cat conftest.$ac_ext >&5
4167   rm -rf conftest*
4168   eval "ac_cv_header_$ac_safe=no"
4169 fi
4170 rm -f conftest*
4171 fi
4172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4173   echo "$ac_t""yes" 1>&6
4174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4175   cat >> confdefs.h <<EOF
4176 #define $ac_tr_hdr 1
4177 EOF
4178  
4179 else
4180   echo "$ac_t""no" 1>&6
4181 fi
4182 done
4183
4184     for ac_hdr in readline/history.h
4185 do
4186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4188 echo "configure:4189: checking for $ac_hdr" >&5
4189 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4190   echo $ac_n "(cached) $ac_c" 1>&6
4191 else
4192   cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 #include <$ac_hdr>
4196 EOF
4197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4198 { (eval echo configure:4199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4200 if test -z "$ac_err"; then
4201   rm -rf conftest*
4202   eval "ac_cv_header_$ac_safe=yes"
4203 else
4204   echo "$ac_err" >&5
4205   echo "configure: failed program was:" >&5
4206   cat conftest.$ac_ext >&5
4207   rm -rf conftest*
4208   eval "ac_cv_header_$ac_safe=no"
4209 fi
4210 rm -f conftest*
4211 fi
4212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4213   echo "$ac_t""yes" 1>&6
4214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4215   cat >> confdefs.h <<EOF
4216 #define $ac_tr_hdr 1
4217 EOF
4218  
4219 else
4220   echo "$ac_t""no" 1>&6
4221 fi
4222 done
4223
4224
4225     for ac_hdr in readline.h readline/readline.h
4226 do
4227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4229 echo "configure:4230: checking for $ac_hdr" >&5
4230 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4231   echo $ac_n "(cached) $ac_c" 1>&6
4232 else
4233   cat > conftest.$ac_ext <<EOF
4234 #line 4235 "configure"
4235 #include "confdefs.h"
4236 #include <$ac_hdr>
4237 EOF
4238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4239 { (eval echo configure:4240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4241 if test -z "$ac_err"; then
4242   rm -rf conftest*
4243   eval "ac_cv_header_$ac_safe=yes"
4244 else
4245   echo "$ac_err" >&5
4246   echo "configure: failed program was:" >&5
4247   cat conftest.$ac_ext >&5
4248   rm -rf conftest*
4249   eval "ac_cv_header_$ac_safe=no"
4250 fi
4251 rm -f conftest*
4252 fi
4253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4254   echo "$ac_t""yes" 1>&6
4255     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4256   cat >> confdefs.h <<EOF
4257 #define $ac_tr_hdr 1
4258 EOF
4259  
4260       for termlib in ncurses curses termcap terminfo termlib; do
4261        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4262 echo "configure:4263: checking for tgetent in -l${termlib}" >&5
4263 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4264 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   ac_save_LIBS="$LIBS"
4268 LIBS="-l${termlib}  $LIBS"
4269 cat > conftest.$ac_ext <<EOF
4270 #line 4271 "configure"
4271 #include "confdefs.h"
4272 /* Override any gcc2 internal prototype to avoid an error.  */
4273 /* We use char because int might match the return type of a gcc2
4274     builtin and then its argument prototype would still apply.  */
4275 char tgetent();
4276
4277 int main() {
4278 tgetent()
4279 ; return 0; }
4280 EOF
4281 if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4282   rm -rf conftest*
4283   eval "ac_cv_lib_$ac_lib_var=yes"
4284 else
4285   echo "configure: failed program was:" >&5
4286   cat conftest.$ac_ext >&5
4287   rm -rf conftest*
4288   eval "ac_cv_lib_$ac_lib_var=no"
4289 fi
4290 rm -f conftest*
4291 LIBS="$ac_save_LIBS"
4292
4293 fi
4294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4295   echo "$ac_t""yes" 1>&6
4296   TERMLIBS="-l${termlib}"; break
4297 else
4298   echo "$ac_t""no" 1>&6
4299 fi
4300
4301       done
4302       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4303 echo "configure:4304: checking for rl_callback_handler_install in -lreadline" >&5
4304 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4305 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4306   echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308   ac_save_LIBS="$LIBS"
4309 LIBS="-lreadline $TERMLIBS $LIBS"
4310 cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 /* Override any gcc2 internal prototype to avoid an error.  */
4314 /* We use char because int might match the return type of a gcc2
4315     builtin and then its argument prototype would still apply.  */
4316 char rl_callback_handler_install();
4317
4318 int main() {
4319 rl_callback_handler_install()
4320 ; return 0; }
4321 EOF
4322 if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4323   rm -rf conftest*
4324   eval "ac_cv_lib_$ac_lib_var=yes"
4325 else
4326   echo "configure: failed program was:" >&5
4327   cat conftest.$ac_ext >&5
4328   rm -rf conftest*
4329   eval "ac_cv_lib_$ac_lib_var=no"
4330 fi
4331 rm -f conftest*
4332 LIBS="$ac_save_LIBS"
4333
4334 fi
4335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4336   echo "$ac_t""yes" 1>&6
4337   TERMLIBS="-lreadline $TERMLIBS"
4338        cat >> confdefs.h <<\EOF
4339 #define HAVE_LIBREADLINE 1
4340 EOF
4341
4342        break
4343 else
4344   echo "$ac_t""no" 1>&6
4345 TERMLIBS=
4346 fi
4347
4348 else
4349   echo "$ac_t""no" 1>&6
4350 fi
4351 done
4352
4353     ;;
4354   no)
4355     echo "$ac_t""no" 1>&6
4356     ;;
4357   *)
4358     echo "$ac_t""yes" 1>&6
4359
4360     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4361     # alternate readline path
4362     _ldflags=${LDFLAGS}
4363     _cppflags=${CPPFLAGS}
4364
4365     # Add additional search path
4366     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4367     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4368
4369     for ac_hdr in readline.h history.h readline/readline.h
4370 do
4371 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4372 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4373 echo "configure:4374: checking for $ac_hdr" >&5
4374 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4375   echo $ac_n "(cached) $ac_c" 1>&6
4376 else
4377   cat > conftest.$ac_ext <<EOF
4378 #line 4379 "configure"
4379 #include "confdefs.h"
4380 #include <$ac_hdr>
4381 EOF
4382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4383 { (eval echo configure:4384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4385 if test -z "$ac_err"; then
4386   rm -rf conftest*
4387   eval "ac_cv_header_$ac_safe=yes"
4388 else
4389   echo "$ac_err" >&5
4390   echo "configure: failed program was:" >&5
4391   cat conftest.$ac_ext >&5
4392   rm -rf conftest*
4393   eval "ac_cv_header_$ac_safe=no"
4394 fi
4395 rm -f conftest*
4396 fi
4397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4398   echo "$ac_t""yes" 1>&6
4399     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4400   cat >> confdefs.h <<EOF
4401 #define $ac_tr_hdr 1
4402 EOF
4403  
4404 else
4405   echo "$ac_t""no" 1>&6
4406 fi
4407 done
4408
4409     for ac_hdr in readline/history.h
4410 do
4411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4413 echo "configure:4414: checking for $ac_hdr" >&5
4414 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4415   echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417   cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 #include <$ac_hdr>
4421 EOF
4422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4423 { (eval echo configure:4424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4425 if test -z "$ac_err"; then
4426   rm -rf conftest*
4427   eval "ac_cv_header_$ac_safe=yes"
4428 else
4429   echo "$ac_err" >&5
4430   echo "configure: failed program was:" >&5
4431   cat conftest.$ac_ext >&5
4432   rm -rf conftest*
4433   eval "ac_cv_header_$ac_safe=no"
4434 fi
4435 rm -f conftest*
4436 fi
4437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4438   echo "$ac_t""yes" 1>&6
4439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4440   cat >> confdefs.h <<EOF
4441 #define $ac_tr_hdr 1
4442 EOF
4443  
4444 else
4445   echo "$ac_t""no" 1>&6
4446 fi
4447 done
4448
4449
4450     for ac_hdr in readline.h readline/readline.h
4451 do
4452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4454 echo "configure:4455: checking for $ac_hdr" >&5
4455 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4456   echo $ac_n "(cached) $ac_c" 1>&6
4457 else
4458   cat > conftest.$ac_ext <<EOF
4459 #line 4460 "configure"
4460 #include "confdefs.h"
4461 #include <$ac_hdr>
4462 EOF
4463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4464 { (eval echo configure:4465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4466 if test -z "$ac_err"; then
4467   rm -rf conftest*
4468   eval "ac_cv_header_$ac_safe=yes"
4469 else
4470   echo "$ac_err" >&5
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -rf conftest*
4474   eval "ac_cv_header_$ac_safe=no"
4475 fi
4476 rm -f conftest*
4477 fi
4478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4479   echo "$ac_t""yes" 1>&6
4480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4481   cat >> confdefs.h <<EOF
4482 #define $ac_tr_hdr 1
4483 EOF
4484  
4485       for termlib in ncurses curses termcap terminfo termlib; do
4486        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4487 echo "configure:4488: checking for tgetent in -l${termlib}" >&5
4488 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4489 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4490   echo $ac_n "(cached) $ac_c" 1>&6
4491 else
4492   ac_save_LIBS="$LIBS"
4493 LIBS="-l${termlib}  $LIBS"
4494 cat > conftest.$ac_ext <<EOF
4495 #line 4496 "configure"
4496 #include "confdefs.h"
4497 /* Override any gcc2 internal prototype to avoid an error.  */
4498 /* We use char because int might match the return type of a gcc2
4499     builtin and then its argument prototype would still apply.  */
4500 char tgetent();
4501
4502 int main() {
4503 tgetent()
4504 ; return 0; }
4505 EOF
4506 if { (eval echo configure:4507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4507   rm -rf conftest*
4508   eval "ac_cv_lib_$ac_lib_var=yes"
4509 else
4510   echo "configure: failed program was:" >&5
4511   cat conftest.$ac_ext >&5
4512   rm -rf conftest*
4513   eval "ac_cv_lib_$ac_lib_var=no"
4514 fi
4515 rm -f conftest*
4516 LIBS="$ac_save_LIBS"
4517
4518 fi
4519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4520   echo "$ac_t""yes" 1>&6
4521   TERMLIBS="-l${termlib}"; break
4522 else
4523   echo "$ac_t""no" 1>&6
4524 fi
4525
4526       done
4527       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4528 echo "configure:4529: checking for rl_callback_handler_install in -lreadline" >&5
4529 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4530 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4531   echo $ac_n "(cached) $ac_c" 1>&6
4532 else
4533   ac_save_LIBS="$LIBS"
4534 LIBS="-lreadline $TERMLIBS $LIBS"
4535 cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4538 /* Override any gcc2 internal prototype to avoid an error.  */
4539 /* We use char because int might match the return type of a gcc2
4540     builtin and then its argument prototype would still apply.  */
4541 char rl_callback_handler_install();
4542
4543 int main() {
4544 rl_callback_handler_install()
4545 ; return 0; }
4546 EOF
4547 if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4548   rm -rf conftest*
4549   eval "ac_cv_lib_$ac_lib_var=yes"
4550 else
4551   echo "configure: failed program was:" >&5
4552   cat conftest.$ac_ext >&5
4553   rm -rf conftest*
4554   eval "ac_cv_lib_$ac_lib_var=no"
4555 fi
4556 rm -f conftest*
4557 LIBS="$ac_save_LIBS"
4558
4559 fi
4560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4561   echo "$ac_t""yes" 1>&6
4562   TERMLDFLAGS="-L$with_readline/lib"
4563        TERMCPPFLAGS="-I$with_readline/include"
4564        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4565        TERMLIBS="-lreadline $TERMLIBS"
4566        cat >> confdefs.h <<\EOF
4567 #define HAVE_LIBREADLINE 1
4568 EOF
4569
4570        break
4571 else
4572   echo "$ac_t""no" 1>&6
4573 TERMLIBS= CPPFLAGS=$_cppflags
4574 fi
4575
4576 else
4577   echo "$ac_t""no" 1>&6
4578 fi
4579 done
4580
4581
4582     LDFLAGS=$_ldflags
4583     ;;
4584   esac
4585 else
4586   echo "$ac_t""no" 1>&6
4587
4588 fi
4589
4590
4591
4592
4593 # The readline API changed slightly from readline3 to readline4, so
4594 # code will generate warnings on one of them unless we have a few
4595 # special cases.
4596 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4597 echo "configure:4598: checking for rl_completion_matches in -lreadline" >&5
4598 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4599 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4600   echo $ac_n "(cached) $ac_c" 1>&6
4601 else
4602   ac_save_LIBS="$LIBS"
4603 LIBS="-lreadline $TERMLIBS $LIBS"
4604 cat > conftest.$ac_ext <<EOF
4605 #line 4606 "configure"
4606 #include "confdefs.h"
4607 /* Override any gcc2 internal prototype to avoid an error.  */
4608 /* We use char because int might match the return type of a gcc2
4609     builtin and then its argument prototype would still apply.  */
4610 char rl_completion_matches();
4611
4612 int main() {
4613 rl_completion_matches()
4614 ; return 0; }
4615 EOF
4616 if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4617   rm -rf conftest*
4618   eval "ac_cv_lib_$ac_lib_var=yes"
4619 else
4620   echo "configure: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   rm -rf conftest*
4623   eval "ac_cv_lib_$ac_lib_var=no"
4624 fi
4625 rm -f conftest*
4626 LIBS="$ac_save_LIBS"
4627
4628 fi
4629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4630   echo "$ac_t""yes" 1>&6
4631   cat >> confdefs.h <<\EOF
4632 #define HAVE_NEW_LIBREADLINE 1
4633 EOF
4634
4635 else
4636   echo "$ac_t""no" 1>&6
4637 fi
4638
4639
4640 # The following test taken from the cvs sources
4641 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4642 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4643 # libsocket.so which has a bad implementation of gethostbyname (it
4644 # only looks in /etc/hosts), so we only look for -lsocket if we need
4645 # it.
4646 for ac_func in connect
4647 do
4648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4649 echo "configure:4650: checking for $ac_func" >&5
4650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4651   echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653   cat > conftest.$ac_ext <<EOF
4654 #line 4655 "configure"
4655 #include "confdefs.h"
4656 /* System header to define __stub macros and hopefully few prototypes,
4657     which can conflict with char $ac_func(); below.  */
4658 #include <assert.h>
4659 /* Override any gcc2 internal prototype to avoid an error.  */
4660 /* We use char because int might match the return type of a gcc2
4661     builtin and then its argument prototype would still apply.  */
4662 char $ac_func();
4663
4664 int main() {
4665
4666 /* The GNU C library defines this for functions which it implements
4667     to always fail with ENOSYS.  Some functions are actually named
4668     something starting with __ and the normal name is an alias.  */
4669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4670 choke me
4671 #else
4672 $ac_func();
4673 #endif
4674
4675 ; return 0; }
4676 EOF
4677 if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4678   rm -rf conftest*
4679   eval "ac_cv_func_$ac_func=yes"
4680 else
4681   echo "configure: failed program was:" >&5
4682   cat conftest.$ac_ext >&5
4683   rm -rf conftest*
4684   eval "ac_cv_func_$ac_func=no"
4685 fi
4686 rm -f conftest*
4687 fi
4688
4689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4690   echo "$ac_t""yes" 1>&6
4691     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4692   cat >> confdefs.h <<EOF
4693 #define $ac_tr_func 1
4694 EOF
4695  
4696 else
4697   echo "$ac_t""no" 1>&6
4698 fi
4699 done
4700
4701 if test x"$ac_cv_func_connect" = x"no"; then
4702     case "$LIBS" in
4703     *-lnsl*) ;;
4704     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4705 echo "configure:4706: checking for printf in -lnsl_s" >&5
4706 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4707 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4708   echo $ac_n "(cached) $ac_c" 1>&6
4709 else
4710   ac_save_LIBS="$LIBS"
4711 LIBS="-lnsl_s  $LIBS"
4712 cat > conftest.$ac_ext <<EOF
4713 #line 4714 "configure"
4714 #include "confdefs.h"
4715 /* Override any gcc2 internal prototype to avoid an error.  */
4716 /* We use char because int might match the return type of a gcc2
4717     builtin and then its argument prototype would still apply.  */
4718 char printf();
4719
4720 int main() {
4721 printf()
4722 ; return 0; }
4723 EOF
4724 if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4725   rm -rf conftest*
4726   eval "ac_cv_lib_$ac_lib_var=yes"
4727 else
4728   echo "configure: failed program was:" >&5
4729   cat conftest.$ac_ext >&5
4730   rm -rf conftest*
4731   eval "ac_cv_lib_$ac_lib_var=no"
4732 fi
4733 rm -f conftest*
4734 LIBS="$ac_save_LIBS"
4735
4736 fi
4737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4738   echo "$ac_t""yes" 1>&6
4739     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4740     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4741   cat >> confdefs.h <<EOF
4742 #define $ac_tr_lib 1
4743 EOF
4744
4745   LIBS="-lnsl_s $LIBS"
4746
4747 else
4748   echo "$ac_t""no" 1>&6
4749 fi
4750  ;;
4751     esac
4752     case "$LIBS" in
4753     *-lnsl*) ;;
4754     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4755 echo "configure:4756: checking for printf in -lnsl" >&5
4756 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4757 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4758   echo $ac_n "(cached) $ac_c" 1>&6
4759 else
4760   ac_save_LIBS="$LIBS"
4761 LIBS="-lnsl  $LIBS"
4762 cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 /* Override any gcc2 internal prototype to avoid an error.  */
4766 /* We use char because int might match the return type of a gcc2
4767     builtin and then its argument prototype would still apply.  */
4768 char printf();
4769
4770 int main() {
4771 printf()
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   eval "ac_cv_lib_$ac_lib_var=yes"
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   eval "ac_cv_lib_$ac_lib_var=no"
4782 fi
4783 rm -f conftest*
4784 LIBS="$ac_save_LIBS"
4785
4786 fi
4787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4788   echo "$ac_t""yes" 1>&6
4789     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4790     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4791   cat >> confdefs.h <<EOF
4792 #define $ac_tr_lib 1
4793 EOF
4794
4795   LIBS="-lnsl $LIBS"
4796
4797 else
4798   echo "$ac_t""no" 1>&6
4799 fi
4800  ;;
4801     esac
4802     case "$LIBS" in
4803     *-lsocket*) ;;
4804     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4805 echo "configure:4806: checking for connect in -lsocket" >&5
4806 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4807 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4808   echo $ac_n "(cached) $ac_c" 1>&6
4809 else
4810   ac_save_LIBS="$LIBS"
4811 LIBS="-lsocket  $LIBS"
4812 cat > conftest.$ac_ext <<EOF
4813 #line 4814 "configure"
4814 #include "confdefs.h"
4815 /* Override any gcc2 internal prototype to avoid an error.  */
4816 /* We use char because int might match the return type of a gcc2
4817     builtin and then its argument prototype would still apply.  */
4818 char connect();
4819
4820 int main() {
4821 connect()
4822 ; return 0; }
4823 EOF
4824 if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4825   rm -rf conftest*
4826   eval "ac_cv_lib_$ac_lib_var=yes"
4827 else
4828   echo "configure: failed program was:" >&5
4829   cat conftest.$ac_ext >&5
4830   rm -rf conftest*
4831   eval "ac_cv_lib_$ac_lib_var=no"
4832 fi
4833 rm -f conftest*
4834 LIBS="$ac_save_LIBS"
4835
4836 fi
4837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4838   echo "$ac_t""yes" 1>&6
4839     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4840     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4841   cat >> confdefs.h <<EOF
4842 #define $ac_tr_lib 1
4843 EOF
4844
4845   LIBS="-lsocket $LIBS"
4846
4847 else
4848   echo "$ac_t""no" 1>&6
4849 fi
4850  ;;
4851     esac
4852     case "$LIBS" in
4853     *-linet*) ;;
4854     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4855 echo "configure:4856: checking for connect in -linet" >&5
4856 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4857 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4858   echo $ac_n "(cached) $ac_c" 1>&6
4859 else
4860   ac_save_LIBS="$LIBS"
4861 LIBS="-linet  $LIBS"
4862 cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865 /* Override any gcc2 internal prototype to avoid an error.  */
4866 /* We use char because int might match the return type of a gcc2
4867     builtin and then its argument prototype would still apply.  */
4868 char connect();
4869
4870 int main() {
4871 connect()
4872 ; return 0; }
4873 EOF
4874 if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4875   rm -rf conftest*
4876   eval "ac_cv_lib_$ac_lib_var=yes"
4877 else
4878   echo "configure: failed program was:" >&5
4879   cat conftest.$ac_ext >&5
4880   rm -rf conftest*
4881   eval "ac_cv_lib_$ac_lib_var=no"
4882 fi
4883 rm -f conftest*
4884 LIBS="$ac_save_LIBS"
4885
4886 fi
4887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4888   echo "$ac_t""yes" 1>&6
4889     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4890     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4891   cat >> confdefs.h <<EOF
4892 #define $ac_tr_lib 1
4893 EOF
4894
4895   LIBS="-linet $LIBS"
4896
4897 else
4898   echo "$ac_t""no" 1>&6
4899 fi
4900  ;;
4901     esac
4902             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4903        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4904         # ac_cv_func_connect=yes
4905         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4906         cat >> confdefs.h <<\EOF
4907 #define HAVE_CONNECT 1
4908 EOF
4909
4910     fi
4911 fi
4912
4913 ###############################################
4914 # test for where we get get_yp_default_domain() from
4915 for ac_func in yp_get_default_domain
4916 do
4917 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4918 echo "configure:4919: checking for $ac_func" >&5
4919 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4920   echo $ac_n "(cached) $ac_c" 1>&6
4921 else
4922   cat > conftest.$ac_ext <<EOF
4923 #line 4924 "configure"
4924 #include "confdefs.h"
4925 /* System header to define __stub macros and hopefully few prototypes,
4926     which can conflict with char $ac_func(); below.  */
4927 #include <assert.h>
4928 /* Override any gcc2 internal prototype to avoid an error.  */
4929 /* We use char because int might match the return type of a gcc2
4930     builtin and then its argument prototype would still apply.  */
4931 char $ac_func();
4932
4933 int main() {
4934
4935 /* The GNU C library defines this for functions which it implements
4936     to always fail with ENOSYS.  Some functions are actually named
4937     something starting with __ and the normal name is an alias.  */
4938 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4939 choke me
4940 #else
4941 $ac_func();
4942 #endif
4943
4944 ; return 0; }
4945 EOF
4946 if { (eval echo configure:4947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4947   rm -rf conftest*
4948   eval "ac_cv_func_$ac_func=yes"
4949 else
4950   echo "configure: failed program was:" >&5
4951   cat conftest.$ac_ext >&5
4952   rm -rf conftest*
4953   eval "ac_cv_func_$ac_func=no"
4954 fi
4955 rm -f conftest*
4956 fi
4957
4958 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4959   echo "$ac_t""yes" 1>&6
4960     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4961   cat >> confdefs.h <<EOF
4962 #define $ac_tr_func 1
4963 EOF
4964  
4965 else
4966   echo "$ac_t""no" 1>&6
4967 fi
4968 done
4969
4970 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4971         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4972 echo "configure:4973: checking for yp_get_default_domain in -lnsl" >&5
4973 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4974 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4975   echo $ac_n "(cached) $ac_c" 1>&6
4976 else
4977   ac_save_LIBS="$LIBS"
4978 LIBS="-lnsl  $LIBS"
4979 cat > conftest.$ac_ext <<EOF
4980 #line 4981 "configure"
4981 #include "confdefs.h"
4982 /* Override any gcc2 internal prototype to avoid an error.  */
4983 /* We use char because int might match the return type of a gcc2
4984     builtin and then its argument prototype would still apply.  */
4985 char yp_get_default_domain();
4986
4987 int main() {
4988 yp_get_default_domain()
4989 ; return 0; }
4990 EOF
4991 if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4992   rm -rf conftest*
4993   eval "ac_cv_lib_$ac_lib_var=yes"
4994 else
4995   echo "configure: failed program was:" >&5
4996   cat conftest.$ac_ext >&5
4997   rm -rf conftest*
4998   eval "ac_cv_lib_$ac_lib_var=no"
4999 fi
5000 rm -f conftest*
5001 LIBS="$ac_save_LIBS"
5002
5003 fi
5004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5005   echo "$ac_t""yes" 1>&6
5006   LIBS="$LIBS -lnsl";
5007         cat >> confdefs.h <<\EOF
5008 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5009 EOF
5010
5011 else
5012   echo "$ac_t""no" 1>&6
5013 fi
5014  
5015 fi
5016
5017 # Check if we have execl, if not we need to compile smbrun.
5018 for ac_func in execl
5019 do
5020 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5021 echo "configure:5022: checking for $ac_func" >&5
5022 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5023   echo $ac_n "(cached) $ac_c" 1>&6
5024 else
5025   cat > conftest.$ac_ext <<EOF
5026 #line 5027 "configure"
5027 #include "confdefs.h"
5028 /* System header to define __stub macros and hopefully few prototypes,
5029     which can conflict with char $ac_func(); below.  */
5030 #include <assert.h>
5031 /* Override any gcc2 internal prototype to avoid an error.  */
5032 /* We use char because int might match the return type of a gcc2
5033     builtin and then its argument prototype would still apply.  */
5034 char $ac_func();
5035
5036 int main() {
5037
5038 /* The GNU C library defines this for functions which it implements
5039     to always fail with ENOSYS.  Some functions are actually named
5040     something starting with __ and the normal name is an alias.  */
5041 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5042 choke me
5043 #else
5044 $ac_func();
5045 #endif
5046
5047 ; return 0; }
5048 EOF
5049 if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5050   rm -rf conftest*
5051   eval "ac_cv_func_$ac_func=yes"
5052 else
5053   echo "configure: failed program was:" >&5
5054   cat conftest.$ac_ext >&5
5055   rm -rf conftest*
5056   eval "ac_cv_func_$ac_func=no"
5057 fi
5058 rm -f conftest*
5059 fi
5060
5061 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5062   echo "$ac_t""yes" 1>&6
5063     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5064   cat >> confdefs.h <<EOF
5065 #define $ac_tr_func 1
5066 EOF
5067  
5068 else
5069   echo "$ac_t""no" 1>&6
5070 fi
5071 done
5072
5073 if test x"$ac_cv_func_execl" = x"no"; then
5074     RUNPROG="bin/smbrun"
5075 else
5076     RUNPROG=""
5077 fi
5078
5079 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5080 do
5081 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5082 echo "configure:5083: checking for $ac_func" >&5
5083 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5084   echo $ac_n "(cached) $ac_c" 1>&6
5085 else
5086   cat > conftest.$ac_ext <<EOF
5087 #line 5088 "configure"
5088 #include "confdefs.h"
5089 /* System header to define __stub macros and hopefully few prototypes,
5090     which can conflict with char $ac_func(); below.  */
5091 #include <assert.h>
5092 /* Override any gcc2 internal prototype to avoid an error.  */
5093 /* We use char because int might match the return type of a gcc2
5094     builtin and then its argument prototype would still apply.  */
5095 char $ac_func();
5096
5097 int main() {
5098
5099 /* The GNU C library defines this for functions which it implements
5100     to always fail with ENOSYS.  Some functions are actually named
5101     something starting with __ and the normal name is an alias.  */
5102 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5103 choke me
5104 #else
5105 $ac_func();
5106 #endif
5107
5108 ; return 0; }
5109 EOF
5110 if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5111   rm -rf conftest*
5112   eval "ac_cv_func_$ac_func=yes"
5113 else
5114   echo "configure: failed program was:" >&5
5115   cat conftest.$ac_ext >&5
5116   rm -rf conftest*
5117   eval "ac_cv_func_$ac_func=no"
5118 fi
5119 rm -f conftest*
5120 fi
5121
5122 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5123   echo "$ac_t""yes" 1>&6
5124     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5125   cat >> confdefs.h <<EOF
5126 #define $ac_tr_func 1
5127 EOF
5128  
5129 else
5130   echo "$ac_t""no" 1>&6
5131 fi
5132 done
5133
5134 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat
5135 do
5136 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5137 echo "configure:5138: checking for $ac_func" >&5
5138 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5139   echo $ac_n "(cached) $ac_c" 1>&6
5140 else
5141   cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144 /* System header to define __stub macros and hopefully few prototypes,
5145     which can conflict with char $ac_func(); below.  */
5146 #include <assert.h>
5147 /* Override any gcc2 internal prototype to avoid an error.  */
5148 /* We use char because int might match the return type of a gcc2
5149     builtin and then its argument prototype would still apply.  */
5150 char $ac_func();
5151
5152 int main() {
5153
5154 /* The GNU C library defines this for functions which it implements
5155     to always fail with ENOSYS.  Some functions are actually named
5156     something starting with __ and the normal name is an alias.  */
5157 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5158 choke me
5159 #else
5160 $ac_func();
5161 #endif
5162
5163 ; return 0; }
5164 EOF
5165 if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5166   rm -rf conftest*
5167   eval "ac_cv_func_$ac_func=yes"
5168 else
5169   echo "configure: failed program was:" >&5
5170   cat conftest.$ac_ext >&5
5171   rm -rf conftest*
5172   eval "ac_cv_func_$ac_func=no"
5173 fi
5174 rm -f conftest*
5175 fi
5176
5177 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5178   echo "$ac_t""yes" 1>&6
5179     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5180   cat >> confdefs.h <<EOF
5181 #define $ac_tr_func 1
5182 EOF
5183  
5184 else
5185   echo "$ac_t""no" 1>&6
5186 fi
5187 done
5188
5189 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5190 do
5191 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5192 echo "configure:5193: checking for $ac_func" >&5
5193 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196   cat > conftest.$ac_ext <<EOF
5197 #line 5198 "configure"
5198 #include "confdefs.h"
5199 /* System header to define __stub macros and hopefully few prototypes,
5200     which can conflict with char $ac_func(); below.  */
5201 #include <assert.h>
5202 /* Override any gcc2 internal prototype to avoid an error.  */
5203 /* We use char because int might match the return type of a gcc2
5204     builtin and then its argument prototype would still apply.  */
5205 char $ac_func();
5206
5207 int main() {
5208
5209 /* The GNU C library defines this for functions which it implements
5210     to always fail with ENOSYS.  Some functions are actually named
5211     something starting with __ and the normal name is an alias.  */
5212 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5213 choke me
5214 #else
5215 $ac_func();
5216 #endif
5217
5218 ; return 0; }
5219 EOF
5220 if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5221   rm -rf conftest*
5222   eval "ac_cv_func_$ac_func=yes"
5223 else
5224   echo "configure: failed program was:" >&5
5225   cat conftest.$ac_ext >&5
5226   rm -rf conftest*
5227   eval "ac_cv_func_$ac_func=no"
5228 fi
5229 rm -f conftest*
5230 fi
5231
5232 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5233   echo "$ac_t""yes" 1>&6
5234     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5235   cat >> confdefs.h <<EOF
5236 #define $ac_tr_func 1
5237 EOF
5238  
5239 else
5240   echo "$ac_t""no" 1>&6
5241 fi
5242 done
5243
5244 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5245 do
5246 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5247 echo "configure:5248: checking for $ac_func" >&5
5248 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5249   echo $ac_n "(cached) $ac_c" 1>&6
5250 else
5251   cat > conftest.$ac_ext <<EOF
5252 #line 5253 "configure"
5253 #include "confdefs.h"
5254 /* System header to define __stub macros and hopefully few prototypes,
5255     which can conflict with char $ac_func(); below.  */
5256 #include <assert.h>
5257 /* Override any gcc2 internal prototype to avoid an error.  */
5258 /* We use char because int might match the return type of a gcc2
5259     builtin and then its argument prototype would still apply.  */
5260 char $ac_func();
5261
5262 int main() {
5263
5264 /* The GNU C library defines this for functions which it implements
5265     to always fail with ENOSYS.  Some functions are actually named
5266     something starting with __ and the normal name is an alias.  */
5267 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5268 choke me
5269 #else
5270 $ac_func();
5271 #endif
5272
5273 ; return 0; }
5274 EOF
5275 if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5276   rm -rf conftest*
5277   eval "ac_cv_func_$ac_func=yes"
5278 else
5279   echo "configure: failed program was:" >&5
5280   cat conftest.$ac_ext >&5
5281   rm -rf conftest*
5282   eval "ac_cv_func_$ac_func=no"
5283 fi
5284 rm -f conftest*
5285 fi
5286
5287 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5288   echo "$ac_t""yes" 1>&6
5289     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5290   cat >> confdefs.h <<EOF
5291 #define $ac_tr_func 1
5292 EOF
5293  
5294 else
5295   echo "$ac_t""no" 1>&6
5296 fi
5297 done
5298
5299 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5300 do
5301 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5302 echo "configure:5303: checking for $ac_func" >&5
5303 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5304   echo $ac_n "(cached) $ac_c" 1>&6
5305 else
5306   cat > conftest.$ac_ext <<EOF
5307 #line 5308 "configure"
5308 #include "confdefs.h"
5309 /* System header to define __stub macros and hopefully few prototypes,
5310     which can conflict with char $ac_func(); below.  */
5311 #include <assert.h>
5312 /* Override any gcc2 internal prototype to avoid an error.  */
5313 /* We use char because int might match the return type of a gcc2
5314     builtin and then its argument prototype would still apply.  */
5315 char $ac_func();
5316
5317 int main() {
5318
5319 /* The GNU C library defines this for functions which it implements
5320     to always fail with ENOSYS.  Some functions are actually named
5321     something starting with __ and the normal name is an alias.  */
5322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5323 choke me
5324 #else
5325 $ac_func();
5326 #endif
5327
5328 ; return 0; }
5329 EOF
5330 if { (eval echo configure:5331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5331   rm -rf conftest*
5332   eval "ac_cv_func_$ac_func=yes"
5333 else
5334   echo "configure: failed program was:" >&5
5335   cat conftest.$ac_ext >&5
5336   rm -rf conftest*
5337   eval "ac_cv_func_$ac_func=no"
5338 fi
5339 rm -f conftest*
5340 fi
5341
5342 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5343   echo "$ac_t""yes" 1>&6
5344     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5345   cat >> confdefs.h <<EOF
5346 #define $ac_tr_func 1
5347 EOF
5348  
5349 else
5350   echo "$ac_t""no" 1>&6
5351 fi
5352 done
5353
5354 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5355 do
5356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5357 echo "configure:5358: checking for $ac_func" >&5
5358 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5359   echo $ac_n "(cached) $ac_c" 1>&6
5360 else
5361   cat > conftest.$ac_ext <<EOF
5362 #line 5363 "configure"
5363 #include "confdefs.h"
5364 /* System header to define __stub macros and hopefully few prototypes,
5365     which can conflict with char $ac_func(); below.  */
5366 #include <assert.h>
5367 /* Override any gcc2 internal prototype to avoid an error.  */
5368 /* We use char because int might match the return type of a gcc2
5369     builtin and then its argument prototype would still apply.  */
5370 char $ac_func();
5371
5372 int main() {
5373
5374 /* The GNU C library defines this for functions which it implements
5375     to always fail with ENOSYS.  Some functions are actually named
5376     something starting with __ and the normal name is an alias.  */
5377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5378 choke me
5379 #else
5380 $ac_func();
5381 #endif
5382
5383 ; return 0; }
5384 EOF
5385 if { (eval echo configure:5386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5386   rm -rf conftest*
5387   eval "ac_cv_func_$ac_func=yes"
5388 else
5389   echo "configure: failed program was:" >&5
5390   cat conftest.$ac_ext >&5
5391   rm -rf conftest*
5392   eval "ac_cv_func_$ac_func=no"
5393 fi
5394 rm -f conftest*
5395 fi
5396
5397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5398   echo "$ac_t""yes" 1>&6
5399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5400   cat >> confdefs.h <<EOF
5401 #define $ac_tr_func 1
5402 EOF
5403  
5404 else
5405   echo "$ac_t""no" 1>&6
5406 fi
5407 done
5408
5409 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5410 do
5411 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5412 echo "configure:5413: checking for $ac_func" >&5
5413 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5414   echo $ac_n "(cached) $ac_c" 1>&6
5415 else
5416   cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419 /* System header to define __stub macros and hopefully few prototypes,
5420     which can conflict with char $ac_func(); below.  */
5421 #include <assert.h>
5422 /* Override any gcc2 internal prototype to avoid an error.  */
5423 /* We use char because int might match the return type of a gcc2
5424     builtin and then its argument prototype would still apply.  */
5425 char $ac_func();
5426
5427 int main() {
5428
5429 /* The GNU C library defines this for functions which it implements
5430     to always fail with ENOSYS.  Some functions are actually named
5431     something starting with __ and the normal name is an alias.  */
5432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5433 choke me
5434 #else
5435 $ac_func();
5436 #endif
5437
5438 ; return 0; }
5439 EOF
5440 if { (eval echo configure:5441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5441   rm -rf conftest*
5442   eval "ac_cv_func_$ac_func=yes"
5443 else
5444   echo "configure: failed program was:" >&5
5445   cat conftest.$ac_ext >&5
5446   rm -rf conftest*
5447   eval "ac_cv_func_$ac_func=no"
5448 fi
5449 rm -f conftest*
5450 fi
5451
5452 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5453   echo "$ac_t""yes" 1>&6
5454     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5455   cat >> confdefs.h <<EOF
5456 #define $ac_tr_func 1
5457 EOF
5458  
5459 else
5460   echo "$ac_t""no" 1>&6
5461 fi
5462 done
5463
5464 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5465 do
5466 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5467 echo "configure:5468: checking for $ac_func" >&5
5468 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5469   echo $ac_n "(cached) $ac_c" 1>&6
5470 else
5471   cat > conftest.$ac_ext <<EOF
5472 #line 5473 "configure"
5473 #include "confdefs.h"
5474 /* System header to define __stub macros and hopefully few prototypes,
5475     which can conflict with char $ac_func(); below.  */
5476 #include <assert.h>
5477 /* Override any gcc2 internal prototype to avoid an error.  */
5478 /* We use char because int might match the return type of a gcc2
5479     builtin and then its argument prototype would still apply.  */
5480 char $ac_func();
5481
5482 int main() {
5483
5484 /* The GNU C library defines this for functions which it implements
5485     to always fail with ENOSYS.  Some functions are actually named
5486     something starting with __ and the normal name is an alias.  */
5487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5488 choke me
5489 #else
5490 $ac_func();
5491 #endif
5492
5493 ; return 0; }
5494 EOF
5495 if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5496   rm -rf conftest*
5497   eval "ac_cv_func_$ac_func=yes"
5498 else
5499   echo "configure: failed program was:" >&5
5500   cat conftest.$ac_ext >&5
5501   rm -rf conftest*
5502   eval "ac_cv_func_$ac_func=no"
5503 fi
5504 rm -f conftest*
5505 fi
5506
5507 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5508   echo "$ac_t""yes" 1>&6
5509     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5510   cat >> confdefs.h <<EOF
5511 #define $ac_tr_func 1
5512 EOF
5513  
5514 else
5515   echo "$ac_t""no" 1>&6
5516 fi
5517 done
5518
5519 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5520 do
5521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5522 echo "configure:5523: checking for $ac_func" >&5
5523 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5524   echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526   cat > conftest.$ac_ext <<EOF
5527 #line 5528 "configure"
5528 #include "confdefs.h"
5529 /* System header to define __stub macros and hopefully few prototypes,
5530     which can conflict with char $ac_func(); below.  */
5531 #include <assert.h>
5532 /* Override any gcc2 internal prototype to avoid an error.  */
5533 /* We use char because int might match the return type of a gcc2
5534     builtin and then its argument prototype would still apply.  */
5535 char $ac_func();
5536
5537 int main() {
5538
5539 /* The GNU C library defines this for functions which it implements
5540     to always fail with ENOSYS.  Some functions are actually named
5541     something starting with __ and the normal name is an alias.  */
5542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5543 choke me
5544 #else
5545 $ac_func();
5546 #endif
5547
5548 ; return 0; }
5549 EOF
5550 if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5551   rm -rf conftest*
5552   eval "ac_cv_func_$ac_func=yes"
5553 else
5554   echo "configure: failed program was:" >&5
5555   cat conftest.$ac_ext >&5
5556   rm -rf conftest*
5557   eval "ac_cv_func_$ac_func=no"
5558 fi
5559 rm -f conftest*
5560 fi
5561
5562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5563   echo "$ac_t""yes" 1>&6
5564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5565   cat >> confdefs.h <<EOF
5566 #define $ac_tr_func 1
5567 EOF
5568  
5569 else
5570   echo "$ac_t""no" 1>&6
5571 fi
5572 done
5573
5574 # setbuffer is needed for smbtorture
5575 for ac_func in setbuffer
5576 do
5577 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5578 echo "configure:5579: checking for $ac_func" >&5
5579 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5580   echo $ac_n "(cached) $ac_c" 1>&6
5581 else
5582   cat > conftest.$ac_ext <<EOF
5583 #line 5584 "configure"
5584 #include "confdefs.h"
5585 /* System header to define __stub macros and hopefully few prototypes,
5586     which can conflict with char $ac_func(); below.  */
5587 #include <assert.h>
5588 /* Override any gcc2 internal prototype to avoid an error.  */
5589 /* We use char because int might match the return type of a gcc2
5590     builtin and then its argument prototype would still apply.  */
5591 char $ac_func();
5592
5593 int main() {
5594
5595 /* The GNU C library defines this for functions which it implements
5596     to always fail with ENOSYS.  Some functions are actually named
5597     something starting with __ and the normal name is an alias.  */
5598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5599 choke me
5600 #else
5601 $ac_func();
5602 #endif
5603
5604 ; return 0; }
5605 EOF
5606 if { (eval echo configure:5607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5607   rm -rf conftest*
5608   eval "ac_cv_func_$ac_func=yes"
5609 else
5610   echo "configure: failed program was:" >&5
5611   cat conftest.$ac_ext >&5
5612   rm -rf conftest*
5613   eval "ac_cv_func_$ac_func=no"
5614 fi
5615 rm -f conftest*
5616 fi
5617
5618 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5619   echo "$ac_t""yes" 1>&6
5620     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5621   cat >> confdefs.h <<EOF
5622 #define $ac_tr_func 1
5623 EOF
5624  
5625 else
5626   echo "$ac_t""no" 1>&6
5627 fi
5628 done
5629
5630
5631 # syscall() is needed for smbwrapper.
5632 for ac_func in syscall
5633 do
5634 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5635 echo "configure:5636: checking for $ac_func" >&5
5636 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5637   echo $ac_n "(cached) $ac_c" 1>&6
5638 else
5639   cat > conftest.$ac_ext <<EOF
5640 #line 5641 "configure"
5641 #include "confdefs.h"
5642 /* System header to define __stub macros and hopefully few prototypes,
5643     which can conflict with char $ac_func(); below.  */
5644 #include <assert.h>
5645 /* Override any gcc2 internal prototype to avoid an error.  */
5646 /* We use char because int might match the return type of a gcc2
5647     builtin and then its argument prototype would still apply.  */
5648 char $ac_func();
5649
5650 int main() {
5651
5652 /* The GNU C library defines this for functions which it implements
5653     to always fail with ENOSYS.  Some functions are actually named
5654     something starting with __ and the normal name is an alias.  */
5655 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5656 choke me
5657 #else
5658 $ac_func();
5659 #endif
5660
5661 ; return 0; }
5662 EOF
5663 if { (eval echo configure:5664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5664   rm -rf conftest*
5665   eval "ac_cv_func_$ac_func=yes"
5666 else
5667   echo "configure: failed program was:" >&5
5668   cat conftest.$ac_ext >&5
5669   rm -rf conftest*
5670   eval "ac_cv_func_$ac_func=no"
5671 fi
5672 rm -f conftest*
5673 fi
5674
5675 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5676   echo "$ac_t""yes" 1>&6
5677     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5678   cat >> confdefs.h <<EOF
5679 #define $ac_tr_func 1
5680 EOF
5681  
5682 else
5683   echo "$ac_t""no" 1>&6
5684 fi
5685 done
5686
5687
5688 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5689 do
5690 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5691 echo "configure:5692: checking for $ac_func" >&5
5692 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5693   echo $ac_n "(cached) $ac_c" 1>&6
5694 else
5695   cat > conftest.$ac_ext <<EOF
5696 #line 5697 "configure"
5697 #include "confdefs.h"
5698 /* System header to define __stub macros and hopefully few prototypes,
5699     which can conflict with char $ac_func(); below.  */
5700 #include <assert.h>
5701 /* Override any gcc2 internal prototype to avoid an error.  */
5702 /* We use char because int might match the return type of a gcc2
5703     builtin and then its argument prototype would still apply.  */
5704 char $ac_func();
5705
5706 int main() {
5707
5708 /* The GNU C library defines this for functions which it implements
5709     to always fail with ENOSYS.  Some functions are actually named
5710     something starting with __ and the normal name is an alias.  */
5711 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5712 choke me
5713 #else
5714 $ac_func();
5715 #endif
5716
5717 ; return 0; }
5718 EOF
5719 if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5720   rm -rf conftest*
5721   eval "ac_cv_func_$ac_func=yes"
5722 else
5723   echo "configure: failed program was:" >&5
5724   cat conftest.$ac_ext >&5
5725   rm -rf conftest*
5726   eval "ac_cv_func_$ac_func=no"
5727 fi
5728 rm -f conftest*
5729 fi
5730
5731 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5732   echo "$ac_t""yes" 1>&6
5733     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5734   cat >> confdefs.h <<EOF
5735 #define $ac_tr_func 1
5736 EOF
5737  
5738 else
5739   echo "$ac_t""no" 1>&6
5740 fi
5741 done
5742
5743 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5744 do
5745 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5746 echo "configure:5747: checking for $ac_func" >&5
5747 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5748   echo $ac_n "(cached) $ac_c" 1>&6
5749 else
5750   cat > conftest.$ac_ext <<EOF
5751 #line 5752 "configure"
5752 #include "confdefs.h"
5753 /* System header to define __stub macros and hopefully few prototypes,
5754     which can conflict with char $ac_func(); below.  */
5755 #include <assert.h>
5756 /* Override any gcc2 internal prototype to avoid an error.  */
5757 /* We use char because int might match the return type of a gcc2
5758     builtin and then its argument prototype would still apply.  */
5759 char $ac_func();
5760
5761 int main() {
5762
5763 /* The GNU C library defines this for functions which it implements
5764     to always fail with ENOSYS.  Some functions are actually named
5765     something starting with __ and the normal name is an alias.  */
5766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5767 choke me
5768 #else
5769 $ac_func();
5770 #endif
5771
5772 ; return 0; }
5773 EOF
5774 if { (eval echo configure:5775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5775   rm -rf conftest*
5776   eval "ac_cv_func_$ac_func=yes"
5777 else
5778   echo "configure: failed program was:" >&5
5779   cat conftest.$ac_ext >&5
5780   rm -rf conftest*
5781   eval "ac_cv_func_$ac_func=no"
5782 fi
5783 rm -f conftest*
5784 fi
5785
5786 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5787   echo "$ac_t""yes" 1>&6
5788     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5789   cat >> confdefs.h <<EOF
5790 #define $ac_tr_func 1
5791 EOF
5792  
5793 else
5794   echo "$ac_t""no" 1>&6
5795 fi
5796 done
5797
5798 for ac_func in __getcwd _getcwd
5799 do
5800 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5801 echo "configure:5802: checking for $ac_func" >&5
5802 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5803   echo $ac_n "(cached) $ac_c" 1>&6
5804 else
5805   cat > conftest.$ac_ext <<EOF
5806 #line 5807 "configure"
5807 #include "confdefs.h"
5808 /* System header to define __stub macros and hopefully few prototypes,
5809     which can conflict with char $ac_func(); below.  */
5810 #include <assert.h>
5811 /* Override any gcc2 internal prototype to avoid an error.  */
5812 /* We use char because int might match the return type of a gcc2
5813     builtin and then its argument prototype would still apply.  */
5814 char $ac_func();
5815
5816 int main() {
5817
5818 /* The GNU C library defines this for functions which it implements
5819     to always fail with ENOSYS.  Some functions are actually named
5820     something starting with __ and the normal name is an alias.  */
5821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5822 choke me
5823 #else
5824 $ac_func();
5825 #endif
5826
5827 ; return 0; }
5828 EOF
5829 if { (eval echo configure:5830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5830   rm -rf conftest*
5831   eval "ac_cv_func_$ac_func=yes"
5832 else
5833   echo "configure: failed program was:" >&5
5834   cat conftest.$ac_ext >&5
5835   rm -rf conftest*
5836   eval "ac_cv_func_$ac_func=no"
5837 fi
5838 rm -f conftest*
5839 fi
5840
5841 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5842   echo "$ac_t""yes" 1>&6
5843     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5844   cat >> confdefs.h <<EOF
5845 #define $ac_tr_func 1
5846 EOF
5847  
5848 else
5849   echo "$ac_t""no" 1>&6
5850 fi
5851 done
5852
5853 for ac_func in __xstat __fxstat __lxstat
5854 do
5855 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5856 echo "configure:5857: checking for $ac_func" >&5
5857 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5858   echo $ac_n "(cached) $ac_c" 1>&6
5859 else
5860   cat > conftest.$ac_ext <<EOF
5861 #line 5862 "configure"
5862 #include "confdefs.h"
5863 /* System header to define __stub macros and hopefully few prototypes,
5864     which can conflict with char $ac_func(); below.  */
5865 #include <assert.h>
5866 /* Override any gcc2 internal prototype to avoid an error.  */
5867 /* We use char because int might match the return type of a gcc2
5868     builtin and then its argument prototype would still apply.  */
5869 char $ac_func();
5870
5871 int main() {
5872
5873 /* The GNU C library defines this for functions which it implements
5874     to always fail with ENOSYS.  Some functions are actually named
5875     something starting with __ and the normal name is an alias.  */
5876 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5877 choke me
5878 #else
5879 $ac_func();
5880 #endif
5881
5882 ; return 0; }
5883 EOF
5884 if { (eval echo configure:5885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5885   rm -rf conftest*
5886   eval "ac_cv_func_$ac_func=yes"
5887 else
5888   echo "configure: failed program was:" >&5
5889   cat conftest.$ac_ext >&5
5890   rm -rf conftest*
5891   eval "ac_cv_func_$ac_func=no"
5892 fi
5893 rm -f conftest*
5894 fi
5895
5896 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5897   echo "$ac_t""yes" 1>&6
5898     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5899   cat >> confdefs.h <<EOF
5900 #define $ac_tr_func 1
5901 EOF
5902  
5903 else
5904   echo "$ac_t""no" 1>&6
5905 fi
5906 done
5907
5908 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5909 do
5910 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5911 echo "configure:5912: checking for $ac_func" >&5
5912 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5913   echo $ac_n "(cached) $ac_c" 1>&6
5914 else
5915   cat > conftest.$ac_ext <<EOF
5916 #line 5917 "configure"
5917 #include "confdefs.h"
5918 /* System header to define __stub macros and hopefully few prototypes,
5919     which can conflict with char $ac_func(); below.  */
5920 #include <assert.h>
5921 /* Override any gcc2 internal prototype to avoid an error.  */
5922 /* We use char because int might match the return type of a gcc2
5923     builtin and then its argument prototype would still apply.  */
5924 char $ac_func();
5925
5926 int main() {
5927
5928 /* The GNU C library defines this for functions which it implements
5929     to always fail with ENOSYS.  Some functions are actually named
5930     something starting with __ and the normal name is an alias.  */
5931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5932 choke me
5933 #else
5934 $ac_func();
5935 #endif
5936
5937 ; return 0; }
5938 EOF
5939 if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5940   rm -rf conftest*
5941   eval "ac_cv_func_$ac_func=yes"
5942 else
5943   echo "configure: failed program was:" >&5
5944   cat conftest.$ac_ext >&5
5945   rm -rf conftest*
5946   eval "ac_cv_func_$ac_func=no"
5947 fi
5948 rm -f conftest*
5949 fi
5950
5951 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5952   echo "$ac_t""yes" 1>&6
5953     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5954   cat >> confdefs.h <<EOF
5955 #define $ac_tr_func 1
5956 EOF
5957  
5958 else
5959   echo "$ac_t""no" 1>&6
5960 fi
5961 done
5962
5963 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5964 do
5965 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5966 echo "configure:5967: checking for $ac_func" >&5
5967 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5968   echo $ac_n "(cached) $ac_c" 1>&6
5969 else
5970   cat > conftest.$ac_ext <<EOF
5971 #line 5972 "configure"
5972 #include "confdefs.h"
5973 /* System header to define __stub macros and hopefully few prototypes,
5974     which can conflict with char $ac_func(); below.  */
5975 #include <assert.h>
5976 /* Override any gcc2 internal prototype to avoid an error.  */
5977 /* We use char because int might match the return type of a gcc2
5978     builtin and then its argument prototype would still apply.  */
5979 char $ac_func();
5980
5981 int main() {
5982
5983 /* The GNU C library defines this for functions which it implements
5984     to always fail with ENOSYS.  Some functions are actually named
5985     something starting with __ and the normal name is an alias.  */
5986 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5987 choke me
5988 #else
5989 $ac_func();
5990 #endif
5991
5992 ; return 0; }
5993 EOF
5994 if { (eval echo configure:5995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5995   rm -rf conftest*
5996   eval "ac_cv_func_$ac_func=yes"
5997 else
5998   echo "configure: failed program was:" >&5
5999   cat conftest.$ac_ext >&5
6000   rm -rf conftest*
6001   eval "ac_cv_func_$ac_func=no"
6002 fi
6003 rm -f conftest*
6004 fi
6005
6006 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6007   echo "$ac_t""yes" 1>&6
6008     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6009   cat >> confdefs.h <<EOF
6010 #define $ac_tr_func 1
6011 EOF
6012  
6013 else
6014   echo "$ac_t""no" 1>&6
6015 fi
6016 done
6017
6018 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6019 do
6020 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6021 echo "configure:6022: checking for $ac_func" >&5
6022 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6023   echo $ac_n "(cached) $ac_c" 1>&6
6024 else
6025   cat > conftest.$ac_ext <<EOF
6026 #line 6027 "configure"
6027 #include "confdefs.h"
6028 /* System header to define __stub macros and hopefully few prototypes,
6029     which can conflict with char $ac_func(); below.  */
6030 #include <assert.h>
6031 /* Override any gcc2 internal prototype to avoid an error.  */
6032 /* We use char because int might match the return type of a gcc2
6033     builtin and then its argument prototype would still apply.  */
6034 char $ac_func();
6035
6036 int main() {
6037
6038 /* The GNU C library defines this for functions which it implements
6039     to always fail with ENOSYS.  Some functions are actually named
6040     something starting with __ and the normal name is an alias.  */
6041 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6042 choke me
6043 #else
6044 $ac_func();
6045 #endif
6046
6047 ; return 0; }
6048 EOF
6049 if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6050   rm -rf conftest*
6051   eval "ac_cv_func_$ac_func=yes"
6052 else
6053   echo "configure: failed program was:" >&5
6054   cat conftest.$ac_ext >&5
6055   rm -rf conftest*
6056   eval "ac_cv_func_$ac_func=no"
6057 fi
6058 rm -f conftest*
6059 fi
6060
6061 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6062   echo "$ac_t""yes" 1>&6
6063     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6064   cat >> confdefs.h <<EOF
6065 #define $ac_tr_func 1
6066 EOF
6067  
6068 else
6069   echo "$ac_t""no" 1>&6
6070 fi
6071 done
6072
6073 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6074 do
6075 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6076 echo "configure:6077: checking for $ac_func" >&5
6077 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6078   echo $ac_n "(cached) $ac_c" 1>&6
6079 else
6080   cat > conftest.$ac_ext <<EOF
6081 #line 6082 "configure"
6082 #include "confdefs.h"
6083 /* System header to define __stub macros and hopefully few prototypes,
6084     which can conflict with char $ac_func(); below.  */
6085 #include <assert.h>
6086 /* Override any gcc2 internal prototype to avoid an error.  */
6087 /* We use char because int might match the return type of a gcc2
6088     builtin and then its argument prototype would still apply.  */
6089 char $ac_func();
6090
6091 int main() {
6092
6093 /* The GNU C library defines this for functions which it implements
6094     to always fail with ENOSYS.  Some functions are actually named
6095     something starting with __ and the normal name is an alias.  */
6096 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6097 choke me
6098 #else
6099 $ac_func();
6100 #endif
6101
6102 ; return 0; }
6103 EOF
6104 if { (eval echo configure:6105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6105   rm -rf conftest*
6106   eval "ac_cv_func_$ac_func=yes"
6107 else
6108   echo "configure: failed program was:" >&5
6109   cat conftest.$ac_ext >&5
6110   rm -rf conftest*
6111   eval "ac_cv_func_$ac_func=no"
6112 fi
6113 rm -f conftest*
6114 fi
6115
6116 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6117   echo "$ac_t""yes" 1>&6
6118     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6119   cat >> confdefs.h <<EOF
6120 #define $ac_tr_func 1
6121 EOF
6122  
6123 else
6124   echo "$ac_t""no" 1>&6
6125 fi
6126 done
6127
6128 for ac_func in _write __write _fork __fork
6129 do
6130 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6131 echo "configure:6132: checking for $ac_func" >&5
6132 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6133   echo $ac_n "(cached) $ac_c" 1>&6
6134 else
6135   cat > conftest.$ac_ext <<EOF
6136 #line 6137 "configure"
6137 #include "confdefs.h"
6138 /* System header to define __stub macros and hopefully few prototypes,
6139     which can conflict with char $ac_func(); below.  */
6140 #include <assert.h>
6141 /* Override any gcc2 internal prototype to avoid an error.  */
6142 /* We use char because int might match the return type of a gcc2
6143     builtin and then its argument prototype would still apply.  */
6144 char $ac_func();
6145
6146 int main() {
6147
6148 /* The GNU C library defines this for functions which it implements
6149     to always fail with ENOSYS.  Some functions are actually named
6150     something starting with __ and the normal name is an alias.  */
6151 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6152 choke me
6153 #else
6154 $ac_func();
6155 #endif
6156
6157 ; return 0; }
6158 EOF
6159 if { (eval echo configure:6160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6160   rm -rf conftest*
6161   eval "ac_cv_func_$ac_func=yes"
6162 else
6163   echo "configure: failed program was:" >&5
6164   cat conftest.$ac_ext >&5
6165   rm -rf conftest*
6166   eval "ac_cv_func_$ac_func=no"
6167 fi
6168 rm -f conftest*
6169 fi
6170
6171 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6172   echo "$ac_t""yes" 1>&6
6173     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6174   cat >> confdefs.h <<EOF
6175 #define $ac_tr_func 1
6176 EOF
6177  
6178 else
6179   echo "$ac_t""no" 1>&6
6180 fi
6181 done
6182
6183 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6184 do
6185 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6186 echo "configure:6187: checking for $ac_func" >&5
6187 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6188   echo $ac_n "(cached) $ac_c" 1>&6
6189 else
6190   cat > conftest.$ac_ext <<EOF
6191 #line 6192 "configure"
6192 #include "confdefs.h"
6193 /* System header to define __stub macros and hopefully few prototypes,
6194     which can conflict with char $ac_func(); below.  */
6195 #include <assert.h>
6196 /* Override any gcc2 internal prototype to avoid an error.  */
6197 /* We use char because int might match the return type of a gcc2
6198     builtin and then its argument prototype would still apply.  */
6199 char $ac_func();
6200
6201 int main() {
6202
6203 /* The GNU C library defines this for functions which it implements
6204     to always fail with ENOSYS.  Some functions are actually named
6205     something starting with __ and the normal name is an alias.  */
6206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6207 choke me
6208 #else
6209 $ac_func();
6210 #endif
6211
6212 ; return 0; }
6213 EOF
6214 if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6215   rm -rf conftest*
6216   eval "ac_cv_func_$ac_func=yes"
6217 else
6218   echo "configure: failed program was:" >&5
6219   cat conftest.$ac_ext >&5
6220   rm -rf conftest*
6221   eval "ac_cv_func_$ac_func=no"
6222 fi
6223 rm -f conftest*
6224 fi
6225
6226 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6227   echo "$ac_t""yes" 1>&6
6228     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6229   cat >> confdefs.h <<EOF
6230 #define $ac_tr_func 1
6231 EOF
6232  
6233 else
6234   echo "$ac_t""no" 1>&6
6235 fi
6236 done
6237
6238 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6239 do
6240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6241 echo "configure:6242: checking for $ac_func" >&5
6242 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6243   echo $ac_n "(cached) $ac_c" 1>&6
6244 else
6245   cat > conftest.$ac_ext <<EOF
6246 #line 6247 "configure"
6247 #include "confdefs.h"
6248 /* System header to define __stub macros and hopefully few prototypes,
6249     which can conflict with char $ac_func(); below.  */
6250 #include <assert.h>
6251 /* Override any gcc2 internal prototype to avoid an error.  */
6252 /* We use char because int might match the return type of a gcc2
6253     builtin and then its argument prototype would still apply.  */
6254 char $ac_func();
6255
6256 int main() {
6257
6258 /* The GNU C library defines this for functions which it implements
6259     to always fail with ENOSYS.  Some functions are actually named
6260     something starting with __ and the normal name is an alias.  */
6261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6262 choke me
6263 #else
6264 $ac_func();
6265 #endif
6266
6267 ; return 0; }
6268 EOF
6269 if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6270   rm -rf conftest*
6271   eval "ac_cv_func_$ac_func=yes"
6272 else
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_func_$ac_func=no"
6277 fi
6278 rm -f conftest*
6279 fi
6280
6281 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6282   echo "$ac_t""yes" 1>&6
6283     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6284   cat >> confdefs.h <<EOF
6285 #define $ac_tr_func 1
6286 EOF
6287  
6288 else
6289   echo "$ac_t""no" 1>&6
6290 fi
6291 done
6292
6293 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6294 do
6295 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6296 echo "configure:6297: checking for $ac_func" >&5
6297 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6298   echo $ac_n "(cached) $ac_c" 1>&6
6299 else
6300   cat > conftest.$ac_ext <<EOF
6301 #line 6302 "configure"
6302 #include "confdefs.h"
6303 /* System header to define __stub macros and hopefully few prototypes,
6304     which can conflict with char $ac_func(); below.  */
6305 #include <assert.h>
6306 /* Override any gcc2 internal prototype to avoid an error.  */
6307 /* We use char because int might match the return type of a gcc2
6308     builtin and then its argument prototype would still apply.  */
6309 char $ac_func();
6310
6311 int main() {
6312
6313 /* The GNU C library defines this for functions which it implements
6314     to always fail with ENOSYS.  Some functions are actually named
6315     something starting with __ and the normal name is an alias.  */
6316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6317 choke me
6318 #else
6319 $ac_func();
6320 #endif
6321
6322 ; return 0; }
6323 EOF
6324 if { (eval echo configure:6325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6325   rm -rf conftest*
6326   eval "ac_cv_func_$ac_func=yes"
6327 else
6328   echo "configure: failed program was:" >&5
6329   cat conftest.$ac_ext >&5
6330   rm -rf conftest*
6331   eval "ac_cv_func_$ac_func=no"
6332 fi
6333 rm -f conftest*
6334 fi
6335
6336 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6337   echo "$ac_t""yes" 1>&6
6338     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6339   cat >> confdefs.h <<EOF
6340 #define $ac_tr_func 1
6341 EOF
6342  
6343 else
6344   echo "$ac_t""no" 1>&6
6345 fi
6346 done
6347
6348 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6349 do
6350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6351 echo "configure:6352: checking for $ac_func" >&5
6352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6353   echo $ac_n "(cached) $ac_c" 1>&6
6354 else
6355   cat > conftest.$ac_ext <<EOF
6356 #line 6357 "configure"
6357 #include "confdefs.h"
6358 /* System header to define __stub macros and hopefully few prototypes,
6359     which can conflict with char $ac_func(); below.  */
6360 #include <assert.h>
6361 /* Override any gcc2 internal prototype to avoid an error.  */
6362 /* We use char because int might match the return type of a gcc2
6363     builtin and then its argument prototype would still apply.  */
6364 char $ac_func();
6365
6366 int main() {
6367
6368 /* The GNU C library defines this for functions which it implements
6369     to always fail with ENOSYS.  Some functions are actually named
6370     something starting with __ and the normal name is an alias.  */
6371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6372 choke me
6373 #else
6374 $ac_func();
6375 #endif
6376
6377 ; return 0; }
6378 EOF
6379 if { (eval echo configure:6380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6380   rm -rf conftest*
6381   eval "ac_cv_func_$ac_func=yes"
6382 else
6383   echo "configure: failed program was:" >&5
6384   cat conftest.$ac_ext >&5
6385   rm -rf conftest*
6386   eval "ac_cv_func_$ac_func=no"
6387 fi
6388 rm -f conftest*
6389 fi
6390
6391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6392   echo "$ac_t""yes" 1>&6
6393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6394   cat >> confdefs.h <<EOF
6395 #define $ac_tr_func 1
6396 EOF
6397  
6398 else
6399   echo "$ac_t""no" 1>&6
6400 fi
6401 done
6402
6403 for ac_func in open64 _open64 __open64 creat64
6404 do
6405 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6406 echo "configure:6407: checking for $ac_func" >&5
6407 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6408   echo $ac_n "(cached) $ac_c" 1>&6
6409 else
6410   cat > conftest.$ac_ext <<EOF
6411 #line 6412 "configure"
6412 #include "confdefs.h"
6413 /* System header to define __stub macros and hopefully few prototypes,
6414     which can conflict with char $ac_func(); below.  */
6415 #include <assert.h>
6416 /* Override any gcc2 internal prototype to avoid an error.  */
6417 /* We use char because int might match the return type of a gcc2
6418     builtin and then its argument prototype would still apply.  */
6419 char $ac_func();
6420
6421 int main() {
6422
6423 /* The GNU C library defines this for functions which it implements
6424     to always fail with ENOSYS.  Some functions are actually named
6425     something starting with __ and the normal name is an alias.  */
6426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6427 choke me
6428 #else
6429 $ac_func();
6430 #endif
6431
6432 ; return 0; }
6433 EOF
6434 if { (eval echo configure:6435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6435   rm -rf conftest*
6436   eval "ac_cv_func_$ac_func=yes"
6437 else
6438   echo "configure: failed program was:" >&5
6439   cat conftest.$ac_ext >&5
6440   rm -rf conftest*
6441   eval "ac_cv_func_$ac_func=no"
6442 fi
6443 rm -f conftest*
6444 fi
6445
6446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6447   echo "$ac_t""yes" 1>&6
6448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6449   cat >> confdefs.h <<EOF
6450 #define $ac_tr_func 1
6451 EOF
6452  
6453 else
6454   echo "$ac_t""no" 1>&6
6455 fi
6456 done
6457
6458
6459 #
6460 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6461 #
6462
6463 if test x$ac_cv_func_stat64 = xno ; then
6464   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6465 echo "configure:6466: checking for stat64 in <sys/stat.h>" >&5
6466   cat > conftest.$ac_ext <<EOF
6467 #line 6468 "configure"
6468 #include "confdefs.h"
6469
6470 #if defined(HAVE_UNISTD_H)
6471 #include <unistd.h>
6472 #endif
6473 #include <sys/stat.h>
6474
6475 int main() {
6476 struct stat64 st64; exit(stat64(".",&st64));
6477 ; return 0; }
6478 EOF
6479 if { (eval echo configure:6480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6480   rm -rf conftest*
6481   ac_cv_func_stat64=yes
6482 else
6483   echo "configure: failed program was:" >&5
6484   cat conftest.$ac_ext >&5
6485 fi
6486 rm -f conftest*
6487   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6488   if test x$ac_cv_func_stat64 = xyes ; then
6489     cat >> confdefs.h <<\EOF
6490 #define HAVE_STAT64 1
6491 EOF
6492
6493   fi
6494 fi
6495
6496 if test x$ac_cv_func_lstat64 = xno ; then
6497   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6498 echo "configure:6499: checking for lstat64 in <sys/stat.h>" >&5
6499   cat > conftest.$ac_ext <<EOF
6500 #line 6501 "configure"
6501 #include "confdefs.h"
6502
6503 #if defined(HAVE_UNISTD_H)
6504 #include <unistd.h>
6505 #endif
6506 #include <sys/stat.h>
6507
6508 int main() {
6509 struct stat64 st64; exit(lstat64(".",&st64));
6510 ; return 0; }
6511 EOF
6512 if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6513   rm -rf conftest*
6514   ac_cv_func_lstat64=yes
6515 else
6516   echo "configure: failed program was:" >&5
6517   cat conftest.$ac_ext >&5
6518 fi
6519 rm -f conftest*
6520   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6521   if test x$ac_cv_func_lstat64 = xyes ; then
6522     cat >> confdefs.h <<\EOF
6523 #define HAVE_LSTAT64 1
6524 EOF
6525
6526   fi
6527 fi
6528
6529 if test x$ac_cv_func_fstat64 = xno ; then
6530   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6531 echo "configure:6532: checking for fstat64 in <sys/stat.h>" >&5
6532   cat > conftest.$ac_ext <<EOF
6533 #line 6534 "configure"
6534 #include "confdefs.h"
6535
6536 #if defined(HAVE_UNISTD_H)
6537 #include <unistd.h>
6538 #endif
6539 #include <sys/stat.h>
6540
6541 int main() {
6542 struct stat64 st64; exit(fstat64(0,&st64));
6543 ; return 0; }
6544 EOF
6545 if { (eval echo configure:6546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6546   rm -rf conftest*
6547   ac_cv_func_fstat64=yes
6548 else
6549   echo "configure: failed program was:" >&5
6550   cat conftest.$ac_ext >&5
6551 fi
6552 rm -f conftest*
6553   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6554   if test x$ac_cv_func_fstat64 = xyes ; then
6555     cat >> confdefs.h <<\EOF
6556 #define HAVE_FSTAT64 1
6557 EOF
6558
6559   fi
6560 fi
6561
6562 #####################################
6563 # we might need the resolv library on some systems
6564 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6565 echo "configure:6566: checking for dn_expand in -lresolv" >&5
6566 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6567 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6568   echo $ac_n "(cached) $ac_c" 1>&6
6569 else
6570   ac_save_LIBS="$LIBS"
6571 LIBS="-lresolv  $LIBS"
6572 cat > conftest.$ac_ext <<EOF
6573 #line 6574 "configure"
6574 #include "confdefs.h"
6575 /* Override any gcc2 internal prototype to avoid an error.  */
6576 /* We use char because int might match the return type of a gcc2
6577     builtin and then its argument prototype would still apply.  */
6578 char dn_expand();
6579
6580 int main() {
6581 dn_expand()
6582 ; return 0; }
6583 EOF
6584 if { (eval echo configure:6585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6585   rm -rf conftest*
6586   eval "ac_cv_lib_$ac_lib_var=yes"
6587 else
6588   echo "configure: failed program was:" >&5
6589   cat conftest.$ac_ext >&5
6590   rm -rf conftest*
6591   eval "ac_cv_lib_$ac_lib_var=no"
6592 fi
6593 rm -f conftest*
6594 LIBS="$ac_save_LIBS"
6595
6596 fi
6597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6598   echo "$ac_t""yes" 1>&6
6599     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6600     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6601   cat >> confdefs.h <<EOF
6602 #define $ac_tr_lib 1
6603 EOF
6604
6605   LIBS="-lresolv $LIBS"
6606
6607 else
6608   echo "$ac_t""no" 1>&6
6609 fi
6610
6611
6612 #
6613 # Check for the functions putprpwnam, set_auth_parameters,
6614 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6615 # Needed for OSF1 and HPUX.
6616 #
6617
6618 case "$LIBS" in
6619   *-lsecurity*) for ac_func in putprpwnam
6620 do
6621 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6622 echo "configure:6623: checking for $ac_func" >&5
6623 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6624   echo $ac_n "(cached) $ac_c" 1>&6
6625 else
6626   cat > conftest.$ac_ext <<EOF
6627 #line 6628 "configure"
6628 #include "confdefs.h"
6629 /* System header to define __stub macros and hopefully few prototypes,
6630     which can conflict with char $ac_func(); below.  */
6631 #include <assert.h>
6632 /* Override any gcc2 internal prototype to avoid an error.  */
6633 /* We use char because int might match the return type of a gcc2
6634     builtin and then its argument prototype would still apply.  */
6635 char $ac_func();
6636
6637 int main() {
6638
6639 /* The GNU C library defines this for functions which it implements
6640     to always fail with ENOSYS.  Some functions are actually named
6641     something starting with __ and the normal name is an alias.  */
6642 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6643 choke me
6644 #else
6645 $ac_func();
6646 #endif
6647
6648 ; return 0; }
6649 EOF
6650 if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6651   rm -rf conftest*
6652   eval "ac_cv_func_$ac_func=yes"
6653 else
6654   echo "configure: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656   rm -rf conftest*
6657   eval "ac_cv_func_$ac_func=no"
6658 fi
6659 rm -f conftest*
6660 fi
6661
6662 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6663   echo "$ac_t""yes" 1>&6
6664     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6665   cat >> confdefs.h <<EOF
6666 #define $ac_tr_func 1
6667 EOF
6668  
6669 else
6670   echo "$ac_t""no" 1>&6
6671 fi
6672 done
6673  ;;
6674   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6675 echo "configure:6676: checking for putprpwnam in -lsecurity" >&5
6676 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6677 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6678   echo $ac_n "(cached) $ac_c" 1>&6
6679 else
6680   ac_save_LIBS="$LIBS"
6681 LIBS="-lsecurity  $LIBS"
6682 cat > conftest.$ac_ext <<EOF
6683 #line 6684 "configure"
6684 #include "confdefs.h"
6685 /* Override any gcc2 internal prototype to avoid an error.  */
6686 /* We use char because int might match the return type of a gcc2
6687     builtin and then its argument prototype would still apply.  */
6688 char putprpwnam();
6689
6690 int main() {
6691 putprpwnam()
6692 ; return 0; }
6693 EOF
6694 if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6695   rm -rf conftest*
6696   eval "ac_cv_lib_$ac_lib_var=yes"
6697 else
6698   echo "configure: failed program was:" >&5
6699   cat conftest.$ac_ext >&5
6700   rm -rf conftest*
6701   eval "ac_cv_lib_$ac_lib_var=no"
6702 fi
6703 rm -f conftest*
6704 LIBS="$ac_save_LIBS"
6705
6706 fi
6707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6708   echo "$ac_t""yes" 1>&6
6709     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6710     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6711   cat >> confdefs.h <<EOF
6712 #define $ac_tr_lib 1
6713 EOF
6714
6715   LIBS="-lsecurity $LIBS"
6716
6717 else
6718   echo "$ac_t""no" 1>&6
6719 fi
6720  
6721      for ac_func in putprpwnam
6722 do
6723 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6724 echo "configure:6725: checking for $ac_func" >&5
6725 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6726   echo $ac_n "(cached) $ac_c" 1>&6
6727 else
6728   cat > conftest.$ac_ext <<EOF
6729 #line 6730 "configure"
6730 #include "confdefs.h"
6731 /* System header to define __stub macros and hopefully few prototypes,
6732     which can conflict with char $ac_func(); below.  */
6733 #include <assert.h>
6734 /* Override any gcc2 internal prototype to avoid an error.  */
6735 /* We use char because int might match the return type of a gcc2
6736     builtin and then its argument prototype would still apply.  */
6737 char $ac_func();
6738
6739 int main() {
6740
6741 /* The GNU C library defines this for functions which it implements
6742     to always fail with ENOSYS.  Some functions are actually named
6743     something starting with __ and the normal name is an alias.  */
6744 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6745 choke me
6746 #else
6747 $ac_func();
6748 #endif
6749
6750 ; return 0; }
6751 EOF
6752 if { (eval echo configure:6753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6753   rm -rf conftest*
6754   eval "ac_cv_func_$ac_func=yes"
6755 else
6756   echo "configure: failed program was:" >&5
6757   cat conftest.$ac_ext >&5
6758   rm -rf conftest*
6759   eval "ac_cv_func_$ac_func=no"
6760 fi
6761 rm -f conftest*
6762 fi
6763
6764 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6765   echo "$ac_t""yes" 1>&6
6766     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6767   cat >> confdefs.h <<EOF
6768 #define $ac_tr_func 1
6769 EOF
6770  
6771 else
6772   echo "$ac_t""no" 1>&6
6773 fi
6774 done
6775
6776   ;;
6777   esac
6778
6779 case "$LIBS" in
6780   *-lsec*) for ac_func in putprpwnam
6781 do
6782 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6783 echo "configure:6784: checking for $ac_func" >&5
6784 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6785   echo $ac_n "(cached) $ac_c" 1>&6
6786 else
6787   cat > conftest.$ac_ext <<EOF
6788 #line 6789 "configure"
6789 #include "confdefs.h"
6790 /* System header to define __stub macros and hopefully few prototypes,
6791     which can conflict with char $ac_func(); below.  */
6792 #include <assert.h>
6793 /* Override any gcc2 internal prototype to avoid an error.  */
6794 /* We use char because int might match the return type of a gcc2
6795     builtin and then its argument prototype would still apply.  */
6796 char $ac_func();
6797
6798 int main() {
6799
6800 /* The GNU C library defines this for functions which it implements
6801     to always fail with ENOSYS.  Some functions are actually named
6802     something starting with __ and the normal name is an alias.  */
6803 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6804 choke me
6805 #else
6806 $ac_func();
6807 #endif
6808
6809 ; return 0; }
6810 EOF
6811 if { (eval echo configure:6812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6812   rm -rf conftest*
6813   eval "ac_cv_func_$ac_func=yes"
6814 else
6815   echo "configure: failed program was:" >&5
6816   cat conftest.$ac_ext >&5
6817   rm -rf conftest*
6818   eval "ac_cv_func_$ac_func=no"
6819 fi
6820 rm -f conftest*
6821 fi
6822
6823 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6824   echo "$ac_t""yes" 1>&6
6825     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6826   cat >> confdefs.h <<EOF
6827 #define $ac_tr_func 1
6828 EOF
6829  
6830 else
6831   echo "$ac_t""no" 1>&6
6832 fi
6833 done
6834  ;;
6835   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6836 echo "configure:6837: checking for putprpwnam in -lsec" >&5
6837 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6838 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6839   echo $ac_n "(cached) $ac_c" 1>&6
6840 else
6841   ac_save_LIBS="$LIBS"
6842 LIBS="-lsec  $LIBS"
6843 cat > conftest.$ac_ext <<EOF
6844 #line 6845 "configure"
6845 #include "confdefs.h"
6846 /* Override any gcc2 internal prototype to avoid an error.  */
6847 /* We use char because int might match the return type of a gcc2
6848     builtin and then its argument prototype would still apply.  */
6849 char putprpwnam();
6850
6851 int main() {
6852 putprpwnam()
6853 ; return 0; }
6854 EOF
6855 if { (eval echo configure:6856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6856   rm -rf conftest*
6857   eval "ac_cv_lib_$ac_lib_var=yes"
6858 else
6859   echo "configure: failed program was:" >&5
6860   cat conftest.$ac_ext >&5
6861   rm -rf conftest*
6862   eval "ac_cv_lib_$ac_lib_var=no"
6863 fi
6864 rm -f conftest*
6865 LIBS="$ac_save_LIBS"
6866
6867 fi
6868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6869   echo "$ac_t""yes" 1>&6
6870     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6871     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6872   cat >> confdefs.h <<EOF
6873 #define $ac_tr_lib 1
6874 EOF
6875
6876   LIBS="-lsec $LIBS"
6877
6878 else
6879   echo "$ac_t""no" 1>&6
6880 fi
6881  
6882      for ac_func in putprpwnam
6883 do
6884 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6885 echo "configure:6886: checking for $ac_func" >&5
6886 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6887   echo $ac_n "(cached) $ac_c" 1>&6
6888 else
6889   cat > conftest.$ac_ext <<EOF
6890 #line 6891 "configure"
6891 #include "confdefs.h"
6892 /* System header to define __stub macros and hopefully few prototypes,
6893     which can conflict with char $ac_func(); below.  */
6894 #include <assert.h>
6895 /* Override any gcc2 internal prototype to avoid an error.  */
6896 /* We use char because int might match the return type of a gcc2
6897     builtin and then its argument prototype would still apply.  */
6898 char $ac_func();
6899
6900 int main() {
6901
6902 /* The GNU C library defines this for functions which it implements
6903     to always fail with ENOSYS.  Some functions are actually named
6904     something starting with __ and the normal name is an alias.  */
6905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6906 choke me
6907 #else
6908 $ac_func();
6909 #endif
6910
6911 ; return 0; }
6912 EOF
6913 if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6914   rm -rf conftest*
6915   eval "ac_cv_func_$ac_func=yes"
6916 else
6917   echo "configure: failed program was:" >&5
6918   cat conftest.$ac_ext >&5
6919   rm -rf conftest*
6920   eval "ac_cv_func_$ac_func=no"
6921 fi
6922 rm -f conftest*
6923 fi
6924
6925 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6926   echo "$ac_t""yes" 1>&6
6927     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6928   cat >> confdefs.h <<EOF
6929 #define $ac_tr_func 1
6930 EOF
6931  
6932 else
6933   echo "$ac_t""no" 1>&6
6934 fi
6935 done
6936
6937   ;;
6938   esac
6939
6940
6941 case "$LIBS" in
6942   *-lsecurity*) for ac_func in set_auth_parameters
6943 do
6944 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6945 echo "configure:6946: checking for $ac_func" >&5
6946 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6947   echo $ac_n "(cached) $ac_c" 1>&6
6948 else
6949   cat > conftest.$ac_ext <<EOF
6950 #line 6951 "configure"
6951 #include "confdefs.h"
6952 /* System header to define __stub macros and hopefully few prototypes,
6953     which can conflict with char $ac_func(); below.  */
6954 #include <assert.h>
6955 /* Override any gcc2 internal prototype to avoid an error.  */
6956 /* We use char because int might match the return type of a gcc2
6957     builtin and then its argument prototype would still apply.  */
6958 char $ac_func();
6959
6960 int main() {
6961
6962 /* The GNU C library defines this for functions which it implements
6963     to always fail with ENOSYS.  Some functions are actually named
6964     something starting with __ and the normal name is an alias.  */
6965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6966 choke me
6967 #else
6968 $ac_func();
6969 #endif
6970
6971 ; return 0; }
6972 EOF
6973 if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6974   rm -rf conftest*
6975   eval "ac_cv_func_$ac_func=yes"
6976 else
6977   echo "configure: failed program was:" >&5
6978   cat conftest.$ac_ext >&5
6979   rm -rf conftest*
6980   eval "ac_cv_func_$ac_func=no"
6981 fi
6982 rm -f conftest*
6983 fi
6984
6985 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6986   echo "$ac_t""yes" 1>&6
6987     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6988   cat >> confdefs.h <<EOF
6989 #define $ac_tr_func 1
6990 EOF
6991  
6992 else
6993   echo "$ac_t""no" 1>&6
6994 fi
6995 done
6996  ;;
6997   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6998 echo "configure:6999: checking for set_auth_parameters in -lsecurity" >&5
6999 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7000 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7001   echo $ac_n "(cached) $ac_c" 1>&6
7002 else
7003   ac_save_LIBS="$LIBS"
7004 LIBS="-lsecurity  $LIBS"
7005 cat > conftest.$ac_ext <<EOF
7006 #line 7007 "configure"
7007 #include "confdefs.h"
7008 /* Override any gcc2 internal prototype to avoid an error.  */
7009 /* We use char because int might match the return type of a gcc2
7010     builtin and then its argument prototype would still apply.  */
7011 char set_auth_parameters();
7012
7013 int main() {
7014 set_auth_parameters()
7015 ; return 0; }
7016 EOF
7017 if { (eval echo configure:7018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7018   rm -rf conftest*
7019   eval "ac_cv_lib_$ac_lib_var=yes"
7020 else
7021   echo "configure: failed program was:" >&5
7022   cat conftest.$ac_ext >&5
7023   rm -rf conftest*
7024   eval "ac_cv_lib_$ac_lib_var=no"
7025 fi
7026 rm -f conftest*
7027 LIBS="$ac_save_LIBS"
7028
7029 fi
7030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7031   echo "$ac_t""yes" 1>&6
7032     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7033     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7034   cat >> confdefs.h <<EOF
7035 #define $ac_tr_lib 1
7036 EOF
7037
7038   LIBS="-lsecurity $LIBS"
7039
7040 else
7041   echo "$ac_t""no" 1>&6
7042 fi
7043  
7044      for ac_func in set_auth_parameters
7045 do
7046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7047 echo "configure:7048: checking for $ac_func" >&5
7048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7049   echo $ac_n "(cached) $ac_c" 1>&6
7050 else
7051   cat > conftest.$ac_ext <<EOF
7052 #line 7053 "configure"
7053 #include "confdefs.h"
7054 /* System header to define __stub macros and hopefully few prototypes,
7055     which can conflict with char $ac_func(); below.  */
7056 #include <assert.h>
7057 /* Override any gcc2 internal prototype to avoid an error.  */
7058 /* We use char because int might match the return type of a gcc2
7059     builtin and then its argument prototype would still apply.  */
7060 char $ac_func();
7061
7062 int main() {
7063
7064 /* The GNU C library defines this for functions which it implements
7065     to always fail with ENOSYS.  Some functions are actually named
7066     something starting with __ and the normal name is an alias.  */
7067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7068 choke me
7069 #else
7070 $ac_func();
7071 #endif
7072
7073 ; return 0; }
7074 EOF
7075 if { (eval echo configure:7076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7076   rm -rf conftest*
7077   eval "ac_cv_func_$ac_func=yes"
7078 else
7079   echo "configure: failed program was:" >&5
7080   cat conftest.$ac_ext >&5
7081   rm -rf conftest*
7082   eval "ac_cv_func_$ac_func=no"
7083 fi
7084 rm -f conftest*
7085 fi
7086
7087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7088   echo "$ac_t""yes" 1>&6
7089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7090   cat >> confdefs.h <<EOF
7091 #define $ac_tr_func 1
7092 EOF
7093  
7094 else
7095   echo "$ac_t""no" 1>&6
7096 fi
7097 done
7098
7099   ;;
7100   esac
7101
7102 case "$LIBS" in
7103   *-lsec*) for ac_func in set_auth_parameters
7104 do
7105 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7106 echo "configure:7107: checking for $ac_func" >&5
7107 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7108   echo $ac_n "(cached) $ac_c" 1>&6
7109 else
7110   cat > conftest.$ac_ext <<EOF
7111 #line 7112 "configure"
7112 #include "confdefs.h"
7113 /* System header to define __stub macros and hopefully few prototypes,
7114     which can conflict with char $ac_func(); below.  */
7115 #include <assert.h>
7116 /* Override any gcc2 internal prototype to avoid an error.  */
7117 /* We use char because int might match the return type of a gcc2
7118     builtin and then its argument prototype would still apply.  */
7119 char $ac_func();
7120
7121 int main() {
7122
7123 /* The GNU C library defines this for functions which it implements
7124     to always fail with ENOSYS.  Some functions are actually named
7125     something starting with __ and the normal name is an alias.  */
7126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7127 choke me
7128 #else
7129 $ac_func();
7130 #endif
7131
7132 ; return 0; }
7133 EOF
7134 if { (eval echo configure:7135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7135   rm -rf conftest*
7136   eval "ac_cv_func_$ac_func=yes"
7137 else
7138   echo "configure: failed program was:" >&5
7139   cat conftest.$ac_ext >&5
7140   rm -rf conftest*
7141   eval "ac_cv_func_$ac_func=no"
7142 fi
7143 rm -f conftest*
7144 fi
7145
7146 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7147   echo "$ac_t""yes" 1>&6
7148     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7149   cat >> confdefs.h <<EOF
7150 #define $ac_tr_func 1
7151 EOF
7152  
7153 else
7154   echo "$ac_t""no" 1>&6
7155 fi
7156 done
7157  ;;
7158   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7159 echo "configure:7160: checking for set_auth_parameters in -lsec" >&5
7160 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7162   echo $ac_n "(cached) $ac_c" 1>&6
7163 else
7164   ac_save_LIBS="$LIBS"
7165 LIBS="-lsec  $LIBS"
7166 cat > conftest.$ac_ext <<EOF
7167 #line 7168 "configure"
7168 #include "confdefs.h"
7169 /* Override any gcc2 internal prototype to avoid an error.  */
7170 /* We use char because int might match the return type of a gcc2
7171     builtin and then its argument prototype would still apply.  */
7172 char set_auth_parameters();
7173
7174 int main() {
7175 set_auth_parameters()
7176 ; return 0; }
7177 EOF
7178 if { (eval echo configure:7179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7179   rm -rf conftest*
7180   eval "ac_cv_lib_$ac_lib_var=yes"
7181 else
7182   echo "configure: failed program was:" >&5
7183   cat conftest.$ac_ext >&5
7184   rm -rf conftest*
7185   eval "ac_cv_lib_$ac_lib_var=no"
7186 fi
7187 rm -f conftest*
7188 LIBS="$ac_save_LIBS"
7189
7190 fi
7191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7192   echo "$ac_t""yes" 1>&6
7193     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7194     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7195   cat >> confdefs.h <<EOF
7196 #define $ac_tr_lib 1
7197 EOF
7198
7199   LIBS="-lsec $LIBS"
7200
7201 else
7202   echo "$ac_t""no" 1>&6
7203 fi
7204  
7205      for ac_func in set_auth_parameters
7206 do
7207 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7208 echo "configure:7209: checking for $ac_func" >&5
7209 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7210   echo $ac_n "(cached) $ac_c" 1>&6
7211 else
7212   cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 /* System header to define __stub macros and hopefully few prototypes,
7216     which can conflict with char $ac_func(); below.  */
7217 #include <assert.h>
7218 /* Override any gcc2 internal prototype to avoid an error.  */
7219 /* We use char because int might match the return type of a gcc2
7220     builtin and then its argument prototype would still apply.  */
7221 char $ac_func();
7222
7223 int main() {
7224
7225 /* The GNU C library defines this for functions which it implements
7226     to always fail with ENOSYS.  Some functions are actually named
7227     something starting with __ and the normal name is an alias.  */
7228 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7229 choke me
7230 #else
7231 $ac_func();
7232 #endif
7233
7234 ; return 0; }
7235 EOF
7236 if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7237   rm -rf conftest*
7238   eval "ac_cv_func_$ac_func=yes"
7239 else
7240   echo "configure: failed program was:" >&5
7241   cat conftest.$ac_ext >&5
7242   rm -rf conftest*
7243   eval "ac_cv_func_$ac_func=no"
7244 fi
7245 rm -f conftest*
7246 fi
7247
7248 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7249   echo "$ac_t""yes" 1>&6
7250     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7251   cat >> confdefs.h <<EOF
7252 #define $ac_tr_func 1
7253 EOF
7254  
7255 else
7256   echo "$ac_t""no" 1>&6
7257 fi
7258 done
7259
7260   ;;
7261   esac
7262
7263
7264 # UnixWare 7.x has its getspnam in -lgen
7265 case "$LIBS" in
7266   *-lgen*) for ac_func in getspnam
7267 do
7268 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7269 echo "configure:7270: checking for $ac_func" >&5
7270 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7271   echo $ac_n "(cached) $ac_c" 1>&6
7272 else
7273   cat > conftest.$ac_ext <<EOF
7274 #line 7275 "configure"
7275 #include "confdefs.h"
7276 /* System header to define __stub macros and hopefully few prototypes,
7277     which can conflict with char $ac_func(); below.  */
7278 #include <assert.h>
7279 /* Override any gcc2 internal prototype to avoid an error.  */
7280 /* We use char because int might match the return type of a gcc2
7281     builtin and then its argument prototype would still apply.  */
7282 char $ac_func();
7283
7284 int main() {
7285
7286 /* The GNU C library defines this for functions which it implements
7287     to always fail with ENOSYS.  Some functions are actually named
7288     something starting with __ and the normal name is an alias.  */
7289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7290 choke me
7291 #else
7292 $ac_func();
7293 #endif
7294
7295 ; return 0; }
7296 EOF
7297 if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7298   rm -rf conftest*
7299   eval "ac_cv_func_$ac_func=yes"
7300 else
7301   echo "configure: failed program was:" >&5
7302   cat conftest.$ac_ext >&5
7303   rm -rf conftest*
7304   eval "ac_cv_func_$ac_func=no"
7305 fi
7306 rm -f conftest*
7307 fi
7308
7309 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7310   echo "$ac_t""yes" 1>&6
7311     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7312   cat >> confdefs.h <<EOF
7313 #define $ac_tr_func 1
7314 EOF
7315  
7316 else
7317   echo "$ac_t""no" 1>&6
7318 fi
7319 done
7320  ;;
7321   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7322 echo "configure:7323: checking for getspnam in -lgen" >&5
7323 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7324 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7325   echo $ac_n "(cached) $ac_c" 1>&6
7326 else
7327   ac_save_LIBS="$LIBS"
7328 LIBS="-lgen  $LIBS"
7329 cat > conftest.$ac_ext <<EOF
7330 #line 7331 "configure"
7331 #include "confdefs.h"
7332 /* Override any gcc2 internal prototype to avoid an error.  */
7333 /* We use char because int might match the return type of a gcc2
7334     builtin and then its argument prototype would still apply.  */
7335 char getspnam();
7336
7337 int main() {
7338 getspnam()
7339 ; return 0; }
7340 EOF
7341 if { (eval echo configure:7342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7342   rm -rf conftest*
7343   eval "ac_cv_lib_$ac_lib_var=yes"
7344 else
7345   echo "configure: failed program was:" >&5
7346   cat conftest.$ac_ext >&5
7347   rm -rf conftest*
7348   eval "ac_cv_lib_$ac_lib_var=no"
7349 fi
7350 rm -f conftest*
7351 LIBS="$ac_save_LIBS"
7352
7353 fi
7354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7355   echo "$ac_t""yes" 1>&6
7356     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7357     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7358   cat >> confdefs.h <<EOF
7359 #define $ac_tr_lib 1
7360 EOF
7361
7362   LIBS="-lgen $LIBS"
7363
7364 else
7365   echo "$ac_t""no" 1>&6
7366 fi
7367  
7368      for ac_func in getspnam
7369 do
7370 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7371 echo "configure:7372: checking for $ac_func" >&5
7372 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7373   echo $ac_n "(cached) $ac_c" 1>&6
7374 else
7375   cat > conftest.$ac_ext <<EOF
7376 #line 7377 "configure"
7377 #include "confdefs.h"
7378 /* System header to define __stub macros and hopefully few prototypes,
7379     which can conflict with char $ac_func(); below.  */
7380 #include <assert.h>
7381 /* Override any gcc2 internal prototype to avoid an error.  */
7382 /* We use char because int might match the return type of a gcc2
7383     builtin and then its argument prototype would still apply.  */
7384 char $ac_func();
7385
7386 int main() {
7387
7388 /* The GNU C library defines this for functions which it implements
7389     to always fail with ENOSYS.  Some functions are actually named
7390     something starting with __ and the normal name is an alias.  */
7391 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7392 choke me
7393 #else
7394 $ac_func();
7395 #endif
7396
7397 ; return 0; }
7398 EOF
7399 if { (eval echo configure:7400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7400   rm -rf conftest*
7401   eval "ac_cv_func_$ac_func=yes"
7402 else
7403   echo "configure: failed program was:" >&5
7404   cat conftest.$ac_ext >&5
7405   rm -rf conftest*
7406   eval "ac_cv_func_$ac_func=no"
7407 fi
7408 rm -f conftest*
7409 fi
7410
7411 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7412   echo "$ac_t""yes" 1>&6
7413     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7414   cat >> confdefs.h <<EOF
7415 #define $ac_tr_func 1
7416 EOF
7417  
7418 else
7419   echo "$ac_t""no" 1>&6
7420 fi
7421 done
7422
7423   ;;
7424   esac
7425
7426
7427 case "$LIBS" in
7428   *-lsecurity*) for ac_func in getspnam
7429 do
7430 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7431 echo "configure:7432: checking for $ac_func" >&5
7432 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7433   echo $ac_n "(cached) $ac_c" 1>&6
7434 else
7435   cat > conftest.$ac_ext <<EOF
7436 #line 7437 "configure"
7437 #include "confdefs.h"
7438 /* System header to define __stub macros and hopefully few prototypes,
7439     which can conflict with char $ac_func(); below.  */
7440 #include <assert.h>
7441 /* Override any gcc2 internal prototype to avoid an error.  */
7442 /* We use char because int might match the return type of a gcc2
7443     builtin and then its argument prototype would still apply.  */
7444 char $ac_func();
7445
7446 int main() {
7447
7448 /* The GNU C library defines this for functions which it implements
7449     to always fail with ENOSYS.  Some functions are actually named
7450     something starting with __ and the normal name is an alias.  */
7451 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7452 choke me
7453 #else
7454 $ac_func();
7455 #endif
7456
7457 ; return 0; }
7458 EOF
7459 if { (eval echo configure:7460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7460   rm -rf conftest*
7461   eval "ac_cv_func_$ac_func=yes"
7462 else
7463   echo "configure: failed program was:" >&5
7464   cat conftest.$ac_ext >&5
7465   rm -rf conftest*
7466   eval "ac_cv_func_$ac_func=no"
7467 fi
7468 rm -f conftest*
7469 fi
7470
7471 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7472   echo "$ac_t""yes" 1>&6
7473     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7474   cat >> confdefs.h <<EOF
7475 #define $ac_tr_func 1
7476 EOF
7477  
7478 else
7479   echo "$ac_t""no" 1>&6
7480 fi
7481 done
7482  ;;
7483   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7484 echo "configure:7485: checking for getspnam in -lsecurity" >&5
7485 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7486 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7487   echo $ac_n "(cached) $ac_c" 1>&6
7488 else
7489   ac_save_LIBS="$LIBS"
7490 LIBS="-lsecurity  $LIBS"
7491 cat > conftest.$ac_ext <<EOF
7492 #line 7493 "configure"
7493 #include "confdefs.h"
7494 /* Override any gcc2 internal prototype to avoid an error.  */
7495 /* We use char because int might match the return type of a gcc2
7496     builtin and then its argument prototype would still apply.  */
7497 char getspnam();
7498
7499 int main() {
7500 getspnam()
7501 ; return 0; }
7502 EOF
7503 if { (eval echo configure:7504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7504   rm -rf conftest*
7505   eval "ac_cv_lib_$ac_lib_var=yes"
7506 else
7507   echo "configure: failed program was:" >&5
7508   cat conftest.$ac_ext >&5
7509   rm -rf conftest*
7510   eval "ac_cv_lib_$ac_lib_var=no"
7511 fi
7512 rm -f conftest*
7513 LIBS="$ac_save_LIBS"
7514
7515 fi
7516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7517   echo "$ac_t""yes" 1>&6
7518     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7519     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7520   cat >> confdefs.h <<EOF
7521 #define $ac_tr_lib 1
7522 EOF
7523
7524   LIBS="-lsecurity $LIBS"
7525
7526 else
7527   echo "$ac_t""no" 1>&6
7528 fi
7529  
7530      for ac_func in getspnam
7531 do
7532 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7533 echo "configure:7534: checking for $ac_func" >&5
7534 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7535   echo $ac_n "(cached) $ac_c" 1>&6
7536 else
7537   cat > conftest.$ac_ext <<EOF
7538 #line 7539 "configure"
7539 #include "confdefs.h"
7540 /* System header to define __stub macros and hopefully few prototypes,
7541     which can conflict with char $ac_func(); below.  */
7542 #include <assert.h>
7543 /* Override any gcc2 internal prototype to avoid an error.  */
7544 /* We use char because int might match the return type of a gcc2
7545     builtin and then its argument prototype would still apply.  */
7546 char $ac_func();
7547
7548 int main() {
7549
7550 /* The GNU C library defines this for functions which it implements
7551     to always fail with ENOSYS.  Some functions are actually named
7552     something starting with __ and the normal name is an alias.  */
7553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7554 choke me
7555 #else
7556 $ac_func();
7557 #endif
7558
7559 ; return 0; }
7560 EOF
7561 if { (eval echo configure:7562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7562   rm -rf conftest*
7563   eval "ac_cv_func_$ac_func=yes"
7564 else
7565   echo "configure: failed program was:" >&5
7566   cat conftest.$ac_ext >&5
7567   rm -rf conftest*
7568   eval "ac_cv_func_$ac_func=no"
7569 fi
7570 rm -f conftest*
7571 fi
7572
7573 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7574   echo "$ac_t""yes" 1>&6
7575     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7576   cat >> confdefs.h <<EOF
7577 #define $ac_tr_func 1
7578 EOF
7579  
7580 else
7581   echo "$ac_t""no" 1>&6
7582 fi
7583 done
7584
7585   ;;
7586   esac
7587
7588 case "$LIBS" in
7589   *-lsec*) for ac_func in getspnam
7590 do
7591 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7592 echo "configure:7593: checking for $ac_func" >&5
7593 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7594   echo $ac_n "(cached) $ac_c" 1>&6
7595 else
7596   cat > conftest.$ac_ext <<EOF
7597 #line 7598 "configure"
7598 #include "confdefs.h"
7599 /* System header to define __stub macros and hopefully few prototypes,
7600     which can conflict with char $ac_func(); below.  */
7601 #include <assert.h>
7602 /* Override any gcc2 internal prototype to avoid an error.  */
7603 /* We use char because int might match the return type of a gcc2
7604     builtin and then its argument prototype would still apply.  */
7605 char $ac_func();
7606
7607 int main() {
7608
7609 /* The GNU C library defines this for functions which it implements
7610     to always fail with ENOSYS.  Some functions are actually named
7611     something starting with __ and the normal name is an alias.  */
7612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7613 choke me
7614 #else
7615 $ac_func();
7616 #endif
7617
7618 ; return 0; }
7619 EOF
7620 if { (eval echo configure:7621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7621   rm -rf conftest*
7622   eval "ac_cv_func_$ac_func=yes"
7623 else
7624   echo "configure: failed program was:" >&5
7625   cat conftest.$ac_ext >&5
7626   rm -rf conftest*
7627   eval "ac_cv_func_$ac_func=no"
7628 fi
7629 rm -f conftest*
7630 fi
7631
7632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7633   echo "$ac_t""yes" 1>&6
7634     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7635   cat >> confdefs.h <<EOF
7636 #define $ac_tr_func 1
7637 EOF
7638  
7639 else
7640   echo "$ac_t""no" 1>&6
7641 fi
7642 done
7643  ;;
7644   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7645 echo "configure:7646: checking for getspnam in -lsec" >&5
7646 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7648   echo $ac_n "(cached) $ac_c" 1>&6
7649 else
7650   ac_save_LIBS="$LIBS"
7651 LIBS="-lsec  $LIBS"
7652 cat > conftest.$ac_ext <<EOF
7653 #line 7654 "configure"
7654 #include "confdefs.h"
7655 /* Override any gcc2 internal prototype to avoid an error.  */
7656 /* We use char because int might match the return type of a gcc2
7657     builtin and then its argument prototype would still apply.  */
7658 char getspnam();
7659
7660 int main() {
7661 getspnam()
7662 ; return 0; }
7663 EOF
7664 if { (eval echo configure:7665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7665   rm -rf conftest*
7666   eval "ac_cv_lib_$ac_lib_var=yes"
7667 else
7668   echo "configure: failed program was:" >&5
7669   cat conftest.$ac_ext >&5
7670   rm -rf conftest*
7671   eval "ac_cv_lib_$ac_lib_var=no"
7672 fi
7673 rm -f conftest*
7674 LIBS="$ac_save_LIBS"
7675
7676 fi
7677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7678   echo "$ac_t""yes" 1>&6
7679     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7680     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7681   cat >> confdefs.h <<EOF
7682 #define $ac_tr_lib 1
7683 EOF
7684
7685   LIBS="-lsec $LIBS"
7686
7687 else
7688   echo "$ac_t""no" 1>&6
7689 fi
7690  
7691      for ac_func in getspnam
7692 do
7693 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7694 echo "configure:7695: checking for $ac_func" >&5
7695 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7696   echo $ac_n "(cached) $ac_c" 1>&6
7697 else
7698   cat > conftest.$ac_ext <<EOF
7699 #line 7700 "configure"
7700 #include "confdefs.h"
7701 /* System header to define __stub macros and hopefully few prototypes,
7702     which can conflict with char $ac_func(); below.  */
7703 #include <assert.h>
7704 /* Override any gcc2 internal prototype to avoid an error.  */
7705 /* We use char because int might match the return type of a gcc2
7706     builtin and then its argument prototype would still apply.  */
7707 char $ac_func();
7708
7709 int main() {
7710
7711 /* The GNU C library defines this for functions which it implements
7712     to always fail with ENOSYS.  Some functions are actually named
7713     something starting with __ and the normal name is an alias.  */
7714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7715 choke me
7716 #else
7717 $ac_func();
7718 #endif
7719
7720 ; return 0; }
7721 EOF
7722 if { (eval echo configure:7723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7723   rm -rf conftest*
7724   eval "ac_cv_func_$ac_func=yes"
7725 else
7726   echo "configure: failed program was:" >&5
7727   cat conftest.$ac_ext >&5
7728   rm -rf conftest*
7729   eval "ac_cv_func_$ac_func=no"
7730 fi
7731 rm -f conftest*
7732 fi
7733
7734 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7735   echo "$ac_t""yes" 1>&6
7736     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7737   cat >> confdefs.h <<EOF
7738 #define $ac_tr_func 1
7739 EOF
7740  
7741 else
7742   echo "$ac_t""no" 1>&6
7743 fi
7744 done
7745
7746   ;;
7747   esac
7748
7749
7750 case "$LIBS" in
7751   *-lsecurity*) for ac_func in bigcrypt
7752 do
7753 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7754 echo "configure:7755: checking for $ac_func" >&5
7755 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7756   echo $ac_n "(cached) $ac_c" 1>&6
7757 else
7758   cat > conftest.$ac_ext <<EOF
7759 #line 7760 "configure"
7760 #include "confdefs.h"
7761 /* System header to define __stub macros and hopefully few prototypes,
7762     which can conflict with char $ac_func(); below.  */
7763 #include <assert.h>
7764 /* Override any gcc2 internal prototype to avoid an error.  */
7765 /* We use char because int might match the return type of a gcc2
7766     builtin and then its argument prototype would still apply.  */
7767 char $ac_func();
7768
7769 int main() {
7770
7771 /* The GNU C library defines this for functions which it implements
7772     to always fail with ENOSYS.  Some functions are actually named
7773     something starting with __ and the normal name is an alias.  */
7774 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7775 choke me
7776 #else
7777 $ac_func();
7778 #endif
7779
7780 ; return 0; }
7781 EOF
7782 if { (eval echo configure:7783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7783   rm -rf conftest*
7784   eval "ac_cv_func_$ac_func=yes"
7785 else
7786   echo "configure: failed program was:" >&5
7787   cat conftest.$ac_ext >&5
7788   rm -rf conftest*
7789   eval "ac_cv_func_$ac_func=no"
7790 fi
7791 rm -f conftest*
7792 fi
7793
7794 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7795   echo "$ac_t""yes" 1>&6
7796     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7797   cat >> confdefs.h <<EOF
7798 #define $ac_tr_func 1
7799 EOF
7800  
7801 else
7802   echo "$ac_t""no" 1>&6
7803 fi
7804 done
7805  ;;
7806   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7807 echo "configure:7808: checking for bigcrypt in -lsecurity" >&5
7808 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7809 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7810   echo $ac_n "(cached) $ac_c" 1>&6
7811 else
7812   ac_save_LIBS="$LIBS"
7813 LIBS="-lsecurity  $LIBS"
7814 cat > conftest.$ac_ext <<EOF
7815 #line 7816 "configure"
7816 #include "confdefs.h"
7817 /* Override any gcc2 internal prototype to avoid an error.  */
7818 /* We use char because int might match the return type of a gcc2
7819     builtin and then its argument prototype would still apply.  */
7820 char bigcrypt();
7821
7822 int main() {
7823 bigcrypt()
7824 ; return 0; }
7825 EOF
7826 if { (eval echo configure:7827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7827   rm -rf conftest*
7828   eval "ac_cv_lib_$ac_lib_var=yes"
7829 else
7830   echo "configure: failed program was:" >&5
7831   cat conftest.$ac_ext >&5
7832   rm -rf conftest*
7833   eval "ac_cv_lib_$ac_lib_var=no"
7834 fi
7835 rm -f conftest*
7836 LIBS="$ac_save_LIBS"
7837
7838 fi
7839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7840   echo "$ac_t""yes" 1>&6
7841     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7842     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7843   cat >> confdefs.h <<EOF
7844 #define $ac_tr_lib 1
7845 EOF
7846
7847   LIBS="-lsecurity $LIBS"
7848
7849 else
7850   echo "$ac_t""no" 1>&6
7851 fi
7852  
7853      for ac_func in bigcrypt
7854 do
7855 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7856 echo "configure:7857: checking for $ac_func" >&5
7857 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7858   echo $ac_n "(cached) $ac_c" 1>&6
7859 else
7860   cat > conftest.$ac_ext <<EOF
7861 #line 7862 "configure"
7862 #include "confdefs.h"
7863 /* System header to define __stub macros and hopefully few prototypes,
7864     which can conflict with char $ac_func(); below.  */
7865 #include <assert.h>
7866 /* Override any gcc2 internal prototype to avoid an error.  */
7867 /* We use char because int might match the return type of a gcc2
7868     builtin and then its argument prototype would still apply.  */
7869 char $ac_func();
7870
7871 int main() {
7872
7873 /* The GNU C library defines this for functions which it implements
7874     to always fail with ENOSYS.  Some functions are actually named
7875     something starting with __ and the normal name is an alias.  */
7876 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7877 choke me
7878 #else
7879 $ac_func();
7880 #endif
7881
7882 ; return 0; }
7883 EOF
7884 if { (eval echo configure:7885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7885   rm -rf conftest*
7886   eval "ac_cv_func_$ac_func=yes"
7887 else
7888   echo "configure: failed program was:" >&5
7889   cat conftest.$ac_ext >&5
7890   rm -rf conftest*
7891   eval "ac_cv_func_$ac_func=no"
7892 fi
7893 rm -f conftest*
7894 fi
7895
7896 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7897   echo "$ac_t""yes" 1>&6
7898     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7899   cat >> confdefs.h <<EOF
7900 #define $ac_tr_func 1
7901 EOF
7902  
7903 else
7904   echo "$ac_t""no" 1>&6
7905 fi
7906 done
7907
7908   ;;
7909   esac
7910
7911 case "$LIBS" in
7912   *-lsec*) for ac_func in bigcrypt
7913 do
7914 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7915 echo "configure:7916: checking for $ac_func" >&5
7916 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7917   echo $ac_n "(cached) $ac_c" 1>&6
7918 else
7919   cat > conftest.$ac_ext <<EOF
7920 #line 7921 "configure"
7921 #include "confdefs.h"
7922 /* System header to define __stub macros and hopefully few prototypes,
7923     which can conflict with char $ac_func(); below.  */
7924 #include <assert.h>
7925 /* Override any gcc2 internal prototype to avoid an error.  */
7926 /* We use char because int might match the return type of a gcc2
7927     builtin and then its argument prototype would still apply.  */
7928 char $ac_func();
7929
7930 int main() {
7931
7932 /* The GNU C library defines this for functions which it implements
7933     to always fail with ENOSYS.  Some functions are actually named
7934     something starting with __ and the normal name is an alias.  */
7935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7936 choke me
7937 #else
7938 $ac_func();
7939 #endif
7940
7941 ; return 0; }
7942 EOF
7943 if { (eval echo configure:7944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7944   rm -rf conftest*
7945   eval "ac_cv_func_$ac_func=yes"
7946 else
7947   echo "configure: failed program was:" >&5
7948   cat conftest.$ac_ext >&5
7949   rm -rf conftest*
7950   eval "ac_cv_func_$ac_func=no"
7951 fi
7952 rm -f conftest*
7953 fi
7954
7955 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7956   echo "$ac_t""yes" 1>&6
7957     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7958   cat >> confdefs.h <<EOF
7959 #define $ac_tr_func 1
7960 EOF
7961  
7962 else
7963   echo "$ac_t""no" 1>&6
7964 fi
7965 done
7966  ;;
7967   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7968 echo "configure:7969: checking for bigcrypt in -lsec" >&5
7969 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7970 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7971   echo $ac_n "(cached) $ac_c" 1>&6
7972 else
7973   ac_save_LIBS="$LIBS"
7974 LIBS="-lsec  $LIBS"
7975 cat > conftest.$ac_ext <<EOF
7976 #line 7977 "configure"
7977 #include "confdefs.h"
7978 /* Override any gcc2 internal prototype to avoid an error.  */
7979 /* We use char because int might match the return type of a gcc2
7980     builtin and then its argument prototype would still apply.  */
7981 char bigcrypt();
7982
7983 int main() {
7984 bigcrypt()
7985 ; return 0; }
7986 EOF
7987 if { (eval echo configure:7988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7988   rm -rf conftest*
7989   eval "ac_cv_lib_$ac_lib_var=yes"
7990 else
7991   echo "configure: failed program was:" >&5
7992   cat conftest.$ac_ext >&5
7993   rm -rf conftest*
7994   eval "ac_cv_lib_$ac_lib_var=no"
7995 fi
7996 rm -f conftest*
7997 LIBS="$ac_save_LIBS"
7998
7999 fi
8000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8001   echo "$ac_t""yes" 1>&6
8002     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8003     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8004   cat >> confdefs.h <<EOF
8005 #define $ac_tr_lib 1
8006 EOF
8007
8008   LIBS="-lsec $LIBS"
8009
8010 else
8011   echo "$ac_t""no" 1>&6
8012 fi
8013  
8014      for ac_func in bigcrypt
8015 do
8016 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8017 echo "configure:8018: checking for $ac_func" >&5
8018 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8019   echo $ac_n "(cached) $ac_c" 1>&6
8020 else
8021   cat > conftest.$ac_ext <<EOF
8022 #line 8023 "configure"
8023 #include "confdefs.h"
8024 /* System header to define __stub macros and hopefully few prototypes,
8025     which can conflict with char $ac_func(); below.  */
8026 #include <assert.h>
8027 /* Override any gcc2 internal prototype to avoid an error.  */
8028 /* We use char because int might match the return type of a gcc2
8029     builtin and then its argument prototype would still apply.  */
8030 char $ac_func();
8031
8032 int main() {
8033
8034 /* The GNU C library defines this for functions which it implements
8035     to always fail with ENOSYS.  Some functions are actually named
8036     something starting with __ and the normal name is an alias.  */
8037 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8038 choke me
8039 #else
8040 $ac_func();
8041 #endif
8042
8043 ; return 0; }
8044 EOF
8045 if { (eval echo configure:8046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8046   rm -rf conftest*
8047   eval "ac_cv_func_$ac_func=yes"
8048 else
8049   echo "configure: failed program was:" >&5
8050   cat conftest.$ac_ext >&5
8051   rm -rf conftest*
8052   eval "ac_cv_func_$ac_func=no"
8053 fi
8054 rm -f conftest*
8055 fi
8056
8057 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8058   echo "$ac_t""yes" 1>&6
8059     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8060   cat >> confdefs.h <<EOF
8061 #define $ac_tr_func 1
8062 EOF
8063  
8064 else
8065   echo "$ac_t""no" 1>&6
8066 fi
8067 done
8068
8069   ;;
8070   esac
8071
8072
8073 case "$LIBS" in
8074   *-lsecurity*) for ac_func in getprpwnam
8075 do
8076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8077 echo "configure:8078: checking for $ac_func" >&5
8078 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8079   echo $ac_n "(cached) $ac_c" 1>&6
8080 else
8081   cat > conftest.$ac_ext <<EOF
8082 #line 8083 "configure"
8083 #include "confdefs.h"
8084 /* System header to define __stub macros and hopefully few prototypes,
8085     which can conflict with char $ac_func(); below.  */
8086 #include <assert.h>
8087 /* Override any gcc2 internal prototype to avoid an error.  */
8088 /* We use char because int might match the return type of a gcc2
8089     builtin and then its argument prototype would still apply.  */
8090 char $ac_func();
8091
8092 int main() {
8093
8094 /* The GNU C library defines this for functions which it implements
8095     to always fail with ENOSYS.  Some functions are actually named
8096     something starting with __ and the normal name is an alias.  */
8097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8098 choke me
8099 #else
8100 $ac_func();
8101 #endif
8102
8103 ; return 0; }
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8106   rm -rf conftest*
8107   eval "ac_cv_func_$ac_func=yes"
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -rf conftest*
8112   eval "ac_cv_func_$ac_func=no"
8113 fi
8114 rm -f conftest*
8115 fi
8116
8117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8118   echo "$ac_t""yes" 1>&6
8119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8120   cat >> confdefs.h <<EOF
8121 #define $ac_tr_func 1
8122 EOF
8123  
8124 else
8125   echo "$ac_t""no" 1>&6
8126 fi
8127 done
8128  ;;
8129   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8130 echo "configure:8131: checking for getprpwnam in -lsecurity" >&5
8131 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8133   echo $ac_n "(cached) $ac_c" 1>&6
8134 else
8135   ac_save_LIBS="$LIBS"
8136 LIBS="-lsecurity  $LIBS"
8137 cat > conftest.$ac_ext <<EOF
8138 #line 8139 "configure"
8139 #include "confdefs.h"
8140 /* Override any gcc2 internal prototype to avoid an error.  */
8141 /* We use char because int might match the return type of a gcc2
8142     builtin and then its argument prototype would still apply.  */
8143 char getprpwnam();
8144
8145 int main() {
8146 getprpwnam()
8147 ; return 0; }
8148 EOF
8149 if { (eval echo configure:8150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8150   rm -rf conftest*
8151   eval "ac_cv_lib_$ac_lib_var=yes"
8152 else
8153   echo "configure: failed program was:" >&5
8154   cat conftest.$ac_ext >&5
8155   rm -rf conftest*
8156   eval "ac_cv_lib_$ac_lib_var=no"
8157 fi
8158 rm -f conftest*
8159 LIBS="$ac_save_LIBS"
8160
8161 fi
8162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8163   echo "$ac_t""yes" 1>&6
8164     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8165     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8166   cat >> confdefs.h <<EOF
8167 #define $ac_tr_lib 1
8168 EOF
8169
8170   LIBS="-lsecurity $LIBS"
8171
8172 else
8173   echo "$ac_t""no" 1>&6
8174 fi
8175  
8176      for ac_func in getprpwnam
8177 do
8178 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8179 echo "configure:8180: checking for $ac_func" >&5
8180 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8181   echo $ac_n "(cached) $ac_c" 1>&6
8182 else
8183   cat > conftest.$ac_ext <<EOF
8184 #line 8185 "configure"
8185 #include "confdefs.h"
8186 /* System header to define __stub macros and hopefully few prototypes,
8187     which can conflict with char $ac_func(); below.  */
8188 #include <assert.h>
8189 /* Override any gcc2 internal prototype to avoid an error.  */
8190 /* We use char because int might match the return type of a gcc2
8191     builtin and then its argument prototype would still apply.  */
8192 char $ac_func();
8193
8194 int main() {
8195
8196 /* The GNU C library defines this for functions which it implements
8197     to always fail with ENOSYS.  Some functions are actually named
8198     something starting with __ and the normal name is an alias.  */
8199 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8200 choke me
8201 #else
8202 $ac_func();
8203 #endif
8204
8205 ; return 0; }
8206 EOF
8207 if { (eval echo configure:8208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8208   rm -rf conftest*
8209   eval "ac_cv_func_$ac_func=yes"
8210 else
8211   echo "configure: failed program was:" >&5
8212   cat conftest.$ac_ext >&5
8213   rm -rf conftest*
8214   eval "ac_cv_func_$ac_func=no"
8215 fi
8216 rm -f conftest*
8217 fi
8218
8219 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8220   echo "$ac_t""yes" 1>&6
8221     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8222   cat >> confdefs.h <<EOF
8223 #define $ac_tr_func 1
8224 EOF
8225  
8226 else
8227   echo "$ac_t""no" 1>&6
8228 fi
8229 done
8230
8231   ;;
8232   esac
8233
8234 case "$LIBS" in
8235   *-lsec*) for ac_func in getprpwnam
8236 do
8237 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8238 echo "configure:8239: checking for $ac_func" >&5
8239 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8240   echo $ac_n "(cached) $ac_c" 1>&6
8241 else
8242   cat > conftest.$ac_ext <<EOF
8243 #line 8244 "configure"
8244 #include "confdefs.h"
8245 /* System header to define __stub macros and hopefully few prototypes,
8246     which can conflict with char $ac_func(); below.  */
8247 #include <assert.h>
8248 /* Override any gcc2 internal prototype to avoid an error.  */
8249 /* We use char because int might match the return type of a gcc2
8250     builtin and then its argument prototype would still apply.  */
8251 char $ac_func();
8252
8253 int main() {
8254
8255 /* The GNU C library defines this for functions which it implements
8256     to always fail with ENOSYS.  Some functions are actually named
8257     something starting with __ and the normal name is an alias.  */
8258 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8259 choke me
8260 #else
8261 $ac_func();
8262 #endif
8263
8264 ; return 0; }
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8267   rm -rf conftest*
8268   eval "ac_cv_func_$ac_func=yes"
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -rf conftest*
8273   eval "ac_cv_func_$ac_func=no"
8274 fi
8275 rm -f conftest*
8276 fi
8277
8278 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8279   echo "$ac_t""yes" 1>&6
8280     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8281   cat >> confdefs.h <<EOF
8282 #define $ac_tr_func 1
8283 EOF
8284  
8285 else
8286   echo "$ac_t""no" 1>&6
8287 fi
8288 done
8289  ;;
8290   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8291 echo "configure:8292: checking for getprpwnam in -lsec" >&5
8292 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8294   echo $ac_n "(cached) $ac_c" 1>&6
8295 else
8296   ac_save_LIBS="$LIBS"
8297 LIBS="-lsec  $LIBS"
8298 cat > conftest.$ac_ext <<EOF
8299 #line 8300 "configure"
8300 #include "confdefs.h"
8301 /* Override any gcc2 internal prototype to avoid an error.  */
8302 /* We use char because int might match the return type of a gcc2
8303     builtin and then its argument prototype would still apply.  */
8304 char getprpwnam();
8305
8306 int main() {
8307 getprpwnam()
8308 ; return 0; }
8309 EOF
8310 if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8311   rm -rf conftest*
8312   eval "ac_cv_lib_$ac_lib_var=yes"
8313 else
8314   echo "configure: failed program was:" >&5
8315   cat conftest.$ac_ext >&5
8316   rm -rf conftest*
8317   eval "ac_cv_lib_$ac_lib_var=no"
8318 fi
8319 rm -f conftest*
8320 LIBS="$ac_save_LIBS"
8321
8322 fi
8323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8324   echo "$ac_t""yes" 1>&6
8325     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8326     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8327   cat >> confdefs.h <<EOF
8328 #define $ac_tr_lib 1
8329 EOF
8330
8331   LIBS="-lsec $LIBS"
8332
8333 else
8334   echo "$ac_t""no" 1>&6
8335 fi
8336  
8337      for ac_func in getprpwnam
8338 do
8339 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8340 echo "configure:8341: checking for $ac_func" >&5
8341 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8342   echo $ac_n "(cached) $ac_c" 1>&6
8343 else
8344   cat > conftest.$ac_ext <<EOF
8345 #line 8346 "configure"
8346 #include "confdefs.h"
8347 /* System header to define __stub macros and hopefully few prototypes,
8348     which can conflict with char $ac_func(); below.  */
8349 #include <assert.h>
8350 /* Override any gcc2 internal prototype to avoid an error.  */
8351 /* We use char because int might match the return type of a gcc2
8352     builtin and then its argument prototype would still apply.  */
8353 char $ac_func();
8354
8355 int main() {
8356
8357 /* The GNU C library defines this for functions which it implements
8358     to always fail with ENOSYS.  Some functions are actually named
8359     something starting with __ and the normal name is an alias.  */
8360 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8361 choke me
8362 #else
8363 $ac_func();
8364 #endif
8365
8366 ; return 0; }
8367 EOF
8368 if { (eval echo configure:8369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8369   rm -rf conftest*
8370   eval "ac_cv_func_$ac_func=yes"
8371 else
8372   echo "configure: failed program was:" >&5
8373   cat conftest.$ac_ext >&5
8374   rm -rf conftest*
8375   eval "ac_cv_func_$ac_func=no"
8376 fi
8377 rm -f conftest*
8378 fi
8379
8380 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8381   echo "$ac_t""yes" 1>&6
8382     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8383   cat >> confdefs.h <<EOF
8384 #define $ac_tr_func 1
8385 EOF
8386  
8387 else
8388   echo "$ac_t""no" 1>&6
8389 fi
8390 done
8391
8392   ;;
8393   esac
8394
8395
8396 # this bit needs to be modified for each OS that is suported by
8397 # smbwrapper. You need to specify how to created a shared library and
8398 # how to compile C code to produce PIC object files
8399
8400 # these are the defaults, good for lots of systems
8401 HOST_OS="$host_os"
8402 LDSHFLAGS="-shared"
8403 SHLD="\${CC}"
8404 PICFLAG=""
8405 PICSUFFIX="po"
8406 POBAD_CC="#"
8407 SHLIBEXT="so"
8408 BLDSHARED="false"
8409
8410 # and these are for particular systems
8411 case "$host_os" in
8412                 *linux*)   cat >> confdefs.h <<\EOF
8413 #define LINUX 1
8414 EOF
8415
8416                         BLDSHARED="true"
8417                         LDSHFLAGS="-shared" 
8418                         PICFLAG="-fPIC"
8419                 ;;
8420                 *solaris*) cat >> confdefs.h <<\EOF
8421 #define SUNOS5 1
8422 EOF
8423
8424                         BLDSHARED="true"
8425                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8426                         if test "${ac_cv_prog_CC}" = "gcc"; then
8427                                 PICFLAG="-fPIC"
8428                         else
8429                                 PICFLAG="-KPIC"
8430                                 POBAD_CC=""
8431                                 PICSUFFIX="po.o"
8432                         fi
8433                 ;;
8434                 *sunos*) cat >> confdefs.h <<\EOF
8435 #define SUNOS4 1
8436 EOF
8437
8438                         BLDSHARED="true"
8439                         LDSHFLAGS="-Wl,-h,\$@ -G"
8440                         PICFLAG="-KPIC"   # Is this correct for SunOS
8441                 ;;
8442                 *bsd*)  BLDSHARED="true"
8443                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8444                         PICFLAG="-fPIC"
8445                 ;;
8446                 *irix*) cat >> confdefs.h <<\EOF
8447 #define IRIX 1
8448 EOF
8449
8450                         case "$host_os" in
8451                         *irix6*) cat >> confdefs.h <<\EOF
8452 #define IRIX6 1
8453 EOF
8454
8455                         ;;
8456                         esac
8457                         ATTEMPT_WRAP32_BUILD=yes
8458                         BLDSHARED="true"
8459                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8460                         if test "${ac_cv_prog_CC}" = "gcc"; then
8461                                 PICFLAG="-fPIC"
8462                         else 
8463                                 PICFLAG="-KPIC"
8464                         fi
8465                 ;;
8466                 *aix*) cat >> confdefs.h <<\EOF
8467 #define AIX 1
8468 EOF
8469
8470                         BLDSHARED="true"
8471                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8472                         PICFLAG="-O2 -qmaxmem=6000"
8473                 ;;
8474                 *hpux*) cat >> confdefs.h <<\EOF
8475 #define HPUX 1
8476 EOF
8477
8478                         SHLIBEXT="sl"
8479                         # Use special PIC flags for the native HP-UX compiler.
8480                         if test $ac_cv_prog_cc_Ae = yes; then
8481                                 #BLDSHARED="true"
8482                                 LDSHFLAGS="-b -z +h \$@"
8483                                 PICFLAG="+z"
8484                         fi
8485                 ;;
8486                 *qnx*) cat >> confdefs.h <<\EOF
8487 #define QNX 1
8488 EOF
8489 ;;
8490                 *osf*) cat >> confdefs.h <<\EOF
8491 #define OSF1 1
8492 EOF
8493
8494                         BLDSHARED="true"
8495                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8496                         PICFLAG="-fPIC"
8497                 ;;
8498                 *sco*) cat >> confdefs.h <<\EOF
8499 #define SCO 1
8500 EOF
8501 ;;
8502                 *unixware*) cat >> confdefs.h <<\EOF
8503 #define UNIXWARE 1
8504 EOF
8505
8506                         BLDSHARED="true"
8507                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8508                         PICFLAG="-KPIC"
8509                 ;;
8510                 *next2*) cat >> confdefs.h <<\EOF
8511 #define NEXT2 1
8512 EOF
8513 ;;
8514                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8515 set dummy groff; ac_word=$2
8516 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8517 echo "configure:8518: checking for $ac_word" >&5
8518 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8519   echo $ac_n "(cached) $ac_c" 1>&6
8520 else
8521   if test -n "$ROFF"; then
8522   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8523 else
8524   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8525   ac_dummy="$PATH"
8526   for ac_dir in $ac_dummy; do
8527     test -z "$ac_dir" && ac_dir=.
8528     if test -f $ac_dir/$ac_word; then
8529       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8530       break
8531     fi
8532   done
8533   IFS="$ac_save_ifs"
8534 fi
8535 fi
8536 ROFF="$ac_cv_prog_ROFF"
8537 if test -n "$ROFF"; then
8538   echo "$ac_t""$ROFF" 1>&6
8539 else
8540   echo "$ac_t""no" 1>&6
8541 fi
8542 ;;
8543                 *sysv4*)
8544                         case "$host" in
8545                                 *-univel-*)     if  test "$GCC" != yes ; then
8546                                                                         cat >> confdefs.h <<\EOF
8547 #define HAVE_MEMSET 1
8548 EOF
8549
8550                                                                 fi
8551                                                                 LDSHFLAGS="-G"
8552                                 ;;
8553                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8554 #define RELIANTUNIX 1
8555 EOF
8556 ;;
8557                         esac
8558                         ;;
8559                 *sysv5*)
8560                         if  test "$GCC" != yes ; then
8561                                 cat >> confdefs.h <<\EOF
8562 #define HAVE_MEMSET 1
8563 EOF
8564
8565                         fi
8566                         LDSHFLAGS="-G"
8567                         ;;
8568 esac
8569
8570 # this updates our target list if we can build shared libs
8571 if test $BLDSHARED = true; then
8572    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8573 else
8574    LIBSMBCLIENT_SHARED=
8575 fi
8576
8577 ################
8578
8579 echo $ac_n "checking for long long""... $ac_c" 1>&6
8580 echo "configure:8581: checking for long long" >&5
8581 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8582   echo $ac_n "(cached) $ac_c" 1>&6
8583 else
8584   
8585 if test "$cross_compiling" = yes; then
8586   samba_cv_have_longlong=cross
8587 else
8588   cat > conftest.$ac_ext <<EOF
8589 #line 8590 "configure"
8590 #include "confdefs.h"
8591 #include <stdio.h>
8592 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8593 EOF
8594 if { (eval echo configure:8595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8595 then
8596   samba_cv_have_longlong=yes
8597 else
8598   echo "configure: failed program was:" >&5
8599   cat conftest.$ac_ext >&5
8600   rm -fr conftest*
8601   samba_cv_have_longlong=no
8602 fi
8603 rm -fr conftest*
8604 fi
8605
8606 fi
8607
8608 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8609 if test x"$samba_cv_have_longlong" = x"yes"; then
8610     cat >> confdefs.h <<\EOF
8611 #define HAVE_LONGLONG 1
8612 EOF
8613
8614 fi
8615
8616 #
8617 # Check if the compiler supports the LL prefix on long long integers.
8618 # AIX needs this.
8619
8620 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8621 echo "configure:8622: checking for LL suffix on long long integers" >&5
8622 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8623   echo $ac_n "(cached) $ac_c" 1>&6
8624 else
8625   
8626     cat > conftest.$ac_ext <<EOF
8627 #line 8628 "configure"
8628 #include "confdefs.h"
8629 #include <stdio.h>
8630 int main() {
8631 long long i = 0x8000000000LL
8632 ; return 0; }
8633 EOF
8634 if { (eval echo configure:8635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8635   rm -rf conftest*
8636   samba_cv_compiler_supports_ll=yes
8637 else
8638   echo "configure: failed program was:" >&5
8639   cat conftest.$ac_ext >&5
8640   rm -rf conftest*
8641   samba_cv_compiler_supports_ll=no
8642 fi
8643 rm -f conftest*
8644 fi
8645
8646 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8647 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8648    cat >> confdefs.h <<\EOF
8649 #define COMPILER_SUPPORTS_LL 1
8650 EOF
8651
8652 fi
8653
8654   
8655 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8656 echo "configure:8657: checking for 64 bit off_t" >&5
8657 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8658   echo $ac_n "(cached) $ac_c" 1>&6
8659 else
8660   
8661 if test "$cross_compiling" = yes; then
8662   samba_cv_SIZEOF_OFF_T=cross
8663 else
8664   cat > conftest.$ac_ext <<EOF
8665 #line 8666 "configure"
8666 #include "confdefs.h"
8667 #include <stdio.h>
8668 #include <sys/stat.h>
8669 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8670 EOF
8671 if { (eval echo configure:8672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8672 then
8673   samba_cv_SIZEOF_OFF_T=yes
8674 else
8675   echo "configure: failed program was:" >&5
8676   cat conftest.$ac_ext >&5
8677   rm -fr conftest*
8678   samba_cv_SIZEOF_OFF_T=no
8679 fi
8680 rm -fr conftest*
8681 fi
8682
8683 fi
8684
8685 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8686 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8687     cat >> confdefs.h <<\EOF
8688 #define SIZEOF_OFF_T 8
8689 EOF
8690
8691 fi
8692
8693 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8694 echo "configure:8695: checking for off64_t" >&5
8695 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8696   echo $ac_n "(cached) $ac_c" 1>&6
8697 else
8698   
8699 if test "$cross_compiling" = yes; then
8700   samba_cv_HAVE_OFF64_T=cross
8701 else
8702   cat > conftest.$ac_ext <<EOF
8703 #line 8704 "configure"
8704 #include "confdefs.h"
8705
8706 #if defined(HAVE_UNISTD_H)
8707 #include <unistd.h>
8708 #endif
8709 #include <stdio.h>
8710 #include <sys/stat.h>
8711 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8712 EOF
8713 if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8714 then
8715   samba_cv_HAVE_OFF64_T=yes
8716 else
8717   echo "configure: failed program was:" >&5
8718   cat conftest.$ac_ext >&5
8719   rm -fr conftest*
8720   samba_cv_HAVE_OFF64_T=no
8721 fi
8722 rm -fr conftest*
8723 fi
8724
8725 fi
8726
8727 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8728 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8729     cat >> confdefs.h <<\EOF
8730 #define HAVE_OFF64_T 1
8731 EOF
8732
8733 fi
8734
8735 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8736 echo "configure:8737: checking for 64 bit ino_t" >&5
8737 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   
8741 if test "$cross_compiling" = yes; then
8742   samba_cv_SIZEOF_INO_T=cross
8743 else
8744   cat > conftest.$ac_ext <<EOF
8745 #line 8746 "configure"
8746 #include "confdefs.h"
8747 #include <stdio.h>
8748 #include <sys/stat.h>
8749 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8750 EOF
8751 if { (eval echo configure:8752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8752 then
8753   samba_cv_SIZEOF_INO_T=yes
8754 else
8755   echo "configure: failed program was:" >&5
8756   cat conftest.$ac_ext >&5
8757   rm -fr conftest*
8758   samba_cv_SIZEOF_INO_T=no
8759 fi
8760 rm -fr conftest*
8761 fi
8762
8763 fi
8764
8765 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8766 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8767     cat >> confdefs.h <<\EOF
8768 #define SIZEOF_INO_T 8
8769 EOF
8770
8771 fi
8772
8773 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8774 echo "configure:8775: checking for ino64_t" >&5
8775 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8776   echo $ac_n "(cached) $ac_c" 1>&6
8777 else
8778   
8779 if test "$cross_compiling" = yes; then
8780   samba_cv_HAVE_INO64_T=cross
8781 else
8782   cat > conftest.$ac_ext <<EOF
8783 #line 8784 "configure"
8784 #include "confdefs.h"
8785
8786 #if defined(HAVE_UNISTD_H)
8787 #include <unistd.h>
8788 #endif
8789 #include <stdio.h>
8790 #include <sys/stat.h>
8791 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8792 EOF
8793 if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8794 then
8795   samba_cv_HAVE_INO64_T=yes
8796 else
8797   echo "configure: failed program was:" >&5
8798   cat conftest.$ac_ext >&5
8799   rm -fr conftest*
8800   samba_cv_HAVE_INO64_T=no
8801 fi
8802 rm -fr conftest*
8803 fi
8804
8805 fi
8806
8807 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8808 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8809     cat >> confdefs.h <<\EOF
8810 #define HAVE_INO64_T 1
8811 EOF
8812
8813 fi
8814
8815 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8816 echo "configure:8817: checking for struct dirent64" >&5
8817 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8818   echo $ac_n "(cached) $ac_c" 1>&6
8819 else
8820   
8821 cat > conftest.$ac_ext <<EOF
8822 #line 8823 "configure"
8823 #include "confdefs.h"
8824
8825 #if defined(HAVE_UNISTD_H)
8826 #include <unistd.h>
8827 #endif
8828 #include <sys/types.h>
8829 #include <dirent.h>
8830 int main() {
8831 struct dirent64 de;
8832 ; return 0; }
8833 EOF
8834 if { (eval echo configure:8835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8835   rm -rf conftest*
8836   samba_cv_HAVE_STRUCT_DIRENT64=yes
8837 else
8838   echo "configure: failed program was:" >&5
8839   cat conftest.$ac_ext >&5
8840   rm -rf conftest*
8841   samba_cv_HAVE_STRUCT_DIRENT64=no
8842 fi
8843 rm -f conftest*
8844 fi
8845
8846 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8847 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8848     cat >> confdefs.h <<\EOF
8849 #define HAVE_STRUCT_DIRENT64 1
8850 EOF
8851
8852 fi
8853
8854 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8855 echo "configure:8856: checking for unsigned char" >&5
8856 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8857   echo $ac_n "(cached) $ac_c" 1>&6
8858 else
8859   
8860 if test "$cross_compiling" = yes; then
8861   samba_cv_HAVE_UNSIGNED_CHAR=cross
8862 else
8863   cat > conftest.$ac_ext <<EOF
8864 #line 8865 "configure"
8865 #include "confdefs.h"
8866 #include <stdio.h>
8867 main() { char c; c=250; exit((c > 0)?0:1); }
8868 EOF
8869 if { (eval echo configure:8870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8870 then
8871   samba_cv_HAVE_UNSIGNED_CHAR=yes
8872 else
8873   echo "configure: failed program was:" >&5
8874   cat conftest.$ac_ext >&5
8875   rm -fr conftest*
8876   samba_cv_HAVE_UNSIGNED_CHAR=no
8877 fi
8878 rm -fr conftest*
8879 fi
8880
8881 fi
8882
8883 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8884 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8885     cat >> confdefs.h <<\EOF
8886 #define HAVE_UNSIGNED_CHAR 1
8887 EOF
8888
8889 fi
8890
8891 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8892 echo "configure:8893: checking for sin_len in sock" >&5
8893 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8894   echo $ac_n "(cached) $ac_c" 1>&6
8895 else
8896   
8897 cat > conftest.$ac_ext <<EOF
8898 #line 8899 "configure"
8899 #include "confdefs.h"
8900 #include <sys/types.h>
8901 #include <sys/socket.h>
8902 #include <netinet/in.h>
8903 int main() {
8904 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8905 ; return 0; }
8906 EOF
8907 if { (eval echo configure:8908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8908   rm -rf conftest*
8909   samba_cv_HAVE_SOCK_SIN_LEN=yes
8910 else
8911   echo "configure: failed program was:" >&5
8912   cat conftest.$ac_ext >&5
8913   rm -rf conftest*
8914   samba_cv_HAVE_SOCK_SIN_LEN=no
8915 fi
8916 rm -f conftest*
8917 fi
8918
8919 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8920 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8921     cat >> confdefs.h <<\EOF
8922 #define HAVE_SOCK_SIN_LEN 1
8923 EOF
8924
8925 fi
8926
8927 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8928 echo "configure:8929: checking whether seekdir returns void" >&5
8929 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8930   echo $ac_n "(cached) $ac_c" 1>&6
8931 else
8932   
8933 cat > conftest.$ac_ext <<EOF
8934 #line 8935 "configure"
8935 #include "confdefs.h"
8936 #include <sys/types.h>
8937 #include <dirent.h>
8938 void seekdir(DIR *d, long loc) { return; }
8939 int main() {
8940 return 0;
8941 ; return 0; }
8942 EOF
8943 if { (eval echo configure:8944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8944   rm -rf conftest*
8945   samba_cv_SEEKDIR_RETURNS_VOID=yes
8946 else
8947   echo "configure: failed program was:" >&5
8948   cat conftest.$ac_ext >&5
8949   rm -rf conftest*
8950   samba_cv_SEEKDIR_RETURNS_VOID=no
8951 fi
8952 rm -f conftest*
8953 fi
8954
8955 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8956 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8957     cat >> confdefs.h <<\EOF
8958 #define SEEKDIR_RETURNS_VOID 1
8959 EOF
8960
8961 fi
8962
8963 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8964 echo "configure:8965: checking for __FILE__ macro" >&5
8965 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8966   echo $ac_n "(cached) $ac_c" 1>&6
8967 else
8968   
8969 cat > conftest.$ac_ext <<EOF
8970 #line 8971 "configure"
8971 #include "confdefs.h"
8972 #include <stdio.h>
8973 int main() {
8974 printf("%s\n", __FILE__);
8975 ; return 0; }
8976 EOF
8977 if { (eval echo configure:8978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8978   rm -rf conftest*
8979   samba_cv_HAVE_FILE_MACRO=yes
8980 else
8981   echo "configure: failed program was:" >&5
8982   cat conftest.$ac_ext >&5
8983   rm -rf conftest*
8984   samba_cv_HAVE_FILE_MACRO=no
8985 fi
8986 rm -f conftest*
8987 fi
8988
8989 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8990 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8991     cat >> confdefs.h <<\EOF
8992 #define HAVE_FILE_MACRO 1
8993 EOF
8994
8995 fi
8996
8997 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8998 echo "configure:8999: checking for __FUNCTION__ macro" >&5
8999 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9000   echo $ac_n "(cached) $ac_c" 1>&6
9001 else
9002   
9003 cat > conftest.$ac_ext <<EOF
9004 #line 9005 "configure"
9005 #include "confdefs.h"
9006 #include <stdio.h>
9007 int main() {
9008 printf("%s\n", __FUNCTION__);
9009 ; return 0; }
9010 EOF
9011 if { (eval echo configure:9012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9012   rm -rf conftest*
9013   samba_cv_HAVE_FUNCTION_MACRO=yes
9014 else
9015   echo "configure: failed program was:" >&5
9016   cat conftest.$ac_ext >&5
9017   rm -rf conftest*
9018   samba_cv_HAVE_FUNCTION_MACRO=no
9019 fi
9020 rm -f conftest*
9021 fi
9022
9023 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9024 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9025     cat >> confdefs.h <<\EOF
9026 #define HAVE_FUNCTION_MACRO 1
9027 EOF
9028
9029 fi
9030
9031 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9032 echo "configure:9033: checking if gettimeofday takes tz argument" >&5
9033 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9034   echo $ac_n "(cached) $ac_c" 1>&6
9035 else
9036   
9037 if test "$cross_compiling" = yes; then
9038   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9039 else
9040   cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043
9044 #include <sys/time.h>
9045 #include <unistd.h>
9046 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9047 EOF
9048 if { (eval echo configure:9049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9049 then
9050   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9051 else
9052   echo "configure: failed program was:" >&5
9053   cat conftest.$ac_ext >&5
9054   rm -fr conftest*
9055   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9056 fi
9057 rm -fr conftest*
9058 fi
9059
9060 fi
9061
9062 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9063 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9064     cat >> confdefs.h <<\EOF
9065 #define HAVE_GETTIMEOFDAY_TZ 1
9066 EOF
9067
9068 fi
9069
9070 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9071 echo "configure:9072: checking for C99 vsnprintf" >&5
9072 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9073   echo $ac_n "(cached) $ac_c" 1>&6
9074 else
9075   
9076 if test "$cross_compiling" = yes; then
9077   samba_cv_HAVE_C99_VSNPRINTF=cross
9078 else
9079   cat > conftest.$ac_ext <<EOF
9080 #line 9081 "configure"
9081 #include "confdefs.h"
9082
9083 #include <sys/types.h>
9084 #include <stdarg.h>
9085 void foo(const char *format, ...) { 
9086        va_list ap;
9087        int len;
9088        char buf[5];
9089
9090        va_start(ap, format);
9091        len = vsnprintf(0, 0, format, ap);
9092        va_end(ap);
9093        if (len != 5) exit(1);
9094
9095        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9096
9097        exit(0);
9098 }
9099 main() { foo("hello"); }
9100
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9103 then
9104   samba_cv_HAVE_C99_VSNPRINTF=yes
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -fr conftest*
9109   samba_cv_HAVE_C99_VSNPRINTF=no
9110 fi
9111 rm -fr conftest*
9112 fi
9113
9114 fi
9115
9116 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9117 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9118     cat >> confdefs.h <<\EOF
9119 #define HAVE_C99_VSNPRINTF 1
9120 EOF
9121
9122 fi
9123
9124 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9125 echo "configure:9126: checking for broken readdir" >&5
9126 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9127   echo $ac_n "(cached) $ac_c" 1>&6
9128 else
9129   
9130 if test "$cross_compiling" = yes; then
9131   samba_cv_HAVE_BROKEN_READDIR=cross
9132 else
9133   cat > conftest.$ac_ext <<EOF
9134 #line 9135 "configure"
9135 #include "confdefs.h"
9136 #include <sys/types.h>
9137 #include <dirent.h>
9138 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9139 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9140 di->d_name[0] == 0) exit(0); exit(1);} 
9141 EOF
9142 if { (eval echo configure:9143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9143 then
9144   samba_cv_HAVE_BROKEN_READDIR=yes
9145 else
9146   echo "configure: failed program was:" >&5
9147   cat conftest.$ac_ext >&5
9148   rm -fr conftest*
9149   samba_cv_HAVE_BROKEN_READDIR=no
9150 fi
9151 rm -fr conftest*
9152 fi
9153
9154 fi
9155
9156 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9157 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9158     cat >> confdefs.h <<\EOF
9159 #define HAVE_BROKEN_READDIR 1
9160 EOF
9161
9162 fi
9163
9164 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9165 echo "configure:9166: checking for utimbuf" >&5
9166 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9167   echo $ac_n "(cached) $ac_c" 1>&6
9168 else
9169   
9170 cat > conftest.$ac_ext <<EOF
9171 #line 9172 "configure"
9172 #include "confdefs.h"
9173 #include <sys/types.h>
9174 #include <utime.h>
9175 int main() {
9176 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9177 ; return 0; }
9178 EOF
9179 if { (eval echo configure:9180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9180   rm -rf conftest*
9181   samba_cv_HAVE_UTIMBUF=yes
9182 else
9183   echo "configure: failed program was:" >&5
9184   cat conftest.$ac_ext >&5
9185   rm -rf conftest*
9186   samba_cv_HAVE_UTIMBUF=no
9187 fi
9188 rm -f conftest*
9189 fi
9190
9191 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9192 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9193     cat >> confdefs.h <<\EOF
9194 #define HAVE_UTIMBUF 1
9195 EOF
9196
9197 fi
9198
9199
9200 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9201 do
9202 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9203 echo "configure:9204: checking for $ac_func" >&5
9204 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9205   echo $ac_n "(cached) $ac_c" 1>&6
9206 else
9207   cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210 /* System header to define __stub macros and hopefully few prototypes,
9211     which can conflict with char $ac_func(); below.  */
9212 #include <assert.h>
9213 /* Override any gcc2 internal prototype to avoid an error.  */
9214 /* We use char because int might match the return type of a gcc2
9215     builtin and then its argument prototype would still apply.  */
9216 char $ac_func();
9217
9218 int main() {
9219
9220 /* The GNU C library defines this for functions which it implements
9221     to always fail with ENOSYS.  Some functions are actually named
9222     something starting with __ and the normal name is an alias.  */
9223 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9224 choke me
9225 #else
9226 $ac_func();
9227 #endif
9228
9229 ; return 0; }
9230 EOF
9231 if { (eval echo configure:9232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9232   rm -rf conftest*
9233   eval "ac_cv_func_$ac_func=yes"
9234 else
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   eval "ac_cv_func_$ac_func=no"
9239 fi
9240 rm -f conftest*
9241 fi
9242
9243 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9244   echo "$ac_t""yes" 1>&6
9245     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9246   cat >> confdefs.h <<EOF
9247 #define $ac_tr_func 1
9248 EOF
9249  
9250 else
9251   echo "$ac_t""no" 1>&6
9252 fi
9253 done
9254
9255
9256 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9257 echo "configure:9258: checking for ut_name in utmp" >&5
9258 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9259   echo $ac_n "(cached) $ac_c" 1>&6
9260 else
9261   
9262 cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265 #include <sys/types.h>
9266 #include <utmp.h>
9267 int main() {
9268 struct utmp ut;  ut.ut_name[0] = 'a';
9269 ; return 0; }
9270 EOF
9271 if { (eval echo configure:9272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9272   rm -rf conftest*
9273   samba_cv_HAVE_UT_UT_NAME=yes
9274 else
9275   echo "configure: failed program was:" >&5
9276   cat conftest.$ac_ext >&5
9277   rm -rf conftest*
9278   samba_cv_HAVE_UT_UT_NAME=no
9279 fi
9280 rm -f conftest*
9281 fi
9282
9283 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9284 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9285     cat >> confdefs.h <<\EOF
9286 #define HAVE_UT_UT_NAME 1
9287 EOF
9288
9289 fi 
9290
9291 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9292 echo "configure:9293: checking for ut_user in utmp" >&5
9293 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9294   echo $ac_n "(cached) $ac_c" 1>&6
9295 else
9296   
9297 cat > conftest.$ac_ext <<EOF
9298 #line 9299 "configure"
9299 #include "confdefs.h"
9300 #include <sys/types.h>
9301 #include <utmp.h>
9302 int main() {
9303 struct utmp ut;  ut.ut_user[0] = 'a';
9304 ; return 0; }
9305 EOF
9306 if { (eval echo configure:9307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9307   rm -rf conftest*
9308   samba_cv_HAVE_UT_UT_USER=yes
9309 else
9310   echo "configure: failed program was:" >&5
9311   cat conftest.$ac_ext >&5
9312   rm -rf conftest*
9313   samba_cv_HAVE_UT_UT_USER=no
9314 fi
9315 rm -f conftest*
9316 fi
9317
9318 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9319 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9320     cat >> confdefs.h <<\EOF
9321 #define HAVE_UT_UT_USER 1
9322 EOF
9323
9324 fi 
9325
9326 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9327 echo "configure:9328: checking for ut_id in utmp" >&5
9328 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9329   echo $ac_n "(cached) $ac_c" 1>&6
9330 else
9331   
9332 cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335 #include <sys/types.h>
9336 #include <utmp.h>
9337 int main() {
9338 struct utmp ut;  ut.ut_id[0] = 'a';
9339 ; return 0; }
9340 EOF
9341 if { (eval echo configure:9342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9342   rm -rf conftest*
9343   samba_cv_HAVE_UT_UT_ID=yes
9344 else
9345   echo "configure: failed program was:" >&5
9346   cat conftest.$ac_ext >&5
9347   rm -rf conftest*
9348   samba_cv_HAVE_UT_UT_ID=no
9349 fi
9350 rm -f conftest*
9351 fi
9352
9353 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9354 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9355     cat >> confdefs.h <<\EOF
9356 #define HAVE_UT_UT_ID 1
9357 EOF
9358
9359 fi 
9360
9361 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9362 echo "configure:9363: checking for ut_host in utmp" >&5
9363 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9364   echo $ac_n "(cached) $ac_c" 1>&6
9365 else
9366   
9367 cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370 #include <sys/types.h>
9371 #include <utmp.h>
9372 int main() {
9373 struct utmp ut;  ut.ut_host[0] = 'a';
9374 ; return 0; }
9375 EOF
9376 if { (eval echo configure:9377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9377   rm -rf conftest*
9378   samba_cv_HAVE_UT_UT_HOST=yes
9379 else
9380   echo "configure: failed program was:" >&5
9381   cat conftest.$ac_ext >&5
9382   rm -rf conftest*
9383   samba_cv_HAVE_UT_UT_HOST=no
9384 fi
9385 rm -f conftest*
9386 fi
9387
9388 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9389 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9390     cat >> confdefs.h <<\EOF
9391 #define HAVE_UT_UT_HOST 1
9392 EOF
9393
9394 fi 
9395
9396 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9397 echo "configure:9398: checking for ut_time in utmp" >&5
9398 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9399   echo $ac_n "(cached) $ac_c" 1>&6
9400 else
9401   
9402 cat > conftest.$ac_ext <<EOF
9403 #line 9404 "configure"
9404 #include "confdefs.h"
9405 #include <sys/types.h>
9406 #include <utmp.h>
9407 int main() {
9408 struct utmp ut;  time_t t; ut.ut_time = t;
9409 ; return 0; }
9410 EOF
9411 if { (eval echo configure:9412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9412   rm -rf conftest*
9413   samba_cv_HAVE_UT_UT_TIME=yes
9414 else
9415   echo "configure: failed program was:" >&5
9416   cat conftest.$ac_ext >&5
9417   rm -rf conftest*
9418   samba_cv_HAVE_UT_UT_TIME=no
9419 fi
9420 rm -f conftest*
9421 fi
9422
9423 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9424 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9425     cat >> confdefs.h <<\EOF
9426 #define HAVE_UT_UT_TIME 1
9427 EOF
9428
9429 fi 
9430
9431 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9432 echo "configure:9433: checking for ut_tv in utmp" >&5
9433 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9434   echo $ac_n "(cached) $ac_c" 1>&6
9435 else
9436   
9437 cat > conftest.$ac_ext <<EOF
9438 #line 9439 "configure"
9439 #include "confdefs.h"
9440 #include <sys/types.h>
9441 #include <utmp.h>
9442 int main() {
9443 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9444 ; return 0; }
9445 EOF
9446 if { (eval echo configure:9447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9447   rm -rf conftest*
9448   samba_cv_HAVE_UT_UT_TV=yes
9449 else
9450   echo "configure: failed program was:" >&5
9451   cat conftest.$ac_ext >&5
9452   rm -rf conftest*
9453   samba_cv_HAVE_UT_UT_TV=no
9454 fi
9455 rm -f conftest*
9456 fi
9457
9458 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9459 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9460     cat >> confdefs.h <<\EOF
9461 #define HAVE_UT_UT_TV 1
9462 EOF
9463
9464 fi 
9465
9466 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9467 echo "configure:9468: checking for ut_type in utmp" >&5
9468 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9469   echo $ac_n "(cached) $ac_c" 1>&6
9470 else
9471   
9472 cat > conftest.$ac_ext <<EOF
9473 #line 9474 "configure"
9474 #include "confdefs.h"
9475 #include <sys/types.h>
9476 #include <utmp.h>
9477 int main() {
9478 struct utmp ut;  ut.ut_type = 0;
9479 ; return 0; }
9480 EOF
9481 if { (eval echo configure:9482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9482   rm -rf conftest*
9483   samba_cv_HAVE_UT_UT_TYPE=yes
9484 else
9485   echo "configure: failed program was:" >&5
9486   cat conftest.$ac_ext >&5
9487   rm -rf conftest*
9488   samba_cv_HAVE_UT_UT_TYPE=no
9489 fi
9490 rm -f conftest*
9491 fi
9492
9493 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9494 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9495     cat >> confdefs.h <<\EOF
9496 #define HAVE_UT_UT_TYPE 1
9497 EOF
9498
9499 fi 
9500
9501 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9502 echo "configure:9503: checking for ut_pid in utmp" >&5
9503 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9504   echo $ac_n "(cached) $ac_c" 1>&6
9505 else
9506   
9507 cat > conftest.$ac_ext <<EOF
9508 #line 9509 "configure"
9509 #include "confdefs.h"
9510 #include <sys/types.h>
9511 #include <utmp.h>
9512 int main() {
9513 struct utmp ut;  ut.ut_pid = 0;
9514 ; return 0; }
9515 EOF
9516 if { (eval echo configure:9517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9517   rm -rf conftest*
9518   samba_cv_HAVE_UT_UT_PID=yes
9519 else
9520   echo "configure: failed program was:" >&5
9521   cat conftest.$ac_ext >&5
9522   rm -rf conftest*
9523   samba_cv_HAVE_UT_UT_PID=no
9524 fi
9525 rm -f conftest*
9526 fi
9527
9528 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9529 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9530     cat >> confdefs.h <<\EOF
9531 #define HAVE_UT_UT_PID 1
9532 EOF
9533
9534 fi 
9535
9536 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9537 echo "configure:9538: checking for ut_exit in utmp" >&5
9538 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9539   echo $ac_n "(cached) $ac_c" 1>&6
9540 else
9541   
9542 cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 #include <sys/types.h>
9546 #include <utmp.h>
9547 int main() {
9548 struct utmp ut;  ut.ut_exit.e_exit = 0;
9549 ; return 0; }
9550 EOF
9551 if { (eval echo configure:9552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9552   rm -rf conftest*
9553   samba_cv_HAVE_UT_UT_EXIT=yes
9554 else
9555   echo "configure: failed program was:" >&5
9556   cat conftest.$ac_ext >&5
9557   rm -rf conftest*
9558   samba_cv_HAVE_UT_UT_EXIT=no
9559 fi
9560 rm -f conftest*
9561 fi
9562
9563 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9564 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9565     cat >> confdefs.h <<\EOF
9566 #define HAVE_UT_UT_EXIT 1
9567 EOF
9568
9569 fi 
9570
9571 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9572 echo "configure:9573: checking for ut_addr in utmp" >&5
9573 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9574   echo $ac_n "(cached) $ac_c" 1>&6
9575 else
9576   
9577 cat > conftest.$ac_ext <<EOF
9578 #line 9579 "configure"
9579 #include "confdefs.h"
9580 #include <sys/types.h>
9581 #include <utmp.h>
9582 int main() {
9583 struct utmp ut;  ut.ut_addr = 0;
9584 ; return 0; }
9585 EOF
9586 if { (eval echo configure:9587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9587   rm -rf conftest*
9588   samba_cv_HAVE_UT_UT_ADDR=yes
9589 else
9590   echo "configure: failed program was:" >&5
9591   cat conftest.$ac_ext >&5
9592   rm -rf conftest*
9593   samba_cv_HAVE_UT_UT_ADDR=no
9594 fi
9595 rm -f conftest*
9596 fi
9597
9598 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9599 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9600     cat >> confdefs.h <<\EOF
9601 #define HAVE_UT_UT_ADDR 1
9602 EOF
9603
9604 fi 
9605
9606 if test x$ac_cv_func_pututline = xyes ; then
9607   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9608 echo "configure:9609: checking whether pututline returns pointer" >&5
9609 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9610   echo $ac_n "(cached) $ac_c" 1>&6
9611 else
9612   
9613   cat > conftest.$ac_ext <<EOF
9614 #line 9615 "configure"
9615 #include "confdefs.h"
9616 #include <sys/types.h>
9617 #include <utmp.h>
9618 int main() {
9619 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9620 ; return 0; }
9621 EOF
9622 if { (eval echo configure:9623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9623   rm -rf conftest*
9624   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9625 else
9626   echo "configure: failed program was:" >&5
9627   cat conftest.$ac_ext >&5
9628   rm -rf conftest*
9629   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9630 fi
9631 rm -f conftest*
9632 fi
9633
9634 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9635   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9636       cat >> confdefs.h <<\EOF
9637 #define PUTUTLINE_RETURNS_UTMP 1
9638 EOF
9639
9640   fi
9641 fi
9642
9643 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9644 echo "configure:9645: checking for ut_syslen in utmpx" >&5
9645 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9646   echo $ac_n "(cached) $ac_c" 1>&6
9647 else
9648   
9649 cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652 #include <sys/types.h>
9653 #include <utmpx.h>
9654 int main() {
9655 struct utmpx ux;  ux.ut_syslen = 0;
9656 ; return 0; }
9657 EOF
9658 if { (eval echo configure:9659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9659   rm -rf conftest*
9660   samba_cv_HAVE_UX_UT_SYSLEN=yes
9661 else
9662   echo "configure: failed program was:" >&5
9663   cat conftest.$ac_ext >&5
9664   rm -rf conftest*
9665   samba_cv_HAVE_UX_UT_SYSLEN=no
9666 fi
9667 rm -f conftest*
9668 fi
9669
9670 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9671 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9672     cat >> confdefs.h <<\EOF
9673 #define HAVE_UX_UT_SYSLEN 1
9674 EOF
9675
9676 fi 
9677
9678
9679 #################################################
9680 # check for libiconv support
9681 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9682 echo "configure:9683: checking whether to use libiconv" >&5
9683 # Check whether --with-libiconv or --without-libiconv was given.
9684 if test "${with_libiconv+set}" = set; then
9685   withval="$with_libiconv"
9686    case "$withval" in
9687   no)
9688     echo "$ac_t""no" 1>&6
9689     ;;
9690   *)
9691     echo "$ac_t""yes" 1>&6
9692     CFLAGS="$CFLAGS -I$withval/include"
9693     LDFLAGS="$LDFLAGS -L$withval/lib"
9694     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9695 echo "configure:9696: checking for iconv_open in -liconv" >&5
9696 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9697 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9698   echo $ac_n "(cached) $ac_c" 1>&6
9699 else
9700   ac_save_LIBS="$LIBS"
9701 LIBS="-liconv  $LIBS"
9702 cat > conftest.$ac_ext <<EOF
9703 #line 9704 "configure"
9704 #include "confdefs.h"
9705 /* Override any gcc2 internal prototype to avoid an error.  */
9706 /* We use char because int might match the return type of a gcc2
9707     builtin and then its argument prototype would still apply.  */
9708 char iconv_open();
9709
9710 int main() {
9711 iconv_open()
9712 ; return 0; }
9713 EOF
9714 if { (eval echo configure:9715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9715   rm -rf conftest*
9716   eval "ac_cv_lib_$ac_lib_var=yes"
9717 else
9718   echo "configure: failed program was:" >&5
9719   cat conftest.$ac_ext >&5
9720   rm -rf conftest*
9721   eval "ac_cv_lib_$ac_lib_var=no"
9722 fi
9723 rm -f conftest*
9724 LIBS="$ac_save_LIBS"
9725
9726 fi
9727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9728   echo "$ac_t""yes" 1>&6
9729     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9730     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9731   cat >> confdefs.h <<EOF
9732 #define $ac_tr_lib 1
9733 EOF
9734
9735   LIBS="-liconv $LIBS"
9736
9737 else
9738   echo "$ac_t""no" 1>&6
9739 fi
9740
9741     cat >> confdefs.h <<EOF
9742 #define WITH_LIBICONV "${withval}"
9743 EOF
9744
9745     ;;
9746   esac 
9747 else
9748   echo "$ac_t""no" 1>&6
9749
9750 fi
9751
9752
9753
9754 ############
9755 # check for iconv in libc
9756 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9757 echo "configure:9758: checking for working iconv" >&5
9758 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9759   echo $ac_n "(cached) $ac_c" 1>&6
9760 else
9761   
9762 if test "$cross_compiling" = yes; then
9763   samba_cv_HAVE_NATIVE_ICONV=cross
9764 else
9765   cat > conftest.$ac_ext <<EOF
9766 #line 9767 "configure"
9767 #include "confdefs.h"
9768
9769 #include <iconv.h>
9770 main() {
9771        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9772        if (cd == 0 || cd == (iconv_t)-1) return -1;
9773        return 0;
9774 }
9775
9776 EOF
9777 if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9778 then
9779   samba_cv_HAVE_NATIVE_ICONV=yes
9780 else
9781   echo "configure: failed program was:" >&5
9782   cat conftest.$ac_ext >&5
9783   rm -fr conftest*
9784   samba_cv_HAVE_NATIVE_ICONV=no
9785 fi
9786 rm -fr conftest*
9787 fi
9788
9789 fi
9790
9791 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9792 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9793     cat >> confdefs.h <<\EOF
9794 #define HAVE_NATIVE_ICONV 1
9795 EOF
9796
9797 fi
9798
9799
9800 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9801 echo "configure:9802: checking for Linux kernel oplocks" >&5
9802 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9803   echo $ac_n "(cached) $ac_c" 1>&6
9804 else
9805   
9806 if test "$cross_compiling" = yes; then
9807   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9808 else
9809   cat > conftest.$ac_ext <<EOF
9810 #line 9811 "configure"
9811 #include "confdefs.h"
9812
9813 #include <sys/types.h>
9814 #include <fcntl.h>
9815 #ifndef F_GETLEASE
9816 #define F_GETLEASE      1025
9817 #endif
9818 main() {
9819        int fd = open("/dev/null", O_RDONLY);
9820        return fcntl(fd, F_GETLEASE, 0) == -1;
9821 }
9822
9823 EOF
9824 if { (eval echo configure:9825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9825 then
9826   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9827 else
9828   echo "configure: failed program was:" >&5
9829   cat conftest.$ac_ext >&5
9830   rm -fr conftest*
9831   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9832 fi
9833 rm -fr conftest*
9834 fi
9835
9836 fi
9837
9838 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9839 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9840     cat >> confdefs.h <<\EOF
9841 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9842 EOF
9843
9844 fi
9845
9846 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9847 echo "configure:9848: checking for kernel change notify support" >&5
9848 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9849   echo $ac_n "(cached) $ac_c" 1>&6
9850 else
9851   
9852 if test "$cross_compiling" = yes; then
9853   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9854 else
9855   cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858
9859 #include <sys/types.h>
9860 #include <fcntl.h>
9861 #include <signal.h>
9862 #ifndef F_NOTIFY
9863 #define F_NOTIFY 1026
9864 #endif
9865 main() {
9866         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9867 }
9868
9869 EOF
9870 if { (eval echo configure:9871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9871 then
9872   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9873 else
9874   echo "configure: failed program was:" >&5
9875   cat conftest.$ac_ext >&5
9876   rm -fr conftest*
9877   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9878 fi
9879 rm -fr conftest*
9880 fi
9881
9882 fi
9883
9884 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9885 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9886     cat >> confdefs.h <<\EOF
9887 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9888 EOF
9889
9890 fi
9891
9892 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9893 echo "configure:9894: checking for kernel share modes" >&5
9894 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9895   echo $ac_n "(cached) $ac_c" 1>&6
9896 else
9897   
9898 if test "$cross_compiling" = yes; then
9899   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9900 else
9901   cat > conftest.$ac_ext <<EOF
9902 #line 9903 "configure"
9903 #include "confdefs.h"
9904
9905 #include <sys/types.h>
9906 #include <fcntl.h>
9907 #include <signal.h>
9908 #include <sys/file.h>
9909 #ifndef LOCK_MAND
9910 #define LOCK_MAND       32
9911 #define LOCK_READ       64
9912 #endif
9913 main() {
9914         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9915 }
9916
9917 EOF
9918 if { (eval echo configure:9919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9919 then
9920   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9921 else
9922   echo "configure: failed program was:" >&5
9923   cat conftest.$ac_ext >&5
9924   rm -fr conftest*
9925   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9926 fi
9927 rm -fr conftest*
9928 fi
9929
9930 fi
9931
9932 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9933 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9934     cat >> confdefs.h <<\EOF
9935 #define HAVE_KERNEL_SHARE_MODES 1
9936 EOF
9937
9938 fi
9939
9940
9941
9942
9943 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9944 echo "configure:9945: checking for IRIX kernel oplock type definitions" >&5
9945 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9946   echo $ac_n "(cached) $ac_c" 1>&6
9947 else
9948   
9949 cat > conftest.$ac_ext <<EOF
9950 #line 9951 "configure"
9951 #include "confdefs.h"
9952 #include <sys/types.h>
9953 #include <fcntl.h>
9954 int main() {
9955 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9956 ; return 0; }
9957 EOF
9958 if { (eval echo configure:9959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9959   rm -rf conftest*
9960   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9961 else
9962   echo "configure: failed program was:" >&5
9963   cat conftest.$ac_ext >&5
9964   rm -rf conftest*
9965   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9966 fi
9967 rm -f conftest*
9968 fi
9969
9970 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9971 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9972     cat >> confdefs.h <<\EOF
9973 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9974 EOF
9975
9976 fi
9977
9978 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9979 echo "configure:9980: checking for irix specific capabilities" >&5
9980 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9981   echo $ac_n "(cached) $ac_c" 1>&6
9982 else
9983   
9984 if test "$cross_compiling" = yes; then
9985   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9986 else
9987   cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990 #include <sys/types.h>
9991 #include <sys/capability.h>
9992 main() {
9993  cap_t cap;
9994  if ((cap = cap_get_proc()) == NULL)
9995    exit(1);
9996  cap->cap_effective |= CAP_NETWORK_MGT;
9997  cap->cap_inheritable |= CAP_NETWORK_MGT;
9998  cap_set_proc(cap);
9999  exit(0);
10000 }
10001
10002 EOF
10003 if { (eval echo configure:10004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10004 then
10005   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10006 else
10007   echo "configure: failed program was:" >&5
10008   cat conftest.$ac_ext >&5
10009   rm -fr conftest*
10010   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10011 fi
10012 rm -fr conftest*
10013 fi
10014
10015 fi
10016
10017 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10018 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10019     cat >> confdefs.h <<\EOF
10020 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10021 EOF
10022
10023 fi
10024
10025 #
10026 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10027 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10028 #
10029
10030 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10031 echo "configure:10032: checking for int16 typedef included by rpc/rpc.h" >&5
10032 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10033   echo $ac_n "(cached) $ac_c" 1>&6
10034 else
10035   
10036 cat > conftest.$ac_ext <<EOF
10037 #line 10038 "configure"
10038 #include "confdefs.h"
10039 #include <sys/types.h>
10040 #if defined(HAVE_RPC_RPC_H)
10041 #include <rpc/rpc.h>
10042 #endif
10043 int main() {
10044 int16 testvar;
10045 ; return 0; }
10046 EOF
10047 if { (eval echo configure:10048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10048   rm -rf conftest*
10049   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10050 else
10051   echo "configure: failed program was:" >&5
10052   cat conftest.$ac_ext >&5
10053   rm -rf conftest*
10054   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10055 fi
10056 rm -f conftest*
10057 fi
10058
10059 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10060 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10061     cat >> confdefs.h <<\EOF
10062 #define HAVE_INT16_FROM_RPC_RPC_H 1
10063 EOF
10064
10065 fi
10066
10067 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10068 echo "configure:10069: checking for uint16 typedef included by rpc/rpc.h" >&5
10069 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10070   echo $ac_n "(cached) $ac_c" 1>&6
10071 else
10072   
10073 cat > conftest.$ac_ext <<EOF
10074 #line 10075 "configure"
10075 #include "confdefs.h"
10076 #include <sys/types.h>
10077 #if defined(HAVE_RPC_RPC_H)
10078 #include <rpc/rpc.h>
10079 #endif
10080 int main() {
10081 uint16 testvar;
10082 ; return 0; }
10083 EOF
10084 if { (eval echo configure:10085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10085   rm -rf conftest*
10086   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10087 else
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090   rm -rf conftest*
10091   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10092 fi
10093 rm -f conftest*
10094 fi
10095
10096 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10097 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10098     cat >> confdefs.h <<\EOF
10099 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10100 EOF
10101
10102 fi
10103
10104 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10105 echo "configure:10106: checking for int32 typedef included by rpc/rpc.h" >&5
10106 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10107   echo $ac_n "(cached) $ac_c" 1>&6
10108 else
10109   
10110 cat > conftest.$ac_ext <<EOF
10111 #line 10112 "configure"
10112 #include "confdefs.h"
10113 #include <sys/types.h>
10114 #if defined(HAVE_RPC_RPC_H)
10115 #include <rpc/rpc.h>
10116 #endif
10117 int main() {
10118 int32 testvar;
10119 ; return 0; }
10120 EOF
10121 if { (eval echo configure:10122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10122   rm -rf conftest*
10123   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10124 else
10125   echo "configure: failed program was:" >&5
10126   cat conftest.$ac_ext >&5
10127   rm -rf conftest*
10128   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10129 fi
10130 rm -f conftest*
10131 fi
10132
10133 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10134 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10135     cat >> confdefs.h <<\EOF
10136 #define HAVE_INT32_FROM_RPC_RPC_H 1
10137 EOF
10138
10139 fi
10140
10141 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10142 echo "configure:10143: checking for uint32 typedef included by rpc/rpc.h" >&5
10143 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10144   echo $ac_n "(cached) $ac_c" 1>&6
10145 else
10146   
10147 cat > conftest.$ac_ext <<EOF
10148 #line 10149 "configure"
10149 #include "confdefs.h"
10150 #include <sys/types.h>
10151 #if defined(HAVE_RPC_RPC_H)
10152 #include <rpc/rpc.h>
10153 #endif
10154 int main() {
10155 uint32 testvar;
10156 ; return 0; }
10157 EOF
10158 if { (eval echo configure:10159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10159   rm -rf conftest*
10160   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10161 else
10162   echo "configure: failed program was:" >&5
10163   cat conftest.$ac_ext >&5
10164   rm -rf conftest*
10165   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10166 fi
10167 rm -f conftest*
10168 fi
10169
10170 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10171 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10172     cat >> confdefs.h <<\EOF
10173 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10174 EOF
10175
10176 fi
10177
10178
10179 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10180 echo "configure:10181: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10181 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10182   echo $ac_n "(cached) $ac_c" 1>&6
10183 else
10184   
10185 cat > conftest.$ac_ext <<EOF
10186 #line 10187 "configure"
10187 #include "confdefs.h"
10188 #include <sys/types.h>
10189 #ifdef HAVE_SYS_SECURITY_H
10190 #include <sys/security.h>
10191 #include <prot.h>
10192 #endif  /* HAVE_SYS_SECURITY_H */
10193 #if defined(HAVE_RPC_RPC_H)
10194 #include <rpc/rpc.h>
10195 #endif
10196 int main() {
10197 int testvar;
10198 ; return 0; }
10199 EOF
10200 if { (eval echo configure:10201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10201   rm -rf conftest*
10202   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10203 else
10204   echo "configure: failed program was:" >&5
10205   cat conftest.$ac_ext >&5
10206   rm -rf conftest*
10207   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10208 fi
10209 rm -f conftest*
10210 fi
10211
10212 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10213 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10214     cat >> confdefs.h <<\EOF
10215 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10216 EOF
10217
10218 fi
10219
10220 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10221 echo "configure:10222: checking for test routines" >&5
10222 if test "$cross_compiling" = yes; then
10223   echo "configure: warning: cannot run when cross-compiling" 1>&2
10224 else
10225   cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228 #include "${srcdir-.}/tests/trivial.c"
10229 EOF
10230 if { (eval echo configure:10231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10231 then
10232   echo "$ac_t""yes" 1>&6
10233 else
10234   echo "configure: failed program was:" >&5
10235   cat conftest.$ac_ext >&5
10236   rm -fr conftest*
10237   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10238 fi
10239 rm -fr conftest*
10240 fi
10241
10242
10243 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10244 echo "configure:10245: checking for ftruncate extend" >&5
10245 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   
10249 if test "$cross_compiling" = yes; then
10250   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10251 else
10252   cat > conftest.$ac_ext <<EOF
10253 #line 10254 "configure"
10254 #include "confdefs.h"
10255 #include "${srcdir-.}/tests/ftruncate.c"
10256 EOF
10257 if { (eval echo configure:10258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10258 then
10259   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10260 else
10261   echo "configure: failed program was:" >&5
10262   cat conftest.$ac_ext >&5
10263   rm -fr conftest*
10264   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10265 fi
10266 rm -fr conftest*
10267 fi
10268
10269 fi
10270
10271 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10272 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10273     cat >> confdefs.h <<\EOF
10274 #define HAVE_FTRUNCATE_EXTEND 1
10275 EOF
10276
10277 fi
10278
10279 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10280 echo "configure:10281: checking for AF_LOCAL socket support" >&5
10281 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10282   echo $ac_n "(cached) $ac_c" 1>&6
10283 else
10284   
10285 if test "$cross_compiling" = yes; then
10286   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10287 else
10288   cat > conftest.$ac_ext <<EOF
10289 #line 10290 "configure"
10290 #include "confdefs.h"
10291 #include "${srcdir-.}/tests/unixsock.c"
10292 EOF
10293 if { (eval echo configure:10294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10294 then
10295   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10296 else
10297   echo "configure: failed program was:" >&5
10298   cat conftest.$ac_ext >&5
10299   rm -fr conftest*
10300   samba_cv_HAVE_WORKING_AF_LOCAL=no
10301 fi
10302 rm -fr conftest*
10303 fi
10304
10305 fi
10306
10307 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10308 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10309 then
10310     cat >> confdefs.h <<\EOF
10311 #define HAVE_WORKING_AF_LOCAL 1
10312 EOF
10313
10314 fi
10315
10316 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10317 echo "configure:10318: checking for broken getgroups" >&5
10318 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10319   echo $ac_n "(cached) $ac_c" 1>&6
10320 else
10321   
10322 if test "$cross_compiling" = yes; then
10323   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10324 else
10325   cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 #include "${srcdir-.}/tests/getgroups.c"
10329 EOF
10330 if { (eval echo configure:10331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10331 then
10332   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10333 else
10334   echo "configure: failed program was:" >&5
10335   cat conftest.$ac_ext >&5
10336   rm -fr conftest*
10337   samba_cv_HAVE_BROKEN_GETGROUPS=no
10338 fi
10339 rm -fr conftest*
10340 fi
10341
10342 fi
10343
10344 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10345 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10346     cat >> confdefs.h <<\EOF
10347 #define HAVE_BROKEN_GETGROUPS 1
10348 EOF
10349
10350 fi
10351
10352 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10353 echo "configure:10354: checking whether getpass should be replaced" >&5
10354 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10355   echo $ac_n "(cached) $ac_c" 1>&6
10356 else
10357   
10358 SAVE_CPPFLAGS="$CPPFLAGS"
10359 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10360 cat > conftest.$ac_ext <<EOF
10361 #line 10362 "configure"
10362 #include "confdefs.h"
10363
10364 #define REPLACE_GETPASS 1
10365 #define NO_CONFIG_H 1
10366 #define main dont_declare_main
10367 #include "${srcdir-.}/lib/getsmbpass.c"
10368 #undef main
10369
10370 int main() {
10371
10372 ; return 0; }
10373 EOF
10374 if { (eval echo configure:10375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10375   rm -rf conftest*
10376   samba_cv_REPLACE_GETPASS=yes
10377 else
10378   echo "configure: failed program was:" >&5
10379   cat conftest.$ac_ext >&5
10380   rm -rf conftest*
10381   samba_cv_REPLACE_GETPASS=no
10382 fi
10383 rm -f conftest*
10384 CPPFLAGS="$SAVE_CPPFLAGS"
10385
10386 fi
10387
10388 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10389 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10390         cat >> confdefs.h <<\EOF
10391 #define REPLACE_GETPASS 1
10392 EOF
10393
10394 fi
10395
10396 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10397 echo "configure:10398: checking for broken inet_ntoa" >&5
10398 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10399   echo $ac_n "(cached) $ac_c" 1>&6
10400 else
10401   
10402 if test "$cross_compiling" = yes; then
10403   samba_cv_REPLACE_INET_NTOA=cross
10404 else
10405   cat > conftest.$ac_ext <<EOF
10406 #line 10407 "configure"
10407 #include "confdefs.h"
10408
10409 #include <stdio.h>
10410 #include <sys/types.h>
10411 #include <netinet/in.h>
10412 #ifdef HAVE_ARPA_INET_H
10413 #include <arpa/inet.h>
10414 #endif
10415 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10416 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10417     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10418 exit(1);}
10419 EOF
10420 if { (eval echo configure:10421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10421 then
10422   samba_cv_REPLACE_INET_NTOA=yes
10423 else
10424   echo "configure: failed program was:" >&5
10425   cat conftest.$ac_ext >&5
10426   rm -fr conftest*
10427   samba_cv_REPLACE_INET_NTOA=no
10428 fi
10429 rm -fr conftest*
10430 fi
10431
10432 fi
10433
10434 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10435 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10436     cat >> confdefs.h <<\EOF
10437 #define REPLACE_INET_NTOA 1
10438 EOF
10439
10440 fi
10441
10442 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10443 echo "configure:10444: checking for secure mkstemp" >&5
10444 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10445   echo $ac_n "(cached) $ac_c" 1>&6
10446 else
10447   
10448 if test "$cross_compiling" = yes; then
10449   samba_cv_HAVE_SECURE_MKSTEMP=cross
10450 else
10451   cat > conftest.$ac_ext <<EOF
10452 #line 10453 "configure"
10453 #include "confdefs.h"
10454 #include <stdlib.h>
10455 #include <sys/types.h>
10456 #include <sys/stat.h>
10457 #include <unistd.h>
10458 main() { 
10459   struct stat st;
10460   char tpl[20]="/tmp/test.XXXXXX"; 
10461   int fd = mkstemp(tpl); 
10462   if (fd == -1) exit(1);
10463   unlink(tpl);
10464   if (fstat(fd, &st) != 0) exit(1);
10465   if ((st.st_mode & 0777) != 0600) exit(1);
10466   exit(0);
10467 }
10468 EOF
10469 if { (eval echo configure:10470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10470 then
10471   samba_cv_HAVE_SECURE_MKSTEMP=yes
10472 else
10473   echo "configure: failed program was:" >&5
10474   cat conftest.$ac_ext >&5
10475   rm -fr conftest*
10476   samba_cv_HAVE_SECURE_MKSTEMP=no
10477 fi
10478 rm -fr conftest*
10479 fi
10480
10481 fi
10482
10483 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10484 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10485     cat >> confdefs.h <<\EOF
10486 #define HAVE_SECURE_MKSTEMP 1
10487 EOF
10488
10489 fi
10490
10491 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10492 echo "configure:10493: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10493 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10494   echo $ac_n "(cached) $ac_c" 1>&6
10495 else
10496   
10497 if test "$cross_compiling" = yes; then
10498   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10499 else
10500   cat > conftest.$ac_ext <<EOF
10501 #line 10502 "configure"
10502 #include "confdefs.h"
10503 #include <unistd.h>
10504 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10505 EOF
10506 if { (eval echo configure:10507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10507 then
10508   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10509 else
10510   echo "configure: failed program was:" >&5
10511   cat conftest.$ac_ext >&5
10512   rm -fr conftest*
10513   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10514 fi
10515 rm -fr conftest*
10516 fi
10517
10518 fi
10519
10520 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10521 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10522     cat >> confdefs.h <<\EOF
10523 #define SYSCONF_SC_NGROUPS_MAX 1
10524 EOF
10525
10526 fi
10527
10528 echo $ac_n "checking for root""... $ac_c" 1>&6
10529 echo "configure:10530: checking for root" >&5
10530 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10531   echo $ac_n "(cached) $ac_c" 1>&6
10532 else
10533   
10534 if test "$cross_compiling" = yes; then
10535   samba_cv_HAVE_ROOT=cross
10536 else
10537   cat > conftest.$ac_ext <<EOF
10538 #line 10539 "configure"
10539 #include "confdefs.h"
10540 main() { exit(getuid() != 0); }
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10543 then
10544   samba_cv_HAVE_ROOT=yes
10545 else
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -fr conftest*
10549   samba_cv_HAVE_ROOT=no
10550 fi
10551 rm -fr conftest*
10552 fi
10553
10554 fi
10555
10556 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10557 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10558     cat >> confdefs.h <<\EOF
10559 #define HAVE_ROOT 1
10560 EOF
10561
10562 else
10563     echo "configure: warning: running as non-root will disable some tests" 1>&2
10564 fi
10565
10566 ##################
10567 # look for a method of finding the list of network interfaces
10568 iface=no;
10569 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10570 echo "configure:10571: checking for iface AIX" >&5
10571 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10572   echo $ac_n "(cached) $ac_c" 1>&6
10573 else
10574   
10575 if test "$cross_compiling" = yes; then
10576   samba_cv_HAVE_IFACE_AIX=cross
10577 else
10578   cat > conftest.$ac_ext <<EOF
10579 #line 10580 "configure"
10580 #include "confdefs.h"
10581
10582 #define HAVE_IFACE_AIX 1
10583 #define AUTOCONF_TEST 1
10584 #include "confdefs.h"
10585 #include "${srcdir-.}/lib/interfaces.c"
10586 EOF
10587 if { (eval echo configure:10588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10588 then
10589   samba_cv_HAVE_IFACE_AIX=yes
10590 else
10591   echo "configure: failed program was:" >&5
10592   cat conftest.$ac_ext >&5
10593   rm -fr conftest*
10594   samba_cv_HAVE_IFACE_AIX=no
10595 fi
10596 rm -fr conftest*
10597 fi
10598
10599 fi
10600
10601 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10602 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10603     iface=yes;cat >> confdefs.h <<\EOF
10604 #define HAVE_IFACE_AIX 1
10605 EOF
10606
10607 fi
10608
10609 if test $iface = no; then
10610 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10611 echo "configure:10612: checking for iface ifconf" >&5
10612 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10613   echo $ac_n "(cached) $ac_c" 1>&6
10614 else
10615   
10616 if test "$cross_compiling" = yes; then
10617   samba_cv_HAVE_IFACE_IFCONF=cross
10618 else
10619   cat > conftest.$ac_ext <<EOF
10620 #line 10621 "configure"
10621 #include "confdefs.h"
10622
10623 #define HAVE_IFACE_IFCONF 1
10624 #define AUTOCONF_TEST 1
10625 #include "confdefs.h"
10626 #include "${srcdir-.}/lib/interfaces.c"
10627 EOF
10628 if { (eval echo configure:10629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10629 then
10630   samba_cv_HAVE_IFACE_IFCONF=yes
10631 else
10632   echo "configure: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   rm -fr conftest*
10635   samba_cv_HAVE_IFACE_IFCONF=no
10636 fi
10637 rm -fr conftest*
10638 fi
10639
10640 fi
10641
10642 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10643 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10644     iface=yes;cat >> confdefs.h <<\EOF
10645 #define HAVE_IFACE_IFCONF 1
10646 EOF
10647
10648 fi
10649 fi
10650
10651 if test $iface = no; then
10652 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10653 echo "configure:10654: checking for iface ifreq" >&5
10654 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10655   echo $ac_n "(cached) $ac_c" 1>&6
10656 else
10657   
10658 if test "$cross_compiling" = yes; then
10659   samba_cv_HAVE_IFACE_IFREQ=cross
10660 else
10661   cat > conftest.$ac_ext <<EOF
10662 #line 10663 "configure"
10663 #include "confdefs.h"
10664
10665 #define HAVE_IFACE_IFREQ 1
10666 #define AUTOCONF_TEST 1
10667 #include "confdefs.h"
10668 #include "${srcdir-.}/lib/interfaces.c"
10669 EOF
10670 if { (eval echo configure:10671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10671 then
10672   samba_cv_HAVE_IFACE_IFREQ=yes
10673 else
10674   echo "configure: failed program was:" >&5
10675   cat conftest.$ac_ext >&5
10676   rm -fr conftest*
10677   samba_cv_HAVE_IFACE_IFREQ=no
10678 fi
10679 rm -fr conftest*
10680 fi
10681
10682 fi
10683
10684 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10685 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10686     iface=yes;cat >> confdefs.h <<\EOF
10687 #define HAVE_IFACE_IFREQ 1
10688 EOF
10689
10690 fi
10691 fi
10692
10693
10694 ################################################
10695 # look for a method of setting the effective uid
10696 seteuid=no;
10697 if test $seteuid = no; then
10698 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10699 echo "configure:10700: checking for setresuid" >&5
10700 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10701   echo $ac_n "(cached) $ac_c" 1>&6
10702 else
10703   
10704 if test "$cross_compiling" = yes; then
10705   samba_cv_USE_SETRESUID=cross
10706 else
10707   cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710
10711 #define AUTOCONF_TEST 1
10712 #define USE_SETRESUID 1
10713 #include "confdefs.h"
10714 #include "${srcdir-.}/lib/util_sec.c"
10715 EOF
10716 if { (eval echo configure:10717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10717 then
10718   samba_cv_USE_SETRESUID=yes
10719 else
10720   echo "configure: failed program was:" >&5
10721   cat conftest.$ac_ext >&5
10722   rm -fr conftest*
10723   samba_cv_USE_SETRESUID=no
10724 fi
10725 rm -fr conftest*
10726 fi
10727
10728 fi
10729
10730 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10731 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10732     seteuid=yes;cat >> confdefs.h <<\EOF
10733 #define USE_SETRESUID 1
10734 EOF
10735
10736 fi
10737 fi
10738
10739
10740 if test $seteuid = no; then
10741 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10742 echo "configure:10743: checking for setreuid" >&5
10743 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10744   echo $ac_n "(cached) $ac_c" 1>&6
10745 else
10746   
10747 if test "$cross_compiling" = yes; then
10748   samba_cv_USE_SETREUID=cross
10749 else
10750   cat > conftest.$ac_ext <<EOF
10751 #line 10752 "configure"
10752 #include "confdefs.h"
10753
10754 #define AUTOCONF_TEST 1
10755 #define USE_SETREUID 1
10756 #include "confdefs.h"
10757 #include "${srcdir-.}/lib/util_sec.c"
10758 EOF
10759 if { (eval echo configure:10760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10760 then
10761   samba_cv_USE_SETREUID=yes
10762 else
10763   echo "configure: failed program was:" >&5
10764   cat conftest.$ac_ext >&5
10765   rm -fr conftest*
10766   samba_cv_USE_SETREUID=no
10767 fi
10768 rm -fr conftest*
10769 fi
10770
10771 fi
10772
10773 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10774 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10775     seteuid=yes;cat >> confdefs.h <<\EOF
10776 #define USE_SETREUID 1
10777 EOF
10778
10779 fi
10780 fi
10781
10782 if test $seteuid = no; then
10783 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10784 echo "configure:10785: checking for seteuid" >&5
10785 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10786   echo $ac_n "(cached) $ac_c" 1>&6
10787 else
10788   
10789 if test "$cross_compiling" = yes; then
10790   samba_cv_USE_SETEUID=cross
10791 else
10792   cat > conftest.$ac_ext <<EOF
10793 #line 10794 "configure"
10794 #include "confdefs.h"
10795
10796 #define AUTOCONF_TEST 1
10797 #define USE_SETEUID 1
10798 #include "confdefs.h"
10799 #include "${srcdir-.}/lib/util_sec.c"
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10802 then
10803   samba_cv_USE_SETEUID=yes
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -fr conftest*
10808   samba_cv_USE_SETEUID=no
10809 fi
10810 rm -fr conftest*
10811 fi
10812
10813 fi
10814
10815 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10816 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10817     seteuid=yes;cat >> confdefs.h <<\EOF
10818 #define USE_SETEUID 1
10819 EOF
10820
10821 fi
10822 fi
10823
10824 if test $seteuid = no; then
10825 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10826 echo "configure:10827: checking for setuidx" >&5
10827 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10828   echo $ac_n "(cached) $ac_c" 1>&6
10829 else
10830   
10831 if test "$cross_compiling" = yes; then
10832   samba_cv_USE_SETUIDX=cross
10833 else
10834   cat > conftest.$ac_ext <<EOF
10835 #line 10836 "configure"
10836 #include "confdefs.h"
10837
10838 #define AUTOCONF_TEST 1
10839 #define USE_SETUIDX 1
10840 #include "confdefs.h"
10841 #include "${srcdir-.}/lib/util_sec.c"
10842 EOF
10843 if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10844 then
10845   samba_cv_USE_SETUIDX=yes
10846 else
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -fr conftest*
10850   samba_cv_USE_SETUIDX=no
10851 fi
10852 rm -fr conftest*
10853 fi
10854
10855 fi
10856
10857 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10858 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10859     seteuid=yes;cat >> confdefs.h <<\EOF
10860 #define USE_SETUIDX 1
10861 EOF
10862
10863 fi
10864 fi
10865
10866
10867 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10868 echo "configure:10869: checking for working mmap" >&5
10869 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10870   echo $ac_n "(cached) $ac_c" 1>&6
10871 else
10872   
10873 if test "$cross_compiling" = yes; then
10874   samba_cv_HAVE_MMAP=cross
10875 else
10876   cat > conftest.$ac_ext <<EOF
10877 #line 10878 "configure"
10878 #include "confdefs.h"
10879 #include "${srcdir-.}/tests/shared_mmap.c"
10880 EOF
10881 if { (eval echo configure:10882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10882 then
10883   samba_cv_HAVE_MMAP=yes
10884 else
10885   echo "configure: failed program was:" >&5
10886   cat conftest.$ac_ext >&5
10887   rm -fr conftest*
10888   samba_cv_HAVE_MMAP=no
10889 fi
10890 rm -fr conftest*
10891 fi
10892
10893 fi
10894
10895 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10896 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10897     cat >> confdefs.h <<\EOF
10898 #define HAVE_MMAP 1
10899 EOF
10900
10901 fi
10902
10903 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10904 echo "configure:10905: checking for ftruncate needs root" >&5
10905 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10906   echo $ac_n "(cached) $ac_c" 1>&6
10907 else
10908   
10909 if test "$cross_compiling" = yes; then
10910   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10911 else
10912   cat > conftest.$ac_ext <<EOF
10913 #line 10914 "configure"
10914 #include "confdefs.h"
10915 #include "${srcdir-.}/tests/ftruncroot.c"
10916 EOF
10917 if { (eval echo configure:10918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10918 then
10919   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10920 else
10921   echo "configure: failed program was:" >&5
10922   cat conftest.$ac_ext >&5
10923   rm -fr conftest*
10924   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10925 fi
10926 rm -fr conftest*
10927 fi
10928
10929 fi
10930
10931 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10932 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10933     cat >> confdefs.h <<\EOF
10934 #define FTRUNCATE_NEEDS_ROOT 1
10935 EOF
10936
10937 fi
10938
10939 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10940 echo "configure:10941: checking for fcntl locking" >&5
10941 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10942   echo $ac_n "(cached) $ac_c" 1>&6
10943 else
10944   
10945 if test "$cross_compiling" = yes; then
10946   samba_cv_HAVE_FCNTL_LOCK=cross
10947 else
10948   cat > conftest.$ac_ext <<EOF
10949 #line 10950 "configure"
10950 #include "confdefs.h"
10951 #include "${srcdir-.}/tests/fcntl_lock.c"
10952 EOF
10953 if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10954 then
10955   samba_cv_HAVE_FCNTL_LOCK=yes
10956 else
10957   echo "configure: failed program was:" >&5
10958   cat conftest.$ac_ext >&5
10959   rm -fr conftest*
10960   samba_cv_HAVE_FCNTL_LOCK=no
10961 fi
10962 rm -fr conftest*
10963 fi
10964
10965 fi
10966
10967 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10968 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10969     cat >> confdefs.h <<\EOF
10970 #define HAVE_FCNTL_LOCK 1
10971 EOF
10972
10973 fi
10974
10975 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10976 echo "configure:10977: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10977 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10978   echo $ac_n "(cached) $ac_c" 1>&6
10979 else
10980   
10981 if test "$cross_compiling" = yes; then
10982   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10983 else
10984   cat > conftest.$ac_ext <<EOF
10985 #line 10986 "configure"
10986 #include "confdefs.h"
10987 #include "${srcdir-.}/tests/fcntl_lock64.c"
10988 EOF
10989 if { (eval echo configure:10990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10990 then
10991   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10992 else
10993   echo "configure: failed program was:" >&5
10994   cat conftest.$ac_ext >&5
10995   rm -fr conftest*
10996   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10997 fi
10998 rm -fr conftest*
10999 fi
11000
11001 fi
11002
11003 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11004 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11005     cat >> confdefs.h <<\EOF
11006 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11007 EOF
11008
11009
11010 else
11011
11012
11013   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11014 echo "configure:11015: checking for 64 bit fcntl locking" >&5
11015 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11016   echo $ac_n "(cached) $ac_c" 1>&6
11017 else
11018   
11019   if test "$cross_compiling" = yes; then
11020   samba_cv_HAVE_STRUCT_FLOCK64=cross
11021 else
11022   cat > conftest.$ac_ext <<EOF
11023 #line 11024 "configure"
11024 #include "confdefs.h"
11025
11026 #if defined(HAVE_UNISTD_H)
11027 #include <unistd.h>
11028 #endif
11029 #include <stdio.h>
11030 #include <stdlib.h>
11031
11032 #ifdef HAVE_FCNTL_H
11033 #include <fcntl.h>
11034 #endif
11035
11036 #ifdef HAVE_SYS_FCNTL_H
11037 #include <sys/fcntl.h>
11038 #endif
11039 main() { struct flock64 fl64;
11040 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11041 exit(0);
11042 #else
11043 exit(1);
11044 #endif
11045 }
11046 EOF
11047 if { (eval echo configure:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11048 then
11049   samba_cv_HAVE_STRUCT_FLOCK64=yes
11050 else
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -fr conftest*
11054   samba_cv_HAVE_STRUCT_FLOCK64=no
11055 fi
11056 rm -fr conftest*
11057 fi
11058
11059 fi
11060
11061 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11062
11063   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11064       cat >> confdefs.h <<\EOF
11065 #define HAVE_STRUCT_FLOCK64 1
11066 EOF
11067
11068   fi
11069 fi
11070
11071
11072 case "$host_os" in
11073 *linux*)
11074 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11075 echo "configure:11076: checking for broken RedHat 7.2 system header files" >&5
11076 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11077   echo $ac_n "(cached) $ac_c" 1>&6
11078 else
11079   
11080 cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083
11084 #ifdef HAVE_SYS_VFS_H
11085 #include <sys/vfs.h>
11086 #endif
11087 #ifdef HAVE_SYS_CAPABILITY_H
11088 #include <sys/capability.h>
11089 #endif
11090
11091 int main() {
11092 int i;
11093 ; return 0; }
11094 EOF
11095 if { (eval echo configure:11096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11096   rm -rf conftest*
11097   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11098 else
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -rf conftest*
11102   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11103 fi
11104 rm -f conftest*
11105 fi
11106
11107 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11108 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11109    cat >> confdefs.h <<\EOF
11110 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11111 EOF
11112
11113 fi
11114 ;;
11115 esac
11116
11117 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11118 echo "configure:11119: checking for broken nisplus include files" >&5
11119 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11120   echo $ac_n "(cached) $ac_c" 1>&6
11121 else
11122   
11123 cat > conftest.$ac_ext <<EOF
11124 #line 11125 "configure"
11125 #include "confdefs.h"
11126 #include <sys/acl.h>
11127 #if defined(HAVE_RPCSVC_NIS_H)
11128 #include <rpcsvc/nis.h>
11129 #endif
11130 int main() {
11131 int i;
11132 ; return 0; }
11133 EOF
11134 if { (eval echo configure:11135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11135   rm -rf conftest*
11136   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11137 else
11138   echo "configure: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   rm -rf conftest*
11141   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11142 fi
11143 rm -f conftest*
11144 fi
11145
11146 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11147 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11148     cat >> confdefs.h <<\EOF
11149 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11150 EOF
11151
11152 fi
11153
11154
11155 #################################################
11156 # check for smbwrapper support
11157 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11158 echo "configure:11159: checking whether to use smbwrapper" >&5
11159 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11160 if test "${with_smbwrapper+set}" = set; then
11161   withval="$with_smbwrapper"
11162    case "$withval" in
11163   yes)
11164     echo "$ac_t""yes" 1>&6
11165     cat >> confdefs.h <<\EOF
11166 #define WITH_SMBWRAPPER 1
11167 EOF
11168
11169         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11170
11171         if test x$ATTEMPT_WRAP32_BUILD = x; then
11172                 WRAP32=""
11173         else
11174                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11175         fi
11176
11177 # Conditions under which smbwrapper should not be built.
11178
11179         if test x$PICFLAG = x; then
11180            echo No support for PIC code - disabling smbwrapper and smbsh
11181            WRAP=""
11182            WRAP32=""
11183         elif test x$ac_cv_func_syscall = xno; then
11184            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11185            WRAP=""
11186            WRAP32=""
11187         fi
11188     ;;
11189   *)
11190     echo "$ac_t""no" 1>&6
11191     ;;
11192   esac 
11193 else
11194   echo "$ac_t""no" 1>&6
11195
11196 fi
11197
11198
11199 #################################################
11200 # check for AFS clear-text auth support
11201 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11202 echo "configure:11203: checking whether to use AFS clear-text auth" >&5
11203 # Check whether --with-afs or --without-afs was given.
11204 if test "${with_afs+set}" = set; then
11205   withval="$with_afs"
11206    case "$withval" in
11207   yes)
11208     echo "$ac_t""yes" 1>&6
11209     cat >> confdefs.h <<\EOF
11210 #define WITH_AFS 1
11211 EOF
11212
11213     ;;
11214   *)
11215     echo "$ac_t""no" 1>&6
11216     ;;
11217   esac 
11218 else
11219   echo "$ac_t""no" 1>&6
11220
11221 fi
11222
11223
11224
11225 #################################################
11226 # check for the DFS clear-text auth system
11227 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11228 echo "configure:11229: checking whether to use DFS clear-text auth" >&5
11229 # Check whether --with-dfs or --without-dfs was given.
11230 if test "${with_dfs+set}" = set; then
11231   withval="$with_dfs"
11232    case "$withval" in
11233   yes)
11234     echo "$ac_t""yes" 1>&6
11235     cat >> confdefs.h <<\EOF
11236 #define WITH_DFS 1
11237 EOF
11238
11239     ;;
11240   *)
11241     echo "$ac_t""no" 1>&6
11242     ;;
11243   esac 
11244 else
11245   echo "$ac_t""no" 1>&6
11246
11247 fi
11248
11249
11250
11251 #################################################
11252 # see if this box has the RedHat location for kerberos
11253 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11254 echo "configure:11255: checking for /usr/kerberos" >&5
11255 if test -d /usr/kerberos; then
11256     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11257     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11258     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11259     echo "$ac_t""yes" 1>&6
11260 else
11261     echo "$ac_t""no" 1>&6
11262 fi
11263
11264 #################################################
11265 # check for location of Kerberos 5 install
11266 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11267 echo "configure:11268: checking for kerberos 5 install path" >&5
11268 # Check whether --with-krb5 or --without-krb5 was given.
11269 if test "${with_krb5+set}" = set; then
11270   withval="$with_krb5"
11271    case "$withval" in
11272   no)
11273     echo "$ac_t""no" 1>&6
11274     ;;
11275   *)
11276     echo "$ac_t""yes" 1>&6
11277     LIBS="$LIBS -lkrb5"
11278     CFLAGS="$CFLAGS -I$withval/include"
11279     CPPFLAGS="$CPPFLAGS -I$withval/include"
11280     LDFLAGS="$LDFLAGS -L$withval/lib"
11281     ;;
11282   esac 
11283 else
11284   echo "$ac_t""no" 1>&6
11285
11286 fi
11287
11288
11289 # now check for krb5.h. Some systems have the libraries without the headers!
11290 # note that this check is done here to allow for different kerberos
11291 # include paths
11292 for ac_hdr in krb5.h
11293 do
11294 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11295 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11296 echo "configure:11297: checking for $ac_hdr" >&5
11297 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   cat > conftest.$ac_ext <<EOF
11301 #line 11302 "configure"
11302 #include "confdefs.h"
11303 #include <$ac_hdr>
11304 EOF
11305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11306 { (eval echo configure:11307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11308 if test -z "$ac_err"; then
11309   rm -rf conftest*
11310   eval "ac_cv_header_$ac_safe=yes"
11311 else
11312   echo "$ac_err" >&5
11313   echo "configure: failed program was:" >&5
11314   cat conftest.$ac_ext >&5
11315   rm -rf conftest*
11316   eval "ac_cv_header_$ac_safe=no"
11317 fi
11318 rm -f conftest*
11319 fi
11320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11321   echo "$ac_t""yes" 1>&6
11322     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11323   cat >> confdefs.h <<EOF
11324 #define $ac_tr_hdr 1
11325 EOF
11326  
11327 else
11328   echo "$ac_t""no" 1>&6
11329 fi
11330 done
11331
11332
11333 ##################################################################
11334 # we might need the k5crypto and com_err libraries on some systems
11335 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11336 echo "configure:11337: checking for _et_list in -lcom_err" >&5
11337 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11338 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11339   echo $ac_n "(cached) $ac_c" 1>&6
11340 else
11341   ac_save_LIBS="$LIBS"
11342 LIBS="-lcom_err  $LIBS"
11343 cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346 /* Override any gcc2 internal prototype to avoid an error.  */
11347 /* We use char because int might match the return type of a gcc2
11348     builtin and then its argument prototype would still apply.  */
11349 char _et_list();
11350
11351 int main() {
11352 _et_list()
11353 ; return 0; }
11354 EOF
11355 if { (eval echo configure:11356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11356   rm -rf conftest*
11357   eval "ac_cv_lib_$ac_lib_var=yes"
11358 else
11359   echo "configure: failed program was:" >&5
11360   cat conftest.$ac_ext >&5
11361   rm -rf conftest*
11362   eval "ac_cv_lib_$ac_lib_var=no"
11363 fi
11364 rm -f conftest*
11365 LIBS="$ac_save_LIBS"
11366
11367 fi
11368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11369   echo "$ac_t""yes" 1>&6
11370   LIBS="$LIBS -lcom_err"
11371 else
11372   echo "$ac_t""no" 1>&6
11373 fi
11374
11375 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11376 echo "configure:11377: checking for krb5_encrypt_data in -lk5crypto" >&5
11377 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11378 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11379   echo $ac_n "(cached) $ac_c" 1>&6
11380 else
11381   ac_save_LIBS="$LIBS"
11382 LIBS="-lk5crypto  $LIBS"
11383 cat > conftest.$ac_ext <<EOF
11384 #line 11385 "configure"
11385 #include "confdefs.h"
11386 /* Override any gcc2 internal prototype to avoid an error.  */
11387 /* We use char because int might match the return type of a gcc2
11388     builtin and then its argument prototype would still apply.  */
11389 char krb5_encrypt_data();
11390
11391 int main() {
11392 krb5_encrypt_data()
11393 ; return 0; }
11394 EOF
11395 if { (eval echo configure:11396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11396   rm -rf conftest*
11397   eval "ac_cv_lib_$ac_lib_var=yes"
11398 else
11399   echo "configure: failed program was:" >&5
11400   cat conftest.$ac_ext >&5
11401   rm -rf conftest*
11402   eval "ac_cv_lib_$ac_lib_var=no"
11403 fi
11404 rm -f conftest*
11405 LIBS="$ac_save_LIBS"
11406
11407 fi
11408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11409   echo "$ac_t""yes" 1>&6
11410   LIBS="$LIBS -lk5crypto"
11411 else
11412   echo "$ac_t""no" 1>&6
11413 fi
11414
11415
11416
11417 ########################################################
11418 # now see if we can find the krb5 libs in standard paths
11419 # or as specified above
11420 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11421 echo "configure:11422: checking for krb5_mk_req_extended in -lkrb5" >&5
11422 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11423 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11424   echo $ac_n "(cached) $ac_c" 1>&6
11425 else
11426   ac_save_LIBS="$LIBS"
11427 LIBS="-lkrb5  $LIBS"
11428 cat > conftest.$ac_ext <<EOF
11429 #line 11430 "configure"
11430 #include "confdefs.h"
11431 /* Override any gcc2 internal prototype to avoid an error.  */
11432 /* We use char because int might match the return type of a gcc2
11433     builtin and then its argument prototype would still apply.  */
11434 char krb5_mk_req_extended();
11435
11436 int main() {
11437 krb5_mk_req_extended()
11438 ; return 0; }
11439 EOF
11440 if { (eval echo configure:11441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11441   rm -rf conftest*
11442   eval "ac_cv_lib_$ac_lib_var=yes"
11443 else
11444   echo "configure: failed program was:" >&5
11445   cat conftest.$ac_ext >&5
11446   rm -rf conftest*
11447   eval "ac_cv_lib_$ac_lib_var=no"
11448 fi
11449 rm -f conftest*
11450 LIBS="$ac_save_LIBS"
11451
11452 fi
11453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11454   echo "$ac_t""yes" 1>&6
11455   LIBS="$LIBS -lkrb5";
11456         cat >> confdefs.h <<\EOF
11457 #define HAVE_KRB5 1
11458 EOF
11459
11460 else
11461   echo "$ac_t""no" 1>&6
11462 fi
11463
11464
11465 ########################################################
11466 # now see if we can find the ldap libs in standard paths
11467 if test x$have_ldap != xyes; then
11468 echo $ac_n "checking for ldap_open in -lldap""... $ac_c" 1>&6
11469 echo "configure:11470: checking for ldap_open in -lldap" >&5
11470 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
11471 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11472   echo $ac_n "(cached) $ac_c" 1>&6
11473 else
11474   ac_save_LIBS="$LIBS"
11475 LIBS="-lldap  $LIBS"
11476 cat > conftest.$ac_ext <<EOF
11477 #line 11478 "configure"
11478 #include "confdefs.h"
11479 /* Override any gcc2 internal prototype to avoid an error.  */
11480 /* We use char because int might match the return type of a gcc2
11481     builtin and then its argument prototype would still apply.  */
11482 char ldap_open();
11483
11484 int main() {
11485 ldap_open()
11486 ; return 0; }
11487 EOF
11488 if { (eval echo configure:11489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11489   rm -rf conftest*
11490   eval "ac_cv_lib_$ac_lib_var=yes"
11491 else
11492   echo "configure: failed program was:" >&5
11493   cat conftest.$ac_ext >&5
11494   rm -rf conftest*
11495   eval "ac_cv_lib_$ac_lib_var=no"
11496 fi
11497 rm -f conftest*
11498 LIBS="$ac_save_LIBS"
11499
11500 fi
11501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11502   echo "$ac_t""yes" 1>&6
11503   LIBS="$LIBS -lldap";
11504         cat >> confdefs.h <<\EOF
11505 #define HAVE_LDAP 1
11506 EOF
11507
11508 else
11509   echo "$ac_t""no" 1>&6
11510 fi
11511
11512 fi
11513 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11514 echo "configure:11515: checking for ber_scanf in -llber" >&5
11515 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11516 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11517   echo $ac_n "(cached) $ac_c" 1>&6
11518 else
11519   ac_save_LIBS="$LIBS"
11520 LIBS="-llber  $LIBS"
11521 cat > conftest.$ac_ext <<EOF
11522 #line 11523 "configure"
11523 #include "confdefs.h"
11524 /* Override any gcc2 internal prototype to avoid an error.  */
11525 /* We use char because int might match the return type of a gcc2
11526     builtin and then its argument prototype would still apply.  */
11527 char ber_scanf();
11528
11529 int main() {
11530 ber_scanf()
11531 ; return 0; }
11532 EOF
11533 if { (eval echo configure:11534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11534   rm -rf conftest*
11535   eval "ac_cv_lib_$ac_lib_var=yes"
11536 else
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -rf conftest*
11540   eval "ac_cv_lib_$ac_lib_var=no"
11541 fi
11542 rm -f conftest*
11543 LIBS="$ac_save_LIBS"
11544
11545 fi
11546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11547   echo "$ac_t""yes" 1>&6
11548   LIBS="$LIBS -llber"
11549 else
11550   echo "$ac_t""no" 1>&6
11551 fi
11552
11553
11554
11555 #################################################
11556 # check for automount support
11557 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11558 echo "configure:11559: checking whether to use AUTOMOUNT" >&5
11559 # Check whether --with-automount or --without-automount was given.
11560 if test "${with_automount+set}" = set; then
11561   withval="$with_automount"
11562    case "$withval" in
11563   yes)
11564     echo "$ac_t""yes" 1>&6
11565     cat >> confdefs.h <<\EOF
11566 #define WITH_AUTOMOUNT 1
11567 EOF
11568
11569     ;;
11570   *)
11571     echo "$ac_t""no" 1>&6
11572     ;;
11573   esac 
11574 else
11575   echo "$ac_t""no" 1>&6
11576
11577 fi
11578
11579
11580 #################################################
11581 # check for smbmount support
11582 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11583 echo "configure:11584: checking whether to use SMBMOUNT" >&5
11584 # Check whether --with-smbmount or --without-smbmount was given.
11585 if test "${with_smbmount+set}" = set; then
11586   withval="$with_smbmount"
11587    case "$withval" in
11588   yes)
11589         case "$host_os" in
11590         *linux*)
11591                 echo "$ac_t""yes" 1>&6
11592                 cat >> confdefs.h <<\EOF
11593 #define WITH_SMBMOUNT 1
11594 EOF
11595
11596                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11597                 ;;
11598         *)
11599                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11600                 ;;
11601         esac
11602     ;;
11603   *)
11604     echo "$ac_t""no" 1>&6
11605     MPROGS=
11606     ;;
11607   esac 
11608 else
11609   echo "$ac_t""no" 1>&6
11610   MPROGS=
11611
11612 fi
11613
11614
11615
11616 #################################################
11617 # check for a PAM clear-text auth, accounts, password and session support
11618 with_pam_for_crypt=no
11619 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
11620 echo "configure:11621: checking whether to use PAM" >&5
11621 # Check whether --with-pam or --without-pam was given.
11622 if test "${with_pam+set}" = set; then
11623   withval="$with_pam"
11624    case "$withval" in
11625   yes)
11626     echo "$ac_t""yes" 1>&6
11627     cat >> confdefs.h <<\EOF
11628 #define WITH_PAM 1
11629 EOF
11630
11631     LIBS="$LIBS -lpam"
11632     with_pam_for_crypt=yes
11633     ;;
11634   *)
11635     echo "$ac_t""no" 1>&6
11636     ;;
11637   esac 
11638 else
11639   echo "$ac_t""no" 1>&6
11640
11641 fi
11642
11643
11644 # we can't build a pam module if we don't have pam.
11645 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11646 echo "configure:11647: checking for pam_get_data in -lpam" >&5
11647 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11648 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11649   echo $ac_n "(cached) $ac_c" 1>&6
11650 else
11651   ac_save_LIBS="$LIBS"
11652 LIBS="-lpam  $LIBS"
11653 cat > conftest.$ac_ext <<EOF
11654 #line 11655 "configure"
11655 #include "confdefs.h"
11656 /* Override any gcc2 internal prototype to avoid an error.  */
11657 /* We use char because int might match the return type of a gcc2
11658     builtin and then its argument prototype would still apply.  */
11659 char pam_get_data();
11660
11661 int main() {
11662 pam_get_data()
11663 ; return 0; }
11664 EOF
11665 if { (eval echo configure:11666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11666   rm -rf conftest*
11667   eval "ac_cv_lib_$ac_lib_var=yes"
11668 else
11669   echo "configure: failed program was:" >&5
11670   cat conftest.$ac_ext >&5
11671   rm -rf conftest*
11672   eval "ac_cv_lib_$ac_lib_var=no"
11673 fi
11674 rm -f conftest*
11675 LIBS="$ac_save_LIBS"
11676
11677 fi
11678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11679   echo "$ac_t""yes" 1>&6
11680   cat >> confdefs.h <<\EOF
11681 #define HAVE_LIBPAM 1
11682 EOF
11683
11684 else
11685   echo "$ac_t""no" 1>&6
11686 fi
11687
11688
11689 #################################################
11690 # check for pam_smbpass support
11691 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11692 echo "configure:11693: checking whether to use pam_smbpass" >&5
11693 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11694 if test "${with_pam_smbpass+set}" = set; then
11695   withval="$with_pam_smbpass"
11696    case "$withval" in
11697   yes)
11698     echo "$ac_t""yes" 1>&6
11699
11700 # Conditions under which pam_smbpass should not be built.
11701
11702        if test x$PICFLAG = x; then
11703           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11704           PAM_MOD=""
11705        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11706           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11707           PAM_MOD=""
11708        else
11709           PAM_MOD="bin/pam_smbpass.so"
11710        fi
11711     ;;
11712   *)
11713     echo "$ac_t""no" 1>&6
11714     ;;
11715   esac 
11716 else
11717   echo "$ac_t""no" 1>&6
11718
11719 fi
11720
11721
11722
11723 ###############################################
11724 # test for where we get crypt() from, but only
11725 # if not using PAM
11726 if test $with_pam_for_crypt = no; then
11727 for ac_func in crypt
11728 do
11729 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11730 echo "configure:11731: checking for $ac_func" >&5
11731 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11732   echo $ac_n "(cached) $ac_c" 1>&6
11733 else
11734   cat > conftest.$ac_ext <<EOF
11735 #line 11736 "configure"
11736 #include "confdefs.h"
11737 /* System header to define __stub macros and hopefully few prototypes,
11738     which can conflict with char $ac_func(); below.  */
11739 #include <assert.h>
11740 /* Override any gcc2 internal prototype to avoid an error.  */
11741 /* We use char because int might match the return type of a gcc2
11742     builtin and then its argument prototype would still apply.  */
11743 char $ac_func();
11744
11745 int main() {
11746
11747 /* The GNU C library defines this for functions which it implements
11748     to always fail with ENOSYS.  Some functions are actually named
11749     something starting with __ and the normal name is an alias.  */
11750 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11751 choke me
11752 #else
11753 $ac_func();
11754 #endif
11755
11756 ; return 0; }
11757 EOF
11758 if { (eval echo configure:11759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11759   rm -rf conftest*
11760   eval "ac_cv_func_$ac_func=yes"
11761 else
11762   echo "configure: failed program was:" >&5
11763   cat conftest.$ac_ext >&5
11764   rm -rf conftest*
11765   eval "ac_cv_func_$ac_func=no"
11766 fi
11767 rm -f conftest*
11768 fi
11769
11770 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11771   echo "$ac_t""yes" 1>&6
11772     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11773   cat >> confdefs.h <<EOF
11774 #define $ac_tr_func 1
11775 EOF
11776  
11777 else
11778   echo "$ac_t""no" 1>&6
11779 fi
11780 done
11781
11782 if test x"$ac_cv_func_crypt" = x"no"; then
11783     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11784 echo "configure:11785: checking for crypt in -lcrypt" >&5
11785 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11786 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11787   echo $ac_n "(cached) $ac_c" 1>&6
11788 else
11789   ac_save_LIBS="$LIBS"
11790 LIBS="-lcrypt  $LIBS"
11791 cat > conftest.$ac_ext <<EOF
11792 #line 11793 "configure"
11793 #include "confdefs.h"
11794 /* Override any gcc2 internal prototype to avoid an error.  */
11795 /* We use char because int might match the return type of a gcc2
11796     builtin and then its argument prototype would still apply.  */
11797 char crypt();
11798
11799 int main() {
11800 crypt()
11801 ; return 0; }
11802 EOF
11803 if { (eval echo configure:11804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11804   rm -rf conftest*
11805   eval "ac_cv_lib_$ac_lib_var=yes"
11806 else
11807   echo "configure: failed program was:" >&5
11808   cat conftest.$ac_ext >&5
11809   rm -rf conftest*
11810   eval "ac_cv_lib_$ac_lib_var=no"
11811 fi
11812 rm -f conftest*
11813 LIBS="$ac_save_LIBS"
11814
11815 fi
11816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11817   echo "$ac_t""yes" 1>&6
11818   LIBS="$LIBS -lcrypt";
11819         cat >> confdefs.h <<\EOF
11820 #define HAVE_CRYPT 1
11821 EOF
11822
11823 else
11824   echo "$ac_t""no" 1>&6
11825 fi
11826
11827 fi
11828 fi
11829
11830 ##
11831 ## moved after the check for -lcrypt in order to
11832 ## ensure that the necessary libraries are included
11833 ## check checking for truncated salt.  Wrapped by the
11834 ## $with_pam_for_crypt variable as above   --jerry
11835 ##
11836 if test $with_pam_for_crypt = no; then
11837 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11838 echo "configure:11839: checking for a crypt that needs truncated salt" >&5
11839 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11840   echo $ac_n "(cached) $ac_c" 1>&6
11841 else
11842   
11843 if test "$cross_compiling" = yes; then
11844   samba_cv_HAVE_TRUNCATED_SALT=cross
11845 else
11846   cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11849 #include "${srcdir-.}/tests/crypttest.c"
11850 EOF
11851 if { (eval echo configure:11852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11852 then
11853   samba_cv_HAVE_TRUNCATED_SALT=no
11854 else
11855   echo "configure: failed program was:" >&5
11856   cat conftest.$ac_ext >&5
11857   rm -fr conftest*
11858   samba_cv_HAVE_TRUNCATED_SALT=yes
11859 fi
11860 rm -fr conftest*
11861 fi
11862
11863 fi
11864
11865 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11866 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11867         cat >> confdefs.h <<\EOF
11868 #define HAVE_TRUNCATED_SALT 1
11869 EOF
11870
11871 fi
11872 fi
11873
11874
11875
11876 ########################################################################################
11877 ##
11878 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
11879 ##
11880 ########################################################################################
11881
11882 ## set the with_smbpasswd_sam as the default
11883 with_smbpasswd_sam=yes
11884
11885
11886 #################################################
11887 # check for a TDB password database
11888 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
11889 echo "configure:11890: checking whether to use TDB SAM database" >&5
11890 # Check whether --with-tdbsam or --without-tdbsam was given.
11891 if test "${with_tdbsam+set}" = set; then
11892   withval="$with_tdbsam"
11893    case "$withval" in
11894   yes)
11895     echo "$ac_t""yes" 1>&6
11896     cat >> confdefs.h <<\EOF
11897 #define WITH_TDB_SAM 1
11898 EOF
11899
11900     with_smbpasswd_sam=no
11901     ;;
11902   *)
11903     echo "$ac_t""no" 1>&6
11904     ;;
11905   esac 
11906 else
11907   echo "$ac_t""no" 1>&6
11908
11909 fi
11910
11911
11912 #################################################
11913 # check for a LDAP password database
11914 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
11915 echo "configure:11916: checking whether to use LDAP SAM database" >&5
11916 # Check whether --with-ldapsam or --without-ldapsam was given.
11917 if test "${with_ldapsam+set}" = set; then
11918   withval="$with_ldapsam"
11919    case "$withval" in
11920   yes)
11921     echo "$ac_t""yes" 1>&6
11922     cat >> confdefs.h <<\EOF
11923 #define WITH_LDAP_SAM 1
11924 EOF
11925
11926     LIBS="-lldap -llber $LIBS"
11927     with_smbpasswd_sam=no
11928     ;;
11929   *)
11930     echo "$ac_t""no" 1>&6
11931     ;;
11932   esac 
11933 else
11934   echo "$ac_t""no" 1>&6
11935
11936 fi
11937
11938
11939 #################################################
11940 # check for a NISPLUS password database
11941 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
11942 echo "configure:11943: checking whether to use NISPLUS SAM database" >&5
11943 # Check whether --with-nisplussam or --without-nisplussam was given.
11944 if test "${with_nisplussam+set}" = set; then
11945   withval="$with_nisplussam"
11946    case "$withval" in
11947   yes)
11948     echo "$ac_t""yes" 1>&6
11949     cat >> confdefs.h <<\EOF
11950 #define WITH_NISPLUS_SAM 1
11951 EOF
11952
11953     with_smbpasswd_sam=no
11954     ;;
11955   *)
11956     echo "$ac_t""no" 1>&6
11957     ;;
11958   esac 
11959 else
11960   echo "$ac_t""no" 1>&6
11961
11962 fi
11963
11964
11965 ################################################
11966 # This test should come last because the
11967 # smbpasswd SAM is only used if another format
11968 # has not been defined
11969 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
11970 echo "configure:11971: checking whether to use traditional smbpasswd file" >&5
11971 if test $with_smbpasswd_sam = yes; then
11972         echo "$ac_t""yes" 1>&6
11973         cat >> confdefs.h <<\EOF
11974 #define WITH_SMBPASSWD_SAM 1
11975 EOF
11976
11977 else
11978         echo "$ac_t""no" 1>&6
11979 fi
11980
11981 ########################################################################################
11982 ##
11983 ## END OF TESTS FOR SAM BACKENDS.  
11984 ##
11985 ########################################################################################
11986
11987 #################################################
11988 # check for a NISPLUS_HOME support 
11989 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11990 echo "configure:11991: checking whether to use NISPLUS_HOME" >&5
11991 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11992 if test "${with_nisplus_home+set}" = set; then
11993   withval="$with_nisplus_home"
11994    case "$withval" in
11995   yes)
11996     echo "$ac_t""yes" 1>&6
11997     cat >> confdefs.h <<\EOF
11998 #define WITH_NISPLUS_HOME 1
11999 EOF
12000
12001     ;;
12002   *)
12003     echo "$ac_t""no" 1>&6
12004     ;;
12005   esac 
12006 else
12007   echo "$ac_t""no" 1>&6
12008
12009 fi
12010
12011
12012 #################################################
12013 # check for the secure socket layer
12014 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12015 echo "configure:12016: checking whether to use SSL" >&5
12016 # Check whether --with-ssl or --without-ssl was given.
12017 if test "${with_ssl+set}" = set; then
12018   withval="$with_ssl"
12019    case "$withval" in
12020   yes)
12021     echo "$ac_t""yes" 1>&6
12022     cat >> confdefs.h <<\EOF
12023 #define WITH_SSL 1
12024 EOF
12025
12026     withval="/usr/local/ssl"     # default
12027
12028     if test "${with_sslinc+set}" = set; then
12029
12030         withval="$with_sslinc"
12031         case "$withval" in
12032         yes|no)
12033           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12034           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12035         ;;
12036         * )
12037           CFLAGS="-I${withval} $CFLAGS"
12038         ;;
12039         esac
12040
12041     else
12042
12043         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12044
12045     fi
12046
12047     if test "${with_ssllib+set}" = set; then
12048
12049         withval="$with_ssllib"
12050         case "$withval" in
12051         yes|no)
12052           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12053           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12054         ;;
12055         * )
12056           LDFLAGS="-L${withval}/lib $LDFLAGS"
12057         ;;
12058         esac
12059
12060     else
12061
12062         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12063
12064     fi
12065
12066     LIBS="-lssl -lcrypto $LIBS"
12067
12068 #    if test ! -d ${withval}; then
12069 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12070 #      exit 1
12071 #    fi 
12072
12073     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12074
12075     ;;
12076   *)
12077     echo "$ac_t""no" 1>&6
12078     ;;
12079   esac 
12080 else
12081   echo "$ac_t""no" 1>&6
12082
12083 fi
12084
12085
12086 #################################################
12087 # check for syslog logging
12088 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12089 echo "configure:12090: checking whether to use syslog logging" >&5
12090 # Check whether --with-syslog or --without-syslog was given.
12091 if test "${with_syslog+set}" = set; then
12092   withval="$with_syslog"
12093    case "$withval" in
12094   yes)
12095     echo "$ac_t""yes" 1>&6
12096     cat >> confdefs.h <<\EOF
12097 #define WITH_SYSLOG 1
12098 EOF
12099
12100     ;;
12101   *)
12102     echo "$ac_t""no" 1>&6
12103     ;;
12104   esac 
12105 else
12106   echo "$ac_t""no" 1>&6
12107
12108 fi
12109
12110
12111 #################################################
12112 # check for a shared memory profiling support
12113 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12114 echo "configure:12115: checking whether to use profiling" >&5
12115 # Check whether --with-profiling-data or --without-profiling-data was given.
12116 if test "${with_profiling_data+set}" = set; then
12117   withval="$with_profiling_data"
12118    case "$withval" in
12119   yes)
12120     echo "$ac_t""yes" 1>&6
12121     cat >> confdefs.h <<\EOF
12122 #define WITH_PROFILE 1
12123 EOF
12124
12125     ;;
12126   *)
12127     echo "$ac_t""no" 1>&6
12128     ;;
12129   esac 
12130 else
12131   echo "$ac_t""no" 1>&6
12132
12133 fi
12134
12135
12136
12137 #################################################
12138 # check for experimental disk-quotas support
12139 QUOTAOBJS=smbd/noquotas.o
12140
12141 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12142 echo "configure:12143: checking whether to support disk-quotas" >&5
12143 # Check whether --with-quotas or --without-quotas was given.
12144 if test "${with_quotas+set}" = set; then
12145   withval="$with_quotas"
12146    case "$withval" in
12147   yes)
12148     echo "$ac_t""yes" 1>&6
12149     case "$host_os" in
12150       *linux*)
12151         # Check for kernel 2.4.x quota braindamage...
12152         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12153 echo "configure:12154: checking for linux 2.4.x quota braindamage.." >&5
12154 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12155   echo $ac_n "(cached) $ac_c" 1>&6
12156 else
12157   
12158         cat > conftest.$ac_ext <<EOF
12159 #line 12160 "configure"
12160 #include "confdefs.h"
12161 #include <stdio.h>
12162 #include <sys/types.h>
12163 #include <asm/types.h>
12164 #include <linux/quota.h>
12165 #include <mntent.h>
12166 #include <linux/unistd.h>
12167 int main() {
12168 struct mem_dqblk D;
12169 ; return 0; }
12170 EOF
12171 if { (eval echo configure:12172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12172   rm -rf conftest*
12173   samba_cv_linux_2_4_quota_braindamage=yes
12174 else
12175   echo "configure: failed program was:" >&5
12176   cat conftest.$ac_ext >&5
12177   rm -rf conftest*
12178   samba_cv_linux_2_4_quota_braindamage=no
12179 fi
12180 rm -f conftest*
12181 fi
12182
12183 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12184 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12185         cat >> confdefs.h <<\EOF
12186 #define LINUX_QUOTAS_2 1
12187 EOF
12188
12189 else
12190         cat >> confdefs.h <<\EOF
12191 #define LINUX_QUOTAS_1 1
12192 EOF
12193
12194 fi
12195         ;;
12196       *)
12197         ;;
12198     esac
12199     QUOTAOBJS=smbd/quotas.o
12200     cat >> confdefs.h <<\EOF
12201 #define WITH_QUOTAS 1
12202 EOF
12203
12204     ;;
12205   *)
12206     echo "$ac_t""no" 1>&6
12207     ;;
12208   esac 
12209 else
12210   echo "$ac_t""no" 1>&6
12211
12212 fi
12213
12214
12215
12216 #################################################
12217 # check for experimental utmp accounting
12218
12219 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12220 echo "configure:12221: checking whether to support utmp accounting" >&5
12221 # Check whether --with-utmp or --without-utmp was given.
12222 if test "${with_utmp+set}" = set; then
12223   withval="$with_utmp"
12224    case "$withval" in
12225   yes)
12226     echo "$ac_t""yes" 1>&6
12227     cat >> confdefs.h <<\EOF
12228 #define WITH_UTMP 1
12229 EOF
12230
12231     ;;
12232   *)
12233     echo "$ac_t""no" 1>&6
12234     ;;
12235   esac 
12236 else
12237   echo "$ac_t""no" 1>&6
12238
12239 fi
12240
12241
12242 #################################################
12243 # set private directory location
12244 # Check whether --with-privatedir or --without-privatedir was given.
12245 if test "${with_privatedir+set}" = set; then
12246   withval="$with_privatedir"
12247    case "$withval" in
12248   yes|no)
12249   #
12250   # Just in case anybody calls it without argument
12251   #
12252     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12253     privatedir='${prefix}/private'
12254   ;;
12255   * )
12256     privatedir="$withval"
12257     ;;
12258   esac
12259   
12260 else
12261   privatedir='${prefix}/private'
12262    
12263
12264 fi
12265
12266
12267 #################################################
12268 # set lock directory location
12269 # Check whether --with-lockdir or --without-lockdir was given.
12270 if test "${with_lockdir+set}" = set; then
12271   withval="$with_lockdir"
12272    case "$withval" in
12273   yes|no)
12274   #
12275   # Just in case anybody calls it without argument
12276   #
12277     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12278     lockdir='$(VARDIR)/locks'
12279   ;;
12280   * )
12281     lockdir="$withval"
12282     ;;
12283   esac
12284   
12285 else
12286   lockdir='$(VARDIR)/locks'
12287    
12288
12289 fi
12290
12291
12292 #################################################
12293 # set SWAT directory location
12294 # Check whether --with-swatdir or --without-swatdir was given.
12295 if test "${with_swatdir+set}" = set; then
12296   withval="$with_swatdir"
12297    case "$withval" in
12298   yes|no)
12299   #
12300   # Just in case anybody does it
12301   #
12302     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12303     swatdir='${prefix}/swat'
12304   ;;
12305   * )
12306     swatdir="$withval"
12307     ;;
12308   esac
12309   
12310 else
12311   swatdir='${prefix}/swat'
12312    
12313
12314 fi
12315
12316
12317 #################################################
12318 # choose native language(s) of man pages
12319 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12320 echo "configure:12321: checking chosen man pages' language(s)" >&5
12321 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12322 if test "${with_manpages_langs+set}" = set; then
12323   withval="$with_manpages_langs"
12324    case "$withval" in
12325   yes|no)
12326     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12327     manlangs="en"
12328   ;;
12329   *)
12330     manlangs="$withval"
12331   ;;
12332   esac
12333
12334   echo "$ac_t""$manlangs" 1>&6
12335   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12336   
12337 else
12338   manlangs="en"
12339   echo "$ac_t""$manlangs" 1>&6
12340   
12341
12342 fi
12343
12344
12345 #################################################
12346 # these tests are taken from the GNU fileutils package
12347 echo "checking how to get filesystem space usage" 1>&6
12348 echo "configure:12349: checking how to get filesystem space usage" >&5
12349 space=no
12350
12351 # Test for statvfs64.
12352 if test $space = no; then
12353   # SVR4
12354   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12355 echo "configure:12356: checking statvfs64 function (SVR4)" >&5
12356 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12357   echo $ac_n "(cached) $ac_c" 1>&6
12358 else
12359   if test "$cross_compiling" = yes; then
12360   fu_cv_sys_stat_statvfs64=cross
12361 else
12362   cat > conftest.$ac_ext <<EOF
12363 #line 12364 "configure"
12364 #include "confdefs.h"
12365
12366 #if defined(HAVE_UNISTD_H)
12367 #include <unistd.h>
12368 #endif
12369 #include <sys/types.h>
12370 #include <sys/statvfs.h>
12371   main ()
12372   {
12373     struct statvfs64 fsd;
12374     exit (statvfs64 (".", &fsd));
12375   }
12376 EOF
12377 if { (eval echo configure:12378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12378 then
12379   fu_cv_sys_stat_statvfs64=yes
12380 else
12381   echo "configure: failed program was:" >&5
12382   cat conftest.$ac_ext >&5
12383   rm -fr conftest*
12384   fu_cv_sys_stat_statvfs64=no
12385 fi
12386 rm -fr conftest*
12387 fi
12388
12389 fi
12390
12391 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12392   if test $fu_cv_sys_stat_statvfs64 = yes; then
12393     space=yes
12394     cat >> confdefs.h <<\EOF
12395 #define STAT_STATVFS64 1
12396 EOF
12397
12398   fi
12399 fi
12400
12401 # Perform only the link test since it seems there are no variants of the
12402 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12403 # because that got a false positive on SCO OSR5.  Adding the declaration
12404 # of a `struct statvfs' causes this test to fail (as it should) on such
12405 # systems.  That system is reported to work fine with STAT_STATFS4 which
12406 # is what it gets when this test fails.
12407 if test $space = no; then
12408   # SVR4
12409   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12410 echo "configure:12411: checking statvfs function (SVR4)" >&5
12411 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12412   echo $ac_n "(cached) $ac_c" 1>&6
12413 else
12414   cat > conftest.$ac_ext <<EOF
12415 #line 12416 "configure"
12416 #include "confdefs.h"
12417 #include <sys/types.h>
12418 #include <sys/statvfs.h>
12419 int main() {
12420 struct statvfs fsd; statvfs (0, &fsd);
12421 ; return 0; }
12422 EOF
12423 if { (eval echo configure:12424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12424   rm -rf conftest*
12425   fu_cv_sys_stat_statvfs=yes
12426 else
12427   echo "configure: failed program was:" >&5
12428   cat conftest.$ac_ext >&5
12429   rm -rf conftest*
12430   fu_cv_sys_stat_statvfs=no
12431 fi
12432 rm -f conftest*
12433 fi
12434
12435 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12436   if test $fu_cv_sys_stat_statvfs = yes; then
12437     space=yes
12438     cat >> confdefs.h <<\EOF
12439 #define STAT_STATVFS 1
12440 EOF
12441
12442   fi
12443 fi
12444
12445 if test $space = no; then
12446   # DEC Alpha running OSF/1
12447   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12448 echo "configure:12449: checking for 3-argument statfs function (DEC OSF/1)" >&5
12449   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12450   echo $ac_n "(cached) $ac_c" 1>&6
12451 else
12452   if test "$cross_compiling" = yes; then
12453   fu_cv_sys_stat_statfs3_osf1=no
12454 else
12455   cat > conftest.$ac_ext <<EOF
12456 #line 12457 "configure"
12457 #include "confdefs.h"
12458
12459 #include <sys/param.h>
12460 #include <sys/types.h>
12461 #include <sys/mount.h>
12462   main ()
12463   {
12464     struct statfs fsd;
12465     fsd.f_fsize = 0;
12466     exit (statfs (".", &fsd, sizeof (struct statfs)));
12467   }
12468 EOF
12469 if { (eval echo configure:12470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12470 then
12471   fu_cv_sys_stat_statfs3_osf1=yes
12472 else
12473   echo "configure: failed program was:" >&5
12474   cat conftest.$ac_ext >&5
12475   rm -fr conftest*
12476   fu_cv_sys_stat_statfs3_osf1=no
12477 fi
12478 rm -fr conftest*
12479 fi
12480
12481 fi
12482
12483   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12484   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12485     space=yes
12486     cat >> confdefs.h <<\EOF
12487 #define STAT_STATFS3_OSF1 1
12488 EOF
12489
12490   fi
12491 fi
12492
12493 if test $space = no; then
12494 # AIX
12495   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12496 echo "configure:12497: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12497   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12498   echo $ac_n "(cached) $ac_c" 1>&6
12499 else
12500   if test "$cross_compiling" = yes; then
12501   fu_cv_sys_stat_statfs2_bsize=no
12502 else
12503   cat > conftest.$ac_ext <<EOF
12504 #line 12505 "configure"
12505 #include "confdefs.h"
12506
12507 #ifdef HAVE_SYS_PARAM_H
12508 #include <sys/param.h>
12509 #endif
12510 #ifdef HAVE_SYS_MOUNT_H
12511 #include <sys/mount.h>
12512 #endif
12513 #ifdef HAVE_SYS_VFS_H
12514 #include <sys/vfs.h>
12515 #endif
12516   main ()
12517   {
12518   struct statfs fsd;
12519   fsd.f_bsize = 0;
12520   exit (statfs (".", &fsd));
12521   }
12522 EOF
12523 if { (eval echo configure:12524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12524 then
12525   fu_cv_sys_stat_statfs2_bsize=yes
12526 else
12527   echo "configure: failed program was:" >&5
12528   cat conftest.$ac_ext >&5
12529   rm -fr conftest*
12530   fu_cv_sys_stat_statfs2_bsize=no
12531 fi
12532 rm -fr conftest*
12533 fi
12534
12535 fi
12536
12537   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12538   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12539     space=yes
12540     cat >> confdefs.h <<\EOF
12541 #define STAT_STATFS2_BSIZE 1
12542 EOF
12543
12544   fi
12545 fi
12546
12547 if test $space = no; then
12548 # SVR3
12549   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12550 echo "configure:12551: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12551   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12552   echo $ac_n "(cached) $ac_c" 1>&6
12553 else
12554   if test "$cross_compiling" = yes; then
12555   fu_cv_sys_stat_statfs4=no
12556 else
12557   cat > conftest.$ac_ext <<EOF
12558 #line 12559 "configure"
12559 #include "confdefs.h"
12560 #include <sys/types.h>
12561 #include <sys/statfs.h>
12562   main ()
12563   {
12564   struct statfs fsd;
12565   exit (statfs (".", &fsd, sizeof fsd, 0));
12566   }
12567 EOF
12568 if { (eval echo configure:12569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12569 then
12570   fu_cv_sys_stat_statfs4=yes
12571 else
12572   echo "configure: failed program was:" >&5
12573   cat conftest.$ac_ext >&5
12574   rm -fr conftest*
12575   fu_cv_sys_stat_statfs4=no
12576 fi
12577 rm -fr conftest*
12578 fi
12579
12580 fi
12581
12582   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12583   if test $fu_cv_sys_stat_statfs4 = yes; then
12584     space=yes
12585     cat >> confdefs.h <<\EOF
12586 #define STAT_STATFS4 1
12587 EOF
12588
12589   fi
12590 fi
12591
12592 if test $space = no; then
12593 # 4.4BSD and NetBSD
12594   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12595 echo "configure:12596: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12596   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12597   echo $ac_n "(cached) $ac_c" 1>&6
12598 else
12599   if test "$cross_compiling" = yes; then
12600   fu_cv_sys_stat_statfs2_fsize=no
12601 else
12602   cat > conftest.$ac_ext <<EOF
12603 #line 12604 "configure"
12604 #include "confdefs.h"
12605 #include <sys/types.h>
12606 #ifdef HAVE_SYS_PARAM_H
12607 #include <sys/param.h>
12608 #endif
12609 #ifdef HAVE_SYS_MOUNT_H
12610 #include <sys/mount.h>
12611 #endif
12612   main ()
12613   {
12614   struct statfs fsd;
12615   fsd.f_fsize = 0;
12616   exit (statfs (".", &fsd));
12617   }
12618 EOF
12619 if { (eval echo configure:12620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12620 then
12621   fu_cv_sys_stat_statfs2_fsize=yes
12622 else
12623   echo "configure: failed program was:" >&5
12624   cat conftest.$ac_ext >&5
12625   rm -fr conftest*
12626   fu_cv_sys_stat_statfs2_fsize=no
12627 fi
12628 rm -fr conftest*
12629 fi
12630
12631 fi
12632
12633   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12634   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12635     space=yes
12636     cat >> confdefs.h <<\EOF
12637 #define STAT_STATFS2_FSIZE 1
12638 EOF
12639
12640   fi
12641 fi
12642
12643 if test $space = no; then
12644   # Ultrix
12645   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12646 echo "configure:12647: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12647   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12648   echo $ac_n "(cached) $ac_c" 1>&6
12649 else
12650   if test "$cross_compiling" = yes; then
12651   fu_cv_sys_stat_fs_data=no
12652 else
12653   cat > conftest.$ac_ext <<EOF
12654 #line 12655 "configure"
12655 #include "confdefs.h"
12656 #include <sys/types.h>
12657 #ifdef HAVE_SYS_PARAM_H
12658 #include <sys/param.h>
12659 #endif
12660 #ifdef HAVE_SYS_MOUNT_H
12661 #include <sys/mount.h>
12662 #endif
12663 #ifdef HAVE_SYS_FS_TYPES_H
12664 #include <sys/fs_types.h>
12665 #endif
12666   main ()
12667   {
12668   struct fs_data fsd;
12669   /* Ultrix's statfs returns 1 for success,
12670      0 for not mounted, -1 for failure.  */
12671   exit (statfs (".", &fsd) != 1);
12672   }
12673 EOF
12674 if { (eval echo configure:12675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12675 then
12676   fu_cv_sys_stat_fs_data=yes
12677 else
12678   echo "configure: failed program was:" >&5
12679   cat conftest.$ac_ext >&5
12680   rm -fr conftest*
12681   fu_cv_sys_stat_fs_data=no
12682 fi
12683 rm -fr conftest*
12684 fi
12685
12686 fi
12687
12688   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12689   if test $fu_cv_sys_stat_fs_data = yes; then
12690     space=yes
12691     cat >> confdefs.h <<\EOF
12692 #define STAT_STATFS2_FS_DATA 1
12693 EOF
12694
12695   fi
12696 fi
12697
12698 #
12699 # As a gating factor for large file support, in order to
12700 # use <4GB files we must have the following minimal support
12701 # available.
12702 # long long, and a 64 bit off_t or off64_t.
12703 # If we don't have all of these then disable large
12704 # file support.
12705 #
12706 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12707 echo "configure:12708: checking if large file support can be enabled" >&5
12708 cat > conftest.$ac_ext <<EOF
12709 #line 12710 "configure"
12710 #include "confdefs.h"
12711
12712 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12713 #include <sys/types.h>
12714 #else
12715 __COMPILE_ERROR_
12716 #endif
12717
12718 int main() {
12719 int i
12720 ; return 0; }
12721 EOF
12722 if { (eval echo configure:12723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12723   rm -rf conftest*
12724   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12725 else
12726   echo "configure: failed program was:" >&5
12727   cat conftest.$ac_ext >&5
12728   rm -rf conftest*
12729   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12730 fi
12731 rm -f conftest*
12732 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12733     cat >> confdefs.h <<\EOF
12734 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12735 EOF
12736
12737 fi
12738 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12739
12740 # Check whether --with-spinlocks or --without-spinlocks was given.
12741 if test "${with_spinlocks+set}" = set; then
12742   withval="$with_spinlocks"
12743   :
12744 fi
12745
12746 if test "x$with_spinlocks" = "xyes"; then
12747     cat >> confdefs.h <<\EOF
12748 #define USE_SPINLOCKS 1
12749 EOF
12750
12751
12752     case "$host_cpu" in
12753         sparc)
12754             cat >> confdefs.h <<\EOF
12755 #define SPARC_SPINLOCKS 1
12756 EOF
12757
12758             ;;
12759
12760         i386|i486|i586|i686)
12761             cat >> confdefs.h <<\EOF
12762 #define INTEL_SPINLOCKS 1
12763 EOF
12764
12765             ;;
12766
12767         mips)
12768             cat >> confdefs.h <<\EOF
12769 #define MIPS_SPINLOCKS 1
12770 EOF
12771
12772             ;;
12773
12774         powerpc)
12775             cat >> confdefs.h <<\EOF
12776 #define POWERPC_SPINLOCKS 1
12777 EOF
12778
12779             ;;
12780     esac
12781 fi
12782
12783 #################################################
12784 # check for ACL support
12785
12786 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12787 echo "configure:12788: checking whether to support ACLs" >&5
12788 # Check whether --with-acl-support or --without-acl-support was given.
12789 if test "${with_acl_support+set}" = set; then
12790   withval="$with_acl_support"
12791    case "$withval" in
12792   yes)
12793
12794         case "$host_os" in
12795         *sysv5*)
12796             echo "$ac_t""Using UnixWare ACLs" 1>&6
12797             cat >> confdefs.h <<\EOF
12798 #define HAVE_UNIXWARE_ACLS 1
12799 EOF
12800
12801             ;;
12802         *solaris*)
12803             echo "$ac_t""Using solaris ACLs" 1>&6
12804             cat >> confdefs.h <<\EOF
12805 #define HAVE_SOLARIS_ACLS 1
12806 EOF
12807
12808             ;;
12809                 *irix*)
12810                         echo "$ac_t""Using IRIX ACLs" 1>&6
12811                         cat >> confdefs.h <<\EOF
12812 #define HAVE_IRIX_ACLS 1
12813 EOF
12814
12815                         ;;
12816                 *aix*)
12817                         echo "$ac_t""Using AIX ACLs" 1>&6
12818                         cat >> confdefs.h <<\EOF
12819 #define HAVE_AIX_ACLS 1
12820 EOF
12821
12822                         ;;
12823                 *osf*)
12824                         echo "$ac_t""Using Tru64 ACLs" 1>&6
12825                         cat >> confdefs.h <<\EOF
12826 #define HAVE_TRU64_ACLS 1
12827 EOF
12828
12829                         LIBS="$LIBS -lpacl"
12830                         ;;
12831         *)
12832                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12833 echo "configure:12834: checking for acl_get_file in -lacl" >&5
12834 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12835 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12836   echo $ac_n "(cached) $ac_c" 1>&6
12837 else
12838   ac_save_LIBS="$LIBS"
12839 LIBS="-lacl  $LIBS"
12840 cat > conftest.$ac_ext <<EOF
12841 #line 12842 "configure"
12842 #include "confdefs.h"
12843 /* Override any gcc2 internal prototype to avoid an error.  */
12844 /* We use char because int might match the return type of a gcc2
12845     builtin and then its argument prototype would still apply.  */
12846 char acl_get_file();
12847
12848 int main() {
12849 acl_get_file()
12850 ; return 0; }
12851 EOF
12852 if { (eval echo configure:12853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12853   rm -rf conftest*
12854   eval "ac_cv_lib_$ac_lib_var=yes"
12855 else
12856   echo "configure: failed program was:" >&5
12857   cat conftest.$ac_ext >&5
12858   rm -rf conftest*
12859   eval "ac_cv_lib_$ac_lib_var=no"
12860 fi
12861 rm -f conftest*
12862 LIBS="$ac_save_LIBS"
12863
12864 fi
12865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12866   echo "$ac_t""yes" 1>&6
12867     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12868     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12869   cat >> confdefs.h <<EOF
12870 #define $ac_tr_lib 1
12871 EOF
12872
12873   LIBS="-lacl $LIBS"
12874
12875 else
12876   echo "$ac_t""no" 1>&6
12877 fi
12878
12879                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12880 echo "configure:12881: checking for ACL support" >&5
12881 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12882   echo $ac_n "(cached) $ac_c" 1>&6
12883 else
12884   
12885                         cat > conftest.$ac_ext <<EOF
12886 #line 12887 "configure"
12887 #include "confdefs.h"
12888 #include <sys/types.h>
12889 #include <sys/acl.h>
12890 int main() {
12891  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12892 ; return 0; }
12893 EOF
12894 if { (eval echo configure:12895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12895   rm -rf conftest*
12896   samba_cv_HAVE_POSIX_ACLS=yes
12897 else
12898   echo "configure: failed program was:" >&5
12899   cat conftest.$ac_ext >&5
12900   rm -rf conftest*
12901   samba_cv_HAVE_POSIX_ACLS=no
12902 fi
12903 rm -f conftest*
12904 fi
12905
12906 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12907                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12908                                 echo "$ac_t""Using posix ACLs" 1>&6
12909                                 cat >> confdefs.h <<\EOF
12910 #define HAVE_POSIX_ACLS 1
12911 EOF
12912
12913                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12914 echo "configure:12915: checking for acl_get_perm_np" >&5
12915 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12916   echo $ac_n "(cached) $ac_c" 1>&6
12917 else
12918   
12919                                 cat > conftest.$ac_ext <<EOF
12920 #line 12921 "configure"
12921 #include "confdefs.h"
12922 #include <sys/types.h>
12923 #include <sys/acl.h>
12924 int main() {
12925  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12926 ; return 0; }
12927 EOF
12928 if { (eval echo configure:12929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12929   rm -rf conftest*
12930   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12931 else
12932   echo "configure: failed program was:" >&5
12933   cat conftest.$ac_ext >&5
12934   rm -rf conftest*
12935   samba_cv_HAVE_ACL_GET_PERM_NP=no
12936 fi
12937 rm -f conftest*
12938 fi
12939
12940 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12941                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12942                                         cat >> confdefs.h <<\EOF
12943 #define HAVE_ACL_GET_PERM_NP 1
12944 EOF
12945
12946                                 fi
12947                         fi
12948             ;;
12949         esac
12950         ;;
12951   *)
12952     echo "$ac_t""no" 1>&6
12953     cat >> confdefs.h <<\EOF
12954 #define HAVE_NO_ACLS 1
12955 EOF
12956
12957     ;;
12958   esac 
12959 else
12960   cat >> confdefs.h <<\EOF
12961 #define HAVE_NO_ACLS 1
12962 EOF
12963
12964   echo "$ac_t""no" 1>&6
12965
12966 fi
12967
12968
12969 #################################################
12970 # Check whether winbind is supported on this platform.  If so we need to
12971 # build and install client programs (WINBIND_TARGETS), sbin programs
12972 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
12973
12974 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
12975 echo "configure:12976: checking whether to build winbind" >&5
12976
12977 # Initially, the value of $host_os decides whether winbind is supported
12978
12979 case "$host_os" in 
12980         *linux*|*solaris*)
12981                 HAVE_WINBIND=yes
12982                 ;;
12983         *)
12984                 HAVE_WINBIND=no
12985                 winbind_no_reason=", unsupported on $host_os"
12986                 ;;
12987 esac
12988
12989 # Check the setting of --with-winbindd
12990
12991 # Check whether --with-winbind or --without-winbind was given.
12992 if test "${with_winbind+set}" = set; then
12993   withval="$with_winbind"
12994    
12995   case "$withval" in
12996         yes)
12997                 HAVE_WINBIND=yes
12998                 ;;
12999         no)
13000                 HAVE_WINBIND=no
13001                 winbind_reason=""
13002                 ;;
13003   esac 
13004 fi
13005
13006
13007 # We need unix domain sockets for winbind
13008
13009 if test x"$HAVE_WINBIND" = x"yes"; then
13010         if test x"$samba_cv_unixsocket" = x"no"; then
13011                 winbind_no_reason=", no unix domain socket support on $host_os"
13012                 HAVE_WINBIND=no
13013         fi
13014 fi
13015
13016 # Display test results
13017
13018 if test x"$HAVE_WINBIND" = x"yes"; then
13019
13020         echo "$ac_t""yes" 1>&6
13021
13022         WINBIND_TARGETS="\$(WINBIND_PROGS)"
13023         WINBIND_STARGETS="\$(WINBIND_SPROGS)"
13024         WINBIND_LTARGETS="\$(WINBIND_LPROGS)"
13025         case "$with_pam" in
13026                 yes)
13027                         WINBIND_PAM_PROGS="\$(WINBIND_PAM_PROGS)"
13028                 ;;
13029         esac
13030 else
13031         echo "$ac_t""no$winbind_no_reason" 1>&6
13032
13033         WINBIND_TARGETS=""
13034         WINBIND_STARGETS=""
13035         WINBIND_LTARGETS=""
13036         WINBIND_PAM_PROGS=""
13037 fi
13038
13039 # Substitution time!
13040
13041
13042
13043
13044
13045
13046 #################################################
13047 # Check to see if we should use the included popt 
13048
13049 # Check whether --with-included-popt or --without-included-popt was given.
13050 if test "${with_included_popt+set}" = set; then
13051   withval="$with_included_popt"
13052    
13053   case "$withval" in
13054         yes)
13055                 INCLUDED_POPT=yes
13056                 ;;
13057         no)
13058                 INCLUDED_POPT=no
13059                 ;;
13060   esac 
13061 fi
13062
13063 if test x"$INCLUDED_POPT" != x"yes"; then
13064     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13065 echo "configure:13066: checking for poptGetContext in -lpopt" >&5
13066 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13067 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13068   echo $ac_n "(cached) $ac_c" 1>&6
13069 else
13070   ac_save_LIBS="$LIBS"
13071 LIBS="-lpopt  $LIBS"
13072 cat > conftest.$ac_ext <<EOF
13073 #line 13074 "configure"
13074 #include "confdefs.h"
13075 /* Override any gcc2 internal prototype to avoid an error.  */
13076 /* We use char because int might match the return type of a gcc2
13077     builtin and then its argument prototype would still apply.  */
13078 char poptGetContext();
13079
13080 int main() {
13081 poptGetContext()
13082 ; return 0; }
13083 EOF
13084 if { (eval echo configure:13085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13085   rm -rf conftest*
13086   eval "ac_cv_lib_$ac_lib_var=yes"
13087 else
13088   echo "configure: failed program was:" >&5
13089   cat conftest.$ac_ext >&5
13090   rm -rf conftest*
13091   eval "ac_cv_lib_$ac_lib_var=no"
13092 fi
13093 rm -f conftest*
13094 LIBS="$ac_save_LIBS"
13095
13096 fi
13097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13098   echo "$ac_t""yes" 1>&6
13099   INCLUDED_POPT=no
13100 else
13101   echo "$ac_t""no" 1>&6
13102 INCLUDED_POPT=yes
13103 fi
13104
13105 fi
13106
13107 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13108 echo "configure:13109: checking whether to use included popt" >&5
13109 if test x"$INCLUDED_POPT" = x"yes"; then
13110     echo "$ac_t""$srcdir/popt" 1>&6
13111     BUILD_POPT='$(POPT_OBJS)'
13112     CFLAGS="$CFLAGS -I$srcdir/popt"
13113 else
13114     echo "$ac_t""no" 1>&6
13115     LIBS="$LIBS -lpopt"
13116 fi
13117
13118
13119 #################################################
13120 # final configure stuff
13121
13122 echo "checking configure summary"
13123 if test "$cross_compiling" = yes; then
13124   :
13125 else
13126   cat > conftest.$ac_ext <<EOF
13127 #line 13128 "configure"
13128 #include "confdefs.h"
13129 #include "${srcdir-.}/tests/summary.c"
13130 EOF
13131 if { (eval echo configure:13132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13132 then
13133   echo "configure OK";
13134 else
13135   echo "configure: failed program was:" >&5
13136   cat conftest.$ac_ext >&5
13137   rm -fr conftest*
13138   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13139 fi
13140 rm -fr conftest*
13141 fi
13142
13143
13144 builddir=`pwd`
13145
13146
13147 trap '' 1 2 15
13148 cat > confcache <<\EOF
13149 # This file is a shell script that caches the results of configure
13150 # tests run on this system so they can be shared between configure
13151 # scripts and configure runs.  It is not useful on other systems.
13152 # If it contains results you don't want to keep, you may remove or edit it.
13153 #
13154 # By default, configure uses ./config.cache as the cache file,
13155 # creating it if it does not exist already.  You can give configure
13156 # the --cache-file=FILE option to use a different cache file; that is
13157 # what configure does when it calls configure scripts in
13158 # subdirectories, so they share the cache.
13159 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13160 # config.status only pays attention to the cache file if you give it the
13161 # --recheck option to rerun configure.
13162 #
13163 EOF
13164 # The following way of writing the cache mishandles newlines in values,
13165 # but we know of no workaround that is simple, portable, and efficient.
13166 # So, don't put newlines in cache variables' values.
13167 # Ultrix sh set writes to stderr and can't be redirected directly,
13168 # and sets the high bit in the cache file unless we assign to the vars.
13169 (set) 2>&1 |
13170   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13171   *ac_space=\ *)
13172     # `set' does not quote correctly, so add quotes (double-quote substitution
13173     # turns \\\\ into \\, and sed turns \\ into \).
13174     sed -n \
13175       -e "s/'/'\\\\''/g" \
13176       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13177     ;;
13178   *)
13179     # `set' quotes correctly as required by POSIX, so do not add quotes.
13180     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13181     ;;
13182   esac >> confcache
13183 if cmp -s $cache_file confcache; then
13184   :
13185 else
13186   if test -w $cache_file; then
13187     echo "updating cache $cache_file"
13188     cat confcache > $cache_file
13189   else
13190     echo "not updating unwritable cache $cache_file"
13191   fi
13192 fi
13193 rm -f confcache
13194
13195 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13196
13197 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13198 # Let make expand exec_prefix.
13199 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13200
13201 # Any assignment to VPATH causes Sun make to only execute
13202 # the first set of double-colon rules, so remove it if not needed.
13203 # If there is a colon in the path, we need to keep it.
13204 if test "x$srcdir" = x.; then
13205   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13206 fi
13207
13208 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13209
13210 DEFS=-DHAVE_CONFIG_H
13211
13212 # Without the "./", some shells look in PATH for config.status.
13213 : ${CONFIG_STATUS=./config.status}
13214
13215 echo creating $CONFIG_STATUS
13216 rm -f $CONFIG_STATUS
13217 cat > $CONFIG_STATUS <<EOF
13218 #! /bin/sh
13219 # Generated automatically by configure.
13220 # Run this file to recreate the current configuration.
13221 # This directory was configured as follows,
13222 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13223 #
13224 # $0 $ac_configure_args
13225 #
13226 # Compiler output produced by configure, useful for debugging
13227 # configure, is in ./config.log if it exists.
13228
13229 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13230 for ac_option
13231 do
13232   case "\$ac_option" in
13233   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13234     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13235     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13236   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13237     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13238     exit 0 ;;
13239   -help | --help | --hel | --he | --h)
13240     echo "\$ac_cs_usage"; exit 0 ;;
13241   *) echo "\$ac_cs_usage"; exit 1 ;;
13242   esac
13243 done
13244
13245 ac_given_srcdir=$srcdir
13246 ac_given_INSTALL="$INSTALL"
13247
13248 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13249 EOF
13250 cat >> $CONFIG_STATUS <<EOF
13251
13252 # Protect against being on the right side of a sed subst in config.status.
13253 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13254  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13255 $ac_vpsub
13256 $extrasub
13257 s%@SHELL@%$SHELL%g
13258 s%@CFLAGS@%$CFLAGS%g
13259 s%@CPPFLAGS@%$CPPFLAGS%g
13260 s%@CXXFLAGS@%$CXXFLAGS%g
13261 s%@FFLAGS@%$FFLAGS%g
13262 s%@DEFS@%$DEFS%g
13263 s%@LDFLAGS@%$LDFLAGS%g
13264 s%@LIBS@%$LIBS%g
13265 s%@exec_prefix@%$exec_prefix%g
13266 s%@prefix@%$prefix%g
13267 s%@program_transform_name@%$program_transform_name%g
13268 s%@bindir@%$bindir%g
13269 s%@sbindir@%$sbindir%g
13270 s%@libexecdir@%$libexecdir%g
13271 s%@datadir@%$datadir%g
13272 s%@sysconfdir@%$sysconfdir%g
13273 s%@sharedstatedir@%$sharedstatedir%g
13274 s%@localstatedir@%$localstatedir%g
13275 s%@libdir@%$libdir%g
13276 s%@includedir@%$includedir%g
13277 s%@oldincludedir@%$oldincludedir%g
13278 s%@infodir@%$infodir%g
13279 s%@mandir@%$mandir%g
13280 s%@RUNPROG@%$RUNPROG%g
13281 s%@MPROGS@%$MPROGS%g
13282 s%@LDSHFLAGS@%$LDSHFLAGS%g
13283 s%@SHLD@%$SHLD%g
13284 s%@HOST_OS@%$HOST_OS%g
13285 s%@PAM_MOD@%$PAM_MOD%g
13286 s%@WRAP@%$WRAP%g
13287 s%@WRAP32@%$WRAP32%g
13288 s%@PICFLAG@%$PICFLAG%g
13289 s%@PICSUFFIX@%$PICSUFFIX%g
13290 s%@POBAD_CC@%$POBAD_CC%g
13291 s%@SHLIBEXT@%$SHLIBEXT%g
13292 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13293 s%@CC@%$CC%g
13294 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13295 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13296 s%@INSTALL_DATA@%$INSTALL_DATA%g
13297 s%@AWK@%$AWK%g
13298 s%@BROKEN_CC@%$BROKEN_CC%g
13299 s%@host@%$host%g
13300 s%@host_alias@%$host_alias%g
13301 s%@host_cpu@%$host_cpu%g
13302 s%@host_vendor@%$host_vendor%g
13303 s%@host_os@%$host_os%g
13304 s%@target@%$target%g
13305 s%@target_alias@%$target_alias%g
13306 s%@target_cpu@%$target_cpu%g
13307 s%@target_vendor@%$target_vendor%g
13308 s%@target_os@%$target_os%g
13309 s%@build@%$build%g
13310 s%@build_alias@%$build_alias%g
13311 s%@build_cpu@%$build_cpu%g
13312 s%@build_vendor@%$build_vendor%g
13313 s%@build_os@%$build_os%g
13314 s%@CPP@%$CPP%g
13315 s%@LIBOBJS@%$LIBOBJS%g
13316 s%@TERMLIBS@%$TERMLIBS%g
13317 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13318 s%@ROFF@%$ROFF%g
13319 s%@QUOTAOBJS@%$QUOTAOBJS%g
13320 s%@privatedir@%$privatedir%g
13321 s%@lockdir@%$lockdir%g
13322 s%@swatdir@%$swatdir%g
13323 s%@manlangs@%$manlangs%g
13324 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13325 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13326 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13327 s%@WINBIND_PAM_PROGS@%$WINBIND_PAM_PROGS%g
13328 s%@BUILD_POPT@%$BUILD_POPT%g
13329 s%@builddir@%$builddir%g
13330
13331 CEOF
13332 EOF
13333
13334 cat >> $CONFIG_STATUS <<\EOF
13335
13336 # Split the substitutions into bite-sized pieces for seds with
13337 # small command number limits, like on Digital OSF/1 and HP-UX.
13338 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13339 ac_file=1 # Number of current file.
13340 ac_beg=1 # First line for current file.
13341 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13342 ac_more_lines=:
13343 ac_sed_cmds=""
13344 while $ac_more_lines; do
13345   if test $ac_beg -gt 1; then
13346     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13347   else
13348     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13349   fi
13350   if test ! -s conftest.s$ac_file; then
13351     ac_more_lines=false
13352     rm -f conftest.s$ac_file
13353   else
13354     if test -z "$ac_sed_cmds"; then
13355       ac_sed_cmds="sed -f conftest.s$ac_file"
13356     else
13357       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13358     fi
13359     ac_file=`expr $ac_file + 1`
13360     ac_beg=$ac_end
13361     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13362   fi
13363 done
13364 if test -z "$ac_sed_cmds"; then
13365   ac_sed_cmds=cat
13366 fi
13367 EOF
13368
13369 cat >> $CONFIG_STATUS <<EOF
13370
13371 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13372 EOF
13373 cat >> $CONFIG_STATUS <<\EOF
13374 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13375   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13376   case "$ac_file" in
13377   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13378        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13379   *) ac_file_in="${ac_file}.in" ;;
13380   esac
13381
13382   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13383
13384   # Remove last slash and all that follows it.  Not all systems have dirname.
13385   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13386   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13387     # The file is in a subdirectory.
13388     test ! -d "$ac_dir" && mkdir "$ac_dir"
13389     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13390     # A "../" for each directory in $ac_dir_suffix.
13391     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13392   else
13393     ac_dir_suffix= ac_dots=
13394   fi
13395
13396   case "$ac_given_srcdir" in
13397   .)  srcdir=.
13398       if test -z "$ac_dots"; then top_srcdir=.
13399       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13400   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13401   *) # Relative path.
13402     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13403     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13404   esac
13405
13406   case "$ac_given_INSTALL" in
13407   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13408   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13409   esac
13410
13411   echo creating "$ac_file"
13412   rm -f "$ac_file"
13413   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13414   case "$ac_file" in
13415   *Makefile*) ac_comsub="1i\\
13416 # $configure_input" ;;
13417   *) ac_comsub= ;;
13418   esac
13419
13420   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13421   sed -e "$ac_comsub
13422 s%@configure_input@%$configure_input%g
13423 s%@srcdir@%$srcdir%g
13424 s%@top_srcdir@%$top_srcdir%g
13425 s%@INSTALL@%$INSTALL%g
13426 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13427 fi; done
13428 rm -f conftest.s*
13429
13430 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13431 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13432 #
13433 # ac_d sets the value in "#define NAME VALUE" lines.
13434 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13435 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13436 ac_dC='\3'
13437 ac_dD='%g'
13438 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13439 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13440 ac_uB='\([      ]\)%\1#\2define\3'
13441 ac_uC=' '
13442 ac_uD='\4%g'
13443 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13444 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13445 ac_eB='$%\1#\2define\3'
13446 ac_eC=' '
13447 ac_eD='%g'
13448
13449 if test "${CONFIG_HEADERS+set}" != set; then
13450 EOF
13451 cat >> $CONFIG_STATUS <<EOF
13452   CONFIG_HEADERS="include/config.h"
13453 EOF
13454 cat >> $CONFIG_STATUS <<\EOF
13455 fi
13456 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13457   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13458   case "$ac_file" in
13459   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13460        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13461   *) ac_file_in="${ac_file}.in" ;;
13462   esac
13463
13464   echo creating $ac_file
13465
13466   rm -f conftest.frag conftest.in conftest.out
13467   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13468   cat $ac_file_inputs > conftest.in
13469
13470 EOF
13471
13472 # Transform confdefs.h into a sed script conftest.vals that substitutes
13473 # the proper values into config.h.in to produce config.h.  And first:
13474 # Protect against being on the right side of a sed subst in config.status.
13475 # Protect against being in an unquoted here document in config.status.
13476 rm -f conftest.vals
13477 cat > conftest.hdr <<\EOF
13478 s/[\\&%]/\\&/g
13479 s%[\\$`]%\\&%g
13480 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13481 s%ac_d%ac_u%gp
13482 s%ac_u%ac_e%gp
13483 EOF
13484 sed -n -f conftest.hdr confdefs.h > conftest.vals
13485 rm -f conftest.hdr
13486
13487 # This sed command replaces #undef with comments.  This is necessary, for
13488 # example, in the case of _POSIX_SOURCE, which is predefined and required
13489 # on some systems where configure will not decide to define it.
13490 cat >> conftest.vals <<\EOF
13491 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13492 EOF
13493
13494 # Break up conftest.vals because some shells have a limit on
13495 # the size of here documents, and old seds have small limits too.
13496
13497 rm -f conftest.tail
13498 while :
13499 do
13500   ac_lines=`grep -c . conftest.vals`
13501   # grep -c gives empty output for an empty file on some AIX systems.
13502   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13503   # Write a limited-size here document to conftest.frag.
13504   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13505   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13506   echo 'CEOF
13507   sed -f conftest.frag conftest.in > conftest.out
13508   rm -f conftest.in
13509   mv conftest.out conftest.in
13510 ' >> $CONFIG_STATUS
13511   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13512   rm -f conftest.vals
13513   mv conftest.tail conftest.vals
13514 done
13515 rm -f conftest.vals
13516
13517 cat >> $CONFIG_STATUS <<\EOF
13518   rm -f conftest.frag conftest.h
13519   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13520   cat conftest.in >> conftest.h
13521   rm -f conftest.in
13522   if cmp -s $ac_file conftest.h 2>/dev/null; then
13523     echo "$ac_file is unchanged"
13524     rm -f conftest.h
13525   else
13526     # Remove last slash and all that follows it.  Not all systems have dirname.
13527       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13528       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13529       # The file is in a subdirectory.
13530       test ! -d "$ac_dir" && mkdir "$ac_dir"
13531     fi
13532     rm -f $ac_file
13533     mv conftest.h $ac_file
13534   fi
13535 fi; done
13536
13537 EOF
13538 cat >> $CONFIG_STATUS <<EOF
13539
13540 EOF
13541 cat >> $CONFIG_STATUS <<\EOF
13542
13543 exit 0
13544 EOF
13545 chmod +x $CONFIG_STATUS
13546 rm -fr confdefs* $ac_clean_files
13547 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13548