*lots of small merges form HEAD
[tprouty/samba.git] / source / 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   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
29 ac_help="$ac_help
30   --enable-debug          Turn on compiler debugging information (default=no)"
31 ac_help="$ac_help
32   --enable-developer      Turn on developer warnings and debugging (default=no)"
33 ac_help="$ac_help
34   --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
35 ac_help="$ac_help
36   --enable-dmalloc        Enable heap debugging [default=no]"
37 ac_help="$ac_help
38   --enable-cups           Turn on CUPS support (default=auto)"
39 ac_help="$ac_help
40   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
41 ac_help="$ac_help
42   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
43 ac_help="$ac_help
44   --with-smbwrapper       Include SMB wrapper support (default=no) "
45 ac_help="$ac_help
46   --with-afs              Include AFS clear-text auth support (default=no) "
47 ac_help="$ac_help
48   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
49 ac_help="$ac_help
50    --with-ads  Active Directory support (default yes)"
51 ac_help="$ac_help
52   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
53 ac_help="$ac_help
54    --with-ldap  LDAP support (default yes)"
55 ac_help="$ac_help
56   --with-mysql-prefix=PFX   Prefix where MYSQL is installed (optional)"
57 ac_help="$ac_help
58   --with-mysql-exec-prefix=PFX Exec prefix where MYSQL is installed (optional)"
59 ac_help="$ac_help
60   --disable-mysqltest       Do not try to compile and run a test MYSQL program"
61 ac_help="$ac_help
62   --with-xml-prefix=PFX   Prefix where libxml is installed (optional)"
63 ac_help="$ac_help
64   --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)"
65 ac_help="$ac_help
66   --disable-xmltest       Do not try to compile and run a test LIBXML program"
67 ac_help="$ac_help
68   --with-automount        Include automount support (default=no)"
69 ac_help="$ac_help
70   --with-smbmount         Include smbmount (Linux only) support (default=no)"
71 ac_help="$ac_help
72   --with-pam              Include PAM support (default=no)"
73 ac_help="$ac_help
74   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
75 ac_help="$ac_help
76   --with-ldapsam           Include LDAP SAM 2.2 compatible configuration (default=no)"
77 ac_help="$ac_help
78   --with-tdbsam           Include experimental TDB SAM support (default=no)"
79 ac_help="$ac_help
80   --with-nisplussam       Include NISPLUS SAM support (default=no)"
81 ac_help="$ac_help
82   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
83 ac_help="$ac_help
84   --with-syslog           Include experimental SYSLOG support (default=no)"
85 ac_help="$ac_help
86   --with-profiling-data   Include gathering source code profile information (default=no)"
87 ac_help="$ac_help
88   --with-quotas           Include experimental disk-quota support (default=no)"
89 ac_help="$ac_help
90   --with-utmp             Include experimental utmp accounting (default=no)"
91 ac_help="$ac_help
92   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
93 ac_help="$ac_help
94   --with-libsmbclient     Build the libsmbclient shared library (default=yes)"
95 ac_help="$ac_help
96   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
97 ac_help="$ac_help
98   --with-acl-support      Include ACL support (default=no)"
99 ac_help="$ac_help
100   --with-sendfile-support      Check for sendfile support (default=yes)"
101 ac_help="$ac_help
102   --with-winbind          Build winbind (default, if supported by OS)"
103 ac_help="$ac_help
104   --with-included-popt    use bundled popt library, not from system"
105 ac_help="$ac_help
106   --with-python=PYTHONNAME  build Python libraries"
107
108 # Initialize some variables set by options.
109 # The variables have the same names as the options, with
110 # dashes changed to underlines.
111 build=NONE
112 cache_file=./config.cache
113 exec_prefix=NONE
114 host=NONE
115 no_create=
116 nonopt=NONE
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 srcdir=
125 target=NONE
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129 bindir='${exec_prefix}/bin'
130 sbindir='${exec_prefix}/sbin'
131 libexecdir='${exec_prefix}/libexec'
132 datadir='${prefix}/share'
133 sysconfdir='${prefix}/etc'
134 sharedstatedir='${prefix}/com'
135 localstatedir='${prefix}/var'
136 libdir='${exec_prefix}/lib'
137 includedir='${prefix}/include'
138 oldincludedir='/usr/include'
139 infodir='${prefix}/info'
140 mandir='${prefix}/man'
141
142 # Initialize some other variables.
143 subdirs=
144 MFLAGS= MAKEFLAGS=
145 SHELL=${CONFIG_SHELL-/bin/sh}
146 # Maximum number of lines to put in a shell here document.
147 ac_max_here_lines=12
148
149 ac_prev=
150 for ac_option
151 do
152
153   # If the previous option needs an argument, assign it.
154   if test -n "$ac_prev"; then
155     eval "$ac_prev=\$ac_option"
156     ac_prev=
157     continue
158   fi
159
160   case "$ac_option" in
161   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
162   *) ac_optarg= ;;
163   esac
164
165   # Accept the important Cygnus configure options, so we can diagnose typos.
166
167   case "$ac_option" in
168
169   -bindir | --bindir | --bindi | --bind | --bin | --bi)
170     ac_prev=bindir ;;
171   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
172     bindir="$ac_optarg" ;;
173
174   -build | --build | --buil | --bui | --bu)
175     ac_prev=build ;;
176   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
177     build="$ac_optarg" ;;
178
179   -cache-file | --cache-file | --cache-fil | --cache-fi \
180   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
181     ac_prev=cache_file ;;
182   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
183   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
184     cache_file="$ac_optarg" ;;
185
186   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
187     ac_prev=datadir ;;
188   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
189   | --da=*)
190     datadir="$ac_optarg" ;;
191
192   -disable-* | --disable-*)
193     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
194     # Reject names that are not valid shell variable names.
195     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
196       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
197     fi
198     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
199     eval "enable_${ac_feature}=no" ;;
200
201   -enable-* | --enable-*)
202     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
203     # Reject names that are not valid shell variable names.
204     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
205       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
206     fi
207     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
208     case "$ac_option" in
209       *=*) ;;
210       *) ac_optarg=yes ;;
211     esac
212     eval "enable_${ac_feature}='$ac_optarg'" ;;
213
214   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
215   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
216   | --exec | --exe | --ex)
217     ac_prev=exec_prefix ;;
218   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
219   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
220   | --exec=* | --exe=* | --ex=*)
221     exec_prefix="$ac_optarg" ;;
222
223   -gas | --gas | --ga | --g)
224     # Obsolete; use --with-gas.
225     with_gas=yes ;;
226
227   -help | --help | --hel | --he)
228     # Omit some internal or obsolete options to make the list less imposing.
229     # This message is too long to be a string in the A/UX 3.1 sh.
230     cat << EOF
231 Usage: configure [options] [host]
232 Options: [defaults in brackets after descriptions]
233 Configuration:
234   --cache-file=FILE       cache test results in FILE
235   --help                  print this message
236   --no-create             do not create output files
237   --quiet, --silent       do not print \`checking...' messages
238   --version               print the version of autoconf that created configure
239 Directory and file names:
240   --prefix=PREFIX         install architecture-independent files in PREFIX
241                           [$ac_default_prefix]
242   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
243                           [same as prefix]
244   --bindir=DIR            user executables in DIR [EPREFIX/bin]
245   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
246   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
247   --datadir=DIR           read-only architecture-independent data in DIR
248                           [PREFIX/share]
249   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
250   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
251                           [PREFIX/com]
252   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
253   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
254   --includedir=DIR        C header files in DIR [PREFIX/include]
255   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
256   --infodir=DIR           info documentation in DIR [PREFIX/info]
257   --mandir=DIR            man documentation in DIR [PREFIX/man]
258   --srcdir=DIR            find the sources in DIR [configure dir or ..]
259   --program-prefix=PREFIX prepend PREFIX to installed program names
260   --program-suffix=SUFFIX append SUFFIX to installed program names
261   --program-transform-name=PROGRAM
262                           run sed PROGRAM on installed program names
263 EOF
264     cat << EOF
265 Host type:
266   --build=BUILD           configure for building on BUILD [BUILD=HOST]
267   --host=HOST             configure for HOST [guessed]
268   --target=TARGET         configure for TARGET [TARGET=HOST]
269 Features and packages:
270   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
271   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
272   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
273   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
274   --x-includes=DIR        X include files are in DIR
275   --x-libraries=DIR       X library files are in DIR
276 EOF
277     if test -n "$ac_help"; then
278       echo "--enable and --with options recognized:$ac_help"
279     fi
280     exit 0 ;;
281
282   -host | --host | --hos | --ho)
283     ac_prev=host ;;
284   -host=* | --host=* | --hos=* | --ho=*)
285     host="$ac_optarg" ;;
286
287   -includedir | --includedir | --includedi | --included | --include \
288   | --includ | --inclu | --incl | --inc)
289     ac_prev=includedir ;;
290   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291   | --includ=* | --inclu=* | --incl=* | --inc=*)
292     includedir="$ac_optarg" ;;
293
294   -infodir | --infodir | --infodi | --infod | --info | --inf)
295     ac_prev=infodir ;;
296   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297     infodir="$ac_optarg" ;;
298
299   -libdir | --libdir | --libdi | --libd)
300     ac_prev=libdir ;;
301   -libdir=* | --libdir=* | --libdi=* | --libd=*)
302     libdir="$ac_optarg" ;;
303
304   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305   | --libexe | --libex | --libe)
306     ac_prev=libexecdir ;;
307   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308   | --libexe=* | --libex=* | --libe=*)
309     libexecdir="$ac_optarg" ;;
310
311   -localstatedir | --localstatedir | --localstatedi | --localstated \
312   | --localstate | --localstat | --localsta | --localst \
313   | --locals | --local | --loca | --loc | --lo)
314     ac_prev=localstatedir ;;
315   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318     localstatedir="$ac_optarg" ;;
319
320   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321     ac_prev=mandir ;;
322   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323     mandir="$ac_optarg" ;;
324
325   -nfp | --nfp | --nf)
326     # Obsolete; use --without-fp.
327     with_fp=no ;;
328
329   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330   | --no-cr | --no-c)
331     no_create=yes ;;
332
333   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335     no_recursion=yes ;;
336
337   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339   | --oldin | --oldi | --old | --ol | --o)
340     ac_prev=oldincludedir ;;
341   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344     oldincludedir="$ac_optarg" ;;
345
346   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347     ac_prev=prefix ;;
348   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349     prefix="$ac_optarg" ;;
350
351   -program-prefix | --program-prefix | --program-prefi | --program-pref \
352   | --program-pre | --program-pr | --program-p)
353     ac_prev=program_prefix ;;
354   -program-prefix=* | --program-prefix=* | --program-prefi=* \
355   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356     program_prefix="$ac_optarg" ;;
357
358   -program-suffix | --program-suffix | --program-suffi | --program-suff \
359   | --program-suf | --program-su | --program-s)
360     ac_prev=program_suffix ;;
361   -program-suffix=* | --program-suffix=* | --program-suffi=* \
362   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363     program_suffix="$ac_optarg" ;;
364
365   -program-transform-name | --program-transform-name \
366   | --program-transform-nam | --program-transform-na \
367   | --program-transform-n | --program-transform- \
368   | --program-transform | --program-transfor \
369   | --program-transfo | --program-transf \
370   | --program-trans | --program-tran \
371   | --progr-tra | --program-tr | --program-t)
372     ac_prev=program_transform_name ;;
373   -program-transform-name=* | --program-transform-name=* \
374   | --program-transform-nam=* | --program-transform-na=* \
375   | --program-transform-n=* | --program-transform-=* \
376   | --program-transform=* | --program-transfor=* \
377   | --program-transfo=* | --program-transf=* \
378   | --program-trans=* | --program-tran=* \
379   | --progr-tra=* | --program-tr=* | --program-t=*)
380     program_transform_name="$ac_optarg" ;;
381
382   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383   | -silent | --silent | --silen | --sile | --sil)
384     silent=yes ;;
385
386   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387     ac_prev=sbindir ;;
388   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389   | --sbi=* | --sb=*)
390     sbindir="$ac_optarg" ;;
391
392   -sharedstatedir | --sharedstatedir | --sharedstatedi \
393   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394   | --sharedst | --shareds | --shared | --share | --shar \
395   | --sha | --sh)
396     ac_prev=sharedstatedir ;;
397   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400   | --sha=* | --sh=*)
401     sharedstatedir="$ac_optarg" ;;
402
403   -site | --site | --sit)
404     ac_prev=site ;;
405   -site=* | --site=* | --sit=*)
406     site="$ac_optarg" ;;
407
408   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409     ac_prev=srcdir ;;
410   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411     srcdir="$ac_optarg" ;;
412
413   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414   | --syscon | --sysco | --sysc | --sys | --sy)
415     ac_prev=sysconfdir ;;
416   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418     sysconfdir="$ac_optarg" ;;
419
420   -target | --target | --targe | --targ | --tar | --ta | --t)
421     ac_prev=target ;;
422   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423     target="$ac_optarg" ;;
424
425   -v | -verbose | --verbose | --verbos | --verbo | --verb)
426     verbose=yes ;;
427
428   -version | --version | --versio | --versi | --vers)
429     echo "configure generated by autoconf version 2.13"
430     exit 0 ;;
431
432   -with-* | --with-*)
433     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
434     # Reject names that are not valid shell variable names.
435     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
436       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437     fi
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case "$ac_option" in
440       *=*) ;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_${ac_package}='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
447     # Reject names that are not valid shell variable names.
448     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
449       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
450     fi
451     ac_package=`echo $ac_package| sed 's/-/_/g'`
452     eval "with_${ac_package}=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes="$ac_optarg" ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries="$ac_optarg" ;;
471
472   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
473     ;;
474
475   *)
476     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
477       echo "configure: warning: $ac_option: invalid host type" 1>&2
478     fi
479     if test "x$nonopt" != xNONE; then
480       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
481     fi
482     nonopt="$ac_option"
483     ;;
484
485   esac
486 done
487
488 if test -n "$ac_prev"; then
489   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
490 fi
491
492 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
493
494 # File descriptor usage:
495 # 0 standard input
496 # 1 file creation
497 # 2 errors and warnings
498 # 3 some systems may open it to /dev/tty
499 # 4 used on the Kubota Titan
500 # 6 checking for... messages and results
501 # 5 compiler messages saved in config.log
502 if test "$silent" = yes; then
503   exec 6>/dev/null
504 else
505   exec 6>&1
506 fi
507 exec 5>./config.log
508
509 echo "\
510 This file contains any messages produced by compilers while
511 running configure, to aid debugging if configure makes a mistake.
512 " 1>&5
513
514 # Strip out --no-create and --no-recursion so they do not pile up.
515 # Also quote any args containing shell metacharacters.
516 ac_configure_args=
517 for ac_arg
518 do
519   case "$ac_arg" in
520   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
521   | --no-cr | --no-c) ;;
522   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
523   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
524   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
525   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
526   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
527   esac
528 done
529
530 # NLS nuisances.
531 # Only set these to C if already set.  These must not be set unconditionally
532 # because not all systems understand e.g. LANG=C (notably SCO).
533 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
534 # Non-C LC_CTYPE values break the ctype check.
535 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
536 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
537 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
538 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
539
540 # confdefs.h avoids OS command line length limits that DEFS can exceed.
541 rm -rf conftest* confdefs.h
542 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
543 echo > confdefs.h
544
545 # A filename unique to this package, relative to the directory that
546 # configure is in, which we can look for to find out if srcdir is correct.
547 ac_unique_file=include/includes.h
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
566   else
567     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
568   fi
569 fi
570 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
571
572 # Prefer explicitly selected file to automatically selected ones.
573 if test -z "$CONFIG_SITE"; then
574   if test "x$prefix" != xNONE; then
575     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
576   else
577     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
578   fi
579 fi
580 for ac_site_file in $CONFIG_SITE; do
581   if test -r "$ac_site_file"; then
582     echo "loading site script $ac_site_file"
583     . "$ac_site_file"
584   fi
585 done
586
587 if test -r "$cache_file"; then
588   echo "loading cache $cache_file"
589   . $cache_file
590 else
591   echo "creating cache $cache_file"
592   > $cache_file
593 fi
594
595 ac_ext=c
596 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
597 ac_cpp='$CPP $CPPFLAGS'
598 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
599 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
600 cross_compiling=$ac_cv_prog_cc_cross
601
602 ac_exeext=
603 ac_objext=o
604 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
605   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
606   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
607     ac_n= ac_c='
608 ' ac_t='        '
609   else
610     ac_n=-n ac_c= ac_t=
611   fi
612 else
613   ac_n= ac_c='\c' ac_t=
614 fi
615
616
617
618
619 #################################################
620 # Directory handling stuff to support both the
621 # legacy SAMBA directories and FHS compliant
622 # ones...
623
624
625 # Check whether --with-fhs or --without-fhs was given.
626 if test "${with_fhs+set}" = set; then
627   withval="$with_fhs"
628   configdir="${sysconfdir}/samba"
629     lockdir="\${VARDIR}/cache/samba"
630     piddir="\${VARDIR}/run/samba"
631     logfilebase="\${VARDIR}/log/samba"
632     privatedir="\${CONFIGDIR}/private"
633     libdir="\${prefix}/lib/samba"
634     swatdir="\${DATADIR}/samba/swat"
635 else
636   configdir="\${LIBDIR}"
637     logfilebase="\${VARDIR}"
638     lockdir="\${VARDIR}/locks"
639     piddir="\${VARDIR}/locks"
640     privatedir="\${prefix}/private"
641     swatdir="\${prefix}/swat"
642 fi
643
644
645 #################################################
646 # set private directory location
647 # Check whether --with-privatedir or --without-privatedir was given.
648 if test "${with_privatedir+set}" = set; then
649   withval="$with_privatedir"
650    case "$withval" in
651   yes|no)
652   #
653   # Just in case anybody calls it without argument
654   #
655     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
656   ;;
657   * )
658     privatedir="$withval"
659     ;;
660   esac
661 fi
662
663
664 #################################################
665 # set lock directory location
666 # Check whether --with-lockdir or --without-lockdir was given.
667 if test "${with_lockdir+set}" = set; then
668   withval="$with_lockdir"
669    case "$withval" in
670   yes|no)
671   #
672   # Just in case anybody calls it without argument
673   #
674     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
675   ;;
676   * )
677     lockdir="$withval"
678     ;;
679   esac
680 fi
681
682
683 #################################################
684 # set pid directory location
685 # Check whether --with-piddir or --without-piddir was given.
686 if test "${with_piddir+set}" = set; then
687   withval="$with_piddir"
688    case "$withval" in
689   yes|no)
690   #
691   # Just in case anybody calls it without argument
692   #
693     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
694   ;;
695   * )
696     piddir="$withval"
697     ;;
698   esac
699 fi
700
701
702 #################################################
703 # set SWAT directory location
704 # Check whether --with-swatdir or --without-swatdir was given.
705 if test "${with_swatdir+set}" = set; then
706   withval="$with_swatdir"
707    case "$withval" in
708   yes|no)
709   #
710   # Just in case anybody does it
711   #
712     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
713   ;;
714   * )
715     swatdir="$withval"
716     ;;
717   esac
718 fi
719
720
721 #################################################
722 # set configuration directory location
723 # Check whether --with-configdir or --without-configdir was given.
724 if test "${with_configdir+set}" = set; then
725   withval="$with_configdir"
726    case "$withval" in
727   yes|no)
728   #
729   # Just in case anybody does it
730   #
731     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
732   ;;
733   * )
734     configdir="$withval"
735     ;;
736   esac
737 fi
738
739
740 #################################################
741 # set log directory location
742 # Check whether --with-logfilebase or --without-logfilebase was given.
743 if test "${with_logfilebase+set}" = set; then
744   withval="$with_logfilebase"
745    case "$withval" in
746   yes|no)
747   #
748   # Just in case anybody does it
749   #
750     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
751   ;;
752   * )
753     logfilebase="$withval"
754     ;;
755   esac
756 fi
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787 # compile with optimization and without debugging by default
788 CFLAGS="-O ${CFLAGS}"
789
790 # Check whether --enable-debug or --disable-debug was given.
791 if test "${enable_debug+set}" = set; then
792   enableval="$enable_debug"
793   if eval "test x$enable_debug = xyes"; then
794         CFLAGS="${CFLAGS} -g"
795     fi
796 fi
797
798
799 # Check whether --enable-developer or --disable-developer was given.
800 if test "${enable_developer+set}" = set; then
801   enableval="$enable_developer"
802   if eval "test x$enable_developer = xyes"; then
803         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
804     fi
805 fi
806
807
808 # Check whether --enable-krb5developer or --disable-krb5developer was given.
809 if test "${enable_krb5developer+set}" = set; then
810   enableval="$enable_krb5developer"
811   if eval "test x$enable_krb5developer = xyes"; then
812         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
813     fi
814 fi
815
816
817 # Check whether --enable-dmalloc or --disable-dmalloc was given.
818 if test "${enable_dmalloc+set}" = set; then
819   enableval="$enable_dmalloc"
820   :
821 fi
822
823
824 if test "x$enable_dmalloc" = xyes
825 then
826         cat >> confdefs.h <<\EOF
827 #define ENABLE_DMALLOC 1
828 EOF
829
830         cat >> confdefs.h <<\EOF
831 #define DMALLOC_FUNC_CHECK 1
832 EOF
833
834         LIBS="$LIBS -ldmalloc"  
835 fi
836
837 # Extract the first word of "gcc", so it can be a program name with args.
838 set dummy gcc; ac_word=$2
839 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
840 echo "configure:841: checking for $ac_word" >&5
841 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
842   echo $ac_n "(cached) $ac_c" 1>&6
843 else
844   if test -n "$CC"; then
845   ac_cv_prog_CC="$CC" # Let the user override the test.
846 else
847   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
848   ac_dummy="$PATH"
849   for ac_dir in $ac_dummy; do
850     test -z "$ac_dir" && ac_dir=.
851     if test -f $ac_dir/$ac_word; then
852       ac_cv_prog_CC="gcc"
853       break
854     fi
855   done
856   IFS="$ac_save_ifs"
857 fi
858 fi
859 CC="$ac_cv_prog_CC"
860 if test -n "$CC"; then
861   echo "$ac_t""$CC" 1>&6
862 else
863   echo "$ac_t""no" 1>&6
864 fi
865
866 if test -z "$CC"; then
867   # Extract the first word of "cc", so it can be a program name with args.
868 set dummy cc; ac_word=$2
869 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
870 echo "configure:871: checking for $ac_word" >&5
871 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
872   echo $ac_n "(cached) $ac_c" 1>&6
873 else
874   if test -n "$CC"; then
875   ac_cv_prog_CC="$CC" # Let the user override the test.
876 else
877   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
878   ac_prog_rejected=no
879   ac_dummy="$PATH"
880   for ac_dir in $ac_dummy; do
881     test -z "$ac_dir" && ac_dir=.
882     if test -f $ac_dir/$ac_word; then
883       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
884         ac_prog_rejected=yes
885         continue
886       fi
887       ac_cv_prog_CC="cc"
888       break
889     fi
890   done
891   IFS="$ac_save_ifs"
892 if test $ac_prog_rejected = yes; then
893   # We found a bogon in the path, so make sure we never use it.
894   set dummy $ac_cv_prog_CC
895   shift
896   if test $# -gt 0; then
897     # We chose a different compiler from the bogus one.
898     # However, it has the same basename, so the bogon will be chosen
899     # first if we set CC to just the basename; use the full file name.
900     shift
901     set dummy "$ac_dir/$ac_word" "$@"
902     shift
903     ac_cv_prog_CC="$@"
904   fi
905 fi
906 fi
907 fi
908 CC="$ac_cv_prog_CC"
909 if test -n "$CC"; then
910   echo "$ac_t""$CC" 1>&6
911 else
912   echo "$ac_t""no" 1>&6
913 fi
914
915   if test -z "$CC"; then
916     case "`uname -s`" in
917     *win32* | *WIN32*)
918       # Extract the first word of "cl", so it can be a program name with args.
919 set dummy cl; ac_word=$2
920 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921 echo "configure:922: checking for $ac_word" >&5
922 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
923   echo $ac_n "(cached) $ac_c" 1>&6
924 else
925   if test -n "$CC"; then
926   ac_cv_prog_CC="$CC" # Let the user override the test.
927 else
928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
929   ac_dummy="$PATH"
930   for ac_dir in $ac_dummy; do
931     test -z "$ac_dir" && ac_dir=.
932     if test -f $ac_dir/$ac_word; then
933       ac_cv_prog_CC="cl"
934       break
935     fi
936   done
937   IFS="$ac_save_ifs"
938 fi
939 fi
940 CC="$ac_cv_prog_CC"
941 if test -n "$CC"; then
942   echo "$ac_t""$CC" 1>&6
943 else
944   echo "$ac_t""no" 1>&6
945 fi
946  ;;
947     esac
948   fi
949   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
950 fi
951
952 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
953 echo "configure:954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
954
955 ac_ext=c
956 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
957 ac_cpp='$CPP $CPPFLAGS'
958 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
959 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
960 cross_compiling=$ac_cv_prog_cc_cross
961
962 cat > conftest.$ac_ext << EOF
963
964 #line 965 "configure"
965 #include "confdefs.h"
966
967 main(){return(0);}
968 EOF
969 if { (eval echo configure:970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
970   ac_cv_prog_cc_works=yes
971   # If we can't run a trivial program, we are probably using a cross compiler.
972   if (./conftest; exit) 2>/dev/null; then
973     ac_cv_prog_cc_cross=no
974   else
975     ac_cv_prog_cc_cross=yes
976   fi
977 else
978   echo "configure: failed program was:" >&5
979   cat conftest.$ac_ext >&5
980   ac_cv_prog_cc_works=no
981 fi
982 rm -fr conftest*
983 ac_ext=c
984 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
985 ac_cpp='$CPP $CPPFLAGS'
986 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
987 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
988 cross_compiling=$ac_cv_prog_cc_cross
989
990 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
991 if test $ac_cv_prog_cc_works = no; then
992   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
993 fi
994 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
995 echo "configure:996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
996 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
997 cross_compiling=$ac_cv_prog_cc_cross
998
999 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1000 echo "configure:1001: checking whether we are using GNU C" >&5
1001 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1002   echo $ac_n "(cached) $ac_c" 1>&6
1003 else
1004   cat > conftest.c <<EOF
1005 #ifdef __GNUC__
1006   yes;
1007 #endif
1008 EOF
1009 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1010   ac_cv_prog_gcc=yes
1011 else
1012   ac_cv_prog_gcc=no
1013 fi
1014 fi
1015
1016 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1017
1018 if test $ac_cv_prog_gcc = yes; then
1019   GCC=yes
1020 else
1021   GCC=
1022 fi
1023
1024 ac_test_CFLAGS="${CFLAGS+set}"
1025 ac_save_CFLAGS="$CFLAGS"
1026 CFLAGS=
1027 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1028 echo "configure:1029: checking whether ${CC-cc} accepts -g" >&5
1029 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1030   echo $ac_n "(cached) $ac_c" 1>&6
1031 else
1032   echo 'void f(){}' > conftest.c
1033 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1034   ac_cv_prog_cc_g=yes
1035 else
1036   ac_cv_prog_cc_g=no
1037 fi
1038 rm -f conftest*
1039
1040 fi
1041
1042 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1043 if test "$ac_test_CFLAGS" = set; then
1044   CFLAGS="$ac_save_CFLAGS"
1045 elif test $ac_cv_prog_cc_g = yes; then
1046   if test "$GCC" = yes; then
1047     CFLAGS="-g -O2"
1048   else
1049     CFLAGS="-g"
1050   fi
1051 else
1052   if test "$GCC" = yes; then
1053     CFLAGS="-O2"
1054   else
1055     CFLAGS=
1056   fi
1057 fi
1058
1059 ac_aux_dir=
1060 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1061   if test -f $ac_dir/install-sh; then
1062     ac_aux_dir=$ac_dir
1063     ac_install_sh="$ac_aux_dir/install-sh -c"
1064     break
1065   elif test -f $ac_dir/install.sh; then
1066     ac_aux_dir=$ac_dir
1067     ac_install_sh="$ac_aux_dir/install.sh -c"
1068     break
1069   fi
1070 done
1071 if test -z "$ac_aux_dir"; then
1072   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1073 fi
1074 ac_config_guess=$ac_aux_dir/config.guess
1075 ac_config_sub=$ac_aux_dir/config.sub
1076 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1077
1078 # Find a good install program.  We prefer a C program (faster),
1079 # so one script is as good as another.  But avoid the broken or
1080 # incompatible versions:
1081 # SysV /etc/install, /usr/sbin/install
1082 # SunOS /usr/etc/install
1083 # IRIX /sbin/install
1084 # AIX /bin/install
1085 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1086 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1087 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1088 # ./install, which can be erroneously created by make from ./install.sh.
1089 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1090 echo "configure:1091: checking for a BSD compatible install" >&5
1091 if test -z "$INSTALL"; then
1092 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1093   echo $ac_n "(cached) $ac_c" 1>&6
1094 else
1095     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1096   for ac_dir in $PATH; do
1097     # Account for people who put trailing slashes in PATH elements.
1098     case "$ac_dir/" in
1099     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1100     *)
1101       # OSF1 and SCO ODT 3.0 have their own names for install.
1102       # Don't use installbsd from OSF since it installs stuff as root
1103       # by default.
1104       for ac_prog in ginstall scoinst install; do
1105         if test -f $ac_dir/$ac_prog; then
1106           if test $ac_prog = install &&
1107             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1108             # AIX install.  It has an incompatible calling convention.
1109             :
1110           else
1111             ac_cv_path_install="$ac_dir/$ac_prog -c"
1112             break 2
1113           fi
1114         fi
1115       done
1116       ;;
1117     esac
1118   done
1119   IFS="$ac_save_IFS"
1120
1121 fi
1122   if test "${ac_cv_path_install+set}" = set; then
1123     INSTALL="$ac_cv_path_install"
1124   else
1125     # As a last resort, use the slow shell script.  We don't cache a
1126     # path for INSTALL within a source directory, because that will
1127     # break other packages using the cache if that directory is
1128     # removed, or if the path is relative.
1129     INSTALL="$ac_install_sh"
1130   fi
1131 fi
1132 echo "$ac_t""$INSTALL" 1>&6
1133
1134 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1135 # It thinks the first close brace ends the variable substitution.
1136 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1137
1138 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1139
1140 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1141
1142 for ac_prog in gawk mawk nawk awk
1143 do
1144 # Extract the first word of "$ac_prog", so it can be a program name with args.
1145 set dummy $ac_prog; ac_word=$2
1146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1147 echo "configure:1148: checking for $ac_word" >&5
1148 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1149   echo $ac_n "(cached) $ac_c" 1>&6
1150 else
1151   if test -n "$AWK"; then
1152   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1153 else
1154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1155   ac_dummy="$PATH"
1156   for ac_dir in $ac_dummy; do
1157     test -z "$ac_dir" && ac_dir=.
1158     if test -f $ac_dir/$ac_word; then
1159       ac_cv_prog_AWK="$ac_prog"
1160       break
1161     fi
1162   done
1163   IFS="$ac_save_ifs"
1164 fi
1165 fi
1166 AWK="$ac_cv_prog_AWK"
1167 if test -n "$AWK"; then
1168   echo "$ac_t""$AWK" 1>&6
1169 else
1170   echo "$ac_t""no" 1>&6
1171 fi
1172
1173 test -n "$AWK" && break
1174 done
1175
1176
1177 LD=ld
1178 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1179 echo "configure:1180: checking if the linker ($LD) is GNU ld" >&5
1180 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1181   echo $ac_n "(cached) $ac_c" 1>&6
1182 else
1183   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1184 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1185   ac_cv_prog_gnu_ld=yes
1186 else
1187   ac_cv_prog_gnu_ld=no
1188 fi
1189 fi
1190
1191 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1192
1193
1194 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1195 echo "configure:1196: checking for POSIXized ISC" >&5
1196 if test -d /etc/conf/kconfig.d &&
1197   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1198 then
1199   echo "$ac_t""yes" 1>&6
1200   ISC=yes # If later tests want to check for ISC.
1201   cat >> confdefs.h <<\EOF
1202 #define _POSIX_SOURCE 1
1203 EOF
1204
1205   if test "$GCC" = yes; then
1206     CC="$CC -posix"
1207   else
1208     CC="$CC -Xp"
1209   fi
1210 else
1211   echo "$ac_t""no" 1>&6
1212   ISC=
1213 fi
1214
1215
1216 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1217 echo "configure:1218: checking for Cygwin environment" >&5
1218 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1219   echo $ac_n "(cached) $ac_c" 1>&6
1220 else
1221   cat > conftest.$ac_ext <<EOF
1222 #line 1223 "configure"
1223 #include "confdefs.h"
1224
1225 int main() {
1226
1227 #ifndef __CYGWIN__
1228 #define __CYGWIN__ __CYGWIN32__
1229 #endif
1230 return __CYGWIN__;
1231 ; return 0; }
1232 EOF
1233 if { (eval echo configure:1234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1234   rm -rf conftest*
1235   ac_cv_cygwin=yes
1236 else
1237   echo "configure: failed program was:" >&5
1238   cat conftest.$ac_ext >&5
1239   rm -rf conftest*
1240   ac_cv_cygwin=no
1241 fi
1242 rm -f conftest*
1243 rm -f conftest*
1244 fi
1245
1246 echo "$ac_t""$ac_cv_cygwin" 1>&6
1247 CYGWIN=
1248 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1249 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1250 echo "configure:1251: checking for mingw32 environment" >&5
1251 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1252   echo $ac_n "(cached) $ac_c" 1>&6
1253 else
1254   cat > conftest.$ac_ext <<EOF
1255 #line 1256 "configure"
1256 #include "confdefs.h"
1257
1258 int main() {
1259 return __MINGW32__;
1260 ; return 0; }
1261 EOF
1262 if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1263   rm -rf conftest*
1264   ac_cv_mingw32=yes
1265 else
1266   echo "configure: failed program was:" >&5
1267   cat conftest.$ac_ext >&5
1268   rm -rf conftest*
1269   ac_cv_mingw32=no
1270 fi
1271 rm -f conftest*
1272 rm -f conftest*
1273 fi
1274
1275 echo "$ac_t""$ac_cv_mingw32" 1>&6
1276 MINGW32=
1277 test "$ac_cv_mingw32" = yes && MINGW32=yes
1278
1279
1280 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1281 echo "configure:1282: checking for executable suffix" >&5
1282 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1283   echo $ac_n "(cached) $ac_c" 1>&6
1284 else
1285   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1286   ac_cv_exeext=.exe
1287 else
1288   rm -f conftest*
1289   echo 'int main () { return 0; }' > conftest.$ac_ext
1290   ac_cv_exeext=
1291   if { (eval echo configure:1292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1292     for file in conftest.*; do
1293       case $file in
1294       *.c | *.o | *.obj) ;;
1295       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1296       esac
1297     done
1298   else
1299     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1300   fi
1301   rm -f conftest*
1302   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1303 fi
1304 fi
1305
1306 EXEEXT=""
1307 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1308 echo "$ac_t""${ac_cv_exeext}" 1>&6
1309 ac_exeext=$EXEEXT
1310
1311
1312 if test "x$CC" != xcc; then
1313   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1314 echo "configure:1315: checking whether $CC and cc understand -c and -o together" >&5
1315 else
1316   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1317 echo "configure:1318: checking whether cc understands -c and -o together" >&5
1318 fi
1319 set dummy $CC; ac_cc="`echo $2 |
1320                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1321 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1322   echo $ac_n "(cached) $ac_c" 1>&6
1323 else
1324   echo 'foo(){}' > conftest.c
1325 # Make sure it works both with $CC and with simple cc.
1326 # We do the test twice because some compilers refuse to overwrite an
1327 # existing .o file with -o, though they will create one.
1328 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1329 if { (eval echo configure:1330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1330    test -f conftest.o && { (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1331 then
1332   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1333   if test "x$CC" != xcc; then
1334     # Test first that cc exists at all.
1335     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1336       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1337       if { (eval echo configure:1338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1338          test -f conftest.o && { (eval echo configure:1339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1339       then
1340         # cc works too.
1341         :
1342       else
1343         # cc exists but doesn't like -o.
1344         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1345       fi
1346     fi
1347   fi
1348 else
1349   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1350 fi
1351 rm -f conftest*
1352
1353 fi
1354 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1355   echo "$ac_t""yes" 1>&6
1356 else
1357   echo "$ac_t""no" 1>&6
1358   cat >> confdefs.h <<\EOF
1359 #define NO_MINUS_C_MINUS_O 1
1360 EOF
1361
1362 fi
1363
1364 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1365       BROKEN_CC=
1366 else
1367       BROKEN_CC=#
1368 fi
1369
1370
1371 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1372 echo "configure:1373: checking that the C compiler understands volatile" >&5
1373 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1374   echo $ac_n "(cached) $ac_c" 1>&6
1375 else
1376   
1377     cat > conftest.$ac_ext <<EOF
1378 #line 1379 "configure"
1379 #include "confdefs.h"
1380 #include <sys/types.h>
1381 int main() {
1382 volatile int i = 0
1383 ; return 0; }
1384 EOF
1385 if { (eval echo configure:1386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1386   rm -rf conftest*
1387   samba_cv_volatile=yes
1388 else
1389   echo "configure: failed program was:" >&5
1390   cat conftest.$ac_ext >&5
1391   rm -rf conftest*
1392   samba_cv_volatile=no
1393 fi
1394 rm -f conftest*
1395 fi
1396
1397 echo "$ac_t""$samba_cv_volatile" 1>&6
1398 if test x"$samba_cv_volatile" = x"yes"; then
1399    cat >> confdefs.h <<\EOF
1400 #define HAVE_VOLATILE 1
1401 EOF
1402
1403 fi
1404
1405
1406
1407 # Do some error checking and defaulting for the host and target type.
1408 # The inputs are:
1409 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1410 #
1411 # The rules are:
1412 # 1. You are not allowed to specify --host, --target, and nonopt at the
1413 #    same time.
1414 # 2. Host defaults to nonopt.
1415 # 3. If nonopt is not specified, then host defaults to the current host,
1416 #    as determined by config.guess.
1417 # 4. Target and build default to nonopt.
1418 # 5. If nonopt is not specified, then target and build default to host.
1419
1420 # The aliases save the names the user supplied, while $host etc.
1421 # will get canonicalized.
1422 case $host---$target---$nonopt in
1423 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1424 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1425 esac
1426
1427
1428 # Make sure we can run config.sub.
1429 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1430 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1431 fi
1432
1433 echo $ac_n "checking host system type""... $ac_c" 1>&6
1434 echo "configure:1435: checking host system type" >&5
1435
1436 host_alias=$host
1437 case "$host_alias" in
1438 NONE)
1439   case $nonopt in
1440   NONE)
1441     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1442     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1443     fi ;;
1444   *) host_alias=$nonopt ;;
1445   esac ;;
1446 esac
1447
1448 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1449 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452 echo "$ac_t""$host" 1>&6
1453
1454 echo $ac_n "checking target system type""... $ac_c" 1>&6
1455 echo "configure:1456: checking target system type" >&5
1456
1457 target_alias=$target
1458 case "$target_alias" in
1459 NONE)
1460   case $nonopt in
1461   NONE) target_alias=$host_alias ;;
1462   *) target_alias=$nonopt ;;
1463   esac ;;
1464 esac
1465
1466 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1467 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1468 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1469 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1470 echo "$ac_t""$target" 1>&6
1471
1472 echo $ac_n "checking build system type""... $ac_c" 1>&6
1473 echo "configure:1474: checking build system type" >&5
1474
1475 build_alias=$build
1476 case "$build_alias" in
1477 NONE)
1478   case $nonopt in
1479   NONE) build_alias=$host_alias ;;
1480   *) build_alias=$nonopt ;;
1481   esac ;;
1482 esac
1483
1484 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1485 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1486 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1487 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1488 echo "$ac_t""$build" 1>&6
1489
1490 test "$host_alias" != "$target_alias" &&
1491   test "$program_prefix$program_suffix$program_transform_name" = \
1492     NONENONEs,x,x, &&
1493   program_prefix=${target_alias}-
1494
1495
1496   case "$host_os" in
1497         *irix6*) cat >> confdefs.h <<\EOF
1498 #include <standards.h>
1499 EOF
1500
1501         ;;
1502 esac
1503
1504
1505     
1506     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1507 echo "configure:1508: checking config.cache system type" >&5
1508     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1509          test x"$ac_cv_host_system_type" != x"$host"; } ||
1510        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1511          test x"$ac_cv_build_system_type" != x"$build"; } ||
1512        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1513          test x"$ac_cv_target_system_type" != x"$target"; }; then
1514         echo "$ac_t""different" 1>&6
1515         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1516     else
1517         echo "$ac_t""same" 1>&6
1518     fi
1519     ac_cv_host_system_type="$host"
1520     ac_cv_build_system_type="$build"
1521     ac_cv_target_system_type="$target"
1522
1523
1524 DYNEXP=
1525
1526 #
1527 # Config CPPFLAG settings for strange OS's that must be set
1528 # before other tests.
1529 #
1530 case "$host_os" in
1531 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1532     *hpux*)
1533     
1534       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1535 echo "configure:1536: checking whether ${CC-cc} accepts -Ae" >&5
1536 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1537   echo $ac_n "(cached) $ac_c" 1>&6
1538 else
1539   echo 'void f(){}' > conftest.c
1540 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1541   ac_cv_prog_cc_Ae=yes
1542 else
1543   ac_cv_prog_cc_Ae=no
1544 fi
1545 rm -f conftest*
1546
1547 fi
1548
1549 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1550       # mmap on HPUX is completely broken...
1551       cat >> confdefs.h <<\EOF
1552 #define MMAP_BLACKLIST 1
1553 EOF
1554
1555       if test $ac_cv_prog_cc_Ae = yes; then
1556         CPPFLAGS="$CPPFLAGS -Ae"
1557       fi
1558 #
1559 # Defines needed for HPUX support.
1560 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1561 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1562 #
1563       case `uname -r` in
1564                         *9*|*10*)
1565                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1566                                 cat >> confdefs.h <<\EOF
1567 #define USE_BOTH_CRYPT_CALLS 1
1568 EOF
1569
1570                                 cat >> confdefs.h <<\EOF
1571 #define _HPUX_SOURCE 1
1572 EOF
1573
1574                                 cat >> confdefs.h <<\EOF
1575 #define _POSIX_SOURCE 1
1576 EOF
1577
1578                                 cat >> confdefs.h <<\EOF
1579 #define _ALIGNMENT_REQUIRED 1
1580 EOF
1581
1582                                 cat >> confdefs.h <<\EOF
1583 #define _MAX_ALIGNMENT 4
1584 EOF
1585
1586                                 ;;
1587                         *11*)
1588                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1589                                 cat >> confdefs.h <<\EOF
1590 #define USE_BOTH_CRYPT_CALLS 1
1591 EOF
1592
1593                                 cat >> confdefs.h <<\EOF
1594 #define _HPUX_SOURCE 1
1595 EOF
1596
1597                                 cat >> confdefs.h <<\EOF
1598 #define _POSIX_SOURCE 1
1599 EOF
1600
1601                                 cat >> confdefs.h <<\EOF
1602 #define _LARGEFILE64_SOURCE 1
1603 EOF
1604
1605                                 cat >> confdefs.h <<\EOF
1606 #define _ALIGNMENT_REQUIRED 1
1607 EOF
1608
1609                                 cat >> confdefs.h <<\EOF
1610 #define _MAX_ALIGNMENT 4
1611 EOF
1612
1613                                 ;;
1614       esac
1615       DYNEXP="-Wl,-E"
1616       ;;
1617
1618 #
1619 # CRAY Unicos has broken const handling
1620        *unicos*)
1621           echo "$ac_t""disabling const" 1>&6
1622           CPPFLAGS="$CPPFLAGS -Dconst="
1623           ;;
1624         
1625 #
1626 # AIX4.x doesn't even admit to having large
1627 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1628 #
1629     *aix4*)
1630           echo "$ac_t""enabling large file support" 1>&6
1631       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1632           cat >> confdefs.h <<\EOF
1633 #define _LARGE_FILES 1
1634 EOF
1635
1636       ;;    
1637 #
1638 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1639 # to the existance of large files..
1640 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1641 # recommendations on large file support, however it makes the
1642 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1643 # recommendation makes the compile fail on gcc2.7. JRA.
1644 #
1645         *solaris*)
1646                 case `uname -r` in
1647                         5.0*|5.1*|5.2*|5.3*|5.5*)
1648                                 echo "$ac_t""no large file support" 1>&6
1649                                 ;;
1650                         5.*)
1651                         echo "$ac_t""enabling large file support" 1>&6
1652                         if test "$ac_cv_prog_gcc" = yes; then
1653                                 ${CC-cc} -v >conftest.c 2>&1
1654                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1655                                 rm -fr conftest.c
1656                                 case "$ac_cv_gcc_compiler_version_number" in
1657                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1658                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1659                                                 cat >> confdefs.h <<\EOF
1660 #define _LARGEFILE64_SOURCE 1
1661 EOF
1662
1663                                                 ;;
1664                                         *)
1665                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1666                                                 cat >> confdefs.h <<\EOF
1667 #define _LARGEFILE64_SOURCE 1
1668 EOF
1669
1670                                                 cat >> confdefs.h <<\EOF
1671 #define _FILE_OFFSET_BITS 64
1672 EOF
1673
1674                                                 ;;
1675                                 esac
1676                         else
1677                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1678                                 cat >> confdefs.h <<\EOF
1679 #define _LARGEFILE64_SOURCE 1
1680 EOF
1681
1682                                 cat >> confdefs.h <<\EOF
1683 #define _FILE_OFFSET_BITS 64
1684 EOF
1685
1686                         fi
1687                         ;;
1688                 esac
1689                 ;;
1690 #
1691 # Tests needed for SINIX large file support.
1692 #
1693     *sysv4*)
1694       if test $host = mips-sni-sysv4 ; then
1695         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1696 echo "configure:1697: checking for LFS support" >&5
1697         old_CPPFLAGS="$CPPFLAGS"
1698         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1699         if test "$cross_compiling" = yes; then
1700   SINIX_LFS_SUPPORT=cross
1701 else
1702   cat > conftest.$ac_ext <<EOF
1703 #line 1704 "configure"
1704 #include "confdefs.h"
1705
1706 #include <unistd.h>
1707 main () {
1708 #if _LFS64_LARGEFILE == 1
1709 exit(0);
1710 #else
1711 exit(1);
1712 #endif
1713 }
1714 EOF
1715 if { (eval echo configure:1716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1716 then
1717   SINIX_LFS_SUPPORT=yes
1718 else
1719   echo "configure: failed program was:" >&5
1720   cat conftest.$ac_ext >&5
1721   rm -fr conftest*
1722   SINIX_LFS_SUPPORT=no
1723 fi
1724 rm -fr conftest*
1725 fi
1726
1727         CPPFLAGS="$old_CPPFLAGS"
1728         if test x$SINIX_LFS_SUPPORT = xyes ; then
1729           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1730                   cat >> confdefs.h <<\EOF
1731 #define _LARGEFILE64_SOURCE 1
1732 EOF
1733
1734           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1735           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1736           LIBS="`getconf LFS64_LIBS` $LIBS"
1737         fi
1738       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1739       fi
1740     ;;
1741
1742 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1743 #
1744     *linux*)
1745         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1746 echo "configure:1747: checking for LFS support" >&5
1747         old_CPPFLAGS="$CPPFLAGS"
1748         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1749        if test "$cross_compiling" = yes; then
1750   LINUX_LFS_SUPPORT=cross
1751 else
1752   cat > conftest.$ac_ext <<EOF
1753 #line 1754 "configure"
1754 #include "confdefs.h"
1755
1756 #include <unistd.h>
1757 #include <sys/utsname.h>
1758 main() {
1759 #if _LFS64_LARGEFILE == 1
1760        struct utsname uts;
1761        char *release;
1762        int major, minor;
1763
1764        /* Ensure this is glibc 2.2 or higher */
1765 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1766        int libc_major = __GLIBC__;
1767        int libc_minor = __GLIBC_MINOR__;
1768
1769        if (libc_major < 2)
1770               exit(1);
1771        if (libc_minor < 2)
1772               exit(1);
1773 #endif
1774
1775        /* Ensure this is kernel 2.4 or higher */
1776
1777        uname(&uts);
1778        release = uts.release;
1779        major = atoi(strsep(&release, "."));
1780        minor = atoi(strsep(&release, "."));
1781
1782        if (major > 2 || (major == 2 && minor > 3))
1783                exit(0);
1784        exit(1);
1785 #else
1786        exit(1);
1787 #endif
1788 }
1789
1790 EOF
1791 if { (eval echo configure:1792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1792 then
1793   LINUX_LFS_SUPPORT=yes
1794 else
1795   echo "configure: failed program was:" >&5
1796   cat conftest.$ac_ext >&5
1797   rm -fr conftest*
1798   LINUX_LFS_SUPPORT=no
1799 fi
1800 rm -fr conftest*
1801 fi
1802
1803         CPPFLAGS="$old_CPPFLAGS"
1804         if test x$LINUX_LFS_SUPPORT = xyes ; then
1805           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1806                   cat >> confdefs.h <<\EOF
1807 #define _LARGEFILE64_SOURCE 1
1808 EOF
1809
1810           cat >> confdefs.h <<\EOF
1811 #define _FILE_OFFSET_BITS 64
1812 EOF
1813
1814           cat >> confdefs.h <<\EOF
1815 #define _GNU_SOURCE 1
1816 EOF
1817
1818         fi
1819        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1820                 ;;
1821
1822     *hurd*)
1823         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1824 echo "configure:1825: checking for LFS support" >&5
1825         old_CPPFLAGS="$CPPFLAGS"
1826         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1827         if test "$cross_compiling" = yes; then
1828   GLIBC_LFS_SUPPORT=cross
1829 else
1830   cat > conftest.$ac_ext <<EOF
1831 #line 1832 "configure"
1832 #include "confdefs.h"
1833
1834 #include <unistd.h>
1835 main () {
1836 #if _LFS64_LARGEFILE == 1
1837 exit(0);
1838 #else
1839 exit(1);
1840 #endif
1841 }
1842 EOF
1843 if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1844 then
1845   GLIBC_LFS_SUPPORT=yes
1846 else
1847   echo "configure: failed program was:" >&5
1848   cat conftest.$ac_ext >&5
1849   rm -fr conftest*
1850   GLIBC_LFS_SUPPORT=no
1851 fi
1852 rm -fr conftest*
1853 fi
1854
1855         CPPFLAGS="$old_CPPFLAGS"
1856         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1857           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1858                   cat >> confdefs.h <<\EOF
1859 #define _LARGEFILE64_SOURCE 1
1860 EOF
1861
1862           cat >> confdefs.h <<\EOF
1863 #define _GNU_SOURCE 1
1864 EOF
1865
1866         fi
1867       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1868     ;;
1869
1870 esac
1871
1872 echo $ac_n "checking for inline""... $ac_c" 1>&6
1873 echo "configure:1874: checking for inline" >&5
1874 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1875   echo $ac_n "(cached) $ac_c" 1>&6
1876 else
1877   ac_cv_c_inline=no
1878 for ac_kw in inline __inline__ __inline; do
1879   cat > conftest.$ac_ext <<EOF
1880 #line 1881 "configure"
1881 #include "confdefs.h"
1882
1883 int main() {
1884 } $ac_kw foo() {
1885 ; return 0; }
1886 EOF
1887 if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1888   rm -rf conftest*
1889   ac_cv_c_inline=$ac_kw; break
1890 else
1891   echo "configure: failed program was:" >&5
1892   cat conftest.$ac_ext >&5
1893 fi
1894 rm -f conftest*
1895 done
1896
1897 fi
1898
1899 echo "$ac_t""$ac_cv_c_inline" 1>&6
1900 case "$ac_cv_c_inline" in
1901   inline | yes) ;;
1902   no) cat >> confdefs.h <<\EOF
1903 #define inline 
1904 EOF
1905  ;;
1906   *)  cat >> confdefs.h <<EOF
1907 #define inline $ac_cv_c_inline
1908 EOF
1909  ;;
1910 esac
1911
1912 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1913 echo "configure:1914: checking how to run the C preprocessor" >&5
1914 # On Suns, sometimes $CPP names a directory.
1915 if test -n "$CPP" && test -d "$CPP"; then
1916   CPP=
1917 fi
1918 if test -z "$CPP"; then
1919 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1920   echo $ac_n "(cached) $ac_c" 1>&6
1921 else
1922     # This must be in double quotes, not single quotes, because CPP may get
1923   # substituted into the Makefile and "${CC-cc}" will confuse make.
1924   CPP="${CC-cc} -E"
1925   # On the NeXT, cc -E runs the code through the compiler's parser,
1926   # not just through cpp.
1927   cat > conftest.$ac_ext <<EOF
1928 #line 1929 "configure"
1929 #include "confdefs.h"
1930 #include <assert.h>
1931 Syntax Error
1932 EOF
1933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1934 { (eval echo configure:1935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1936 if test -z "$ac_err"; then
1937   :
1938 else
1939   echo "$ac_err" >&5
1940   echo "configure: failed program was:" >&5
1941   cat conftest.$ac_ext >&5
1942   rm -rf conftest*
1943   CPP="${CC-cc} -E -traditional-cpp"
1944   cat > conftest.$ac_ext <<EOF
1945 #line 1946 "configure"
1946 #include "confdefs.h"
1947 #include <assert.h>
1948 Syntax Error
1949 EOF
1950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1951 { (eval echo configure:1952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1953 if test -z "$ac_err"; then
1954   :
1955 else
1956   echo "$ac_err" >&5
1957   echo "configure: failed program was:" >&5
1958   cat conftest.$ac_ext >&5
1959   rm -rf conftest*
1960   CPP="${CC-cc} -nologo -E"
1961   cat > conftest.$ac_ext <<EOF
1962 #line 1963 "configure"
1963 #include "confdefs.h"
1964 #include <assert.h>
1965 Syntax Error
1966 EOF
1967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1968 { (eval echo configure:1969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1970 if test -z "$ac_err"; then
1971   :
1972 else
1973   echo "$ac_err" >&5
1974   echo "configure: failed program was:" >&5
1975   cat conftest.$ac_ext >&5
1976   rm -rf conftest*
1977   CPP=/lib/cpp
1978 fi
1979 rm -f conftest*
1980 fi
1981 rm -f conftest*
1982 fi
1983 rm -f conftest*
1984   ac_cv_prog_CPP="$CPP"
1985 fi
1986   CPP="$ac_cv_prog_CPP"
1987 else
1988   ac_cv_prog_CPP="$CPP"
1989 fi
1990 echo "$ac_t""$CPP" 1>&6
1991
1992 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1993 echo "configure:1994: checking for ANSI C header files" >&5
1994 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1995   echo $ac_n "(cached) $ac_c" 1>&6
1996 else
1997   cat > conftest.$ac_ext <<EOF
1998 #line 1999 "configure"
1999 #include "confdefs.h"
2000 #include <stdlib.h>
2001 #include <stdarg.h>
2002 #include <string.h>
2003 #include <float.h>
2004 EOF
2005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2006 { (eval echo configure:2007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2008 if test -z "$ac_err"; then
2009   rm -rf conftest*
2010   ac_cv_header_stdc=yes
2011 else
2012   echo "$ac_err" >&5
2013   echo "configure: failed program was:" >&5
2014   cat conftest.$ac_ext >&5
2015   rm -rf conftest*
2016   ac_cv_header_stdc=no
2017 fi
2018 rm -f conftest*
2019
2020 if test $ac_cv_header_stdc = yes; then
2021   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2022 cat > conftest.$ac_ext <<EOF
2023 #line 2024 "configure"
2024 #include "confdefs.h"
2025 #include <string.h>
2026 EOF
2027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2028   egrep "memchr" >/dev/null 2>&1; then
2029   :
2030 else
2031   rm -rf conftest*
2032   ac_cv_header_stdc=no
2033 fi
2034 rm -f conftest*
2035
2036 fi
2037
2038 if test $ac_cv_header_stdc = yes; then
2039   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2040 cat > conftest.$ac_ext <<EOF
2041 #line 2042 "configure"
2042 #include "confdefs.h"
2043 #include <stdlib.h>
2044 EOF
2045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2046   egrep "free" >/dev/null 2>&1; then
2047   :
2048 else
2049   rm -rf conftest*
2050   ac_cv_header_stdc=no
2051 fi
2052 rm -f conftest*
2053
2054 fi
2055
2056 if test $ac_cv_header_stdc = yes; then
2057   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2058 if test "$cross_compiling" = yes; then
2059   :
2060 else
2061   cat > conftest.$ac_ext <<EOF
2062 #line 2063 "configure"
2063 #include "confdefs.h"
2064 #include <ctype.h>
2065 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2066 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2067 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2068 int main () { int i; for (i = 0; i < 256; i++)
2069 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2070 exit (0); }
2071
2072 EOF
2073 if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2074 then
2075   :
2076 else
2077   echo "configure: failed program was:" >&5
2078   cat conftest.$ac_ext >&5
2079   rm -fr conftest*
2080   ac_cv_header_stdc=no
2081 fi
2082 rm -fr conftest*
2083 fi
2084
2085 fi
2086 fi
2087
2088 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2089 if test $ac_cv_header_stdc = yes; then
2090   cat >> confdefs.h <<\EOF
2091 #define STDC_HEADERS 1
2092 EOF
2093
2094 fi
2095
2096 ac_header_dirent=no
2097 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2098 do
2099 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2100 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2101 echo "configure:2102: checking for $ac_hdr that defines DIR" >&5
2102 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2103   echo $ac_n "(cached) $ac_c" 1>&6
2104 else
2105   cat > conftest.$ac_ext <<EOF
2106 #line 2107 "configure"
2107 #include "confdefs.h"
2108 #include <sys/types.h>
2109 #include <$ac_hdr>
2110 int main() {
2111 DIR *dirp = 0;
2112 ; return 0; }
2113 EOF
2114 if { (eval echo configure:2115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2115   rm -rf conftest*
2116   eval "ac_cv_header_dirent_$ac_safe=yes"
2117 else
2118   echo "configure: failed program was:" >&5
2119   cat conftest.$ac_ext >&5
2120   rm -rf conftest*
2121   eval "ac_cv_header_dirent_$ac_safe=no"
2122 fi
2123 rm -f conftest*
2124 fi
2125 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2126   echo "$ac_t""yes" 1>&6
2127     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2128   cat >> confdefs.h <<EOF
2129 #define $ac_tr_hdr 1
2130 EOF
2131  ac_header_dirent=$ac_hdr; break
2132 else
2133   echo "$ac_t""no" 1>&6
2134 fi
2135 done
2136 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2137 if test $ac_header_dirent = dirent.h; then
2138 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2139 echo "configure:2140: checking for opendir in -ldir" >&5
2140 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2141 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2142   echo $ac_n "(cached) $ac_c" 1>&6
2143 else
2144   ac_save_LIBS="$LIBS"
2145 LIBS="-ldir  $LIBS"
2146 cat > conftest.$ac_ext <<EOF
2147 #line 2148 "configure"
2148 #include "confdefs.h"
2149 /* Override any gcc2 internal prototype to avoid an error.  */
2150 /* We use char because int might match the return type of a gcc2
2151     builtin and then its argument prototype would still apply.  */
2152 char opendir();
2153
2154 int main() {
2155 opendir()
2156 ; return 0; }
2157 EOF
2158 if { (eval echo configure:2159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2159   rm -rf conftest*
2160   eval "ac_cv_lib_$ac_lib_var=yes"
2161 else
2162   echo "configure: failed program was:" >&5
2163   cat conftest.$ac_ext >&5
2164   rm -rf conftest*
2165   eval "ac_cv_lib_$ac_lib_var=no"
2166 fi
2167 rm -f conftest*
2168 LIBS="$ac_save_LIBS"
2169
2170 fi
2171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2172   echo "$ac_t""yes" 1>&6
2173   LIBS="$LIBS -ldir"
2174 else
2175   echo "$ac_t""no" 1>&6
2176 fi
2177
2178 else
2179 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2180 echo "configure:2181: checking for opendir in -lx" >&5
2181 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2182 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2183   echo $ac_n "(cached) $ac_c" 1>&6
2184 else
2185   ac_save_LIBS="$LIBS"
2186 LIBS="-lx  $LIBS"
2187 cat > conftest.$ac_ext <<EOF
2188 #line 2189 "configure"
2189 #include "confdefs.h"
2190 /* Override any gcc2 internal prototype to avoid an error.  */
2191 /* We use char because int might match the return type of a gcc2
2192     builtin and then its argument prototype would still apply.  */
2193 char opendir();
2194
2195 int main() {
2196 opendir()
2197 ; return 0; }
2198 EOF
2199 if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2200   rm -rf conftest*
2201   eval "ac_cv_lib_$ac_lib_var=yes"
2202 else
2203   echo "configure: failed program was:" >&5
2204   cat conftest.$ac_ext >&5
2205   rm -rf conftest*
2206   eval "ac_cv_lib_$ac_lib_var=no"
2207 fi
2208 rm -f conftest*
2209 LIBS="$ac_save_LIBS"
2210
2211 fi
2212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2213   echo "$ac_t""yes" 1>&6
2214   LIBS="$LIBS -lx"
2215 else
2216   echo "$ac_t""no" 1>&6
2217 fi
2218
2219 fi
2220
2221 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2222 echo "configure:2223: checking whether time.h and sys/time.h may both be included" >&5
2223 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2224   echo $ac_n "(cached) $ac_c" 1>&6
2225 else
2226   cat > conftest.$ac_ext <<EOF
2227 #line 2228 "configure"
2228 #include "confdefs.h"
2229 #include <sys/types.h>
2230 #include <sys/time.h>
2231 #include <time.h>
2232 int main() {
2233 struct tm *tp;
2234 ; return 0; }
2235 EOF
2236 if { (eval echo configure:2237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2237   rm -rf conftest*
2238   ac_cv_header_time=yes
2239 else
2240   echo "configure: failed program was:" >&5
2241   cat conftest.$ac_ext >&5
2242   rm -rf conftest*
2243   ac_cv_header_time=no
2244 fi
2245 rm -f conftest*
2246 fi
2247
2248 echo "$ac_t""$ac_cv_header_time" 1>&6
2249 if test $ac_cv_header_time = yes; then
2250   cat >> confdefs.h <<\EOF
2251 #define TIME_WITH_SYS_TIME 1
2252 EOF
2253
2254 fi
2255
2256 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2257 echo "configure:2258: checking for sys/wait.h that is POSIX.1 compatible" >&5
2258 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2259   echo $ac_n "(cached) $ac_c" 1>&6
2260 else
2261   cat > conftest.$ac_ext <<EOF
2262 #line 2263 "configure"
2263 #include "confdefs.h"
2264 #include <sys/types.h>
2265 #include <sys/wait.h>
2266 #ifndef WEXITSTATUS
2267 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2268 #endif
2269 #ifndef WIFEXITED
2270 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2271 #endif
2272 int main() {
2273 int s;
2274 wait (&s);
2275 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2276 ; return 0; }
2277 EOF
2278 if { (eval echo configure:2279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2279   rm -rf conftest*
2280   ac_cv_header_sys_wait_h=yes
2281 else
2282   echo "configure: failed program was:" >&5
2283   cat conftest.$ac_ext >&5
2284   rm -rf conftest*
2285   ac_cv_header_sys_wait_h=no
2286 fi
2287 rm -f conftest*
2288 fi
2289
2290 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2291 if test $ac_cv_header_sys_wait_h = yes; then
2292   cat >> confdefs.h <<\EOF
2293 #define HAVE_SYS_WAIT_H 1
2294 EOF
2295
2296 fi
2297
2298 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2299 do
2300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2302 echo "configure:2303: checking for $ac_hdr" >&5
2303 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2304   echo $ac_n "(cached) $ac_c" 1>&6
2305 else
2306   cat > conftest.$ac_ext <<EOF
2307 #line 2308 "configure"
2308 #include "confdefs.h"
2309 #include <$ac_hdr>
2310 EOF
2311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2312 { (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2314 if test -z "$ac_err"; then
2315   rm -rf conftest*
2316   eval "ac_cv_header_$ac_safe=yes"
2317 else
2318   echo "$ac_err" >&5
2319   echo "configure: failed program was:" >&5
2320   cat conftest.$ac_ext >&5
2321   rm -rf conftest*
2322   eval "ac_cv_header_$ac_safe=no"
2323 fi
2324 rm -f conftest*
2325 fi
2326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2327   echo "$ac_t""yes" 1>&6
2328     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2329   cat >> confdefs.h <<EOF
2330 #define $ac_tr_hdr 1
2331 EOF
2332  
2333 else
2334   echo "$ac_t""no" 1>&6
2335 fi
2336 done
2337
2338 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2339 do
2340 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2341 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2342 echo "configure:2343: checking for $ac_hdr" >&5
2343 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2344   echo $ac_n "(cached) $ac_c" 1>&6
2345 else
2346   cat > conftest.$ac_ext <<EOF
2347 #line 2348 "configure"
2348 #include "confdefs.h"
2349 #include <$ac_hdr>
2350 EOF
2351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2352 { (eval echo configure:2353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2354 if test -z "$ac_err"; then
2355   rm -rf conftest*
2356   eval "ac_cv_header_$ac_safe=yes"
2357 else
2358   echo "$ac_err" >&5
2359   echo "configure: failed program was:" >&5
2360   cat conftest.$ac_ext >&5
2361   rm -rf conftest*
2362   eval "ac_cv_header_$ac_safe=no"
2363 fi
2364 rm -f conftest*
2365 fi
2366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2367   echo "$ac_t""yes" 1>&6
2368     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2369   cat >> confdefs.h <<EOF
2370 #define $ac_tr_hdr 1
2371 EOF
2372  
2373 else
2374   echo "$ac_t""no" 1>&6
2375 fi
2376 done
2377
2378 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2379 do
2380 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2381 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2382 echo "configure:2383: checking for $ac_hdr" >&5
2383 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2384   echo $ac_n "(cached) $ac_c" 1>&6
2385 else
2386   cat > conftest.$ac_ext <<EOF
2387 #line 2388 "configure"
2388 #include "confdefs.h"
2389 #include <$ac_hdr>
2390 EOF
2391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2392 { (eval echo configure:2393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2394 if test -z "$ac_err"; then
2395   rm -rf conftest*
2396   eval "ac_cv_header_$ac_safe=yes"
2397 else
2398   echo "$ac_err" >&5
2399   echo "configure: failed program was:" >&5
2400   cat conftest.$ac_ext >&5
2401   rm -rf conftest*
2402   eval "ac_cv_header_$ac_safe=no"
2403 fi
2404 rm -f conftest*
2405 fi
2406 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2407   echo "$ac_t""yes" 1>&6
2408     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2409   cat >> confdefs.h <<EOF
2410 #define $ac_tr_hdr 1
2411 EOF
2412  
2413 else
2414   echo "$ac_t""no" 1>&6
2415 fi
2416 done
2417
2418 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2419 do
2420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2422 echo "configure:2423: checking for $ac_hdr" >&5
2423 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2424   echo $ac_n "(cached) $ac_c" 1>&6
2425 else
2426   cat > conftest.$ac_ext <<EOF
2427 #line 2428 "configure"
2428 #include "confdefs.h"
2429 #include <$ac_hdr>
2430 EOF
2431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2432 { (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2434 if test -z "$ac_err"; then
2435   rm -rf conftest*
2436   eval "ac_cv_header_$ac_safe=yes"
2437 else
2438   echo "$ac_err" >&5
2439   echo "configure: failed program was:" >&5
2440   cat conftest.$ac_ext >&5
2441   rm -rf conftest*
2442   eval "ac_cv_header_$ac_safe=no"
2443 fi
2444 rm -f conftest*
2445 fi
2446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2447   echo "$ac_t""yes" 1>&6
2448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2449   cat >> confdefs.h <<EOF
2450 #define $ac_tr_hdr 1
2451 EOF
2452  
2453 else
2454   echo "$ac_t""no" 1>&6
2455 fi
2456 done
2457
2458 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
2459 do
2460 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2461 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2462 echo "configure:2463: checking for $ac_hdr" >&5
2463 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2464   echo $ac_n "(cached) $ac_c" 1>&6
2465 else
2466   cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 #include <$ac_hdr>
2470 EOF
2471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2472 { (eval echo configure:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2474 if test -z "$ac_err"; then
2475   rm -rf conftest*
2476   eval "ac_cv_header_$ac_safe=yes"
2477 else
2478   echo "$ac_err" >&5
2479   echo "configure: failed program was:" >&5
2480   cat conftest.$ac_ext >&5
2481   rm -rf conftest*
2482   eval "ac_cv_header_$ac_safe=no"
2483 fi
2484 rm -f conftest*
2485 fi
2486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2487   echo "$ac_t""yes" 1>&6
2488     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2489   cat >> confdefs.h <<EOF
2490 #define $ac_tr_hdr 1
2491 EOF
2492  
2493 else
2494   echo "$ac_t""no" 1>&6
2495 fi
2496 done
2497
2498 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2499 do
2500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2502 echo "configure:2503: checking for $ac_hdr" >&5
2503 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2504   echo $ac_n "(cached) $ac_c" 1>&6
2505 else
2506   cat > conftest.$ac_ext <<EOF
2507 #line 2508 "configure"
2508 #include "confdefs.h"
2509 #include <$ac_hdr>
2510 EOF
2511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2512 { (eval echo configure:2513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2514 if test -z "$ac_err"; then
2515   rm -rf conftest*
2516   eval "ac_cv_header_$ac_safe=yes"
2517 else
2518   echo "$ac_err" >&5
2519   echo "configure: failed program was:" >&5
2520   cat conftest.$ac_ext >&5
2521   rm -rf conftest*
2522   eval "ac_cv_header_$ac_safe=no"
2523 fi
2524 rm -f conftest*
2525 fi
2526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2527   echo "$ac_t""yes" 1>&6
2528     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2529   cat >> confdefs.h <<EOF
2530 #define $ac_tr_hdr 1
2531 EOF
2532  
2533 else
2534   echo "$ac_t""no" 1>&6
2535 fi
2536 done
2537
2538 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2539 do
2540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2542 echo "configure:2543: checking for $ac_hdr" >&5
2543 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2544   echo $ac_n "(cached) $ac_c" 1>&6
2545 else
2546   cat > conftest.$ac_ext <<EOF
2547 #line 2548 "configure"
2548 #include "confdefs.h"
2549 #include <$ac_hdr>
2550 EOF
2551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2552 { (eval echo configure:2553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2554 if test -z "$ac_err"; then
2555   rm -rf conftest*
2556   eval "ac_cv_header_$ac_safe=yes"
2557 else
2558   echo "$ac_err" >&5
2559   echo "configure: failed program was:" >&5
2560   cat conftest.$ac_ext >&5
2561   rm -rf conftest*
2562   eval "ac_cv_header_$ac_safe=no"
2563 fi
2564 rm -f conftest*
2565 fi
2566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2567   echo "$ac_t""yes" 1>&6
2568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2569   cat >> confdefs.h <<EOF
2570 #define $ac_tr_hdr 1
2571 EOF
2572  
2573 else
2574   echo "$ac_t""no" 1>&6
2575 fi
2576 done
2577
2578 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2579 do
2580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2582 echo "configure:2583: checking for $ac_hdr" >&5
2583 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2584   echo $ac_n "(cached) $ac_c" 1>&6
2585 else
2586   cat > conftest.$ac_ext <<EOF
2587 #line 2588 "configure"
2588 #include "confdefs.h"
2589 #include <$ac_hdr>
2590 EOF
2591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2592 { (eval echo configure:2593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2594 if test -z "$ac_err"; then
2595   rm -rf conftest*
2596   eval "ac_cv_header_$ac_safe=yes"
2597 else
2598   echo "$ac_err" >&5
2599   echo "configure: failed program was:" >&5
2600   cat conftest.$ac_ext >&5
2601   rm -rf conftest*
2602   eval "ac_cv_header_$ac_safe=no"
2603 fi
2604 rm -f conftest*
2605 fi
2606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2607   echo "$ac_t""yes" 1>&6
2608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2609   cat >> confdefs.h <<EOF
2610 #define $ac_tr_hdr 1
2611 EOF
2612  
2613 else
2614   echo "$ac_t""no" 1>&6
2615 fi
2616 done
2617
2618 for ac_hdr in sys/syslog.h syslog.h
2619 do
2620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2622 echo "configure:2623: checking for $ac_hdr" >&5
2623 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2624   echo $ac_n "(cached) $ac_c" 1>&6
2625 else
2626   cat > conftest.$ac_ext <<EOF
2627 #line 2628 "configure"
2628 #include "confdefs.h"
2629 #include <$ac_hdr>
2630 EOF
2631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2632 { (eval echo configure:2633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2634 if test -z "$ac_err"; then
2635   rm -rf conftest*
2636   eval "ac_cv_header_$ac_safe=yes"
2637 else
2638   echo "$ac_err" >&5
2639   echo "configure: failed program was:" >&5
2640   cat conftest.$ac_ext >&5
2641   rm -rf conftest*
2642   eval "ac_cv_header_$ac_safe=no"
2643 fi
2644 rm -f conftest*
2645 fi
2646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2647   echo "$ac_t""yes" 1>&6
2648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2649   cat >> confdefs.h <<EOF
2650 #define $ac_tr_hdr 1
2651 EOF
2652  
2653 else
2654   echo "$ac_t""no" 1>&6
2655 fi
2656 done
2657
2658
2659 #
2660 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2661 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2662 #
2663 case "$host_os" in
2664     *hpux*)
2665                 cat > conftest.$ac_ext <<EOF
2666 #line 2667 "configure"
2667 #include "confdefs.h"
2668 #include <shadow.h>
2669 int main() {
2670 struct spwd testme
2671 ; return 0; }
2672 EOF
2673 if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2674   rm -rf conftest*
2675   ac_cv_header_shadow_h=yes
2676 else
2677   echo "configure: failed program was:" >&5
2678   cat conftest.$ac_ext >&5
2679   rm -rf conftest*
2680   ac_cv_header_shadow_h=no
2681 fi
2682 rm -f conftest*
2683                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2684                    cat >> confdefs.h <<\EOF
2685 #define HAVE_SHADOW_H 1
2686 EOF
2687
2688                 fi
2689         ;;
2690 esac
2691 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2692 do
2693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2695 echo "configure:2696: checking for $ac_hdr" >&5
2696 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2697   echo $ac_n "(cached) $ac_c" 1>&6
2698 else
2699   cat > conftest.$ac_ext <<EOF
2700 #line 2701 "configure"
2701 #include "confdefs.h"
2702 #include <$ac_hdr>
2703 EOF
2704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2705 { (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2707 if test -z "$ac_err"; then
2708   rm -rf conftest*
2709   eval "ac_cv_header_$ac_safe=yes"
2710 else
2711   echo "$ac_err" >&5
2712   echo "configure: failed program was:" >&5
2713   cat conftest.$ac_ext >&5
2714   rm -rf conftest*
2715   eval "ac_cv_header_$ac_safe=no"
2716 fi
2717 rm -f conftest*
2718 fi
2719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2720   echo "$ac_t""yes" 1>&6
2721     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2722   cat >> confdefs.h <<EOF
2723 #define $ac_tr_hdr 1
2724 EOF
2725  
2726 else
2727   echo "$ac_t""no" 1>&6
2728 fi
2729 done
2730
2731 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2732 do
2733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2735 echo "configure:2736: checking for $ac_hdr" >&5
2736 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2737   echo $ac_n "(cached) $ac_c" 1>&6
2738 else
2739   cat > conftest.$ac_ext <<EOF
2740 #line 2741 "configure"
2741 #include "confdefs.h"
2742 #include <$ac_hdr>
2743 EOF
2744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2745 { (eval echo configure:2746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2747 if test -z "$ac_err"; then
2748   rm -rf conftest*
2749   eval "ac_cv_header_$ac_safe=yes"
2750 else
2751   echo "$ac_err" >&5
2752   echo "configure: failed program was:" >&5
2753   cat conftest.$ac_ext >&5
2754   rm -rf conftest*
2755   eval "ac_cv_header_$ac_safe=no"
2756 fi
2757 rm -f conftest*
2758 fi
2759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2760   echo "$ac_t""yes" 1>&6
2761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2762   cat >> confdefs.h <<EOF
2763 #define $ac_tr_hdr 1
2764 EOF
2765  
2766 else
2767   echo "$ac_t""no" 1>&6
2768 fi
2769 done
2770
2771 for ac_hdr in stropts.h poll.h
2772 do
2773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2775 echo "configure:2776: checking for $ac_hdr" >&5
2776 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   cat > conftest.$ac_ext <<EOF
2780 #line 2781 "configure"
2781 #include "confdefs.h"
2782 #include <$ac_hdr>
2783 EOF
2784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2785 { (eval echo configure:2786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2787 if test -z "$ac_err"; then
2788   rm -rf conftest*
2789   eval "ac_cv_header_$ac_safe=yes"
2790 else
2791   echo "$ac_err" >&5
2792   echo "configure: failed program was:" >&5
2793   cat conftest.$ac_ext >&5
2794   rm -rf conftest*
2795   eval "ac_cv_header_$ac_safe=no"
2796 fi
2797 rm -f conftest*
2798 fi
2799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2800   echo "$ac_t""yes" 1>&6
2801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2802   cat >> confdefs.h <<EOF
2803 #define $ac_tr_hdr 1
2804 EOF
2805  
2806 else
2807   echo "$ac_t""no" 1>&6
2808 fi
2809 done
2810
2811 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2812 do
2813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2815 echo "configure:2816: checking for $ac_hdr" >&5
2816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2817   echo $ac_n "(cached) $ac_c" 1>&6
2818 else
2819   cat > conftest.$ac_ext <<EOF
2820 #line 2821 "configure"
2821 #include "confdefs.h"
2822 #include <$ac_hdr>
2823 EOF
2824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2825 { (eval echo configure:2826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2827 if test -z "$ac_err"; then
2828   rm -rf conftest*
2829   eval "ac_cv_header_$ac_safe=yes"
2830 else
2831   echo "$ac_err" >&5
2832   echo "configure: failed program was:" >&5
2833   cat conftest.$ac_ext >&5
2834   rm -rf conftest*
2835   eval "ac_cv_header_$ac_safe=no"
2836 fi
2837 rm -f conftest*
2838 fi
2839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2840   echo "$ac_t""yes" 1>&6
2841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2842   cat >> confdefs.h <<EOF
2843 #define $ac_tr_hdr 1
2844 EOF
2845  
2846 else
2847   echo "$ac_t""no" 1>&6
2848 fi
2849 done
2850
2851 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2852 do
2853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2855 echo "configure:2856: checking for $ac_hdr" >&5
2856 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2857   echo $ac_n "(cached) $ac_c" 1>&6
2858 else
2859   cat > conftest.$ac_ext <<EOF
2860 #line 2861 "configure"
2861 #include "confdefs.h"
2862 #include <$ac_hdr>
2863 EOF
2864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2865 { (eval echo configure:2866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2867 if test -z "$ac_err"; then
2868   rm -rf conftest*
2869   eval "ac_cv_header_$ac_safe=yes"
2870 else
2871   echo "$ac_err" >&5
2872   echo "configure: failed program was:" >&5
2873   cat conftest.$ac_ext >&5
2874   rm -rf conftest*
2875   eval "ac_cv_header_$ac_safe=no"
2876 fi
2877 rm -f conftest*
2878 fi
2879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2880   echo "$ac_t""yes" 1>&6
2881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2882   cat >> confdefs.h <<EOF
2883 #define $ac_tr_hdr 1
2884 EOF
2885  
2886 else
2887   echo "$ac_t""no" 1>&6
2888 fi
2889 done
2890
2891
2892 # For experimental utmp support (lastlog on some BSD-like systems)
2893 for ac_hdr in utmp.h utmpx.h lastlog.h
2894 do
2895 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2896 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2897 echo "configure:2898: checking for $ac_hdr" >&5
2898 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2899   echo $ac_n "(cached) $ac_c" 1>&6
2900 else
2901   cat > conftest.$ac_ext <<EOF
2902 #line 2903 "configure"
2903 #include "confdefs.h"
2904 #include <$ac_hdr>
2905 EOF
2906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2907 { (eval echo configure:2908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2909 if test -z "$ac_err"; then
2910   rm -rf conftest*
2911   eval "ac_cv_header_$ac_safe=yes"
2912 else
2913   echo "$ac_err" >&5
2914   echo "configure: failed program was:" >&5
2915   cat conftest.$ac_ext >&5
2916   rm -rf conftest*
2917   eval "ac_cv_header_$ac_safe=no"
2918 fi
2919 rm -f conftest*
2920 fi
2921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2922   echo "$ac_t""yes" 1>&6
2923     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2924   cat >> confdefs.h <<EOF
2925 #define $ac_tr_hdr 1
2926 EOF
2927  
2928 else
2929   echo "$ac_t""no" 1>&6
2930 fi
2931 done
2932
2933  
2934 # For quotas on Veritas VxFS filesystems
2935 for ac_hdr in sys/fs/vx_quota.h
2936 do
2937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2939 echo "configure:2940: checking for $ac_hdr" >&5
2940 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2941   echo $ac_n "(cached) $ac_c" 1>&6
2942 else
2943   cat > conftest.$ac_ext <<EOF
2944 #line 2945 "configure"
2945 #include "confdefs.h"
2946 #include <$ac_hdr>
2947 EOF
2948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2949 { (eval echo configure:2950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2951 if test -z "$ac_err"; then
2952   rm -rf conftest*
2953   eval "ac_cv_header_$ac_safe=yes"
2954 else
2955   echo "$ac_err" >&5
2956   echo "configure: failed program was:" >&5
2957   cat conftest.$ac_ext >&5
2958   rm -rf conftest*
2959   eval "ac_cv_header_$ac_safe=no"
2960 fi
2961 rm -f conftest*
2962 fi
2963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2964   echo "$ac_t""yes" 1>&6
2965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2966   cat >> confdefs.h <<EOF
2967 #define $ac_tr_hdr 1
2968 EOF
2969  
2970 else
2971   echo "$ac_t""no" 1>&6
2972 fi
2973 done
2974
2975
2976 # For quotas on Linux XFS filesystems
2977 for ac_hdr in linux/xqm.h
2978 do
2979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2980 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2981 echo "configure:2982: checking for $ac_hdr" >&5
2982 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   cat > conftest.$ac_ext <<EOF
2986 #line 2987 "configure"
2987 #include "confdefs.h"
2988 #include <$ac_hdr>
2989 EOF
2990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2991 { (eval echo configure:2992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2993 if test -z "$ac_err"; then
2994   rm -rf conftest*
2995   eval "ac_cv_header_$ac_safe=yes"
2996 else
2997   echo "$ac_err" >&5
2998   echo "configure: failed program was:" >&5
2999   cat conftest.$ac_ext >&5
3000   rm -rf conftest*
3001   eval "ac_cv_header_$ac_safe=no"
3002 fi
3003 rm -f conftest*
3004 fi
3005 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3006   echo "$ac_t""yes" 1>&6
3007     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3008   cat >> confdefs.h <<EOF
3009 #define $ac_tr_hdr 1
3010 EOF
3011  
3012 else
3013   echo "$ac_t""no" 1>&6
3014 fi
3015 done
3016
3017 for ac_hdr in xfs/xqm.h
3018 do
3019 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3020 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3021 echo "configure:3022: checking for $ac_hdr" >&5
3022 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3023   echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025   cat > conftest.$ac_ext <<EOF
3026 #line 3027 "configure"
3027 #include "confdefs.h"
3028 #include <$ac_hdr>
3029 EOF
3030 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3031 { (eval echo configure:3032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3032 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3033 if test -z "$ac_err"; then
3034   rm -rf conftest*
3035   eval "ac_cv_header_$ac_safe=yes"
3036 else
3037   echo "$ac_err" >&5
3038   echo "configure: failed program was:" >&5
3039   cat conftest.$ac_ext >&5
3040   rm -rf conftest*
3041   eval "ac_cv_header_$ac_safe=no"
3042 fi
3043 rm -f conftest*
3044 fi
3045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3046   echo "$ac_t""yes" 1>&6
3047     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3048   cat >> confdefs.h <<EOF
3049 #define $ac_tr_hdr 1
3050 EOF
3051  
3052 else
3053   echo "$ac_t""no" 1>&6
3054 fi
3055 done
3056
3057
3058 echo $ac_n "checking size of int""... $ac_c" 1>&6
3059 echo "configure:3060: checking size of int" >&5
3060 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   if test "$cross_compiling" = yes; then
3064   ac_cv_sizeof_int=cross
3065 else
3066   cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069 #include <stdio.h>
3070 int main()
3071 {
3072   FILE *f=fopen("conftestval", "w");
3073   if (!f) return(1);
3074   fprintf(f, "%d\n", sizeof(int));
3075   return(0);
3076 }
3077 EOF
3078 if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3079 then
3080   ac_cv_sizeof_int=`cat conftestval`
3081 else
3082   echo "configure: failed program was:" >&5
3083   cat conftest.$ac_ext >&5
3084   rm -fr conftest*
3085   ac_cv_sizeof_int=0
3086 fi
3087 rm -fr conftest*
3088 fi
3089
3090 fi
3091 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3092 cat >> confdefs.h <<EOF
3093 #define SIZEOF_INT $ac_cv_sizeof_int
3094 EOF
3095
3096
3097 echo $ac_n "checking size of long""... $ac_c" 1>&6
3098 echo "configure:3099: checking size of long" >&5
3099 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3100   echo $ac_n "(cached) $ac_c" 1>&6
3101 else
3102   if test "$cross_compiling" = yes; then
3103   ac_cv_sizeof_long=cross
3104 else
3105   cat > conftest.$ac_ext <<EOF
3106 #line 3107 "configure"
3107 #include "confdefs.h"
3108 #include <stdio.h>
3109 int main()
3110 {
3111   FILE *f=fopen("conftestval", "w");
3112   if (!f) return(1);
3113   fprintf(f, "%d\n", sizeof(long));
3114   return(0);
3115 }
3116 EOF
3117 if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3118 then
3119   ac_cv_sizeof_long=`cat conftestval`
3120 else
3121   echo "configure: failed program was:" >&5
3122   cat conftest.$ac_ext >&5
3123   rm -fr conftest*
3124   ac_cv_sizeof_long=0
3125 fi
3126 rm -fr conftest*
3127 fi
3128
3129 fi
3130 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3131 cat >> confdefs.h <<EOF
3132 #define SIZEOF_LONG $ac_cv_sizeof_long
3133 EOF
3134
3135
3136 echo $ac_n "checking size of short""... $ac_c" 1>&6
3137 echo "configure:3138: checking size of short" >&5
3138 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3139   echo $ac_n "(cached) $ac_c" 1>&6
3140 else
3141   if test "$cross_compiling" = yes; then
3142   ac_cv_sizeof_short=cross
3143 else
3144   cat > conftest.$ac_ext <<EOF
3145 #line 3146 "configure"
3146 #include "confdefs.h"
3147 #include <stdio.h>
3148 int main()
3149 {
3150   FILE *f=fopen("conftestval", "w");
3151   if (!f) return(1);
3152   fprintf(f, "%d\n", sizeof(short));
3153   return(0);
3154 }
3155 EOF
3156 if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3157 then
3158   ac_cv_sizeof_short=`cat conftestval`
3159 else
3160   echo "configure: failed program was:" >&5
3161   cat conftest.$ac_ext >&5
3162   rm -fr conftest*
3163   ac_cv_sizeof_short=0
3164 fi
3165 rm -fr conftest*
3166 fi
3167
3168 fi
3169 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3170 cat >> confdefs.h <<EOF
3171 #define SIZEOF_SHORT $ac_cv_sizeof_short
3172 EOF
3173
3174
3175
3176 echo $ac_n "checking for working const""... $ac_c" 1>&6
3177 echo "configure:3178: checking for working const" >&5
3178 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3179   echo $ac_n "(cached) $ac_c" 1>&6
3180 else
3181   cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184
3185 int main() {
3186
3187 /* Ultrix mips cc rejects this.  */
3188 typedef int charset[2]; const charset x;
3189 /* SunOS 4.1.1 cc rejects this.  */
3190 char const *const *ccp;
3191 char **p;
3192 /* NEC SVR4.0.2 mips cc rejects this.  */
3193 struct point {int x, y;};
3194 static struct point const zero = {0,0};
3195 /* AIX XL C 1.02.0.0 rejects this.
3196    It does not let you subtract one const X* pointer from another in an arm
3197    of an if-expression whose if-part is not a constant expression */
3198 const char *g = "string";
3199 ccp = &g + (g ? g-g : 0);
3200 /* HPUX 7.0 cc rejects these. */
3201 ++ccp;
3202 p = (char**) ccp;
3203 ccp = (char const *const *) p;
3204 { /* SCO 3.2v4 cc rejects this.  */
3205   char *t;
3206   char const *s = 0 ? (char *) 0 : (char const *) 0;
3207
3208   *t++ = 0;
3209 }
3210 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3211   int x[] = {25, 17};
3212   const int *foo = &x[0];
3213   ++foo;
3214 }
3215 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3216   typedef const int *iptr;
3217   iptr p = 0;
3218   ++p;
3219 }
3220 { /* AIX XL C 1.02.0.0 rejects this saying
3221      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3222   struct s { int j; const int *ap[3]; };
3223   struct s *b; b->j = 5;
3224 }
3225 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3226   const int foo = 10;
3227 }
3228
3229 ; return 0; }
3230 EOF
3231 if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3232   rm -rf conftest*
3233   ac_cv_c_const=yes
3234 else
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   rm -rf conftest*
3238   ac_cv_c_const=no
3239 fi
3240 rm -f conftest*
3241 fi
3242
3243 echo "$ac_t""$ac_cv_c_const" 1>&6
3244 if test $ac_cv_c_const = no; then
3245   cat >> confdefs.h <<\EOF
3246 #define const 
3247 EOF
3248
3249 fi
3250
3251 echo $ac_n "checking for inline""... $ac_c" 1>&6
3252 echo "configure:3253: checking for inline" >&5
3253 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3254   echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256   ac_cv_c_inline=no
3257 for ac_kw in inline __inline__ __inline; do
3258   cat > conftest.$ac_ext <<EOF
3259 #line 3260 "configure"
3260 #include "confdefs.h"
3261
3262 int main() {
3263 } $ac_kw foo() {
3264 ; return 0; }
3265 EOF
3266 if { (eval echo configure:3267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3267   rm -rf conftest*
3268   ac_cv_c_inline=$ac_kw; break
3269 else
3270   echo "configure: failed program was:" >&5
3271   cat conftest.$ac_ext >&5
3272 fi
3273 rm -f conftest*
3274 done
3275
3276 fi
3277
3278 echo "$ac_t""$ac_cv_c_inline" 1>&6
3279 case "$ac_cv_c_inline" in
3280   inline | yes) ;;
3281   no) cat >> confdefs.h <<\EOF
3282 #define inline 
3283 EOF
3284  ;;
3285   *)  cat >> confdefs.h <<EOF
3286 #define inline $ac_cv_c_inline
3287 EOF
3288  ;;
3289 esac
3290
3291 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3292 echo "configure:3293: checking whether byte ordering is bigendian" >&5
3293 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3294   echo $ac_n "(cached) $ac_c" 1>&6
3295 else
3296   ac_cv_c_bigendian=unknown
3297 # See if sys/param.h defines the BYTE_ORDER macro.
3298 cat > conftest.$ac_ext <<EOF
3299 #line 3300 "configure"
3300 #include "confdefs.h"
3301 #include <sys/types.h>
3302 #include <sys/param.h>
3303 int main() {
3304
3305 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3306  bogus endian macros
3307 #endif
3308 ; return 0; }
3309 EOF
3310 if { (eval echo configure:3311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3311   rm -rf conftest*
3312   # It does; now see whether it defined to BIG_ENDIAN or not.
3313 cat > conftest.$ac_ext <<EOF
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3316 #include <sys/types.h>
3317 #include <sys/param.h>
3318 int main() {
3319
3320 #if BYTE_ORDER != BIG_ENDIAN
3321  not big endian
3322 #endif
3323 ; return 0; }
3324 EOF
3325 if { (eval echo configure:3326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3326   rm -rf conftest*
3327   ac_cv_c_bigendian=yes
3328 else
3329   echo "configure: failed program was:" >&5
3330   cat conftest.$ac_ext >&5
3331   rm -rf conftest*
3332   ac_cv_c_bigendian=no
3333 fi
3334 rm -f conftest*
3335 else
3336   echo "configure: failed program was:" >&5
3337   cat conftest.$ac_ext >&5
3338 fi
3339 rm -f conftest*
3340 if test $ac_cv_c_bigendian = unknown; then
3341 if test "$cross_compiling" = yes; then
3342     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3343 else
3344   cat > conftest.$ac_ext <<EOF
3345 #line 3346 "configure"
3346 #include "confdefs.h"
3347 main () {
3348   /* Are we little or big endian?  From Harbison&Steele.  */
3349   union
3350   {
3351     long l;
3352     char c[sizeof (long)];
3353   } u;
3354   u.l = 1;
3355   exit (u.c[sizeof (long) - 1] == 1);
3356 }
3357 EOF
3358 if { (eval echo configure:3359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3359 then
3360   ac_cv_c_bigendian=no
3361 else
3362   echo "configure: failed program was:" >&5
3363   cat conftest.$ac_ext >&5
3364   rm -fr conftest*
3365   ac_cv_c_bigendian=yes
3366 fi
3367 rm -fr conftest*
3368 fi
3369
3370 fi
3371 fi
3372
3373 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3374 if test $ac_cv_c_bigendian = yes; then
3375   cat >> confdefs.h <<\EOF
3376 #define WORDS_BIGENDIAN 1
3377 EOF
3378
3379 fi
3380
3381 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3382 echo "configure:3383: checking whether char is unsigned" >&5
3383 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3384   echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386   if test "$GCC" = yes; then
3387   # GCC predefines this symbol on systems where it applies.
3388 cat > conftest.$ac_ext <<EOF
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391 #ifdef __CHAR_UNSIGNED__
3392   yes
3393 #endif
3394
3395 EOF
3396 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3397   egrep "yes" >/dev/null 2>&1; then
3398   rm -rf conftest*
3399   ac_cv_c_char_unsigned=yes
3400 else
3401   rm -rf conftest*
3402   ac_cv_c_char_unsigned=no
3403 fi
3404 rm -f conftest*
3405
3406 else
3407 if test "$cross_compiling" = yes; then
3408     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3414 #if !defined(__STDC__) || __STDC__ != 1
3415 #define volatile
3416 #endif
3417 main() {
3418   volatile char c = 255; exit(c < 0);
3419 }
3420 EOF
3421 if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3422 then
3423   ac_cv_c_char_unsigned=yes
3424 else
3425   echo "configure: failed program was:" >&5
3426   cat conftest.$ac_ext >&5
3427   rm -fr conftest*
3428   ac_cv_c_char_unsigned=no
3429 fi
3430 rm -fr conftest*
3431 fi
3432
3433 fi
3434 fi
3435
3436 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3437 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3438   cat >> confdefs.h <<\EOF
3439 #define __CHAR_UNSIGNED__ 1
3440 EOF
3441
3442 fi
3443
3444
3445 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3446 echo "configure:3447: checking return type of signal handlers" >&5
3447 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   cat > conftest.$ac_ext <<EOF
3451 #line 3452 "configure"
3452 #include "confdefs.h"
3453 #include <sys/types.h>
3454 #include <signal.h>
3455 #ifdef signal
3456 #undef signal
3457 #endif
3458 #ifdef __cplusplus
3459 extern "C" void (*signal (int, void (*)(int)))(int);
3460 #else
3461 void (*signal ()) ();
3462 #endif
3463
3464 int main() {
3465 int i;
3466 ; return 0; }
3467 EOF
3468 if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3469   rm -rf conftest*
3470   ac_cv_type_signal=void
3471 else
3472   echo "configure: failed program was:" >&5
3473   cat conftest.$ac_ext >&5
3474   rm -rf conftest*
3475   ac_cv_type_signal=int
3476 fi
3477 rm -f conftest*
3478 fi
3479
3480 echo "$ac_t""$ac_cv_type_signal" 1>&6
3481 cat >> confdefs.h <<EOF
3482 #define RETSIGTYPE $ac_cv_type_signal
3483 EOF
3484
3485
3486 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3487 echo "configure:3488: checking for uid_t in sys/types.h" >&5
3488 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   cat > conftest.$ac_ext <<EOF
3492 #line 3493 "configure"
3493 #include "confdefs.h"
3494 #include <sys/types.h>
3495 EOF
3496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3497   egrep "uid_t" >/dev/null 2>&1; then
3498   rm -rf conftest*
3499   ac_cv_type_uid_t=yes
3500 else
3501   rm -rf conftest*
3502   ac_cv_type_uid_t=no
3503 fi
3504 rm -f conftest*
3505
3506 fi
3507
3508 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3509 if test $ac_cv_type_uid_t = no; then
3510   cat >> confdefs.h <<\EOF
3511 #define uid_t int
3512 EOF
3513
3514   cat >> confdefs.h <<\EOF
3515 #define gid_t int
3516 EOF
3517
3518 fi
3519
3520 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3521 echo "configure:3522: checking for mode_t" >&5
3522 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3523   echo $ac_n "(cached) $ac_c" 1>&6
3524 else
3525   cat > conftest.$ac_ext <<EOF
3526 #line 3527 "configure"
3527 #include "confdefs.h"
3528 #include <sys/types.h>
3529 #if STDC_HEADERS
3530 #include <stdlib.h>
3531 #include <stddef.h>
3532 #endif
3533 EOF
3534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3535   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3536   rm -rf conftest*
3537   ac_cv_type_mode_t=yes
3538 else
3539   rm -rf conftest*
3540   ac_cv_type_mode_t=no
3541 fi
3542 rm -f conftest*
3543
3544 fi
3545 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3546 if test $ac_cv_type_mode_t = no; then
3547   cat >> confdefs.h <<\EOF
3548 #define mode_t int
3549 EOF
3550
3551 fi
3552
3553 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3554 echo "configure:3555: checking for off_t" >&5
3555 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3556   echo $ac_n "(cached) $ac_c" 1>&6
3557 else
3558   cat > conftest.$ac_ext <<EOF
3559 #line 3560 "configure"
3560 #include "confdefs.h"
3561 #include <sys/types.h>
3562 #if STDC_HEADERS
3563 #include <stdlib.h>
3564 #include <stddef.h>
3565 #endif
3566 EOF
3567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3568   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3569   rm -rf conftest*
3570   ac_cv_type_off_t=yes
3571 else
3572   rm -rf conftest*
3573   ac_cv_type_off_t=no
3574 fi
3575 rm -f conftest*
3576
3577 fi
3578 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3579 if test $ac_cv_type_off_t = no; then
3580   cat >> confdefs.h <<\EOF
3581 #define off_t long
3582 EOF
3583
3584 fi
3585
3586 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3587 echo "configure:3588: checking for size_t" >&5
3588 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3589   echo $ac_n "(cached) $ac_c" 1>&6
3590 else
3591   cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594 #include <sys/types.h>
3595 #if STDC_HEADERS
3596 #include <stdlib.h>
3597 #include <stddef.h>
3598 #endif
3599 EOF
3600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3601   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3602   rm -rf conftest*
3603   ac_cv_type_size_t=yes
3604 else
3605   rm -rf conftest*
3606   ac_cv_type_size_t=no
3607 fi
3608 rm -f conftest*
3609
3610 fi
3611 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3612 if test $ac_cv_type_size_t = no; then
3613   cat >> confdefs.h <<\EOF
3614 #define size_t unsigned
3615 EOF
3616
3617 fi
3618
3619 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3620 echo "configure:3621: checking for pid_t" >&5
3621 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3622   echo $ac_n "(cached) $ac_c" 1>&6
3623 else
3624   cat > conftest.$ac_ext <<EOF
3625 #line 3626 "configure"
3626 #include "confdefs.h"
3627 #include <sys/types.h>
3628 #if STDC_HEADERS
3629 #include <stdlib.h>
3630 #include <stddef.h>
3631 #endif
3632 EOF
3633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3634   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3635   rm -rf conftest*
3636   ac_cv_type_pid_t=yes
3637 else
3638   rm -rf conftest*
3639   ac_cv_type_pid_t=no
3640 fi
3641 rm -f conftest*
3642
3643 fi
3644 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3645 if test $ac_cv_type_pid_t = no; then
3646   cat >> confdefs.h <<\EOF
3647 #define pid_t int
3648 EOF
3649
3650 fi
3651
3652 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3653 echo "configure:3654: checking for st_rdev in struct stat" >&5
3654 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   cat > conftest.$ac_ext <<EOF
3658 #line 3659 "configure"
3659 #include "confdefs.h"
3660 #include <sys/types.h>
3661 #include <sys/stat.h>
3662 int main() {
3663 struct stat s; s.st_rdev;
3664 ; return 0; }
3665 EOF
3666 if { (eval echo configure:3667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3667   rm -rf conftest*
3668   ac_cv_struct_st_rdev=yes
3669 else
3670   echo "configure: failed program was:" >&5
3671   cat conftest.$ac_ext >&5
3672   rm -rf conftest*
3673   ac_cv_struct_st_rdev=no
3674 fi
3675 rm -f conftest*
3676 fi
3677
3678 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3679 if test $ac_cv_struct_st_rdev = yes; then
3680   cat >> confdefs.h <<\EOF
3681 #define HAVE_ST_RDEV 1
3682 EOF
3683
3684 fi
3685
3686 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3687 echo "configure:3688: checking for d_off in dirent" >&5
3688 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3689   echo $ac_n "(cached) $ac_c" 1>&6
3690 else
3691   cat > conftest.$ac_ext <<EOF
3692 #line 3693 "configure"
3693 #include "confdefs.h"
3694
3695 #include <unistd.h>
3696 #include <sys/types.h>
3697 #include <dirent.h>
3698 int main() {
3699 struct dirent d; d.d_off;
3700 ; return 0; }
3701 EOF
3702 if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3703   rm -rf conftest*
3704   ac_cv_dirent_d_off=yes
3705 else
3706   echo "configure: failed program was:" >&5
3707   cat conftest.$ac_ext >&5
3708   rm -rf conftest*
3709   ac_cv_dirent_d_off=no
3710 fi
3711 rm -f conftest*
3712 fi
3713
3714 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3715 if test $ac_cv_dirent_d_off = yes; then
3716   cat >> confdefs.h <<\EOF
3717 #define HAVE_DIRENT_D_OFF 1
3718 EOF
3719
3720 fi
3721
3722 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3723 echo "configure:3724: checking for ino_t" >&5
3724 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3725   echo $ac_n "(cached) $ac_c" 1>&6
3726 else
3727   cat > conftest.$ac_ext <<EOF
3728 #line 3729 "configure"
3729 #include "confdefs.h"
3730 #include <sys/types.h>
3731 #if STDC_HEADERS
3732 #include <stdlib.h>
3733 #include <stddef.h>
3734 #endif
3735 EOF
3736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3737   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3738   rm -rf conftest*
3739   ac_cv_type_ino_t=yes
3740 else
3741   rm -rf conftest*
3742   ac_cv_type_ino_t=no
3743 fi
3744 rm -f conftest*
3745
3746 fi
3747 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3748 if test $ac_cv_type_ino_t = no; then
3749   cat >> confdefs.h <<\EOF
3750 #define ino_t unsigned
3751 EOF
3752
3753 fi
3754
3755 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3756 echo "configure:3757: checking for loff_t" >&5
3757 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   cat > conftest.$ac_ext <<EOF
3761 #line 3762 "configure"
3762 #include "confdefs.h"
3763 #include <sys/types.h>
3764 #if STDC_HEADERS
3765 #include <stdlib.h>
3766 #include <stddef.h>
3767 #endif
3768 EOF
3769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3770   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3771   rm -rf conftest*
3772   ac_cv_type_loff_t=yes
3773 else
3774   rm -rf conftest*
3775   ac_cv_type_loff_t=no
3776 fi
3777 rm -f conftest*
3778
3779 fi
3780 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3781 if test $ac_cv_type_loff_t = no; then
3782   cat >> confdefs.h <<\EOF
3783 #define loff_t off_t
3784 EOF
3785
3786 fi
3787
3788 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3789 echo "configure:3790: checking for offset_t" >&5
3790 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3791   echo $ac_n "(cached) $ac_c" 1>&6
3792 else
3793   cat > conftest.$ac_ext <<EOF
3794 #line 3795 "configure"
3795 #include "confdefs.h"
3796 #include <sys/types.h>
3797 #if STDC_HEADERS
3798 #include <stdlib.h>
3799 #include <stddef.h>
3800 #endif
3801 EOF
3802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3803   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3804   rm -rf conftest*
3805   ac_cv_type_offset_t=yes
3806 else
3807   rm -rf conftest*
3808   ac_cv_type_offset_t=no
3809 fi
3810 rm -f conftest*
3811
3812 fi
3813 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3814 if test $ac_cv_type_offset_t = no; then
3815   cat >> confdefs.h <<\EOF
3816 #define offset_t loff_t
3817 EOF
3818
3819 fi
3820
3821 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3822 echo "configure:3823: checking for ssize_t" >&5
3823 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3829 #include <sys/types.h>
3830 #if STDC_HEADERS
3831 #include <stdlib.h>
3832 #include <stddef.h>
3833 #endif
3834 EOF
3835 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3836   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3837   rm -rf conftest*
3838   ac_cv_type_ssize_t=yes
3839 else
3840   rm -rf conftest*
3841   ac_cv_type_ssize_t=no
3842 fi
3843 rm -f conftest*
3844
3845 fi
3846 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3847 if test $ac_cv_type_ssize_t = no; then
3848   cat >> confdefs.h <<\EOF
3849 #define ssize_t int
3850 EOF
3851
3852 fi
3853
3854 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3855 echo "configure:3856: checking for wchar_t" >&5
3856 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3857   echo $ac_n "(cached) $ac_c" 1>&6
3858 else
3859   cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862 #include <sys/types.h>
3863 #if STDC_HEADERS
3864 #include <stdlib.h>
3865 #include <stddef.h>
3866 #endif
3867 EOF
3868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3869   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3870   rm -rf conftest*
3871   ac_cv_type_wchar_t=yes
3872 else
3873   rm -rf conftest*
3874   ac_cv_type_wchar_t=no
3875 fi
3876 rm -f conftest*
3877
3878 fi
3879 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3880 if test $ac_cv_type_wchar_t = no; then
3881   cat >> confdefs.h <<\EOF
3882 #define wchar_t unsigned short
3883 EOF
3884
3885 fi
3886
3887
3888 ############################################
3889 # for cups support we need libcups, and a handful of header files
3890
3891 # Check whether --enable-cups or --disable-cups was given.
3892 if test "${enable_cups+set}" = set; then
3893   enableval="$enable_cups"
3894   :
3895 fi
3896
3897
3898 if test x$enable_cups != xno; then
3899         # Extract the first word of "cups-config", so it can be a program name with args.
3900 set dummy cups-config; ac_word=$2
3901 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3902 echo "configure:3903: checking for $ac_word" >&5
3903 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3904   echo $ac_n "(cached) $ac_c" 1>&6
3905 else
3906   case "$CUPS_CONFIG" in
3907   /*)
3908   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3909   ;;
3910   ?:/*)                  
3911   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3912   ;;
3913   *)
3914   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3915   ac_dummy="$PATH"
3916   for ac_dir in $ac_dummy; do 
3917     test -z "$ac_dir" && ac_dir=.
3918     if test -f $ac_dir/$ac_word; then
3919       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3920       break
3921     fi
3922   done
3923   IFS="$ac_save_ifs"
3924   ;;
3925 esac
3926 fi
3927 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3928 if test -n "$CUPS_CONFIG"; then
3929   echo "$ac_t""$CUPS_CONFIG" 1>&6
3930 else
3931   echo "$ac_t""no" 1>&6
3932 fi
3933
3934
3935         if test "x$CUPS_CONFIG" != x; then
3936                         cat >> confdefs.h <<\EOF
3937 #define HAVE_CUPS 1
3938 EOF
3939
3940                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3941                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3942                 PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
3943         fi
3944 fi
3945
3946 ############################################
3947 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code
3948
3949 echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6
3950 echo "configure:3951: checking for library containing dlopen" >&5
3951 if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then
3952   echo $ac_n "(cached) $ac_c" 1>&6
3953 else
3954   ac_func_search_save_LIBS="$LIBS"
3955 ac_cv_search_dlopen="no"
3956 cat > conftest.$ac_ext <<EOF
3957 #line 3958 "configure"
3958 #include "confdefs.h"
3959 /* Override any gcc2 internal prototype to avoid an error.  */
3960 /* We use char because int might match the return type of a gcc2
3961     builtin and then its argument prototype would still apply.  */
3962 char dlopen();
3963
3964 int main() {
3965 dlopen()
3966 ; return 0; }
3967 EOF
3968 if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3969   rm -rf conftest*
3970   ac_cv_search_dlopen="none required"
3971 else
3972   echo "configure: failed program was:" >&5
3973   cat conftest.$ac_ext >&5
3974 fi
3975 rm -f conftest*
3976 test "$ac_cv_search_dlopen" = "no" && for i in dl; do
3977 LIBS="-l$i  $ac_func_search_save_LIBS"
3978 cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981 /* Override any gcc2 internal prototype to avoid an error.  */
3982 /* We use char because int might match the return type of a gcc2
3983     builtin and then its argument prototype would still apply.  */
3984 char dlopen();
3985
3986 int main() {
3987 dlopen()
3988 ; return 0; }
3989 EOF
3990 if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3991   rm -rf conftest*
3992   ac_cv_search_dlopen="-l$i"
3993 break
3994 else
3995   echo "configure: failed program was:" >&5
3996   cat conftest.$ac_ext >&5
3997 fi
3998 rm -f conftest*
3999 done
4000 LIBS="$ac_func_search_save_LIBS"
4001 fi
4002
4003 echo "$ac_t""$ac_cv_search_dlopen" 1>&6
4004 if test "$ac_cv_search_dlopen" != "no"; then
4005   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
4006   
4007 else :
4008   
4009 fi
4010 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
4011
4012 ############################################
4013 # check if the compiler can do immediate structures
4014 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
4015 echo "configure:4016: checking for immediate structures" >&5
4016 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
4017   echo $ac_n "(cached) $ac_c" 1>&6
4018 else
4019   
4020     cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023
4024 #include <stdio.h>
4025 int main() {
4026
4027    typedef struct {unsigned x;} FOOBAR;
4028    #define X_FOOBAR(x) ((FOOBAR) { x })
4029    #define FOO_ONE X_FOOBAR(1)
4030    FOOBAR f = FOO_ONE;   
4031    static struct {
4032         FOOBAR y; 
4033         } f2[] = {
4034                 {FOO_ONE}
4035         };   
4036
4037 ; return 0; }
4038 EOF
4039 if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4040   rm -rf conftest*
4041   samba_cv_immediate_structures=yes
4042 else
4043   echo "configure: failed program was:" >&5
4044   cat conftest.$ac_ext >&5
4045   rm -rf conftest*
4046   samba_cv_immediate_structures=no
4047 fi
4048 rm -f conftest*
4049 fi
4050
4051 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
4052 if test x"$samba_cv_immediate_structures" = x"yes"; then
4053    cat >> confdefs.h <<\EOF
4054 #define HAVE_IMMEDIATE_STRUCTURES 1
4055 EOF
4056
4057 fi
4058
4059 ############################################
4060 # check for unix domain sockets
4061 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
4062 echo "configure:4063: checking for unix domain sockets" >&5
4063 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
4064   echo $ac_n "(cached) $ac_c" 1>&6
4065 else
4066   
4067     cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070
4071 #include <sys/types.h>
4072 #include <stdlib.h>
4073 #include <stddef.h>
4074 #include <sys/socket.h>
4075 #include <sys/un.h>
4076 int main() {
4077
4078   struct sockaddr_un sunaddr; 
4079   sunaddr.sun_family = AF_UNIX;
4080
4081 ; return 0; }
4082 EOF
4083 if { (eval echo configure:4084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4084   rm -rf conftest*
4085   samba_cv_unixsocket=yes
4086 else
4087   echo "configure: failed program was:" >&5
4088   cat conftest.$ac_ext >&5
4089   rm -rf conftest*
4090   samba_cv_unixsocket=no
4091 fi
4092 rm -f conftest*
4093 fi
4094
4095 echo "$ac_t""$samba_cv_unixsocket" 1>&6
4096 if test x"$samba_cv_unixsocket" = x"yes"; then
4097    cat >> confdefs.h <<\EOF
4098 #define HAVE_UNIXSOCKET 1
4099 EOF
4100
4101 fi
4102
4103
4104 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
4105 echo "configure:4106: checking for socklen_t type" >&5
4106 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
4107   echo $ac_n "(cached) $ac_c" 1>&6
4108 else
4109   
4110     cat > conftest.$ac_ext <<EOF
4111 #line 4112 "configure"
4112 #include "confdefs.h"
4113
4114 #include <sys/types.h>
4115 #if STDC_HEADERS
4116 #include <stdlib.h>
4117 #include <stddef.h>
4118 #endif
4119 #include <sys/socket.h>
4120 int main() {
4121 socklen_t i = 0
4122 ; return 0; }
4123 EOF
4124 if { (eval echo configure:4125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4125   rm -rf conftest*
4126   samba_cv_socklen_t=yes
4127 else
4128   echo "configure: failed program was:" >&5
4129   cat conftest.$ac_ext >&5
4130   rm -rf conftest*
4131   samba_cv_socklen_t=no
4132 fi
4133 rm -f conftest*
4134 fi
4135
4136 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4137 if test x"$samba_cv_socklen_t" = x"yes"; then
4138    cat >> confdefs.h <<\EOF
4139 #define HAVE_SOCKLEN_T_TYPE 1
4140 EOF
4141
4142 fi
4143
4144 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4145 echo "configure:4146: checking for sig_atomic_t type" >&5
4146 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4147   echo $ac_n "(cached) $ac_c" 1>&6
4148 else
4149   
4150     cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153
4154 #include <sys/types.h>
4155 #if STDC_HEADERS
4156 #include <stdlib.h>
4157 #include <stddef.h>
4158 #endif
4159 #include <signal.h>
4160 int main() {
4161 sig_atomic_t i = 0
4162 ; return 0; }
4163 EOF
4164 if { (eval echo configure:4165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4165   rm -rf conftest*
4166   samba_cv_sig_atomic_t=yes
4167 else
4168   echo "configure: failed program was:" >&5
4169   cat conftest.$ac_ext >&5
4170   rm -rf conftest*
4171   samba_cv_sig_atomic_t=no
4172 fi
4173 rm -f conftest*
4174 fi
4175
4176 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4177 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4178    cat >> confdefs.h <<\EOF
4179 #define HAVE_SIG_ATOMIC_T_TYPE 1
4180 EOF
4181
4182 fi
4183
4184 # stupid headers have the functions but no declaration. grrrr.
4185
4186  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4187 echo "configure:4188: checking for errno declaration" >&5
4188 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4189   echo $ac_n "(cached) $ac_c" 1>&6
4190 else
4191   
4192     cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 #include <errno.h>
4196 int main() {
4197 int i = (int)errno
4198 ; return 0; }
4199 EOF
4200 if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4201   rm -rf conftest*
4202   ac_cv_have_errno_decl=yes
4203 else
4204   echo "configure: failed program was:" >&5
4205   cat conftest.$ac_ext >&5
4206   rm -rf conftest*
4207   ac_cv_have_errno_decl=no
4208 fi
4209 rm -f conftest*
4210 fi
4211
4212 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4213  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4214     cat >> confdefs.h <<\EOF
4215 #define HAVE_ERRNO_DECL 1
4216 EOF
4217
4218  fi
4219
4220
4221  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4222 echo "configure:4223: checking for setresuid declaration" >&5
4223 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4224   echo $ac_n "(cached) $ac_c" 1>&6
4225 else
4226   
4227     cat > conftest.$ac_ext <<EOF
4228 #line 4229 "configure"
4229 #include "confdefs.h"
4230 #include <unistd.h>
4231 int main() {
4232 int i = (int)setresuid
4233 ; return 0; }
4234 EOF
4235 if { (eval echo configure:4236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4236   rm -rf conftest*
4237   ac_cv_have_setresuid_decl=yes
4238 else
4239   echo "configure: failed program was:" >&5
4240   cat conftest.$ac_ext >&5
4241   rm -rf conftest*
4242   ac_cv_have_setresuid_decl=no
4243 fi
4244 rm -f conftest*
4245 fi
4246
4247 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4248  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4249     cat >> confdefs.h <<\EOF
4250 #define HAVE_SETRESUID_DECL 1
4251 EOF
4252
4253  fi
4254
4255
4256  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4257 echo "configure:4258: checking for setresgid declaration" >&5
4258 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4259   echo $ac_n "(cached) $ac_c" 1>&6
4260 else
4261   
4262     cat > conftest.$ac_ext <<EOF
4263 #line 4264 "configure"
4264 #include "confdefs.h"
4265 #include <unistd.h>
4266 int main() {
4267 int i = (int)setresgid
4268 ; return 0; }
4269 EOF
4270 if { (eval echo configure:4271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4271   rm -rf conftest*
4272   ac_cv_have_setresgid_decl=yes
4273 else
4274   echo "configure: failed program was:" >&5
4275   cat conftest.$ac_ext >&5
4276   rm -rf conftest*
4277   ac_cv_have_setresgid_decl=no
4278 fi
4279 rm -f conftest*
4280 fi
4281
4282 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4283  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4284     cat >> confdefs.h <<\EOF
4285 #define HAVE_SETRESGID_DECL 1
4286 EOF
4287
4288  fi
4289
4290
4291  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4292 echo "configure:4293: checking for asprintf declaration" >&5
4293 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4294   echo $ac_n "(cached) $ac_c" 1>&6
4295 else
4296   
4297     cat > conftest.$ac_ext <<EOF
4298 #line 4299 "configure"
4299 #include "confdefs.h"
4300 #include <stdio.h>
4301 int main() {
4302 int i = (int)asprintf
4303 ; return 0; }
4304 EOF
4305 if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4306   rm -rf conftest*
4307   ac_cv_have_asprintf_decl=yes
4308 else
4309   echo "configure: failed program was:" >&5
4310   cat conftest.$ac_ext >&5
4311   rm -rf conftest*
4312   ac_cv_have_asprintf_decl=no
4313 fi
4314 rm -f conftest*
4315 fi
4316
4317 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4318  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4319     cat >> confdefs.h <<\EOF
4320 #define HAVE_ASPRINTF_DECL 1
4321 EOF
4322
4323  fi
4324
4325
4326  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4327 echo "configure:4328: checking for vasprintf declaration" >&5
4328 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4329   echo $ac_n "(cached) $ac_c" 1>&6
4330 else
4331   
4332     cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 #include <stdio.h>
4336 int main() {
4337 int i = (int)vasprintf
4338 ; return 0; }
4339 EOF
4340 if { (eval echo configure:4341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4341   rm -rf conftest*
4342   ac_cv_have_vasprintf_decl=yes
4343 else
4344   echo "configure: failed program was:" >&5
4345   cat conftest.$ac_ext >&5
4346   rm -rf conftest*
4347   ac_cv_have_vasprintf_decl=no
4348 fi
4349 rm -f conftest*
4350 fi
4351
4352 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4353  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4354     cat >> confdefs.h <<\EOF
4355 #define HAVE_VASPRINTF_DECL 1
4356 EOF
4357
4358  fi
4359
4360
4361  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4362 echo "configure:4363: checking for vsnprintf declaration" >&5
4363 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   
4367     cat > conftest.$ac_ext <<EOF
4368 #line 4369 "configure"
4369 #include "confdefs.h"
4370 #include <stdio.h>
4371 int main() {
4372 int i = (int)vsnprintf
4373 ; return 0; }
4374 EOF
4375 if { (eval echo configure:4376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4376   rm -rf conftest*
4377   ac_cv_have_vsnprintf_decl=yes
4378 else
4379   echo "configure: failed program was:" >&5
4380   cat conftest.$ac_ext >&5
4381   rm -rf conftest*
4382   ac_cv_have_vsnprintf_decl=no
4383 fi
4384 rm -f conftest*
4385 fi
4386
4387 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4388  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4389     cat >> confdefs.h <<\EOF
4390 #define HAVE_VSNPRINTF_DECL 1
4391 EOF
4392
4393  fi
4394
4395
4396  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4397 echo "configure:4398: checking for snprintf declaration" >&5
4398 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   
4402     cat > conftest.$ac_ext <<EOF
4403 #line 4404 "configure"
4404 #include "confdefs.h"
4405 #include <stdio.h>
4406 int main() {
4407 int i = (int)snprintf
4408 ; return 0; }
4409 EOF
4410 if { (eval echo configure:4411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4411   rm -rf conftest*
4412   ac_cv_have_snprintf_decl=yes
4413 else
4414   echo "configure: failed program was:" >&5
4415   cat conftest.$ac_ext >&5
4416   rm -rf conftest*
4417   ac_cv_have_snprintf_decl=no
4418 fi
4419 rm -f conftest*
4420 fi
4421
4422 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4423  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4424     cat >> confdefs.h <<\EOF
4425 #define HAVE_SNPRINTF_DECL 1
4426 EOF
4427
4428  fi
4429
4430
4431 # and glibc has setresuid under linux but the function does
4432 # nothing until kernel 2.1.44! very dumb.
4433 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4434 echo "configure:4435: checking for real setresuid" >&5
4435 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4436   echo $ac_n "(cached) $ac_c" 1>&6
4437 else
4438   
4439     if test "$cross_compiling" = yes; then
4440   samba_cv_have_setresuid=cross
4441 else
4442   cat > conftest.$ac_ext <<EOF
4443 #line 4444 "configure"
4444 #include "confdefs.h"
4445 #include <errno.h>
4446 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4447 EOF
4448 if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4449 then
4450   samba_cv_have_setresuid=yes
4451 else
4452   echo "configure: failed program was:" >&5
4453   cat conftest.$ac_ext >&5
4454   rm -fr conftest*
4455   samba_cv_have_setresuid=no
4456 fi
4457 rm -fr conftest*
4458 fi
4459
4460 fi
4461
4462 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4463 if test x"$samba_cv_have_setresuid" = x"yes"; then
4464     cat >> confdefs.h <<\EOF
4465 #define HAVE_SETRESUID 1
4466 EOF
4467
4468 fi
4469
4470 # Do the same check for setresguid...
4471 #
4472 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4473 echo "configure:4474: checking for real setresgid" >&5
4474 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4475   echo $ac_n "(cached) $ac_c" 1>&6
4476 else
4477   
4478     if test "$cross_compiling" = yes; then
4479   samba_cv_have_setresgid=cross
4480 else
4481   cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484 #include <unistd.h>
4485 #include <errno.h>
4486 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4487 EOF
4488 if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4489 then
4490   samba_cv_have_setresgid=yes
4491 else
4492   echo "configure: failed program was:" >&5
4493   cat conftest.$ac_ext >&5
4494   rm -fr conftest*
4495   samba_cv_have_setresgid=no
4496 fi
4497 rm -fr conftest*
4498 fi
4499
4500 fi
4501
4502 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4503 if test x"$samba_cv_have_setresgid" = x"yes"; then
4504     cat >> confdefs.h <<\EOF
4505 #define HAVE_SETRESGID 1
4506 EOF
4507
4508 fi
4509
4510 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4511 echo "configure:4512: checking for 8-bit clean memcmp" >&5
4512 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4513   echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515   if test "$cross_compiling" = yes; then
4516   ac_cv_func_memcmp_clean=no
4517 else
4518   cat > conftest.$ac_ext <<EOF
4519 #line 4520 "configure"
4520 #include "confdefs.h"
4521
4522 main()
4523 {
4524   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4525   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4526 }
4527
4528 EOF
4529 if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4530 then
4531   ac_cv_func_memcmp_clean=yes
4532 else
4533   echo "configure: failed program was:" >&5
4534   cat conftest.$ac_ext >&5
4535   rm -fr conftest*
4536   ac_cv_func_memcmp_clean=no
4537 fi
4538 rm -fr conftest*
4539 fi
4540
4541 fi
4542
4543 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4544 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4545
4546
4547 ###############################################
4548 # test for where we get crypt() from
4549
4550 echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
4551 echo "configure:4552: checking for library containing crypt" >&5
4552 if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
4553   echo $ac_n "(cached) $ac_c" 1>&6
4554 else
4555   ac_func_search_save_LIBS="$LIBS"
4556 ac_cv_search_crypt="no"
4557 cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4560 /* Override any gcc2 internal prototype to avoid an error.  */
4561 /* We use char because int might match the return type of a gcc2
4562     builtin and then its argument prototype would still apply.  */
4563 char crypt();
4564
4565 int main() {
4566 crypt()
4567 ; return 0; }
4568 EOF
4569 if { (eval echo configure:4570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4570   rm -rf conftest*
4571   ac_cv_search_crypt="none required"
4572 else
4573   echo "configure: failed program was:" >&5
4574   cat conftest.$ac_ext >&5
4575 fi
4576 rm -f conftest*
4577 test "$ac_cv_search_crypt" = "no" && for i in crypt; do
4578 LIBS="-l$i  $ac_func_search_save_LIBS"
4579 cat > conftest.$ac_ext <<EOF
4580 #line 4581 "configure"
4581 #include "confdefs.h"
4582 /* Override any gcc2 internal prototype to avoid an error.  */
4583 /* We use char because int might match the return type of a gcc2
4584     builtin and then its argument prototype would still apply.  */
4585 char crypt();
4586
4587 int main() {
4588 crypt()
4589 ; return 0; }
4590 EOF
4591 if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4592   rm -rf conftest*
4593   ac_cv_search_crypt="-l$i"
4594 break
4595 else
4596   echo "configure: failed program was:" >&5
4597   cat conftest.$ac_ext >&5
4598 fi
4599 rm -f conftest*
4600 done
4601 LIBS="$ac_func_search_save_LIBS"
4602 fi
4603
4604 echo "$ac_t""$ac_cv_search_crypt" 1>&6
4605 if test "$ac_cv_search_crypt" != "no"; then
4606   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
4607   AUTHLIBS="$AUTHLIBS -lcrypt";
4608         cat >> confdefs.h <<\EOF
4609 #define HAVE_CRYPT 1
4610 EOF
4611
4612 else :
4613   
4614 fi
4615
4616 ###############################################
4617 # Readline included by default unless explicitly asked not to
4618 test "${with_readline+set}" != "set" && with_readline=yes
4619
4620 # test for where we get readline() from
4621 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4622 echo "configure:4623: checking whether to use readline" >&5
4623 # Check whether --with-readline or --without-readline was given.
4624 if test "${with_readline+set}" = set; then
4625   withval="$with_readline"
4626     case "$with_readline" in
4627   yes)
4628     echo "$ac_t""yes" 1>&6
4629
4630     for ac_hdr in readline.h history.h readline/readline.h
4631 do
4632 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4633 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4634 echo "configure:4635: checking for $ac_hdr" >&5
4635 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4636   echo $ac_n "(cached) $ac_c" 1>&6
4637 else
4638   cat > conftest.$ac_ext <<EOF
4639 #line 4640 "configure"
4640 #include "confdefs.h"
4641 #include <$ac_hdr>
4642 EOF
4643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4644 { (eval echo configure:4645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4646 if test -z "$ac_err"; then
4647   rm -rf conftest*
4648   eval "ac_cv_header_$ac_safe=yes"
4649 else
4650   echo "$ac_err" >&5
4651   echo "configure: failed program was:" >&5
4652   cat conftest.$ac_ext >&5
4653   rm -rf conftest*
4654   eval "ac_cv_header_$ac_safe=no"
4655 fi
4656 rm -f conftest*
4657 fi
4658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4659   echo "$ac_t""yes" 1>&6
4660     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4661   cat >> confdefs.h <<EOF
4662 #define $ac_tr_hdr 1
4663 EOF
4664  
4665 else
4666   echo "$ac_t""no" 1>&6
4667 fi
4668 done
4669
4670     for ac_hdr in readline/history.h
4671 do
4672 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4673 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4674 echo "configure:4675: checking for $ac_hdr" >&5
4675 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4676   echo $ac_n "(cached) $ac_c" 1>&6
4677 else
4678   cat > conftest.$ac_ext <<EOF
4679 #line 4680 "configure"
4680 #include "confdefs.h"
4681 #include <$ac_hdr>
4682 EOF
4683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4684 { (eval echo configure:4685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4686 if test -z "$ac_err"; then
4687   rm -rf conftest*
4688   eval "ac_cv_header_$ac_safe=yes"
4689 else
4690   echo "$ac_err" >&5
4691   echo "configure: failed program was:" >&5
4692   cat conftest.$ac_ext >&5
4693   rm -rf conftest*
4694   eval "ac_cv_header_$ac_safe=no"
4695 fi
4696 rm -f conftest*
4697 fi
4698 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4699   echo "$ac_t""yes" 1>&6
4700     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4701   cat >> confdefs.h <<EOF
4702 #define $ac_tr_hdr 1
4703 EOF
4704  
4705 else
4706   echo "$ac_t""no" 1>&6
4707 fi
4708 done
4709
4710
4711     for ac_hdr in readline.h readline/readline.h
4712 do
4713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4715 echo "configure:4716: checking for $ac_hdr" >&5
4716 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4717   echo $ac_n "(cached) $ac_c" 1>&6
4718 else
4719   cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722 #include <$ac_hdr>
4723 EOF
4724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4725 { (eval echo configure:4726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4727 if test -z "$ac_err"; then
4728   rm -rf conftest*
4729   eval "ac_cv_header_$ac_safe=yes"
4730 else
4731   echo "$ac_err" >&5
4732   echo "configure: failed program was:" >&5
4733   cat conftest.$ac_ext >&5
4734   rm -rf conftest*
4735   eval "ac_cv_header_$ac_safe=no"
4736 fi
4737 rm -f conftest*
4738 fi
4739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4740   echo "$ac_t""yes" 1>&6
4741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4742   cat >> confdefs.h <<EOF
4743 #define $ac_tr_hdr 1
4744 EOF
4745  
4746       for termlib in ncurses curses termcap terminfo termlib; do
4747        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4748 echo "configure:4749: checking for tgetent in -l${termlib}" >&5
4749 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4750 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4751   echo $ac_n "(cached) $ac_c" 1>&6
4752 else
4753   ac_save_LIBS="$LIBS"
4754 LIBS="-l${termlib}  $LIBS"
4755 cat > conftest.$ac_ext <<EOF
4756 #line 4757 "configure"
4757 #include "confdefs.h"
4758 /* Override any gcc2 internal prototype to avoid an error.  */
4759 /* We use char because int might match the return type of a gcc2
4760     builtin and then its argument prototype would still apply.  */
4761 char tgetent();
4762
4763 int main() {
4764 tgetent()
4765 ; return 0; }
4766 EOF
4767 if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4768   rm -rf conftest*
4769   eval "ac_cv_lib_$ac_lib_var=yes"
4770 else
4771   echo "configure: failed program was:" >&5
4772   cat conftest.$ac_ext >&5
4773   rm -rf conftest*
4774   eval "ac_cv_lib_$ac_lib_var=no"
4775 fi
4776 rm -f conftest*
4777 LIBS="$ac_save_LIBS"
4778
4779 fi
4780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4781   echo "$ac_t""yes" 1>&6
4782   TERMLIBS="-l${termlib}"; break
4783 else
4784   echo "$ac_t""no" 1>&6
4785 fi
4786
4787       done
4788       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4789 echo "configure:4790: checking for rl_callback_handler_install in -lreadline" >&5
4790 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4791 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4792   echo $ac_n "(cached) $ac_c" 1>&6
4793 else
4794   ac_save_LIBS="$LIBS"
4795 LIBS="-lreadline $TERMLIBS $LIBS"
4796 cat > conftest.$ac_ext <<EOF
4797 #line 4798 "configure"
4798 #include "confdefs.h"
4799 /* Override any gcc2 internal prototype to avoid an error.  */
4800 /* We use char because int might match the return type of a gcc2
4801     builtin and then its argument prototype would still apply.  */
4802 char rl_callback_handler_install();
4803
4804 int main() {
4805 rl_callback_handler_install()
4806 ; return 0; }
4807 EOF
4808 if { (eval echo configure:4809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4809   rm -rf conftest*
4810   eval "ac_cv_lib_$ac_lib_var=yes"
4811 else
4812   echo "configure: failed program was:" >&5
4813   cat conftest.$ac_ext >&5
4814   rm -rf conftest*
4815   eval "ac_cv_lib_$ac_lib_var=no"
4816 fi
4817 rm -f conftest*
4818 LIBS="$ac_save_LIBS"
4819
4820 fi
4821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4822   echo "$ac_t""yes" 1>&6
4823   TERMLIBS="-lreadline $TERMLIBS"
4824        cat >> confdefs.h <<\EOF
4825 #define HAVE_LIBREADLINE 1
4826 EOF
4827
4828        break
4829 else
4830   echo "$ac_t""no" 1>&6
4831 TERMLIBS=
4832 fi
4833
4834 else
4835   echo "$ac_t""no" 1>&6
4836 fi
4837 done
4838
4839     ;;
4840   no)
4841     echo "$ac_t""no" 1>&6
4842     ;;
4843   *)
4844     echo "$ac_t""yes" 1>&6
4845
4846     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4847     # alternate readline path
4848     _ldflags=${LDFLAGS}
4849     _cppflags=${CPPFLAGS}
4850
4851     # Add additional search path
4852     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4853     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4854
4855     for ac_hdr in readline.h history.h readline/readline.h
4856 do
4857 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4858 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4859 echo "configure:4860: checking for $ac_hdr" >&5
4860 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4861   echo $ac_n "(cached) $ac_c" 1>&6
4862 else
4863   cat > conftest.$ac_ext <<EOF
4864 #line 4865 "configure"
4865 #include "confdefs.h"
4866 #include <$ac_hdr>
4867 EOF
4868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4869 { (eval echo configure:4870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4871 if test -z "$ac_err"; then
4872   rm -rf conftest*
4873   eval "ac_cv_header_$ac_safe=yes"
4874 else
4875   echo "$ac_err" >&5
4876   echo "configure: failed program was:" >&5
4877   cat conftest.$ac_ext >&5
4878   rm -rf conftest*
4879   eval "ac_cv_header_$ac_safe=no"
4880 fi
4881 rm -f conftest*
4882 fi
4883 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4884   echo "$ac_t""yes" 1>&6
4885     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4886   cat >> confdefs.h <<EOF
4887 #define $ac_tr_hdr 1
4888 EOF
4889  
4890 else
4891   echo "$ac_t""no" 1>&6
4892 fi
4893 done
4894
4895     for ac_hdr in readline/history.h
4896 do
4897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4899 echo "configure:4900: checking for $ac_hdr" >&5
4900 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4901   echo $ac_n "(cached) $ac_c" 1>&6
4902 else
4903   cat > conftest.$ac_ext <<EOF
4904 #line 4905 "configure"
4905 #include "confdefs.h"
4906 #include <$ac_hdr>
4907 EOF
4908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4909 { (eval echo configure:4910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4911 if test -z "$ac_err"; then
4912   rm -rf conftest*
4913   eval "ac_cv_header_$ac_safe=yes"
4914 else
4915   echo "$ac_err" >&5
4916   echo "configure: failed program was:" >&5
4917   cat conftest.$ac_ext >&5
4918   rm -rf conftest*
4919   eval "ac_cv_header_$ac_safe=no"
4920 fi
4921 rm -f conftest*
4922 fi
4923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4924   echo "$ac_t""yes" 1>&6
4925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4926   cat >> confdefs.h <<EOF
4927 #define $ac_tr_hdr 1
4928 EOF
4929  
4930 else
4931   echo "$ac_t""no" 1>&6
4932 fi
4933 done
4934
4935
4936     for ac_hdr in readline.h readline/readline.h
4937 do
4938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4940 echo "configure:4941: checking for $ac_hdr" >&5
4941 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4942   echo $ac_n "(cached) $ac_c" 1>&6
4943 else
4944   cat > conftest.$ac_ext <<EOF
4945 #line 4946 "configure"
4946 #include "confdefs.h"
4947 #include <$ac_hdr>
4948 EOF
4949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4950 { (eval echo configure:4951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4952 if test -z "$ac_err"; then
4953   rm -rf conftest*
4954   eval "ac_cv_header_$ac_safe=yes"
4955 else
4956   echo "$ac_err" >&5
4957   echo "configure: failed program was:" >&5
4958   cat conftest.$ac_ext >&5
4959   rm -rf conftest*
4960   eval "ac_cv_header_$ac_safe=no"
4961 fi
4962 rm -f conftest*
4963 fi
4964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4965   echo "$ac_t""yes" 1>&6
4966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4967   cat >> confdefs.h <<EOF
4968 #define $ac_tr_hdr 1
4969 EOF
4970  
4971       for termlib in ncurses curses termcap terminfo termlib; do
4972        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4973 echo "configure:4974: checking for tgetent in -l${termlib}" >&5
4974 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4975 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4976   echo $ac_n "(cached) $ac_c" 1>&6
4977 else
4978   ac_save_LIBS="$LIBS"
4979 LIBS="-l${termlib}  $LIBS"
4980 cat > conftest.$ac_ext <<EOF
4981 #line 4982 "configure"
4982 #include "confdefs.h"
4983 /* Override any gcc2 internal prototype to avoid an error.  */
4984 /* We use char because int might match the return type of a gcc2
4985     builtin and then its argument prototype would still apply.  */
4986 char tgetent();
4987
4988 int main() {
4989 tgetent()
4990 ; return 0; }
4991 EOF
4992 if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4993   rm -rf conftest*
4994   eval "ac_cv_lib_$ac_lib_var=yes"
4995 else
4996   echo "configure: failed program was:" >&5
4997   cat conftest.$ac_ext >&5
4998   rm -rf conftest*
4999   eval "ac_cv_lib_$ac_lib_var=no"
5000 fi
5001 rm -f conftest*
5002 LIBS="$ac_save_LIBS"
5003
5004 fi
5005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5006   echo "$ac_t""yes" 1>&6
5007   TERMLIBS="-l${termlib}"; break
5008 else
5009   echo "$ac_t""no" 1>&6
5010 fi
5011
5012       done
5013       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
5014 echo "configure:5015: checking for rl_callback_handler_install in -lreadline" >&5
5015 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
5016 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5017   echo $ac_n "(cached) $ac_c" 1>&6
5018 else
5019   ac_save_LIBS="$LIBS"
5020 LIBS="-lreadline $TERMLIBS $LIBS"
5021 cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024 /* Override any gcc2 internal prototype to avoid an error.  */
5025 /* We use char because int might match the return type of a gcc2
5026     builtin and then its argument prototype would still apply.  */
5027 char rl_callback_handler_install();
5028
5029 int main() {
5030 rl_callback_handler_install()
5031 ; return 0; }
5032 EOF
5033 if { (eval echo configure:5034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5034   rm -rf conftest*
5035   eval "ac_cv_lib_$ac_lib_var=yes"
5036 else
5037   echo "configure: failed program was:" >&5
5038   cat conftest.$ac_ext >&5
5039   rm -rf conftest*
5040   eval "ac_cv_lib_$ac_lib_var=no"
5041 fi
5042 rm -f conftest*
5043 LIBS="$ac_save_LIBS"
5044
5045 fi
5046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5047   echo "$ac_t""yes" 1>&6
5048   TERMLDFLAGS="-L$with_readline/lib"
5049        TERMCPPFLAGS="-I$with_readline/include"
5050        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
5051        TERMLIBS="-lreadline $TERMLIBS"
5052        cat >> confdefs.h <<\EOF
5053 #define HAVE_LIBREADLINE 1
5054 EOF
5055
5056        break
5057 else
5058   echo "$ac_t""no" 1>&6
5059 TERMLIBS= CPPFLAGS=$_cppflags
5060 fi
5061
5062 else
5063   echo "$ac_t""no" 1>&6
5064 fi
5065 done
5066
5067
5068     LDFLAGS=$_ldflags
5069     ;;
5070   esac
5071 else
5072   echo "$ac_t""no" 1>&6
5073
5074 fi
5075
5076
5077
5078
5079 # The readline API changed slightly from readline3 to readline4, so
5080 # code will generate warnings on one of them unless we have a few
5081 # special cases.
5082 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5083 echo "configure:5084: checking for rl_completion_matches in -lreadline" >&5
5084 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5085 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5086   echo $ac_n "(cached) $ac_c" 1>&6
5087 else
5088   ac_save_LIBS="$LIBS"
5089 LIBS="-lreadline $TERMLIBS $LIBS"
5090 cat > conftest.$ac_ext <<EOF
5091 #line 5092 "configure"
5092 #include "confdefs.h"
5093 /* Override any gcc2 internal prototype to avoid an error.  */
5094 /* We use char because int might match the return type of a gcc2
5095     builtin and then its argument prototype would still apply.  */
5096 char rl_completion_matches();
5097
5098 int main() {
5099 rl_completion_matches()
5100 ; return 0; }
5101 EOF
5102 if { (eval echo configure:5103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5103   rm -rf conftest*
5104   eval "ac_cv_lib_$ac_lib_var=yes"
5105 else
5106   echo "configure: failed program was:" >&5
5107   cat conftest.$ac_ext >&5
5108   rm -rf conftest*
5109   eval "ac_cv_lib_$ac_lib_var=no"
5110 fi
5111 rm -f conftest*
5112 LIBS="$ac_save_LIBS"
5113
5114 fi
5115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5116   echo "$ac_t""yes" 1>&6
5117   cat >> confdefs.h <<\EOF
5118 #define HAVE_NEW_LIBREADLINE 1
5119 EOF
5120
5121 else
5122   echo "$ac_t""no" 1>&6
5123 fi
5124
5125
5126 # The following test taken from the cvs sources
5127 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5128 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5129 # libsocket.so which has a bad implementation of gethostbyname (it
5130 # only looks in /etc/hosts), so we only look for -lsocket if we need
5131 # it.
5132 for ac_func in connect
5133 do
5134 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5135 echo "configure:5136: checking for $ac_func" >&5
5136 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5137   echo $ac_n "(cached) $ac_c" 1>&6
5138 else
5139   cat > conftest.$ac_ext <<EOF
5140 #line 5141 "configure"
5141 #include "confdefs.h"
5142 /* System header to define __stub macros and hopefully few prototypes,
5143     which can conflict with char $ac_func(); below.  */
5144 #include <assert.h>
5145 /* Override any gcc2 internal prototype to avoid an error.  */
5146 /* We use char because int might match the return type of a gcc2
5147     builtin and then its argument prototype would still apply.  */
5148 char $ac_func();
5149
5150 int main() {
5151
5152 /* The GNU C library defines this for functions which it implements
5153     to always fail with ENOSYS.  Some functions are actually named
5154     something starting with __ and the normal name is an alias.  */
5155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5156 choke me
5157 #else
5158 $ac_func();
5159 #endif
5160
5161 ; return 0; }
5162 EOF
5163 if { (eval echo configure:5164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5164   rm -rf conftest*
5165   eval "ac_cv_func_$ac_func=yes"
5166 else
5167   echo "configure: failed program was:" >&5
5168   cat conftest.$ac_ext >&5
5169   rm -rf conftest*
5170   eval "ac_cv_func_$ac_func=no"
5171 fi
5172 rm -f conftest*
5173 fi
5174
5175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5176   echo "$ac_t""yes" 1>&6
5177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5178   cat >> confdefs.h <<EOF
5179 #define $ac_tr_func 1
5180 EOF
5181  
5182 else
5183   echo "$ac_t""no" 1>&6
5184 fi
5185 done
5186
5187 if test x"$ac_cv_func_connect" = x"no"; then
5188     case "$LIBS" in
5189     *-lnsl*) ;;
5190     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5191 echo "configure:5192: checking for printf in -lnsl_s" >&5
5192 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5193 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196   ac_save_LIBS="$LIBS"
5197 LIBS="-lnsl_s  $LIBS"
5198 cat > conftest.$ac_ext <<EOF
5199 #line 5200 "configure"
5200 #include "confdefs.h"
5201 /* Override any gcc2 internal prototype to avoid an error.  */
5202 /* We use char because int might match the return type of a gcc2
5203     builtin and then its argument prototype would still apply.  */
5204 char printf();
5205
5206 int main() {
5207 printf()
5208 ; return 0; }
5209 EOF
5210 if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5211   rm -rf conftest*
5212   eval "ac_cv_lib_$ac_lib_var=yes"
5213 else
5214   echo "configure: failed program was:" >&5
5215   cat conftest.$ac_ext >&5
5216   rm -rf conftest*
5217   eval "ac_cv_lib_$ac_lib_var=no"
5218 fi
5219 rm -f conftest*
5220 LIBS="$ac_save_LIBS"
5221
5222 fi
5223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5224   echo "$ac_t""yes" 1>&6
5225     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5226     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5227   cat >> confdefs.h <<EOF
5228 #define $ac_tr_lib 1
5229 EOF
5230
5231   LIBS="-lnsl_s $LIBS"
5232
5233 else
5234   echo "$ac_t""no" 1>&6
5235 fi
5236  ;;
5237     esac
5238     case "$LIBS" in
5239     *-lnsl*) ;;
5240     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5241 echo "configure:5242: checking for printf in -lnsl" >&5
5242 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5243 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5244   echo $ac_n "(cached) $ac_c" 1>&6
5245 else
5246   ac_save_LIBS="$LIBS"
5247 LIBS="-lnsl  $LIBS"
5248 cat > conftest.$ac_ext <<EOF
5249 #line 5250 "configure"
5250 #include "confdefs.h"
5251 /* Override any gcc2 internal prototype to avoid an error.  */
5252 /* We use char because int might match the return type of a gcc2
5253     builtin and then its argument prototype would still apply.  */
5254 char printf();
5255
5256 int main() {
5257 printf()
5258 ; return 0; }
5259 EOF
5260 if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5261   rm -rf conftest*
5262   eval "ac_cv_lib_$ac_lib_var=yes"
5263 else
5264   echo "configure: failed program was:" >&5
5265   cat conftest.$ac_ext >&5
5266   rm -rf conftest*
5267   eval "ac_cv_lib_$ac_lib_var=no"
5268 fi
5269 rm -f conftest*
5270 LIBS="$ac_save_LIBS"
5271
5272 fi
5273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5274   echo "$ac_t""yes" 1>&6
5275     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5276     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5277   cat >> confdefs.h <<EOF
5278 #define $ac_tr_lib 1
5279 EOF
5280
5281   LIBS="-lnsl $LIBS"
5282
5283 else
5284   echo "$ac_t""no" 1>&6
5285 fi
5286  ;;
5287     esac
5288     case "$LIBS" in
5289     *-lsocket*) ;;
5290     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5291 echo "configure:5292: checking for connect in -lsocket" >&5
5292 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296   ac_save_LIBS="$LIBS"
5297 LIBS="-lsocket  $LIBS"
5298 cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301 /* Override any gcc2 internal prototype to avoid an error.  */
5302 /* We use char because int might match the return type of a gcc2
5303     builtin and then its argument prototype would still apply.  */
5304 char connect();
5305
5306 int main() {
5307 connect()
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5311   rm -rf conftest*
5312   eval "ac_cv_lib_$ac_lib_var=yes"
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_lib_$ac_lib_var=no"
5318 fi
5319 rm -f conftest*
5320 LIBS="$ac_save_LIBS"
5321
5322 fi
5323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5324   echo "$ac_t""yes" 1>&6
5325     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5326     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5327   cat >> confdefs.h <<EOF
5328 #define $ac_tr_lib 1
5329 EOF
5330
5331   LIBS="-lsocket $LIBS"
5332
5333 else
5334   echo "$ac_t""no" 1>&6
5335 fi
5336  ;;
5337     esac
5338     case "$LIBS" in
5339     *-linet*) ;;
5340     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5341 echo "configure:5342: checking for connect in -linet" >&5
5342 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5343 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5344   echo $ac_n "(cached) $ac_c" 1>&6
5345 else
5346   ac_save_LIBS="$LIBS"
5347 LIBS="-linet  $LIBS"
5348 cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351 /* Override any gcc2 internal prototype to avoid an error.  */
5352 /* We use char because int might match the return type of a gcc2
5353     builtin and then its argument prototype would still apply.  */
5354 char connect();
5355
5356 int main() {
5357 connect()
5358 ; return 0; }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5361   rm -rf conftest*
5362   eval "ac_cv_lib_$ac_lib_var=yes"
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -rf conftest*
5367   eval "ac_cv_lib_$ac_lib_var=no"
5368 fi
5369 rm -f conftest*
5370 LIBS="$ac_save_LIBS"
5371
5372 fi
5373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5374   echo "$ac_t""yes" 1>&6
5375     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5376     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5377   cat >> confdefs.h <<EOF
5378 #define $ac_tr_lib 1
5379 EOF
5380
5381   LIBS="-linet $LIBS"
5382
5383 else
5384   echo "$ac_t""no" 1>&6
5385 fi
5386  ;;
5387     esac
5388             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5389        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5390         # ac_cv_func_connect=yes
5391         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5392         cat >> confdefs.h <<\EOF
5393 #define HAVE_CONNECT 1
5394 EOF
5395
5396     fi
5397 fi
5398
5399 ###############################################
5400 # test for where we get yp_get_default_domain() from
5401
5402 echo $ac_n "checking for library containing yp_get_default_domain""... $ac_c" 1>&6
5403 echo "configure:5404: checking for library containing yp_get_default_domain" >&5
5404 if eval "test \"`echo '$''{'ac_cv_search_yp_get_default_domain'+set}'`\" = set"; then
5405   echo $ac_n "(cached) $ac_c" 1>&6
5406 else
5407   ac_func_search_save_LIBS="$LIBS"
5408 ac_cv_search_yp_get_default_domain="no"
5409 cat > conftest.$ac_ext <<EOF
5410 #line 5411 "configure"
5411 #include "confdefs.h"
5412 /* Override any gcc2 internal prototype to avoid an error.  */
5413 /* We use char because int might match the return type of a gcc2
5414     builtin and then its argument prototype would still apply.  */
5415 char yp_get_default_domain();
5416
5417 int main() {
5418 yp_get_default_domain()
5419 ; return 0; }
5420 EOF
5421 if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5422   rm -rf conftest*
5423   ac_cv_search_yp_get_default_domain="none required"
5424 else
5425   echo "configure: failed program was:" >&5
5426   cat conftest.$ac_ext >&5
5427 fi
5428 rm -f conftest*
5429 test "$ac_cv_search_yp_get_default_domain" = "no" && for i in nsl; do
5430 LIBS="-l$i  $ac_func_search_save_LIBS"
5431 cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434 /* Override any gcc2 internal prototype to avoid an error.  */
5435 /* We use char because int might match the return type of a gcc2
5436     builtin and then its argument prototype would still apply.  */
5437 char yp_get_default_domain();
5438
5439 int main() {
5440 yp_get_default_domain()
5441 ; return 0; }
5442 EOF
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5444   rm -rf conftest*
5445   ac_cv_search_yp_get_default_domain="-l$i"
5446 break
5447 else
5448   echo "configure: failed program was:" >&5
5449   cat conftest.$ac_ext >&5
5450 fi
5451 rm -f conftest*
5452 done
5453 LIBS="$ac_func_search_save_LIBS"
5454 fi
5455
5456 echo "$ac_t""$ac_cv_search_yp_get_default_domain" 1>&6
5457 if test "$ac_cv_search_yp_get_default_domain" != "no"; then
5458   test "$ac_cv_search_yp_get_default_domain" = "none required" || LIBS="$ac_cv_search_yp_get_default_domain $LIBS"
5459   
5460 else :
5461   
5462 fi
5463 for ac_func in yp_get_default_domain
5464 do
5465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5466 echo "configure:5467: checking for $ac_func" >&5
5467 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5468   echo $ac_n "(cached) $ac_c" 1>&6
5469 else
5470   cat > conftest.$ac_ext <<EOF
5471 #line 5472 "configure"
5472 #include "confdefs.h"
5473 /* System header to define __stub macros and hopefully few prototypes,
5474     which can conflict with char $ac_func(); below.  */
5475 #include <assert.h>
5476 /* Override any gcc2 internal prototype to avoid an error.  */
5477 /* We use char because int might match the return type of a gcc2
5478     builtin and then its argument prototype would still apply.  */
5479 char $ac_func();
5480
5481 int main() {
5482
5483 /* The GNU C library defines this for functions which it implements
5484     to always fail with ENOSYS.  Some functions are actually named
5485     something starting with __ and the normal name is an alias.  */
5486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5487 choke me
5488 #else
5489 $ac_func();
5490 #endif
5491
5492 ; return 0; }
5493 EOF
5494 if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495   rm -rf conftest*
5496   eval "ac_cv_func_$ac_func=yes"
5497 else
5498   echo "configure: failed program was:" >&5
5499   cat conftest.$ac_ext >&5
5500   rm -rf conftest*
5501   eval "ac_cv_func_$ac_func=no"
5502 fi
5503 rm -f conftest*
5504 fi
5505
5506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5507   echo "$ac_t""yes" 1>&6
5508     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5509   cat >> confdefs.h <<EOF
5510 #define $ac_tr_func 1
5511 EOF
5512  
5513 else
5514   echo "$ac_t""no" 1>&6
5515 fi
5516 done
5517
5518
5519 # Check if we have execl, if not we need to compile smbrun.
5520 for ac_func in execl
5521 do
5522 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5523 echo "configure:5524: checking for $ac_func" >&5
5524 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5525   echo $ac_n "(cached) $ac_c" 1>&6
5526 else
5527   cat > conftest.$ac_ext <<EOF
5528 #line 5529 "configure"
5529 #include "confdefs.h"
5530 /* System header to define __stub macros and hopefully few prototypes,
5531     which can conflict with char $ac_func(); below.  */
5532 #include <assert.h>
5533 /* Override any gcc2 internal prototype to avoid an error.  */
5534 /* We use char because int might match the return type of a gcc2
5535     builtin and then its argument prototype would still apply.  */
5536 char $ac_func();
5537
5538 int main() {
5539
5540 /* The GNU C library defines this for functions which it implements
5541     to always fail with ENOSYS.  Some functions are actually named
5542     something starting with __ and the normal name is an alias.  */
5543 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5544 choke me
5545 #else
5546 $ac_func();
5547 #endif
5548
5549 ; return 0; }
5550 EOF
5551 if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5552   rm -rf conftest*
5553   eval "ac_cv_func_$ac_func=yes"
5554 else
5555   echo "configure: failed program was:" >&5
5556   cat conftest.$ac_ext >&5
5557   rm -rf conftest*
5558   eval "ac_cv_func_$ac_func=no"
5559 fi
5560 rm -f conftest*
5561 fi
5562
5563 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5564   echo "$ac_t""yes" 1>&6
5565     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5566   cat >> confdefs.h <<EOF
5567 #define $ac_tr_func 1
5568 EOF
5569  
5570 else
5571   echo "$ac_t""no" 1>&6
5572 fi
5573 done
5574
5575 if test x"$ac_cv_func_execl" = x"no"; then
5576     EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
5577 fi
5578
5579 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5580 do
5581 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5582 echo "configure:5583: checking for $ac_func" >&5
5583 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5584   echo $ac_n "(cached) $ac_c" 1>&6
5585 else
5586   cat > conftest.$ac_ext <<EOF
5587 #line 5588 "configure"
5588 #include "confdefs.h"
5589 /* System header to define __stub macros and hopefully few prototypes,
5590     which can conflict with char $ac_func(); below.  */
5591 #include <assert.h>
5592 /* Override any gcc2 internal prototype to avoid an error.  */
5593 /* We use char because int might match the return type of a gcc2
5594     builtin and then its argument prototype would still apply.  */
5595 char $ac_func();
5596
5597 int main() {
5598
5599 /* The GNU C library defines this for functions which it implements
5600     to always fail with ENOSYS.  Some functions are actually named
5601     something starting with __ and the normal name is an alias.  */
5602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5603 choke me
5604 #else
5605 $ac_func();
5606 #endif
5607
5608 ; return 0; }
5609 EOF
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5611   rm -rf conftest*
5612   eval "ac_cv_func_$ac_func=yes"
5613 else
5614   echo "configure: failed program was:" >&5
5615   cat conftest.$ac_ext >&5
5616   rm -rf conftest*
5617   eval "ac_cv_func_$ac_func=no"
5618 fi
5619 rm -f conftest*
5620 fi
5621
5622 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5623   echo "$ac_t""yes" 1>&6
5624     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5625   cat >> confdefs.h <<EOF
5626 #define $ac_tr_func 1
5627 EOF
5628  
5629 else
5630   echo "$ac_t""no" 1>&6
5631 fi
5632 done
5633
5634 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5635 do
5636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5637 echo "configure:5638: checking for $ac_func" >&5
5638 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   cat > conftest.$ac_ext <<EOF
5642 #line 5643 "configure"
5643 #include "confdefs.h"
5644 /* System header to define __stub macros and hopefully few prototypes,
5645     which can conflict with char $ac_func(); below.  */
5646 #include <assert.h>
5647 /* Override any gcc2 internal prototype to avoid an error.  */
5648 /* We use char because int might match the return type of a gcc2
5649     builtin and then its argument prototype would still apply.  */
5650 char $ac_func();
5651
5652 int main() {
5653
5654 /* The GNU C library defines this for functions which it implements
5655     to always fail with ENOSYS.  Some functions are actually named
5656     something starting with __ and the normal name is an alias.  */
5657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5658 choke me
5659 #else
5660 $ac_func();
5661 #endif
5662
5663 ; return 0; }
5664 EOF
5665 if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5666   rm -rf conftest*
5667   eval "ac_cv_func_$ac_func=yes"
5668 else
5669   echo "configure: failed program was:" >&5
5670   cat conftest.$ac_ext >&5
5671   rm -rf conftest*
5672   eval "ac_cv_func_$ac_func=no"
5673 fi
5674 rm -f conftest*
5675 fi
5676
5677 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5678   echo "$ac_t""yes" 1>&6
5679     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5680   cat >> confdefs.h <<EOF
5681 #define $ac_tr_func 1
5682 EOF
5683  
5684 else
5685   echo "$ac_t""no" 1>&6
5686 fi
5687 done
5688
5689 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5690 do
5691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5692 echo "configure:5693: checking for $ac_func" >&5
5693 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5694   echo $ac_n "(cached) $ac_c" 1>&6
5695 else
5696   cat > conftest.$ac_ext <<EOF
5697 #line 5698 "configure"
5698 #include "confdefs.h"
5699 /* System header to define __stub macros and hopefully few prototypes,
5700     which can conflict with char $ac_func(); below.  */
5701 #include <assert.h>
5702 /* Override any gcc2 internal prototype to avoid an error.  */
5703 /* We use char because int might match the return type of a gcc2
5704     builtin and then its argument prototype would still apply.  */
5705 char $ac_func();
5706
5707 int main() {
5708
5709 /* The GNU C library defines this for functions which it implements
5710     to always fail with ENOSYS.  Some functions are actually named
5711     something starting with __ and the normal name is an alias.  */
5712 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5713 choke me
5714 #else
5715 $ac_func();
5716 #endif
5717
5718 ; return 0; }
5719 EOF
5720 if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5721   rm -rf conftest*
5722   eval "ac_cv_func_$ac_func=yes"
5723 else
5724   echo "configure: failed program was:" >&5
5725   cat conftest.$ac_ext >&5
5726   rm -rf conftest*
5727   eval "ac_cv_func_$ac_func=no"
5728 fi
5729 rm -f conftest*
5730 fi
5731
5732 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5733   echo "$ac_t""yes" 1>&6
5734     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5735   cat >> confdefs.h <<EOF
5736 #define $ac_tr_func 1
5737 EOF
5738  
5739 else
5740   echo "$ac_t""no" 1>&6
5741 fi
5742 done
5743
5744 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5745 do
5746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5747 echo "configure:5748: checking for $ac_func" >&5
5748 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5749   echo $ac_n "(cached) $ac_c" 1>&6
5750 else
5751   cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 /* System header to define __stub macros and hopefully few prototypes,
5755     which can conflict with char $ac_func(); below.  */
5756 #include <assert.h>
5757 /* Override any gcc2 internal prototype to avoid an error.  */
5758 /* We use char because int might match the return type of a gcc2
5759     builtin and then its argument prototype would still apply.  */
5760 char $ac_func();
5761
5762 int main() {
5763
5764 /* The GNU C library defines this for functions which it implements
5765     to always fail with ENOSYS.  Some functions are actually named
5766     something starting with __ and the normal name is an alias.  */
5767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5768 choke me
5769 #else
5770 $ac_func();
5771 #endif
5772
5773 ; return 0; }
5774 EOF
5775 if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5776   rm -rf conftest*
5777   eval "ac_cv_func_$ac_func=yes"
5778 else
5779   echo "configure: failed program was:" >&5
5780   cat conftest.$ac_ext >&5
5781   rm -rf conftest*
5782   eval "ac_cv_func_$ac_func=no"
5783 fi
5784 rm -f conftest*
5785 fi
5786
5787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5788   echo "$ac_t""yes" 1>&6
5789     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5790   cat >> confdefs.h <<EOF
5791 #define $ac_tr_func 1
5792 EOF
5793  
5794 else
5795   echo "$ac_t""no" 1>&6
5796 fi
5797 done
5798
5799 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5800 do
5801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5802 echo "configure:5803: checking for $ac_func" >&5
5803 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5804   echo $ac_n "(cached) $ac_c" 1>&6
5805 else
5806   cat > conftest.$ac_ext <<EOF
5807 #line 5808 "configure"
5808 #include "confdefs.h"
5809 /* System header to define __stub macros and hopefully few prototypes,
5810     which can conflict with char $ac_func(); below.  */
5811 #include <assert.h>
5812 /* Override any gcc2 internal prototype to avoid an error.  */
5813 /* We use char because int might match the return type of a gcc2
5814     builtin and then its argument prototype would still apply.  */
5815 char $ac_func();
5816
5817 int main() {
5818
5819 /* The GNU C library defines this for functions which it implements
5820     to always fail with ENOSYS.  Some functions are actually named
5821     something starting with __ and the normal name is an alias.  */
5822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5823 choke me
5824 #else
5825 $ac_func();
5826 #endif
5827
5828 ; return 0; }
5829 EOF
5830 if { (eval echo configure:5831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5831   rm -rf conftest*
5832   eval "ac_cv_func_$ac_func=yes"
5833 else
5834   echo "configure: failed program was:" >&5
5835   cat conftest.$ac_ext >&5
5836   rm -rf conftest*
5837   eval "ac_cv_func_$ac_func=no"
5838 fi
5839 rm -f conftest*
5840 fi
5841
5842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5843   echo "$ac_t""yes" 1>&6
5844     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5845   cat >> confdefs.h <<EOF
5846 #define $ac_tr_func 1
5847 EOF
5848  
5849 else
5850   echo "$ac_t""no" 1>&6
5851 fi
5852 done
5853
5854 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5855 do
5856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5857 echo "configure:5858: checking for $ac_func" >&5
5858 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5859   echo $ac_n "(cached) $ac_c" 1>&6
5860 else
5861   cat > conftest.$ac_ext <<EOF
5862 #line 5863 "configure"
5863 #include "confdefs.h"
5864 /* System header to define __stub macros and hopefully few prototypes,
5865     which can conflict with char $ac_func(); below.  */
5866 #include <assert.h>
5867 /* Override any gcc2 internal prototype to avoid an error.  */
5868 /* We use char because int might match the return type of a gcc2
5869     builtin and then its argument prototype would still apply.  */
5870 char $ac_func();
5871
5872 int main() {
5873
5874 /* The GNU C library defines this for functions which it implements
5875     to always fail with ENOSYS.  Some functions are actually named
5876     something starting with __ and the normal name is an alias.  */
5877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5878 choke me
5879 #else
5880 $ac_func();
5881 #endif
5882
5883 ; return 0; }
5884 EOF
5885 if { (eval echo configure:5886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5886   rm -rf conftest*
5887   eval "ac_cv_func_$ac_func=yes"
5888 else
5889   echo "configure: failed program was:" >&5
5890   cat conftest.$ac_ext >&5
5891   rm -rf conftest*
5892   eval "ac_cv_func_$ac_func=no"
5893 fi
5894 rm -f conftest*
5895 fi
5896
5897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5898   echo "$ac_t""yes" 1>&6
5899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5900   cat >> confdefs.h <<EOF
5901 #define $ac_tr_func 1
5902 EOF
5903  
5904 else
5905   echo "$ac_t""no" 1>&6
5906 fi
5907 done
5908
5909 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5910 do
5911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5912 echo "configure:5913: checking for $ac_func" >&5
5913 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 /* System header to define __stub macros and hopefully few prototypes,
5920     which can conflict with char $ac_func(); below.  */
5921 #include <assert.h>
5922 /* Override any gcc2 internal prototype to avoid an error.  */
5923 /* We use char because int might match the return type of a gcc2
5924     builtin and then its argument prototype would still apply.  */
5925 char $ac_func();
5926
5927 int main() {
5928
5929 /* The GNU C library defines this for functions which it implements
5930     to always fail with ENOSYS.  Some functions are actually named
5931     something starting with __ and the normal name is an alias.  */
5932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5933 choke me
5934 #else
5935 $ac_func();
5936 #endif
5937
5938 ; return 0; }
5939 EOF
5940 if { (eval echo configure:5941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5941   rm -rf conftest*
5942   eval "ac_cv_func_$ac_func=yes"
5943 else
5944   echo "configure: failed program was:" >&5
5945   cat conftest.$ac_ext >&5
5946   rm -rf conftest*
5947   eval "ac_cv_func_$ac_func=no"
5948 fi
5949 rm -f conftest*
5950 fi
5951
5952 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5953   echo "$ac_t""yes" 1>&6
5954     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5955   cat >> confdefs.h <<EOF
5956 #define $ac_tr_func 1
5957 EOF
5958  
5959 else
5960   echo "$ac_t""no" 1>&6
5961 fi
5962 done
5963
5964 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5965 do
5966 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5967 echo "configure:5968: checking for $ac_func" >&5
5968 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5969   echo $ac_n "(cached) $ac_c" 1>&6
5970 else
5971   cat > conftest.$ac_ext <<EOF
5972 #line 5973 "configure"
5973 #include "confdefs.h"
5974 /* System header to define __stub macros and hopefully few prototypes,
5975     which can conflict with char $ac_func(); below.  */
5976 #include <assert.h>
5977 /* Override any gcc2 internal prototype to avoid an error.  */
5978 /* We use char because int might match the return type of a gcc2
5979     builtin and then its argument prototype would still apply.  */
5980 char $ac_func();
5981
5982 int main() {
5983
5984 /* The GNU C library defines this for functions which it implements
5985     to always fail with ENOSYS.  Some functions are actually named
5986     something starting with __ and the normal name is an alias.  */
5987 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5988 choke me
5989 #else
5990 $ac_func();
5991 #endif
5992
5993 ; return 0; }
5994 EOF
5995 if { (eval echo configure:5996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5996   rm -rf conftest*
5997   eval "ac_cv_func_$ac_func=yes"
5998 else
5999   echo "configure: failed program was:" >&5
6000   cat conftest.$ac_ext >&5
6001   rm -rf conftest*
6002   eval "ac_cv_func_$ac_func=no"
6003 fi
6004 rm -f conftest*
6005 fi
6006
6007 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6008   echo "$ac_t""yes" 1>&6
6009     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6010   cat >> confdefs.h <<EOF
6011 #define $ac_tr_func 1
6012 EOF
6013  
6014 else
6015   echo "$ac_t""no" 1>&6
6016 fi
6017 done
6018
6019 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
6020 do
6021 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6022 echo "configure:6023: checking for $ac_func" >&5
6023 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6024   echo $ac_n "(cached) $ac_c" 1>&6
6025 else
6026   cat > conftest.$ac_ext <<EOF
6027 #line 6028 "configure"
6028 #include "confdefs.h"
6029 /* System header to define __stub macros and hopefully few prototypes,
6030     which can conflict with char $ac_func(); below.  */
6031 #include <assert.h>
6032 /* Override any gcc2 internal prototype to avoid an error.  */
6033 /* We use char because int might match the return type of a gcc2
6034     builtin and then its argument prototype would still apply.  */
6035 char $ac_func();
6036
6037 int main() {
6038
6039 /* The GNU C library defines this for functions which it implements
6040     to always fail with ENOSYS.  Some functions are actually named
6041     something starting with __ and the normal name is an alias.  */
6042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6043 choke me
6044 #else
6045 $ac_func();
6046 #endif
6047
6048 ; return 0; }
6049 EOF
6050 if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6051   rm -rf conftest*
6052   eval "ac_cv_func_$ac_func=yes"
6053 else
6054   echo "configure: failed program was:" >&5
6055   cat conftest.$ac_ext >&5
6056   rm -rf conftest*
6057   eval "ac_cv_func_$ac_func=no"
6058 fi
6059 rm -f conftest*
6060 fi
6061
6062 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6063   echo "$ac_t""yes" 1>&6
6064     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6065   cat >> confdefs.h <<EOF
6066 #define $ac_tr_func 1
6067 EOF
6068  
6069 else
6070   echo "$ac_t""no" 1>&6
6071 fi
6072 done
6073
6074 for ac_func in syslog vsyslog getgrouplist timegm
6075 do
6076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6077 echo "configure:6078: checking for $ac_func" >&5
6078 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6079   echo $ac_n "(cached) $ac_c" 1>&6
6080 else
6081   cat > conftest.$ac_ext <<EOF
6082 #line 6083 "configure"
6083 #include "confdefs.h"
6084 /* System header to define __stub macros and hopefully few prototypes,
6085     which can conflict with char $ac_func(); below.  */
6086 #include <assert.h>
6087 /* Override any gcc2 internal prototype to avoid an error.  */
6088 /* We use char because int might match the return type of a gcc2
6089     builtin and then its argument prototype would still apply.  */
6090 char $ac_func();
6091
6092 int main() {
6093
6094 /* The GNU C library defines this for functions which it implements
6095     to always fail with ENOSYS.  Some functions are actually named
6096     something starting with __ and the normal name is an alias.  */
6097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6098 choke me
6099 #else
6100 $ac_func();
6101 #endif
6102
6103 ; return 0; }
6104 EOF
6105 if { (eval echo configure:6106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6106   rm -rf conftest*
6107   eval "ac_cv_func_$ac_func=yes"
6108 else
6109   echo "configure: failed program was:" >&5
6110   cat conftest.$ac_ext >&5
6111   rm -rf conftest*
6112   eval "ac_cv_func_$ac_func=no"
6113 fi
6114 rm -f conftest*
6115 fi
6116
6117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6118   echo "$ac_t""yes" 1>&6
6119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6120   cat >> confdefs.h <<EOF
6121 #define $ac_tr_func 1
6122 EOF
6123  
6124 else
6125   echo "$ac_t""no" 1>&6
6126 fi
6127 done
6128
6129 # setbuffer, shmget, shm_open are needed for smbtorture
6130 for ac_func in setbuffer shmget shm_open
6131 do
6132 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6133 echo "configure:6134: checking for $ac_func" >&5
6134 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6135   echo $ac_n "(cached) $ac_c" 1>&6
6136 else
6137   cat > conftest.$ac_ext <<EOF
6138 #line 6139 "configure"
6139 #include "confdefs.h"
6140 /* System header to define __stub macros and hopefully few prototypes,
6141     which can conflict with char $ac_func(); below.  */
6142 #include <assert.h>
6143 /* Override any gcc2 internal prototype to avoid an error.  */
6144 /* We use char because int might match the return type of a gcc2
6145     builtin and then its argument prototype would still apply.  */
6146 char $ac_func();
6147
6148 int main() {
6149
6150 /* The GNU C library defines this for functions which it implements
6151     to always fail with ENOSYS.  Some functions are actually named
6152     something starting with __ and the normal name is an alias.  */
6153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6154 choke me
6155 #else
6156 $ac_func();
6157 #endif
6158
6159 ; return 0; }
6160 EOF
6161 if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6162   rm -rf conftest*
6163   eval "ac_cv_func_$ac_func=yes"
6164 else
6165   echo "configure: failed program was:" >&5
6166   cat conftest.$ac_ext >&5
6167   rm -rf conftest*
6168   eval "ac_cv_func_$ac_func=no"
6169 fi
6170 rm -f conftest*
6171 fi
6172
6173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6174   echo "$ac_t""yes" 1>&6
6175     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6176   cat >> confdefs.h <<EOF
6177 #define $ac_tr_func 1
6178 EOF
6179  
6180 else
6181   echo "$ac_t""no" 1>&6
6182 fi
6183 done
6184
6185
6186 # syscall() is needed for smbwrapper.
6187 for ac_func in syscall
6188 do
6189 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6190 echo "configure:6191: checking for $ac_func" >&5
6191 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6192   echo $ac_n "(cached) $ac_c" 1>&6
6193 else
6194   cat > conftest.$ac_ext <<EOF
6195 #line 6196 "configure"
6196 #include "confdefs.h"
6197 /* System header to define __stub macros and hopefully few prototypes,
6198     which can conflict with char $ac_func(); below.  */
6199 #include <assert.h>
6200 /* Override any gcc2 internal prototype to avoid an error.  */
6201 /* We use char because int might match the return type of a gcc2
6202     builtin and then its argument prototype would still apply.  */
6203 char $ac_func();
6204
6205 int main() {
6206
6207 /* The GNU C library defines this for functions which it implements
6208     to always fail with ENOSYS.  Some functions are actually named
6209     something starting with __ and the normal name is an alias.  */
6210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6211 choke me
6212 #else
6213 $ac_func();
6214 #endif
6215
6216 ; return 0; }
6217 EOF
6218 if { (eval echo configure:6219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6219   rm -rf conftest*
6220   eval "ac_cv_func_$ac_func=yes"
6221 else
6222   echo "configure: failed program was:" >&5
6223   cat conftest.$ac_ext >&5
6224   rm -rf conftest*
6225   eval "ac_cv_func_$ac_func=no"
6226 fi
6227 rm -f conftest*
6228 fi
6229
6230 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6231   echo "$ac_t""yes" 1>&6
6232     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6233   cat >> confdefs.h <<EOF
6234 #define $ac_tr_func 1
6235 EOF
6236  
6237 else
6238   echo "$ac_t""no" 1>&6
6239 fi
6240 done
6241
6242
6243 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6244 do
6245 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6246 echo "configure:6247: checking for $ac_func" >&5
6247 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6248   echo $ac_n "(cached) $ac_c" 1>&6
6249 else
6250   cat > conftest.$ac_ext <<EOF
6251 #line 6252 "configure"
6252 #include "confdefs.h"
6253 /* System header to define __stub macros and hopefully few prototypes,
6254     which can conflict with char $ac_func(); below.  */
6255 #include <assert.h>
6256 /* Override any gcc2 internal prototype to avoid an error.  */
6257 /* We use char because int might match the return type of a gcc2
6258     builtin and then its argument prototype would still apply.  */
6259 char $ac_func();
6260
6261 int main() {
6262
6263 /* The GNU C library defines this for functions which it implements
6264     to always fail with ENOSYS.  Some functions are actually named
6265     something starting with __ and the normal name is an alias.  */
6266 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6267 choke me
6268 #else
6269 $ac_func();
6270 #endif
6271
6272 ; return 0; }
6273 EOF
6274 if { (eval echo configure:6275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6275   rm -rf conftest*
6276   eval "ac_cv_func_$ac_func=yes"
6277 else
6278   echo "configure: failed program was:" >&5
6279   cat conftest.$ac_ext >&5
6280   rm -rf conftest*
6281   eval "ac_cv_func_$ac_func=no"
6282 fi
6283 rm -f conftest*
6284 fi
6285
6286 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6287   echo "$ac_t""yes" 1>&6
6288     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6289   cat >> confdefs.h <<EOF
6290 #define $ac_tr_func 1
6291 EOF
6292  
6293 else
6294   echo "$ac_t""no" 1>&6
6295 fi
6296 done
6297
6298 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6299 do
6300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6301 echo "configure:6302: checking for $ac_func" >&5
6302 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6303   echo $ac_n "(cached) $ac_c" 1>&6
6304 else
6305   cat > conftest.$ac_ext <<EOF
6306 #line 6307 "configure"
6307 #include "confdefs.h"
6308 /* System header to define __stub macros and hopefully few prototypes,
6309     which can conflict with char $ac_func(); below.  */
6310 #include <assert.h>
6311 /* Override any gcc2 internal prototype to avoid an error.  */
6312 /* We use char because int might match the return type of a gcc2
6313     builtin and then its argument prototype would still apply.  */
6314 char $ac_func();
6315
6316 int main() {
6317
6318 /* The GNU C library defines this for functions which it implements
6319     to always fail with ENOSYS.  Some functions are actually named
6320     something starting with __ and the normal name is an alias.  */
6321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6322 choke me
6323 #else
6324 $ac_func();
6325 #endif
6326
6327 ; return 0; }
6328 EOF
6329 if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6330   rm -rf conftest*
6331   eval "ac_cv_func_$ac_func=yes"
6332 else
6333   echo "configure: failed program was:" >&5
6334   cat conftest.$ac_ext >&5
6335   rm -rf conftest*
6336   eval "ac_cv_func_$ac_func=no"
6337 fi
6338 rm -f conftest*
6339 fi
6340
6341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6342   echo "$ac_t""yes" 1>&6
6343     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6344   cat >> confdefs.h <<EOF
6345 #define $ac_tr_func 1
6346 EOF
6347  
6348 else
6349   echo "$ac_t""no" 1>&6
6350 fi
6351 done
6352
6353 for ac_func in __getcwd _getcwd
6354 do
6355 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6356 echo "configure:6357: checking for $ac_func" >&5
6357 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6358   echo $ac_n "(cached) $ac_c" 1>&6
6359 else
6360   cat > conftest.$ac_ext <<EOF
6361 #line 6362 "configure"
6362 #include "confdefs.h"
6363 /* System header to define __stub macros and hopefully few prototypes,
6364     which can conflict with char $ac_func(); below.  */
6365 #include <assert.h>
6366 /* Override any gcc2 internal prototype to avoid an error.  */
6367 /* We use char because int might match the return type of a gcc2
6368     builtin and then its argument prototype would still apply.  */
6369 char $ac_func();
6370
6371 int main() {
6372
6373 /* The GNU C library defines this for functions which it implements
6374     to always fail with ENOSYS.  Some functions are actually named
6375     something starting with __ and the normal name is an alias.  */
6376 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6377 choke me
6378 #else
6379 $ac_func();
6380 #endif
6381
6382 ; return 0; }
6383 EOF
6384 if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6385   rm -rf conftest*
6386   eval "ac_cv_func_$ac_func=yes"
6387 else
6388   echo "configure: failed program was:" >&5
6389   cat conftest.$ac_ext >&5
6390   rm -rf conftest*
6391   eval "ac_cv_func_$ac_func=no"
6392 fi
6393 rm -f conftest*
6394 fi
6395
6396 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6397   echo "$ac_t""yes" 1>&6
6398     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6399   cat >> confdefs.h <<EOF
6400 #define $ac_tr_func 1
6401 EOF
6402  
6403 else
6404   echo "$ac_t""no" 1>&6
6405 fi
6406 done
6407
6408 for ac_func in __xstat __fxstat __lxstat
6409 do
6410 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6411 echo "configure:6412: checking for $ac_func" >&5
6412 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6413   echo $ac_n "(cached) $ac_c" 1>&6
6414 else
6415   cat > conftest.$ac_ext <<EOF
6416 #line 6417 "configure"
6417 #include "confdefs.h"
6418 /* System header to define __stub macros and hopefully few prototypes,
6419     which can conflict with char $ac_func(); below.  */
6420 #include <assert.h>
6421 /* Override any gcc2 internal prototype to avoid an error.  */
6422 /* We use char because int might match the return type of a gcc2
6423     builtin and then its argument prototype would still apply.  */
6424 char $ac_func();
6425
6426 int main() {
6427
6428 /* The GNU C library defines this for functions which it implements
6429     to always fail with ENOSYS.  Some functions are actually named
6430     something starting with __ and the normal name is an alias.  */
6431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6432 choke me
6433 #else
6434 $ac_func();
6435 #endif
6436
6437 ; return 0; }
6438 EOF
6439 if { (eval echo configure:6440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6440   rm -rf conftest*
6441   eval "ac_cv_func_$ac_func=yes"
6442 else
6443   echo "configure: failed program was:" >&5
6444   cat conftest.$ac_ext >&5
6445   rm -rf conftest*
6446   eval "ac_cv_func_$ac_func=no"
6447 fi
6448 rm -f conftest*
6449 fi
6450
6451 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6452   echo "$ac_t""yes" 1>&6
6453     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6454   cat >> confdefs.h <<EOF
6455 #define $ac_tr_func 1
6456 EOF
6457  
6458 else
6459   echo "$ac_t""no" 1>&6
6460 fi
6461 done
6462
6463 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6464 do
6465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6466 echo "configure:6467: checking for $ac_func" >&5
6467 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6468   echo $ac_n "(cached) $ac_c" 1>&6
6469 else
6470   cat > conftest.$ac_ext <<EOF
6471 #line 6472 "configure"
6472 #include "confdefs.h"
6473 /* System header to define __stub macros and hopefully few prototypes,
6474     which can conflict with char $ac_func(); below.  */
6475 #include <assert.h>
6476 /* Override any gcc2 internal prototype to avoid an error.  */
6477 /* We use char because int might match the return type of a gcc2
6478     builtin and then its argument prototype would still apply.  */
6479 char $ac_func();
6480
6481 int main() {
6482
6483 /* The GNU C library defines this for functions which it implements
6484     to always fail with ENOSYS.  Some functions are actually named
6485     something starting with __ and the normal name is an alias.  */
6486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6487 choke me
6488 #else
6489 $ac_func();
6490 #endif
6491
6492 ; return 0; }
6493 EOF
6494 if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6495   rm -rf conftest*
6496   eval "ac_cv_func_$ac_func=yes"
6497 else
6498   echo "configure: failed program was:" >&5
6499   cat conftest.$ac_ext >&5
6500   rm -rf conftest*
6501   eval "ac_cv_func_$ac_func=no"
6502 fi
6503 rm -f conftest*
6504 fi
6505
6506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6507   echo "$ac_t""yes" 1>&6
6508     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6509   cat >> confdefs.h <<EOF
6510 #define $ac_tr_func 1
6511 EOF
6512  
6513 else
6514   echo "$ac_t""no" 1>&6
6515 fi
6516 done
6517
6518 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6519 do
6520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6521 echo "configure:6522: checking for $ac_func" >&5
6522 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6523   echo $ac_n "(cached) $ac_c" 1>&6
6524 else
6525   cat > conftest.$ac_ext <<EOF
6526 #line 6527 "configure"
6527 #include "confdefs.h"
6528 /* System header to define __stub macros and hopefully few prototypes,
6529     which can conflict with char $ac_func(); below.  */
6530 #include <assert.h>
6531 /* Override any gcc2 internal prototype to avoid an error.  */
6532 /* We use char because int might match the return type of a gcc2
6533     builtin and then its argument prototype would still apply.  */
6534 char $ac_func();
6535
6536 int main() {
6537
6538 /* The GNU C library defines this for functions which it implements
6539     to always fail with ENOSYS.  Some functions are actually named
6540     something starting with __ and the normal name is an alias.  */
6541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6542 choke me
6543 #else
6544 $ac_func();
6545 #endif
6546
6547 ; return 0; }
6548 EOF
6549 if { (eval echo configure:6550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6550   rm -rf conftest*
6551   eval "ac_cv_func_$ac_func=yes"
6552 else
6553   echo "configure: failed program was:" >&5
6554   cat conftest.$ac_ext >&5
6555   rm -rf conftest*
6556   eval "ac_cv_func_$ac_func=no"
6557 fi
6558 rm -f conftest*
6559 fi
6560
6561 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6562   echo "$ac_t""yes" 1>&6
6563     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6564   cat >> confdefs.h <<EOF
6565 #define $ac_tr_func 1
6566 EOF
6567  
6568 else
6569   echo "$ac_t""no" 1>&6
6570 fi
6571 done
6572
6573 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6574 do
6575 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6576 echo "configure:6577: checking for $ac_func" >&5
6577 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6578   echo $ac_n "(cached) $ac_c" 1>&6
6579 else
6580   cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 /* System header to define __stub macros and hopefully few prototypes,
6584     which can conflict with char $ac_func(); below.  */
6585 #include <assert.h>
6586 /* Override any gcc2 internal prototype to avoid an error.  */
6587 /* We use char because int might match the return type of a gcc2
6588     builtin and then its argument prototype would still apply.  */
6589 char $ac_func();
6590
6591 int main() {
6592
6593 /* The GNU C library defines this for functions which it implements
6594     to always fail with ENOSYS.  Some functions are actually named
6595     something starting with __ and the normal name is an alias.  */
6596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6597 choke me
6598 #else
6599 $ac_func();
6600 #endif
6601
6602 ; return 0; }
6603 EOF
6604 if { (eval echo configure:6605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6605   rm -rf conftest*
6606   eval "ac_cv_func_$ac_func=yes"
6607 else
6608   echo "configure: failed program was:" >&5
6609   cat conftest.$ac_ext >&5
6610   rm -rf conftest*
6611   eval "ac_cv_func_$ac_func=no"
6612 fi
6613 rm -f conftest*
6614 fi
6615
6616 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6617   echo "$ac_t""yes" 1>&6
6618     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6619   cat >> confdefs.h <<EOF
6620 #define $ac_tr_func 1
6621 EOF
6622  
6623 else
6624   echo "$ac_t""no" 1>&6
6625 fi
6626 done
6627
6628 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6629 do
6630 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6631 echo "configure:6632: checking for $ac_func" >&5
6632 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635   cat > conftest.$ac_ext <<EOF
6636 #line 6637 "configure"
6637 #include "confdefs.h"
6638 /* System header to define __stub macros and hopefully few prototypes,
6639     which can conflict with char $ac_func(); below.  */
6640 #include <assert.h>
6641 /* Override any gcc2 internal prototype to avoid an error.  */
6642 /* We use char because int might match the return type of a gcc2
6643     builtin and then its argument prototype would still apply.  */
6644 char $ac_func();
6645
6646 int main() {
6647
6648 /* The GNU C library defines this for functions which it implements
6649     to always fail with ENOSYS.  Some functions are actually named
6650     something starting with __ and the normal name is an alias.  */
6651 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6652 choke me
6653 #else
6654 $ac_func();
6655 #endif
6656
6657 ; return 0; }
6658 EOF
6659 if { (eval echo configure:6660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6660   rm -rf conftest*
6661   eval "ac_cv_func_$ac_func=yes"
6662 else
6663   echo "configure: failed program was:" >&5
6664   cat conftest.$ac_ext >&5
6665   rm -rf conftest*
6666   eval "ac_cv_func_$ac_func=no"
6667 fi
6668 rm -f conftest*
6669 fi
6670
6671 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6672   echo "$ac_t""yes" 1>&6
6673     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6674   cat >> confdefs.h <<EOF
6675 #define $ac_tr_func 1
6676 EOF
6677  
6678 else
6679   echo "$ac_t""no" 1>&6
6680 fi
6681 done
6682
6683 for ac_func in _write __write _fork __fork
6684 do
6685 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6686 echo "configure:6687: checking for $ac_func" >&5
6687 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6688   echo $ac_n "(cached) $ac_c" 1>&6
6689 else
6690   cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693 /* System header to define __stub macros and hopefully few prototypes,
6694     which can conflict with char $ac_func(); below.  */
6695 #include <assert.h>
6696 /* Override any gcc2 internal prototype to avoid an error.  */
6697 /* We use char because int might match the return type of a gcc2
6698     builtin and then its argument prototype would still apply.  */
6699 char $ac_func();
6700
6701 int main() {
6702
6703 /* The GNU C library defines this for functions which it implements
6704     to always fail with ENOSYS.  Some functions are actually named
6705     something starting with __ and the normal name is an alias.  */
6706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6707 choke me
6708 #else
6709 $ac_func();
6710 #endif
6711
6712 ; return 0; }
6713 EOF
6714 if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6715   rm -rf conftest*
6716   eval "ac_cv_func_$ac_func=yes"
6717 else
6718   echo "configure: failed program was:" >&5
6719   cat conftest.$ac_ext >&5
6720   rm -rf conftest*
6721   eval "ac_cv_func_$ac_func=no"
6722 fi
6723 rm -f conftest*
6724 fi
6725
6726 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6727   echo "$ac_t""yes" 1>&6
6728     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6729   cat >> confdefs.h <<EOF
6730 #define $ac_tr_func 1
6731 EOF
6732  
6733 else
6734   echo "$ac_t""no" 1>&6
6735 fi
6736 done
6737
6738 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6739 do
6740 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6741 echo "configure:6742: checking for $ac_func" >&5
6742 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6743   echo $ac_n "(cached) $ac_c" 1>&6
6744 else
6745   cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748 /* System header to define __stub macros and hopefully few prototypes,
6749     which can conflict with char $ac_func(); below.  */
6750 #include <assert.h>
6751 /* Override any gcc2 internal prototype to avoid an error.  */
6752 /* We use char because int might match the return type of a gcc2
6753     builtin and then its argument prototype would still apply.  */
6754 char $ac_func();
6755
6756 int main() {
6757
6758 /* The GNU C library defines this for functions which it implements
6759     to always fail with ENOSYS.  Some functions are actually named
6760     something starting with __ and the normal name is an alias.  */
6761 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6762 choke me
6763 #else
6764 $ac_func();
6765 #endif
6766
6767 ; return 0; }
6768 EOF
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770   rm -rf conftest*
6771   eval "ac_cv_func_$ac_func=yes"
6772 else
6773   echo "configure: failed program was:" >&5
6774   cat conftest.$ac_ext >&5
6775   rm -rf conftest*
6776   eval "ac_cv_func_$ac_func=no"
6777 fi
6778 rm -f conftest*
6779 fi
6780
6781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6782   echo "$ac_t""yes" 1>&6
6783     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6784   cat >> confdefs.h <<EOF
6785 #define $ac_tr_func 1
6786 EOF
6787  
6788 else
6789   echo "$ac_t""no" 1>&6
6790 fi
6791 done
6792
6793 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6794 do
6795 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6796 echo "configure:6797: checking for $ac_func" >&5
6797 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6798   echo $ac_n "(cached) $ac_c" 1>&6
6799 else
6800   cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 /* System header to define __stub macros and hopefully few prototypes,
6804     which can conflict with char $ac_func(); below.  */
6805 #include <assert.h>
6806 /* Override any gcc2 internal prototype to avoid an error.  */
6807 /* We use char because int might match the return type of a gcc2
6808     builtin and then its argument prototype would still apply.  */
6809 char $ac_func();
6810
6811 int main() {
6812
6813 /* The GNU C library defines this for functions which it implements
6814     to always fail with ENOSYS.  Some functions are actually named
6815     something starting with __ and the normal name is an alias.  */
6816 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6817 choke me
6818 #else
6819 $ac_func();
6820 #endif
6821
6822 ; return 0; }
6823 EOF
6824 if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6825   rm -rf conftest*
6826   eval "ac_cv_func_$ac_func=yes"
6827 else
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -rf conftest*
6831   eval "ac_cv_func_$ac_func=no"
6832 fi
6833 rm -f conftest*
6834 fi
6835
6836 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6837   echo "$ac_t""yes" 1>&6
6838     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6839   cat >> confdefs.h <<EOF
6840 #define $ac_tr_func 1
6841 EOF
6842  
6843 else
6844   echo "$ac_t""no" 1>&6
6845 fi
6846 done
6847
6848 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6849 do
6850 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6851 echo "configure:6852: checking for $ac_func" >&5
6852 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6853   echo $ac_n "(cached) $ac_c" 1>&6
6854 else
6855   cat > conftest.$ac_ext <<EOF
6856 #line 6857 "configure"
6857 #include "confdefs.h"
6858 /* System header to define __stub macros and hopefully few prototypes,
6859     which can conflict with char $ac_func(); below.  */
6860 #include <assert.h>
6861 /* Override any gcc2 internal prototype to avoid an error.  */
6862 /* We use char because int might match the return type of a gcc2
6863     builtin and then its argument prototype would still apply.  */
6864 char $ac_func();
6865
6866 int main() {
6867
6868 /* The GNU C library defines this for functions which it implements
6869     to always fail with ENOSYS.  Some functions are actually named
6870     something starting with __ and the normal name is an alias.  */
6871 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6872 choke me
6873 #else
6874 $ac_func();
6875 #endif
6876
6877 ; return 0; }
6878 EOF
6879 if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6880   rm -rf conftest*
6881   eval "ac_cv_func_$ac_func=yes"
6882 else
6883   echo "configure: failed program was:" >&5
6884   cat conftest.$ac_ext >&5
6885   rm -rf conftest*
6886   eval "ac_cv_func_$ac_func=no"
6887 fi
6888 rm -f conftest*
6889 fi
6890
6891 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6892   echo "$ac_t""yes" 1>&6
6893     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6894   cat >> confdefs.h <<EOF
6895 #define $ac_tr_func 1
6896 EOF
6897  
6898 else
6899   echo "$ac_t""no" 1>&6
6900 fi
6901 done
6902
6903 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6904 do
6905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6906 echo "configure:6907: checking for $ac_func" >&5
6907 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6908   echo $ac_n "(cached) $ac_c" 1>&6
6909 else
6910   cat > conftest.$ac_ext <<EOF
6911 #line 6912 "configure"
6912 #include "confdefs.h"
6913 /* System header to define __stub macros and hopefully few prototypes,
6914     which can conflict with char $ac_func(); below.  */
6915 #include <assert.h>
6916 /* Override any gcc2 internal prototype to avoid an error.  */
6917 /* We use char because int might match the return type of a gcc2
6918     builtin and then its argument prototype would still apply.  */
6919 char $ac_func();
6920
6921 int main() {
6922
6923 /* The GNU C library defines this for functions which it implements
6924     to always fail with ENOSYS.  Some functions are actually named
6925     something starting with __ and the normal name is an alias.  */
6926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6927 choke me
6928 #else
6929 $ac_func();
6930 #endif
6931
6932 ; return 0; }
6933 EOF
6934 if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6935   rm -rf conftest*
6936   eval "ac_cv_func_$ac_func=yes"
6937 else
6938   echo "configure: failed program was:" >&5
6939   cat conftest.$ac_ext >&5
6940   rm -rf conftest*
6941   eval "ac_cv_func_$ac_func=no"
6942 fi
6943 rm -f conftest*
6944 fi
6945
6946 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6947   echo "$ac_t""yes" 1>&6
6948     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6949   cat >> confdefs.h <<EOF
6950 #define $ac_tr_func 1
6951 EOF
6952  
6953 else
6954   echo "$ac_t""no" 1>&6
6955 fi
6956 done
6957
6958 for ac_func in open64 _open64 __open64 creat64
6959 do
6960 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6961 echo "configure:6962: checking for $ac_func" >&5
6962 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6963   echo $ac_n "(cached) $ac_c" 1>&6
6964 else
6965   cat > conftest.$ac_ext <<EOF
6966 #line 6967 "configure"
6967 #include "confdefs.h"
6968 /* System header to define __stub macros and hopefully few prototypes,
6969     which can conflict with char $ac_func(); below.  */
6970 #include <assert.h>
6971 /* Override any gcc2 internal prototype to avoid an error.  */
6972 /* We use char because int might match the return type of a gcc2
6973     builtin and then its argument prototype would still apply.  */
6974 char $ac_func();
6975
6976 int main() {
6977
6978 /* The GNU C library defines this for functions which it implements
6979     to always fail with ENOSYS.  Some functions are actually named
6980     something starting with __ and the normal name is an alias.  */
6981 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6982 choke me
6983 #else
6984 $ac_func();
6985 #endif
6986
6987 ; return 0; }
6988 EOF
6989 if { (eval echo configure:6990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6990   rm -rf conftest*
6991   eval "ac_cv_func_$ac_func=yes"
6992 else
6993   echo "configure: failed program was:" >&5
6994   cat conftest.$ac_ext >&5
6995   rm -rf conftest*
6996   eval "ac_cv_func_$ac_func=no"
6997 fi
6998 rm -f conftest*
6999 fi
7000
7001 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7002   echo "$ac_t""yes" 1>&6
7003     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7004   cat >> confdefs.h <<EOF
7005 #define $ac_tr_func 1
7006 EOF
7007  
7008 else
7009   echo "$ac_t""no" 1>&6
7010 fi
7011 done
7012
7013
7014 #
7015 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
7016 #
7017
7018 if test x$ac_cv_func_stat64 = xno ; then
7019   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
7020 echo "configure:7021: checking for stat64 in <sys/stat.h>" >&5
7021   cat > conftest.$ac_ext <<EOF
7022 #line 7023 "configure"
7023 #include "confdefs.h"
7024
7025 #if defined(HAVE_UNISTD_H)
7026 #include <unistd.h>
7027 #endif
7028 #include <sys/stat.h>
7029
7030 int main() {
7031 struct stat64 st64; exit(stat64(".",&st64));
7032 ; return 0; }
7033 EOF
7034 if { (eval echo configure:7035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7035   rm -rf conftest*
7036   ac_cv_func_stat64=yes
7037 else
7038   echo "configure: failed program was:" >&5
7039   cat conftest.$ac_ext >&5
7040 fi
7041 rm -f conftest*
7042   echo "$ac_t""$ac_cv_func_stat64" 1>&6
7043   if test x$ac_cv_func_stat64 = xyes ; then
7044     cat >> confdefs.h <<\EOF
7045 #define HAVE_STAT64 1
7046 EOF
7047
7048   fi
7049 fi
7050
7051 if test x$ac_cv_func_lstat64 = xno ; then
7052   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
7053 echo "configure:7054: checking for lstat64 in <sys/stat.h>" >&5
7054   cat > conftest.$ac_ext <<EOF
7055 #line 7056 "configure"
7056 #include "confdefs.h"
7057
7058 #if defined(HAVE_UNISTD_H)
7059 #include <unistd.h>
7060 #endif
7061 #include <sys/stat.h>
7062
7063 int main() {
7064 struct stat64 st64; exit(lstat64(".",&st64));
7065 ; return 0; }
7066 EOF
7067 if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7068   rm -rf conftest*
7069   ac_cv_func_lstat64=yes
7070 else
7071   echo "configure: failed program was:" >&5
7072   cat conftest.$ac_ext >&5
7073 fi
7074 rm -f conftest*
7075   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
7076   if test x$ac_cv_func_lstat64 = xyes ; then
7077     cat >> confdefs.h <<\EOF
7078 #define HAVE_LSTAT64 Whether lstat64() is available
7079 EOF
7080
7081   fi
7082 fi
7083
7084 if test x$ac_cv_func_fstat64 = xno ; then
7085   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
7086 echo "configure:7087: checking for fstat64 in <sys/stat.h>" >&5
7087   cat > conftest.$ac_ext <<EOF
7088 #line 7089 "configure"
7089 #include "confdefs.h"
7090
7091 #if defined(HAVE_UNISTD_H)
7092 #include <unistd.h>
7093 #endif
7094 #include <sys/stat.h>
7095
7096 int main() {
7097 struct stat64 st64; exit(fstat64(0,&st64));
7098 ; return 0; }
7099 EOF
7100 if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7101   rm -rf conftest*
7102   ac_cv_func_fstat64=yes
7103 else
7104   echo "configure: failed program was:" >&5
7105   cat conftest.$ac_ext >&5
7106 fi
7107 rm -f conftest*
7108   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7109   if test x$ac_cv_func_fstat64 = xyes ; then
7110     cat >> confdefs.h <<\EOF
7111 #define HAVE_FSTAT64 1
7112 EOF
7113
7114   fi
7115 fi
7116
7117 #####################################
7118 # we might need the resolv library on some systems
7119 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7120 echo "configure:7121: checking for dn_expand in -lresolv" >&5
7121 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7122 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7123   echo $ac_n "(cached) $ac_c" 1>&6
7124 else
7125   ac_save_LIBS="$LIBS"
7126 LIBS="-lresolv  $LIBS"
7127 cat > conftest.$ac_ext <<EOF
7128 #line 7129 "configure"
7129 #include "confdefs.h"
7130 /* Override any gcc2 internal prototype to avoid an error.  */
7131 /* We use char because int might match the return type of a gcc2
7132     builtin and then its argument prototype would still apply.  */
7133 char dn_expand();
7134
7135 int main() {
7136 dn_expand()
7137 ; return 0; }
7138 EOF
7139 if { (eval echo configure:7140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7140   rm -rf conftest*
7141   eval "ac_cv_lib_$ac_lib_var=yes"
7142 else
7143   echo "configure: failed program was:" >&5
7144   cat conftest.$ac_ext >&5
7145   rm -rf conftest*
7146   eval "ac_cv_lib_$ac_lib_var=no"
7147 fi
7148 rm -f conftest*
7149 LIBS="$ac_save_LIBS"
7150
7151 fi
7152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7153   echo "$ac_t""yes" 1>&6
7154     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7155     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7156   cat >> confdefs.h <<EOF
7157 #define $ac_tr_lib 1
7158 EOF
7159
7160   LIBS="-lresolv $LIBS"
7161
7162 else
7163   echo "$ac_t""no" 1>&6
7164 fi
7165
7166
7167 #
7168 # Check for the functions putprpwnam, set_auth_parameters,
7169 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7170 # Needed for OSF1 and HPUX.
7171 #
7172
7173 case "$LIBS" in
7174   *-lsecurity*) for ac_func in putprpwnam
7175 do
7176 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7177 echo "configure:7178: checking for $ac_func" >&5
7178 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7179   echo $ac_n "(cached) $ac_c" 1>&6
7180 else
7181   cat > conftest.$ac_ext <<EOF
7182 #line 7183 "configure"
7183 #include "confdefs.h"
7184 /* System header to define __stub macros and hopefully few prototypes,
7185     which can conflict with char $ac_func(); below.  */
7186 #include <assert.h>
7187 /* Override any gcc2 internal prototype to avoid an error.  */
7188 /* We use char because int might match the return type of a gcc2
7189     builtin and then its argument prototype would still apply.  */
7190 char $ac_func();
7191
7192 int main() {
7193
7194 /* The GNU C library defines this for functions which it implements
7195     to always fail with ENOSYS.  Some functions are actually named
7196     something starting with __ and the normal name is an alias.  */
7197 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7198 choke me
7199 #else
7200 $ac_func();
7201 #endif
7202
7203 ; return 0; }
7204 EOF
7205 if { (eval echo configure:7206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7206   rm -rf conftest*
7207   eval "ac_cv_func_$ac_func=yes"
7208 else
7209   echo "configure: failed program was:" >&5
7210   cat conftest.$ac_ext >&5
7211   rm -rf conftest*
7212   eval "ac_cv_func_$ac_func=no"
7213 fi
7214 rm -f conftest*
7215 fi
7216
7217 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7218   echo "$ac_t""yes" 1>&6
7219     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7220   cat >> confdefs.h <<EOF
7221 #define $ac_tr_func 1
7222 EOF
7223  
7224 else
7225   echo "$ac_t""no" 1>&6
7226 fi
7227 done
7228  ;;
7229   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7230 echo "configure:7231: checking for putprpwnam in -lsecurity" >&5
7231 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7232 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7233   echo $ac_n "(cached) $ac_c" 1>&6
7234 else
7235   ac_save_LIBS="$LIBS"
7236 LIBS="-lsecurity  $LIBS"
7237 cat > conftest.$ac_ext <<EOF
7238 #line 7239 "configure"
7239 #include "confdefs.h"
7240 /* Override any gcc2 internal prototype to avoid an error.  */
7241 /* We use char because int might match the return type of a gcc2
7242     builtin and then its argument prototype would still apply.  */
7243 char putprpwnam();
7244
7245 int main() {
7246 putprpwnam()
7247 ; return 0; }
7248 EOF
7249 if { (eval echo configure:7250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7250   rm -rf conftest*
7251   eval "ac_cv_lib_$ac_lib_var=yes"
7252 else
7253   echo "configure: failed program was:" >&5
7254   cat conftest.$ac_ext >&5
7255   rm -rf conftest*
7256   eval "ac_cv_lib_$ac_lib_var=no"
7257 fi
7258 rm -f conftest*
7259 LIBS="$ac_save_LIBS"
7260
7261 fi
7262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7263   echo "$ac_t""yes" 1>&6
7264     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7265     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7266   cat >> confdefs.h <<EOF
7267 #define $ac_tr_lib 1
7268 EOF
7269
7270   LIBS="-lsecurity $LIBS"
7271
7272 else
7273   echo "$ac_t""no" 1>&6
7274 fi
7275  
7276      for ac_func in putprpwnam
7277 do
7278 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7279 echo "configure:7280: checking for $ac_func" >&5
7280 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7281   echo $ac_n "(cached) $ac_c" 1>&6
7282 else
7283   cat > conftest.$ac_ext <<EOF
7284 #line 7285 "configure"
7285 #include "confdefs.h"
7286 /* System header to define __stub macros and hopefully few prototypes,
7287     which can conflict with char $ac_func(); below.  */
7288 #include <assert.h>
7289 /* Override any gcc2 internal prototype to avoid an error.  */
7290 /* We use char because int might match the return type of a gcc2
7291     builtin and then its argument prototype would still apply.  */
7292 char $ac_func();
7293
7294 int main() {
7295
7296 /* The GNU C library defines this for functions which it implements
7297     to always fail with ENOSYS.  Some functions are actually named
7298     something starting with __ and the normal name is an alias.  */
7299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7300 choke me
7301 #else
7302 $ac_func();
7303 #endif
7304
7305 ; return 0; }
7306 EOF
7307 if { (eval echo configure:7308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7308   rm -rf conftest*
7309   eval "ac_cv_func_$ac_func=yes"
7310 else
7311   echo "configure: failed program was:" >&5
7312   cat conftest.$ac_ext >&5
7313   rm -rf conftest*
7314   eval "ac_cv_func_$ac_func=no"
7315 fi
7316 rm -f conftest*
7317 fi
7318
7319 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7320   echo "$ac_t""yes" 1>&6
7321     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7322   cat >> confdefs.h <<EOF
7323 #define $ac_tr_func 1
7324 EOF
7325  
7326 else
7327   echo "$ac_t""no" 1>&6
7328 fi
7329 done
7330
7331   ;;
7332   esac
7333
7334 case "$LIBS" in
7335   *-lsec*) for ac_func in putprpwnam
7336 do
7337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7338 echo "configure:7339: checking for $ac_func" >&5
7339 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7340   echo $ac_n "(cached) $ac_c" 1>&6
7341 else
7342   cat > conftest.$ac_ext <<EOF
7343 #line 7344 "configure"
7344 #include "confdefs.h"
7345 /* System header to define __stub macros and hopefully few prototypes,
7346     which can conflict with char $ac_func(); below.  */
7347 #include <assert.h>
7348 /* Override any gcc2 internal prototype to avoid an error.  */
7349 /* We use char because int might match the return type of a gcc2
7350     builtin and then its argument prototype would still apply.  */
7351 char $ac_func();
7352
7353 int main() {
7354
7355 /* The GNU C library defines this for functions which it implements
7356     to always fail with ENOSYS.  Some functions are actually named
7357     something starting with __ and the normal name is an alias.  */
7358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7359 choke me
7360 #else
7361 $ac_func();
7362 #endif
7363
7364 ; return 0; }
7365 EOF
7366 if { (eval echo configure:7367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7367   rm -rf conftest*
7368   eval "ac_cv_func_$ac_func=yes"
7369 else
7370   echo "configure: failed program was:" >&5
7371   cat conftest.$ac_ext >&5
7372   rm -rf conftest*
7373   eval "ac_cv_func_$ac_func=no"
7374 fi
7375 rm -f conftest*
7376 fi
7377
7378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7379   echo "$ac_t""yes" 1>&6
7380     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7381   cat >> confdefs.h <<EOF
7382 #define $ac_tr_func 1
7383 EOF
7384  
7385 else
7386   echo "$ac_t""no" 1>&6
7387 fi
7388 done
7389  ;;
7390   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7391 echo "configure:7392: checking for putprpwnam in -lsec" >&5
7392 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7393 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7394   echo $ac_n "(cached) $ac_c" 1>&6
7395 else
7396   ac_save_LIBS="$LIBS"
7397 LIBS="-lsec  $LIBS"
7398 cat > conftest.$ac_ext <<EOF
7399 #line 7400 "configure"
7400 #include "confdefs.h"
7401 /* Override any gcc2 internal prototype to avoid an error.  */
7402 /* We use char because int might match the return type of a gcc2
7403     builtin and then its argument prototype would still apply.  */
7404 char putprpwnam();
7405
7406 int main() {
7407 putprpwnam()
7408 ; return 0; }
7409 EOF
7410 if { (eval echo configure:7411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7411   rm -rf conftest*
7412   eval "ac_cv_lib_$ac_lib_var=yes"
7413 else
7414   echo "configure: failed program was:" >&5
7415   cat conftest.$ac_ext >&5
7416   rm -rf conftest*
7417   eval "ac_cv_lib_$ac_lib_var=no"
7418 fi
7419 rm -f conftest*
7420 LIBS="$ac_save_LIBS"
7421
7422 fi
7423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7424   echo "$ac_t""yes" 1>&6
7425     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7426     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7427   cat >> confdefs.h <<EOF
7428 #define $ac_tr_lib 1
7429 EOF
7430
7431   LIBS="-lsec $LIBS"
7432
7433 else
7434   echo "$ac_t""no" 1>&6
7435 fi
7436  
7437      for ac_func in putprpwnam
7438 do
7439 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7440 echo "configure:7441: checking for $ac_func" >&5
7441 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7442   echo $ac_n "(cached) $ac_c" 1>&6
7443 else
7444   cat > conftest.$ac_ext <<EOF
7445 #line 7446 "configure"
7446 #include "confdefs.h"
7447 /* System header to define __stub macros and hopefully few prototypes,
7448     which can conflict with char $ac_func(); below.  */
7449 #include <assert.h>
7450 /* Override any gcc2 internal prototype to avoid an error.  */
7451 /* We use char because int might match the return type of a gcc2
7452     builtin and then its argument prototype would still apply.  */
7453 char $ac_func();
7454
7455 int main() {
7456
7457 /* The GNU C library defines this for functions which it implements
7458     to always fail with ENOSYS.  Some functions are actually named
7459     something starting with __ and the normal name is an alias.  */
7460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7461 choke me
7462 #else
7463 $ac_func();
7464 #endif
7465
7466 ; return 0; }
7467 EOF
7468 if { (eval echo configure:7469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7469   rm -rf conftest*
7470   eval "ac_cv_func_$ac_func=yes"
7471 else
7472   echo "configure: failed program was:" >&5
7473   cat conftest.$ac_ext >&5
7474   rm -rf conftest*
7475   eval "ac_cv_func_$ac_func=no"
7476 fi
7477 rm -f conftest*
7478 fi
7479
7480 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7481   echo "$ac_t""yes" 1>&6
7482     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7483   cat >> confdefs.h <<EOF
7484 #define $ac_tr_func 1
7485 EOF
7486  
7487 else
7488   echo "$ac_t""no" 1>&6
7489 fi
7490 done
7491
7492   ;;
7493   esac
7494
7495
7496 case "$LIBS" in
7497   *-lsecurity*) for ac_func in set_auth_parameters
7498 do
7499 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7500 echo "configure:7501: checking for $ac_func" >&5
7501 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7502   echo $ac_n "(cached) $ac_c" 1>&6
7503 else
7504   cat > conftest.$ac_ext <<EOF
7505 #line 7506 "configure"
7506 #include "confdefs.h"
7507 /* System header to define __stub macros and hopefully few prototypes,
7508     which can conflict with char $ac_func(); below.  */
7509 #include <assert.h>
7510 /* Override any gcc2 internal prototype to avoid an error.  */
7511 /* We use char because int might match the return type of a gcc2
7512     builtin and then its argument prototype would still apply.  */
7513 char $ac_func();
7514
7515 int main() {
7516
7517 /* The GNU C library defines this for functions which it implements
7518     to always fail with ENOSYS.  Some functions are actually named
7519     something starting with __ and the normal name is an alias.  */
7520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7521 choke me
7522 #else
7523 $ac_func();
7524 #endif
7525
7526 ; return 0; }
7527 EOF
7528 if { (eval echo configure:7529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7529   rm -rf conftest*
7530   eval "ac_cv_func_$ac_func=yes"
7531 else
7532   echo "configure: failed program was:" >&5
7533   cat conftest.$ac_ext >&5
7534   rm -rf conftest*
7535   eval "ac_cv_func_$ac_func=no"
7536 fi
7537 rm -f conftest*
7538 fi
7539
7540 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7541   echo "$ac_t""yes" 1>&6
7542     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7543   cat >> confdefs.h <<EOF
7544 #define $ac_tr_func 1
7545 EOF
7546  
7547 else
7548   echo "$ac_t""no" 1>&6
7549 fi
7550 done
7551  ;;
7552   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7553 echo "configure:7554: checking for set_auth_parameters in -lsecurity" >&5
7554 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7555 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7556   echo $ac_n "(cached) $ac_c" 1>&6
7557 else
7558   ac_save_LIBS="$LIBS"
7559 LIBS="-lsecurity  $LIBS"
7560 cat > conftest.$ac_ext <<EOF
7561 #line 7562 "configure"
7562 #include "confdefs.h"
7563 /* Override any gcc2 internal prototype to avoid an error.  */
7564 /* We use char because int might match the return type of a gcc2
7565     builtin and then its argument prototype would still apply.  */
7566 char set_auth_parameters();
7567
7568 int main() {
7569 set_auth_parameters()
7570 ; return 0; }
7571 EOF
7572 if { (eval echo configure:7573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7573   rm -rf conftest*
7574   eval "ac_cv_lib_$ac_lib_var=yes"
7575 else
7576   echo "configure: failed program was:" >&5
7577   cat conftest.$ac_ext >&5
7578   rm -rf conftest*
7579   eval "ac_cv_lib_$ac_lib_var=no"
7580 fi
7581 rm -f conftest*
7582 LIBS="$ac_save_LIBS"
7583
7584 fi
7585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7586   echo "$ac_t""yes" 1>&6
7587     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7588     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7589   cat >> confdefs.h <<EOF
7590 #define $ac_tr_lib 1
7591 EOF
7592
7593   LIBS="-lsecurity $LIBS"
7594
7595 else
7596   echo "$ac_t""no" 1>&6
7597 fi
7598  
7599      for ac_func in set_auth_parameters
7600 do
7601 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7602 echo "configure:7603: checking for $ac_func" >&5
7603 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7604   echo $ac_n "(cached) $ac_c" 1>&6
7605 else
7606   cat > conftest.$ac_ext <<EOF
7607 #line 7608 "configure"
7608 #include "confdefs.h"
7609 /* System header to define __stub macros and hopefully few prototypes,
7610     which can conflict with char $ac_func(); below.  */
7611 #include <assert.h>
7612 /* Override any gcc2 internal prototype to avoid an error.  */
7613 /* We use char because int might match the return type of a gcc2
7614     builtin and then its argument prototype would still apply.  */
7615 char $ac_func();
7616
7617 int main() {
7618
7619 /* The GNU C library defines this for functions which it implements
7620     to always fail with ENOSYS.  Some functions are actually named
7621     something starting with __ and the normal name is an alias.  */
7622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7623 choke me
7624 #else
7625 $ac_func();
7626 #endif
7627
7628 ; return 0; }
7629 EOF
7630 if { (eval echo configure:7631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7631   rm -rf conftest*
7632   eval "ac_cv_func_$ac_func=yes"
7633 else
7634   echo "configure: failed program was:" >&5
7635   cat conftest.$ac_ext >&5
7636   rm -rf conftest*
7637   eval "ac_cv_func_$ac_func=no"
7638 fi
7639 rm -f conftest*
7640 fi
7641
7642 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7643   echo "$ac_t""yes" 1>&6
7644     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7645   cat >> confdefs.h <<EOF
7646 #define $ac_tr_func 1
7647 EOF
7648  
7649 else
7650   echo "$ac_t""no" 1>&6
7651 fi
7652 done
7653
7654   ;;
7655   esac
7656
7657 case "$LIBS" in
7658   *-lsec*) for ac_func in set_auth_parameters
7659 do
7660 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7661 echo "configure:7662: checking for $ac_func" >&5
7662 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7663   echo $ac_n "(cached) $ac_c" 1>&6
7664 else
7665   cat > conftest.$ac_ext <<EOF
7666 #line 7667 "configure"
7667 #include "confdefs.h"
7668 /* System header to define __stub macros and hopefully few prototypes,
7669     which can conflict with char $ac_func(); below.  */
7670 #include <assert.h>
7671 /* Override any gcc2 internal prototype to avoid an error.  */
7672 /* We use char because int might match the return type of a gcc2
7673     builtin and then its argument prototype would still apply.  */
7674 char $ac_func();
7675
7676 int main() {
7677
7678 /* The GNU C library defines this for functions which it implements
7679     to always fail with ENOSYS.  Some functions are actually named
7680     something starting with __ and the normal name is an alias.  */
7681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7682 choke me
7683 #else
7684 $ac_func();
7685 #endif
7686
7687 ; return 0; }
7688 EOF
7689 if { (eval echo configure:7690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7690   rm -rf conftest*
7691   eval "ac_cv_func_$ac_func=yes"
7692 else
7693   echo "configure: failed program was:" >&5
7694   cat conftest.$ac_ext >&5
7695   rm -rf conftest*
7696   eval "ac_cv_func_$ac_func=no"
7697 fi
7698 rm -f conftest*
7699 fi
7700
7701 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7702   echo "$ac_t""yes" 1>&6
7703     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7704   cat >> confdefs.h <<EOF
7705 #define $ac_tr_func 1
7706 EOF
7707  
7708 else
7709   echo "$ac_t""no" 1>&6
7710 fi
7711 done
7712  ;;
7713   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7714 echo "configure:7715: checking for set_auth_parameters in -lsec" >&5
7715 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7716 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7717   echo $ac_n "(cached) $ac_c" 1>&6
7718 else
7719   ac_save_LIBS="$LIBS"
7720 LIBS="-lsec  $LIBS"
7721 cat > conftest.$ac_ext <<EOF
7722 #line 7723 "configure"
7723 #include "confdefs.h"
7724 /* Override any gcc2 internal prototype to avoid an error.  */
7725 /* We use char because int might match the return type of a gcc2
7726     builtin and then its argument prototype would still apply.  */
7727 char set_auth_parameters();
7728
7729 int main() {
7730 set_auth_parameters()
7731 ; return 0; }
7732 EOF
7733 if { (eval echo configure:7734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7734   rm -rf conftest*
7735   eval "ac_cv_lib_$ac_lib_var=yes"
7736 else
7737   echo "configure: failed program was:" >&5
7738   cat conftest.$ac_ext >&5
7739   rm -rf conftest*
7740   eval "ac_cv_lib_$ac_lib_var=no"
7741 fi
7742 rm -f conftest*
7743 LIBS="$ac_save_LIBS"
7744
7745 fi
7746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7747   echo "$ac_t""yes" 1>&6
7748     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7749     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7750   cat >> confdefs.h <<EOF
7751 #define $ac_tr_lib 1
7752 EOF
7753
7754   LIBS="-lsec $LIBS"
7755
7756 else
7757   echo "$ac_t""no" 1>&6
7758 fi
7759  
7760      for ac_func in set_auth_parameters
7761 do
7762 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7763 echo "configure:7764: checking for $ac_func" >&5
7764 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7765   echo $ac_n "(cached) $ac_c" 1>&6
7766 else
7767   cat > conftest.$ac_ext <<EOF
7768 #line 7769 "configure"
7769 #include "confdefs.h"
7770 /* System header to define __stub macros and hopefully few prototypes,
7771     which can conflict with char $ac_func(); below.  */
7772 #include <assert.h>
7773 /* Override any gcc2 internal prototype to avoid an error.  */
7774 /* We use char because int might match the return type of a gcc2
7775     builtin and then its argument prototype would still apply.  */
7776 char $ac_func();
7777
7778 int main() {
7779
7780 /* The GNU C library defines this for functions which it implements
7781     to always fail with ENOSYS.  Some functions are actually named
7782     something starting with __ and the normal name is an alias.  */
7783 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7784 choke me
7785 #else
7786 $ac_func();
7787 #endif
7788
7789 ; return 0; }
7790 EOF
7791 if { (eval echo configure:7792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7792   rm -rf conftest*
7793   eval "ac_cv_func_$ac_func=yes"
7794 else
7795   echo "configure: failed program was:" >&5
7796   cat conftest.$ac_ext >&5
7797   rm -rf conftest*
7798   eval "ac_cv_func_$ac_func=no"
7799 fi
7800 rm -f conftest*
7801 fi
7802
7803 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7804   echo "$ac_t""yes" 1>&6
7805     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7806   cat >> confdefs.h <<EOF
7807 #define $ac_tr_func 1
7808 EOF
7809  
7810 else
7811   echo "$ac_t""no" 1>&6
7812 fi
7813 done
7814
7815   ;;
7816   esac
7817
7818
7819 # UnixWare 7.x has its getspnam in -lgen
7820 case "$LIBS" in
7821   *-lgen*) for ac_func in getspnam
7822 do
7823 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7824 echo "configure:7825: checking for $ac_func" >&5
7825 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7826   echo $ac_n "(cached) $ac_c" 1>&6
7827 else
7828   cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831 /* System header to define __stub macros and hopefully few prototypes,
7832     which can conflict with char $ac_func(); below.  */
7833 #include <assert.h>
7834 /* Override any gcc2 internal prototype to avoid an error.  */
7835 /* We use char because int might match the return type of a gcc2
7836     builtin and then its argument prototype would still apply.  */
7837 char $ac_func();
7838
7839 int main() {
7840
7841 /* The GNU C library defines this for functions which it implements
7842     to always fail with ENOSYS.  Some functions are actually named
7843     something starting with __ and the normal name is an alias.  */
7844 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7845 choke me
7846 #else
7847 $ac_func();
7848 #endif
7849
7850 ; return 0; }
7851 EOF
7852 if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7853   rm -rf conftest*
7854   eval "ac_cv_func_$ac_func=yes"
7855 else
7856   echo "configure: failed program was:" >&5
7857   cat conftest.$ac_ext >&5
7858   rm -rf conftest*
7859   eval "ac_cv_func_$ac_func=no"
7860 fi
7861 rm -f conftest*
7862 fi
7863
7864 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7865   echo "$ac_t""yes" 1>&6
7866     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7867   cat >> confdefs.h <<EOF
7868 #define $ac_tr_func 1
7869 EOF
7870  
7871 else
7872   echo "$ac_t""no" 1>&6
7873 fi
7874 done
7875  ;;
7876   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7877 echo "configure:7878: checking for getspnam in -lgen" >&5
7878 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7880   echo $ac_n "(cached) $ac_c" 1>&6
7881 else
7882   ac_save_LIBS="$LIBS"
7883 LIBS="-lgen  $LIBS"
7884 cat > conftest.$ac_ext <<EOF
7885 #line 7886 "configure"
7886 #include "confdefs.h"
7887 /* Override any gcc2 internal prototype to avoid an error.  */
7888 /* We use char because int might match the return type of a gcc2
7889     builtin and then its argument prototype would still apply.  */
7890 char getspnam();
7891
7892 int main() {
7893 getspnam()
7894 ; return 0; }
7895 EOF
7896 if { (eval echo configure:7897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7897   rm -rf conftest*
7898   eval "ac_cv_lib_$ac_lib_var=yes"
7899 else
7900   echo "configure: failed program was:" >&5
7901   cat conftest.$ac_ext >&5
7902   rm -rf conftest*
7903   eval "ac_cv_lib_$ac_lib_var=no"
7904 fi
7905 rm -f conftest*
7906 LIBS="$ac_save_LIBS"
7907
7908 fi
7909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7910   echo "$ac_t""yes" 1>&6
7911     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7912     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7913   cat >> confdefs.h <<EOF
7914 #define $ac_tr_lib 1
7915 EOF
7916
7917   LIBS="-lgen $LIBS"
7918
7919 else
7920   echo "$ac_t""no" 1>&6
7921 fi
7922  
7923      for ac_func in getspnam
7924 do
7925 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7926 echo "configure:7927: checking for $ac_func" >&5
7927 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7928   echo $ac_n "(cached) $ac_c" 1>&6
7929 else
7930   cat > conftest.$ac_ext <<EOF
7931 #line 7932 "configure"
7932 #include "confdefs.h"
7933 /* System header to define __stub macros and hopefully few prototypes,
7934     which can conflict with char $ac_func(); below.  */
7935 #include <assert.h>
7936 /* Override any gcc2 internal prototype to avoid an error.  */
7937 /* We use char because int might match the return type of a gcc2
7938     builtin and then its argument prototype would still apply.  */
7939 char $ac_func();
7940
7941 int main() {
7942
7943 /* The GNU C library defines this for functions which it implements
7944     to always fail with ENOSYS.  Some functions are actually named
7945     something starting with __ and the normal name is an alias.  */
7946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7947 choke me
7948 #else
7949 $ac_func();
7950 #endif
7951
7952 ; return 0; }
7953 EOF
7954 if { (eval echo configure:7955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7955   rm -rf conftest*
7956   eval "ac_cv_func_$ac_func=yes"
7957 else
7958   echo "configure: failed program was:" >&5
7959   cat conftest.$ac_ext >&5
7960   rm -rf conftest*
7961   eval "ac_cv_func_$ac_func=no"
7962 fi
7963 rm -f conftest*
7964 fi
7965
7966 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7967   echo "$ac_t""yes" 1>&6
7968     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7969   cat >> confdefs.h <<EOF
7970 #define $ac_tr_func 1
7971 EOF
7972  
7973 else
7974   echo "$ac_t""no" 1>&6
7975 fi
7976 done
7977
7978   ;;
7979   esac
7980
7981
7982 case "$LIBS" in
7983   *-lsecurity*) for ac_func in getspnam
7984 do
7985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7986 echo "configure:7987: checking for $ac_func" >&5
7987 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7988   echo $ac_n "(cached) $ac_c" 1>&6
7989 else
7990   cat > conftest.$ac_ext <<EOF
7991 #line 7992 "configure"
7992 #include "confdefs.h"
7993 /* System header to define __stub macros and hopefully few prototypes,
7994     which can conflict with char $ac_func(); below.  */
7995 #include <assert.h>
7996 /* Override any gcc2 internal prototype to avoid an error.  */
7997 /* We use char because int might match the return type of a gcc2
7998     builtin and then its argument prototype would still apply.  */
7999 char $ac_func();
8000
8001 int main() {
8002
8003 /* The GNU C library defines this for functions which it implements
8004     to always fail with ENOSYS.  Some functions are actually named
8005     something starting with __ and the normal name is an alias.  */
8006 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8007 choke me
8008 #else
8009 $ac_func();
8010 #endif
8011
8012 ; return 0; }
8013 EOF
8014 if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8015   rm -rf conftest*
8016   eval "ac_cv_func_$ac_func=yes"
8017 else
8018   echo "configure: failed program was:" >&5
8019   cat conftest.$ac_ext >&5
8020   rm -rf conftest*
8021   eval "ac_cv_func_$ac_func=no"
8022 fi
8023 rm -f conftest*
8024 fi
8025
8026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8027   echo "$ac_t""yes" 1>&6
8028     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8029   cat >> confdefs.h <<EOF
8030 #define $ac_tr_func 1
8031 EOF
8032  
8033 else
8034   echo "$ac_t""no" 1>&6
8035 fi
8036 done
8037  ;;
8038   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
8039 echo "configure:8040: checking for getspnam in -lsecurity" >&5
8040 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
8041 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8042   echo $ac_n "(cached) $ac_c" 1>&6
8043 else
8044   ac_save_LIBS="$LIBS"
8045 LIBS="-lsecurity  $LIBS"
8046 cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049 /* Override any gcc2 internal prototype to avoid an error.  */
8050 /* We use char because int might match the return type of a gcc2
8051     builtin and then its argument prototype would still apply.  */
8052 char getspnam();
8053
8054 int main() {
8055 getspnam()
8056 ; return 0; }
8057 EOF
8058 if { (eval echo configure:8059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8059   rm -rf conftest*
8060   eval "ac_cv_lib_$ac_lib_var=yes"
8061 else
8062   echo "configure: failed program was:" >&5
8063   cat conftest.$ac_ext >&5
8064   rm -rf conftest*
8065   eval "ac_cv_lib_$ac_lib_var=no"
8066 fi
8067 rm -f conftest*
8068 LIBS="$ac_save_LIBS"
8069
8070 fi
8071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8072   echo "$ac_t""yes" 1>&6
8073     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8074     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8075   cat >> confdefs.h <<EOF
8076 #define $ac_tr_lib 1
8077 EOF
8078
8079   LIBS="-lsecurity $LIBS"
8080
8081 else
8082   echo "$ac_t""no" 1>&6
8083 fi
8084  
8085      for ac_func in getspnam
8086 do
8087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8088 echo "configure:8089: checking for $ac_func" >&5
8089 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8090   echo $ac_n "(cached) $ac_c" 1>&6
8091 else
8092   cat > conftest.$ac_ext <<EOF
8093 #line 8094 "configure"
8094 #include "confdefs.h"
8095 /* System header to define __stub macros and hopefully few prototypes,
8096     which can conflict with char $ac_func(); below.  */
8097 #include <assert.h>
8098 /* Override any gcc2 internal prototype to avoid an error.  */
8099 /* We use char because int might match the return type of a gcc2
8100     builtin and then its argument prototype would still apply.  */
8101 char $ac_func();
8102
8103 int main() {
8104
8105 /* The GNU C library defines this for functions which it implements
8106     to always fail with ENOSYS.  Some functions are actually named
8107     something starting with __ and the normal name is an alias.  */
8108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8109 choke me
8110 #else
8111 $ac_func();
8112 #endif
8113
8114 ; return 0; }
8115 EOF
8116 if { (eval echo configure:8117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8117   rm -rf conftest*
8118   eval "ac_cv_func_$ac_func=yes"
8119 else
8120   echo "configure: failed program was:" >&5
8121   cat conftest.$ac_ext >&5
8122   rm -rf conftest*
8123   eval "ac_cv_func_$ac_func=no"
8124 fi
8125 rm -f conftest*
8126 fi
8127
8128 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8129   echo "$ac_t""yes" 1>&6
8130     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8131   cat >> confdefs.h <<EOF
8132 #define $ac_tr_func 1
8133 EOF
8134  
8135 else
8136   echo "$ac_t""no" 1>&6
8137 fi
8138 done
8139
8140   ;;
8141   esac
8142
8143 case "$LIBS" in
8144   *-lsec*) for ac_func in getspnam
8145 do
8146 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8147 echo "configure:8148: checking for $ac_func" >&5
8148 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8149   echo $ac_n "(cached) $ac_c" 1>&6
8150 else
8151   cat > conftest.$ac_ext <<EOF
8152 #line 8153 "configure"
8153 #include "confdefs.h"
8154 /* System header to define __stub macros and hopefully few prototypes,
8155     which can conflict with char $ac_func(); below.  */
8156 #include <assert.h>
8157 /* Override any gcc2 internal prototype to avoid an error.  */
8158 /* We use char because int might match the return type of a gcc2
8159     builtin and then its argument prototype would still apply.  */
8160 char $ac_func();
8161
8162 int main() {
8163
8164 /* The GNU C library defines this for functions which it implements
8165     to always fail with ENOSYS.  Some functions are actually named
8166     something starting with __ and the normal name is an alias.  */
8167 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8168 choke me
8169 #else
8170 $ac_func();
8171 #endif
8172
8173 ; return 0; }
8174 EOF
8175 if { (eval echo configure:8176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8176   rm -rf conftest*
8177   eval "ac_cv_func_$ac_func=yes"
8178 else
8179   echo "configure: failed program was:" >&5
8180   cat conftest.$ac_ext >&5
8181   rm -rf conftest*
8182   eval "ac_cv_func_$ac_func=no"
8183 fi
8184 rm -f conftest*
8185 fi
8186
8187 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8188   echo "$ac_t""yes" 1>&6
8189     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8190   cat >> confdefs.h <<EOF
8191 #define $ac_tr_func 1
8192 EOF
8193  
8194 else
8195   echo "$ac_t""no" 1>&6
8196 fi
8197 done
8198  ;;
8199   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8200 echo "configure:8201: checking for getspnam in -lsec" >&5
8201 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8202 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8203   echo $ac_n "(cached) $ac_c" 1>&6
8204 else
8205   ac_save_LIBS="$LIBS"
8206 LIBS="-lsec  $LIBS"
8207 cat > conftest.$ac_ext <<EOF
8208 #line 8209 "configure"
8209 #include "confdefs.h"
8210 /* Override any gcc2 internal prototype to avoid an error.  */
8211 /* We use char because int might match the return type of a gcc2
8212     builtin and then its argument prototype would still apply.  */
8213 char getspnam();
8214
8215 int main() {
8216 getspnam()
8217 ; return 0; }
8218 EOF
8219 if { (eval echo configure:8220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8220   rm -rf conftest*
8221   eval "ac_cv_lib_$ac_lib_var=yes"
8222 else
8223   echo "configure: failed program was:" >&5
8224   cat conftest.$ac_ext >&5
8225   rm -rf conftest*
8226   eval "ac_cv_lib_$ac_lib_var=no"
8227 fi
8228 rm -f conftest*
8229 LIBS="$ac_save_LIBS"
8230
8231 fi
8232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8233   echo "$ac_t""yes" 1>&6
8234     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8235     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8236   cat >> confdefs.h <<EOF
8237 #define $ac_tr_lib 1
8238 EOF
8239
8240   LIBS="-lsec $LIBS"
8241
8242 else
8243   echo "$ac_t""no" 1>&6
8244 fi
8245  
8246      for ac_func in getspnam
8247 do
8248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8249 echo "configure:8250: checking for $ac_func" >&5
8250 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8251   echo $ac_n "(cached) $ac_c" 1>&6
8252 else
8253   cat > conftest.$ac_ext <<EOF
8254 #line 8255 "configure"
8255 #include "confdefs.h"
8256 /* System header to define __stub macros and hopefully few prototypes,
8257     which can conflict with char $ac_func(); below.  */
8258 #include <assert.h>
8259 /* Override any gcc2 internal prototype to avoid an error.  */
8260 /* We use char because int might match the return type of a gcc2
8261     builtin and then its argument prototype would still apply.  */
8262 char $ac_func();
8263
8264 int main() {
8265
8266 /* The GNU C library defines this for functions which it implements
8267     to always fail with ENOSYS.  Some functions are actually named
8268     something starting with __ and the normal name is an alias.  */
8269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8270 choke me
8271 #else
8272 $ac_func();
8273 #endif
8274
8275 ; return 0; }
8276 EOF
8277 if { (eval echo configure:8278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8278   rm -rf conftest*
8279   eval "ac_cv_func_$ac_func=yes"
8280 else
8281   echo "configure: failed program was:" >&5
8282   cat conftest.$ac_ext >&5
8283   rm -rf conftest*
8284   eval "ac_cv_func_$ac_func=no"
8285 fi
8286 rm -f conftest*
8287 fi
8288
8289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8290   echo "$ac_t""yes" 1>&6
8291     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8292   cat >> confdefs.h <<EOF
8293 #define $ac_tr_func 1
8294 EOF
8295  
8296 else
8297   echo "$ac_t""no" 1>&6
8298 fi
8299 done
8300
8301   ;;
8302   esac
8303
8304
8305 case "$LIBS" in
8306   *-lsecurity*) for ac_func in bigcrypt
8307 do
8308 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8309 echo "configure:8310: checking for $ac_func" >&5
8310 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8311   echo $ac_n "(cached) $ac_c" 1>&6
8312 else
8313   cat > conftest.$ac_ext <<EOF
8314 #line 8315 "configure"
8315 #include "confdefs.h"
8316 /* System header to define __stub macros and hopefully few prototypes,
8317     which can conflict with char $ac_func(); below.  */
8318 #include <assert.h>
8319 /* Override any gcc2 internal prototype to avoid an error.  */
8320 /* We use char because int might match the return type of a gcc2
8321     builtin and then its argument prototype would still apply.  */
8322 char $ac_func();
8323
8324 int main() {
8325
8326 /* The GNU C library defines this for functions which it implements
8327     to always fail with ENOSYS.  Some functions are actually named
8328     something starting with __ and the normal name is an alias.  */
8329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8330 choke me
8331 #else
8332 $ac_func();
8333 #endif
8334
8335 ; return 0; }
8336 EOF
8337 if { (eval echo configure:8338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8338   rm -rf conftest*
8339   eval "ac_cv_func_$ac_func=yes"
8340 else
8341   echo "configure: failed program was:" >&5
8342   cat conftest.$ac_ext >&5
8343   rm -rf conftest*
8344   eval "ac_cv_func_$ac_func=no"
8345 fi
8346 rm -f conftest*
8347 fi
8348
8349 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8350   echo "$ac_t""yes" 1>&6
8351     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8352   cat >> confdefs.h <<EOF
8353 #define $ac_tr_func 1
8354 EOF
8355  
8356 else
8357   echo "$ac_t""no" 1>&6
8358 fi
8359 done
8360  ;;
8361   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8362 echo "configure:8363: checking for bigcrypt in -lsecurity" >&5
8363 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8364 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8365   echo $ac_n "(cached) $ac_c" 1>&6
8366 else
8367   ac_save_LIBS="$LIBS"
8368 LIBS="-lsecurity  $LIBS"
8369 cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 /* Override any gcc2 internal prototype to avoid an error.  */
8373 /* We use char because int might match the return type of a gcc2
8374     builtin and then its argument prototype would still apply.  */
8375 char bigcrypt();
8376
8377 int main() {
8378 bigcrypt()
8379 ; return 0; }
8380 EOF
8381 if { (eval echo configure:8382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8382   rm -rf conftest*
8383   eval "ac_cv_lib_$ac_lib_var=yes"
8384 else
8385   echo "configure: failed program was:" >&5
8386   cat conftest.$ac_ext >&5
8387   rm -rf conftest*
8388   eval "ac_cv_lib_$ac_lib_var=no"
8389 fi
8390 rm -f conftest*
8391 LIBS="$ac_save_LIBS"
8392
8393 fi
8394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8395   echo "$ac_t""yes" 1>&6
8396     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8397     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8398   cat >> confdefs.h <<EOF
8399 #define $ac_tr_lib 1
8400 EOF
8401
8402   LIBS="-lsecurity $LIBS"
8403
8404 else
8405   echo "$ac_t""no" 1>&6
8406 fi
8407  
8408      for ac_func in bigcrypt
8409 do
8410 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8411 echo "configure:8412: checking for $ac_func" >&5
8412 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8413   echo $ac_n "(cached) $ac_c" 1>&6
8414 else
8415   cat > conftest.$ac_ext <<EOF
8416 #line 8417 "configure"
8417 #include "confdefs.h"
8418 /* System header to define __stub macros and hopefully few prototypes,
8419     which can conflict with char $ac_func(); below.  */
8420 #include <assert.h>
8421 /* Override any gcc2 internal prototype to avoid an error.  */
8422 /* We use char because int might match the return type of a gcc2
8423     builtin and then its argument prototype would still apply.  */
8424 char $ac_func();
8425
8426 int main() {
8427
8428 /* The GNU C library defines this for functions which it implements
8429     to always fail with ENOSYS.  Some functions are actually named
8430     something starting with __ and the normal name is an alias.  */
8431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8432 choke me
8433 #else
8434 $ac_func();
8435 #endif
8436
8437 ; return 0; }
8438 EOF
8439 if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8440   rm -rf conftest*
8441   eval "ac_cv_func_$ac_func=yes"
8442 else
8443   echo "configure: failed program was:" >&5
8444   cat conftest.$ac_ext >&5
8445   rm -rf conftest*
8446   eval "ac_cv_func_$ac_func=no"
8447 fi
8448 rm -f conftest*
8449 fi
8450
8451 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8452   echo "$ac_t""yes" 1>&6
8453     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8454   cat >> confdefs.h <<EOF
8455 #define $ac_tr_func 1
8456 EOF
8457  
8458 else
8459   echo "$ac_t""no" 1>&6
8460 fi
8461 done
8462
8463   ;;
8464   esac
8465
8466 case "$LIBS" in
8467   *-lsec*) for ac_func in bigcrypt
8468 do
8469 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8470 echo "configure:8471: checking for $ac_func" >&5
8471 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8472   echo $ac_n "(cached) $ac_c" 1>&6
8473 else
8474   cat > conftest.$ac_ext <<EOF
8475 #line 8476 "configure"
8476 #include "confdefs.h"
8477 /* System header to define __stub macros and hopefully few prototypes,
8478     which can conflict with char $ac_func(); below.  */
8479 #include <assert.h>
8480 /* Override any gcc2 internal prototype to avoid an error.  */
8481 /* We use char because int might match the return type of a gcc2
8482     builtin and then its argument prototype would still apply.  */
8483 char $ac_func();
8484
8485 int main() {
8486
8487 /* The GNU C library defines this for functions which it implements
8488     to always fail with ENOSYS.  Some functions are actually named
8489     something starting with __ and the normal name is an alias.  */
8490 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8491 choke me
8492 #else
8493 $ac_func();
8494 #endif
8495
8496 ; return 0; }
8497 EOF
8498 if { (eval echo configure:8499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8499   rm -rf conftest*
8500   eval "ac_cv_func_$ac_func=yes"
8501 else
8502   echo "configure: failed program was:" >&5
8503   cat conftest.$ac_ext >&5
8504   rm -rf conftest*
8505   eval "ac_cv_func_$ac_func=no"
8506 fi
8507 rm -f conftest*
8508 fi
8509
8510 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8511   echo "$ac_t""yes" 1>&6
8512     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8513   cat >> confdefs.h <<EOF
8514 #define $ac_tr_func 1
8515 EOF
8516  
8517 else
8518   echo "$ac_t""no" 1>&6
8519 fi
8520 done
8521  ;;
8522   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8523 echo "configure:8524: checking for bigcrypt in -lsec" >&5
8524 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8525 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8526   echo $ac_n "(cached) $ac_c" 1>&6
8527 else
8528   ac_save_LIBS="$LIBS"
8529 LIBS="-lsec  $LIBS"
8530 cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533 /* Override any gcc2 internal prototype to avoid an error.  */
8534 /* We use char because int might match the return type of a gcc2
8535     builtin and then its argument prototype would still apply.  */
8536 char bigcrypt();
8537
8538 int main() {
8539 bigcrypt()
8540 ; return 0; }
8541 EOF
8542 if { (eval echo configure:8543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8543   rm -rf conftest*
8544   eval "ac_cv_lib_$ac_lib_var=yes"
8545 else
8546   echo "configure: failed program was:" >&5
8547   cat conftest.$ac_ext >&5
8548   rm -rf conftest*
8549   eval "ac_cv_lib_$ac_lib_var=no"
8550 fi
8551 rm -f conftest*
8552 LIBS="$ac_save_LIBS"
8553
8554 fi
8555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8556   echo "$ac_t""yes" 1>&6
8557     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8558     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8559   cat >> confdefs.h <<EOF
8560 #define $ac_tr_lib 1
8561 EOF
8562
8563   LIBS="-lsec $LIBS"
8564
8565 else
8566   echo "$ac_t""no" 1>&6
8567 fi
8568  
8569      for ac_func in bigcrypt
8570 do
8571 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8572 echo "configure:8573: checking for $ac_func" >&5
8573 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8574   echo $ac_n "(cached) $ac_c" 1>&6
8575 else
8576   cat > conftest.$ac_ext <<EOF
8577 #line 8578 "configure"
8578 #include "confdefs.h"
8579 /* System header to define __stub macros and hopefully few prototypes,
8580     which can conflict with char $ac_func(); below.  */
8581 #include <assert.h>
8582 /* Override any gcc2 internal prototype to avoid an error.  */
8583 /* We use char because int might match the return type of a gcc2
8584     builtin and then its argument prototype would still apply.  */
8585 char $ac_func();
8586
8587 int main() {
8588
8589 /* The GNU C library defines this for functions which it implements
8590     to always fail with ENOSYS.  Some functions are actually named
8591     something starting with __ and the normal name is an alias.  */
8592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8593 choke me
8594 #else
8595 $ac_func();
8596 #endif
8597
8598 ; return 0; }
8599 EOF
8600 if { (eval echo configure:8601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8601   rm -rf conftest*
8602   eval "ac_cv_func_$ac_func=yes"
8603 else
8604   echo "configure: failed program was:" >&5
8605   cat conftest.$ac_ext >&5
8606   rm -rf conftest*
8607   eval "ac_cv_func_$ac_func=no"
8608 fi
8609 rm -f conftest*
8610 fi
8611
8612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8615   cat >> confdefs.h <<EOF
8616 #define $ac_tr_func 1
8617 EOF
8618  
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622 done
8623
8624   ;;
8625   esac
8626
8627
8628 case "$LIBS" in
8629   *-lsecurity*) for ac_func in getprpwnam
8630 do
8631 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8632 echo "configure:8633: checking for $ac_func" >&5
8633 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8634   echo $ac_n "(cached) $ac_c" 1>&6
8635 else
8636   cat > conftest.$ac_ext <<EOF
8637 #line 8638 "configure"
8638 #include "confdefs.h"
8639 /* System header to define __stub macros and hopefully few prototypes,
8640     which can conflict with char $ac_func(); below.  */
8641 #include <assert.h>
8642 /* Override any gcc2 internal prototype to avoid an error.  */
8643 /* We use char because int might match the return type of a gcc2
8644     builtin and then its argument prototype would still apply.  */
8645 char $ac_func();
8646
8647 int main() {
8648
8649 /* The GNU C library defines this for functions which it implements
8650     to always fail with ENOSYS.  Some functions are actually named
8651     something starting with __ and the normal name is an alias.  */
8652 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8653 choke me
8654 #else
8655 $ac_func();
8656 #endif
8657
8658 ; return 0; }
8659 EOF
8660 if { (eval echo configure:8661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8661   rm -rf conftest*
8662   eval "ac_cv_func_$ac_func=yes"
8663 else
8664   echo "configure: failed program was:" >&5
8665   cat conftest.$ac_ext >&5
8666   rm -rf conftest*
8667   eval "ac_cv_func_$ac_func=no"
8668 fi
8669 rm -f conftest*
8670 fi
8671
8672 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8673   echo "$ac_t""yes" 1>&6
8674     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8675   cat >> confdefs.h <<EOF
8676 #define $ac_tr_func 1
8677 EOF
8678  
8679 else
8680   echo "$ac_t""no" 1>&6
8681 fi
8682 done
8683  ;;
8684   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8685 echo "configure:8686: checking for getprpwnam in -lsecurity" >&5
8686 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8687 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8688   echo $ac_n "(cached) $ac_c" 1>&6
8689 else
8690   ac_save_LIBS="$LIBS"
8691 LIBS="-lsecurity  $LIBS"
8692 cat > conftest.$ac_ext <<EOF
8693 #line 8694 "configure"
8694 #include "confdefs.h"
8695 /* Override any gcc2 internal prototype to avoid an error.  */
8696 /* We use char because int might match the return type of a gcc2
8697     builtin and then its argument prototype would still apply.  */
8698 char getprpwnam();
8699
8700 int main() {
8701 getprpwnam()
8702 ; return 0; }
8703 EOF
8704 if { (eval echo configure:8705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8705   rm -rf conftest*
8706   eval "ac_cv_lib_$ac_lib_var=yes"
8707 else
8708   echo "configure: failed program was:" >&5
8709   cat conftest.$ac_ext >&5
8710   rm -rf conftest*
8711   eval "ac_cv_lib_$ac_lib_var=no"
8712 fi
8713 rm -f conftest*
8714 LIBS="$ac_save_LIBS"
8715
8716 fi
8717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8718   echo "$ac_t""yes" 1>&6
8719     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8720     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8721   cat >> confdefs.h <<EOF
8722 #define $ac_tr_lib 1
8723 EOF
8724
8725   LIBS="-lsecurity $LIBS"
8726
8727 else
8728   echo "$ac_t""no" 1>&6
8729 fi
8730  
8731      for ac_func in getprpwnam
8732 do
8733 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8734 echo "configure:8735: checking for $ac_func" >&5
8735 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8736   echo $ac_n "(cached) $ac_c" 1>&6
8737 else
8738   cat > conftest.$ac_ext <<EOF
8739 #line 8740 "configure"
8740 #include "confdefs.h"
8741 /* System header to define __stub macros and hopefully few prototypes,
8742     which can conflict with char $ac_func(); below.  */
8743 #include <assert.h>
8744 /* Override any gcc2 internal prototype to avoid an error.  */
8745 /* We use char because int might match the return type of a gcc2
8746     builtin and then its argument prototype would still apply.  */
8747 char $ac_func();
8748
8749 int main() {
8750
8751 /* The GNU C library defines this for functions which it implements
8752     to always fail with ENOSYS.  Some functions are actually named
8753     something starting with __ and the normal name is an alias.  */
8754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8755 choke me
8756 #else
8757 $ac_func();
8758 #endif
8759
8760 ; return 0; }
8761 EOF
8762 if { (eval echo configure:8763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8763   rm -rf conftest*
8764   eval "ac_cv_func_$ac_func=yes"
8765 else
8766   echo "configure: failed program was:" >&5
8767   cat conftest.$ac_ext >&5
8768   rm -rf conftest*
8769   eval "ac_cv_func_$ac_func=no"
8770 fi
8771 rm -f conftest*
8772 fi
8773
8774 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8775   echo "$ac_t""yes" 1>&6
8776     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8777   cat >> confdefs.h <<EOF
8778 #define $ac_tr_func 1
8779 EOF
8780  
8781 else
8782   echo "$ac_t""no" 1>&6
8783 fi
8784 done
8785
8786   ;;
8787   esac
8788
8789 case "$LIBS" in
8790   *-lsec*) for ac_func in getprpwnam
8791 do
8792 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8793 echo "configure:8794: checking for $ac_func" >&5
8794 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8795   echo $ac_n "(cached) $ac_c" 1>&6
8796 else
8797   cat > conftest.$ac_ext <<EOF
8798 #line 8799 "configure"
8799 #include "confdefs.h"
8800 /* System header to define __stub macros and hopefully few prototypes,
8801     which can conflict with char $ac_func(); below.  */
8802 #include <assert.h>
8803 /* Override any gcc2 internal prototype to avoid an error.  */
8804 /* We use char because int might match the return type of a gcc2
8805     builtin and then its argument prototype would still apply.  */
8806 char $ac_func();
8807
8808 int main() {
8809
8810 /* The GNU C library defines this for functions which it implements
8811     to always fail with ENOSYS.  Some functions are actually named
8812     something starting with __ and the normal name is an alias.  */
8813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8814 choke me
8815 #else
8816 $ac_func();
8817 #endif
8818
8819 ; return 0; }
8820 EOF
8821 if { (eval echo configure:8822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8822   rm -rf conftest*
8823   eval "ac_cv_func_$ac_func=yes"
8824 else
8825   echo "configure: failed program was:" >&5
8826   cat conftest.$ac_ext >&5
8827   rm -rf conftest*
8828   eval "ac_cv_func_$ac_func=no"
8829 fi
8830 rm -f conftest*
8831 fi
8832
8833 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8834   echo "$ac_t""yes" 1>&6
8835     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8836   cat >> confdefs.h <<EOF
8837 #define $ac_tr_func 1
8838 EOF
8839  
8840 else
8841   echo "$ac_t""no" 1>&6
8842 fi
8843 done
8844  ;;
8845   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8846 echo "configure:8847: checking for getprpwnam in -lsec" >&5
8847 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8848 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8849   echo $ac_n "(cached) $ac_c" 1>&6
8850 else
8851   ac_save_LIBS="$LIBS"
8852 LIBS="-lsec  $LIBS"
8853 cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 /* Override any gcc2 internal prototype to avoid an error.  */
8857 /* We use char because int might match the return type of a gcc2
8858     builtin and then its argument prototype would still apply.  */
8859 char getprpwnam();
8860
8861 int main() {
8862 getprpwnam()
8863 ; return 0; }
8864 EOF
8865 if { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8866   rm -rf conftest*
8867   eval "ac_cv_lib_$ac_lib_var=yes"
8868 else
8869   echo "configure: failed program was:" >&5
8870   cat conftest.$ac_ext >&5
8871   rm -rf conftest*
8872   eval "ac_cv_lib_$ac_lib_var=no"
8873 fi
8874 rm -f conftest*
8875 LIBS="$ac_save_LIBS"
8876
8877 fi
8878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8879   echo "$ac_t""yes" 1>&6
8880     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8881     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8882   cat >> confdefs.h <<EOF
8883 #define $ac_tr_lib 1
8884 EOF
8885
8886   LIBS="-lsec $LIBS"
8887
8888 else
8889   echo "$ac_t""no" 1>&6
8890 fi
8891  
8892      for ac_func in getprpwnam
8893 do
8894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8895 echo "configure:8896: checking for $ac_func" >&5
8896 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8897   echo $ac_n "(cached) $ac_c" 1>&6
8898 else
8899   cat > conftest.$ac_ext <<EOF
8900 #line 8901 "configure"
8901 #include "confdefs.h"
8902 /* System header to define __stub macros and hopefully few prototypes,
8903     which can conflict with char $ac_func(); below.  */
8904 #include <assert.h>
8905 /* Override any gcc2 internal prototype to avoid an error.  */
8906 /* We use char because int might match the return type of a gcc2
8907     builtin and then its argument prototype would still apply.  */
8908 char $ac_func();
8909
8910 int main() {
8911
8912 /* The GNU C library defines this for functions which it implements
8913     to always fail with ENOSYS.  Some functions are actually named
8914     something starting with __ and the normal name is an alias.  */
8915 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8916 choke me
8917 #else
8918 $ac_func();
8919 #endif
8920
8921 ; return 0; }
8922 EOF
8923 if { (eval echo configure:8924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8924   rm -rf conftest*
8925   eval "ac_cv_func_$ac_func=yes"
8926 else
8927   echo "configure: failed program was:" >&5
8928   cat conftest.$ac_ext >&5
8929   rm -rf conftest*
8930   eval "ac_cv_func_$ac_func=no"
8931 fi
8932 rm -f conftest*
8933 fi
8934
8935 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8936   echo "$ac_t""yes" 1>&6
8937     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8938   cat >> confdefs.h <<EOF
8939 #define $ac_tr_func 1
8940 EOF
8941  
8942 else
8943   echo "$ac_t""no" 1>&6
8944 fi
8945 done
8946
8947   ;;
8948   esac
8949
8950
8951 # this bit needs to be modified for each OS that is suported by
8952 # smbwrapper. You need to specify how to created a shared library and
8953 # how to compile C code to produce PIC object files
8954
8955 # these are the defaults, good for lots of systems
8956 HOST_OS="$host_os"
8957 LDSHFLAGS="-shared"
8958 SONAMEFLAG="#"
8959 SHLD="\${CC}"
8960 PICFLAG=""
8961 PICSUFFIX="po"
8962 POBAD_CC="#"
8963 SHLIBEXT="so"
8964 # Assume non-shared by default and override below
8965 BLDSHARED="false"
8966 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8967 echo "configure:8968: checking ability to build shared libraries" >&5
8968
8969 # and these are for particular systems
8970 case "$host_os" in
8971                 *linux*)   cat >> confdefs.h <<\EOF
8972 #define LINUX 1
8973 EOF
8974
8975                         BLDSHARED="true"
8976                         LDSHFLAGS="-shared" 
8977                         DYNEXP="-Wl,--export-dynamic"
8978                         PICFLAG="-fPIC"
8979                         SONAMEFLAG="-Wl,-soname="
8980                         cat >> confdefs.h <<\EOF
8981 #define STAT_ST_BLOCKSIZE 512
8982 EOF
8983
8984                         ;;
8985                 *solaris*) cat >> confdefs.h <<\EOF
8986 #define SUNOS5 1
8987 EOF
8988
8989                         BLDSHARED="true"
8990                         LDSHFLAGS="-G"
8991                         SONAMEFLAG="-h "
8992                         if test "${GCC}" = "yes"; then
8993                                 PICFLAG="-fPIC"
8994                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8995                                         DYNEXP="-Wl,-E"
8996                                 fi
8997                         else
8998                                 PICFLAG="-KPIC"
8999                                 ## ${CFLAGS} added for building 64-bit shared 
9000                                 ## libs using Sun's Compiler
9001                                 LDSHFLAGS="-G \${CFLAGS}"
9002                                 POBAD_CC=""
9003                                 PICSUFFIX="po.o"
9004                         fi
9005                         cat >> confdefs.h <<\EOF
9006 #define STAT_ST_BLOCKSIZE 512
9007 EOF
9008
9009                         ;;
9010                 *sunos*) cat >> confdefs.h <<\EOF
9011 #define SUNOS4 1
9012 EOF
9013
9014                         BLDSHARED="true"
9015                         LDSHFLAGS="-G"
9016                         SONAMEFLAG="-Wl,-h,"
9017                         PICFLAG="-KPIC"   # Is this correct for SunOS
9018                         cat >> confdefs.h <<\EOF
9019 #define STAT_ST_BLOCKSIZE 512
9020 EOF
9021
9022                         ;;
9023                 *freebsd*)  BLDSHARED="true"
9024                         LDSHFLAGS="-shared"
9025                         DYNEXP="-Wl,--export-dynamic"
9026                         SONAMEFLAG="-Wl,-soname,"
9027                         PICFLAG="-fPIC -DPIC"
9028                         cat >> confdefs.h <<\EOF
9029 #define STAT_ST_BLOCKSIZE 512
9030 EOF
9031
9032                         ;;
9033                 *openbsd*)  BLDSHARED="true"
9034                         LDSHFLAGS="-shared"
9035                         DYNEXP="-Wl,-Bdynamic"
9036                         SONAMEFLAG="-Wl,-soname,"
9037                         PICFLAG="-fPIC"
9038                         cat >> confdefs.h <<\EOF
9039 #define STAT_ST_BLOCKSIZE 512
9040 EOF
9041
9042                         ;;
9043                 *irix*) cat >> confdefs.h <<\EOF
9044 #define IRIX 1
9045 EOF
9046
9047                         case "$host_os" in
9048                         *irix6*) cat >> confdefs.h <<\EOF
9049 #define IRIX6 1
9050 EOF
9051
9052                         ;;
9053                         esac
9054                         ATTEMPT_WRAP32_BUILD=yes
9055                         BLDSHARED="true"
9056                         LDSHFLAGS="-set_version sgi1.0 -shared"
9057                         SONAMEFLAG="-soname "
9058                         SHLD="\${LD}"
9059                         if test "${GCC}" = "yes"; then
9060                                 PICFLAG="-fPIC"
9061                         else 
9062                                 PICFLAG="-KPIC"
9063                         fi
9064                         cat >> confdefs.h <<\EOF
9065 #define STAT_ST_BLOCKSIZE 512
9066 EOF
9067
9068                         ;;
9069                 *aix*) cat >> confdefs.h <<\EOF
9070 #define AIX 1
9071 EOF
9072
9073                         BLDSHARED="true"
9074                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
9075                         DYNEXP="-Wl,-brtl,-bexpall"
9076                         PICFLAG="-O2"
9077                         if test "${GCC}" != "yes"; then
9078                                 ## for funky AIX compiler using strncpy()
9079                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
9080                         fi
9081
9082                         cat >> confdefs.h <<\EOF
9083 #define STAT_ST_BLOCKSIZE DEV_BSIZE
9084 EOF
9085
9086                         ;;
9087                 *hpux*) cat >> confdefs.h <<\EOF
9088 #define HPUX 1
9089 EOF
9090
9091                         SHLIBEXT="sl"
9092                         # Use special PIC flags for the native HP-UX compiler.
9093                         if test $ac_cv_prog_cc_Ae = yes; then
9094                                 BLDSHARED="true"
9095                                 SHLD="/usr/bin/ld"
9096                                 LDSHFLAGS="-B symbolic -b -z"
9097                                 SONAMEFLAG="+h "
9098                                 PICFLAG="+z"
9099                         fi
9100                         DYNEXP="-Wl,-E"
9101                         cat >> confdefs.h <<\EOF
9102 #define STAT_ST_BLOCKSIZE 8192
9103 EOF
9104
9105                         ;;
9106                 *qnx*) cat >> confdefs.h <<\EOF
9107 #define QNX 1
9108 EOF
9109
9110                         cat >> confdefs.h <<\EOF
9111 #define STAT_ST_BLOCKSIZE 512
9112 EOF
9113
9114                         ;;
9115                 *osf*) cat >> confdefs.h <<\EOF
9116 #define OSF1 1
9117 EOF
9118
9119                         BLDSHARED="true"
9120                         LDSHFLAGS="-shared"
9121                         SONAMEFLAG="-Wl,-soname,"
9122                         PICFLAG="-fPIC"
9123                         cat >> confdefs.h <<\EOF
9124 #define STAT_ST_BLOCKSIZE 512
9125 EOF
9126
9127                         ;;
9128                 *sco*) cat >> confdefs.h <<\EOF
9129 #define SCO 1
9130 EOF
9131
9132                         cat >> confdefs.h <<\EOF
9133 #define STAT_ST_BLOCKSIZE 512
9134 EOF
9135
9136                         ;;
9137                 *unixware*) cat >> confdefs.h <<\EOF
9138 #define UNIXWARE 1
9139 EOF
9140
9141                         BLDSHARED="true"
9142                         LDSHFLAGS="-shared"
9143                         SONAMEFLAG="-Wl,-soname,"
9144                         PICFLAG="-KPIC"
9145                         cat >> confdefs.h <<\EOF
9146 #define STAT_ST_BLOCKSIZE 512
9147 EOF
9148
9149                         ;;
9150                 *next2*) cat >> confdefs.h <<\EOF
9151 #define NEXT2 1
9152 EOF
9153
9154                         cat >> confdefs.h <<\EOF
9155 #define STAT_ST_BLOCKSIZE 512
9156 EOF
9157
9158                         ;;
9159                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9160 set dummy groff; ac_word=$2
9161 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9162 echo "configure:9163: checking for $ac_word" >&5
9163 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9164   echo $ac_n "(cached) $ac_c" 1>&6
9165 else
9166   if test -n "$ROFF"; then
9167   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9168 else
9169   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9170   ac_dummy="$PATH"
9171   for ac_dir in $ac_dummy; do
9172     test -z "$ac_dir" && ac_dir=.
9173     if test -f $ac_dir/$ac_word; then
9174       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9175       break
9176     fi
9177   done
9178   IFS="$ac_save_ifs"
9179 fi
9180 fi
9181 ROFF="$ac_cv_prog_ROFF"
9182 if test -n "$ROFF"; then
9183   echo "$ac_t""$ROFF" 1>&6
9184 else
9185   echo "$ac_t""no" 1>&6
9186 fi
9187
9188                         cat >> confdefs.h <<\EOF
9189 #define STAT_ST_BLOCKSIZE 512
9190 EOF
9191
9192                         ;;
9193                 *sysv4*) cat >> confdefs.h <<\EOF
9194 #define SYSV 1
9195 EOF
9196
9197                         case "$host" in
9198                                 *-univel-*)     if  test "$GCC" != yes ; then
9199                                                 cat >> confdefs.h <<\EOF
9200 #define HAVE_MEMSET 1
9201 EOF
9202
9203                                         fi
9204                                         LDSHFLAGS="-G"
9205                                         DYNEXP="-Bexport"
9206                                 ;;
9207                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9208 #define RELIANTUNIX 1
9209 EOF
9210 ;;
9211                         esac
9212                         cat >> confdefs.h <<\EOF
9213 #define STAT_ST_BLOCKSIZE 512
9214 EOF
9215
9216                         ;;
9217
9218                 *sysv5*) cat >> confdefs.h <<\EOF
9219 #define SYSV 1
9220 EOF
9221
9222                         if  test "$GCC" != yes ; then
9223                                 cat >> confdefs.h <<\EOF
9224 #define HAVE_MEMSET 1
9225 EOF
9226
9227                         fi
9228                         LDSHFLAGS="-G"
9229                         cat >> confdefs.h <<\EOF
9230 #define STAT_ST_BLOCKSIZE 512
9231 EOF
9232
9233                         ;;
9234                 *)
9235                         cat >> confdefs.h <<\EOF
9236 #define STAT_ST_BLOCKSIZE 512
9237 EOF
9238
9239                         ;;
9240 esac
9241
9242 echo "$ac_t""$BLDSHARED" 1>&6
9243 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9244 echo "configure:9245: checking linker flags for shared libraries" >&5
9245 echo "$ac_t""$LDSHFLAGS" 1>&6
9246 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9247 echo "configure:9248: checking compiler flags for position-independent code" >&5
9248 echo "$ac_t""$PICFLAGS" 1>&6
9249
9250 #######################################################
9251 # test whether building a shared library actually works
9252 if test $BLDSHARED = true; then
9253 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9254 echo "configure:9255: checking whether building shared libraries actually works" >&5
9255 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9256   echo $ac_n "(cached) $ac_c" 1>&6
9257 else
9258   
9259    ac_cv_shlib_works=no
9260    # try building a trivial shared library
9261    if test "$PICSUFFIX" = "po"; then
9262      $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9263        $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
9264        ac_cv_shlib_works=yes
9265    else
9266      $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-.}/tests/shlib.c &&
9267        mv shlib.$PICSUFFIX shlib.po &&
9268        $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
9269        ac_cv_shlib_works=yes
9270    fi
9271    rm -f shlib.so shlib.po
9272
9273 fi
9274
9275 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9276 if test $ac_cv_shlib_works = no; then
9277    BLDSHARED=false
9278 fi
9279 fi
9280
9281
9282 # this updates our target list if we can build shared libs
9283 if test $BLDSHARED = true; then
9284    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9285 else
9286    LIBSMBCLIENT_SHARED=
9287 fi
9288
9289 ################
9290
9291 echo $ac_n "checking for long long""... $ac_c" 1>&6
9292 echo "configure:9293: checking for long long" >&5
9293 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9294   echo $ac_n "(cached) $ac_c" 1>&6
9295 else
9296   
9297 if test "$cross_compiling" = yes; then
9298   samba_cv_have_longlong=cross
9299 else
9300   cat > conftest.$ac_ext <<EOF
9301 #line 9302 "configure"
9302 #include "confdefs.h"
9303 #include <stdio.h>
9304 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9305 EOF
9306 if { (eval echo configure:9307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9307 then
9308   samba_cv_have_longlong=yes
9309 else
9310   echo "configure: failed program was:" >&5
9311   cat conftest.$ac_ext >&5
9312   rm -fr conftest*
9313   samba_cv_have_longlong=no
9314 fi
9315 rm -fr conftest*
9316 fi
9317
9318 fi
9319
9320 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9321 if test x"$samba_cv_have_longlong" = x"yes"; then
9322     cat >> confdefs.h <<\EOF
9323 #define HAVE_LONGLONG 1
9324 EOF
9325
9326 fi
9327
9328 #
9329 # Check if the compiler supports the LL prefix on long long integers.
9330 # AIX needs this.
9331
9332 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9333 echo "configure:9334: checking for LL suffix on long long integers" >&5
9334 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9335   echo $ac_n "(cached) $ac_c" 1>&6
9336 else
9337   
9338     cat > conftest.$ac_ext <<EOF
9339 #line 9340 "configure"
9340 #include "confdefs.h"
9341 #include <stdio.h>
9342 int main() {
9343 long long i = 0x8000000000LL
9344 ; return 0; }
9345 EOF
9346 if { (eval echo configure:9347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9347   rm -rf conftest*
9348   samba_cv_compiler_supports_ll=yes
9349 else
9350   echo "configure: failed program was:" >&5
9351   cat conftest.$ac_ext >&5
9352   rm -rf conftest*
9353   samba_cv_compiler_supports_ll=no
9354 fi
9355 rm -f conftest*
9356 fi
9357
9358 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9359 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9360    cat >> confdefs.h <<\EOF
9361 #define COMPILER_SUPPORTS_LL 1
9362 EOF
9363
9364 fi
9365
9366   
9367 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9368 echo "configure:9369: checking for 64 bit off_t" >&5
9369 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372   
9373 if test "$cross_compiling" = yes; then
9374   samba_cv_SIZEOF_OFF_T=cross
9375 else
9376   cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379 #include <stdio.h>
9380 #include <sys/stat.h>
9381 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9382 EOF
9383 if { (eval echo configure:9384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9384 then
9385   samba_cv_SIZEOF_OFF_T=yes
9386 else
9387   echo "configure: failed program was:" >&5
9388   cat conftest.$ac_ext >&5
9389   rm -fr conftest*
9390   samba_cv_SIZEOF_OFF_T=no
9391 fi
9392 rm -fr conftest*
9393 fi
9394
9395 fi
9396
9397 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9398 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9399     cat >> confdefs.h <<\EOF
9400 #define SIZEOF_OFF_T 8
9401 EOF
9402
9403 fi
9404
9405 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9406 echo "configure:9407: checking for off64_t" >&5
9407 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9408   echo $ac_n "(cached) $ac_c" 1>&6
9409 else
9410   
9411 if test "$cross_compiling" = yes; then
9412   samba_cv_HAVE_OFF64_T=cross
9413 else
9414   cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417
9418 #if defined(HAVE_UNISTD_H)
9419 #include <unistd.h>
9420 #endif
9421 #include <stdio.h>
9422 #include <sys/stat.h>
9423 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9424 EOF
9425 if { (eval echo configure:9426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9426 then
9427   samba_cv_HAVE_OFF64_T=yes
9428 else
9429   echo "configure: failed program was:" >&5
9430   cat conftest.$ac_ext >&5
9431   rm -fr conftest*
9432   samba_cv_HAVE_OFF64_T=no
9433 fi
9434 rm -fr conftest*
9435 fi
9436
9437 fi
9438
9439 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9440 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9441     cat >> confdefs.h <<\EOF
9442 #define HAVE_OFF64_T 1
9443 EOF
9444
9445 fi
9446
9447 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9448 echo "configure:9449: checking for 64 bit ino_t" >&5
9449 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9450   echo $ac_n "(cached) $ac_c" 1>&6
9451 else
9452   
9453 if test "$cross_compiling" = yes; then
9454   samba_cv_SIZEOF_INO_T=cross
9455 else
9456   cat > conftest.$ac_ext <<EOF
9457 #line 9458 "configure"
9458 #include "confdefs.h"
9459 #include <stdio.h>
9460 #include <sys/stat.h>
9461 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9464 then
9465   samba_cv_SIZEOF_INO_T=yes
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -fr conftest*
9470   samba_cv_SIZEOF_INO_T=no
9471 fi
9472 rm -fr conftest*
9473 fi
9474
9475 fi
9476
9477 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9478 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9479     cat >> confdefs.h <<\EOF
9480 #define SIZEOF_INO_T 8
9481 EOF
9482
9483 fi
9484
9485 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9486 echo "configure:9487: checking for ino64_t" >&5
9487 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9488   echo $ac_n "(cached) $ac_c" 1>&6
9489 else
9490   
9491 if test "$cross_compiling" = yes; then
9492   samba_cv_HAVE_INO64_T=cross
9493 else
9494   cat > conftest.$ac_ext <<EOF
9495 #line 9496 "configure"
9496 #include "confdefs.h"
9497
9498 #if defined(HAVE_UNISTD_H)
9499 #include <unistd.h>
9500 #endif
9501 #include <stdio.h>
9502 #include <sys/stat.h>
9503 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9504 EOF
9505 if { (eval echo configure:9506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9506 then
9507   samba_cv_HAVE_INO64_T=yes
9508 else
9509   echo "configure: failed program was:" >&5
9510   cat conftest.$ac_ext >&5
9511   rm -fr conftest*
9512   samba_cv_HAVE_INO64_T=no
9513 fi
9514 rm -fr conftest*
9515 fi
9516
9517 fi
9518
9519 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9520 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9521     cat >> confdefs.h <<\EOF
9522 #define HAVE_INO64_T 1
9523 EOF
9524
9525 fi
9526
9527 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9528 echo "configure:9529: checking for dev64_t" >&5
9529 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9530   echo $ac_n "(cached) $ac_c" 1>&6
9531 else
9532   
9533 if test "$cross_compiling" = yes; then
9534   samba_cv_HAVE_DEV64_T=cross
9535 else
9536   cat > conftest.$ac_ext <<EOF
9537 #line 9538 "configure"
9538 #include "confdefs.h"
9539
9540 #if defined(HAVE_UNISTD_H)
9541 #include <unistd.h>
9542 #endif
9543 #include <stdio.h>
9544 #include <sys/stat.h>
9545 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9546 EOF
9547 if { (eval echo configure:9548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9548 then
9549   samba_cv_HAVE_DEV64_T=yes
9550 else
9551   echo "configure: failed program was:" >&5
9552   cat conftest.$ac_ext >&5
9553   rm -fr conftest*
9554   samba_cv_HAVE_DEV64_T=no
9555 fi
9556 rm -fr conftest*
9557 fi
9558
9559 fi
9560
9561 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9562 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9563     cat >> confdefs.h <<\EOF
9564 #define HAVE_DEV64_T 1
9565 EOF
9566
9567 fi
9568
9569 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9570 echo "configure:9571: checking for struct dirent64" >&5
9571 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9572   echo $ac_n "(cached) $ac_c" 1>&6
9573 else
9574   
9575 cat > conftest.$ac_ext <<EOF
9576 #line 9577 "configure"
9577 #include "confdefs.h"
9578
9579 #if defined(HAVE_UNISTD_H)
9580 #include <unistd.h>
9581 #endif
9582 #include <sys/types.h>
9583 #include <dirent.h>
9584 int main() {
9585 struct dirent64 de;
9586 ; return 0; }
9587 EOF
9588 if { (eval echo configure:9589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9589   rm -rf conftest*
9590   samba_cv_HAVE_STRUCT_DIRENT64=yes
9591 else
9592   echo "configure: failed program was:" >&5
9593   cat conftest.$ac_ext >&5
9594   rm -rf conftest*
9595   samba_cv_HAVE_STRUCT_DIRENT64=no
9596 fi
9597 rm -f conftest*
9598 fi
9599
9600 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9601 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9602     cat >> confdefs.h <<\EOF
9603 #define HAVE_STRUCT_DIRENT64 1
9604 EOF
9605
9606 fi
9607
9608 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9609 echo "configure:9610: checking for major macro" >&5
9610 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9611   echo $ac_n "(cached) $ac_c" 1>&6
9612 else
9613   
9614 if test "$cross_compiling" = yes; then
9615   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9616 else
9617   cat > conftest.$ac_ext <<EOF
9618 #line 9619 "configure"
9619 #include "confdefs.h"
9620
9621 #if defined(HAVE_UNISTD_H)
9622 #include <unistd.h>
9623 #endif
9624 #include <sys/types.h>
9625 main() { dev_t dev; int i = major(dev); return 0; }
9626 EOF
9627 if { (eval echo configure:9628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9628 then
9629   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9630 else
9631   echo "configure: failed program was:" >&5
9632   cat conftest.$ac_ext >&5
9633   rm -fr conftest*
9634   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9635 fi
9636 rm -fr conftest*
9637 fi
9638
9639 fi
9640
9641 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9642 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9643     cat >> confdefs.h <<\EOF
9644 #define HAVE_DEVICE_MAJOR_FN 1
9645 EOF
9646
9647 fi
9648
9649 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9650 echo "configure:9651: checking for minor macro" >&5
9651 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9652   echo $ac_n "(cached) $ac_c" 1>&6
9653 else
9654   
9655 if test "$cross_compiling" = yes; then
9656   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9657 else
9658   cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661
9662 #if defined(HAVE_UNISTD_H)
9663 #include <unistd.h>
9664 #endif
9665 #include <sys/types.h>
9666 main() { dev_t dev; int i = minor(dev); return 0; }
9667 EOF
9668 if { (eval echo configure:9669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9669 then
9670   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9671 else
9672   echo "configure: failed program was:" >&5
9673   cat conftest.$ac_ext >&5
9674   rm -fr conftest*
9675   samba_cv_HAVE_DEVICE_MINOR_FN=no
9676 fi
9677 rm -fr conftest*
9678 fi
9679
9680 fi
9681
9682 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9683 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9684     cat >> confdefs.h <<\EOF
9685 #define HAVE_DEVICE_MINOR_FN 1
9686 EOF
9687
9688 fi
9689
9690 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9691 echo "configure:9692: checking for unsigned char" >&5
9692 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9693   echo $ac_n "(cached) $ac_c" 1>&6
9694 else
9695   
9696 if test "$cross_compiling" = yes; then
9697   samba_cv_HAVE_UNSIGNED_CHAR=cross
9698 else
9699   cat > conftest.$ac_ext <<EOF
9700 #line 9701 "configure"
9701 #include "confdefs.h"
9702 #include <stdio.h>
9703 main() { char c; c=250; exit((c > 0)?0:1); }
9704 EOF
9705 if { (eval echo configure:9706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9706 then
9707   samba_cv_HAVE_UNSIGNED_CHAR=yes
9708 else
9709   echo "configure: failed program was:" >&5
9710   cat conftest.$ac_ext >&5
9711   rm -fr conftest*
9712   samba_cv_HAVE_UNSIGNED_CHAR=no
9713 fi
9714 rm -fr conftest*
9715 fi
9716
9717 fi
9718
9719 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9720 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9721     cat >> confdefs.h <<\EOF
9722 #define HAVE_UNSIGNED_CHAR 1
9723 EOF
9724
9725 fi
9726
9727 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9728 echo "configure:9729: checking for sin_len in sock" >&5
9729 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9730   echo $ac_n "(cached) $ac_c" 1>&6
9731 else
9732   
9733 cat > conftest.$ac_ext <<EOF
9734 #line 9735 "configure"
9735 #include "confdefs.h"
9736 #include <sys/types.h>
9737 #include <sys/socket.h>
9738 #include <netinet/in.h>
9739 int main() {
9740 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9741 ; return 0; }
9742 EOF
9743 if { (eval echo configure:9744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9744   rm -rf conftest*
9745   samba_cv_HAVE_SOCK_SIN_LEN=yes
9746 else
9747   echo "configure: failed program was:" >&5
9748   cat conftest.$ac_ext >&5
9749   rm -rf conftest*
9750   samba_cv_HAVE_SOCK_SIN_LEN=no
9751 fi
9752 rm -f conftest*
9753 fi
9754
9755 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9756 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9757     cat >> confdefs.h <<\EOF
9758 #define HAVE_SOCK_SIN_LEN 1
9759 EOF
9760
9761 fi
9762
9763 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9764 echo "configure:9765: checking whether seekdir returns void" >&5
9765 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9766   echo $ac_n "(cached) $ac_c" 1>&6
9767 else
9768   
9769 cat > conftest.$ac_ext <<EOF
9770 #line 9771 "configure"
9771 #include "confdefs.h"
9772 #include <sys/types.h>
9773 #include <dirent.h>
9774 void seekdir(DIR *d, long loc) { return; }
9775 int main() {
9776 return 0;
9777 ; return 0; }
9778 EOF
9779 if { (eval echo configure:9780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9780   rm -rf conftest*
9781   samba_cv_SEEKDIR_RETURNS_VOID=yes
9782 else
9783   echo "configure: failed program was:" >&5
9784   cat conftest.$ac_ext >&5
9785   rm -rf conftest*
9786   samba_cv_SEEKDIR_RETURNS_VOID=no
9787 fi
9788 rm -f conftest*
9789 fi
9790
9791 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9792 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9793     cat >> confdefs.h <<\EOF
9794 #define SEEKDIR_RETURNS_VOID 1
9795 EOF
9796
9797 fi
9798
9799 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9800 echo "configure:9801: checking for __FUNCTION__ macro" >&5
9801 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9802   echo $ac_n "(cached) $ac_c" 1>&6
9803 else
9804   
9805 cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808 #include <stdio.h>
9809 int main() {
9810 printf("%s\n", __FUNCTION__);
9811 ; return 0; }
9812 EOF
9813 if { (eval echo configure:9814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9814   rm -rf conftest*
9815   samba_cv_HAVE_FUNCTION_MACRO=yes
9816 else
9817   echo "configure: failed program was:" >&5
9818   cat conftest.$ac_ext >&5
9819   rm -rf conftest*
9820   samba_cv_HAVE_FUNCTION_MACRO=no
9821 fi
9822 rm -f conftest*
9823 fi
9824
9825 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9826 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9827     cat >> confdefs.h <<\EOF
9828 #define HAVE_FUNCTION_MACRO 1
9829 EOF
9830
9831 fi
9832
9833 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9834 echo "configure:9835: checking if gettimeofday takes tz argument" >&5
9835 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9836   echo $ac_n "(cached) $ac_c" 1>&6
9837 else
9838   
9839 if test "$cross_compiling" = yes; then
9840   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9841 else
9842   cat > conftest.$ac_ext <<EOF
9843 #line 9844 "configure"
9844 #include "confdefs.h"
9845
9846 #include <sys/time.h>
9847 #include <unistd.h>
9848 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9849 EOF
9850 if { (eval echo configure:9851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9851 then
9852   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9853 else
9854   echo "configure: failed program was:" >&5
9855   cat conftest.$ac_ext >&5
9856   rm -fr conftest*
9857   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9858 fi
9859 rm -fr conftest*
9860 fi
9861
9862 fi
9863
9864 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9865 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9866     cat >> confdefs.h <<\EOF
9867 #define HAVE_GETTIMEOFDAY_TZ 1
9868 EOF
9869
9870 fi
9871
9872 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9873 echo "configure:9874: checking for __va_copy" >&5
9874 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9875   echo $ac_n "(cached) $ac_c" 1>&6
9876 else
9877   
9878 cat > conftest.$ac_ext <<EOF
9879 #line 9880 "configure"
9880 #include "confdefs.h"
9881 #include <stdarg.h>
9882 va_list ap1,ap2;
9883 int main() {
9884 __va_copy(ap1,ap2);
9885 ; return 0; }
9886 EOF
9887 if { (eval echo configure:9888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9888   rm -rf conftest*
9889   samba_cv_HAVE_VA_COPY=yes
9890 else
9891   echo "configure: failed program was:" >&5
9892   cat conftest.$ac_ext >&5
9893   rm -rf conftest*
9894   samba_cv_HAVE_VA_COPY=no
9895 fi
9896 rm -f conftest*
9897 fi
9898
9899 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9900 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9901     cat >> confdefs.h <<\EOF
9902 #define HAVE_VA_COPY 1
9903 EOF
9904
9905 fi
9906
9907 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9908 echo "configure:9909: checking for C99 vsnprintf" >&5
9909 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9910   echo $ac_n "(cached) $ac_c" 1>&6
9911 else
9912   
9913 if test "$cross_compiling" = yes; then
9914   samba_cv_HAVE_C99_VSNPRINTF=cross
9915 else
9916   cat > conftest.$ac_ext <<EOF
9917 #line 9918 "configure"
9918 #include "confdefs.h"
9919
9920 #include <sys/types.h>
9921 #include <stdarg.h>
9922 void foo(const char *format, ...) { 
9923        va_list ap;
9924        int len;
9925        char buf[5];
9926
9927        va_start(ap, format);
9928        len = vsnprintf(buf, 0, format, ap);
9929        va_end(ap);
9930        if (len != 5) exit(1);
9931
9932        va_start(ap, format);
9933        len = vsnprintf(0, 0, format, ap);
9934        va_end(ap);
9935        if (len != 5) exit(1);
9936
9937        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9938
9939        exit(0);
9940 }
9941 main() { foo("hello"); }
9942
9943 EOF
9944 if { (eval echo configure:9945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9945 then
9946   samba_cv_HAVE_C99_VSNPRINTF=yes
9947 else
9948   echo "configure: failed program was:" >&5
9949   cat conftest.$ac_ext >&5
9950   rm -fr conftest*
9951   samba_cv_HAVE_C99_VSNPRINTF=no
9952 fi
9953 rm -fr conftest*
9954 fi
9955
9956 fi
9957
9958 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9959 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9960     cat >> confdefs.h <<\EOF
9961 #define HAVE_C99_VSNPRINTF 1
9962 EOF
9963
9964 fi
9965
9966 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9967 echo "configure:9968: checking for broken readdir" >&5
9968 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9969   echo $ac_n "(cached) $ac_c" 1>&6
9970 else
9971   
9972 if test "$cross_compiling" = yes; then
9973   samba_cv_HAVE_BROKEN_READDIR=cross
9974 else
9975   cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 #include <sys/types.h>
9979 #include <dirent.h>
9980 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9981 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9982 di->d_name[0] == 0) exit(0); exit(1);} 
9983 EOF
9984 if { (eval echo configure:9985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9985 then
9986   samba_cv_HAVE_BROKEN_READDIR=yes
9987 else
9988   echo "configure: failed program was:" >&5
9989   cat conftest.$ac_ext >&5
9990   rm -fr conftest*
9991   samba_cv_HAVE_BROKEN_READDIR=no
9992 fi
9993 rm -fr conftest*
9994 fi
9995
9996 fi
9997
9998 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9999 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
10000     cat >> confdefs.h <<\EOF
10001 #define HAVE_BROKEN_READDIR 1
10002 EOF
10003
10004 fi
10005
10006 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
10007 echo "configure:10008: checking for utimbuf" >&5
10008 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
10009   echo $ac_n "(cached) $ac_c" 1>&6
10010 else
10011   
10012 cat > conftest.$ac_ext <<EOF
10013 #line 10014 "configure"
10014 #include "confdefs.h"
10015 #include <sys/types.h>
10016 #include <utime.h>
10017 int main() {
10018 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
10019 ; return 0; }
10020 EOF
10021 if { (eval echo configure:10022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10022   rm -rf conftest*
10023   samba_cv_HAVE_UTIMBUF=yes
10024 else
10025   echo "configure: failed program was:" >&5
10026   cat conftest.$ac_ext >&5
10027   rm -rf conftest*
10028   samba_cv_HAVE_UTIMBUF=no
10029 fi
10030 rm -f conftest*
10031 fi
10032
10033 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
10034 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
10035     cat >> confdefs.h <<\EOF
10036 #define HAVE_UTIMBUF 1
10037 EOF
10038
10039 fi
10040
10041
10042 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
10043 do
10044 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10045 echo "configure:10046: checking for $ac_func" >&5
10046 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10047   echo $ac_n "(cached) $ac_c" 1>&6
10048 else
10049   cat > conftest.$ac_ext <<EOF
10050 #line 10051 "configure"
10051 #include "confdefs.h"
10052 /* System header to define __stub macros and hopefully few prototypes,
10053     which can conflict with char $ac_func(); below.  */
10054 #include <assert.h>
10055 /* Override any gcc2 internal prototype to avoid an error.  */
10056 /* We use char because int might match the return type of a gcc2
10057     builtin and then its argument prototype would still apply.  */
10058 char $ac_func();
10059
10060 int main() {
10061
10062 /* The GNU C library defines this for functions which it implements
10063     to always fail with ENOSYS.  Some functions are actually named
10064     something starting with __ and the normal name is an alias.  */
10065 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10066 choke me
10067 #else
10068 $ac_func();
10069 #endif
10070
10071 ; return 0; }
10072 EOF
10073 if { (eval echo configure:10074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10074   rm -rf conftest*
10075   eval "ac_cv_func_$ac_func=yes"
10076 else
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -rf conftest*
10080   eval "ac_cv_func_$ac_func=no"
10081 fi
10082 rm -f conftest*
10083 fi
10084
10085 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10086   echo "$ac_t""yes" 1>&6
10087     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10088   cat >> confdefs.h <<EOF
10089 #define $ac_tr_func 1
10090 EOF
10091  
10092 else
10093   echo "$ac_t""no" 1>&6
10094 fi
10095 done
10096
10097
10098 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
10099 echo "configure:10100: checking for ut_name in utmp" >&5
10100 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
10101   echo $ac_n "(cached) $ac_c" 1>&6
10102 else
10103   
10104 cat > conftest.$ac_ext <<EOF
10105 #line 10106 "configure"
10106 #include "confdefs.h"
10107 #include <sys/types.h>
10108 #include <utmp.h>
10109 int main() {
10110 struct utmp ut;  ut.ut_name[0] = 'a';
10111 ; return 0; }
10112 EOF
10113 if { (eval echo configure:10114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10114   rm -rf conftest*
10115   samba_cv_HAVE_UT_UT_NAME=yes
10116 else
10117   echo "configure: failed program was:" >&5
10118   cat conftest.$ac_ext >&5
10119   rm -rf conftest*
10120   samba_cv_HAVE_UT_UT_NAME=no
10121 fi
10122 rm -f conftest*
10123 fi
10124
10125 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
10126 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
10127     cat >> confdefs.h <<\EOF
10128 #define HAVE_UT_UT_NAME 1
10129 EOF
10130
10131 fi 
10132
10133 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
10134 echo "configure:10135: checking for ut_user in utmp" >&5
10135 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
10136   echo $ac_n "(cached) $ac_c" 1>&6
10137 else
10138   
10139 cat > conftest.$ac_ext <<EOF
10140 #line 10141 "configure"
10141 #include "confdefs.h"
10142 #include <sys/types.h>
10143 #include <utmp.h>
10144 int main() {
10145 struct utmp ut;  ut.ut_user[0] = 'a';
10146 ; return 0; }
10147 EOF
10148 if { (eval echo configure:10149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10149   rm -rf conftest*
10150   samba_cv_HAVE_UT_UT_USER=yes
10151 else
10152   echo "configure: failed program was:" >&5
10153   cat conftest.$ac_ext >&5
10154   rm -rf conftest*
10155   samba_cv_HAVE_UT_UT_USER=no
10156 fi
10157 rm -f conftest*
10158 fi
10159
10160 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10161 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10162     cat >> confdefs.h <<\EOF
10163 #define HAVE_UT_UT_USER 1
10164 EOF
10165
10166 fi 
10167
10168 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10169 echo "configure:10170: checking for ut_id in utmp" >&5
10170 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10171   echo $ac_n "(cached) $ac_c" 1>&6
10172 else
10173   
10174 cat > conftest.$ac_ext <<EOF
10175 #line 10176 "configure"
10176 #include "confdefs.h"
10177 #include <sys/types.h>
10178 #include <utmp.h>
10179 int main() {
10180 struct utmp ut;  ut.ut_id[0] = 'a';
10181 ; return 0; }
10182 EOF
10183 if { (eval echo configure:10184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10184   rm -rf conftest*
10185   samba_cv_HAVE_UT_UT_ID=yes
10186 else
10187   echo "configure: failed program was:" >&5
10188   cat conftest.$ac_ext >&5
10189   rm -rf conftest*
10190   samba_cv_HAVE_UT_UT_ID=no
10191 fi
10192 rm -f conftest*
10193 fi
10194
10195 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10196 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10197     cat >> confdefs.h <<\EOF
10198 #define HAVE_UT_UT_ID 1
10199 EOF
10200
10201 fi 
10202
10203 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10204 echo "configure:10205: checking for ut_host in utmp" >&5
10205 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10206   echo $ac_n "(cached) $ac_c" 1>&6
10207 else
10208   
10209 cat > conftest.$ac_ext <<EOF
10210 #line 10211 "configure"
10211 #include "confdefs.h"
10212 #include <sys/types.h>
10213 #include <utmp.h>
10214 int main() {
10215 struct utmp ut;  ut.ut_host[0] = 'a';
10216 ; return 0; }
10217 EOF
10218 if { (eval echo configure:10219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10219   rm -rf conftest*
10220   samba_cv_HAVE_UT_UT_HOST=yes
10221 else
10222   echo "configure: failed program was:" >&5
10223   cat conftest.$ac_ext >&5
10224   rm -rf conftest*
10225   samba_cv_HAVE_UT_UT_HOST=no
10226 fi
10227 rm -f conftest*
10228 fi
10229
10230 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10231 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10232     cat >> confdefs.h <<\EOF
10233 #define HAVE_UT_UT_HOST 1
10234 EOF
10235
10236 fi 
10237
10238 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10239 echo "configure:10240: checking for ut_time in utmp" >&5
10240 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10241   echo $ac_n "(cached) $ac_c" 1>&6
10242 else
10243   
10244 cat > conftest.$ac_ext <<EOF
10245 #line 10246 "configure"
10246 #include "confdefs.h"
10247 #include <sys/types.h>
10248 #include <utmp.h>
10249 int main() {
10250 struct utmp ut;  time_t t; ut.ut_time = t;
10251 ; return 0; }
10252 EOF
10253 if { (eval echo configure:10254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10254   rm -rf conftest*
10255   samba_cv_HAVE_UT_UT_TIME=yes
10256 else
10257   echo "configure: failed program was:" >&5
10258   cat conftest.$ac_ext >&5
10259   rm -rf conftest*
10260   samba_cv_HAVE_UT_UT_TIME=no
10261 fi
10262 rm -f conftest*
10263 fi
10264
10265 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10266 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10267     cat >> confdefs.h <<\EOF
10268 #define HAVE_UT_UT_TIME 1
10269 EOF
10270
10271 fi 
10272
10273 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10274 echo "configure:10275: checking for ut_tv in utmp" >&5
10275 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10276   echo $ac_n "(cached) $ac_c" 1>&6
10277 else
10278   
10279 cat > conftest.$ac_ext <<EOF
10280 #line 10281 "configure"
10281 #include "confdefs.h"
10282 #include <sys/types.h>
10283 #include <utmp.h>
10284 int main() {
10285 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10286 ; return 0; }
10287 EOF
10288 if { (eval echo configure:10289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10289   rm -rf conftest*
10290   samba_cv_HAVE_UT_UT_TV=yes
10291 else
10292   echo "configure: failed program was:" >&5
10293   cat conftest.$ac_ext >&5
10294   rm -rf conftest*
10295   samba_cv_HAVE_UT_UT_TV=no
10296 fi
10297 rm -f conftest*
10298 fi
10299
10300 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10301 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10302     cat >> confdefs.h <<\EOF
10303 #define HAVE_UT_UT_TV 1
10304 EOF
10305
10306 fi 
10307
10308 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10309 echo "configure:10310: checking for ut_type in utmp" >&5
10310 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10311   echo $ac_n "(cached) $ac_c" 1>&6
10312 else
10313   
10314 cat > conftest.$ac_ext <<EOF
10315 #line 10316 "configure"
10316 #include "confdefs.h"
10317 #include <sys/types.h>
10318 #include <utmp.h>
10319 int main() {
10320 struct utmp ut;  ut.ut_type = 0;
10321 ; return 0; }
10322 EOF
10323 if { (eval echo configure:10324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10324   rm -rf conftest*
10325   samba_cv_HAVE_UT_UT_TYPE=yes
10326 else
10327   echo "configure: failed program was:" >&5
10328   cat conftest.$ac_ext >&5
10329   rm -rf conftest*
10330   samba_cv_HAVE_UT_UT_TYPE=no
10331 fi
10332 rm -f conftest*
10333 fi
10334
10335 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10336 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10337     cat >> confdefs.h <<\EOF
10338 #define HAVE_UT_UT_TYPE 1
10339 EOF
10340
10341 fi 
10342
10343 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10344 echo "configure:10345: checking for ut_pid in utmp" >&5
10345 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10346   echo $ac_n "(cached) $ac_c" 1>&6
10347 else
10348   
10349 cat > conftest.$ac_ext <<EOF
10350 #line 10351 "configure"
10351 #include "confdefs.h"
10352 #include <sys/types.h>
10353 #include <utmp.h>
10354 int main() {
10355 struct utmp ut;  ut.ut_pid = 0;
10356 ; return 0; }
10357 EOF
10358 if { (eval echo configure:10359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10359   rm -rf conftest*
10360   samba_cv_HAVE_UT_UT_PID=yes
10361 else
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   samba_cv_HAVE_UT_UT_PID=no
10366 fi
10367 rm -f conftest*
10368 fi
10369
10370 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10371 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10372     cat >> confdefs.h <<\EOF
10373 #define HAVE_UT_UT_PID 1
10374 EOF
10375
10376 fi 
10377
10378 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10379 echo "configure:10380: checking for ut_exit in utmp" >&5
10380 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   
10384 cat > conftest.$ac_ext <<EOF
10385 #line 10386 "configure"
10386 #include "confdefs.h"
10387 #include <sys/types.h>
10388 #include <utmp.h>
10389 int main() {
10390 struct utmp ut;  ut.ut_exit.e_exit = 0;
10391 ; return 0; }
10392 EOF
10393 if { (eval echo configure:10394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10394   rm -rf conftest*
10395   samba_cv_HAVE_UT_UT_EXIT=yes
10396 else
10397   echo "configure: failed program was:" >&5
10398   cat conftest.$ac_ext >&5
10399   rm -rf conftest*
10400   samba_cv_HAVE_UT_UT_EXIT=no
10401 fi
10402 rm -f conftest*
10403 fi
10404
10405 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10406 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10407     cat >> confdefs.h <<\EOF
10408 #define HAVE_UT_UT_EXIT 1
10409 EOF
10410
10411 fi 
10412
10413 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10414 echo "configure:10415: checking for ut_addr in utmp" >&5
10415 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10416   echo $ac_n "(cached) $ac_c" 1>&6
10417 else
10418   
10419 cat > conftest.$ac_ext <<EOF
10420 #line 10421 "configure"
10421 #include "confdefs.h"
10422 #include <sys/types.h>
10423 #include <utmp.h>
10424 int main() {
10425 struct utmp ut;  ut.ut_addr = 0;
10426 ; return 0; }
10427 EOF
10428 if { (eval echo configure:10429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10429   rm -rf conftest*
10430   samba_cv_HAVE_UT_UT_ADDR=yes
10431 else
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -rf conftest*
10435   samba_cv_HAVE_UT_UT_ADDR=no
10436 fi
10437 rm -f conftest*
10438 fi
10439
10440 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10441 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10442     cat >> confdefs.h <<\EOF
10443 #define HAVE_UT_UT_ADDR 1
10444 EOF
10445
10446 fi 
10447
10448 if test x$ac_cv_func_pututline = xyes ; then
10449   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10450 echo "configure:10451: checking whether pututline returns pointer" >&5
10451 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10452   echo $ac_n "(cached) $ac_c" 1>&6
10453 else
10454   
10455   cat > conftest.$ac_ext <<EOF
10456 #line 10457 "configure"
10457 #include "confdefs.h"
10458 #include <sys/types.h>
10459 #include <utmp.h>
10460 int main() {
10461 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10462 ; return 0; }
10463 EOF
10464 if { (eval echo configure:10465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10465   rm -rf conftest*
10466   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10467 else
10468   echo "configure: failed program was:" >&5
10469   cat conftest.$ac_ext >&5
10470   rm -rf conftest*
10471   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10472 fi
10473 rm -f conftest*
10474 fi
10475
10476 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10477   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10478       cat >> confdefs.h <<\EOF
10479 #define PUTUTLINE_RETURNS_UTMP 1
10480 EOF
10481
10482   fi
10483 fi
10484
10485 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10486 echo "configure:10487: checking for ut_syslen in utmpx" >&5
10487 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10488   echo $ac_n "(cached) $ac_c" 1>&6
10489 else
10490   
10491 cat > conftest.$ac_ext <<EOF
10492 #line 10493 "configure"
10493 #include "confdefs.h"
10494 #include <sys/types.h>
10495 #include <utmpx.h>
10496 int main() {
10497 struct utmpx ux;  ux.ut_syslen = 0;
10498 ; return 0; }
10499 EOF
10500 if { (eval echo configure:10501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10501   rm -rf conftest*
10502   samba_cv_HAVE_UX_UT_SYSLEN=yes
10503 else
10504   echo "configure: failed program was:" >&5
10505   cat conftest.$ac_ext >&5
10506   rm -rf conftest*
10507   samba_cv_HAVE_UX_UT_SYSLEN=no
10508 fi
10509 rm -f conftest*
10510 fi
10511
10512 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10513 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10514     cat >> confdefs.h <<\EOF
10515 #define HAVE_UX_UT_SYSLEN 1
10516 EOF
10517
10518 fi 
10519
10520
10521 #################################################
10522 # check for libiconv support
10523 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10524 echo "configure:10525: checking whether to use libiconv" >&5
10525 # Check whether --with-libiconv or --without-libiconv was given.
10526 if test "${with_libiconv+set}" = set; then
10527   withval="$with_libiconv"
10528    case "$withval" in
10529   no)
10530     echo "$ac_t""no" 1>&6
10531     ;;
10532   *)
10533     echo "$ac_t""yes" 1>&6
10534     CFLAGS="$CFLAGS -I$withval/include"
10535     LDFLAGS="$LDFLAGS -L$withval/lib"
10536     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10537 echo "configure:10538: checking for iconv_open in -liconv" >&5
10538 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10539 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10540   echo $ac_n "(cached) $ac_c" 1>&6
10541 else
10542   ac_save_LIBS="$LIBS"
10543 LIBS="-liconv  $LIBS"
10544 cat > conftest.$ac_ext <<EOF
10545 #line 10546 "configure"
10546 #include "confdefs.h"
10547 /* Override any gcc2 internal prototype to avoid an error.  */
10548 /* We use char because int might match the return type of a gcc2
10549     builtin and then its argument prototype would still apply.  */
10550 char iconv_open();
10551
10552 int main() {
10553 iconv_open()
10554 ; return 0; }
10555 EOF
10556 if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10557   rm -rf conftest*
10558   eval "ac_cv_lib_$ac_lib_var=yes"
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -rf conftest*
10563   eval "ac_cv_lib_$ac_lib_var=no"
10564 fi
10565 rm -f conftest*
10566 LIBS="$ac_save_LIBS"
10567
10568 fi
10569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10570   echo "$ac_t""yes" 1>&6
10571     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10572     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10573   cat >> confdefs.h <<EOF
10574 #define $ac_tr_lib 1
10575 EOF
10576
10577   LIBS="-liconv $LIBS"
10578
10579 else
10580   echo "$ac_t""no" 1>&6
10581 fi
10582
10583     cat >> confdefs.h <<EOF
10584 #define WITH_LIBICONV "${withval}"
10585 EOF
10586
10587     ;;
10588   esac 
10589 else
10590   echo "$ac_t""no" 1>&6
10591
10592 fi
10593
10594
10595
10596 ############
10597 # check for iconv in libc
10598 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10599 echo "configure:10600: checking for working iconv" >&5
10600 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10601   echo $ac_n "(cached) $ac_c" 1>&6
10602 else
10603   
10604 if test "$cross_compiling" = yes; then
10605   samba_cv_HAVE_NATIVE_ICONV=cross
10606 else
10607   cat > conftest.$ac_ext <<EOF
10608 #line 10609 "configure"
10609 #include "confdefs.h"
10610
10611 #include <iconv.h>
10612 main() {
10613        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10614        if (cd == 0 || cd == (iconv_t)-1) return -1;
10615        return 0;
10616 }
10617
10618 EOF
10619 if { (eval echo configure:10620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10620 then
10621   samba_cv_HAVE_NATIVE_ICONV=yes
10622 else
10623   echo "configure: failed program was:" >&5
10624   cat conftest.$ac_ext >&5
10625   rm -fr conftest*
10626   samba_cv_HAVE_NATIVE_ICONV=no
10627 fi
10628 rm -fr conftest*
10629 fi
10630
10631 fi
10632
10633 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10634 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10635     cat >> confdefs.h <<\EOF
10636 #define HAVE_NATIVE_ICONV 1
10637 EOF
10638
10639 fi
10640
10641
10642 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10643 echo "configure:10644: checking for Linux kernel oplocks" >&5
10644 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10645   echo $ac_n "(cached) $ac_c" 1>&6
10646 else
10647   
10648 if test "$cross_compiling" = yes; then
10649   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10650 else
10651   cat > conftest.$ac_ext <<EOF
10652 #line 10653 "configure"
10653 #include "confdefs.h"
10654
10655 #include <sys/types.h>
10656 #include <fcntl.h>
10657 #ifndef F_GETLEASE
10658 #define F_GETLEASE      1025
10659 #endif
10660 main() {
10661        int fd = open("/dev/null", O_RDONLY);
10662        return fcntl(fd, F_GETLEASE, 0) == -1;
10663 }
10664
10665 EOF
10666 if { (eval echo configure:10667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10667 then
10668   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10669 else
10670   echo "configure: failed program was:" >&5
10671   cat conftest.$ac_ext >&5
10672   rm -fr conftest*
10673   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10674 fi
10675 rm -fr conftest*
10676 fi
10677
10678 fi
10679
10680 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10681 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10682     cat >> confdefs.h <<\EOF
10683 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10684 EOF
10685
10686 fi
10687
10688 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10689 echo "configure:10690: checking for kernel change notify support" >&5
10690 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10691   echo $ac_n "(cached) $ac_c" 1>&6
10692 else
10693   
10694 if test "$cross_compiling" = yes; then
10695   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10696 else
10697   cat > conftest.$ac_ext <<EOF
10698 #line 10699 "configure"
10699 #include "confdefs.h"
10700
10701 #include <sys/types.h>
10702 #include <fcntl.h>
10703 #include <signal.h>
10704 #ifndef F_NOTIFY
10705 #define F_NOTIFY 1026
10706 #endif
10707 main() {
10708         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10709 }
10710
10711 EOF
10712 if { (eval echo configure:10713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10713 then
10714   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10715 else
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -fr conftest*
10719   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10720 fi
10721 rm -fr conftest*
10722 fi
10723
10724 fi
10725
10726 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10727 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10728     cat >> confdefs.h <<\EOF
10729 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10730 EOF
10731
10732 fi
10733
10734 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10735 echo "configure:10736: checking for kernel share modes" >&5
10736 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10737   echo $ac_n "(cached) $ac_c" 1>&6
10738 else
10739   
10740 if test "$cross_compiling" = yes; then
10741   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10742 else
10743   cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746
10747 #include <sys/types.h>
10748 #include <fcntl.h>
10749 #include <signal.h>
10750 #include <sys/file.h>
10751 #ifndef LOCK_MAND
10752 #define LOCK_MAND       32
10753 #define LOCK_READ       64
10754 #endif
10755 main() {
10756         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10757 }
10758
10759 EOF
10760 if { (eval echo configure:10761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10761 then
10762   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10763 else
10764   echo "configure: failed program was:" >&5
10765   cat conftest.$ac_ext >&5
10766   rm -fr conftest*
10767   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10768 fi
10769 rm -fr conftest*
10770 fi
10771
10772 fi
10773
10774 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10775 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10776     cat >> confdefs.h <<\EOF
10777 #define HAVE_KERNEL_SHARE_MODES 1
10778 EOF
10779
10780 fi
10781
10782
10783
10784
10785 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10786 echo "configure:10787: checking for IRIX kernel oplock type definitions" >&5
10787 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10788   echo $ac_n "(cached) $ac_c" 1>&6
10789 else
10790   
10791 cat > conftest.$ac_ext <<EOF
10792 #line 10793 "configure"
10793 #include "confdefs.h"
10794 #include <sys/types.h>
10795 #include <fcntl.h>
10796 int main() {
10797 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10798 ; return 0; }
10799 EOF
10800 if { (eval echo configure:10801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10801   rm -rf conftest*
10802   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10803 else
10804   echo "configure: failed program was:" >&5
10805   cat conftest.$ac_ext >&5
10806   rm -rf conftest*
10807   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10808 fi
10809 rm -f conftest*
10810 fi
10811
10812 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10813 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10814     cat >> confdefs.h <<\EOF
10815 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10816 EOF
10817
10818 fi
10819
10820 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10821 echo "configure:10822: checking for irix specific capabilities" >&5
10822 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10823   echo $ac_n "(cached) $ac_c" 1>&6
10824 else
10825   
10826 if test "$cross_compiling" = yes; then
10827   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10828 else
10829   cat > conftest.$ac_ext <<EOF
10830 #line 10831 "configure"
10831 #include "confdefs.h"
10832 #include <sys/types.h>
10833 #include <sys/capability.h>
10834 main() {
10835  cap_t cap;
10836  if ((cap = cap_get_proc()) == NULL)
10837    exit(1);
10838  cap->cap_effective |= CAP_NETWORK_MGT;
10839  cap->cap_inheritable |= CAP_NETWORK_MGT;
10840  cap_set_proc(cap);
10841  exit(0);
10842 }
10843
10844 EOF
10845 if { (eval echo configure:10846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10846 then
10847   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10848 else
10849   echo "configure: failed program was:" >&5
10850   cat conftest.$ac_ext >&5
10851   rm -fr conftest*
10852   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10853 fi
10854 rm -fr conftest*
10855 fi
10856
10857 fi
10858
10859 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10860 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10861     cat >> confdefs.h <<\EOF
10862 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10863 EOF
10864
10865 fi
10866
10867 #
10868 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10869 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10870 #
10871
10872 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10873 echo "configure:10874: checking for int16 typedef included by rpc/rpc.h" >&5
10874 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10875   echo $ac_n "(cached) $ac_c" 1>&6
10876 else
10877   
10878 cat > conftest.$ac_ext <<EOF
10879 #line 10880 "configure"
10880 #include "confdefs.h"
10881 #include <sys/types.h>
10882 #if defined(HAVE_RPC_RPC_H)
10883 #include <rpc/rpc.h>
10884 #endif
10885 int main() {
10886 int16 testvar;
10887 ; return 0; }
10888 EOF
10889 if { (eval echo configure:10890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10890   rm -rf conftest*
10891   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10892 else
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -rf conftest*
10896   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10897 fi
10898 rm -f conftest*
10899 fi
10900
10901 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10902 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10903     cat >> confdefs.h <<\EOF
10904 #define HAVE_INT16_FROM_RPC_RPC_H 1
10905 EOF
10906
10907 fi
10908
10909 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10910 echo "configure:10911: checking for uint16 typedef included by rpc/rpc.h" >&5
10911 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10912   echo $ac_n "(cached) $ac_c" 1>&6
10913 else
10914   
10915 cat > conftest.$ac_ext <<EOF
10916 #line 10917 "configure"
10917 #include "confdefs.h"
10918 #include <sys/types.h>
10919 #if defined(HAVE_RPC_RPC_H)
10920 #include <rpc/rpc.h>
10921 #endif
10922 int main() {
10923 uint16 testvar;
10924 ; return 0; }
10925 EOF
10926 if { (eval echo configure:10927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10927   rm -rf conftest*
10928   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10929 else
10930   echo "configure: failed program was:" >&5
10931   cat conftest.$ac_ext >&5
10932   rm -rf conftest*
10933   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10934 fi
10935 rm -f conftest*
10936 fi
10937
10938 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10939 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10940     cat >> confdefs.h <<\EOF
10941 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10942 EOF
10943
10944 fi
10945
10946 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10947 echo "configure:10948: checking for int32 typedef included by rpc/rpc.h" >&5
10948 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10949   echo $ac_n "(cached) $ac_c" 1>&6
10950 else
10951   
10952 cat > conftest.$ac_ext <<EOF
10953 #line 10954 "configure"
10954 #include "confdefs.h"
10955 #include <sys/types.h>
10956 #if defined(HAVE_RPC_RPC_H)
10957 #include <rpc/rpc.h>
10958 #endif
10959 int main() {
10960 int32 testvar;
10961 ; return 0; }
10962 EOF
10963 if { (eval echo configure:10964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10964   rm -rf conftest*
10965   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10966 else
10967   echo "configure: failed program was:" >&5
10968   cat conftest.$ac_ext >&5
10969   rm -rf conftest*
10970   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10971 fi
10972 rm -f conftest*
10973 fi
10974
10975 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10976 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10977     cat >> confdefs.h <<\EOF
10978 #define HAVE_INT32_FROM_RPC_RPC_H 1
10979 EOF
10980
10981 fi
10982
10983 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10984 echo "configure:10985: checking for uint32 typedef included by rpc/rpc.h" >&5
10985 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10986   echo $ac_n "(cached) $ac_c" 1>&6
10987 else
10988   
10989 cat > conftest.$ac_ext <<EOF
10990 #line 10991 "configure"
10991 #include "confdefs.h"
10992 #include <sys/types.h>
10993 #if defined(HAVE_RPC_RPC_H)
10994 #include <rpc/rpc.h>
10995 #endif
10996 int main() {
10997 uint32 testvar;
10998 ; return 0; }
10999 EOF
11000 if { (eval echo configure:11001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11001   rm -rf conftest*
11002   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
11003 else
11004   echo "configure: failed program was:" >&5
11005   cat conftest.$ac_ext >&5
11006   rm -rf conftest*
11007   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
11008 fi
11009 rm -f conftest*
11010 fi
11011
11012 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
11013 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
11014     cat >> confdefs.h <<\EOF
11015 #define HAVE_UINT32_FROM_RPC_RPC_H 1
11016 EOF
11017
11018 fi
11019
11020
11021 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
11022 echo "configure:11023: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
11023 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   
11027 cat > conftest.$ac_ext <<EOF
11028 #line 11029 "configure"
11029 #include "confdefs.h"
11030 #include <sys/types.h>
11031 #ifdef HAVE_SYS_SECURITY_H
11032 #include <sys/security.h>
11033 #include <prot.h>
11034 #endif  /* HAVE_SYS_SECURITY_H */
11035 #if defined(HAVE_RPC_RPC_H)
11036 #include <rpc/rpc.h>
11037 #endif
11038 int main() {
11039 int testvar;
11040 ; return 0; }
11041 EOF
11042 if { (eval echo configure:11043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11043   rm -rf conftest*
11044   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
11045 else
11046   echo "configure: failed program was:" >&5
11047   cat conftest.$ac_ext >&5
11048   rm -rf conftest*
11049   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
11050 fi
11051 rm -f conftest*
11052 fi
11053
11054 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
11055 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
11056     cat >> confdefs.h <<\EOF
11057 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
11058 EOF
11059
11060 fi
11061
11062 echo $ac_n "checking for test routines""... $ac_c" 1>&6
11063 echo "configure:11064: checking for test routines" >&5
11064 if test "$cross_compiling" = yes; then
11065   echo "configure: warning: cannot run when cross-compiling" 1>&2
11066 else
11067   cat > conftest.$ac_ext <<EOF
11068 #line 11069 "configure"
11069 #include "confdefs.h"
11070 #include "${srcdir-.}/tests/trivial.c"
11071 EOF
11072 if { (eval echo configure:11073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11073 then
11074   echo "$ac_t""yes" 1>&6
11075 else
11076   echo "configure: failed program was:" >&5
11077   cat conftest.$ac_ext >&5
11078   rm -fr conftest*
11079   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
11080 fi
11081 rm -fr conftest*
11082 fi
11083
11084
11085 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
11086 echo "configure:11087: checking for ftruncate extend" >&5
11087 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
11088   echo $ac_n "(cached) $ac_c" 1>&6
11089 else
11090   
11091 if test "$cross_compiling" = yes; then
11092   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
11093 else
11094   cat > conftest.$ac_ext <<EOF
11095 #line 11096 "configure"
11096 #include "confdefs.h"
11097 #include "${srcdir-.}/tests/ftruncate.c"
11098 EOF
11099 if { (eval echo configure:11100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11100 then
11101   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
11102 else
11103   echo "configure: failed program was:" >&5
11104   cat conftest.$ac_ext >&5
11105   rm -fr conftest*
11106   samba_cv_HAVE_FTRUNCATE_EXTEND=no
11107 fi
11108 rm -fr conftest*
11109 fi
11110
11111 fi
11112
11113 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
11114 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
11115     cat >> confdefs.h <<\EOF
11116 #define HAVE_FTRUNCATE_EXTEND 1
11117 EOF
11118
11119 fi
11120
11121 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
11122 echo "configure:11123: checking for AF_LOCAL socket support" >&5
11123 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
11124   echo $ac_n "(cached) $ac_c" 1>&6
11125 else
11126   
11127 if test "$cross_compiling" = yes; then
11128   samba_cv_HAVE_WORKING_AF_LOCAL=cross
11129 else
11130   cat > conftest.$ac_ext <<EOF
11131 #line 11132 "configure"
11132 #include "confdefs.h"
11133 #include "${srcdir-.}/tests/unixsock.c"
11134 EOF
11135 if { (eval echo configure:11136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11136 then
11137   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11138 else
11139   echo "configure: failed program was:" >&5
11140   cat conftest.$ac_ext >&5
11141   rm -fr conftest*
11142   samba_cv_HAVE_WORKING_AF_LOCAL=no
11143 fi
11144 rm -fr conftest*
11145 fi
11146
11147 fi
11148
11149 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11150 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11151 then
11152     cat >> confdefs.h <<\EOF
11153 #define HAVE_WORKING_AF_LOCAL 1
11154 EOF
11155
11156 fi
11157
11158 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11159 echo "configure:11160: checking for broken getgroups" >&5
11160 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11161   echo $ac_n "(cached) $ac_c" 1>&6
11162 else
11163   
11164 if test "$cross_compiling" = yes; then
11165   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11166 else
11167   cat > conftest.$ac_ext <<EOF
11168 #line 11169 "configure"
11169 #include "confdefs.h"
11170 #include "${srcdir-.}/tests/getgroups.c"
11171 EOF
11172 if { (eval echo configure:11173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11173 then
11174   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11175 else
11176   echo "configure: failed program was:" >&5
11177   cat conftest.$ac_ext >&5
11178   rm -fr conftest*
11179   samba_cv_HAVE_BROKEN_GETGROUPS=no
11180 fi
11181 rm -fr conftest*
11182 fi
11183
11184 fi
11185
11186 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11187 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11188     cat >> confdefs.h <<\EOF
11189 #define HAVE_BROKEN_GETGROUPS 1
11190 EOF
11191
11192 fi
11193
11194 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11195 echo "configure:11196: checking whether getpass should be replaced" >&5
11196 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11197   echo $ac_n "(cached) $ac_c" 1>&6
11198 else
11199   
11200 SAVE_CPPFLAGS="$CPPFLAGS"
11201 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11202 cat > conftest.$ac_ext <<EOF
11203 #line 11204 "configure"
11204 #include "confdefs.h"
11205
11206 #define REPLACE_GETPASS 1
11207 #define NO_CONFIG_H 1
11208 #define main dont_declare_main
11209 #include "${srcdir-.}/lib/getsmbpass.c"
11210 #undef main
11211
11212 int main() {
11213
11214 ; return 0; }
11215 EOF
11216 if { (eval echo configure:11217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11217   rm -rf conftest*
11218   samba_cv_REPLACE_GETPASS=yes
11219 else
11220   echo "configure: failed program was:" >&5
11221   cat conftest.$ac_ext >&5
11222   rm -rf conftest*
11223   samba_cv_REPLACE_GETPASS=no
11224 fi
11225 rm -f conftest*
11226 CPPFLAGS="$SAVE_CPPFLAGS"
11227
11228 fi
11229
11230 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11231 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11232         cat >> confdefs.h <<\EOF
11233 #define REPLACE_GETPASS 1
11234 EOF
11235
11236 fi
11237
11238 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11239 echo "configure:11240: checking for broken inet_ntoa" >&5
11240 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11241   echo $ac_n "(cached) $ac_c" 1>&6
11242 else
11243   
11244 if test "$cross_compiling" = yes; then
11245   samba_cv_REPLACE_INET_NTOA=cross
11246 else
11247   cat > conftest.$ac_ext <<EOF
11248 #line 11249 "configure"
11249 #include "confdefs.h"
11250
11251 #include <stdio.h>
11252 #include <sys/types.h>
11253 #include <netinet/in.h>
11254 #ifdef HAVE_ARPA_INET_H
11255 #include <arpa/inet.h>
11256 #endif
11257 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11258 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11259     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11260 exit(1);}
11261 EOF
11262 if { (eval echo configure:11263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11263 then
11264   samba_cv_REPLACE_INET_NTOA=yes
11265 else
11266   echo "configure: failed program was:" >&5
11267   cat conftest.$ac_ext >&5
11268   rm -fr conftest*
11269   samba_cv_REPLACE_INET_NTOA=no
11270 fi
11271 rm -fr conftest*
11272 fi
11273
11274 fi
11275
11276 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11277 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11278     cat >> confdefs.h <<\EOF
11279 #define REPLACE_INET_NTOA 1
11280 EOF
11281
11282 fi
11283
11284 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11285 echo "configure:11286: checking for secure mkstemp" >&5
11286 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11287   echo $ac_n "(cached) $ac_c" 1>&6
11288 else
11289   
11290 if test "$cross_compiling" = yes; then
11291   samba_cv_HAVE_SECURE_MKSTEMP=cross
11292 else
11293   cat > conftest.$ac_ext <<EOF
11294 #line 11295 "configure"
11295 #include "confdefs.h"
11296 #include <stdlib.h>
11297 #include <sys/types.h>
11298 #include <sys/stat.h>
11299 #include <unistd.h>
11300 main() { 
11301   struct stat st;
11302   char tpl[20]="/tmp/test.XXXXXX"; 
11303   int fd = mkstemp(tpl); 
11304   if (fd == -1) exit(1);
11305   unlink(tpl);
11306   if (fstat(fd, &st) != 0) exit(1);
11307   if ((st.st_mode & 0777) != 0600) exit(1);
11308   exit(0);
11309 }
11310 EOF
11311 if { (eval echo configure:11312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11312 then
11313   samba_cv_HAVE_SECURE_MKSTEMP=yes
11314 else
11315   echo "configure: failed program was:" >&5
11316   cat conftest.$ac_ext >&5
11317   rm -fr conftest*
11318   samba_cv_HAVE_SECURE_MKSTEMP=no
11319 fi
11320 rm -fr conftest*
11321 fi
11322
11323 fi
11324
11325 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11326 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11327     cat >> confdefs.h <<\EOF
11328 #define HAVE_SECURE_MKSTEMP 1
11329 EOF
11330
11331 fi
11332
11333 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11334 echo "configure:11335: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11335 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11336   echo $ac_n "(cached) $ac_c" 1>&6
11337 else
11338   
11339 if test "$cross_compiling" = yes; then
11340   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11341 else
11342   cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345 #include <unistd.h>
11346 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11347 EOF
11348 if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11349 then
11350   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11351 else
11352   echo "configure: failed program was:" >&5
11353   cat conftest.$ac_ext >&5
11354   rm -fr conftest*
11355   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11356 fi
11357 rm -fr conftest*
11358 fi
11359
11360 fi
11361
11362 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11363 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11364     cat >> confdefs.h <<\EOF
11365 #define SYSCONF_SC_NGROUPS_MAX 1
11366 EOF
11367
11368 fi
11369
11370 echo $ac_n "checking for root""... $ac_c" 1>&6
11371 echo "configure:11372: checking for root" >&5
11372 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11373   echo $ac_n "(cached) $ac_c" 1>&6
11374 else
11375   
11376 if test "$cross_compiling" = yes; then
11377   samba_cv_HAVE_ROOT=cross
11378 else
11379   cat > conftest.$ac_ext <<EOF
11380 #line 11381 "configure"
11381 #include "confdefs.h"
11382 main() { exit(getuid() != 0); }
11383 EOF
11384 if { (eval echo configure:11385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11385 then
11386   samba_cv_HAVE_ROOT=yes
11387 else
11388   echo "configure: failed program was:" >&5
11389   cat conftest.$ac_ext >&5
11390   rm -fr conftest*
11391   samba_cv_HAVE_ROOT=no
11392 fi
11393 rm -fr conftest*
11394 fi
11395
11396 fi
11397
11398 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11399 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11400     cat >> confdefs.h <<\EOF
11401 #define HAVE_ROOT 1
11402 EOF
11403
11404 else
11405     echo "configure: warning: running as non-root will disable some tests" 1>&2
11406 fi
11407
11408 ##################
11409 # look for a method of finding the list of network interfaces
11410 iface=no;
11411 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11412 echo "configure:11413: checking for iface AIX" >&5
11413 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11414   echo $ac_n "(cached) $ac_c" 1>&6
11415 else
11416   
11417 if test "$cross_compiling" = yes; then
11418   samba_cv_HAVE_IFACE_AIX=cross
11419 else
11420   cat > conftest.$ac_ext <<EOF
11421 #line 11422 "configure"
11422 #include "confdefs.h"
11423
11424 #define HAVE_IFACE_AIX 1
11425 #define AUTOCONF_TEST 1
11426 #include "confdefs.h"
11427 #include "${srcdir-.}/lib/interfaces.c"
11428 EOF
11429 if { (eval echo configure:11430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11430 then
11431   samba_cv_HAVE_IFACE_AIX=yes
11432 else
11433   echo "configure: failed program was:" >&5
11434   cat conftest.$ac_ext >&5
11435   rm -fr conftest*
11436   samba_cv_HAVE_IFACE_AIX=no
11437 fi
11438 rm -fr conftest*
11439 fi
11440
11441 fi
11442
11443 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11444 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11445     iface=yes;cat >> confdefs.h <<\EOF
11446 #define HAVE_IFACE_AIX 1
11447 EOF
11448
11449 fi
11450
11451 if test $iface = no; then
11452 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11453 echo "configure:11454: checking for iface ifconf" >&5
11454 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11455   echo $ac_n "(cached) $ac_c" 1>&6
11456 else
11457   
11458 if test "$cross_compiling" = yes; then
11459   samba_cv_HAVE_IFACE_IFCONF=cross
11460 else
11461   cat > conftest.$ac_ext <<EOF
11462 #line 11463 "configure"
11463 #include "confdefs.h"
11464
11465 #define HAVE_IFACE_IFCONF 1
11466 #define AUTOCONF_TEST 1
11467 #include "confdefs.h"
11468 #include "${srcdir-.}/lib/interfaces.c"
11469 EOF
11470 if { (eval echo configure:11471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11471 then
11472   samba_cv_HAVE_IFACE_IFCONF=yes
11473 else
11474   echo "configure: failed program was:" >&5
11475   cat conftest.$ac_ext >&5
11476   rm -fr conftest*
11477   samba_cv_HAVE_IFACE_IFCONF=no
11478 fi
11479 rm -fr conftest*
11480 fi
11481
11482 fi
11483
11484 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11485 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11486     iface=yes;cat >> confdefs.h <<\EOF
11487 #define HAVE_IFACE_IFCONF 1
11488 EOF
11489
11490 fi
11491 fi
11492
11493 if test $iface = no; then
11494 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11495 echo "configure:11496: checking for iface ifreq" >&5
11496 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11497   echo $ac_n "(cached) $ac_c" 1>&6
11498 else
11499   
11500 if test "$cross_compiling" = yes; then
11501   samba_cv_HAVE_IFACE_IFREQ=cross
11502 else
11503   cat > conftest.$ac_ext <<EOF
11504 #line 11505 "configure"
11505 #include "confdefs.h"
11506
11507 #define HAVE_IFACE_IFREQ 1
11508 #define AUTOCONF_TEST 1
11509 #include "confdefs.h"
11510 #include "${srcdir-.}/lib/interfaces.c"
11511 EOF
11512 if { (eval echo configure:11513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11513 then
11514   samba_cv_HAVE_IFACE_IFREQ=yes
11515 else
11516   echo "configure: failed program was:" >&5
11517   cat conftest.$ac_ext >&5
11518   rm -fr conftest*
11519   samba_cv_HAVE_IFACE_IFREQ=no
11520 fi
11521 rm -fr conftest*
11522 fi
11523
11524 fi
11525
11526 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11527 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11528     iface=yes;cat >> confdefs.h <<\EOF
11529 #define HAVE_IFACE_IFREQ 1
11530 EOF
11531
11532 fi
11533 fi
11534
11535
11536 ################################################
11537 # look for a method of setting the effective uid
11538 seteuid=no;
11539 if test $seteuid = no; then
11540 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11541 echo "configure:11542: checking for setresuid" >&5
11542 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11543   echo $ac_n "(cached) $ac_c" 1>&6
11544 else
11545   
11546 if test "$cross_compiling" = yes; then
11547   samba_cv_USE_SETRESUID=cross
11548 else
11549   cat > conftest.$ac_ext <<EOF
11550 #line 11551 "configure"
11551 #include "confdefs.h"
11552
11553 #define AUTOCONF_TEST 1
11554 #define USE_SETRESUID 1
11555 #include "confdefs.h"
11556 #include "${srcdir-.}/lib/util_sec.c"
11557 EOF
11558 if { (eval echo configure:11559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11559 then
11560   samba_cv_USE_SETRESUID=yes
11561 else
11562   echo "configure: failed program was:" >&5
11563   cat conftest.$ac_ext >&5
11564   rm -fr conftest*
11565   samba_cv_USE_SETRESUID=no
11566 fi
11567 rm -fr conftest*
11568 fi
11569
11570 fi
11571
11572 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11573 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11574     seteuid=yes;cat >> confdefs.h <<\EOF
11575 #define USE_SETRESUID 1
11576 EOF
11577
11578 fi
11579 fi
11580
11581
11582 if test $seteuid = no; then
11583 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11584 echo "configure:11585: checking for setreuid" >&5
11585 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11586   echo $ac_n "(cached) $ac_c" 1>&6
11587 else
11588   
11589 if test "$cross_compiling" = yes; then
11590   samba_cv_USE_SETREUID=cross
11591 else
11592   cat > conftest.$ac_ext <<EOF
11593 #line 11594 "configure"
11594 #include "confdefs.h"
11595
11596 #define AUTOCONF_TEST 1
11597 #define USE_SETREUID 1
11598 #include "confdefs.h"
11599 #include "${srcdir-.}/lib/util_sec.c"
11600 EOF
11601 if { (eval echo configure:11602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11602 then
11603   samba_cv_USE_SETREUID=yes
11604 else
11605   echo "configure: failed program was:" >&5
11606   cat conftest.$ac_ext >&5
11607   rm -fr conftest*
11608   samba_cv_USE_SETREUID=no
11609 fi
11610 rm -fr conftest*
11611 fi
11612
11613 fi
11614
11615 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11616 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11617     seteuid=yes;cat >> confdefs.h <<\EOF
11618 #define USE_SETREUID 1
11619 EOF
11620
11621 fi
11622 fi
11623
11624 if test $seteuid = no; then
11625 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11626 echo "configure:11627: checking for seteuid" >&5
11627 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11628   echo $ac_n "(cached) $ac_c" 1>&6
11629 else
11630   
11631 if test "$cross_compiling" = yes; then
11632   samba_cv_USE_SETEUID=cross
11633 else
11634   cat > conftest.$ac_ext <<EOF
11635 #line 11636 "configure"
11636 #include "confdefs.h"
11637
11638 #define AUTOCONF_TEST 1
11639 #define USE_SETEUID 1
11640 #include "confdefs.h"
11641 #include "${srcdir-.}/lib/util_sec.c"
11642 EOF
11643 if { (eval echo configure:11644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11644 then
11645   samba_cv_USE_SETEUID=yes
11646 else
11647   echo "configure: failed program was:" >&5
11648   cat conftest.$ac_ext >&5
11649   rm -fr conftest*
11650   samba_cv_USE_SETEUID=no
11651 fi
11652 rm -fr conftest*
11653 fi
11654
11655 fi
11656
11657 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11658 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11659     seteuid=yes;cat >> confdefs.h <<\EOF
11660 #define USE_SETEUID 1
11661 EOF
11662
11663 fi
11664 fi
11665
11666 if test $seteuid = no; then
11667 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11668 echo "configure:11669: checking for setuidx" >&5
11669 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11670   echo $ac_n "(cached) $ac_c" 1>&6
11671 else
11672   
11673 if test "$cross_compiling" = yes; then
11674   samba_cv_USE_SETUIDX=cross
11675 else
11676   cat > conftest.$ac_ext <<EOF
11677 #line 11678 "configure"
11678 #include "confdefs.h"
11679
11680 #define AUTOCONF_TEST 1
11681 #define USE_SETUIDX 1
11682 #include "confdefs.h"
11683 #include "${srcdir-.}/lib/util_sec.c"
11684 EOF
11685 if { (eval echo configure:11686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11686 then
11687   samba_cv_USE_SETUIDX=yes
11688 else
11689   echo "configure: failed program was:" >&5
11690   cat conftest.$ac_ext >&5
11691   rm -fr conftest*
11692   samba_cv_USE_SETUIDX=no
11693 fi
11694 rm -fr conftest*
11695 fi
11696
11697 fi
11698
11699 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11700 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11701     seteuid=yes;cat >> confdefs.h <<\EOF
11702 #define USE_SETUIDX 1
11703 EOF
11704
11705 fi
11706 fi
11707
11708
11709 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11710 echo "configure:11711: checking for working mmap" >&5
11711 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11712   echo $ac_n "(cached) $ac_c" 1>&6
11713 else
11714   
11715 if test "$cross_compiling" = yes; then
11716   samba_cv_HAVE_MMAP=cross
11717 else
11718   cat > conftest.$ac_ext <<EOF
11719 #line 11720 "configure"
11720 #include "confdefs.h"
11721 #include "${srcdir-.}/tests/shared_mmap.c"
11722 EOF
11723 if { (eval echo configure:11724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11724 then
11725   samba_cv_HAVE_MMAP=yes
11726 else
11727   echo "configure: failed program was:" >&5
11728   cat conftest.$ac_ext >&5
11729   rm -fr conftest*
11730   samba_cv_HAVE_MMAP=no
11731 fi
11732 rm -fr conftest*
11733 fi
11734
11735 fi
11736
11737 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11738 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11739     cat >> confdefs.h <<\EOF
11740 #define HAVE_MMAP 1
11741 EOF
11742
11743 fi
11744
11745 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11746 echo "configure:11747: checking for ftruncate needs root" >&5
11747 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11748   echo $ac_n "(cached) $ac_c" 1>&6
11749 else
11750   
11751 if test "$cross_compiling" = yes; then
11752   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11753 else
11754   cat > conftest.$ac_ext <<EOF
11755 #line 11756 "configure"
11756 #include "confdefs.h"
11757 #include "${srcdir-.}/tests/ftruncroot.c"
11758 EOF
11759 if { (eval echo configure:11760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11760 then
11761   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11762 else
11763   echo "configure: failed program was:" >&5
11764   cat conftest.$ac_ext >&5
11765   rm -fr conftest*
11766   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11767 fi
11768 rm -fr conftest*
11769 fi
11770
11771 fi
11772
11773 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11774 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11775     cat >> confdefs.h <<\EOF
11776 #define FTRUNCATE_NEEDS_ROOT 1
11777 EOF
11778
11779 fi
11780
11781 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11782 echo "configure:11783: checking for fcntl locking" >&5
11783 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11784   echo $ac_n "(cached) $ac_c" 1>&6
11785 else
11786   
11787 if test "$cross_compiling" = yes; then
11788   samba_cv_HAVE_FCNTL_LOCK=cross
11789 else
11790   cat > conftest.$ac_ext <<EOF
11791 #line 11792 "configure"
11792 #include "confdefs.h"
11793 #include "${srcdir-.}/tests/fcntl_lock.c"
11794 EOF
11795 if { (eval echo configure:11796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11796 then
11797   samba_cv_HAVE_FCNTL_LOCK=yes
11798 else
11799   echo "configure: failed program was:" >&5
11800   cat conftest.$ac_ext >&5
11801   rm -fr conftest*
11802   samba_cv_HAVE_FCNTL_LOCK=no
11803 fi
11804 rm -fr conftest*
11805 fi
11806
11807 fi
11808
11809 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11810 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11811     cat >> confdefs.h <<\EOF
11812 #define HAVE_FCNTL_LOCK 1
11813 EOF
11814
11815 fi
11816
11817 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11818 echo "configure:11819: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11819 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11820   echo $ac_n "(cached) $ac_c" 1>&6
11821 else
11822   
11823 if test "$cross_compiling" = yes; then
11824   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11825 else
11826   cat > conftest.$ac_ext <<EOF
11827 #line 11828 "configure"
11828 #include "confdefs.h"
11829 #include "${srcdir-.}/tests/fcntl_lock64.c"
11830 EOF
11831 if { (eval echo configure:11832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11832 then
11833   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11834 else
11835   echo "configure: failed program was:" >&5
11836   cat conftest.$ac_ext >&5
11837   rm -fr conftest*
11838   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11839 fi
11840 rm -fr conftest*
11841 fi
11842
11843 fi
11844
11845 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11846 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11847     cat >> confdefs.h <<\EOF
11848 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11849 EOF
11850
11851
11852 else
11853
11854
11855   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11856 echo "configure:11857: checking for 64 bit fcntl locking" >&5
11857 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11858   echo $ac_n "(cached) $ac_c" 1>&6
11859 else
11860   
11861   if test "$cross_compiling" = yes; then
11862   samba_cv_HAVE_STRUCT_FLOCK64=cross
11863 else
11864   cat > conftest.$ac_ext <<EOF
11865 #line 11866 "configure"
11866 #include "confdefs.h"
11867
11868 #if defined(HAVE_UNISTD_H)
11869 #include <unistd.h>
11870 #endif
11871 #include <stdio.h>
11872 #include <stdlib.h>
11873
11874 #ifdef HAVE_FCNTL_H
11875 #include <fcntl.h>
11876 #endif
11877
11878 #ifdef HAVE_SYS_FCNTL_H
11879 #include <sys/fcntl.h>
11880 #endif
11881 main() { struct flock64 fl64;
11882 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11883 exit(0);
11884 #else
11885 exit(1);
11886 #endif
11887 }
11888 EOF
11889 if { (eval echo configure:11890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11890 then
11891   samba_cv_HAVE_STRUCT_FLOCK64=yes
11892 else
11893   echo "configure: failed program was:" >&5
11894   cat conftest.$ac_ext >&5
11895   rm -fr conftest*
11896   samba_cv_HAVE_STRUCT_FLOCK64=no
11897 fi
11898 rm -fr conftest*
11899 fi
11900
11901 fi
11902
11903 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11904
11905   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11906       cat >> confdefs.h <<\EOF
11907 #define HAVE_STRUCT_FLOCK64 1
11908 EOF
11909
11910   fi
11911 fi
11912
11913 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11914 echo "configure:11915: checking for st_blocks in struct stat" >&5
11915 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11916   echo $ac_n "(cached) $ac_c" 1>&6
11917 else
11918   
11919 cat > conftest.$ac_ext <<EOF
11920 #line 11921 "configure"
11921 #include "confdefs.h"
11922 #include <sys/types.h>
11923 #include <sys/stat.h>
11924 #include <unistd.h>
11925 int main() {
11926 struct stat st;  st.st_blocks = 0;
11927 ; return 0; }
11928 EOF
11929 if { (eval echo configure:11930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11930   rm -rf conftest*
11931   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11932 else
11933   echo "configure: failed program was:" >&5
11934   cat conftest.$ac_ext >&5
11935   rm -rf conftest*
11936   samba_cv_HAVE_STAT_ST_BLOCKS=no
11937 fi
11938 rm -f conftest*
11939 fi
11940
11941 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11942 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11943     cat >> confdefs.h <<\EOF
11944 #define HAVE_STAT_ST_BLOCKS 1
11945 EOF
11946
11947 fi 
11948
11949 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
11950 echo "configure:11951: checking for st_blksize in struct stat" >&5
11951 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then
11952   echo $ac_n "(cached) $ac_c" 1>&6
11953 else
11954   
11955 cat > conftest.$ac_ext <<EOF
11956 #line 11957 "configure"
11957 #include "confdefs.h"
11958 #include <sys/types.h>
11959 #include <sys/stat.h>
11960 #include <unistd.h>
11961 int main() {
11962 struct stat st;  st.st_blksize = 0;
11963 ; return 0; }
11964 EOF
11965 if { (eval echo configure:11966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11966   rm -rf conftest*
11967   samba_cv_HAVE_STAT_ST_BLKSIZE=yes
11968 else
11969   echo "configure: failed program was:" >&5
11970   cat conftest.$ac_ext >&5
11971   rm -rf conftest*
11972   samba_cv_HAVE_STAT_ST_BLKSIZE=no
11973 fi
11974 rm -f conftest*
11975 fi
11976
11977 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6
11978 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
11979     cat >> confdefs.h <<\EOF
11980 #define HAVE_STAT_ST_BLKSIZE 1
11981 EOF
11982
11983 fi
11984
11985 case "$host_os" in
11986 *linux*)
11987 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11988 echo "configure:11989: checking for broken RedHat 7.2 system header files" >&5
11989 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11990   echo $ac_n "(cached) $ac_c" 1>&6
11991 else
11992   
11993 cat > conftest.$ac_ext <<EOF
11994 #line 11995 "configure"
11995 #include "confdefs.h"
11996
11997 #ifdef HAVE_SYS_VFS_H
11998 #include <sys/vfs.h>
11999 #endif
12000 #ifdef HAVE_SYS_CAPABILITY_H
12001 #include <sys/capability.h>
12002 #endif
12003
12004 int main() {
12005 int i;
12006 ; return 0; }
12007 EOF
12008 if { (eval echo configure:12009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12009   rm -rf conftest*
12010   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
12011 else
12012   echo "configure: failed program was:" >&5
12013   cat conftest.$ac_ext >&5
12014   rm -rf conftest*
12015   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
12016 fi
12017 rm -f conftest*
12018 fi
12019
12020 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
12021 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
12022    cat >> confdefs.h <<\EOF
12023 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
12024 EOF
12025
12026 fi
12027 ;;
12028 esac
12029
12030 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
12031 echo "configure:12032: checking for broken nisplus include files" >&5
12032 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
12033   echo $ac_n "(cached) $ac_c" 1>&6
12034 else
12035   
12036 cat > conftest.$ac_ext <<EOF
12037 #line 12038 "configure"
12038 #include "confdefs.h"
12039 #include <sys/acl.h>
12040 #if defined(HAVE_RPCSVC_NIS_H)
12041 #include <rpcsvc/nis.h>
12042 #endif
12043 int main() {
12044 int i;
12045 ; return 0; }
12046 EOF
12047 if { (eval echo configure:12048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12048   rm -rf conftest*
12049   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
12050 else
12051   echo "configure: failed program was:" >&5
12052   cat conftest.$ac_ext >&5
12053   rm -rf conftest*
12054   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
12055 fi
12056 rm -f conftest*
12057 fi
12058
12059 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
12060 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
12061         cat >> confdefs.h <<\EOF
12062 #define BROKEN_NISPLUS_INCLUDE_FILES 1
12063 EOF
12064
12065 fi
12066
12067
12068 #################################################
12069 # check for smbwrapper support
12070 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
12071 echo "configure:12072: checking whether to use smbwrapper" >&5
12072 # Check whether --with-smbwrapper or --without-smbwrapper was given.
12073 if test "${with_smbwrapper+set}" = set; then
12074   withval="$with_smbwrapper"
12075    case "$withval" in
12076   yes)
12077     echo "$ac_t""yes" 1>&6
12078     cat >> confdefs.h <<\EOF
12079 #define WITH_SMBWRAPPER 1
12080 EOF
12081
12082         WRAPPROG="bin/smbsh\$(EXEEXT)"
12083         WRAP="bin/smbwrapper.$SHLIBEXT"
12084
12085         if test x$ATTEMPT_WRAP32_BUILD = x; then
12086                 WRAP32=""
12087         else
12088                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
12089         fi
12090
12091 # Conditions under which smbwrapper should not be built.
12092
12093         if test x$PICFLAG = x; then
12094            echo No support for PIC code - disabling smbwrapper and smbsh
12095            WRAPPROG=""
12096            WRAP=""
12097            WRAP32=""
12098         elif test x$ac_cv_func_syscall = xno; then
12099            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
12100            WRAPPROG=""
12101            WRAP=""
12102            WRAP32=""
12103         fi
12104         EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WRAPPROG $WRAP $WRAP32"
12105         SMBWRAPPER="$WRAPPROG $WRAP $WRAP32"
12106     ;;
12107   *)
12108     echo "$ac_t""no" 1>&6
12109     ;;
12110   esac 
12111 else
12112   echo "$ac_t""no" 1>&6
12113
12114 fi
12115
12116
12117 #################################################
12118 # check for AFS clear-text auth support
12119 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
12120 echo "configure:12121: checking whether to use AFS clear-text auth" >&5
12121 # Check whether --with-afs or --without-afs was given.
12122 if test "${with_afs+set}" = set; then
12123   withval="$with_afs"
12124    case "$withval" in
12125   yes)
12126     echo "$ac_t""yes" 1>&6
12127     cat >> confdefs.h <<\EOF
12128 #define WITH_AFS 1
12129 EOF
12130
12131     ;;
12132   *)
12133     echo "$ac_t""no" 1>&6
12134     ;;
12135   esac 
12136 else
12137   echo "$ac_t""no" 1>&6
12138
12139 fi
12140
12141
12142
12143 #################################################
12144 # check for the DFS clear-text auth system
12145 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
12146 echo "configure:12147: checking whether to use DFS clear-text auth" >&5
12147 # Check whether --with-dfs or --without-dfs was given.
12148 if test "${with_dfs+set}" = set; then
12149   withval="$with_dfs"
12150    case "$withval" in
12151   yes)
12152     echo "$ac_t""yes" 1>&6
12153     cat >> confdefs.h <<\EOF
12154 #define WITH_DFS 1
12155 EOF
12156
12157     ;;
12158   *)
12159     echo "$ac_t""no" 1>&6
12160     ;;
12161   esac 
12162 else
12163   echo "$ac_t""no" 1>&6
12164
12165 fi
12166
12167
12168 #################################################
12169 # active directory support
12170
12171 with_ads_support=yes
12172 echo $ac_n "checking whether to use Active Directory""... $ac_c" 1>&6
12173 echo "configure:12174: checking whether to use Active Directory" >&5
12174
12175 # Check whether --with-ads or --without-ads was given.
12176 if test "${with_ads+set}" = set; then
12177   withval="$with_ads"
12178    case "$withval" in
12179     no)
12180         with_ads_support=no
12181         ;;
12182   esac 
12183 fi
12184
12185
12186 if test x"$with_ads_support" = x"yes"; then
12187    cat >> confdefs.h <<\EOF
12188 #define WITH_ADS 1
12189 EOF
12190
12191 fi
12192
12193 echo "$ac_t""$with_ads_support" 1>&6
12194
12195 FOUND_KRB5=no
12196 if test x"$with_ads_support" = x"yes"; then
12197
12198   #################################################
12199   # check for location of Kerberos 5 install
12200   echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12201 echo "configure:12202: checking for kerberos 5 install path" >&5
12202   # Check whether --with-krb5 or --without-krb5 was given.
12203 if test "${with_krb5+set}" = set; then
12204   withval="$with_krb5"
12205    case "$withval" in
12206     no)
12207       echo "$ac_t""no" 1>&6
12208       ;;
12209     *)
12210       echo "$ac_t""yes" 1>&6
12211       LIBS="$LIBS -lkrb5"
12212       CFLAGS="$CFLAGS -I$withval/include"
12213       CPPFLAGS="$CPPFLAGS -I$withval/include"
12214       LDFLAGS="$LDFLAGS -L$withval/lib"
12215       FOUND_KRB5=yes
12216       ;;
12217     esac 
12218 else
12219   echo "$ac_t""no" 1>&6
12220   
12221 fi
12222
12223
12224
12225 if test x$FOUND_KRB5 = x"no"; then
12226 #################################################
12227 # see if this box has the SuSE location for the heimdal kerberos implementation
12228 echo $ac_n "checking for /usr/include/heimdal""... $ac_c" 1>&6
12229 echo "configure:12230: checking for /usr/include/heimdal" >&5
12230 if test -d /usr/include/heimdal; then
12231     CFLAGS="$CFLAGS -I/usr/include/heimdal"
12232     CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal"
12233     echo "$ac_t""yes" 1>&6
12234 else
12235     echo "$ac_t""no" 1>&6
12236 fi
12237 fi
12238
12239
12240 if test x$FOUND_KRB5 = x"no"; then
12241 #################################################
12242 # see if this box has the RedHat location for kerberos
12243 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
12244 echo "configure:12245: checking for /usr/kerberos" >&5
12245 if test -d /usr/kerberos; then
12246     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
12247     CFLAGS="$CFLAGS -I/usr/kerberos/include"
12248     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
12249     echo "$ac_t""yes" 1>&6
12250 else
12251     echo "$ac_t""no" 1>&6
12252 fi
12253 fi
12254
12255
12256   # now check for krb5.h. Some systems have the libraries without the headers!
12257   # note that this check is done here to allow for different kerberos
12258   # include paths
12259   for ac_hdr in krb5.h
12260 do
12261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12263 echo "configure:12264: checking for $ac_hdr" >&5
12264 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12265   echo $ac_n "(cached) $ac_c" 1>&6
12266 else
12267   cat > conftest.$ac_ext <<EOF
12268 #line 12269 "configure"
12269 #include "confdefs.h"
12270 #include <$ac_hdr>
12271 EOF
12272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12273 { (eval echo configure:12274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12275 if test -z "$ac_err"; then
12276   rm -rf conftest*
12277   eval "ac_cv_header_$ac_safe=yes"
12278 else
12279   echo "$ac_err" >&5
12280   echo "configure: failed program was:" >&5
12281   cat conftest.$ac_ext >&5
12282   rm -rf conftest*
12283   eval "ac_cv_header_$ac_safe=no"
12284 fi
12285 rm -f conftest*
12286 fi
12287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12288   echo "$ac_t""yes" 1>&6
12289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12290   cat >> confdefs.h <<EOF
12291 #define $ac_tr_hdr 1
12292 EOF
12293  
12294 else
12295   echo "$ac_t""no" 1>&6
12296 fi
12297 done
12298
12299
12300   # now check for gssapi headers.  This is also done here to allow for
12301   # different kerberos include paths
12302   for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12303 do
12304 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12305 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12306 echo "configure:12307: checking for $ac_hdr" >&5
12307 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12308   echo $ac_n "(cached) $ac_c" 1>&6
12309 else
12310   cat > conftest.$ac_ext <<EOF
12311 #line 12312 "configure"
12312 #include "confdefs.h"
12313 #include <$ac_hdr>
12314 EOF
12315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12316 { (eval echo configure:12317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12318 if test -z "$ac_err"; then
12319   rm -rf conftest*
12320   eval "ac_cv_header_$ac_safe=yes"
12321 else
12322   echo "$ac_err" >&5
12323   echo "configure: failed program was:" >&5
12324   cat conftest.$ac_ext >&5
12325   rm -rf conftest*
12326   eval "ac_cv_header_$ac_safe=no"
12327 fi
12328 rm -f conftest*
12329 fi
12330 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12331   echo "$ac_t""yes" 1>&6
12332     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12333   cat >> confdefs.h <<EOF
12334 #define $ac_tr_hdr 1
12335 EOF
12336  
12337 else
12338   echo "$ac_t""no" 1>&6
12339 fi
12340 done
12341
12342
12343   ##################################################################
12344   # we might need the k5crypto and com_err libraries on some systems
12345   echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12346 echo "configure:12347: checking for _et_list in -lcom_err" >&5
12347 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12348 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12349   echo $ac_n "(cached) $ac_c" 1>&6
12350 else
12351   ac_save_LIBS="$LIBS"
12352 LIBS="-lcom_err  $LIBS"
12353 cat > conftest.$ac_ext <<EOF
12354 #line 12355 "configure"
12355 #include "confdefs.h"
12356 /* Override any gcc2 internal prototype to avoid an error.  */
12357 /* We use char because int might match the return type of a gcc2
12358     builtin and then its argument prototype would still apply.  */
12359 char _et_list();
12360
12361 int main() {
12362 _et_list()
12363 ; return 0; }
12364 EOF
12365 if { (eval echo configure:12366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12366   rm -rf conftest*
12367   eval "ac_cv_lib_$ac_lib_var=yes"
12368 else
12369   echo "configure: failed program was:" >&5
12370   cat conftest.$ac_ext >&5
12371   rm -rf conftest*
12372   eval "ac_cv_lib_$ac_lib_var=no"
12373 fi
12374 rm -f conftest*
12375 LIBS="$ac_save_LIBS"
12376
12377 fi
12378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12379   echo "$ac_t""yes" 1>&6
12380   LIBS="$LIBS -lcom_err"
12381 else
12382   echo "$ac_t""no" 1>&6
12383 fi
12384
12385   echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12386 echo "configure:12387: checking for krb5_encrypt_data in -lk5crypto" >&5
12387 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12388 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12389   echo $ac_n "(cached) $ac_c" 1>&6
12390 else
12391   ac_save_LIBS="$LIBS"
12392 LIBS="-lk5crypto  $LIBS"
12393 cat > conftest.$ac_ext <<EOF
12394 #line 12395 "configure"
12395 #include "confdefs.h"
12396 /* Override any gcc2 internal prototype to avoid an error.  */
12397 /* We use char because int might match the return type of a gcc2
12398     builtin and then its argument prototype would still apply.  */
12399 char krb5_encrypt_data();
12400
12401 int main() {
12402 krb5_encrypt_data()
12403 ; return 0; }
12404 EOF
12405 if { (eval echo configure:12406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12406   rm -rf conftest*
12407   eval "ac_cv_lib_$ac_lib_var=yes"
12408 else
12409   echo "configure: failed program was:" >&5
12410   cat conftest.$ac_ext >&5
12411   rm -rf conftest*
12412   eval "ac_cv_lib_$ac_lib_var=no"
12413 fi
12414 rm -f conftest*
12415 LIBS="$ac_save_LIBS"
12416
12417 fi
12418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12419   echo "$ac_t""yes" 1>&6
12420   LIBS="$LIBS -lk5crypto"
12421 else
12422   echo "$ac_t""no" 1>&6
12423 fi
12424
12425
12426   ########################################################
12427   # now see if we can find the krb5 libs in standard paths
12428   # or as specified above
12429   echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12430 echo "configure:12431: checking for krb5_mk_req_extended in -lkrb5" >&5
12431 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12432 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12433   echo $ac_n "(cached) $ac_c" 1>&6
12434 else
12435   ac_save_LIBS="$LIBS"
12436 LIBS="-lkrb5  $LIBS"
12437 cat > conftest.$ac_ext <<EOF
12438 #line 12439 "configure"
12439 #include "confdefs.h"
12440 /* Override any gcc2 internal prototype to avoid an error.  */
12441 /* We use char because int might match the return type of a gcc2
12442     builtin and then its argument prototype would still apply.  */
12443 char krb5_mk_req_extended();
12444
12445 int main() {
12446 krb5_mk_req_extended()
12447 ; return 0; }
12448 EOF
12449 if { (eval echo configure:12450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12450   rm -rf conftest*
12451   eval "ac_cv_lib_$ac_lib_var=yes"
12452 else
12453   echo "configure: failed program was:" >&5
12454   cat conftest.$ac_ext >&5
12455   rm -rf conftest*
12456   eval "ac_cv_lib_$ac_lib_var=no"
12457 fi
12458 rm -f conftest*
12459 LIBS="$ac_save_LIBS"
12460
12461 fi
12462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12463   echo "$ac_t""yes" 1>&6
12464   LIBS="$LIBS -lkrb5";
12465         cat >> confdefs.h <<\EOF
12466 #define HAVE_KRB5 1
12467 EOF
12468
12469 else
12470   echo "$ac_t""no" 1>&6
12471 fi
12472
12473
12474   ########################################################
12475   # now see if we can find the gssapi libs in standard paths
12476   echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12477 echo "configure:12478: checking for gss_display_status in -lgssapi_krb5" >&5
12478 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12479 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12480   echo $ac_n "(cached) $ac_c" 1>&6
12481 else
12482   ac_save_LIBS="$LIBS"
12483 LIBS="-lgssapi_krb5  $LIBS"
12484 cat > conftest.$ac_ext <<EOF
12485 #line 12486 "configure"
12486 #include "confdefs.h"
12487 /* Override any gcc2 internal prototype to avoid an error.  */
12488 /* We use char because int might match the return type of a gcc2
12489     builtin and then its argument prototype would still apply.  */
12490 char gss_display_status();
12491
12492 int main() {
12493 gss_display_status()
12494 ; return 0; }
12495 EOF
12496 if { (eval echo configure:12497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12497   rm -rf conftest*
12498   eval "ac_cv_lib_$ac_lib_var=yes"
12499 else
12500   echo "configure: failed program was:" >&5
12501   cat conftest.$ac_ext >&5
12502   rm -rf conftest*
12503   eval "ac_cv_lib_$ac_lib_var=no"
12504 fi
12505 rm -f conftest*
12506 LIBS="$ac_save_LIBS"
12507
12508 fi
12509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12510   echo "$ac_t""yes" 1>&6
12511   LIBS="$LIBS -lgssapi_krb5";
12512         cat >> confdefs.h <<\EOF
12513 #define HAVE_GSSAPI 1
12514 EOF
12515
12516 else
12517   echo "$ac_t""no" 1>&6
12518 fi
12519
12520 fi
12521
12522 ########################################################
12523 # Compile with LDAP support?
12524
12525 with_ldap_support=yes
12526 echo $ac_n "checking whether to use LDAP""... $ac_c" 1>&6
12527 echo "configure:12528: checking whether to use LDAP" >&5
12528
12529 # Check whether --with-ldap or --without-ldap was given.
12530 if test "${with_ldap+set}" = set; then
12531   withval="$with_ldap"
12532    case "$withval" in
12533     no)
12534         with_ldap_support=no
12535         ;;
12536   esac 
12537 fi
12538
12539
12540 echo "$ac_t""$with_ldap_support" 1>&6
12541
12542 if test x"$with_ldap_support" = x"yes"; then
12543
12544   ##################################################################
12545   # we might need the lber lib on some systems. To avoid link errors
12546   # this test must be before the libldap test
12547   echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12548 echo "configure:12549: checking for ber_scanf in -llber" >&5
12549 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12550 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12551   echo $ac_n "(cached) $ac_c" 1>&6
12552 else
12553   ac_save_LIBS="$LIBS"
12554 LIBS="-llber  $LIBS"
12555 cat > conftest.$ac_ext <<EOF
12556 #line 12557 "configure"
12557 #include "confdefs.h"
12558 /* Override any gcc2 internal prototype to avoid an error.  */
12559 /* We use char because int might match the return type of a gcc2
12560     builtin and then its argument prototype would still apply.  */
12561 char ber_scanf();
12562
12563 int main() {
12564 ber_scanf()
12565 ; return 0; }
12566 EOF
12567 if { (eval echo configure:12568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12568   rm -rf conftest*
12569   eval "ac_cv_lib_$ac_lib_var=yes"
12570 else
12571   echo "configure: failed program was:" >&5
12572   cat conftest.$ac_ext >&5
12573   rm -rf conftest*
12574   eval "ac_cv_lib_$ac_lib_var=no"
12575 fi
12576 rm -f conftest*
12577 LIBS="$ac_save_LIBS"
12578
12579 fi
12580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12581   echo "$ac_t""yes" 1>&6
12582   LIBS="$LIBS -llber"
12583 else
12584   echo "$ac_t""no" 1>&6
12585 fi
12586
12587
12588   ########################################################
12589   # now see if we can find the ldap libs in standard paths
12590   if test x$have_ldap != xyes; then
12591   echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12592 echo "configure:12593: checking for ldap_domain2hostlist in -lldap" >&5
12593 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12594 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12595   echo $ac_n "(cached) $ac_c" 1>&6
12596 else
12597   ac_save_LIBS="$LIBS"
12598 LIBS="-lldap  $LIBS"
12599 cat > conftest.$ac_ext <<EOF
12600 #line 12601 "configure"
12601 #include "confdefs.h"
12602 /* Override any gcc2 internal prototype to avoid an error.  */
12603 /* We use char because int might match the return type of a gcc2
12604     builtin and then its argument prototype would still apply.  */
12605 char ldap_domain2hostlist();
12606
12607 int main() {
12608 ldap_domain2hostlist()
12609 ; return 0; }
12610 EOF
12611 if { (eval echo configure:12612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12612   rm -rf conftest*
12613   eval "ac_cv_lib_$ac_lib_var=yes"
12614 else
12615   echo "configure: failed program was:" >&5
12616   cat conftest.$ac_ext >&5
12617   rm -rf conftest*
12618   eval "ac_cv_lib_$ac_lib_var=no"
12619 fi
12620 rm -f conftest*
12621 LIBS="$ac_save_LIBS"
12622
12623 fi
12624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12625   echo "$ac_t""yes" 1>&6
12626   LIBS="$LIBS -lldap";
12627         cat >> confdefs.h <<\EOF
12628 #define HAVE_LDAP 1
12629 EOF
12630
12631 else
12632   echo "$ac_t""no" 1>&6
12633 fi
12634
12635
12636         ########################################################
12637         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12638         # Check found in pam_ldap 145.
12639         for ac_func in ldap_set_rebind_proc
12640 do
12641 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12642 echo "configure:12643: checking for $ac_func" >&5
12643 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12644   echo $ac_n "(cached) $ac_c" 1>&6
12645 else
12646   cat > conftest.$ac_ext <<EOF
12647 #line 12648 "configure"
12648 #include "confdefs.h"
12649 /* System header to define __stub macros and hopefully few prototypes,
12650     which can conflict with char $ac_func(); below.  */
12651 #include <assert.h>
12652 /* Override any gcc2 internal prototype to avoid an error.  */
12653 /* We use char because int might match the return type of a gcc2
12654     builtin and then its argument prototype would still apply.  */
12655 char $ac_func();
12656
12657 int main() {
12658
12659 /* The GNU C library defines this for functions which it implements
12660     to always fail with ENOSYS.  Some functions are actually named
12661     something starting with __ and the normal name is an alias.  */
12662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12663 choke me
12664 #else
12665 $ac_func();
12666 #endif
12667
12668 ; return 0; }
12669 EOF
12670 if { (eval echo configure:12671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12671   rm -rf conftest*
12672   eval "ac_cv_func_$ac_func=yes"
12673 else
12674   echo "configure: failed program was:" >&5
12675   cat conftest.$ac_ext >&5
12676   rm -rf conftest*
12677   eval "ac_cv_func_$ac_func=no"
12678 fi
12679 rm -f conftest*
12680 fi
12681
12682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12683   echo "$ac_t""yes" 1>&6
12684     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12685   cat >> confdefs.h <<EOF
12686 #define $ac_tr_func 1
12687 EOF
12688  
12689 else
12690   echo "$ac_t""no" 1>&6
12691 fi
12692 done
12693
12694         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12695 echo "configure:12696: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12696 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12697   echo $ac_n "(cached) $ac_c" 1>&6
12698 else
12699   
12700         cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703
12704         #include <lber.h>
12705         #include <ldap.h>
12706 int main() {
12707 ldap_set_rebind_proc(0, 0, 0);
12708 ; return 0; }
12709 EOF
12710 if { (eval echo configure:12711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12711   rm -rf conftest*
12712   pam_ldap_cv_ldap_set_rebind_proc=3
12713 else
12714   echo "configure: failed program was:" >&5
12715   cat conftest.$ac_ext >&5
12716   rm -rf conftest*
12717   pam_ldap_cv_ldap_set_rebind_proc=2
12718 fi
12719 rm -f conftest* 
12720 fi
12721
12722 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12723         cat >> confdefs.h <<EOF
12724 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12725 EOF
12726
12727   fi
12728 fi
12729
12730 ########################################################
12731 # Compile with MySQL support?
12732 # Check whether --with-mysql-prefix or --without-mysql-prefix was given.
12733 if test "${with_mysql_prefix+set}" = set; then
12734   withval="$with_mysql_prefix"
12735   mysql_prefix="$withval"
12736 else
12737   mysql_prefix=""
12738 fi
12739
12740 # Check whether --with-mysql-exec-prefix or --without-mysql-exec-prefix was given.
12741 if test "${with_mysql_exec_prefix+set}" = set; then
12742   withval="$with_mysql_exec_prefix"
12743   mysql_exec_prefix="$withval"
12744 else
12745   mysql_exec_prefix=""
12746 fi
12747
12748 # Check whether --enable-mysqltest or --disable-mysqltest was given.
12749 if test "${enable_mysqltest+set}" = set; then
12750   enableval="$enable_mysqltest"
12751   :
12752 else
12753   enable_mysqltest=yes
12754 fi
12755
12756
12757   if test x$mysql_exec_prefix != x ; then
12758      mysql_args="$mysql_args --exec-prefix=$mysql_exec_prefix"
12759      if test x${MYSQL_CONFIG+set} != xset ; then
12760         MYSQL_CONFIG=$mysql_exec_prefix/bin/mysql_config
12761      fi
12762   fi
12763   if test x$mysql_prefix != x ; then
12764      mysql_args="$mysql_args --prefix=$mysql_prefix"
12765      if test x${MYSQL_CONFIG+set} != xset ; then
12766         MYSQL_CONFIG=$mysql_prefix/bin/mysql_config
12767      fi
12768   fi
12769
12770   
12771   # Extract the first word of "mysql_config", so it can be a program name with args.
12772 set dummy mysql_config; ac_word=$2
12773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12774 echo "configure:12775: checking for $ac_word" >&5
12775 if eval "test \"`echo '$''{'ac_cv_path_MYSQL_CONFIG'+set}'`\" = set"; then
12776   echo $ac_n "(cached) $ac_c" 1>&6
12777 else
12778   case "$MYSQL_CONFIG" in
12779   /*)
12780   ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
12781   ;;
12782   ?:/*)                  
12783   ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a dos path.
12784   ;;
12785   *)
12786   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12787   ac_dummy="$PATH"
12788   for ac_dir in $ac_dummy; do 
12789     test -z "$ac_dir" && ac_dir=.
12790     if test -f $ac_dir/$ac_word; then
12791       ac_cv_path_MYSQL_CONFIG="$ac_dir/$ac_word"
12792       break
12793     fi
12794   done
12795   IFS="$ac_save_ifs"
12796   test -z "$ac_cv_path_MYSQL_CONFIG" && ac_cv_path_MYSQL_CONFIG="no"
12797   ;;
12798 esac
12799 fi
12800 MYSQL_CONFIG="$ac_cv_path_MYSQL_CONFIG"
12801 if test -n "$MYSQL_CONFIG"; then
12802   echo "$ac_t""$MYSQL_CONFIG" 1>&6
12803 else
12804   echo "$ac_t""no" 1>&6
12805 fi
12806
12807   min_mysql_version=0.11.0
12808   echo $ac_n "checking for MYSQL - version >= $min_mysql_version""... $ac_c" 1>&6
12809 echo "configure:12810: checking for MYSQL - version >= $min_mysql_version" >&5
12810   no_mysql=""
12811   if test "$MYSQL_CONFIG" = "no" ; then
12812     no_mysql=yes
12813   else
12814     MYSQL_CFLAGS=`$MYSQL_CONFIG $mysqlconf_args --cflags | sed -e "s/'//g"`
12815     MYSQL_LIBS=`$MYSQL_CONFIG $mysqlconf_args --libs | sed -e "s/'//g"`
12816
12817     mysql_major_version=`$MYSQL_CONFIG $mysql_args --version | \
12818            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
12819     mysql_minor_version=`$MYSQL_CONFIG $mysql_args --version | \
12820            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
12821     mysql_micro_version=`$MYSQL_CONFIG $mysql_config_args --version | \
12822            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
12823     if test "x$enable_mysqltest" = "xyes" ; then
12824       ac_save_CFLAGS="$CFLAGS"
12825       ac_save_LIBS="$LIBS"
12826       CFLAGS="$CFLAGS $MYSQL_CFLAGS"
12827       LIBS="$LIBS $MYSQL_LIBS"
12828       rm -f conf.mysqltest
12829       if test "$cross_compiling" = yes; then
12830   echo $ac_n "cross compiling; assumed OK... $ac_c"
12831 else
12832   cat > conftest.$ac_ext <<EOF
12833 #line 12834 "configure"
12834 #include "confdefs.h"
12835
12836 #include <stdio.h>
12837 #include <stdlib.h>
12838 #include <string.h>
12839 #include <mysql.h>
12840
12841 char*
12842 my_strdup (char *str)
12843 {
12844   char *new_str;
12845
12846   if (str)
12847     {
12848       new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
12849       strcpy (new_str, str);
12850     }
12851   else
12852     new_str = NULL;
12853
12854   return new_str;
12855 }
12856
12857 int main (int argc, char *argv[])
12858 {
12859 int major, minor, micro;
12860   char *tmp_version;
12861
12862   /* This hangs on some systems (?)
12863   system ("touch conf.mysqltest");
12864   */
12865   { FILE *fp = fopen("conf.mysqltest", "a"); if ( fp ) fclose(fp); }
12866
12867   /* HP/UX 9 (%@#!) writes to sscanf strings */
12868   tmp_version = my_strdup("$min_mysql_version");
12869   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
12870      printf("%s, bad version string\n", "$min_mysql_version");
12871      exit(1);
12872    }
12873
12874    if (($mysql_major_version > major) ||
12875       (($mysql_major_version == major) && ($mysql_minor_version > minor)) ||
12876       (($mysql_major_version == major) && ($mysql_minor_version == minor) && ($mysql_micro_version >= micro)))
12877     {
12878       return 0;
12879     }
12880   else
12881     {
12882       printf("\n*** 'mysql_config --version' returned %d.%d.%d, but the minimum version\n", $mysql_major_version, $mysql_minor_version, $mysql_micro_version);
12883       printf("*** of MYSQL required is %d.%d.%d. If mysql_config is correct, then it is\n", major, minor, micro);
12884       printf("*** best to upgrade to the required version.\n");
12885       printf("*** If mysql_config was wrong, set the environment variable MYSQL_CONFIG\n");
12886       printf("*** to point to the correct copy of mysql_config, and remove the file\n");
12887       printf("*** config.cache before re-running configure\n");
12888       return 1;
12889     }
12890 }
12891
12892
12893 EOF
12894 if { (eval echo configure:12895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12895 then
12896   :
12897 else
12898   echo "configure: failed program was:" >&5
12899   cat conftest.$ac_ext >&5
12900   rm -fr conftest*
12901   no_mysql=yes
12902 fi
12903 rm -fr conftest*
12904 fi
12905
12906        CFLAGS="$ac_save_CFLAGS"
12907        LIBS="$ac_save_LIBS"
12908      fi
12909   fi
12910   if test "x$no_mysql" = x ; then
12911      echo "$ac_t""yes" 1>&6
12912      MODULE_MYSQL=bin/pdb_mysql.so
12913   else
12914      echo "$ac_t""no" 1>&6
12915      if test "$MYSQL_CONFIG" = "no" ; then
12916        echo "*** The mysql_config script installed by MYSQL could not be found"
12917        echo "*** If MYSQL was installed in PREFIX, make sure PREFIX/bin is in"
12918        echo "*** your path, or set the MYSQL_CONFIG environment variable to the"
12919        echo "*** full path to mysql_config."
12920      else
12921        if test -f conf.mysqltest ; then
12922         :
12923        else
12924           echo "*** Could not run MYSQL test program, checking why..."
12925           CFLAGS="$CFLAGS $MYSQL_CFLAGS"
12926           LIBS="$LIBS $MYSQL_LIBS"
12927           cat > conftest.$ac_ext <<EOF
12928 #line 12929 "configure"
12929 #include "confdefs.h"
12930
12931 #include <stdio.h>
12932 #include <mysql.h>
12933
12934 int main(int argc, char *argv[])
12935 { return 0; }
12936 #undef  main
12937 #define main K_and_R_C_main
12938
12939 int main() {
12940  return 0; 
12941 ; return 0; }
12942 EOF
12943 if { (eval echo configure:12944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12944   rm -rf conftest*
12945    echo "*** The test program compiled, but did not run. This usually means"
12946           echo "*** that the run-time linker is not finding MYSQL or finding the wrong"
12947           echo "*** version of MYSQL. If it is not finding MYSQL, you'll need to set your"
12948           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
12949           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
12950           echo "*** is required on your system"
12951     echo "***"
12952           echo "*** If you have an old version installed, it is best to remove it, although"
12953           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
12954 else
12955   echo "configure: failed program was:" >&5
12956   cat conftest.$ac_ext >&5
12957   rm -rf conftest*
12958    echo "*** The test program failed to compile or link. See the file config.log for the"
12959           echo "*** exact error that occured. This usually means MYSQL was incorrectly installed"
12960           echo "*** or that you have moved MYSQL since it was installed. In the latter case, you"
12961           echo "*** may want to edit the mysql_config script: $MYSQL_CONFIG" 
12962 fi
12963 rm -f conftest*
12964           CFLAGS="$ac_save_CFLAGS"
12965           LIBS="$ac_save_LIBS"
12966        fi
12967      fi
12968      MYSQL_CFLAGS=""
12969      MYSQL_LIBS=""
12970      MODULE_MYSQL=
12971   fi
12972   
12973   
12974   rm -f conf.mysqltest
12975
12976 CFLAGS="$CFLAGS $MYSQL_CFLAGS"
12977
12978
12979 ########################################################
12980 # Compile with XML support?
12981  
12982 # Check whether --with-xml-prefix or --without-xml-prefix was given.
12983 if test "${with_xml_prefix+set}" = set; then
12984   withval="$with_xml_prefix"
12985   xml_config_prefix="$withval"
12986 else
12987   xml_config_prefix=""
12988 fi
12989
12990 # Check whether --with-xml-exec-prefix or --without-xml-exec-prefix was given.
12991 if test "${with_xml_exec_prefix+set}" = set; then
12992   withval="$with_xml_exec_prefix"
12993   xml_config_exec_prefix="$withval"
12994 else
12995   xml_config_exec_prefix=""
12996 fi
12997
12998 # Check whether --enable-xmltest or --disable-xmltest was given.
12999 if test "${enable_xmltest+set}" = set; then
13000   enableval="$enable_xmltest"
13001   :
13002 else
13003   enable_xmltest=yes
13004 fi
13005
13006
13007   if test x$xml_config_exec_prefix != x ; then
13008      xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix"
13009      if test x${XML2_CONFIG+set} != xset ; then
13010         XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
13011      fi
13012   fi
13013   if test x$xml_config_prefix != x ; then
13014      xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
13015      if test x${XML2_CONFIG+set} != xset ; then
13016         XML2_CONFIG=$xml_config_prefix/bin/xml2-config
13017      fi
13018   fi
13019
13020   # Extract the first word of "xml2-config", so it can be a program name with args.
13021 set dummy xml2-config; ac_word=$2
13022 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13023 echo "configure:13024: checking for $ac_word" >&5
13024 if eval "test \"`echo '$''{'ac_cv_path_XML2_CONFIG'+set}'`\" = set"; then
13025   echo $ac_n "(cached) $ac_c" 1>&6
13026 else
13027   case "$XML2_CONFIG" in
13028   /*)
13029   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
13030   ;;
13031   ?:/*)                  
13032   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a dos path.
13033   ;;
13034   *)
13035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13036   ac_dummy="$PATH"
13037   for ac_dir in $ac_dummy; do 
13038     test -z "$ac_dir" && ac_dir=.
13039     if test -f $ac_dir/$ac_word; then
13040       ac_cv_path_XML2_CONFIG="$ac_dir/$ac_word"
13041       break
13042     fi
13043   done
13044   IFS="$ac_save_ifs"
13045   test -z "$ac_cv_path_XML2_CONFIG" && ac_cv_path_XML2_CONFIG="no"
13046   ;;
13047 esac
13048 fi
13049 XML2_CONFIG="$ac_cv_path_XML2_CONFIG"
13050 if test -n "$XML2_CONFIG"; then
13051   echo "$ac_t""$XML2_CONFIG" 1>&6
13052 else
13053   echo "$ac_t""no" 1>&6
13054 fi
13055
13056   min_xml_version=2.0.0
13057   echo $ac_n "checking for libxml - version >= $min_xml_version""... $ac_c" 1>&6
13058 echo "configure:13059: checking for libxml - version >= $min_xml_version" >&5
13059   no_xml=""
13060   if test "$XML2_CONFIG" = "no" ; then
13061     no_xml=yes
13062   else
13063     XML_CFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
13064     XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
13065     xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
13066            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
13067     xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
13068            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
13069     xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
13070            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
13071     if test "x$enable_xmltest" = "xyes" ; then
13072       ac_save_CFLAGS="$CFLAGS"
13073       ac_save_LIBS="$LIBS"
13074       CFLAGS="$CFLAGS $XML_CFLAGS"
13075       LIBS="$XML_LIBS $LIBS"
13076       rm -f conf.xmltest
13077       if test "$cross_compiling" = yes; then
13078   echo $ac_n "cross compiling; assumed OK... $ac_c"
13079 else
13080   cat > conftest.$ac_ext <<EOF
13081 #line 13082 "configure"
13082 #include "confdefs.h"
13083
13084 #include <stdlib.h>
13085 #include <stdio.h>
13086 #include <string.h>
13087 #include <libxml/xmlversion.h>
13088
13089 int 
13090 main()
13091 {
13092   int xml_major_version, xml_minor_version, xml_micro_version;
13093   int major, minor, micro;
13094   char *tmp_version;
13095
13096   system("touch conf.xmltest");
13097
13098   /* Capture xml2-config output via autoconf/configure variables */
13099   /* HP/UX 9 (%@#!) writes to sscanf strings */
13100   tmp_version = (char *)strdup("$min_xml_version");
13101   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
13102      printf("%s, bad version string from xml2-config\n", "$min_xml_version");
13103      exit(1);
13104    }
13105    free(tmp_version);
13106
13107    /* Capture the version information from the header files */
13108    tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
13109    if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
13110      printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
13111      exit(1);
13112    }
13113    free(tmp_version);
13114
13115  /* Compare xml2-config output to the libxml headers */
13116   if ((xml_major_version != $xml_config_major_version) ||
13117       (xml_minor_version != $xml_config_minor_version) ||
13118       (xml_micro_version != $xml_config_micro_version))
13119     {
13120       printf("*** libxml header files (version %d.%d.%d) do not match\n",
13121          xml_major_version, xml_minor_version, xml_micro_version);
13122       printf("*** xml2-config (version %d.%d.%d)\n",
13123          $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
13124       return 1;
13125     } 
13126 /* Compare the headers to the library to make sure we match */
13127   /* Less than ideal -- doesn't provide us with return value feedback, 
13128    * only exits if there's a serious mismatch between header and library.
13129    */
13130     LIBXML_TEST_VERSION;
13131
13132     /* Test that the library is greater than our minimum version */
13133     if ((xml_major_version > major) ||
13134         ((xml_major_version == major) && (xml_minor_version > minor)) ||
13135         ((xml_major_version == major) && (xml_minor_version == minor) &&
13136         (xml_micro_version >= micro)))
13137       {
13138         return 0;
13139        }
13140      else
13141       {
13142         printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
13143                xml_major_version, xml_minor_version, xml_micro_version);
13144         printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
13145            major, minor, micro);
13146         printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
13147         printf("***\n");
13148         printf("*** If you have already installed a sufficiently new version, this error\n");
13149         printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
13150         printf("*** being found. The easiest way to fix this is to remove the old version\n");
13151         printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
13152         printf("*** correct copy of xml2-config. (In this case, you will have to\n");
13153         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
13154         printf("*** so that the correct libraries are found at run-time))\n");
13155     }
13156   return 1;
13157 }
13158
13159 EOF
13160 if { (eval echo configure:13161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13161 then
13162   :
13163 else
13164   echo "configure: failed program was:" >&5
13165   cat conftest.$ac_ext >&5
13166   rm -fr conftest*
13167   no_xml=yes
13168 fi
13169 rm -fr conftest*
13170 fi
13171
13172        CFLAGS="$ac_save_CFLAGS"
13173        LIBS="$ac_save_LIBS"
13174      fi
13175   fi
13176
13177   if test "x$no_xml" = x ; then
13178      echo "$ac_t""yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)" 1>&6
13179      MODULE_XML=bin/pdb_xml.so     
13180   else
13181      echo "$ac_t""no" 1>&6
13182      if test "$XML2_CONFIG" = "no" ; then
13183        echo "*** The xml2-config script installed by LIBXML could not be found"
13184        echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
13185        echo "*** your path, or set the XML2_CONFIG environment variable to the"
13186        echo "*** full path to xml2-config."
13187      else
13188        if test -f conf.xmltest ; then
13189         :
13190        else
13191           echo "*** Could not run libxml test program, checking why..."
13192           CFLAGS="$CFLAGS $XML_CFLAGS"
13193           LIBS="$LIBS $XML_LIBS"
13194           cat > conftest.$ac_ext <<EOF
13195 #line 13196 "configure"
13196 #include "confdefs.h"
13197
13198 #include <libxml/xmlversion.h>
13199 #include <stdio.h>
13200
13201 int main() {
13202  LIBXML_TEST_VERSION; return 0;
13203 ; return 0; }
13204 EOF
13205 if { (eval echo configure:13206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13206   rm -rf conftest*
13207    echo "*** The test program compiled, but did not run. This usually means"
13208           echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
13209           echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
13210           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
13211           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
13212           echo "*** is required on your system"
13213           echo "***"
13214           echo "*** If you have an old version installed, it is best to remove it, although"
13215           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" 
13216 else
13217   echo "configure: failed program was:" >&5
13218   cat conftest.$ac_ext >&5
13219   rm -rf conftest*
13220    echo "*** The test program failed to compile or link. See the file config.log for the"
13221           echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
13222           echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
13223           echo "*** may want to edit the xml2-config script: $XML2_CONFIG" 
13224 fi
13225 rm -f conftest*
13226           CFLAGS="$ac_save_CFLAGS"
13227           LIBS="$ac_save_LIBS"
13228        fi
13229      fi
13230
13231      XML_CFLAGS=""
13232      XML_LIBS=""
13233      MODULE_XML=
13234   fi
13235   
13236   
13237   rm -f conf.xmltest
13238
13239 CFLAGS="$CFLAGS $XML_CFLAGS"
13240
13241
13242 #################################################
13243 # check for automount support
13244 echo $ac_n "checking whether to use automount""... $ac_c" 1>&6
13245 echo "configure:13246: checking whether to use automount" >&5
13246 # Check whether --with-automount or --without-automount was given.
13247 if test "${with_automount+set}" = set; then
13248   withval="$with_automount"
13249    case "$withval" in
13250   yes)
13251     echo "$ac_t""yes" 1>&6
13252     cat >> confdefs.h <<\EOF
13253 #define WITH_AUTOMOUNT 1
13254 EOF
13255
13256     ;;
13257   *)
13258     echo "$ac_t""no" 1>&6
13259     ;;
13260   esac 
13261 else
13262   echo "$ac_t""no" 1>&6
13263
13264 fi
13265
13266
13267 #################################################
13268 # check for smbmount support
13269 echo $ac_n "checking whether to use smbmount""... $ac_c" 1>&6
13270 echo "configure:13271: checking whether to use smbmount" >&5
13271 # Check whether --with-smbmount or --without-smbmount was given.
13272 if test "${with_smbmount+set}" = set; then
13273   withval="$with_smbmount"
13274    case "$withval" in
13275   yes)
13276         case "$host_os" in
13277         *linux*)
13278                 echo "$ac_t""yes" 1>&6
13279                 cat >> confdefs.h <<\EOF
13280 #define WITH_SMBMOUNT 1
13281 EOF
13282
13283                 EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbmount bin/smbmnt bin/smbumount"
13284                 ;;
13285         *)
13286                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
13287                 ;;
13288         esac
13289     ;;
13290   *)
13291     echo "$ac_t""no" 1>&6
13292     ;;
13293   esac 
13294 else
13295   echo "$ac_t""no" 1>&6
13296
13297 fi
13298
13299
13300
13301 #################################################
13302 # check for a PAM clear-text auth, accounts, password and session support
13303 with_pam_for_crypt=no
13304 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
13305 echo "configure:13306: checking whether to use PAM" >&5
13306 # Check whether --with-pam or --without-pam was given.
13307 if test "${with_pam+set}" = set; then
13308   withval="$with_pam"
13309    case "$withval" in
13310   yes)
13311     echo "$ac_t""yes" 1>&6
13312     cat >> confdefs.h <<\EOF
13313 #define WITH_PAM 1
13314 EOF
13315
13316     AUTHLIBS="$AUTHLIBS -lpam"
13317     with_pam_for_crypt=yes
13318     ;;
13319   *)
13320     echo "$ac_t""no" 1>&6
13321     ;;
13322   esac 
13323 else
13324   echo "$ac_t""no" 1>&6
13325
13326 fi
13327
13328
13329 # we can't build a pam module if we don't have pam.
13330 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
13331 echo "configure:13332: checking for pam_get_data in -lpam" >&5
13332 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
13333 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13334   echo $ac_n "(cached) $ac_c" 1>&6
13335 else
13336   ac_save_LIBS="$LIBS"
13337 LIBS="-lpam  $LIBS"
13338 cat > conftest.$ac_ext <<EOF
13339 #line 13340 "configure"
13340 #include "confdefs.h"
13341 /* Override any gcc2 internal prototype to avoid an error.  */
13342 /* We use char because int might match the return type of a gcc2
13343     builtin and then its argument prototype would still apply.  */
13344 char pam_get_data();
13345
13346 int main() {
13347 pam_get_data()
13348 ; return 0; }
13349 EOF
13350 if { (eval echo configure:13351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13351   rm -rf conftest*
13352   eval "ac_cv_lib_$ac_lib_var=yes"
13353 else
13354   echo "configure: failed program was:" >&5
13355   cat conftest.$ac_ext >&5
13356   rm -rf conftest*
13357   eval "ac_cv_lib_$ac_lib_var=no"
13358 fi
13359 rm -f conftest*
13360 LIBS="$ac_save_LIBS"
13361
13362 fi
13363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13364   echo "$ac_t""yes" 1>&6
13365   cat >> confdefs.h <<\EOF
13366 #define HAVE_LIBPAM 1
13367 EOF
13368
13369 else
13370   echo "$ac_t""no" 1>&6
13371 fi
13372
13373
13374 #################################################
13375 # check for pam_smbpass support
13376 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
13377 echo "configure:13378: checking whether to use pam_smbpass" >&5
13378 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
13379 if test "${with_pam_smbpass+set}" = set; then
13380   withval="$with_pam_smbpass"
13381    case "$withval" in
13382   yes)
13383     echo "$ac_t""yes" 1>&6
13384
13385 # Conditions under which pam_smbpass should not be built.
13386
13387        if test x$PICFLAG = x; then
13388           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
13389        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
13390           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
13391        else
13392           SHLIB_PROGS="$SHLIB_PROGS bin/pam_smbpass.so"
13393        fi
13394     ;;
13395   *)
13396     echo "$ac_t""no" 1>&6
13397     ;;
13398   esac 
13399 else
13400   echo "$ac_t""no" 1>&6
13401
13402 fi
13403
13404
13405
13406 ###############################################
13407 # test for where we get crypt() from, but only
13408 # if not using PAM
13409 if test x"$with_pam_for_crypt" = x"no"; then
13410 for ac_func in crypt
13411 do
13412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13413 echo "configure:13414: checking for $ac_func" >&5
13414 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13415   echo $ac_n "(cached) $ac_c" 1>&6
13416 else
13417   cat > conftest.$ac_ext <<EOF
13418 #line 13419 "configure"
13419 #include "confdefs.h"
13420 /* System header to define __stub macros and hopefully few prototypes,
13421     which can conflict with char $ac_func(); below.  */
13422 #include <assert.h>
13423 /* Override any gcc2 internal prototype to avoid an error.  */
13424 /* We use char because int might match the return type of a gcc2
13425     builtin and then its argument prototype would still apply.  */
13426 char $ac_func();
13427
13428 int main() {
13429
13430 /* The GNU C library defines this for functions which it implements
13431     to always fail with ENOSYS.  Some functions are actually named
13432     something starting with __ and the normal name is an alias.  */
13433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13434 choke me
13435 #else
13436 $ac_func();
13437 #endif
13438
13439 ; return 0; }
13440 EOF
13441 if { (eval echo configure:13442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13442   rm -rf conftest*
13443   eval "ac_cv_func_$ac_func=yes"
13444 else
13445   echo "configure: failed program was:" >&5
13446   cat conftest.$ac_ext >&5
13447   rm -rf conftest*
13448   eval "ac_cv_func_$ac_func=no"
13449 fi
13450 rm -f conftest*
13451 fi
13452
13453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13454   echo "$ac_t""yes" 1>&6
13455     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13456   cat >> confdefs.h <<EOF
13457 #define $ac_tr_func 1
13458 EOF
13459  
13460 else
13461   echo "$ac_t""no" 1>&6
13462 fi
13463 done
13464
13465 if test x"$ac_cv_func_crypt" = x"no"; then
13466     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13467 echo "configure:13468: checking for crypt in -lcrypt" >&5
13468 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
13469 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13470   echo $ac_n "(cached) $ac_c" 1>&6
13471 else
13472   ac_save_LIBS="$LIBS"
13473 LIBS="-lcrypt  $LIBS"
13474 cat > conftest.$ac_ext <<EOF
13475 #line 13476 "configure"
13476 #include "confdefs.h"
13477 /* Override any gcc2 internal prototype to avoid an error.  */
13478 /* We use char because int might match the return type of a gcc2
13479     builtin and then its argument prototype would still apply.  */
13480 char crypt();
13481
13482 int main() {
13483 crypt()
13484 ; return 0; }
13485 EOF
13486 if { (eval echo configure:13487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13487   rm -rf conftest*
13488   eval "ac_cv_lib_$ac_lib_var=yes"
13489 else
13490   echo "configure: failed program was:" >&5
13491   cat conftest.$ac_ext >&5
13492   rm -rf conftest*
13493   eval "ac_cv_lib_$ac_lib_var=no"
13494 fi
13495 rm -f conftest*
13496 LIBS="$ac_save_LIBS"
13497
13498 fi
13499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13500   echo "$ac_t""yes" 1>&6
13501   AUTHLIBS="$AUTHLIBS -lcrypt";
13502         cat >> confdefs.h <<\EOF
13503 #define HAVE_CRYPT 1
13504 EOF
13505
13506 else
13507   echo "$ac_t""no" 1>&6
13508 fi
13509
13510 fi
13511 fi
13512
13513 ##
13514 ## moved after the check for -lcrypt in order to
13515 ## ensure that the necessary libraries are included
13516 ## check checking for truncated salt.  Wrapped by the
13517 ## $with_pam_for_crypt variable as above   --jerry
13518 ##
13519 if test $with_pam_for_crypt = no; then
13520 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
13521 echo "configure:13522: checking for a crypt that needs truncated salt" >&5
13522 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
13523   echo $ac_n "(cached) $ac_c" 1>&6
13524 else
13525   
13526 crypt_LIBS="$LIBS"
13527 LIBS="$AUTHLIBS $LIBS"
13528 if test "$cross_compiling" = yes; then
13529   samba_cv_HAVE_TRUNCATED_SALT=cross
13530 else
13531   cat > conftest.$ac_ext <<EOF
13532 #line 13533 "configure"
13533 #include "confdefs.h"
13534 #include "${srcdir-.}/tests/crypttest.c"
13535 EOF
13536 if { (eval echo configure:13537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13537 then
13538   samba_cv_HAVE_TRUNCATED_SALT=no
13539 else
13540   echo "configure: failed program was:" >&5
13541   cat conftest.$ac_ext >&5
13542   rm -fr conftest*
13543   samba_cv_HAVE_TRUNCATED_SALT=yes
13544 fi
13545 rm -fr conftest*
13546 fi
13547
13548 LIBS="$crypt_LIBS"
13549 fi
13550
13551 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
13552 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
13553         cat >> confdefs.h <<\EOF
13554 #define HAVE_TRUNCATED_SALT 1
13555 EOF
13556
13557 fi
13558 fi
13559
13560 ########################################################################################
13561 ##
13562 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
13563 ##
13564 ########################################################################################
13565
13566 #################################################
13567 # check for a LDAP password database configuration backwards compatibility
13568 echo $ac_n "checking whether to use LDAP SAM 2.2 compatible configuration""... $ac_c" 1>&6
13569 echo "configure:13570: checking whether to use LDAP SAM 2.2 compatible configuration" >&5
13570 # Check whether --with-ldapsam or --without-ldapsam was given.
13571 if test "${with_ldapsam+set}" = set; then
13572   withval="$with_ldapsam"
13573    case "$withval" in
13574   yes)
13575     echo "$ac_t""yes" 1>&6
13576     cat >> confdefs.h <<\EOF
13577 #define WITH_LDAP_SAMCONFIG 1
13578 EOF
13579
13580     ;;
13581   *)
13582     echo "$ac_t""no" 1>&6
13583     ;;
13584   esac 
13585 else
13586   echo "$ac_t""no" 1>&6
13587
13588 fi
13589
13590
13591 #################################################
13592 # check for a TDB password database
13593 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
13594 echo "configure:13595: checking whether to use TDB SAM database" >&5
13595 # Check whether --with-tdbsam or --without-tdbsam was given.
13596 if test "${with_tdbsam+set}" = set; then
13597   withval="$with_tdbsam"
13598    case "$withval" in
13599   yes)
13600     echo "$ac_t""yes" 1>&6
13601     cat >> confdefs.h <<\EOF
13602 #define WITH_TDB_SAM 1
13603 EOF
13604
13605     ;;
13606   *)
13607     echo "$ac_t""no" 1>&6
13608     ;;
13609   esac 
13610 else
13611   echo "$ac_t""no" 1>&6
13612
13613 fi
13614
13615
13616 #################################################
13617 # check for a NISPLUS password database
13618 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
13619 echo "configure:13620: checking whether to use NISPLUS SAM database" >&5
13620 # Check whether --with-nisplussam or --without-nisplussam was given.
13621 if test "${with_nisplussam+set}" = set; then
13622   withval="$with_nisplussam"
13623    case "$withval" in
13624   yes)
13625     echo "$ac_t""yes" 1>&6
13626     cat >> confdefs.h <<\EOF
13627 #define WITH_NISPLUS_SAM 1
13628 EOF
13629
13630     ;;
13631   *)
13632     echo "$ac_t""no" 1>&6
13633     ;;
13634   esac 
13635 else
13636   echo "$ac_t""no" 1>&6
13637
13638 fi
13639
13640
13641 ########################################################################################
13642 ##
13643 ## END OF TESTS FOR SAM BACKENDS.  
13644 ##
13645 ########################################################################################
13646
13647 #################################################
13648 # check for a NISPLUS_HOME support 
13649 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
13650 echo "configure:13651: checking whether to use NISPLUS_HOME" >&5
13651 # Check whether --with-nisplus-home or --without-nisplus-home was given.
13652 if test "${with_nisplus_home+set}" = set; then
13653   withval="$with_nisplus_home"
13654    case "$withval" in
13655   yes)
13656     echo "$ac_t""yes" 1>&6
13657     cat >> confdefs.h <<\EOF
13658 #define WITH_NISPLUS_HOME 1
13659 EOF
13660
13661     ;;
13662   *)
13663     echo "$ac_t""no" 1>&6
13664     ;;
13665   esac 
13666 else
13667   echo "$ac_t""no" 1>&6
13668
13669 fi
13670
13671
13672 #################################################
13673 # check for syslog logging
13674 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
13675 echo "configure:13676: checking whether to use syslog logging" >&5
13676 # Check whether --with-syslog or --without-syslog was given.
13677 if test "${with_syslog+set}" = set; then
13678   withval="$with_syslog"
13679    case "$withval" in
13680   yes)
13681     echo "$ac_t""yes" 1>&6
13682     cat >> confdefs.h <<\EOF
13683 #define WITH_SYSLOG 1
13684 EOF
13685
13686     ;;
13687   *)
13688     echo "$ac_t""no" 1>&6
13689     ;;
13690   esac 
13691 else
13692   echo "$ac_t""no" 1>&6
13693
13694 fi
13695
13696
13697 #################################################
13698 # check for a shared memory profiling support
13699 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
13700 echo "configure:13701: checking whether to use profiling" >&5
13701 # Check whether --with-profiling-data or --without-profiling-data was given.
13702 if test "${with_profiling_data+set}" = set; then
13703   withval="$with_profiling_data"
13704    case "$withval" in
13705   yes)
13706     echo "$ac_t""yes" 1>&6
13707     cat >> confdefs.h <<\EOF
13708 #define WITH_PROFILE 1
13709 EOF
13710
13711     ;;
13712   *)
13713     echo "$ac_t""no" 1>&6
13714     ;;
13715   esac 
13716 else
13717   echo "$ac_t""no" 1>&6
13718
13719 fi
13720
13721
13722
13723 #################################################
13724 # check for experimental disk-quotas support
13725 QUOTAOBJS=smbd/noquotas.o
13726
13727 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
13728 echo "configure:13729: checking whether to support disk-quotas" >&5
13729 # Check whether --with-quotas or --without-quotas was given.
13730 if test "${with_quotas+set}" = set; then
13731   withval="$with_quotas"
13732    case "$withval" in
13733   yes)
13734     echo "$ac_t""yes" 1>&6
13735     case "$host_os" in
13736       *linux*)
13737         # Check for kernel 2.4.x quota braindamage...
13738         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
13739 echo "configure:13740: checking for linux 2.4.x quota braindamage.." >&5
13740 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
13741   echo $ac_n "(cached) $ac_c" 1>&6
13742 else
13743   
13744         cat > conftest.$ac_ext <<EOF
13745 #line 13746 "configure"
13746 #include "confdefs.h"
13747 #include <stdio.h>
13748 #include <sys/types.h>
13749 #include <asm/types.h>
13750 #include <linux/quota.h>
13751 #include <mntent.h>
13752 #include <linux/unistd.h>
13753 int main() {
13754 struct mem_dqblk D;
13755 ; return 0; }
13756 EOF
13757 if { (eval echo configure:13758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13758   rm -rf conftest*
13759   samba_cv_linux_2_4_quota_braindamage=yes
13760 else
13761   echo "configure: failed program was:" >&5
13762   cat conftest.$ac_ext >&5
13763   rm -rf conftest*
13764   samba_cv_linux_2_4_quota_braindamage=no
13765 fi
13766 rm -f conftest*
13767 fi
13768
13769 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
13770 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
13771         cat >> confdefs.h <<\EOF
13772 #define LINUX_QUOTAS_2 1
13773 EOF
13774
13775 else
13776         cat >> confdefs.h <<\EOF
13777 #define LINUX_QUOTAS_1 1
13778 EOF
13779
13780 fi
13781         ;;
13782       *)
13783         ;;
13784     esac
13785     QUOTAOBJS=smbd/quotas.o
13786     cat >> confdefs.h <<\EOF
13787 #define WITH_QUOTAS 1
13788 EOF
13789
13790     ;;
13791   *)
13792     echo "$ac_t""no" 1>&6
13793     ;;
13794   esac 
13795 else
13796   echo "$ac_t""no" 1>&6
13797
13798 fi
13799
13800
13801
13802 #################################################
13803 # check for experimental utmp accounting
13804
13805 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13806 echo "configure:13807: checking whether to support utmp accounting" >&5
13807 # Check whether --with-utmp or --without-utmp was given.
13808 if test "${with_utmp+set}" = set; then
13809   withval="$with_utmp"
13810    case "$withval" in
13811   yes)
13812     echo "$ac_t""yes" 1>&6
13813     cat >> confdefs.h <<\EOF
13814 #define WITH_UTMP 1
13815 EOF
13816
13817     ;;
13818   *)
13819     echo "$ac_t""no" 1>&6
13820     ;;
13821   esac 
13822 else
13823   echo "$ac_t""no" 1>&6
13824
13825 fi
13826
13827
13828 #################################################
13829 # choose native language(s) of man pages
13830 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13831 echo "configure:13832: checking chosen man pages' language(s)" >&5
13832 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13833 if test "${with_manpages_langs+set}" = set; then
13834   withval="$with_manpages_langs"
13835    case "$withval" in
13836   yes|no)
13837     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13838     manlangs="en"
13839   ;;
13840   *)
13841     manlangs="$withval"
13842   ;;
13843   esac
13844
13845   echo "$ac_t""$manlangs" 1>&6
13846   manlangs=`echo $manlangs | sed "s/,/ /g"`   # replacing commas with spaces to produce a list
13847   
13848 else
13849   manlangs="en"
13850   echo "$ac_t""$manlangs" 1>&6
13851   
13852
13853 fi
13854
13855
13856 #################################################
13857 # should we build libsmbclient?
13858
13859 LIBSMBCLIENT_SHARED=
13860 LIBSMBCLIENT=
13861 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13862 echo "configure:13863: checking whether to build the libsmbclient shared library" >&5
13863 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13864 if test "${with_libsmbclient+set}" = set; then
13865   withval="$with_libsmbclient"
13866    case "$withval" in
13867   no) 
13868      echo "$ac_t""no" 1>&6
13869      ;;
13870   *)
13871      if test $BLDSHARED = true; then
13872         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13873         LIBSMBCLIENT=libsmbclient
13874         echo "$ac_t""yes" 1>&6
13875      else
13876         echo "$ac_t""no shared library support" 1>&6
13877      fi
13878      ;;
13879   esac 
13880 else
13881   echo "$ac_t""yes" 1>&6
13882
13883 fi
13884
13885
13886
13887 #################################################
13888 # these tests are taken from the GNU fileutils package
13889 echo "checking how to get filesystem space usage" 1>&6
13890 echo "configure:13891: checking how to get filesystem space usage" >&5
13891 space=no
13892
13893 # Test for statvfs64.
13894 if test $space = no; then
13895   # SVR4
13896   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13897 echo "configure:13898: checking statvfs64 function (SVR4)" >&5
13898 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13899   echo $ac_n "(cached) $ac_c" 1>&6
13900 else
13901   if test "$cross_compiling" = yes; then
13902   fu_cv_sys_stat_statvfs64=cross
13903 else
13904   cat > conftest.$ac_ext <<EOF
13905 #line 13906 "configure"
13906 #include "confdefs.h"
13907
13908 #if defined(HAVE_UNISTD_H)
13909 #include <unistd.h>
13910 #endif
13911 #include <sys/types.h>
13912 #include <sys/statvfs.h>
13913   main ()
13914   {
13915     struct statvfs64 fsd;
13916     exit (statvfs64 (".", &fsd));
13917   }
13918 EOF
13919 if { (eval echo configure:13920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13920 then
13921   fu_cv_sys_stat_statvfs64=yes
13922 else
13923   echo "configure: failed program was:" >&5
13924   cat conftest.$ac_ext >&5
13925   rm -fr conftest*
13926   fu_cv_sys_stat_statvfs64=no
13927 fi
13928 rm -fr conftest*
13929 fi
13930
13931 fi
13932
13933 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13934   if test $fu_cv_sys_stat_statvfs64 = yes; then
13935     space=yes
13936     cat >> confdefs.h <<\EOF
13937 #define STAT_STATVFS64 1
13938 EOF
13939
13940   fi
13941 fi
13942
13943 # Perform only the link test since it seems there are no variants of the
13944 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13945 # because that got a false positive on SCO OSR5.  Adding the declaration
13946 # of a `struct statvfs' causes this test to fail (as it should) on such
13947 # systems.  That system is reported to work fine with STAT_STATFS4 which
13948 # is what it gets when this test fails.
13949 if test $space = no; then
13950   # SVR4
13951   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13952 echo "configure:13953: checking statvfs function (SVR4)" >&5
13953 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13954   echo $ac_n "(cached) $ac_c" 1>&6
13955 else
13956   cat > conftest.$ac_ext <<EOF
13957 #line 13958 "configure"
13958 #include "confdefs.h"
13959 #include <sys/types.h>
13960 #include <sys/statvfs.h>
13961 int main() {
13962 struct statvfs fsd; statvfs (0, &fsd);
13963 ; return 0; }
13964 EOF
13965 if { (eval echo configure:13966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13966   rm -rf conftest*
13967   fu_cv_sys_stat_statvfs=yes
13968 else
13969   echo "configure: failed program was:" >&5
13970   cat conftest.$ac_ext >&5
13971   rm -rf conftest*
13972   fu_cv_sys_stat_statvfs=no
13973 fi
13974 rm -f conftest*
13975 fi
13976
13977 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13978   if test $fu_cv_sys_stat_statvfs = yes; then
13979     space=yes
13980     cat >> confdefs.h <<\EOF
13981 #define STAT_STATVFS 1
13982 EOF
13983
13984   fi
13985 fi
13986
13987 if test $space = no; then
13988   # DEC Alpha running OSF/1
13989   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13990 echo "configure:13991: checking for 3-argument statfs function (DEC OSF/1)" >&5
13991   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13992   echo $ac_n "(cached) $ac_c" 1>&6
13993 else
13994   if test "$cross_compiling" = yes; then
13995   fu_cv_sys_stat_statfs3_osf1=no
13996 else
13997   cat > conftest.$ac_ext <<EOF
13998 #line 13999 "configure"
13999 #include "confdefs.h"
14000
14001 #include <sys/param.h>
14002 #include <sys/types.h>
14003 #include <sys/mount.h>
14004   main ()
14005   {
14006     struct statfs fsd;
14007     fsd.f_fsize = 0;
14008     exit (statfs (".", &fsd, sizeof (struct statfs)));
14009   }
14010 EOF
14011 if { (eval echo configure:14012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14012 then
14013   fu_cv_sys_stat_statfs3_osf1=yes
14014 else
14015   echo "configure: failed program was:" >&5
14016   cat conftest.$ac_ext >&5
14017   rm -fr conftest*
14018   fu_cv_sys_stat_statfs3_osf1=no
14019 fi
14020 rm -fr conftest*
14021 fi
14022
14023 fi
14024
14025   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
14026   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
14027     space=yes
14028     cat >> confdefs.h <<\EOF
14029 #define STAT_STATFS3_OSF1 1
14030 EOF
14031
14032   fi
14033 fi
14034
14035 if test $space = no; then
14036 # AIX
14037   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
14038 echo "configure:14039: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
14039   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
14040   echo $ac_n "(cached) $ac_c" 1>&6
14041 else
14042   if test "$cross_compiling" = yes; then
14043   fu_cv_sys_stat_statfs2_bsize=no
14044 else
14045   cat > conftest.$ac_ext <<EOF
14046 #line 14047 "configure"
14047 #include "confdefs.h"
14048
14049 #ifdef HAVE_SYS_PARAM_H
14050 #include <sys/param.h>
14051 #endif
14052 #ifdef HAVE_SYS_MOUNT_H
14053 #include <sys/mount.h>
14054 #endif
14055 #ifdef HAVE_SYS_VFS_H
14056 #include <sys/vfs.h>
14057 #endif
14058   main ()
14059   {
14060   struct statfs fsd;
14061   fsd.f_bsize = 0;
14062   exit (statfs (".", &fsd));
14063   }
14064 EOF
14065 if { (eval echo configure:14066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14066 then
14067   fu_cv_sys_stat_statfs2_bsize=yes
14068 else
14069   echo "configure: failed program was:" >&5
14070   cat conftest.$ac_ext >&5
14071   rm -fr conftest*
14072   fu_cv_sys_stat_statfs2_bsize=no
14073 fi
14074 rm -fr conftest*
14075 fi
14076
14077 fi
14078
14079   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
14080   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
14081     space=yes
14082     cat >> confdefs.h <<\EOF
14083 #define STAT_STATFS2_BSIZE 1
14084 EOF
14085
14086   fi
14087 fi
14088
14089 if test $space = no; then
14090 # SVR3
14091   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
14092 echo "configure:14093: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
14093   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
14094   echo $ac_n "(cached) $ac_c" 1>&6
14095 else
14096   if test "$cross_compiling" = yes; then
14097   fu_cv_sys_stat_statfs4=no
14098 else
14099   cat > conftest.$ac_ext <<EOF
14100 #line 14101 "configure"
14101 #include "confdefs.h"
14102 #include <sys/types.h>
14103 #include <sys/statfs.h>
14104   main ()
14105   {
14106   struct statfs fsd;
14107   exit (statfs (".", &fsd, sizeof fsd, 0));
14108   }
14109 EOF
14110 if { (eval echo configure:14111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14111 then
14112   fu_cv_sys_stat_statfs4=yes
14113 else
14114   echo "configure: failed program was:" >&5
14115   cat conftest.$ac_ext >&5
14116   rm -fr conftest*
14117   fu_cv_sys_stat_statfs4=no
14118 fi
14119 rm -fr conftest*
14120 fi
14121
14122 fi
14123
14124   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
14125   if test $fu_cv_sys_stat_statfs4 = yes; then
14126     space=yes
14127     cat >> confdefs.h <<\EOF
14128 #define STAT_STATFS4 1
14129 EOF
14130
14131   fi
14132 fi
14133
14134 if test $space = no; then
14135 # 4.4BSD and NetBSD
14136   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
14137 echo "configure:14138: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
14138   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
14139   echo $ac_n "(cached) $ac_c" 1>&6
14140 else
14141   if test "$cross_compiling" = yes; then
14142   fu_cv_sys_stat_statfs2_fsize=no
14143 else
14144   cat > conftest.$ac_ext <<EOF
14145 #line 14146 "configure"
14146 #include "confdefs.h"
14147 #include <sys/types.h>
14148 #ifdef HAVE_SYS_PARAM_H
14149 #include <sys/param.h>
14150 #endif
14151 #ifdef HAVE_SYS_MOUNT_H
14152 #include <sys/mount.h>
14153 #endif
14154   main ()
14155   {
14156   struct statfs fsd;
14157   fsd.f_fsize = 0;
14158   exit (statfs (".", &fsd));
14159   }
14160 EOF
14161 if { (eval echo configure:14162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14162 then
14163   fu_cv_sys_stat_statfs2_fsize=yes
14164 else
14165   echo "configure: failed program was:" >&5
14166   cat conftest.$ac_ext >&5
14167   rm -fr conftest*
14168   fu_cv_sys_stat_statfs2_fsize=no
14169 fi
14170 rm -fr conftest*
14171 fi
14172
14173 fi
14174
14175   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
14176   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
14177     space=yes
14178         cat >> confdefs.h <<\EOF
14179 #define STAT_STATFS2_FSIZE 1
14180 EOF
14181
14182   fi
14183 fi
14184
14185 if test $space = no; then
14186   # Ultrix
14187   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
14188 echo "configure:14189: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
14189   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
14190   echo $ac_n "(cached) $ac_c" 1>&6
14191 else
14192   if test "$cross_compiling" = yes; then
14193   fu_cv_sys_stat_fs_data=no
14194 else
14195   cat > conftest.$ac_ext <<EOF
14196 #line 14197 "configure"
14197 #include "confdefs.h"
14198 #include <sys/types.h>
14199 #ifdef HAVE_SYS_PARAM_H
14200 #include <sys/param.h>
14201 #endif
14202 #ifdef HAVE_SYS_MOUNT_H
14203 #include <sys/mount.h>
14204 #endif
14205 #ifdef HAVE_SYS_FS_TYPES_H
14206 #include <sys/fs_types.h>
14207 #endif
14208   main ()
14209   {
14210   struct fs_data fsd;
14211   /* Ultrix's statfs returns 1 for success,
14212      0 for not mounted, -1 for failure.  */
14213   exit (statfs (".", &fsd) != 1);
14214   }
14215 EOF
14216 if { (eval echo configure:14217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14217 then
14218   fu_cv_sys_stat_fs_data=yes
14219 else
14220   echo "configure: failed program was:" >&5
14221   cat conftest.$ac_ext >&5
14222   rm -fr conftest*
14223   fu_cv_sys_stat_fs_data=no
14224 fi
14225 rm -fr conftest*
14226 fi
14227
14228 fi
14229
14230   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
14231   if test $fu_cv_sys_stat_fs_data = yes; then
14232     space=yes
14233     cat >> confdefs.h <<\EOF
14234 #define STAT_STATFS2_FS_DATA 1
14235 EOF
14236
14237   fi
14238 fi
14239
14240 #
14241 # As a gating factor for large file support, in order to
14242 # use <4GB files we must have the following minimal support
14243 # available.
14244 # long long, and a 64 bit off_t or off64_t.
14245 # If we don't have all of these then disable large
14246 # file support.
14247 #
14248 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
14249 echo "configure:14250: checking if large file support can be enabled" >&5
14250 cat > conftest.$ac_ext <<EOF
14251 #line 14252 "configure"
14252 #include "confdefs.h"
14253
14254 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
14255 #include <sys/types.h>
14256 #else
14257 __COMPILE_ERROR_
14258 #endif
14259
14260 int main() {
14261 int i
14262 ; return 0; }
14263 EOF
14264 if { (eval echo configure:14265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14265   rm -rf conftest*
14266   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
14267 else
14268   echo "configure: failed program was:" >&5
14269   cat conftest.$ac_ext >&5
14270   rm -rf conftest*
14271   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
14272 fi
14273 rm -f conftest*
14274 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
14275         cat >> confdefs.h <<\EOF
14276 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
14277 EOF
14278
14279 fi
14280 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
14281
14282 # Check whether --with-spinlocks or --without-spinlocks was given.
14283 if test "${with_spinlocks+set}" = set; then
14284   withval="$with_spinlocks"
14285   :
14286 fi
14287
14288 if test "x$with_spinlocks" = "xyes"; then
14289     cat >> confdefs.h <<\EOF
14290 #define USE_SPINLOCKS 1
14291 EOF
14292
14293
14294     case "$host_cpu" in
14295         sparc)
14296             cat >> confdefs.h <<\EOF
14297 #define SPARC_SPINLOCKS 1
14298 EOF
14299
14300             ;;
14301
14302         i386|i486|i586|i686)
14303             cat >> confdefs.h <<\EOF
14304 #define INTEL_SPINLOCKS 1
14305 EOF
14306
14307             ;;
14308
14309         mips)
14310             cat >> confdefs.h <<\EOF
14311 #define MIPS_SPINLOCKS 1
14312 EOF
14313
14314             ;;
14315
14316         powerpc)
14317             cat >> confdefs.h <<\EOF
14318 #define POWERPC_SPINLOCKS 1
14319 EOF
14320
14321             ;;
14322     esac
14323 fi
14324
14325 #################################################
14326 # check for ACL support
14327
14328 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
14329 echo "configure:14330: checking whether to support ACLs" >&5
14330 # Check whether --with-acl-support or --without-acl-support was given.
14331 if test "${with_acl_support+set}" = set; then
14332   withval="$with_acl_support"
14333    case "$withval" in
14334   yes)
14335
14336         case "$host_os" in
14337         *sysv5*)
14338                 echo "$ac_t""Using UnixWare ACLs" 1>&6
14339                 cat >> confdefs.h <<\EOF
14340 #define HAVE_UNIXWARE_ACLS 1
14341 EOF
14342
14343                 ;;
14344         *solaris*)
14345                 echo "$ac_t""Using solaris ACLs" 1>&6
14346                 cat >> confdefs.h <<\EOF
14347 #define HAVE_SOLARIS_ACLS 1
14348 EOF
14349
14350                 ;;
14351         *hpux*)
14352                 echo "$ac_t""Using HPUX ACLs" 1>&6
14353                 cat >> confdefs.h <<\EOF
14354 #define HAVE_HPUX_ACLS 1
14355 EOF
14356
14357                 ;;
14358         *irix*)
14359                 echo "$ac_t""Using IRIX ACLs" 1>&6
14360                 cat >> confdefs.h <<\EOF
14361 #define HAVE_IRIX_ACLS 1
14362 EOF
14363
14364                 ;;
14365         *aix*)
14366                 echo "$ac_t""Using AIX ACLs" 1>&6
14367                 cat >> confdefs.h <<\EOF
14368 #define HAVE_AIX_ACLS 1
14369 EOF
14370
14371                 ;;
14372         *osf*)
14373                 echo "$ac_t""Using Tru64 ACLs" 1>&6
14374                 cat >> confdefs.h <<\EOF
14375 #define HAVE_TRU64_ACLS 1
14376 EOF
14377
14378                 LIBS="$LIBS -lpacl"
14379                 ;;
14380         *)
14381                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
14382 echo "configure:14383: checking for acl_get_file in -lacl" >&5
14383 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
14384 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14385   echo $ac_n "(cached) $ac_c" 1>&6
14386 else
14387   ac_save_LIBS="$LIBS"
14388 LIBS="-lacl  $LIBS"
14389 cat > conftest.$ac_ext <<EOF
14390 #line 14391 "configure"
14391 #include "confdefs.h"
14392 /* Override any gcc2 internal prototype to avoid an error.  */
14393 /* We use char because int might match the return type of a gcc2
14394     builtin and then its argument prototype would still apply.  */
14395 char acl_get_file();
14396
14397 int main() {
14398 acl_get_file()
14399 ; return 0; }
14400 EOF
14401 if { (eval echo configure:14402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14402   rm -rf conftest*
14403   eval "ac_cv_lib_$ac_lib_var=yes"
14404 else
14405   echo "configure: failed program was:" >&5
14406   cat conftest.$ac_ext >&5
14407   rm -rf conftest*
14408   eval "ac_cv_lib_$ac_lib_var=no"
14409 fi
14410 rm -f conftest*
14411 LIBS="$ac_save_LIBS"
14412
14413 fi
14414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14415   echo "$ac_t""yes" 1>&6
14416     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14417     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14418   cat >> confdefs.h <<EOF
14419 #define $ac_tr_lib 1
14420 EOF
14421
14422   LIBS="-lacl $LIBS"
14423
14424 else
14425   echo "$ac_t""no" 1>&6
14426 fi
14427
14428                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
14429 echo "configure:14430: checking for ACL support" >&5
14430 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
14431   echo $ac_n "(cached) $ac_c" 1>&6
14432 else
14433   
14434                 cat > conftest.$ac_ext <<EOF
14435 #line 14436 "configure"
14436 #include "confdefs.h"
14437 #include <sys/types.h>
14438 #include <sys/acl.h>
14439 int main() {
14440  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
14441 ; return 0; }
14442 EOF
14443 if { (eval echo configure:14444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14444   rm -rf conftest*
14445   samba_cv_HAVE_POSIX_ACLS=yes
14446 else
14447   echo "configure: failed program was:" >&5
14448   cat conftest.$ac_ext >&5
14449   rm -rf conftest*
14450   samba_cv_HAVE_POSIX_ACLS=no
14451 fi
14452 rm -f conftest*
14453 fi
14454
14455 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
14456                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
14457                                 echo "$ac_t""Using posix ACLs" 1>&6
14458                                 cat >> confdefs.h <<\EOF
14459 #define HAVE_POSIX_ACLS 1
14460 EOF
14461
14462                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
14463 echo "configure:14464: checking for acl_get_perm_np" >&5
14464 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
14465   echo $ac_n "(cached) $ac_c" 1>&6
14466 else
14467   
14468                                 cat > conftest.$ac_ext <<EOF
14469 #line 14470 "configure"
14470 #include "confdefs.h"
14471 #include <sys/types.h>
14472 #include <sys/acl.h>
14473 int main() {
14474  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
14475 ; return 0; }
14476 EOF
14477 if { (eval echo configure:14478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14478   rm -rf conftest*
14479   samba_cv_HAVE_ACL_GET_PERM_NP=yes
14480 else
14481   echo "configure: failed program was:" >&5
14482   cat conftest.$ac_ext >&5
14483   rm -rf conftest*
14484   samba_cv_HAVE_ACL_GET_PERM_NP=no
14485 fi
14486 rm -f conftest*
14487 fi
14488
14489 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
14490                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
14491                                         cat >> confdefs.h <<\EOF
14492 #define HAVE_ACL_GET_PERM_NP 1
14493 EOF
14494
14495                                 fi
14496                         fi
14497             ;;
14498         esac
14499         ;;
14500   *)
14501     echo "$ac_t""no" 1>&6
14502     cat >> confdefs.h <<\EOF
14503 #define HAVE_NO_ACLS 1
14504 EOF
14505
14506     ;;
14507   esac 
14508 else
14509   cat >> confdefs.h <<\EOF
14510 #define HAVE_NO_ACLS 1
14511 EOF
14512
14513   echo "$ac_t""no" 1>&6
14514
14515 fi
14516
14517
14518 #################################################
14519 # check for sendfile support
14520
14521 with_sendfile_support=yes
14522 echo $ac_n "checking whether to check to support sendfile""... $ac_c" 1>&6
14523 echo "configure:14524: checking whether to check to support sendfile" >&5
14524 # Check whether --with-sendfile-support or --without-sendfile-support was given.
14525 if test "${with_sendfile_support+set}" = set; then
14526   withval="$with_sendfile_support"
14527    case "$withval" in
14528   yes)
14529
14530         echo "$ac_t""yes" 1>&6;
14531
14532         case "$host_os" in
14533         *linux*)
14534                 echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6
14535 echo "configure:14536: checking for linux sendfile64 support" >&5
14536 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
14537   echo $ac_n "(cached) $ac_c" 1>&6
14538 else
14539   
14540                 cat > conftest.$ac_ext <<EOF
14541 #line 14542 "configure"
14542 #include "confdefs.h"
14543 #include <sys/sendfile.h>
14544 int main() {
14545 \
14546 int tofd, fromfd;
14547 off64_t offset;
14548 size_t total;
14549 ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total);
14550
14551 ; return 0; }
14552 EOF
14553 if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14554   rm -rf conftest*
14555   samba_cv_HAVE_SENDFILE64=yes
14556 else
14557   echo "configure: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   rm -rf conftest*
14560   samba_cv_HAVE_SENDFILE64=no
14561 fi
14562 rm -f conftest*
14563 fi
14564
14565 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
14566
14567                 echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6
14568 echo "configure:14569: checking for linux sendfile support" >&5
14569 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14570   echo $ac_n "(cached) $ac_c" 1>&6
14571 else
14572   
14573                 cat > conftest.$ac_ext <<EOF
14574 #line 14575 "configure"
14575 #include "confdefs.h"
14576 #include <sys/sendfile.h>
14577 int main() {
14578 \
14579 int tofd, fromfd;
14580 off_t offset;
14581 size_t total;
14582 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
14583
14584 ; return 0; }
14585 EOF
14586 if { (eval echo configure:14587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14587   rm -rf conftest*
14588   samba_cv_HAVE_SENDFILE=yes
14589 else
14590   echo "configure: failed program was:" >&5
14591   cat conftest.$ac_ext >&5
14592   rm -rf conftest*
14593   samba_cv_HAVE_SENDFILE=no
14594 fi
14595 rm -f conftest*
14596 fi
14597
14598 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14599
14600 # Try and cope with broken Linux sendfile....
14601                 echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6
14602 echo "configure:14603: checking for broken linux sendfile support" >&5
14603 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then
14604   echo $ac_n "(cached) $ac_c" 1>&6
14605 else
14606   
14607                 cat > conftest.$ac_ext <<EOF
14608 #line 14609 "configure"
14609 #include "confdefs.h"
14610 \
14611 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
14612 #undef _FILE_OFFSET_BITS
14613 #endif
14614 #include <sys/sendfile.h>
14615 int main() {
14616 \
14617 int tofd, fromfd;
14618 off_t offset;
14619 size_t total;
14620 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
14621
14622 ; return 0; }
14623 EOF
14624 if { (eval echo configure:14625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14625   rm -rf conftest*
14626   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes
14627 else
14628   echo "configure: failed program was:" >&5
14629   cat conftest.$ac_ext >&5
14630   rm -rf conftest*
14631   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no
14632 fi
14633 rm -f conftest*
14634 fi
14635
14636 echo "$ac_t""$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" 1>&6
14637
14638         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
14639                 cat >> confdefs.h <<\EOF
14640 #define HAVE_SENDFILE64 1
14641 EOF
14642
14643                 cat >> confdefs.h <<\EOF
14644 #define LINUX_SENDFILE_API 1
14645 EOF
14646
14647                 cat >> confdefs.h <<\EOF
14648 #define WITH_SENDFILE 1
14649 EOF
14650
14651         elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14652                 cat >> confdefs.h <<\EOF
14653 #define HAVE_SENDFILE 1
14654 EOF
14655
14656                 cat >> confdefs.h <<\EOF
14657 #define LINUX_SENDFILE_API 1
14658 EOF
14659
14660                 cat >> confdefs.h <<\EOF
14661 #define WITH_SENDFILE 1
14662 EOF
14663
14664         elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
14665                 cat >> confdefs.h <<\EOF
14666 #define LINUX_BROKEN_SENDFILE_API 1
14667 EOF
14668
14669                 cat >> confdefs.h <<\EOF
14670 #define WITH_SENDFILE 1
14671 EOF
14672
14673         else
14674                 echo "$ac_t""no" 1>&6;
14675         fi
14676
14677         ;;
14678         *freebsd*)
14679                 echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6
14680 echo "configure:14681: checking for freebsd sendfile support" >&5
14681 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14682   echo $ac_n "(cached) $ac_c" 1>&6
14683 else
14684   
14685                 cat > conftest.$ac_ext <<EOF
14686 #line 14687 "configure"
14687 #include "confdefs.h"
14688 \
14689 #include <sys/types.h>
14690 #include <unistd.h>
14691 #include <sys/socket.h>
14692 #include <sys/uio.h>
14693 int main() {
14694 \
14695         int fromfd, tofd, ret, total=0;
14696         off_t offset, nwritten;
14697         struct sf_hdtr hdr;
14698         struct iovec hdtrl;
14699         hdr.headers = &hdtrl;
14700         hdr.hdr_cnt = 1;
14701         hdr.trailers = NULL;
14702         hdr.trl_cnt = 0;
14703         hdtrl.iov_base = NULL;
14704         hdtrl.iov_len = 0;
14705         ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
14706
14707 ; return 0; }
14708 EOF
14709 if { (eval echo configure:14710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14710   rm -rf conftest*
14711   samba_cv_HAVE_SENDFILE=yes
14712 else
14713   echo "configure: failed program was:" >&5
14714   cat conftest.$ac_ext >&5
14715   rm -rf conftest*
14716   samba_cv_HAVE_SENDFILE=no
14717 fi
14718 rm -f conftest*
14719 fi
14720
14721 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14722
14723         if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14724                 cat >> confdefs.h <<\EOF
14725 #define HAVE_SENDFILE 1
14726 EOF
14727
14728                 cat >> confdefs.h <<\EOF
14729 #define FREEBSD_SENDFILE_API 1
14730 EOF
14731
14732                 cat >> confdefs.h <<\EOF
14733 #define WITH_SENDFILE 1
14734 EOF
14735
14736         else
14737                 echo "$ac_t""no" 1>&6;
14738         fi
14739         ;;
14740
14741         *hpux*)
14742                 echo $ac_n "checking for hpux sendfile64 support""... $ac_c" 1>&6
14743 echo "configure:14744: checking for hpux sendfile64 support" >&5
14744 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
14745   echo $ac_n "(cached) $ac_c" 1>&6
14746 else
14747   
14748                 cat > conftest.$ac_ext <<EOF
14749 #line 14750 "configure"
14750 #include "confdefs.h"
14751 \
14752 #include <sys/socket.h>
14753 #include <sys/uio.h>
14754 int main() {
14755 \
14756         int fromfd, tofd;
14757         size_t total=0;
14758         struct iovec hdtrl[2];
14759         ssize_t nwritten;
14760         off64_t offset;
14761
14762         hdtrl[0].iov_base = 0;
14763         hdtrl[0].iov_len = 0;
14764
14765         nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0);
14766
14767 ; return 0; }
14768 EOF
14769 if { (eval echo configure:14770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14770   rm -rf conftest*
14771   samba_cv_HAVE_SENDFILE64=yes
14772 else
14773   echo "configure: failed program was:" >&5
14774   cat conftest.$ac_ext >&5
14775   rm -rf conftest*
14776   samba_cv_HAVE_SENDFILE64=no
14777 fi
14778 rm -f conftest*
14779 fi
14780
14781 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
14782         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
14783                 cat >> confdefs.h <<\EOF
14784 #define HAVE_SENDFILE64 1
14785 EOF
14786
14787                 cat >> confdefs.h <<\EOF
14788 #define HPUX_SENDFILE_API 1
14789 EOF
14790
14791                 cat >> confdefs.h <<\EOF
14792 #define WITH_SENDFILE 1
14793 EOF
14794
14795         else
14796                 echo "$ac_t""no" 1>&6;
14797         fi
14798
14799                 echo $ac_n "checking for hpux sendfile support""... $ac_c" 1>&6
14800 echo "configure:14801: checking for hpux sendfile support" >&5
14801 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14802   echo $ac_n "(cached) $ac_c" 1>&6
14803 else
14804   
14805                 cat > conftest.$ac_ext <<EOF
14806 #line 14807 "configure"
14807 #include "confdefs.h"
14808 \
14809 #include <sys/socket.h>
14810 #include <sys/uio.h>
14811 int main() {
14812 \
14813         int fromfd, tofd;
14814         size_t total=0;
14815         struct iovec hdtrl[2];
14816         ssize_t nwritten;
14817         off_t offset;
14818
14819         hdtrl[0].iov_base = 0;
14820         hdtrl[0].iov_len = 0;
14821
14822         nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0);
14823
14824 ; return 0; }
14825 EOF
14826 if { (eval echo configure:14827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14827   rm -rf conftest*
14828   samba_cv_HAVE_SENDFILE=yes
14829 else
14830   echo "configure: failed program was:" >&5
14831   cat conftest.$ac_ext >&5
14832   rm -rf conftest*
14833   samba_cv_HAVE_SENDFILE=no
14834 fi
14835 rm -f conftest*
14836 fi
14837
14838 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14839         if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14840                 cat >> confdefs.h <<\EOF
14841 #define HAVE_SENDFILE 1
14842 EOF
14843
14844                 cat >> confdefs.h <<\EOF
14845 #define HPUX_SENDFILE_API 1
14846 EOF
14847
14848                 cat >> confdefs.h <<\EOF
14849 #define WITH_SENDFILE 1
14850 EOF
14851
14852         else
14853                 echo "$ac_t""no" 1>&6;
14854         fi
14855         ;;
14856
14857         *solaris*)
14858                 echo $ac_n "checking for sendfilev in -lsendfile""... $ac_c" 1>&6
14859 echo "configure:14860: checking for sendfilev in -lsendfile" >&5
14860 ac_lib_var=`echo sendfile'_'sendfilev | sed 'y%./+-%__p_%'`
14861 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14862   echo $ac_n "(cached) $ac_c" 1>&6
14863 else
14864   ac_save_LIBS="$LIBS"
14865 LIBS="-lsendfile  $LIBS"
14866 cat > conftest.$ac_ext <<EOF
14867 #line 14868 "configure"
14868 #include "confdefs.h"
14869 /* Override any gcc2 internal prototype to avoid an error.  */
14870 /* We use char because int might match the return type of a gcc2
14871     builtin and then its argument prototype would still apply.  */
14872 char sendfilev();
14873
14874 int main() {
14875 sendfilev()
14876 ; return 0; }
14877 EOF
14878 if { (eval echo configure:14879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14879   rm -rf conftest*
14880   eval "ac_cv_lib_$ac_lib_var=yes"
14881 else
14882   echo "configure: failed program was:" >&5
14883   cat conftest.$ac_ext >&5
14884   rm -rf conftest*
14885   eval "ac_cv_lib_$ac_lib_var=no"
14886 fi
14887 rm -f conftest*
14888 LIBS="$ac_save_LIBS"
14889
14890 fi
14891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14892   echo "$ac_t""yes" 1>&6
14893     ac_tr_lib=HAVE_LIB`echo sendfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14894     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14895   cat >> confdefs.h <<EOF
14896 #define $ac_tr_lib 1
14897 EOF
14898
14899   LIBS="-lsendfile $LIBS"
14900
14901 else
14902   echo "$ac_t""no" 1>&6
14903 fi
14904
14905                 echo $ac_n "checking for solaris sendfilev64 support""... $ac_c" 1>&6
14906 echo "configure:14907: checking for solaris sendfilev64 support" >&5
14907 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV64'+set}'`\" = set"; then
14908   echo $ac_n "(cached) $ac_c" 1>&6
14909 else
14910   
14911                 cat > conftest.$ac_ext <<EOF
14912 #line 14913 "configure"
14913 #include "confdefs.h"
14914 \
14915 #include <sys/sendfile.h>
14916 int main() {
14917 \
14918         int sfvcnt;
14919         size_t xferred;
14920         struct sendfilevec vec[2];
14921         ssize_t nwritten;
14922         int tofd;
14923
14924         sfvcnt = 2;
14925
14926         vec[0].sfv_fd = SFV_FD_SELF;
14927         vec[0].sfv_flag = 0;
14928         vec[0].sfv_off = 0;
14929         vec[0].sfv_len = 0;
14930
14931         vec[1].sfv_fd = 0;
14932         vec[1].sfv_flag = 0;
14933         vec[1].sfv_off = 0;
14934         vec[1].sfv_len = 0;
14935         nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred);
14936
14937 ; return 0; }
14938 EOF
14939 if { (eval echo configure:14940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14940   rm -rf conftest*
14941   samba_cv_HAVE_SENDFILEV64=yes
14942 else
14943   echo "configure: failed program was:" >&5
14944   cat conftest.$ac_ext >&5
14945   rm -rf conftest*
14946   samba_cv_HAVE_SENDFILEV64=no
14947 fi
14948 rm -f conftest*
14949 fi
14950
14951 echo "$ac_t""$samba_cv_HAVE_SENDFILEV64" 1>&6
14952
14953         if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then
14954                 cat >> confdefs.h <<\EOF
14955 #define HAVE_SENDFILEV64 1
14956 EOF
14957
14958                 cat >> confdefs.h <<\EOF
14959 #define SOLARIS_SENDFILE_API 1
14960 EOF
14961
14962                 cat >> confdefs.h <<\EOF
14963 #define WITH_SENDFILE 1
14964 EOF
14965
14966         else
14967                 echo "$ac_t""no" 1>&6;
14968         fi
14969
14970                 echo $ac_n "checking for solaris sendfilev support""... $ac_c" 1>&6
14971 echo "configure:14972: checking for solaris sendfilev support" >&5
14972 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV'+set}'`\" = set"; then
14973   echo $ac_n "(cached) $ac_c" 1>&6
14974 else
14975   
14976                 cat > conftest.$ac_ext <<EOF
14977 #line 14978 "configure"
14978 #include "confdefs.h"
14979 \
14980 #include <sys/sendfile.h>
14981 int main() {
14982 \
14983         int sfvcnt;
14984         size_t xferred;
14985         struct sendfilevec vec[2];
14986         ssize_t nwritten;
14987         int tofd;
14988
14989         sfvcnt = 2;
14990
14991         vec[0].sfv_fd = SFV_FD_SELF;
14992         vec[0].sfv_flag = 0;
14993         vec[0].sfv_off = 0;
14994         vec[0].sfv_len = 0;
14995
14996         vec[1].sfv_fd = 0;
14997         vec[1].sfv_flag = 0;
14998         vec[1].sfv_off = 0;
14999         vec[1].sfv_len = 0;
15000         nwritten = sendfilev(tofd, vec, sfvcnt, &xferred);
15001
15002 ; return 0; }
15003 EOF
15004 if { (eval echo configure:15005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15005   rm -rf conftest*
15006   samba_cv_HAVE_SENDFILEV=yes
15007 else
15008   echo "configure: failed program was:" >&5
15009   cat conftest.$ac_ext >&5
15010   rm -rf conftest*
15011   samba_cv_HAVE_SENDFILEV=no
15012 fi
15013 rm -f conftest*
15014 fi
15015
15016 echo "$ac_t""$samba_cv_HAVE_SENDFILEV" 1>&6
15017
15018         if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then
15019                 cat >> confdefs.h <<\EOF
15020 #define HAVE_SENDFILEV 1
15021 EOF
15022
15023                 cat >> confdefs.h <<\EOF
15024 #define SOLARIS_SENDFILE_API 1
15025 EOF
15026
15027                 cat >> confdefs.h <<\EOF
15028 #define WITH_SENDFILE 1
15029 EOF
15030
15031         else
15032                 echo "$ac_t""no" 1>&6;
15033         fi
15034         ;;
15035
15036         *)
15037         ;;
15038         esac
15039         ;;
15040   *)
15041     echo "$ac_t""no" 1>&6
15042     ;;
15043   esac 
15044 else
15045   echo "$ac_t""yes" 1>&6
15046
15047 fi
15048
15049
15050
15051 #################################################
15052 # Check whether winbind is supported on this platform.  If so we need to
15053 # build and install client programs, sbin programs and shared libraries
15054
15055 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
15056 echo "configure:15057: checking whether to build winbind" >&5
15057
15058 # Initially, the value of $host_os decides whether winbind is supported
15059
15060 case "$host_os" in
15061         *linux*|*irix*)
15062                 HAVE_WINBIND=yes
15063                 ;;
15064         *solaris*)
15065                 HAVE_WINBIND=yes
15066                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
15067                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
15068                 ;;
15069         *hpux11*)
15070                 HAVE_WINBIND=yes
15071                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
15072                 ;;
15073         *)
15074                 HAVE_WINBIND=no
15075                 winbind_no_reason=", unsupported on $host_os"
15076                 ;;
15077 esac
15078
15079
15080
15081
15082 # Check the setting of --with-winbindd
15083
15084 # Check whether --with-winbind or --without-winbind was given.
15085 if test "${with_winbind+set}" = set; then
15086   withval="$with_winbind"
15087    
15088   case "$withval" in
15089         yes)
15090                 HAVE_WINBIND=yes
15091                 ;;
15092         no)
15093                 HAVE_WINBIND=no
15094                 winbind_reason=""
15095                 ;;
15096   esac 
15097 fi
15098
15099
15100 # We need unix domain sockets for winbind
15101
15102 if test x"$HAVE_WINBIND" = x"yes"; then
15103         if test x"$samba_cv_unixsocket" = x"no"; then
15104                 winbind_no_reason=", no unix domain socket support on $host_os"
15105                 HAVE_WINBIND=no
15106         fi
15107 fi
15108
15109 # Display test results
15110
15111 if test x"$HAVE_WINBIND" = x"yes"; then
15112         echo "$ac_t""yes" 1>&6
15113         cat >> confdefs.h <<\EOF
15114 #define WITH_WINBIND 1
15115 EOF
15116
15117
15118         EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
15119         EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd\$(EXEEXT)"
15120         if test x"$BLDSHARED" = x"true"; then
15121                 case "$host_os" in
15122                 *irix*)
15123                         SHLIB_PROGS="$SHLIB_PROGS nsswitch/libns_winbind.so"
15124                         ;;
15125                 *)
15126                         SHLIB_PROGS="$SHLIB_PROGS nsswitch/libnss_winbind.so"
15127                         ;;
15128                 esac
15129                 if test x"$with_pam" = x"yes"; then
15130                         SHLIB_PROGS="$SHLIB_PROGS nsswitch/pam_winbind.so"
15131                 fi
15132         fi
15133 else
15134         echo "$ac_t""no$winbind_no_reason" 1>&6
15135 fi
15136
15137 # Solaris has some extra fields in struct passwd that need to be
15138 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
15139 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
15140 # this. 
15141
15142 #AC_CHECK_MEMBER(struct passwd.pw_comment,
15143 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
15144 #               [#include <pwd.h>])
15145
15146 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
15147 echo "configure:15148: checking whether struct passwd has pw_comment" >&5
15148 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
15149   echo $ac_n "(cached) $ac_c" 1>&6
15150 else
15151   
15152     cat > conftest.$ac_ext <<EOF
15153 #line 15154 "configure"
15154 #include "confdefs.h"
15155 #include <pwd.h>
15156 int main() {
15157 struct passwd p; p.pw_comment;
15158 ; return 0; }
15159 EOF
15160 if { (eval echo configure:15161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15161   rm -rf conftest*
15162   samba_cv_passwd_pw_comment=yes
15163 else
15164   echo "configure: failed program was:" >&5
15165   cat conftest.$ac_ext >&5
15166   rm -rf conftest*
15167   samba_cv_passwd_pw_comment=no
15168 fi
15169 rm -f conftest*
15170 fi
15171
15172 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
15173 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
15174    cat >> confdefs.h <<\EOF
15175 #define HAVE_PASSWD_PW_COMMENT 1
15176 EOF
15177
15178 fi
15179
15180 #AC_CHECK_MEMBER(struct passwd.pw_age,
15181 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
15182 #               [#include <pwd.h>])
15183
15184 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
15185 echo "configure:15186: checking whether struct passwd has pw_age" >&5
15186 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
15187   echo $ac_n "(cached) $ac_c" 1>&6
15188 else
15189   
15190     cat > conftest.$ac_ext <<EOF
15191 #line 15192 "configure"
15192 #include "confdefs.h"
15193 #include <pwd.h>
15194 int main() {
15195 struct passwd p; p.pw_age;
15196 ; return 0; }
15197 EOF
15198 if { (eval echo configure:15199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15199   rm -rf conftest*
15200   samba_cv_passwd_pw_age=yes
15201 else
15202   echo "configure: failed program was:" >&5
15203   cat conftest.$ac_ext >&5
15204   rm -rf conftest*
15205   samba_cv_passwd_pw_age=no
15206 fi
15207 rm -f conftest*
15208 fi
15209
15210 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
15211 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
15212    cat >> confdefs.h <<\EOF
15213 #define HAVE_PASSWD_PW_AGE 1
15214 EOF
15215
15216 fi
15217
15218 #################################################
15219 # Check to see if we should use the included popt 
15220
15221 # Check whether --with-included-popt or --without-included-popt was given.
15222 if test "${with_included_popt+set}" = set; then
15223   withval="$with_included_popt"
15224    
15225   case "$withval" in
15226         yes)
15227                 INCLUDED_POPT=yes
15228                 ;;
15229         no)
15230                 INCLUDED_POPT=no
15231                 ;;
15232   esac 
15233 fi
15234
15235 if test x"$INCLUDED_POPT" != x"yes"; then
15236     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
15237 echo "configure:15238: checking for poptGetContext in -lpopt" >&5
15238 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
15239 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15240   echo $ac_n "(cached) $ac_c" 1>&6
15241 else
15242   ac_save_LIBS="$LIBS"
15243 LIBS="-lpopt  $LIBS"
15244 cat > conftest.$ac_ext <<EOF
15245 #line 15246 "configure"
15246 #include "confdefs.h"
15247 /* Override any gcc2 internal prototype to avoid an error.  */
15248 /* We use char because int might match the return type of a gcc2
15249     builtin and then its argument prototype would still apply.  */
15250 char poptGetContext();
15251
15252 int main() {
15253 poptGetContext()
15254 ; return 0; }
15255 EOF
15256 if { (eval echo configure:15257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15257   rm -rf conftest*
15258   eval "ac_cv_lib_$ac_lib_var=yes"
15259 else
15260   echo "configure: failed program was:" >&5
15261   cat conftest.$ac_ext >&5
15262   rm -rf conftest*
15263   eval "ac_cv_lib_$ac_lib_var=no"
15264 fi
15265 rm -f conftest*
15266 LIBS="$ac_save_LIBS"
15267
15268 fi
15269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15270   echo "$ac_t""yes" 1>&6
15271   INCLUDED_POPT=no
15272 else
15273   echo "$ac_t""no" 1>&6
15274 INCLUDED_POPT=yes
15275 fi
15276
15277 fi
15278
15279 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
15280 echo "configure:15281: checking whether to use included popt" >&5
15281 if test x"$INCLUDED_POPT" = x"yes"; then
15282     echo "$ac_t""yes" 1>&6
15283     BUILD_POPT='$(POPT_OBJS)'
15284     FLAGS1="-I$srcdir/popt"
15285 else
15286     echo "$ac_t""no" 1>&6
15287     LIBS="$LIBS -lpopt"
15288 fi
15289
15290
15291
15292 #################################################
15293 # Check if the user wants Python
15294
15295 # At the moment, you can use this to set which Python binary to link
15296 # against.  (Libraries built for Python2.2 can't be used by 2.1,
15297 # though they can coexist in different directories.)  In the future
15298 # this might make the Python stuff be built by default.
15299
15300 # Defaulting python breaks the clean target if python isn't installed
15301
15302 PYTHON=
15303
15304 # Check whether --with-python or --without-python was given.
15305 if test "${with_python+set}" = set; then
15306   withval="$with_python"
15307    case "${withval-python}" in
15308   yes)
15309         PYTHON=python
15310         EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS python_ext"
15311         ;;
15312   no)
15313         PYTHON=
15314         ;;
15315   *)
15316         PYTHON=${withval-python}
15317         ;;
15318   esac 
15319 fi
15320
15321
15322
15323 #################################################
15324 # do extra things if we are running insure
15325
15326 if test "${ac_cv_prog_CC}" = "insure"; then
15327         CPPFLAGS="$CPPFLAGS -D__INSURE__"
15328 fi
15329
15330 #################################################
15331 # final configure stuff
15332
15333 echo $ac_n "checking configure summary""... $ac_c" 1>&6
15334 echo "configure:15335: checking configure summary" >&5
15335 if test "$cross_compiling" = yes; then
15336   echo "configure: warning: cannot run when cross-compiling" 1>&2
15337 else
15338   cat > conftest.$ac_ext <<EOF
15339 #line 15340 "configure"
15340 #include "confdefs.h"
15341 #include "${srcdir-.}/tests/summary.c"
15342 EOF
15343 if { (eval echo configure:15344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15344 then
15345   echo "$ac_t""yes" 1>&6
15346 else
15347   echo "configure: failed program was:" >&5
15348   cat conftest.$ac_ext >&5
15349   rm -fr conftest*
15350   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
15351 fi
15352 rm -fr conftest*
15353 fi
15354
15355
15356 builddir=`pwd`
15357
15358
15359 trap '' 1 2 15
15360 cat > confcache <<\EOF
15361 # This file is a shell script that caches the results of configure
15362 # tests run on this system so they can be shared between configure
15363 # scripts and configure runs.  It is not useful on other systems.
15364 # If it contains results you don't want to keep, you may remove or edit it.
15365 #
15366 # By default, configure uses ./config.cache as the cache file,
15367 # creating it if it does not exist already.  You can give configure
15368 # the --cache-file=FILE option to use a different cache file; that is
15369 # what configure does when it calls configure scripts in
15370 # subdirectories, so they share the cache.
15371 # Giving --cache-file=/dev/null disables caching, for debugging configure.
15372 # config.status only pays attention to the cache file if you give it the
15373 # --recheck option to rerun configure.
15374 #
15375 EOF
15376 # The following way of writing the cache mishandles newlines in values,
15377 # but we know of no workaround that is simple, portable, and efficient.
15378 # So, don't put newlines in cache variables' values.
15379 # Ultrix sh set writes to stderr and can't be redirected directly,
15380 # and sets the high bit in the cache file unless we assign to the vars.
15381 (set) 2>&1 |
15382   case `(ac_space=' '; set | grep ac_space) 2>&1` in
15383   *ac_space=\ *)
15384     # `set' does not quote correctly, so add quotes (double-quote substitution
15385     # turns \\\\ into \\, and sed turns \\ into \).
15386     sed -n \
15387       -e "s/'/'\\\\''/g" \
15388       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
15389     ;;
15390   *)
15391     # `set' quotes correctly as required by POSIX, so do not add quotes.
15392     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
15393     ;;
15394   esac >> confcache
15395 if cmp -s $cache_file confcache; then
15396   :
15397 else
15398   if test -w $cache_file; then
15399     echo "updating cache $cache_file"
15400     cat confcache > $cache_file
15401   else
15402     echo "not updating unwritable cache $cache_file"
15403   fi
15404 fi
15405 rm -f confcache
15406
15407 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15408
15409 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15410 # Let make expand exec_prefix.
15411 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15412
15413 # Any assignment to VPATH causes Sun make to only execute
15414 # the first set of double-colon rules, so remove it if not needed.
15415 # If there is a colon in the path, we need to keep it.
15416 if test "x$srcdir" = x.; then
15417   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15418 fi
15419
15420 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15421
15422 DEFS=-DHAVE_CONFIG_H
15423
15424 # Without the "./", some shells look in PATH for config.status.
15425 : ${CONFIG_STATUS=./config.status}
15426
15427 echo creating $CONFIG_STATUS
15428 rm -f $CONFIG_STATUS
15429 cat > $CONFIG_STATUS <<EOF
15430 #! /bin/sh
15431 # Generated automatically by configure.
15432 # Run this file to recreate the current configuration.
15433 # This directory was configured as follows,
15434 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15435 #
15436 # $0 $ac_configure_args
15437 #
15438 # Compiler output produced by configure, useful for debugging
15439 # configure, is in ./config.log if it exists.
15440
15441 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15442 for ac_option
15443 do
15444   case "\$ac_option" in
15445   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15446     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15447     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15448   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15449     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15450     exit 0 ;;
15451   -help | --help | --hel | --he | --h)
15452     echo "\$ac_cs_usage"; exit 0 ;;
15453   *) echo "\$ac_cs_usage"; exit 1 ;;
15454   esac
15455 done
15456
15457 ac_given_srcdir=$srcdir
15458 ac_given_INSTALL="$INSTALL"
15459
15460 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15461 EOF
15462 cat >> $CONFIG_STATUS <<EOF
15463
15464 # Protect against being on the right side of a sed subst in config.status.
15465 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15466  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15467 $ac_vpsub
15468 $extrasub
15469 s%@SHELL@%$SHELL%g
15470 s%@CFLAGS@%$CFLAGS%g
15471 s%@CPPFLAGS@%$CPPFLAGS%g
15472 s%@CXXFLAGS@%$CXXFLAGS%g
15473 s%@FFLAGS@%$FFLAGS%g
15474 s%@DEFS@%$DEFS%g
15475 s%@LDFLAGS@%$LDFLAGS%g
15476 s%@LIBS@%$LIBS%g
15477 s%@exec_prefix@%$exec_prefix%g
15478 s%@prefix@%$prefix%g
15479 s%@program_transform_name@%$program_transform_name%g
15480 s%@bindir@%$bindir%g
15481 s%@sbindir@%$sbindir%g
15482 s%@libexecdir@%$libexecdir%g
15483 s%@datadir@%$datadir%g
15484 s%@sysconfdir@%$sysconfdir%g
15485 s%@sharedstatedir@%$sharedstatedir%g
15486 s%@localstatedir@%$localstatedir%g
15487 s%@libdir@%$libdir%g
15488 s%@includedir@%$includedir%g
15489 s%@oldincludedir@%$oldincludedir%g
15490 s%@infodir@%$infodir%g
15491 s%@mandir@%$mandir%g
15492 s%@configdir@%$configdir%g
15493 s%@lockdir@%$lockdir%g
15494 s%@piddir@%$piddir%g
15495 s%@logfilebase@%$logfilebase%g
15496 s%@privatedir@%$privatedir%g
15497 s%@swatdir@%$swatdir%g
15498 s%@LDSHFLAGS@%$LDSHFLAGS%g
15499 s%@SONAMEFLAG@%$SONAMEFLAG%g
15500 s%@SHLD@%$SHLD%g
15501 s%@HOST_OS@%$HOST_OS%g
15502 s%@PICFLAG@%$PICFLAG%g
15503 s%@PICSUFFIX@%$PICSUFFIX%g
15504 s%@POBAD_CC@%$POBAD_CC%g
15505 s%@SHLIBEXT@%$SHLIBEXT%g
15506 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
15507 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
15508 s%@PRINTLIBS@%$PRINTLIBS%g
15509 s%@AUTHLIBS@%$AUTHLIBS%g
15510 s%@SHLIB_PROGS@%$SHLIB_PROGS%g
15511 s%@SMBWRAPPER@%$SMBWRAPPER%g
15512 s%@EXTRA_BIN_PROGS@%$EXTRA_BIN_PROGS%g
15513 s%@EXTRA_SBIN_PROGS@%$EXTRA_SBIN_PROGS%g
15514 s%@EXTRA_ALL_TARGETS@%$EXTRA_ALL_TARGETS%g
15515 s%@CC@%$CC%g
15516 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15517 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15518 s%@INSTALL_DATA@%$INSTALL_DATA%g
15519 s%@AWK@%$AWK%g
15520 s%@EXEEXT@%$EXEEXT%g
15521 s%@BROKEN_CC@%$BROKEN_CC%g
15522 s%@host@%$host%g
15523 s%@host_alias@%$host_alias%g
15524 s%@host_cpu@%$host_cpu%g
15525 s%@host_vendor@%$host_vendor%g
15526 s%@host_os@%$host_os%g
15527 s%@target@%$target%g
15528 s%@target_alias@%$target_alias%g
15529 s%@target_cpu@%$target_cpu%g
15530 s%@target_vendor@%$target_vendor%g
15531 s%@target_os@%$target_os%g
15532 s%@build@%$build%g
15533 s%@build_alias@%$build_alias%g
15534 s%@build_cpu@%$build_cpu%g
15535 s%@build_vendor@%$build_vendor%g
15536 s%@build_os@%$build_os%g
15537 s%@CPP@%$CPP%g
15538 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
15539 s%@LIBOBJS@%$LIBOBJS%g
15540 s%@TERMLIBS@%$TERMLIBS%g
15541 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
15542 s%@ROFF@%$ROFF%g
15543 s%@DYNEXP@%$DYNEXP%g
15544 s%@MYSQL_CONFIG@%$MYSQL_CONFIG%g
15545 s%@MYSQL_CFLAGS@%$MYSQL_CFLAGS%g
15546 s%@MYSQL_LIBS@%$MYSQL_LIBS%g
15547 s%@MODULE_MYSQL@%$MODULE_MYSQL%g
15548 s%@XML2_CONFIG@%$XML2_CONFIG%g
15549 s%@XML_CFLAGS@%$XML_CFLAGS%g
15550 s%@XML_LIBS@%$XML_LIBS%g
15551 s%@MODULE_XML@%$MODULE_XML%g
15552 s%@QUOTAOBJS@%$QUOTAOBJS%g
15553 s%@manlangs@%$manlangs%g
15554 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
15555 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
15556 s%@BUILD_POPT@%$BUILD_POPT%g
15557 s%@FLAGS1@%$FLAGS1%g
15558 s%@PYTHON@%$PYTHON%g
15559 s%@builddir@%$builddir%g
15560
15561 CEOF
15562 EOF
15563
15564 cat >> $CONFIG_STATUS <<\EOF
15565
15566 # Split the substitutions into bite-sized pieces for seds with
15567 # small command number limits, like on Digital OSF/1 and HP-UX.
15568 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15569 ac_file=1 # Number of current file.
15570 ac_beg=1 # First line for current file.
15571 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15572 ac_more_lines=:
15573 ac_sed_cmds=""
15574 while $ac_more_lines; do
15575   if test $ac_beg -gt 1; then
15576     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15577   else
15578     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15579   fi
15580   if test ! -s conftest.s$ac_file; then
15581     ac_more_lines=false
15582     rm -f conftest.s$ac_file
15583   else
15584     if test -z "$ac_sed_cmds"; then
15585       ac_sed_cmds="sed -f conftest.s$ac_file"
15586     else
15587       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15588     fi
15589     ac_file=`expr $ac_file + 1`
15590     ac_beg=$ac_end
15591     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15592   fi
15593 done
15594 if test -z "$ac_sed_cmds"; then
15595   ac_sed_cmds=cat
15596 fi
15597 EOF
15598
15599 cat >> $CONFIG_STATUS <<EOF
15600
15601 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb"}
15602 EOF
15603 cat >> $CONFIG_STATUS <<\EOF
15604 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15605   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15606   case "$ac_file" in
15607   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15608        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15609   *) ac_file_in="${ac_file}.in" ;;
15610   esac
15611
15612   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15613
15614   # Remove last slash and all that follows it.  Not all systems have dirname.
15615   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15616   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15617     # The file is in a subdirectory.
15618     test ! -d "$ac_dir" && mkdir "$ac_dir"
15619     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15620     # A "../" for each directory in $ac_dir_suffix.
15621     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15622   else
15623     ac_dir_suffix= ac_dots=
15624   fi
15625
15626   case "$ac_given_srcdir" in
15627   .)  srcdir=.
15628       if test -z "$ac_dots"; then top_srcdir=.
15629       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15630   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15631   *) # Relative path.
15632     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15633     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15634   esac
15635
15636   case "$ac_given_INSTALL" in
15637   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15638   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15639   esac
15640
15641   echo creating "$ac_file"
15642   rm -f "$ac_file"
15643   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15644   case "$ac_file" in
15645   *Makefile*) ac_comsub="1i\\
15646 # $configure_input" ;;
15647   *) ac_comsub= ;;
15648   esac
15649
15650   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15651   sed -e "$ac_comsub
15652 s%@configure_input@%$configure_input%g
15653 s%@srcdir@%$srcdir%g
15654 s%@top_srcdir@%$top_srcdir%g
15655 s%@INSTALL@%$INSTALL%g
15656 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15657 fi; done
15658 rm -f conftest.s*
15659
15660 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15661 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15662 #
15663 # ac_d sets the value in "#define NAME VALUE" lines.
15664 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15665 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15666 ac_dC='\3'
15667 ac_dD='%g'
15668 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15669 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15670 ac_uB='\([      ]\)%\1#\2define\3'
15671 ac_uC=' '
15672 ac_uD='\4%g'
15673 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15674 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15675 ac_eB='$%\1#\2define\3'
15676 ac_eC=' '
15677 ac_eD='%g'
15678
15679 if test "${CONFIG_HEADERS+set}" != set; then
15680 EOF
15681 cat >> $CONFIG_STATUS <<EOF
15682   CONFIG_HEADERS="include/config.h"
15683 EOF
15684 cat >> $CONFIG_STATUS <<\EOF
15685 fi
15686 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15687   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15688   case "$ac_file" in
15689   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15690        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15691   *) ac_file_in="${ac_file}.in" ;;
15692   esac
15693
15694   echo creating $ac_file
15695
15696   rm -f conftest.frag conftest.in conftest.out
15697   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15698   cat $ac_file_inputs > conftest.in
15699
15700 EOF
15701
15702 # Transform confdefs.h into a sed script conftest.vals that substitutes
15703 # the proper values into config.h.in to produce config.h.  And first:
15704 # Protect against being on the right side of a sed subst in config.status.
15705 # Protect against being in an unquoted here document in config.status.
15706 rm -f conftest.vals
15707 cat > conftest.hdr <<\EOF
15708 s/[\\&%]/\\&/g
15709 s%[\\$`]%\\&%g
15710 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15711 s%ac_d%ac_u%gp
15712 s%ac_u%ac_e%gp
15713 EOF
15714 sed -n -f conftest.hdr confdefs.h > conftest.vals
15715 rm -f conftest.hdr
15716
15717 # This sed command replaces #undef with comments.  This is necessary, for
15718 # example, in the case of _POSIX_SOURCE, which is predefined and required
15719 # on some systems where configure will not decide to define it.
15720 cat >> conftest.vals <<\EOF
15721 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15722 EOF
15723
15724 # Break up conftest.vals because some shells have a limit on
15725 # the size of here documents, and old seds have small limits too.
15726
15727 rm -f conftest.tail
15728 while :
15729 do
15730   ac_lines=`grep -c . conftest.vals`
15731   # grep -c gives empty output for an empty file on some AIX systems.
15732   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15733   # Write a limited-size here document to conftest.frag.
15734   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15735   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15736   echo 'CEOF
15737   sed -f conftest.frag conftest.in > conftest.out
15738   rm -f conftest.in
15739   mv conftest.out conftest.in
15740 ' >> $CONFIG_STATUS
15741   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15742   rm -f conftest.vals
15743   mv conftest.tail conftest.vals
15744 done
15745 rm -f conftest.vals
15746
15747 cat >> $CONFIG_STATUS <<\EOF
15748   rm -f conftest.frag conftest.h
15749   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15750   cat conftest.in >> conftest.h
15751   rm -f conftest.in
15752   if cmp -s $ac_file conftest.h 2>/dev/null; then
15753     echo "$ac_file is unchanged"
15754     rm -f conftest.h
15755   else
15756     # Remove last slash and all that follows it.  Not all systems have dirname.
15757       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15758       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15759       # The file is in a subdirectory.
15760       test ! -d "$ac_dir" && mkdir "$ac_dir"
15761     fi
15762     rm -f $ac_file
15763     mv conftest.h $ac_file
15764   fi
15765 fi; done
15766
15767 EOF
15768 cat >> $CONFIG_STATUS <<EOF
15769
15770 EOF
15771 cat >> $CONFIG_STATUS <<\EOF
15772
15773 exit 0
15774 EOF
15775 chmod +x $CONFIG_STATUS
15776 rm -fr confdefs* $ac_clean_files
15777 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
15778
15779
15780 #################################################
15781 # Print very concise instructions on building/use
15782 if test "x$enable_dmalloc" = xyes
15783 then
15784         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
15785         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
15786 fi