Getting ready to add UNIX extensions in HEAD also.
[jra/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   --enable-debug          turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-developer      turn on developer warnings and debugging [default=no]"
19 ac_help="$ac_help
20   --enable-dmalloc          enable heap debugging [default=no]"
21 ac_help="$ac_help
22   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
23 ac_help="$ac_help
24   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
25 ac_help="$ac_help
26   --with-smbwrapper       Include SMB wrapper support (default=no) "
27 ac_help="$ac_help
28   --with-afs              Include AFS clear-text auth support (default=no) "
29 ac_help="$ac_help
30   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
31 ac_help="$ac_help
32   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
33 ac_help="$ac_help
34   --with-automount        Include AUTOMOUNT support (default=no)"
35 ac_help="$ac_help
36   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
37 ac_help="$ac_help
38   --with-pam              Include PAM support (default=no)"
39 ac_help="$ac_help
40   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
41 ac_help="$ac_help
42   --with-tdbsam           Include experimental TDB SAM support (default=no)"
43 ac_help="$ac_help
44   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
45 ac_help="$ac_help
46   --with-nisplussam       Include NISPLUS SAM support (default=no)"
47 ac_help="$ac_help
48   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
49 ac_help="$ac_help
50   --with-ssl              Include SSL support (default=no)
51   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
52   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
53 ac_help="$ac_help
54   --with-syslog           Include experimental SYSLOG support (default=no)"
55 ac_help="$ac_help
56   --with-profiling-data   Include gathering source code profile information (default=no)"
57 ac_help="$ac_help
58   --with-quotas           Include experimental disk-quota support (default=no)"
59 ac_help="$ac_help
60   --with-utmp             Include experimental utmp accounting (default=no)"
61 ac_help="$ac_help
62   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
63 ac_help="$ac_help
64   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
65 ac_help="$ac_help
66   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
67 ac_help="$ac_help
68   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
69 ac_help="$ac_help
70   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
71 ac_help="$ac_help
72   --with-acl-support      Include ACL support (default=no)"
73 ac_help="$ac_help
74   --with-winbind          Build winbind (default, if supported by OS)"
75 ac_help="$ac_help
76   --with-included-popt    use bundled popt library, not from system"
77
78 # Initialize some variables set by options.
79 # The variables have the same names as the options, with
80 # dashes changed to underlines.
81 build=NONE
82 cache_file=./config.cache
83 exec_prefix=NONE
84 host=NONE
85 no_create=
86 nonopt=NONE
87 no_recursion=
88 prefix=NONE
89 program_prefix=NONE
90 program_suffix=NONE
91 program_transform_name=s,x,x,
92 silent=
93 site=
94 srcdir=
95 target=NONE
96 verbose=
97 x_includes=NONE
98 x_libraries=NONE
99 bindir='${exec_prefix}/bin'
100 sbindir='${exec_prefix}/sbin'
101 libexecdir='${exec_prefix}/libexec'
102 datadir='${prefix}/share'
103 sysconfdir='${prefix}/etc'
104 sharedstatedir='${prefix}/com'
105 localstatedir='${prefix}/var'
106 libdir='${exec_prefix}/lib'
107 includedir='${prefix}/include'
108 oldincludedir='/usr/include'
109 infodir='${prefix}/info'
110 mandir='${prefix}/man'
111
112 # Initialize some other variables.
113 subdirs=
114 MFLAGS= MAKEFLAGS=
115 SHELL=${CONFIG_SHELL-/bin/sh}
116 # Maximum number of lines to put in a shell here document.
117 ac_max_here_lines=12
118
119 ac_prev=
120 for ac_option
121 do
122
123   # If the previous option needs an argument, assign it.
124   if test -n "$ac_prev"; then
125     eval "$ac_prev=\$ac_option"
126     ac_prev=
127     continue
128   fi
129
130   case "$ac_option" in
131   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
132   *) ac_optarg= ;;
133   esac
134
135   # Accept the important Cygnus configure options, so we can diagnose typos.
136
137   case "$ac_option" in
138
139   -bindir | --bindir | --bindi | --bind | --bin | --bi)
140     ac_prev=bindir ;;
141   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
142     bindir="$ac_optarg" ;;
143
144   -build | --build | --buil | --bui | --bu)
145     ac_prev=build ;;
146   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
147     build="$ac_optarg" ;;
148
149   -cache-file | --cache-file | --cache-fil | --cache-fi \
150   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
151     ac_prev=cache_file ;;
152   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
153   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
154     cache_file="$ac_optarg" ;;
155
156   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
157     ac_prev=datadir ;;
158   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
159   | --da=*)
160     datadir="$ac_optarg" ;;
161
162   -disable-* | --disable-*)
163     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
164     # Reject names that are not valid shell variable names.
165     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
166       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
167     fi
168     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
169     eval "enable_${ac_feature}=no" ;;
170
171   -enable-* | --enable-*)
172     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
173     # Reject names that are not valid shell variable names.
174     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
175       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
176     fi
177     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
178     case "$ac_option" in
179       *=*) ;;
180       *) ac_optarg=yes ;;
181     esac
182     eval "enable_${ac_feature}='$ac_optarg'" ;;
183
184   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
185   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
186   | --exec | --exe | --ex)
187     ac_prev=exec_prefix ;;
188   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
189   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
190   | --exec=* | --exe=* | --ex=*)
191     exec_prefix="$ac_optarg" ;;
192
193   -gas | --gas | --ga | --g)
194     # Obsolete; use --with-gas.
195     with_gas=yes ;;
196
197   -help | --help | --hel | --he)
198     # Omit some internal or obsolete options to make the list less imposing.
199     # This message is too long to be a string in the A/UX 3.1 sh.
200     cat << EOF
201 Usage: configure [options] [host]
202 Options: [defaults in brackets after descriptions]
203 Configuration:
204   --cache-file=FILE       cache test results in FILE
205   --help                  print this message
206   --no-create             do not create output files
207   --quiet, --silent       do not print \`checking...' messages
208   --version               print the version of autoconf that created configure
209 Directory and file names:
210   --prefix=PREFIX         install architecture-independent files in PREFIX
211                           [$ac_default_prefix]
212   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
213                           [same as prefix]
214   --bindir=DIR            user executables in DIR [EPREFIX/bin]
215   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
216   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
217   --datadir=DIR           read-only architecture-independent data in DIR
218                           [PREFIX/share]
219   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
220   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
221                           [PREFIX/com]
222   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
223   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
224   --includedir=DIR        C header files in DIR [PREFIX/include]
225   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
226   --infodir=DIR           info documentation in DIR [PREFIX/info]
227   --mandir=DIR            man documentation in DIR [PREFIX/man]
228   --srcdir=DIR            find the sources in DIR [configure dir or ..]
229   --program-prefix=PREFIX prepend PREFIX to installed program names
230   --program-suffix=SUFFIX append SUFFIX to installed program names
231   --program-transform-name=PROGRAM
232                           run sed PROGRAM on installed program names
233 EOF
234     cat << EOF
235 Host type:
236   --build=BUILD           configure for building on BUILD [BUILD=HOST]
237   --host=HOST             configure for HOST [guessed]
238   --target=TARGET         configure for TARGET [TARGET=HOST]
239 Features and packages:
240   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
241   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
242   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
243   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
244   --x-includes=DIR        X include files are in DIR
245   --x-libraries=DIR       X library files are in DIR
246 EOF
247     if test -n "$ac_help"; then
248       echo "--enable and --with options recognized:$ac_help"
249     fi
250     exit 0 ;;
251
252   -host | --host | --hos | --ho)
253     ac_prev=host ;;
254   -host=* | --host=* | --hos=* | --ho=*)
255     host="$ac_optarg" ;;
256
257   -includedir | --includedir | --includedi | --included | --include \
258   | --includ | --inclu | --incl | --inc)
259     ac_prev=includedir ;;
260   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
261   | --includ=* | --inclu=* | --incl=* | --inc=*)
262     includedir="$ac_optarg" ;;
263
264   -infodir | --infodir | --infodi | --infod | --info | --inf)
265     ac_prev=infodir ;;
266   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
267     infodir="$ac_optarg" ;;
268
269   -libdir | --libdir | --libdi | --libd)
270     ac_prev=libdir ;;
271   -libdir=* | --libdir=* | --libdi=* | --libd=*)
272     libdir="$ac_optarg" ;;
273
274   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
275   | --libexe | --libex | --libe)
276     ac_prev=libexecdir ;;
277   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
278   | --libexe=* | --libex=* | --libe=*)
279     libexecdir="$ac_optarg" ;;
280
281   -localstatedir | --localstatedir | --localstatedi | --localstated \
282   | --localstate | --localstat | --localsta | --localst \
283   | --locals | --local | --loca | --loc | --lo)
284     ac_prev=localstatedir ;;
285   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
286   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
287   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
288     localstatedir="$ac_optarg" ;;
289
290   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
291     ac_prev=mandir ;;
292   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
293     mandir="$ac_optarg" ;;
294
295   -nfp | --nfp | --nf)
296     # Obsolete; use --without-fp.
297     with_fp=no ;;
298
299   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
300   | --no-cr | --no-c)
301     no_create=yes ;;
302
303   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
304   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
305     no_recursion=yes ;;
306
307   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
308   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
309   | --oldin | --oldi | --old | --ol | --o)
310     ac_prev=oldincludedir ;;
311   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
312   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
313   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
314     oldincludedir="$ac_optarg" ;;
315
316   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
317     ac_prev=prefix ;;
318   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
319     prefix="$ac_optarg" ;;
320
321   -program-prefix | --program-prefix | --program-prefi | --program-pref \
322   | --program-pre | --program-pr | --program-p)
323     ac_prev=program_prefix ;;
324   -program-prefix=* | --program-prefix=* | --program-prefi=* \
325   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
326     program_prefix="$ac_optarg" ;;
327
328   -program-suffix | --program-suffix | --program-suffi | --program-suff \
329   | --program-suf | --program-su | --program-s)
330     ac_prev=program_suffix ;;
331   -program-suffix=* | --program-suffix=* | --program-suffi=* \
332   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
333     program_suffix="$ac_optarg" ;;
334
335   -program-transform-name | --program-transform-name \
336   | --program-transform-nam | --program-transform-na \
337   | --program-transform-n | --program-transform- \
338   | --program-transform | --program-transfor \
339   | --program-transfo | --program-transf \
340   | --program-trans | --program-tran \
341   | --progr-tra | --program-tr | --program-t)
342     ac_prev=program_transform_name ;;
343   -program-transform-name=* | --program-transform-name=* \
344   | --program-transform-nam=* | --program-transform-na=* \
345   | --program-transform-n=* | --program-transform-=* \
346   | --program-transform=* | --program-transfor=* \
347   | --program-transfo=* | --program-transf=* \
348   | --program-trans=* | --program-tran=* \
349   | --progr-tra=* | --program-tr=* | --program-t=*)
350     program_transform_name="$ac_optarg" ;;
351
352   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
353   | -silent | --silent | --silen | --sile | --sil)
354     silent=yes ;;
355
356   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
357     ac_prev=sbindir ;;
358   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
359   | --sbi=* | --sb=*)
360     sbindir="$ac_optarg" ;;
361
362   -sharedstatedir | --sharedstatedir | --sharedstatedi \
363   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
364   | --sharedst | --shareds | --shared | --share | --shar \
365   | --sha | --sh)
366     ac_prev=sharedstatedir ;;
367   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
368   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
369   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
370   | --sha=* | --sh=*)
371     sharedstatedir="$ac_optarg" ;;
372
373   -site | --site | --sit)
374     ac_prev=site ;;
375   -site=* | --site=* | --sit=*)
376     site="$ac_optarg" ;;
377
378   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
379     ac_prev=srcdir ;;
380   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
381     srcdir="$ac_optarg" ;;
382
383   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
384   | --syscon | --sysco | --sysc | --sys | --sy)
385     ac_prev=sysconfdir ;;
386   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
387   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
388     sysconfdir="$ac_optarg" ;;
389
390   -target | --target | --targe | --targ | --tar | --ta | --t)
391     ac_prev=target ;;
392   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
393     target="$ac_optarg" ;;
394
395   -v | -verbose | --verbose | --verbos | --verbo | --verb)
396     verbose=yes ;;
397
398   -version | --version | --versio | --versi | --vers)
399     echo "configure generated by autoconf version 2.13"
400     exit 0 ;;
401
402   -with-* | --with-*)
403     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
404     # Reject names that are not valid shell variable names.
405     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
406       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
407     fi
408     ac_package=`echo $ac_package| sed 's/-/_/g'`
409     case "$ac_option" in
410       *=*) ;;
411       *) ac_optarg=yes ;;
412     esac
413     eval "with_${ac_package}='$ac_optarg'" ;;
414
415   -without-* | --without-*)
416     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
417     # Reject names that are not valid shell variable names.
418     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
419       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
420     fi
421     ac_package=`echo $ac_package| sed 's/-/_/g'`
422     eval "with_${ac_package}=no" ;;
423
424   --x)
425     # Obsolete; use --with-x.
426     with_x=yes ;;
427
428   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
429   | --x-incl | --x-inc | --x-in | --x-i)
430     ac_prev=x_includes ;;
431   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
432   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
433     x_includes="$ac_optarg" ;;
434
435   -x-libraries | --x-libraries | --x-librarie | --x-librari \
436   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
437     ac_prev=x_libraries ;;
438   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
439   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
440     x_libraries="$ac_optarg" ;;
441
442   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
443     ;;
444
445   *)
446     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
447       echo "configure: warning: $ac_option: invalid host type" 1>&2
448     fi
449     if test "x$nonopt" != xNONE; then
450       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
451     fi
452     nonopt="$ac_option"
453     ;;
454
455   esac
456 done
457
458 if test -n "$ac_prev"; then
459   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
460 fi
461
462 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
463
464 # File descriptor usage:
465 # 0 standard input
466 # 1 file creation
467 # 2 errors and warnings
468 # 3 some systems may open it to /dev/tty
469 # 4 used on the Kubota Titan
470 # 6 checking for... messages and results
471 # 5 compiler messages saved in config.log
472 if test "$silent" = yes; then
473   exec 6>/dev/null
474 else
475   exec 6>&1
476 fi
477 exec 5>./config.log
478
479 echo "\
480 This file contains any messages produced by compilers while
481 running configure, to aid debugging if configure makes a mistake.
482 " 1>&5
483
484 # Strip out --no-create and --no-recursion so they do not pile up.
485 # Also quote any args containing shell metacharacters.
486 ac_configure_args=
487 for ac_arg
488 do
489   case "$ac_arg" in
490   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
491   | --no-cr | --no-c) ;;
492   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
493   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
494   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
495   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
496   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
497   esac
498 done
499
500 # NLS nuisances.
501 # Only set these to C if already set.  These must not be set unconditionally
502 # because not all systems understand e.g. LANG=C (notably SCO).
503 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
504 # Non-C LC_CTYPE values break the ctype check.
505 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
506 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
507 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
508 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
509
510 # confdefs.h avoids OS command line length limits that DEFS can exceed.
511 rm -rf conftest* confdefs.h
512 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
513 echo > confdefs.h
514
515 # A filename unique to this package, relative to the directory that
516 # configure is in, which we can look for to find out if srcdir is correct.
517 ac_unique_file=include/includes.h
518
519 # Find the source files, if location was not specified.
520 if test -z "$srcdir"; then
521   ac_srcdir_defaulted=yes
522   # Try the directory containing this script, then its parent.
523   ac_prog=$0
524   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
525   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
526   srcdir=$ac_confdir
527   if test ! -r $srcdir/$ac_unique_file; then
528     srcdir=..
529   fi
530 else
531   ac_srcdir_defaulted=no
532 fi
533 if test ! -r $srcdir/$ac_unique_file; then
534   if test "$ac_srcdir_defaulted" = yes; then
535     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
536   else
537     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
538   fi
539 fi
540 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
541
542 # Prefer explicitly selected file to automatically selected ones.
543 if test -z "$CONFIG_SITE"; then
544   if test "x$prefix" != xNONE; then
545     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
546   else
547     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
548   fi
549 fi
550 for ac_site_file in $CONFIG_SITE; do
551   if test -r "$ac_site_file"; then
552     echo "loading site script $ac_site_file"
553     . "$ac_site_file"
554   fi
555 done
556
557 if test -r "$cache_file"; then
558   echo "loading cache $cache_file"
559   . $cache_file
560 else
561   echo "creating cache $cache_file"
562   > $cache_file
563 fi
564
565 ac_ext=c
566 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
567 ac_cpp='$CPP $CPPFLAGS'
568 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
569 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
570 cross_compiling=$ac_cv_prog_cc_cross
571
572 ac_exeext=
573 ac_objext=o
574 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
575   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
576   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
577     ac_n= ac_c='
578 ' ac_t='        '
579   else
580     ac_n=-n ac_c= ac_t=
581   fi
582 else
583   ac_n= ac_c='\c' ac_t=
584 fi
585
586
587
588 # we want to be compatible with older versions of Samba
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606 # compile with optimisation and without debugging by default
607 CFLAGS="-O ${CFLAGS}"
608
609 # Check whether --enable-debug or --disable-debug was given.
610 if test "${enable_debug+set}" = set; then
611   enableval="$enable_debug"
612   if eval "test x$enable_debug = xyes"; then
613         CFLAGS="${CFLAGS} -g"
614     fi
615 fi
616
617
618 # Check whether --enable-developer or --disable-developer was given.
619 if test "${enable_developer+set}" = set; then
620   enableval="$enable_developer"
621   if eval "test x$enable_developer = xyes"; then
622         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
623     fi
624 fi
625
626
627 # Check whether --enable-dmalloc or --disable-dmalloc was given.
628 if test "${enable_dmalloc+set}" = set; then
629   enableval="$enable_dmalloc"
630   :
631 fi
632
633
634 if test "x$enable_dmalloc" = xyes
635 then
636         cat >> confdefs.h <<\EOF
637 #define ENABLE_DMALLOC 1
638 EOF
639
640         cat >> confdefs.h <<\EOF
641 #define DMALLOC_FUNC_CHECK 1
642 EOF
643
644         LIBS="$LIBS -ldmalloc"  
645 fi
646
647 # Extract the first word of "gcc", so it can be a program name with args.
648 set dummy gcc; ac_word=$2
649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
650 echo "configure:651: checking for $ac_word" >&5
651 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
652   echo $ac_n "(cached) $ac_c" 1>&6
653 else
654   if test -n "$CC"; then
655   ac_cv_prog_CC="$CC" # Let the user override the test.
656 else
657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
658   ac_dummy="$PATH"
659   for ac_dir in $ac_dummy; do
660     test -z "$ac_dir" && ac_dir=.
661     if test -f $ac_dir/$ac_word; then
662       ac_cv_prog_CC="gcc"
663       break
664     fi
665   done
666   IFS="$ac_save_ifs"
667 fi
668 fi
669 CC="$ac_cv_prog_CC"
670 if test -n "$CC"; then
671   echo "$ac_t""$CC" 1>&6
672 else
673   echo "$ac_t""no" 1>&6
674 fi
675
676 if test -z "$CC"; then
677   # Extract the first word of "cc", so it can be a program name with args.
678 set dummy cc; ac_word=$2
679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
680 echo "configure:681: checking for $ac_word" >&5
681 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
682   echo $ac_n "(cached) $ac_c" 1>&6
683 else
684   if test -n "$CC"; then
685   ac_cv_prog_CC="$CC" # Let the user override the test.
686 else
687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
688   ac_prog_rejected=no
689   ac_dummy="$PATH"
690   for ac_dir in $ac_dummy; do
691     test -z "$ac_dir" && ac_dir=.
692     if test -f $ac_dir/$ac_word; then
693       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
694         ac_prog_rejected=yes
695         continue
696       fi
697       ac_cv_prog_CC="cc"
698       break
699     fi
700   done
701   IFS="$ac_save_ifs"
702 if test $ac_prog_rejected = yes; then
703   # We found a bogon in the path, so make sure we never use it.
704   set dummy $ac_cv_prog_CC
705   shift
706   if test $# -gt 0; then
707     # We chose a different compiler from the bogus one.
708     # However, it has the same basename, so the bogon will be chosen
709     # first if we set CC to just the basename; use the full file name.
710     shift
711     set dummy "$ac_dir/$ac_word" "$@"
712     shift
713     ac_cv_prog_CC="$@"
714   fi
715 fi
716 fi
717 fi
718 CC="$ac_cv_prog_CC"
719 if test -n "$CC"; then
720   echo "$ac_t""$CC" 1>&6
721 else
722   echo "$ac_t""no" 1>&6
723 fi
724
725   if test -z "$CC"; then
726     case "`uname -s`" in
727     *win32* | *WIN32*)
728       # Extract the first word of "cl", so it can be a program name with args.
729 set dummy cl; ac_word=$2
730 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
731 echo "configure:732: checking for $ac_word" >&5
732 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
733   echo $ac_n "(cached) $ac_c" 1>&6
734 else
735   if test -n "$CC"; then
736   ac_cv_prog_CC="$CC" # Let the user override the test.
737 else
738   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
739   ac_dummy="$PATH"
740   for ac_dir in $ac_dummy; do
741     test -z "$ac_dir" && ac_dir=.
742     if test -f $ac_dir/$ac_word; then
743       ac_cv_prog_CC="cl"
744       break
745     fi
746   done
747   IFS="$ac_save_ifs"
748 fi
749 fi
750 CC="$ac_cv_prog_CC"
751 if test -n "$CC"; then
752   echo "$ac_t""$CC" 1>&6
753 else
754   echo "$ac_t""no" 1>&6
755 fi
756  ;;
757     esac
758   fi
759   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
760 fi
761
762 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
763 echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
764
765 ac_ext=c
766 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
767 ac_cpp='$CPP $CPPFLAGS'
768 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
769 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
770 cross_compiling=$ac_cv_prog_cc_cross
771
772 cat > conftest.$ac_ext << EOF
773
774 #line 775 "configure"
775 #include "confdefs.h"
776
777 main(){return(0);}
778 EOF
779 if { (eval echo configure:780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
780   ac_cv_prog_cc_works=yes
781   # If we can't run a trivial program, we are probably using a cross compiler.
782   if (./conftest; exit) 2>/dev/null; then
783     ac_cv_prog_cc_cross=no
784   else
785     ac_cv_prog_cc_cross=yes
786   fi
787 else
788   echo "configure: failed program was:" >&5
789   cat conftest.$ac_ext >&5
790   ac_cv_prog_cc_works=no
791 fi
792 rm -fr conftest*
793 ac_ext=c
794 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
795 ac_cpp='$CPP $CPPFLAGS'
796 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
797 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
798 cross_compiling=$ac_cv_prog_cc_cross
799
800 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
801 if test $ac_cv_prog_cc_works = no; then
802   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
803 fi
804 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
805 echo "configure:806: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
806 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
807 cross_compiling=$ac_cv_prog_cc_cross
808
809 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
810 echo "configure:811: checking whether we are using GNU C" >&5
811 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
812   echo $ac_n "(cached) $ac_c" 1>&6
813 else
814   cat > conftest.c <<EOF
815 #ifdef __GNUC__
816   yes;
817 #endif
818 EOF
819 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
820   ac_cv_prog_gcc=yes
821 else
822   ac_cv_prog_gcc=no
823 fi
824 fi
825
826 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
827
828 if test $ac_cv_prog_gcc = yes; then
829   GCC=yes
830 else
831   GCC=
832 fi
833
834 ac_test_CFLAGS="${CFLAGS+set}"
835 ac_save_CFLAGS="$CFLAGS"
836 CFLAGS=
837 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
838 echo "configure:839: checking whether ${CC-cc} accepts -g" >&5
839 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
840   echo $ac_n "(cached) $ac_c" 1>&6
841 else
842   echo 'void f(){}' > conftest.c
843 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
844   ac_cv_prog_cc_g=yes
845 else
846   ac_cv_prog_cc_g=no
847 fi
848 rm -f conftest*
849
850 fi
851
852 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
853 if test "$ac_test_CFLAGS" = set; then
854   CFLAGS="$ac_save_CFLAGS"
855 elif test $ac_cv_prog_cc_g = yes; then
856   if test "$GCC" = yes; then
857     CFLAGS="-g -O2"
858   else
859     CFLAGS="-g"
860   fi
861 else
862   if test "$GCC" = yes; then
863     CFLAGS="-O2"
864   else
865     CFLAGS=
866   fi
867 fi
868
869 ac_aux_dir=
870 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
871   if test -f $ac_dir/install-sh; then
872     ac_aux_dir=$ac_dir
873     ac_install_sh="$ac_aux_dir/install-sh -c"
874     break
875   elif test -f $ac_dir/install.sh; then
876     ac_aux_dir=$ac_dir
877     ac_install_sh="$ac_aux_dir/install.sh -c"
878     break
879   fi
880 done
881 if test -z "$ac_aux_dir"; then
882   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
883 fi
884 ac_config_guess=$ac_aux_dir/config.guess
885 ac_config_sub=$ac_aux_dir/config.sub
886 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
887
888 # Find a good install program.  We prefer a C program (faster),
889 # so one script is as good as another.  But avoid the broken or
890 # incompatible versions:
891 # SysV /etc/install, /usr/sbin/install
892 # SunOS /usr/etc/install
893 # IRIX /sbin/install
894 # AIX /bin/install
895 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
896 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
897 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
898 # ./install, which can be erroneously created by make from ./install.sh.
899 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
900 echo "configure:901: checking for a BSD compatible install" >&5
901 if test -z "$INSTALL"; then
902 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
903   echo $ac_n "(cached) $ac_c" 1>&6
904 else
905     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
906   for ac_dir in $PATH; do
907     # Account for people who put trailing slashes in PATH elements.
908     case "$ac_dir/" in
909     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
910     *)
911       # OSF1 and SCO ODT 3.0 have their own names for install.
912       # Don't use installbsd from OSF since it installs stuff as root
913       # by default.
914       for ac_prog in ginstall scoinst install; do
915         if test -f $ac_dir/$ac_prog; then
916           if test $ac_prog = install &&
917             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
918             # AIX install.  It has an incompatible calling convention.
919             :
920           else
921             ac_cv_path_install="$ac_dir/$ac_prog -c"
922             break 2
923           fi
924         fi
925       done
926       ;;
927     esac
928   done
929   IFS="$ac_save_IFS"
930
931 fi
932   if test "${ac_cv_path_install+set}" = set; then
933     INSTALL="$ac_cv_path_install"
934   else
935     # As a last resort, use the slow shell script.  We don't cache a
936     # path for INSTALL within a source directory, because that will
937     # break other packages using the cache if that directory is
938     # removed, or if the path is relative.
939     INSTALL="$ac_install_sh"
940   fi
941 fi
942 echo "$ac_t""$INSTALL" 1>&6
943
944 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
945 # It thinks the first close brace ends the variable substitution.
946 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
947
948 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
949
950 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
951
952 for ac_prog in gawk mawk nawk awk
953 do
954 # Extract the first word of "$ac_prog", so it can be a program name with args.
955 set dummy $ac_prog; ac_word=$2
956 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
957 echo "configure:958: checking for $ac_word" >&5
958 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
959   echo $ac_n "(cached) $ac_c" 1>&6
960 else
961   if test -n "$AWK"; then
962   ac_cv_prog_AWK="$AWK" # Let the user override the test.
963 else
964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
965   ac_dummy="$PATH"
966   for ac_dir in $ac_dummy; do
967     test -z "$ac_dir" && ac_dir=.
968     if test -f $ac_dir/$ac_word; then
969       ac_cv_prog_AWK="$ac_prog"
970       break
971     fi
972   done
973   IFS="$ac_save_ifs"
974 fi
975 fi
976 AWK="$ac_cv_prog_AWK"
977 if test -n "$AWK"; then
978   echo "$ac_t""$AWK" 1>&6
979 else
980   echo "$ac_t""no" 1>&6
981 fi
982
983 test -n "$AWK" && break
984 done
985
986
987 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
988 echo "configure:989: checking for POSIXized ISC" >&5
989 if test -d /etc/conf/kconfig.d &&
990   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
991 then
992   echo "$ac_t""yes" 1>&6
993   ISC=yes # If later tests want to check for ISC.
994   cat >> confdefs.h <<\EOF
995 #define _POSIX_SOURCE 1
996 EOF
997
998   if test "$GCC" = yes; then
999     CC="$CC -posix"
1000   else
1001     CC="$CC -Xp"
1002   fi
1003 else
1004   echo "$ac_t""no" 1>&6
1005   ISC=
1006 fi
1007
1008
1009 if test "x$CC" != xcc; then
1010   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1011 echo "configure:1012: checking whether $CC and cc understand -c and -o together" >&5
1012 else
1013   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1014 echo "configure:1015: checking whether cc understands -c and -o together" >&5
1015 fi
1016 set dummy $CC; ac_cc="`echo $2 |
1017                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1018 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1019   echo $ac_n "(cached) $ac_c" 1>&6
1020 else
1021   echo 'foo(){}' > conftest.c
1022 # Make sure it works both with $CC and with simple cc.
1023 # We do the test twice because some compilers refuse to overwrite an
1024 # existing .o file with -o, though they will create one.
1025 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1026 if { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1027    test -f conftest.o && { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1028 then
1029   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1030   if test "x$CC" != xcc; then
1031     # Test first that cc exists at all.
1032     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1033       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1034       if { (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1035          test -f conftest.o && { (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1036       then
1037         # cc works too.
1038         :
1039       else
1040         # cc exists but doesn't like -o.
1041         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1042       fi
1043     fi
1044   fi
1045 else
1046   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1047 fi
1048 rm -f conftest*
1049
1050 fi
1051 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1052   echo "$ac_t""yes" 1>&6
1053 else
1054   echo "$ac_t""no" 1>&6
1055   cat >> confdefs.h <<\EOF
1056 #define NO_MINUS_C_MINUS_O 1
1057 EOF
1058
1059 fi
1060
1061 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1062       BROKEN_CC=
1063 else
1064       BROKEN_CC=#
1065 fi
1066
1067
1068 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1069 echo "configure:1070: checking that the C compiler understands volatile" >&5
1070 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1071   echo $ac_n "(cached) $ac_c" 1>&6
1072 else
1073   
1074     cat > conftest.$ac_ext <<EOF
1075 #line 1076 "configure"
1076 #include "confdefs.h"
1077 #include <sys/types.h>
1078 int main() {
1079 volatile int i = 0
1080 ; return 0; }
1081 EOF
1082 if { (eval echo configure:1083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1083   rm -rf conftest*
1084   samba_cv_volatile=yes
1085 else
1086   echo "configure: failed program was:" >&5
1087   cat conftest.$ac_ext >&5
1088   rm -rf conftest*
1089   samba_cv_volatile=no
1090 fi
1091 rm -f conftest*
1092 fi
1093
1094 echo "$ac_t""$samba_cv_volatile" 1>&6
1095 if test x"$samba_cv_volatile" = x"yes"; then
1096    cat >> confdefs.h <<\EOF
1097 #define HAVE_VOLATILE 1
1098 EOF
1099
1100 fi
1101
1102
1103
1104 # Do some error checking and defaulting for the host and target type.
1105 # The inputs are:
1106 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1107 #
1108 # The rules are:
1109 # 1. You are not allowed to specify --host, --target, and nonopt at the
1110 #    same time.
1111 # 2. Host defaults to nonopt.
1112 # 3. If nonopt is not specified, then host defaults to the current host,
1113 #    as determined by config.guess.
1114 # 4. Target and build default to nonopt.
1115 # 5. If nonopt is not specified, then target and build default to host.
1116
1117 # The aliases save the names the user supplied, while $host etc.
1118 # will get canonicalized.
1119 case $host---$target---$nonopt in
1120 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1121 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1122 esac
1123
1124
1125 # Make sure we can run config.sub.
1126 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1127 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1128 fi
1129
1130 echo $ac_n "checking host system type""... $ac_c" 1>&6
1131 echo "configure:1132: checking host system type" >&5
1132
1133 host_alias=$host
1134 case "$host_alias" in
1135 NONE)
1136   case $nonopt in
1137   NONE)
1138     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1139     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1140     fi ;;
1141   *) host_alias=$nonopt ;;
1142   esac ;;
1143 esac
1144
1145 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1146 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1147 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1148 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1149 echo "$ac_t""$host" 1>&6
1150
1151 echo $ac_n "checking target system type""... $ac_c" 1>&6
1152 echo "configure:1153: checking target system type" >&5
1153
1154 target_alias=$target
1155 case "$target_alias" in
1156 NONE)
1157   case $nonopt in
1158   NONE) target_alias=$host_alias ;;
1159   *) target_alias=$nonopt ;;
1160   esac ;;
1161 esac
1162
1163 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1164 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1165 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1166 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1167 echo "$ac_t""$target" 1>&6
1168
1169 echo $ac_n "checking build system type""... $ac_c" 1>&6
1170 echo "configure:1171: checking build system type" >&5
1171
1172 build_alias=$build
1173 case "$build_alias" in
1174 NONE)
1175   case $nonopt in
1176   NONE) build_alias=$host_alias ;;
1177   *) build_alias=$nonopt ;;
1178   esac ;;
1179 esac
1180
1181 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1182 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1183 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1184 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1185 echo "$ac_t""$build" 1>&6
1186
1187 test "$host_alias" != "$target_alias" &&
1188   test "$program_prefix$program_suffix$program_transform_name" = \
1189     NONENONEs,x,x, &&
1190   program_prefix=${target_alias}-
1191
1192
1193   case "$host_os" in
1194         *irix6*) cat >> confdefs.h <<\EOF
1195 #include <standards.h>
1196 EOF
1197
1198         ;;
1199 esac
1200
1201
1202     
1203     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1204 echo "configure:1205: checking config.cache system type" >&5
1205     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1206          test x"$ac_cv_host_system_type" != x"$host"; } ||
1207        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1208          test x"$ac_cv_build_system_type" != x"$build"; } ||
1209        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1210          test x"$ac_cv_target_system_type" != x"$target"; }; then
1211         echo "$ac_t""different" 1>&6
1212         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1213     else
1214         echo "$ac_t""same" 1>&6
1215     fi
1216     ac_cv_host_system_type="$host"
1217     ac_cv_build_system_type="$build"
1218     ac_cv_target_system_type="$target"
1219
1220
1221 #
1222 # Config CPPFLAG settings for strange OS's that must be set
1223 # before other tests.
1224 #
1225 case "$host_os" in
1226 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1227     *hpux*)
1228       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1229 echo "configure:1230: checking whether ${CC-cc} accepts -Ae" >&5
1230 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1231   echo $ac_n "(cached) $ac_c" 1>&6
1232 else
1233   echo 'void f(){}' > conftest.c
1234 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1235   ac_cv_prog_cc_Ae=yes
1236 else
1237   ac_cv_prog_cc_Ae=no
1238 fi
1239 rm -f conftest*
1240
1241 fi
1242
1243 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1244       # mmap on HPUX is completely broken...
1245       cat >> confdefs.h <<\EOF
1246 #define MMAP_BLACKLIST 1
1247 EOF
1248
1249       if test $ac_cv_prog_cc_Ae = yes; then
1250         CPPFLAGS="$CPPFLAGS -Ae"
1251       fi
1252 #
1253 # Defines needed for HPUX support.
1254 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1255 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1256 #
1257       case `uname -r` in
1258                         *9*|*10*)
1259                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1260                                 cat >> confdefs.h <<\EOF
1261 #define USE_BOTH_CRYPT_CALLS 1
1262 EOF
1263
1264                                 ;;
1265                         *11*)
1266                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1267                                 cat >> confdefs.h <<\EOF
1268 #define USE_BOTH_CRYPT_CALLS 1
1269 EOF
1270
1271                                 ;;
1272       esac
1273       ;;
1274
1275 #
1276 # CRAY Unicos has broken const handling
1277        *unicos*)
1278           echo "$ac_t""disabling const" 1>&6
1279           CPPFLAGS="$CPPFLAGS -Dconst="
1280           ;;
1281         
1282 #
1283 # AIX4.x doesn't even admit to having large
1284 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1285 #
1286     *aix4*)
1287           echo "$ac_t""enabling large file support" 1>&6
1288       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1289       ;;    
1290 #
1291 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1292 # to the existance of large files..
1293 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1294 # recommendations on large file support, however it makes the
1295 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1296 # recommendation makes the compile fail on gcc2.7. JRA.
1297 #
1298         *solaris*)
1299                 case `uname -r` in
1300                         5.0*|5.1*|5.2*|5.3*|5.5*)
1301                                 echo "$ac_t""no large file support" 1>&6
1302                                 ;;
1303                         5.*)
1304                         echo "$ac_t""enabling large file support" 1>&6
1305                         if test "$ac_cv_prog_gcc" = yes; then
1306                                 ${CC-cc} -v >conftest.c 2>&1
1307                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1308                                 rm -fr conftest.c
1309                                 case "$ac_cv_gcc_compiler_version_number" in
1310                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1311                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1312                                                 ;;
1313                                         *)
1314                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1315                                                 ;;
1316                                 esac
1317                         else
1318                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1319                         fi
1320                         ;;
1321                 esac
1322                 ;;
1323 #
1324 # Tests needed for SINIX large file support.
1325 #
1326     *sysv4*)
1327       if test $host = mips-sni-sysv4 ; then
1328         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1329 echo "configure:1330: checking for LFS support" >&5
1330         old_CPPFLAGS="$CPPFLAGS"
1331         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1332         if test "$cross_compiling" = yes; then
1333   SINIX_LFS_SUPPORT=cross
1334 else
1335   cat > conftest.$ac_ext <<EOF
1336 #line 1337 "configure"
1337 #include "confdefs.h"
1338
1339 #include <unistd.h>
1340 main () {
1341 #if _LFS64_LARGEFILE == 1
1342 exit(0);
1343 #else
1344 exit(1);
1345 #endif
1346 }
1347 EOF
1348 if { (eval echo configure:1349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1349 then
1350   SINIX_LFS_SUPPORT=yes
1351 else
1352   echo "configure: failed program was:" >&5
1353   cat conftest.$ac_ext >&5
1354   rm -fr conftest*
1355   SINIX_LFS_SUPPORT=no
1356 fi
1357 rm -fr conftest*
1358 fi
1359
1360         CPPFLAGS="$old_CPPFLAGS"
1361         if test x$SINIX_LFS_SUPPORT = xyes ; then
1362           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1363           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1364           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1365           LIBS="`getconf LFS64_LIBS` $LIBS"
1366         fi
1367       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1368       fi
1369     ;;
1370
1371 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1372 #
1373     *linux*)
1374         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1375 echo "configure:1376: checking for LFS support" >&5
1376         old_CPPFLAGS="$CPPFLAGS"
1377         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1378        if test "$cross_compiling" = yes; then
1379   LINUX_LFS_SUPPORT=cross
1380 else
1381   cat > conftest.$ac_ext <<EOF
1382 #line 1383 "configure"
1383 #include "confdefs.h"
1384
1385 #include <unistd.h>
1386 #include <sys/utsname.h>
1387 main() {
1388 #if _LFS64_LARGEFILE == 1
1389        struct utsname uts;
1390        char *release;
1391        int major, minor;
1392
1393        /* Ensure this is glibc 2.2 or higher */
1394 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1395        int libc_major = __GLIBC__;
1396        int libc_minor = __GLIBC_MINOR__;
1397
1398        if (libc_major < 2)
1399               exit(1);
1400        if (libc_minor < 2)
1401               exit(1);
1402 #endif
1403
1404        /* Ensure this is kernel 2.4 or higher */
1405
1406        uname(&uts);
1407        release = uts.release;
1408        major = atoi(strsep(&release, "."));
1409        minor = atoi(strsep(&release, "."));
1410
1411        if (major > 2 || (major == 2 && minor > 3))
1412                exit(0);
1413        exit(1);
1414 #else
1415        exit(1);
1416 #endif
1417 }
1418
1419 EOF
1420 if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1421 then
1422   LINUX_LFS_SUPPORT=yes
1423 else
1424   echo "configure: failed program was:" >&5
1425   cat conftest.$ac_ext >&5
1426   rm -fr conftest*
1427   LINUX_LFS_SUPPORT=no
1428 fi
1429 rm -fr conftest*
1430 fi
1431
1432         CPPFLAGS="$old_CPPFLAGS"
1433         if test x$LINUX_LFS_SUPPORT = xyes ; then
1434           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1435         fi
1436        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1437                 ;;
1438
1439     *hurd*)
1440         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1441 echo "configure:1442: checking for LFS support" >&5
1442         old_CPPFLAGS="$CPPFLAGS"
1443         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1444         if test "$cross_compiling" = yes; then
1445   GLIBC_LFS_SUPPORT=cross
1446 else
1447   cat > conftest.$ac_ext <<EOF
1448 #line 1449 "configure"
1449 #include "confdefs.h"
1450
1451 #include <unistd.h>
1452 main () {
1453 #if _LFS64_LARGEFILE == 1
1454 exit(0);
1455 #else
1456 exit(1);
1457 #endif
1458 }
1459 EOF
1460 if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1461 then
1462   GLIBC_LFS_SUPPORT=yes
1463 else
1464   echo "configure: failed program was:" >&5
1465   cat conftest.$ac_ext >&5
1466   rm -fr conftest*
1467   GLIBC_LFS_SUPPORT=no
1468 fi
1469 rm -fr conftest*
1470 fi
1471
1472         CPPFLAGS="$old_CPPFLAGS"
1473         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1474           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1475         fi
1476       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1477     ;;
1478
1479 esac
1480
1481 echo $ac_n "checking for inline""... $ac_c" 1>&6
1482 echo "configure:1483: checking for inline" >&5
1483 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1484   echo $ac_n "(cached) $ac_c" 1>&6
1485 else
1486   ac_cv_c_inline=no
1487 for ac_kw in inline __inline__ __inline; do
1488   cat > conftest.$ac_ext <<EOF
1489 #line 1490 "configure"
1490 #include "confdefs.h"
1491
1492 int main() {
1493 } $ac_kw foo() {
1494 ; return 0; }
1495 EOF
1496 if { (eval echo configure:1497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1497   rm -rf conftest*
1498   ac_cv_c_inline=$ac_kw; break
1499 else
1500   echo "configure: failed program was:" >&5
1501   cat conftest.$ac_ext >&5
1502 fi
1503 rm -f conftest*
1504 done
1505
1506 fi
1507
1508 echo "$ac_t""$ac_cv_c_inline" 1>&6
1509 case "$ac_cv_c_inline" in
1510   inline | yes) ;;
1511   no) cat >> confdefs.h <<\EOF
1512 #define inline 
1513 EOF
1514  ;;
1515   *)  cat >> confdefs.h <<EOF
1516 #define inline $ac_cv_c_inline
1517 EOF
1518  ;;
1519 esac
1520
1521 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1522 echo "configure:1523: checking how to run the C preprocessor" >&5
1523 # On Suns, sometimes $CPP names a directory.
1524 if test -n "$CPP" && test -d "$CPP"; then
1525   CPP=
1526 fi
1527 if test -z "$CPP"; then
1528 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1529   echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531     # This must be in double quotes, not single quotes, because CPP may get
1532   # substituted into the Makefile and "${CC-cc}" will confuse make.
1533   CPP="${CC-cc} -E"
1534   # On the NeXT, cc -E runs the code through the compiler's parser,
1535   # not just through cpp.
1536   cat > conftest.$ac_ext <<EOF
1537 #line 1538 "configure"
1538 #include "confdefs.h"
1539 #include <assert.h>
1540 Syntax Error
1541 EOF
1542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1543 { (eval echo configure:1544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1545 if test -z "$ac_err"; then
1546   :
1547 else
1548   echo "$ac_err" >&5
1549   echo "configure: failed program was:" >&5
1550   cat conftest.$ac_ext >&5
1551   rm -rf conftest*
1552   CPP="${CC-cc} -E -traditional-cpp"
1553   cat > conftest.$ac_ext <<EOF
1554 #line 1555 "configure"
1555 #include "confdefs.h"
1556 #include <assert.h>
1557 Syntax Error
1558 EOF
1559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1560 { (eval echo configure:1561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1562 if test -z "$ac_err"; then
1563   :
1564 else
1565   echo "$ac_err" >&5
1566   echo "configure: failed program was:" >&5
1567   cat conftest.$ac_ext >&5
1568   rm -rf conftest*
1569   CPP="${CC-cc} -nologo -E"
1570   cat > conftest.$ac_ext <<EOF
1571 #line 1572 "configure"
1572 #include "confdefs.h"
1573 #include <assert.h>
1574 Syntax Error
1575 EOF
1576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1577 { (eval echo configure:1578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1579 if test -z "$ac_err"; then
1580   :
1581 else
1582   echo "$ac_err" >&5
1583   echo "configure: failed program was:" >&5
1584   cat conftest.$ac_ext >&5
1585   rm -rf conftest*
1586   CPP=/lib/cpp
1587 fi
1588 rm -f conftest*
1589 fi
1590 rm -f conftest*
1591 fi
1592 rm -f conftest*
1593   ac_cv_prog_CPP="$CPP"
1594 fi
1595   CPP="$ac_cv_prog_CPP"
1596 else
1597   ac_cv_prog_CPP="$CPP"
1598 fi
1599 echo "$ac_t""$CPP" 1>&6
1600
1601 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1602 echo "configure:1603: checking for ANSI C header files" >&5
1603 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1604   echo $ac_n "(cached) $ac_c" 1>&6
1605 else
1606   cat > conftest.$ac_ext <<EOF
1607 #line 1608 "configure"
1608 #include "confdefs.h"
1609 #include <stdlib.h>
1610 #include <stdarg.h>
1611 #include <string.h>
1612 #include <float.h>
1613 EOF
1614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1615 { (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1617 if test -z "$ac_err"; then
1618   rm -rf conftest*
1619   ac_cv_header_stdc=yes
1620 else
1621   echo "$ac_err" >&5
1622   echo "configure: failed program was:" >&5
1623   cat conftest.$ac_ext >&5
1624   rm -rf conftest*
1625   ac_cv_header_stdc=no
1626 fi
1627 rm -f conftest*
1628
1629 if test $ac_cv_header_stdc = yes; then
1630   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1631 cat > conftest.$ac_ext <<EOF
1632 #line 1633 "configure"
1633 #include "confdefs.h"
1634 #include <string.h>
1635 EOF
1636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1637   egrep "memchr" >/dev/null 2>&1; then
1638   :
1639 else
1640   rm -rf conftest*
1641   ac_cv_header_stdc=no
1642 fi
1643 rm -f conftest*
1644
1645 fi
1646
1647 if test $ac_cv_header_stdc = yes; then
1648   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1649 cat > conftest.$ac_ext <<EOF
1650 #line 1651 "configure"
1651 #include "confdefs.h"
1652 #include <stdlib.h>
1653 EOF
1654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1655   egrep "free" >/dev/null 2>&1; then
1656   :
1657 else
1658   rm -rf conftest*
1659   ac_cv_header_stdc=no
1660 fi
1661 rm -f conftest*
1662
1663 fi
1664
1665 if test $ac_cv_header_stdc = yes; then
1666   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1667 if test "$cross_compiling" = yes; then
1668   :
1669 else
1670   cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1673 #include <ctype.h>
1674 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1675 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1676 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1677 int main () { int i; for (i = 0; i < 256; i++)
1678 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1679 exit (0); }
1680
1681 EOF
1682 if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1683 then
1684   :
1685 else
1686   echo "configure: failed program was:" >&5
1687   cat conftest.$ac_ext >&5
1688   rm -fr conftest*
1689   ac_cv_header_stdc=no
1690 fi
1691 rm -fr conftest*
1692 fi
1693
1694 fi
1695 fi
1696
1697 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1698 if test $ac_cv_header_stdc = yes; then
1699   cat >> confdefs.h <<\EOF
1700 #define STDC_HEADERS 1
1701 EOF
1702
1703 fi
1704
1705 ac_header_dirent=no
1706 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1707 do
1708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1709 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1710 echo "configure:1711: checking for $ac_hdr that defines DIR" >&5
1711 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1712   echo $ac_n "(cached) $ac_c" 1>&6
1713 else
1714   cat > conftest.$ac_ext <<EOF
1715 #line 1716 "configure"
1716 #include "confdefs.h"
1717 #include <sys/types.h>
1718 #include <$ac_hdr>
1719 int main() {
1720 DIR *dirp = 0;
1721 ; return 0; }
1722 EOF
1723 if { (eval echo configure:1724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1724   rm -rf conftest*
1725   eval "ac_cv_header_dirent_$ac_safe=yes"
1726 else
1727   echo "configure: failed program was:" >&5
1728   cat conftest.$ac_ext >&5
1729   rm -rf conftest*
1730   eval "ac_cv_header_dirent_$ac_safe=no"
1731 fi
1732 rm -f conftest*
1733 fi
1734 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1735   echo "$ac_t""yes" 1>&6
1736     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1737   cat >> confdefs.h <<EOF
1738 #define $ac_tr_hdr 1
1739 EOF
1740  ac_header_dirent=$ac_hdr; break
1741 else
1742   echo "$ac_t""no" 1>&6
1743 fi
1744 done
1745 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1746 if test $ac_header_dirent = dirent.h; then
1747 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1748 echo "configure:1749: checking for opendir in -ldir" >&5
1749 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1750 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1751   echo $ac_n "(cached) $ac_c" 1>&6
1752 else
1753   ac_save_LIBS="$LIBS"
1754 LIBS="-ldir  $LIBS"
1755 cat > conftest.$ac_ext <<EOF
1756 #line 1757 "configure"
1757 #include "confdefs.h"
1758 /* Override any gcc2 internal prototype to avoid an error.  */
1759 /* We use char because int might match the return type of a gcc2
1760     builtin and then its argument prototype would still apply.  */
1761 char opendir();
1762
1763 int main() {
1764 opendir()
1765 ; return 0; }
1766 EOF
1767 if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1768   rm -rf conftest*
1769   eval "ac_cv_lib_$ac_lib_var=yes"
1770 else
1771   echo "configure: failed program was:" >&5
1772   cat conftest.$ac_ext >&5
1773   rm -rf conftest*
1774   eval "ac_cv_lib_$ac_lib_var=no"
1775 fi
1776 rm -f conftest*
1777 LIBS="$ac_save_LIBS"
1778
1779 fi
1780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1781   echo "$ac_t""yes" 1>&6
1782   LIBS="$LIBS -ldir"
1783 else
1784   echo "$ac_t""no" 1>&6
1785 fi
1786
1787 else
1788 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1789 echo "configure:1790: checking for opendir in -lx" >&5
1790 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1791 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1792   echo $ac_n "(cached) $ac_c" 1>&6
1793 else
1794   ac_save_LIBS="$LIBS"
1795 LIBS="-lx  $LIBS"
1796 cat > conftest.$ac_ext <<EOF
1797 #line 1798 "configure"
1798 #include "confdefs.h"
1799 /* Override any gcc2 internal prototype to avoid an error.  */
1800 /* We use char because int might match the return type of a gcc2
1801     builtin and then its argument prototype would still apply.  */
1802 char opendir();
1803
1804 int main() {
1805 opendir()
1806 ; return 0; }
1807 EOF
1808 if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1809   rm -rf conftest*
1810   eval "ac_cv_lib_$ac_lib_var=yes"
1811 else
1812   echo "configure: failed program was:" >&5
1813   cat conftest.$ac_ext >&5
1814   rm -rf conftest*
1815   eval "ac_cv_lib_$ac_lib_var=no"
1816 fi
1817 rm -f conftest*
1818 LIBS="$ac_save_LIBS"
1819
1820 fi
1821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1822   echo "$ac_t""yes" 1>&6
1823   LIBS="$LIBS -lx"
1824 else
1825   echo "$ac_t""no" 1>&6
1826 fi
1827
1828 fi
1829
1830 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1831 echo "configure:1832: checking whether time.h and sys/time.h may both be included" >&5
1832 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1833   echo $ac_n "(cached) $ac_c" 1>&6
1834 else
1835   cat > conftest.$ac_ext <<EOF
1836 #line 1837 "configure"
1837 #include "confdefs.h"
1838 #include <sys/types.h>
1839 #include <sys/time.h>
1840 #include <time.h>
1841 int main() {
1842 struct tm *tp;
1843 ; return 0; }
1844 EOF
1845 if { (eval echo configure:1846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1846   rm -rf conftest*
1847   ac_cv_header_time=yes
1848 else
1849   echo "configure: failed program was:" >&5
1850   cat conftest.$ac_ext >&5
1851   rm -rf conftest*
1852   ac_cv_header_time=no
1853 fi
1854 rm -f conftest*
1855 fi
1856
1857 echo "$ac_t""$ac_cv_header_time" 1>&6
1858 if test $ac_cv_header_time = yes; then
1859   cat >> confdefs.h <<\EOF
1860 #define TIME_WITH_SYS_TIME 1
1861 EOF
1862
1863 fi
1864
1865 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1866 echo "configure:1867: checking for sys/wait.h that is POSIX.1 compatible" >&5
1867 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1868   echo $ac_n "(cached) $ac_c" 1>&6
1869 else
1870   cat > conftest.$ac_ext <<EOF
1871 #line 1872 "configure"
1872 #include "confdefs.h"
1873 #include <sys/types.h>
1874 #include <sys/wait.h>
1875 #ifndef WEXITSTATUS
1876 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1877 #endif
1878 #ifndef WIFEXITED
1879 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1880 #endif
1881 int main() {
1882 int s;
1883 wait (&s);
1884 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
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_header_sys_wait_h=yes
1890 else
1891   echo "configure: failed program was:" >&5
1892   cat conftest.$ac_ext >&5
1893   rm -rf conftest*
1894   ac_cv_header_sys_wait_h=no
1895 fi
1896 rm -f conftest*
1897 fi
1898
1899 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1900 if test $ac_cv_header_sys_wait_h = yes; then
1901   cat >> confdefs.h <<\EOF
1902 #define HAVE_SYS_WAIT_H 1
1903 EOF
1904
1905 fi
1906
1907 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1908 do
1909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1911 echo "configure:1912: checking for $ac_hdr" >&5
1912 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1913   echo $ac_n "(cached) $ac_c" 1>&6
1914 else
1915   cat > conftest.$ac_ext <<EOF
1916 #line 1917 "configure"
1917 #include "confdefs.h"
1918 #include <$ac_hdr>
1919 EOF
1920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1921 { (eval echo configure:1922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1923 if test -z "$ac_err"; then
1924   rm -rf conftest*
1925   eval "ac_cv_header_$ac_safe=yes"
1926 else
1927   echo "$ac_err" >&5
1928   echo "configure: failed program was:" >&5
1929   cat conftest.$ac_ext >&5
1930   rm -rf conftest*
1931   eval "ac_cv_header_$ac_safe=no"
1932 fi
1933 rm -f conftest*
1934 fi
1935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1936   echo "$ac_t""yes" 1>&6
1937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1938   cat >> confdefs.h <<EOF
1939 #define $ac_tr_hdr 1
1940 EOF
1941  
1942 else
1943   echo "$ac_t""no" 1>&6
1944 fi
1945 done
1946
1947 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1948 do
1949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1951 echo "configure:1952: checking for $ac_hdr" >&5
1952 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1953   echo $ac_n "(cached) $ac_c" 1>&6
1954 else
1955   cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1958 #include <$ac_hdr>
1959 EOF
1960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1961 { (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1963 if test -z "$ac_err"; then
1964   rm -rf conftest*
1965   eval "ac_cv_header_$ac_safe=yes"
1966 else
1967   echo "$ac_err" >&5
1968   echo "configure: failed program was:" >&5
1969   cat conftest.$ac_ext >&5
1970   rm -rf conftest*
1971   eval "ac_cv_header_$ac_safe=no"
1972 fi
1973 rm -f conftest*
1974 fi
1975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1976   echo "$ac_t""yes" 1>&6
1977     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1978   cat >> confdefs.h <<EOF
1979 #define $ac_tr_hdr 1
1980 EOF
1981  
1982 else
1983   echo "$ac_t""no" 1>&6
1984 fi
1985 done
1986
1987 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1988 do
1989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1991 echo "configure:1992: checking for $ac_hdr" >&5
1992 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1993   echo $ac_n "(cached) $ac_c" 1>&6
1994 else
1995   cat > conftest.$ac_ext <<EOF
1996 #line 1997 "configure"
1997 #include "confdefs.h"
1998 #include <$ac_hdr>
1999 EOF
2000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2001 { (eval echo configure:2002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2003 if test -z "$ac_err"; then
2004   rm -rf conftest*
2005   eval "ac_cv_header_$ac_safe=yes"
2006 else
2007   echo "$ac_err" >&5
2008   echo "configure: failed program was:" >&5
2009   cat conftest.$ac_ext >&5
2010   rm -rf conftest*
2011   eval "ac_cv_header_$ac_safe=no"
2012 fi
2013 rm -f conftest*
2014 fi
2015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2016   echo "$ac_t""yes" 1>&6
2017     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2018   cat >> confdefs.h <<EOF
2019 #define $ac_tr_hdr 1
2020 EOF
2021  
2022 else
2023   echo "$ac_t""no" 1>&6
2024 fi
2025 done
2026
2027 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2028 do
2029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2031 echo "configure:2032: checking for $ac_hdr" >&5
2032 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2033   echo $ac_n "(cached) $ac_c" 1>&6
2034 else
2035   cat > conftest.$ac_ext <<EOF
2036 #line 2037 "configure"
2037 #include "confdefs.h"
2038 #include <$ac_hdr>
2039 EOF
2040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2041 { (eval echo configure:2042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2043 if test -z "$ac_err"; then
2044   rm -rf conftest*
2045   eval "ac_cv_header_$ac_safe=yes"
2046 else
2047   echo "$ac_err" >&5
2048   echo "configure: failed program was:" >&5
2049   cat conftest.$ac_ext >&5
2050   rm -rf conftest*
2051   eval "ac_cv_header_$ac_safe=no"
2052 fi
2053 rm -f conftest*
2054 fi
2055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2056   echo "$ac_t""yes" 1>&6
2057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2058   cat >> confdefs.h <<EOF
2059 #define $ac_tr_hdr 1
2060 EOF
2061  
2062 else
2063   echo "$ac_t""no" 1>&6
2064 fi
2065 done
2066
2067 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
2068 do
2069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2071 echo "configure:2072: checking for $ac_hdr" >&5
2072 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2073   echo $ac_n "(cached) $ac_c" 1>&6
2074 else
2075   cat > conftest.$ac_ext <<EOF
2076 #line 2077 "configure"
2077 #include "confdefs.h"
2078 #include <$ac_hdr>
2079 EOF
2080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2081 { (eval echo configure:2082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2083 if test -z "$ac_err"; then
2084   rm -rf conftest*
2085   eval "ac_cv_header_$ac_safe=yes"
2086 else
2087   echo "$ac_err" >&5
2088   echo "configure: failed program was:" >&5
2089   cat conftest.$ac_ext >&5
2090   rm -rf conftest*
2091   eval "ac_cv_header_$ac_safe=no"
2092 fi
2093 rm -f conftest*
2094 fi
2095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2096   echo "$ac_t""yes" 1>&6
2097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2098   cat >> confdefs.h <<EOF
2099 #define $ac_tr_hdr 1
2100 EOF
2101  
2102 else
2103   echo "$ac_t""no" 1>&6
2104 fi
2105 done
2106
2107 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2108 do
2109 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2110 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2111 echo "configure:2112: checking for $ac_hdr" >&5
2112 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2113   echo $ac_n "(cached) $ac_c" 1>&6
2114 else
2115   cat > conftest.$ac_ext <<EOF
2116 #line 2117 "configure"
2117 #include "confdefs.h"
2118 #include <$ac_hdr>
2119 EOF
2120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2121 { (eval echo configure:2122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2123 if test -z "$ac_err"; then
2124   rm -rf conftest*
2125   eval "ac_cv_header_$ac_safe=yes"
2126 else
2127   echo "$ac_err" >&5
2128   echo "configure: failed program was:" >&5
2129   cat conftest.$ac_ext >&5
2130   rm -rf conftest*
2131   eval "ac_cv_header_$ac_safe=no"
2132 fi
2133 rm -f conftest*
2134 fi
2135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2136   echo "$ac_t""yes" 1>&6
2137     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2138   cat >> confdefs.h <<EOF
2139 #define $ac_tr_hdr 1
2140 EOF
2141  
2142 else
2143   echo "$ac_t""no" 1>&6
2144 fi
2145 done
2146
2147 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2148 do
2149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2151 echo "configure:2152: checking for $ac_hdr" >&5
2152 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2153   echo $ac_n "(cached) $ac_c" 1>&6
2154 else
2155   cat > conftest.$ac_ext <<EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2158 #include <$ac_hdr>
2159 EOF
2160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2161 { (eval echo configure:2162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2163 if test -z "$ac_err"; then
2164   rm -rf conftest*
2165   eval "ac_cv_header_$ac_safe=yes"
2166 else
2167   echo "$ac_err" >&5
2168   echo "configure: failed program was:" >&5
2169   cat conftest.$ac_ext >&5
2170   rm -rf conftest*
2171   eval "ac_cv_header_$ac_safe=no"
2172 fi
2173 rm -f conftest*
2174 fi
2175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2176   echo "$ac_t""yes" 1>&6
2177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2178   cat >> confdefs.h <<EOF
2179 #define $ac_tr_hdr 1
2180 EOF
2181  
2182 else
2183   echo "$ac_t""no" 1>&6
2184 fi
2185 done
2186
2187 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h
2188 do
2189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2191 echo "configure:2192: checking for $ac_hdr" >&5
2192 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2193   echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195   cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198 #include <$ac_hdr>
2199 EOF
2200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2201 { (eval echo configure:2202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2203 if test -z "$ac_err"; then
2204   rm -rf conftest*
2205   eval "ac_cv_header_$ac_safe=yes"
2206 else
2207   echo "$ac_err" >&5
2208   echo "configure: failed program was:" >&5
2209   cat conftest.$ac_ext >&5
2210   rm -rf conftest*
2211   eval "ac_cv_header_$ac_safe=no"
2212 fi
2213 rm -f conftest*
2214 fi
2215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2216   echo "$ac_t""yes" 1>&6
2217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2218   cat >> confdefs.h <<EOF
2219 #define $ac_tr_hdr 1
2220 EOF
2221  
2222 else
2223   echo "$ac_t""no" 1>&6
2224 fi
2225 done
2226
2227
2228 #
2229 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2230 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2231 #
2232 case "$host_os" in
2233     *hpux*)
2234                 cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 #include <shadow.h>
2238 int main() {
2239 struct spwd testme
2240 ; return 0; }
2241 EOF
2242 if { (eval echo configure:2243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2243   rm -rf conftest*
2244   ac_cv_header_shadow_h=yes
2245 else
2246   echo "configure: failed program was:" >&5
2247   cat conftest.$ac_ext >&5
2248   rm -rf conftest*
2249   ac_cv_header_shadow_h=no
2250 fi
2251 rm -f conftest*
2252                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2253                    cat >> confdefs.h <<\EOF
2254 #define HAVE_SHADOW_H 1
2255 EOF
2256
2257                 fi
2258         ;;
2259 esac
2260 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2261 do
2262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2264 echo "configure:2265: checking for $ac_hdr" >&5
2265 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2266   echo $ac_n "(cached) $ac_c" 1>&6
2267 else
2268   cat > conftest.$ac_ext <<EOF
2269 #line 2270 "configure"
2270 #include "confdefs.h"
2271 #include <$ac_hdr>
2272 EOF
2273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2274 { (eval echo configure:2275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2276 if test -z "$ac_err"; then
2277   rm -rf conftest*
2278   eval "ac_cv_header_$ac_safe=yes"
2279 else
2280   echo "$ac_err" >&5
2281   echo "configure: failed program was:" >&5
2282   cat conftest.$ac_ext >&5
2283   rm -rf conftest*
2284   eval "ac_cv_header_$ac_safe=no"
2285 fi
2286 rm -f conftest*
2287 fi
2288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2289   echo "$ac_t""yes" 1>&6
2290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2291   cat >> confdefs.h <<EOF
2292 #define $ac_tr_hdr 1
2293 EOF
2294  
2295 else
2296   echo "$ac_t""no" 1>&6
2297 fi
2298 done
2299
2300 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2301 do
2302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2304 echo "configure:2305: checking for $ac_hdr" >&5
2305 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2306   echo $ac_n "(cached) $ac_c" 1>&6
2307 else
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <$ac_hdr>
2312 EOF
2313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2314 { (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2316 if test -z "$ac_err"; then
2317   rm -rf conftest*
2318   eval "ac_cv_header_$ac_safe=yes"
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   eval "ac_cv_header_$ac_safe=no"
2325 fi
2326 rm -f conftest*
2327 fi
2328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2329   echo "$ac_t""yes" 1>&6
2330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2331   cat >> confdefs.h <<EOF
2332 #define $ac_tr_hdr 1
2333 EOF
2334  
2335 else
2336   echo "$ac_t""no" 1>&6
2337 fi
2338 done
2339
2340 for ac_hdr in stropts.h poll.h
2341 do
2342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2344 echo "configure:2345: checking for $ac_hdr" >&5
2345 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2346   echo $ac_n "(cached) $ac_c" 1>&6
2347 else
2348   cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 #include <$ac_hdr>
2352 EOF
2353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2354 { (eval echo configure:2355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2356 if test -z "$ac_err"; then
2357   rm -rf conftest*
2358   eval "ac_cv_header_$ac_safe=yes"
2359 else
2360   echo "$ac_err" >&5
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -rf conftest*
2364   eval "ac_cv_header_$ac_safe=no"
2365 fi
2366 rm -f conftest*
2367 fi
2368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2369   echo "$ac_t""yes" 1>&6
2370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2371   cat >> confdefs.h <<EOF
2372 #define $ac_tr_hdr 1
2373 EOF
2374  
2375 else
2376   echo "$ac_t""no" 1>&6
2377 fi
2378 done
2379
2380 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2381 do
2382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2384 echo "configure:2385: checking for $ac_hdr" >&5
2385 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2386   echo $ac_n "(cached) $ac_c" 1>&6
2387 else
2388   cat > conftest.$ac_ext <<EOF
2389 #line 2390 "configure"
2390 #include "confdefs.h"
2391 #include <$ac_hdr>
2392 EOF
2393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2394 { (eval echo configure:2395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2396 if test -z "$ac_err"; then
2397   rm -rf conftest*
2398   eval "ac_cv_header_$ac_safe=yes"
2399 else
2400   echo "$ac_err" >&5
2401   echo "configure: failed program was:" >&5
2402   cat conftest.$ac_ext >&5
2403   rm -rf conftest*
2404   eval "ac_cv_header_$ac_safe=no"
2405 fi
2406 rm -f conftest*
2407 fi
2408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2409   echo "$ac_t""yes" 1>&6
2410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2411   cat >> confdefs.h <<EOF
2412 #define $ac_tr_hdr 1
2413 EOF
2414  
2415 else
2416   echo "$ac_t""no" 1>&6
2417 fi
2418 done
2419
2420 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2421 do
2422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2424 echo "configure:2425: checking for $ac_hdr" >&5
2425 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2426   echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428   cat > conftest.$ac_ext <<EOF
2429 #line 2430 "configure"
2430 #include "confdefs.h"
2431 #include <$ac_hdr>
2432 EOF
2433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2434 { (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2436 if test -z "$ac_err"; then
2437   rm -rf conftest*
2438   eval "ac_cv_header_$ac_safe=yes"
2439 else
2440   echo "$ac_err" >&5
2441   echo "configure: failed program was:" >&5
2442   cat conftest.$ac_ext >&5
2443   rm -rf conftest*
2444   eval "ac_cv_header_$ac_safe=no"
2445 fi
2446 rm -f conftest*
2447 fi
2448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2449   echo "$ac_t""yes" 1>&6
2450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2451   cat >> confdefs.h <<EOF
2452 #define $ac_tr_hdr 1
2453 EOF
2454  
2455 else
2456   echo "$ac_t""no" 1>&6
2457 fi
2458 done
2459
2460
2461 # For experimental utmp support (lastlog on some BSD-like systems)
2462 for ac_hdr in utmp.h utmpx.h lastlog.h
2463 do
2464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2466 echo "configure:2467: checking for $ac_hdr" >&5
2467 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2468   echo $ac_n "(cached) $ac_c" 1>&6
2469 else
2470   cat > conftest.$ac_ext <<EOF
2471 #line 2472 "configure"
2472 #include "confdefs.h"
2473 #include <$ac_hdr>
2474 EOF
2475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2476 { (eval echo configure:2477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2478 if test -z "$ac_err"; then
2479   rm -rf conftest*
2480   eval "ac_cv_header_$ac_safe=yes"
2481 else
2482   echo "$ac_err" >&5
2483   echo "configure: failed program was:" >&5
2484   cat conftest.$ac_ext >&5
2485   rm -rf conftest*
2486   eval "ac_cv_header_$ac_safe=no"
2487 fi
2488 rm -f conftest*
2489 fi
2490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2491   echo "$ac_t""yes" 1>&6
2492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2493   cat >> confdefs.h <<EOF
2494 #define $ac_tr_hdr 1
2495 EOF
2496  
2497 else
2498   echo "$ac_t""no" 1>&6
2499 fi
2500 done
2501
2502  
2503 # For quotas on Veritas VxFS filesystems
2504 for ac_hdr in sys/fs/vx_quota.h
2505 do
2506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2508 echo "configure:2509: checking for $ac_hdr" >&5
2509 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2510   echo $ac_n "(cached) $ac_c" 1>&6
2511 else
2512   cat > conftest.$ac_ext <<EOF
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515 #include <$ac_hdr>
2516 EOF
2517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2518 { (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2520 if test -z "$ac_err"; then
2521   rm -rf conftest*
2522   eval "ac_cv_header_$ac_safe=yes"
2523 else
2524   echo "$ac_err" >&5
2525   echo "configure: failed program was:" >&5
2526   cat conftest.$ac_ext >&5
2527   rm -rf conftest*
2528   eval "ac_cv_header_$ac_safe=no"
2529 fi
2530 rm -f conftest*
2531 fi
2532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2533   echo "$ac_t""yes" 1>&6
2534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2535   cat >> confdefs.h <<EOF
2536 #define $ac_tr_hdr 1
2537 EOF
2538  
2539 else
2540   echo "$ac_t""no" 1>&6
2541 fi
2542 done
2543
2544
2545 # For quotas on Linux XFS filesystems
2546 for ac_hdr in linux/xqm.h
2547 do
2548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2550 echo "configure:2551: checking for $ac_hdr" >&5
2551 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2552   echo $ac_n "(cached) $ac_c" 1>&6
2553 else
2554   cat > conftest.$ac_ext <<EOF
2555 #line 2556 "configure"
2556 #include "confdefs.h"
2557 #include <$ac_hdr>
2558 EOF
2559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2560 { (eval echo configure:2561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2562 if test -z "$ac_err"; then
2563   rm -rf conftest*
2564   eval "ac_cv_header_$ac_safe=yes"
2565 else
2566   echo "$ac_err" >&5
2567   echo "configure: failed program was:" >&5
2568   cat conftest.$ac_ext >&5
2569   rm -rf conftest*
2570   eval "ac_cv_header_$ac_safe=no"
2571 fi
2572 rm -f conftest*
2573 fi
2574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2575   echo "$ac_t""yes" 1>&6
2576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2577   cat >> confdefs.h <<EOF
2578 #define $ac_tr_hdr 1
2579 EOF
2580  
2581 else
2582   echo "$ac_t""no" 1>&6
2583 fi
2584 done
2585
2586
2587 echo $ac_n "checking size of int""... $ac_c" 1>&6
2588 echo "configure:2589: checking size of int" >&5
2589 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2590   echo $ac_n "(cached) $ac_c" 1>&6
2591 else
2592   if test "$cross_compiling" = yes; then
2593   ac_cv_sizeof_int=cross
2594 else
2595   cat > conftest.$ac_ext <<EOF
2596 #line 2597 "configure"
2597 #include "confdefs.h"
2598 #include <stdio.h>
2599 int main()
2600 {
2601   FILE *f=fopen("conftestval", "w");
2602   if (!f) return(1);
2603   fprintf(f, "%d\n", sizeof(int));
2604   return(0);
2605 }
2606 EOF
2607 if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2608 then
2609   ac_cv_sizeof_int=`cat conftestval`
2610 else
2611   echo "configure: failed program was:" >&5
2612   cat conftest.$ac_ext >&5
2613   rm -fr conftest*
2614   ac_cv_sizeof_int=0
2615 fi
2616 rm -fr conftest*
2617 fi
2618
2619 fi
2620 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2621 cat >> confdefs.h <<EOF
2622 #define SIZEOF_INT $ac_cv_sizeof_int
2623 EOF
2624
2625
2626 echo $ac_n "checking size of long""... $ac_c" 1>&6
2627 echo "configure:2628: checking size of long" >&5
2628 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   if test "$cross_compiling" = yes; then
2632   ac_cv_sizeof_long=cross
2633 else
2634   cat > conftest.$ac_ext <<EOF
2635 #line 2636 "configure"
2636 #include "confdefs.h"
2637 #include <stdio.h>
2638 int main()
2639 {
2640   FILE *f=fopen("conftestval", "w");
2641   if (!f) return(1);
2642   fprintf(f, "%d\n", sizeof(long));
2643   return(0);
2644 }
2645 EOF
2646 if { (eval echo configure:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2647 then
2648   ac_cv_sizeof_long=`cat conftestval`
2649 else
2650   echo "configure: failed program was:" >&5
2651   cat conftest.$ac_ext >&5
2652   rm -fr conftest*
2653   ac_cv_sizeof_long=0
2654 fi
2655 rm -fr conftest*
2656 fi
2657
2658 fi
2659 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2660 cat >> confdefs.h <<EOF
2661 #define SIZEOF_LONG $ac_cv_sizeof_long
2662 EOF
2663
2664
2665 echo $ac_n "checking size of short""... $ac_c" 1>&6
2666 echo "configure:2667: checking size of short" >&5
2667 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2668   echo $ac_n "(cached) $ac_c" 1>&6
2669 else
2670   if test "$cross_compiling" = yes; then
2671   ac_cv_sizeof_short=cross
2672 else
2673   cat > conftest.$ac_ext <<EOF
2674 #line 2675 "configure"
2675 #include "confdefs.h"
2676 #include <stdio.h>
2677 int main()
2678 {
2679   FILE *f=fopen("conftestval", "w");
2680   if (!f) return(1);
2681   fprintf(f, "%d\n", sizeof(short));
2682   return(0);
2683 }
2684 EOF
2685 if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2686 then
2687   ac_cv_sizeof_short=`cat conftestval`
2688 else
2689   echo "configure: failed program was:" >&5
2690   cat conftest.$ac_ext >&5
2691   rm -fr conftest*
2692   ac_cv_sizeof_short=0
2693 fi
2694 rm -fr conftest*
2695 fi
2696
2697 fi
2698 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2699 cat >> confdefs.h <<EOF
2700 #define SIZEOF_SHORT $ac_cv_sizeof_short
2701 EOF
2702
2703
2704
2705 echo $ac_n "checking for working const""... $ac_c" 1>&6
2706 echo "configure:2707: checking for working const" >&5
2707 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2708   echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710   cat > conftest.$ac_ext <<EOF
2711 #line 2712 "configure"
2712 #include "confdefs.h"
2713
2714 int main() {
2715
2716 /* Ultrix mips cc rejects this.  */
2717 typedef int charset[2]; const charset x;
2718 /* SunOS 4.1.1 cc rejects this.  */
2719 char const *const *ccp;
2720 char **p;
2721 /* NEC SVR4.0.2 mips cc rejects this.  */
2722 struct point {int x, y;};
2723 static struct point const zero = {0,0};
2724 /* AIX XL C 1.02.0.0 rejects this.
2725    It does not let you subtract one const X* pointer from another in an arm
2726    of an if-expression whose if-part is not a constant expression */
2727 const char *g = "string";
2728 ccp = &g + (g ? g-g : 0);
2729 /* HPUX 7.0 cc rejects these. */
2730 ++ccp;
2731 p = (char**) ccp;
2732 ccp = (char const *const *) p;
2733 { /* SCO 3.2v4 cc rejects this.  */
2734   char *t;
2735   char const *s = 0 ? (char *) 0 : (char const *) 0;
2736
2737   *t++ = 0;
2738 }
2739 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2740   int x[] = {25, 17};
2741   const int *foo = &x[0];
2742   ++foo;
2743 }
2744 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2745   typedef const int *iptr;
2746   iptr p = 0;
2747   ++p;
2748 }
2749 { /* AIX XL C 1.02.0.0 rejects this saying
2750      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2751   struct s { int j; const int *ap[3]; };
2752   struct s *b; b->j = 5;
2753 }
2754 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2755   const int foo = 10;
2756 }
2757
2758 ; return 0; }
2759 EOF
2760 if { (eval echo configure:2761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2761   rm -rf conftest*
2762   ac_cv_c_const=yes
2763 else
2764   echo "configure: failed program was:" >&5
2765   cat conftest.$ac_ext >&5
2766   rm -rf conftest*
2767   ac_cv_c_const=no
2768 fi
2769 rm -f conftest*
2770 fi
2771
2772 echo "$ac_t""$ac_cv_c_const" 1>&6
2773 if test $ac_cv_c_const = no; then
2774   cat >> confdefs.h <<\EOF
2775 #define const 
2776 EOF
2777
2778 fi
2779
2780 echo $ac_n "checking for inline""... $ac_c" 1>&6
2781 echo "configure:2782: checking for inline" >&5
2782 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2783   echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785   ac_cv_c_inline=no
2786 for ac_kw in inline __inline__ __inline; do
2787   cat > conftest.$ac_ext <<EOF
2788 #line 2789 "configure"
2789 #include "confdefs.h"
2790
2791 int main() {
2792 } $ac_kw foo() {
2793 ; return 0; }
2794 EOF
2795 if { (eval echo configure:2796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2796   rm -rf conftest*
2797   ac_cv_c_inline=$ac_kw; break
2798 else
2799   echo "configure: failed program was:" >&5
2800   cat conftest.$ac_ext >&5
2801 fi
2802 rm -f conftest*
2803 done
2804
2805 fi
2806
2807 echo "$ac_t""$ac_cv_c_inline" 1>&6
2808 case "$ac_cv_c_inline" in
2809   inline | yes) ;;
2810   no) cat >> confdefs.h <<\EOF
2811 #define inline 
2812 EOF
2813  ;;
2814   *)  cat >> confdefs.h <<EOF
2815 #define inline $ac_cv_c_inline
2816 EOF
2817  ;;
2818 esac
2819
2820 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2821 echo "configure:2822: checking whether byte ordering is bigendian" >&5
2822 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   ac_cv_c_bigendian=unknown
2826 # See if sys/param.h defines the BYTE_ORDER macro.
2827 cat > conftest.$ac_ext <<EOF
2828 #line 2829 "configure"
2829 #include "confdefs.h"
2830 #include <sys/types.h>
2831 #include <sys/param.h>
2832 int main() {
2833
2834 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2835  bogus endian macros
2836 #endif
2837 ; return 0; }
2838 EOF
2839 if { (eval echo configure:2840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2840   rm -rf conftest*
2841   # It does; now see whether it defined to BIG_ENDIAN or not.
2842 cat > conftest.$ac_ext <<EOF
2843 #line 2844 "configure"
2844 #include "confdefs.h"
2845 #include <sys/types.h>
2846 #include <sys/param.h>
2847 int main() {
2848
2849 #if BYTE_ORDER != BIG_ENDIAN
2850  not big endian
2851 #endif
2852 ; return 0; }
2853 EOF
2854 if { (eval echo configure:2855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2855   rm -rf conftest*
2856   ac_cv_c_bigendian=yes
2857 else
2858   echo "configure: failed program was:" >&5
2859   cat conftest.$ac_ext >&5
2860   rm -rf conftest*
2861   ac_cv_c_bigendian=no
2862 fi
2863 rm -f conftest*
2864 else
2865   echo "configure: failed program was:" >&5
2866   cat conftest.$ac_ext >&5
2867 fi
2868 rm -f conftest*
2869 if test $ac_cv_c_bigendian = unknown; then
2870 if test "$cross_compiling" = yes; then
2871     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2872 else
2873   cat > conftest.$ac_ext <<EOF
2874 #line 2875 "configure"
2875 #include "confdefs.h"
2876 main () {
2877   /* Are we little or big endian?  From Harbison&Steele.  */
2878   union
2879   {
2880     long l;
2881     char c[sizeof (long)];
2882   } u;
2883   u.l = 1;
2884   exit (u.c[sizeof (long) - 1] == 1);
2885 }
2886 EOF
2887 if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2888 then
2889   ac_cv_c_bigendian=no
2890 else
2891   echo "configure: failed program was:" >&5
2892   cat conftest.$ac_ext >&5
2893   rm -fr conftest*
2894   ac_cv_c_bigendian=yes
2895 fi
2896 rm -fr conftest*
2897 fi
2898
2899 fi
2900 fi
2901
2902 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2903 if test $ac_cv_c_bigendian = yes; then
2904   cat >> confdefs.h <<\EOF
2905 #define WORDS_BIGENDIAN 1
2906 EOF
2907
2908 fi
2909
2910 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2911 echo "configure:2912: checking whether char is unsigned" >&5
2912 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2913   echo $ac_n "(cached) $ac_c" 1>&6
2914 else
2915   if test "$GCC" = yes; then
2916   # GCC predefines this symbol on systems where it applies.
2917 cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920 #ifdef __CHAR_UNSIGNED__
2921   yes
2922 #endif
2923
2924 EOF
2925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2926   egrep "yes" >/dev/null 2>&1; then
2927   rm -rf conftest*
2928   ac_cv_c_char_unsigned=yes
2929 else
2930   rm -rf conftest*
2931   ac_cv_c_char_unsigned=no
2932 fi
2933 rm -f conftest*
2934
2935 else
2936 if test "$cross_compiling" = yes; then
2937     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2938 else
2939   cat > conftest.$ac_ext <<EOF
2940 #line 2941 "configure"
2941 #include "confdefs.h"
2942 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2943 #if !defined(__STDC__) || __STDC__ != 1
2944 #define volatile
2945 #endif
2946 main() {
2947   volatile char c = 255; exit(c < 0);
2948 }
2949 EOF
2950 if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2951 then
2952   ac_cv_c_char_unsigned=yes
2953 else
2954   echo "configure: failed program was:" >&5
2955   cat conftest.$ac_ext >&5
2956   rm -fr conftest*
2957   ac_cv_c_char_unsigned=no
2958 fi
2959 rm -fr conftest*
2960 fi
2961
2962 fi
2963 fi
2964
2965 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2966 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2967   cat >> confdefs.h <<\EOF
2968 #define __CHAR_UNSIGNED__ 1
2969 EOF
2970
2971 fi
2972
2973
2974 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2975 echo "configure:2976: checking return type of signal handlers" >&5
2976 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2977   echo $ac_n "(cached) $ac_c" 1>&6
2978 else
2979   cat > conftest.$ac_ext <<EOF
2980 #line 2981 "configure"
2981 #include "confdefs.h"
2982 #include <sys/types.h>
2983 #include <signal.h>
2984 #ifdef signal
2985 #undef signal
2986 #endif
2987 #ifdef __cplusplus
2988 extern "C" void (*signal (int, void (*)(int)))(int);
2989 #else
2990 void (*signal ()) ();
2991 #endif
2992
2993 int main() {
2994 int i;
2995 ; return 0; }
2996 EOF
2997 if { (eval echo configure:2998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2998   rm -rf conftest*
2999   ac_cv_type_signal=void
3000 else
3001   echo "configure: failed program was:" >&5
3002   cat conftest.$ac_ext >&5
3003   rm -rf conftest*
3004   ac_cv_type_signal=int
3005 fi
3006 rm -f conftest*
3007 fi
3008
3009 echo "$ac_t""$ac_cv_type_signal" 1>&6
3010 cat >> confdefs.h <<EOF
3011 #define RETSIGTYPE $ac_cv_type_signal
3012 EOF
3013
3014
3015 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3016 echo "configure:3017: checking for uid_t in sys/types.h" >&5
3017 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3018   echo $ac_n "(cached) $ac_c" 1>&6
3019 else
3020   cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3023 #include <sys/types.h>
3024 EOF
3025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3026   egrep "uid_t" >/dev/null 2>&1; then
3027   rm -rf conftest*
3028   ac_cv_type_uid_t=yes
3029 else
3030   rm -rf conftest*
3031   ac_cv_type_uid_t=no
3032 fi
3033 rm -f conftest*
3034
3035 fi
3036
3037 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3038 if test $ac_cv_type_uid_t = no; then
3039   cat >> confdefs.h <<\EOF
3040 #define uid_t int
3041 EOF
3042
3043   cat >> confdefs.h <<\EOF
3044 #define gid_t int
3045 EOF
3046
3047 fi
3048
3049 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3050 echo "configure:3051: checking for mode_t" >&5
3051 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   cat > conftest.$ac_ext <<EOF
3055 #line 3056 "configure"
3056 #include "confdefs.h"
3057 #include <sys/types.h>
3058 #if STDC_HEADERS
3059 #include <stdlib.h>
3060 #include <stddef.h>
3061 #endif
3062 EOF
3063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3064   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3065   rm -rf conftest*
3066   ac_cv_type_mode_t=yes
3067 else
3068   rm -rf conftest*
3069   ac_cv_type_mode_t=no
3070 fi
3071 rm -f conftest*
3072
3073 fi
3074 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3075 if test $ac_cv_type_mode_t = no; then
3076   cat >> confdefs.h <<\EOF
3077 #define mode_t int
3078 EOF
3079
3080 fi
3081
3082 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3083 echo "configure:3084: checking for off_t" >&5
3084 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3085   echo $ac_n "(cached) $ac_c" 1>&6
3086 else
3087   cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090 #include <sys/types.h>
3091 #if STDC_HEADERS
3092 #include <stdlib.h>
3093 #include <stddef.h>
3094 #endif
3095 EOF
3096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3097   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3098   rm -rf conftest*
3099   ac_cv_type_off_t=yes
3100 else
3101   rm -rf conftest*
3102   ac_cv_type_off_t=no
3103 fi
3104 rm -f conftest*
3105
3106 fi
3107 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3108 if test $ac_cv_type_off_t = no; then
3109   cat >> confdefs.h <<\EOF
3110 #define off_t long
3111 EOF
3112
3113 fi
3114
3115 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3116 echo "configure:3117: checking for size_t" >&5
3117 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   cat > conftest.$ac_ext <<EOF
3121 #line 3122 "configure"
3122 #include "confdefs.h"
3123 #include <sys/types.h>
3124 #if STDC_HEADERS
3125 #include <stdlib.h>
3126 #include <stddef.h>
3127 #endif
3128 EOF
3129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3130   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3131   rm -rf conftest*
3132   ac_cv_type_size_t=yes
3133 else
3134   rm -rf conftest*
3135   ac_cv_type_size_t=no
3136 fi
3137 rm -f conftest*
3138
3139 fi
3140 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3141 if test $ac_cv_type_size_t = no; then
3142   cat >> confdefs.h <<\EOF
3143 #define size_t unsigned
3144 EOF
3145
3146 fi
3147
3148 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3149 echo "configure:3150: checking for pid_t" >&5
3150 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3151   echo $ac_n "(cached) $ac_c" 1>&6
3152 else
3153   cat > conftest.$ac_ext <<EOF
3154 #line 3155 "configure"
3155 #include "confdefs.h"
3156 #include <sys/types.h>
3157 #if STDC_HEADERS
3158 #include <stdlib.h>
3159 #include <stddef.h>
3160 #endif
3161 EOF
3162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3163   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3164   rm -rf conftest*
3165   ac_cv_type_pid_t=yes
3166 else
3167   rm -rf conftest*
3168   ac_cv_type_pid_t=no
3169 fi
3170 rm -f conftest*
3171
3172 fi
3173 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3174 if test $ac_cv_type_pid_t = no; then
3175   cat >> confdefs.h <<\EOF
3176 #define pid_t int
3177 EOF
3178
3179 fi
3180
3181 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3182 echo "configure:3183: checking for st_rdev in struct stat" >&5
3183 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3184   echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186   cat > conftest.$ac_ext <<EOF
3187 #line 3188 "configure"
3188 #include "confdefs.h"
3189 #include <sys/types.h>
3190 #include <sys/stat.h>
3191 int main() {
3192 struct stat s; s.st_rdev;
3193 ; return 0; }
3194 EOF
3195 if { (eval echo configure:3196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3196   rm -rf conftest*
3197   ac_cv_struct_st_rdev=yes
3198 else
3199   echo "configure: failed program was:" >&5
3200   cat conftest.$ac_ext >&5
3201   rm -rf conftest*
3202   ac_cv_struct_st_rdev=no
3203 fi
3204 rm -f conftest*
3205 fi
3206
3207 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3208 if test $ac_cv_struct_st_rdev = yes; then
3209   cat >> confdefs.h <<\EOF
3210 #define HAVE_ST_RDEV 1
3211 EOF
3212
3213 fi
3214
3215 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3216 echo "configure:3217: checking for d_off in dirent" >&5
3217 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   cat > conftest.$ac_ext <<EOF
3221 #line 3222 "configure"
3222 #include "confdefs.h"
3223
3224 #include <unistd.h>
3225 #include <sys/types.h>
3226 #include <dirent.h>
3227 int main() {
3228 struct dirent d; d.d_off;
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_dirent_d_off=yes
3234 else
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   rm -rf conftest*
3238   ac_cv_dirent_d_off=no
3239 fi
3240 rm -f conftest*
3241 fi
3242
3243 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3244 if test $ac_cv_dirent_d_off = yes; then
3245   cat >> confdefs.h <<\EOF
3246 #define HAVE_DIRENT_D_OFF 1
3247 EOF
3248
3249 fi
3250
3251 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3252 echo "configure:3253: checking for ino_t" >&5
3253 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3254   echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256   cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 #include <sys/types.h>
3260 #if STDC_HEADERS
3261 #include <stdlib.h>
3262 #include <stddef.h>
3263 #endif
3264 EOF
3265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3266   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3267   rm -rf conftest*
3268   ac_cv_type_ino_t=yes
3269 else
3270   rm -rf conftest*
3271   ac_cv_type_ino_t=no
3272 fi
3273 rm -f conftest*
3274
3275 fi
3276 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3277 if test $ac_cv_type_ino_t = no; then
3278   cat >> confdefs.h <<\EOF
3279 #define ino_t unsigned
3280 EOF
3281
3282 fi
3283
3284 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3285 echo "configure:3286: checking for loff_t" >&5
3286 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3287   echo $ac_n "(cached) $ac_c" 1>&6
3288 else
3289   cat > conftest.$ac_ext <<EOF
3290 #line 3291 "configure"
3291 #include "confdefs.h"
3292 #include <sys/types.h>
3293 #if STDC_HEADERS
3294 #include <stdlib.h>
3295 #include <stddef.h>
3296 #endif
3297 EOF
3298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3299   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3300   rm -rf conftest*
3301   ac_cv_type_loff_t=yes
3302 else
3303   rm -rf conftest*
3304   ac_cv_type_loff_t=no
3305 fi
3306 rm -f conftest*
3307
3308 fi
3309 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3310 if test $ac_cv_type_loff_t = no; then
3311   cat >> confdefs.h <<\EOF
3312 #define loff_t off_t
3313 EOF
3314
3315 fi
3316
3317 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3318 echo "configure:3319: checking for offset_t" >&5
3319 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3320   echo $ac_n "(cached) $ac_c" 1>&6
3321 else
3322   cat > conftest.$ac_ext <<EOF
3323 #line 3324 "configure"
3324 #include "confdefs.h"
3325 #include <sys/types.h>
3326 #if STDC_HEADERS
3327 #include <stdlib.h>
3328 #include <stddef.h>
3329 #endif
3330 EOF
3331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3332   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3333   rm -rf conftest*
3334   ac_cv_type_offset_t=yes
3335 else
3336   rm -rf conftest*
3337   ac_cv_type_offset_t=no
3338 fi
3339 rm -f conftest*
3340
3341 fi
3342 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3343 if test $ac_cv_type_offset_t = no; then
3344   cat >> confdefs.h <<\EOF
3345 #define offset_t loff_t
3346 EOF
3347
3348 fi
3349
3350 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3351 echo "configure:3352: checking for ssize_t" >&5
3352 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355   cat > conftest.$ac_ext <<EOF
3356 #line 3357 "configure"
3357 #include "confdefs.h"
3358 #include <sys/types.h>
3359 #if STDC_HEADERS
3360 #include <stdlib.h>
3361 #include <stddef.h>
3362 #endif
3363 EOF
3364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3365   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3366   rm -rf conftest*
3367   ac_cv_type_ssize_t=yes
3368 else
3369   rm -rf conftest*
3370   ac_cv_type_ssize_t=no
3371 fi
3372 rm -f conftest*
3373
3374 fi
3375 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3376 if test $ac_cv_type_ssize_t = no; then
3377   cat >> confdefs.h <<\EOF
3378 #define ssize_t int
3379 EOF
3380
3381 fi
3382
3383 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3384 echo "configure:3385: checking for wchar_t" >&5
3385 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   cat > conftest.$ac_ext <<EOF
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391 #include <sys/types.h>
3392 #if STDC_HEADERS
3393 #include <stdlib.h>
3394 #include <stddef.h>
3395 #endif
3396 EOF
3397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3398   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3399   rm -rf conftest*
3400   ac_cv_type_wchar_t=yes
3401 else
3402   rm -rf conftest*
3403   ac_cv_type_wchar_t=no
3404 fi
3405 rm -f conftest*
3406
3407 fi
3408 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3409 if test $ac_cv_type_wchar_t = no; then
3410   cat >> confdefs.h <<\EOF
3411 #define wchar_t unsigned short
3412 EOF
3413
3414 fi
3415
3416
3417 ############################################
3418 # for cups support we need libcups, and a handful of header files
3419
3420 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3421 echo "configure:3422: checking for httpConnect in -lcups" >&5
3422 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3423 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   ac_save_LIBS="$LIBS"
3427 LIBS="-lcups  $LIBS"
3428 cat > conftest.$ac_ext <<EOF
3429 #line 3430 "configure"
3430 #include "confdefs.h"
3431 /* Override any gcc2 internal prototype to avoid an error.  */
3432 /* We use char because int might match the return type of a gcc2
3433     builtin and then its argument prototype would still apply.  */
3434 char httpConnect();
3435
3436 int main() {
3437 httpConnect()
3438 ; return 0; }
3439 EOF
3440 if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3441   rm -rf conftest*
3442   eval "ac_cv_lib_$ac_lib_var=yes"
3443 else
3444   echo "configure: failed program was:" >&5
3445   cat conftest.$ac_ext >&5
3446   rm -rf conftest*
3447   eval "ac_cv_lib_$ac_lib_var=no"
3448 fi
3449 rm -f conftest*
3450 LIBS="$ac_save_LIBS"
3451
3452 fi
3453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3454   echo "$ac_t""yes" 1>&6
3455     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3456     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3457   cat >> confdefs.h <<EOF
3458 #define $ac_tr_lib 1
3459 EOF
3460
3461   LIBS="-lcups $LIBS"
3462
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466
3467
3468 # I wonder if there is a nicer way of doing this?
3469
3470 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3471         for ac_hdr in cups/cups.h cups/language.h
3472 do
3473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3475 echo "configure:3476: checking for $ac_hdr" >&5
3476 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3477   echo $ac_n "(cached) $ac_c" 1>&6
3478 else
3479   cat > conftest.$ac_ext <<EOF
3480 #line 3481 "configure"
3481 #include "confdefs.h"
3482 #include <$ac_hdr>
3483 EOF
3484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3485 { (eval echo configure:3486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3487 if test -z "$ac_err"; then
3488   rm -rf conftest*
3489   eval "ac_cv_header_$ac_safe=yes"
3490 else
3491   echo "$ac_err" >&5
3492   echo "configure: failed program was:" >&5
3493   cat conftest.$ac_ext >&5
3494   rm -rf conftest*
3495   eval "ac_cv_header_$ac_safe=no"
3496 fi
3497 rm -f conftest*
3498 fi
3499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3500   echo "$ac_t""yes" 1>&6
3501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3502   cat >> confdefs.h <<EOF
3503 #define $ac_tr_hdr 1
3504 EOF
3505  
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509 done
3510
3511         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3512                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3513                         cat >> confdefs.h <<\EOF
3514 #define HAVE_CUPS 1
3515 EOF
3516
3517                 fi
3518         fi
3519 fi
3520
3521 ############################################
3522 # we need libdl for PAM and the new VFS code
3523 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3524 echo "configure:3525: checking for dlopen in -ldl" >&5
3525 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3526 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   ac_save_LIBS="$LIBS"
3530 LIBS="-ldl  $LIBS"
3531 cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 /* Override any gcc2 internal prototype to avoid an error.  */
3535 /* We use char because int might match the return type of a gcc2
3536     builtin and then its argument prototype would still apply.  */
3537 char dlopen();
3538
3539 int main() {
3540 dlopen()
3541 ; return 0; }
3542 EOF
3543 if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3544   rm -rf conftest*
3545   eval "ac_cv_lib_$ac_lib_var=yes"
3546 else
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   eval "ac_cv_lib_$ac_lib_var=no"
3551 fi
3552 rm -f conftest*
3553 LIBS="$ac_save_LIBS"
3554
3555 fi
3556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3557   echo "$ac_t""yes" 1>&6
3558   LIBS="$LIBS -ldl";
3559         cat >> confdefs.h <<\EOF
3560 #define HAVE_LIBDL 1
3561 EOF
3562
3563 else
3564   echo "$ac_t""no" 1>&6
3565 fi
3566
3567
3568 ############################################
3569 # check if the compiler can do immediate structures
3570 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3571 echo "configure:3572: checking for immediate structures" >&5
3572 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3573   echo $ac_n "(cached) $ac_c" 1>&6
3574 else
3575   
3576     cat > conftest.$ac_ext <<EOF
3577 #line 3578 "configure"
3578 #include "confdefs.h"
3579
3580 #include <stdio.h>
3581 int main() {
3582
3583    #define X_FOOBAR(x) ((FOOBAR) { x })
3584    typedef struct {unsigned x;} FOOBAR;
3585    FOOBAR f = X_FOOBAR(1);   
3586
3587 ; return 0; }
3588 EOF
3589 if { (eval echo configure:3590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3590   rm -rf conftest*
3591   samba_cv_immediate_structures=yes
3592 else
3593   echo "configure: failed program was:" >&5
3594   cat conftest.$ac_ext >&5
3595   rm -rf conftest*
3596   samba_cv_immediate_structures=no
3597 fi
3598 rm -f conftest*
3599 fi
3600
3601 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3602 if test x"$samba_cv_immediate_structures" = x"yes"; then
3603    cat >> confdefs.h <<\EOF
3604 #define HAVE_IMMEDIATE_STRUCTURES 1
3605 EOF
3606
3607 fi
3608
3609 ############################################
3610 # check for unix domain sockets
3611 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3612 echo "configure:3613: checking for unix domain sockets" >&5
3613 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3614   echo $ac_n "(cached) $ac_c" 1>&6
3615 else
3616   
3617     cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620
3621 #include <sys/types.h>
3622 #include <stdlib.h>
3623 #include <stddef.h>
3624 #include <sys/socket.h>
3625 #include <sys/un.h>
3626 int main() {
3627
3628   struct sockaddr_un sunaddr; 
3629   sunaddr.sun_family = AF_UNIX;
3630
3631 ; return 0; }
3632 EOF
3633 if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3634   rm -rf conftest*
3635   samba_cv_unixsocket=yes
3636 else
3637   echo "configure: failed program was:" >&5
3638   cat conftest.$ac_ext >&5
3639   rm -rf conftest*
3640   samba_cv_unixsocket=no
3641 fi
3642 rm -f conftest*
3643 fi
3644
3645 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3646 if test x"$samba_cv_unixsocket" = x"yes"; then
3647    cat >> confdefs.h <<\EOF
3648 #define HAVE_UNIXSOCKET 1
3649 EOF
3650
3651 fi
3652
3653
3654 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3655 echo "configure:3656: checking for socklen_t type" >&5
3656 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3657   echo $ac_n "(cached) $ac_c" 1>&6
3658 else
3659   
3660     cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663
3664 #include <sys/types.h>
3665 #if STDC_HEADERS
3666 #include <stdlib.h>
3667 #include <stddef.h>
3668 #endif
3669 #include <sys/socket.h>
3670 int main() {
3671 socklen_t i = 0
3672 ; return 0; }
3673 EOF
3674 if { (eval echo configure:3675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3675   rm -rf conftest*
3676   samba_cv_socklen_t=yes
3677 else
3678   echo "configure: failed program was:" >&5
3679   cat conftest.$ac_ext >&5
3680   rm -rf conftest*
3681   samba_cv_socklen_t=no
3682 fi
3683 rm -f conftest*
3684 fi
3685
3686 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3687 if test x"$samba_cv_socklen_t" = x"yes"; then
3688    cat >> confdefs.h <<\EOF
3689 #define HAVE_SOCKLEN_T_TYPE 1
3690 EOF
3691
3692 fi
3693
3694 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3695 echo "configure:3696: checking for sig_atomic_t type" >&5
3696 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3697   echo $ac_n "(cached) $ac_c" 1>&6
3698 else
3699   
3700     cat > conftest.$ac_ext <<EOF
3701 #line 3702 "configure"
3702 #include "confdefs.h"
3703
3704 #include <sys/types.h>
3705 #if STDC_HEADERS
3706 #include <stdlib.h>
3707 #include <stddef.h>
3708 #endif
3709 #include <signal.h>
3710 int main() {
3711 sig_atomic_t i = 0
3712 ; return 0; }
3713 EOF
3714 if { (eval echo configure:3715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3715   rm -rf conftest*
3716   samba_cv_sig_atomic_t=yes
3717 else
3718   echo "configure: failed program was:" >&5
3719   cat conftest.$ac_ext >&5
3720   rm -rf conftest*
3721   samba_cv_sig_atomic_t=no
3722 fi
3723 rm -f conftest*
3724 fi
3725
3726 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3727 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3728    cat >> confdefs.h <<\EOF
3729 #define HAVE_SIG_ATOMIC_T_TYPE 1
3730 EOF
3731
3732 fi
3733
3734 # stupid headers have the functions but no declaration. grrrr.
3735
3736  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3737 echo "configure:3738: checking for errno declaration" >&5
3738 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   
3742     cat > conftest.$ac_ext <<EOF
3743 #line 3744 "configure"
3744 #include "confdefs.h"
3745 #include <errno.h>
3746 int main() {
3747 int i = (int)errno
3748 ; return 0; }
3749 EOF
3750 if { (eval echo configure:3751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3751   rm -rf conftest*
3752   ac_cv_have_errno_decl=yes
3753 else
3754   echo "configure: failed program was:" >&5
3755   cat conftest.$ac_ext >&5
3756   rm -rf conftest*
3757   ac_cv_have_errno_decl=no
3758 fi
3759 rm -f conftest*
3760 fi
3761
3762 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3763  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3764     cat >> confdefs.h <<\EOF
3765 #define HAVE_ERRNO_DECL 1
3766 EOF
3767
3768  fi
3769
3770
3771  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3772 echo "configure:3773: checking for setresuid declaration" >&5
3773 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3774   echo $ac_n "(cached) $ac_c" 1>&6
3775 else
3776   
3777     cat > conftest.$ac_ext <<EOF
3778 #line 3779 "configure"
3779 #include "confdefs.h"
3780 #include <unistd.h>
3781 int main() {
3782 int i = (int)setresuid
3783 ; return 0; }
3784 EOF
3785 if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3786   rm -rf conftest*
3787   ac_cv_have_setresuid_decl=yes
3788 else
3789   echo "configure: failed program was:" >&5
3790   cat conftest.$ac_ext >&5
3791   rm -rf conftest*
3792   ac_cv_have_setresuid_decl=no
3793 fi
3794 rm -f conftest*
3795 fi
3796
3797 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3798  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3799     cat >> confdefs.h <<\EOF
3800 #define HAVE_SETRESUID_DECL 1
3801 EOF
3802
3803  fi
3804
3805
3806  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3807 echo "configure:3808: checking for setresgid declaration" >&5
3808 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3809   echo $ac_n "(cached) $ac_c" 1>&6
3810 else
3811   
3812     cat > conftest.$ac_ext <<EOF
3813 #line 3814 "configure"
3814 #include "confdefs.h"
3815 #include <unistd.h>
3816 int main() {
3817 int i = (int)setresgid
3818 ; return 0; }
3819 EOF
3820 if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3821   rm -rf conftest*
3822   ac_cv_have_setresgid_decl=yes
3823 else
3824   echo "configure: failed program was:" >&5
3825   cat conftest.$ac_ext >&5
3826   rm -rf conftest*
3827   ac_cv_have_setresgid_decl=no
3828 fi
3829 rm -f conftest*
3830 fi
3831
3832 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3833  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3834     cat >> confdefs.h <<\EOF
3835 #define HAVE_SETRESGID_DECL 1
3836 EOF
3837
3838  fi
3839
3840
3841  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3842 echo "configure:3843: checking for asprintf declaration" >&5
3843 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3844   echo $ac_n "(cached) $ac_c" 1>&6
3845 else
3846   
3847     cat > conftest.$ac_ext <<EOF
3848 #line 3849 "configure"
3849 #include "confdefs.h"
3850 #include <stdio.h>
3851 int main() {
3852 int i = (int)asprintf
3853 ; return 0; }
3854 EOF
3855 if { (eval echo configure:3856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3856   rm -rf conftest*
3857   ac_cv_have_asprintf_decl=yes
3858 else
3859   echo "configure: failed program was:" >&5
3860   cat conftest.$ac_ext >&5
3861   rm -rf conftest*
3862   ac_cv_have_asprintf_decl=no
3863 fi
3864 rm -f conftest*
3865 fi
3866
3867 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3868  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3869     cat >> confdefs.h <<\EOF
3870 #define HAVE_ASPRINTF_DECL 1
3871 EOF
3872
3873  fi
3874
3875
3876  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3877 echo "configure:3878: checking for vasprintf declaration" >&5
3878 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3879   echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881   
3882     cat > conftest.$ac_ext <<EOF
3883 #line 3884 "configure"
3884 #include "confdefs.h"
3885 #include <stdio.h>
3886 int main() {
3887 int i = (int)vasprintf
3888 ; return 0; }
3889 EOF
3890 if { (eval echo configure:3891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3891   rm -rf conftest*
3892   ac_cv_have_vasprintf_decl=yes
3893 else
3894   echo "configure: failed program was:" >&5
3895   cat conftest.$ac_ext >&5
3896   rm -rf conftest*
3897   ac_cv_have_vasprintf_decl=no
3898 fi
3899 rm -f conftest*
3900 fi
3901
3902 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3903  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3904     cat >> confdefs.h <<\EOF
3905 #define HAVE_VASPRINTF_DECL 1
3906 EOF
3907
3908  fi
3909
3910
3911  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3912 echo "configure:3913: checking for vsnprintf declaration" >&5
3913 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3914   echo $ac_n "(cached) $ac_c" 1>&6
3915 else
3916   
3917     cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 #include <stdio.h>
3921 int main() {
3922 int i = (int)vsnprintf
3923 ; return 0; }
3924 EOF
3925 if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3926   rm -rf conftest*
3927   ac_cv_have_vsnprintf_decl=yes
3928 else
3929   echo "configure: failed program was:" >&5
3930   cat conftest.$ac_ext >&5
3931   rm -rf conftest*
3932   ac_cv_have_vsnprintf_decl=no
3933 fi
3934 rm -f conftest*
3935 fi
3936
3937 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3938  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3939     cat >> confdefs.h <<\EOF
3940 #define HAVE_VSNPRINTF_DECL 1
3941 EOF
3942
3943  fi
3944
3945
3946  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3947 echo "configure:3948: checking for snprintf declaration" >&5
3948 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   
3952     cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955 #include <stdio.h>
3956 int main() {
3957 int i = (int)snprintf
3958 ; return 0; }
3959 EOF
3960 if { (eval echo configure:3961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3961   rm -rf conftest*
3962   ac_cv_have_snprintf_decl=yes
3963 else
3964   echo "configure: failed program was:" >&5
3965   cat conftest.$ac_ext >&5
3966   rm -rf conftest*
3967   ac_cv_have_snprintf_decl=no
3968 fi
3969 rm -f conftest*
3970 fi
3971
3972 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3973  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3974     cat >> confdefs.h <<\EOF
3975 #define HAVE_SNPRINTF_DECL 1
3976 EOF
3977
3978  fi
3979
3980
3981 # and glibc has setresuid under linux but the function does
3982 # nothing until kernel 2.1.44! very dumb.
3983 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3984 echo "configure:3985: checking for real setresuid" >&5
3985 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3986   echo $ac_n "(cached) $ac_c" 1>&6
3987 else
3988   
3989     if test "$cross_compiling" = yes; then
3990   samba_cv_have_setresuid=cross
3991 else
3992   cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 #include <errno.h>
3996 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3997 EOF
3998 if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3999 then
4000   samba_cv_have_setresuid=yes
4001 else
4002   echo "configure: failed program was:" >&5
4003   cat conftest.$ac_ext >&5
4004   rm -fr conftest*
4005   samba_cv_have_setresuid=no
4006 fi
4007 rm -fr conftest*
4008 fi
4009
4010 fi
4011
4012 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4013 if test x"$samba_cv_have_setresuid" = x"yes"; then
4014     cat >> confdefs.h <<\EOF
4015 #define HAVE_SETRESUID 1
4016 EOF
4017
4018 fi
4019
4020 # Do the same check for setresguid...
4021 #
4022 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4023 echo "configure:4024: checking for real setresgid" >&5
4024 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4025   echo $ac_n "(cached) $ac_c" 1>&6
4026 else
4027   
4028     if test "$cross_compiling" = yes; then
4029   samba_cv_have_setresgid=cross
4030 else
4031   cat > conftest.$ac_ext <<EOF
4032 #line 4033 "configure"
4033 #include "confdefs.h"
4034 #include <unistd.h>
4035 #include <errno.h>
4036 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4037 EOF
4038 if { (eval echo configure:4039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4039 then
4040   samba_cv_have_setresgid=yes
4041 else
4042   echo "configure: failed program was:" >&5
4043   cat conftest.$ac_ext >&5
4044   rm -fr conftest*
4045   samba_cv_have_setresgid=no
4046 fi
4047 rm -fr conftest*
4048 fi
4049
4050 fi
4051
4052 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4053 if test x"$samba_cv_have_setresgid" = x"yes"; then
4054     cat >> confdefs.h <<\EOF
4055 #define HAVE_SETRESGID 1
4056 EOF
4057
4058 fi
4059
4060 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4061 echo "configure:4062: checking for 8-bit clean memcmp" >&5
4062 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4063   echo $ac_n "(cached) $ac_c" 1>&6
4064 else
4065   if test "$cross_compiling" = yes; then
4066   ac_cv_func_memcmp_clean=no
4067 else
4068   cat > conftest.$ac_ext <<EOF
4069 #line 4070 "configure"
4070 #include "confdefs.h"
4071
4072 main()
4073 {
4074   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4075   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4076 }
4077
4078 EOF
4079 if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4080 then
4081   ac_cv_func_memcmp_clean=yes
4082 else
4083   echo "configure: failed program was:" >&5
4084   cat conftest.$ac_ext >&5
4085   rm -fr conftest*
4086   ac_cv_func_memcmp_clean=no
4087 fi
4088 rm -fr conftest*
4089 fi
4090
4091 fi
4092
4093 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4094 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4095
4096
4097 ###############################################
4098 # test for where we get crypt() from
4099 for ac_func in crypt
4100 do
4101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4102 echo "configure:4103: checking for $ac_func" >&5
4103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4104   echo $ac_n "(cached) $ac_c" 1>&6
4105 else
4106   cat > conftest.$ac_ext <<EOF
4107 #line 4108 "configure"
4108 #include "confdefs.h"
4109 /* System header to define __stub macros and hopefully few prototypes,
4110     which can conflict with char $ac_func(); below.  */
4111 #include <assert.h>
4112 /* Override any gcc2 internal prototype to avoid an error.  */
4113 /* We use char because int might match the return type of a gcc2
4114     builtin and then its argument prototype would still apply.  */
4115 char $ac_func();
4116
4117 int main() {
4118
4119 /* The GNU C library defines this for functions which it implements
4120     to always fail with ENOSYS.  Some functions are actually named
4121     something starting with __ and the normal name is an alias.  */
4122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4123 choke me
4124 #else
4125 $ac_func();
4126 #endif
4127
4128 ; return 0; }
4129 EOF
4130 if { (eval echo configure:4131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4131   rm -rf conftest*
4132   eval "ac_cv_func_$ac_func=yes"
4133 else
4134   echo "configure: failed program was:" >&5
4135   cat conftest.$ac_ext >&5
4136   rm -rf conftest*
4137   eval "ac_cv_func_$ac_func=no"
4138 fi
4139 rm -f conftest*
4140 fi
4141
4142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4143   echo "$ac_t""yes" 1>&6
4144     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4145   cat >> confdefs.h <<EOF
4146 #define $ac_tr_func 1
4147 EOF
4148  
4149 else
4150   echo "$ac_t""no" 1>&6
4151 fi
4152 done
4153
4154 if test x"$ac_cv_func_crypt" = x"no"; then
4155     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4156 echo "configure:4157: checking for crypt in -lcrypt" >&5
4157 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4158 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4159   echo $ac_n "(cached) $ac_c" 1>&6
4160 else
4161   ac_save_LIBS="$LIBS"
4162 LIBS="-lcrypt  $LIBS"
4163 cat > conftest.$ac_ext <<EOF
4164 #line 4165 "configure"
4165 #include "confdefs.h"
4166 /* Override any gcc2 internal prototype to avoid an error.  */
4167 /* We use char because int might match the return type of a gcc2
4168     builtin and then its argument prototype would still apply.  */
4169 char crypt();
4170
4171 int main() {
4172 crypt()
4173 ; return 0; }
4174 EOF
4175 if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4176   rm -rf conftest*
4177   eval "ac_cv_lib_$ac_lib_var=yes"
4178 else
4179   echo "configure: failed program was:" >&5
4180   cat conftest.$ac_ext >&5
4181   rm -rf conftest*
4182   eval "ac_cv_lib_$ac_lib_var=no"
4183 fi
4184 rm -f conftest*
4185 LIBS="$ac_save_LIBS"
4186
4187 fi
4188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4189   echo "$ac_t""yes" 1>&6
4190   LIBS="$LIBS -lcrypt";
4191         cat >> confdefs.h <<\EOF
4192 #define HAVE_CRYPT 1
4193 EOF
4194
4195 else
4196   echo "$ac_t""no" 1>&6
4197 fi
4198
4199 fi
4200
4201
4202 ###############################################
4203 # Readline included by default unless explicitly asked not to
4204 test "${with_readline+set}" != "set" && with_readline=yes
4205
4206 # test for where we get readline() from
4207 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4208 echo "configure:4209: checking whether to use readline" >&5
4209 # Check whether --with-readline or --without-readline was given.
4210 if test "${with_readline+set}" = set; then
4211   withval="$with_readline"
4212     case "$with_readline" in
4213   yes)
4214     echo "$ac_t""yes" 1>&6
4215
4216     for ac_hdr in readline.h history.h readline/readline.h
4217 do
4218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4220 echo "configure:4221: checking for $ac_hdr" >&5
4221 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <$ac_hdr>
4228 EOF
4229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4230 { (eval echo configure:4231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4232 if test -z "$ac_err"; then
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=yes"
4235 else
4236   echo "$ac_err" >&5
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   eval "ac_cv_header_$ac_safe=no"
4241 fi
4242 rm -f conftest*
4243 fi
4244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4245   echo "$ac_t""yes" 1>&6
4246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4247   cat >> confdefs.h <<EOF
4248 #define $ac_tr_hdr 1
4249 EOF
4250  
4251 else
4252   echo "$ac_t""no" 1>&6
4253 fi
4254 done
4255
4256     for ac_hdr in readline/history.h
4257 do
4258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4260 echo "configure:4261: checking for $ac_hdr" >&5
4261 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4262   echo $ac_n "(cached) $ac_c" 1>&6
4263 else
4264   cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 #include <$ac_hdr>
4268 EOF
4269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4270 { (eval echo configure:4271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4272 if test -z "$ac_err"; then
4273   rm -rf conftest*
4274   eval "ac_cv_header_$ac_safe=yes"
4275 else
4276   echo "$ac_err" >&5
4277   echo "configure: failed program was:" >&5
4278   cat conftest.$ac_ext >&5
4279   rm -rf conftest*
4280   eval "ac_cv_header_$ac_safe=no"
4281 fi
4282 rm -f conftest*
4283 fi
4284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4285   echo "$ac_t""yes" 1>&6
4286     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4287   cat >> confdefs.h <<EOF
4288 #define $ac_tr_hdr 1
4289 EOF
4290  
4291 else
4292   echo "$ac_t""no" 1>&6
4293 fi
4294 done
4295
4296
4297     for ac_hdr in readline.h readline/readline.h
4298 do
4299 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4300 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4301 echo "configure:4302: checking for $ac_hdr" >&5
4302 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4303   echo $ac_n "(cached) $ac_c" 1>&6
4304 else
4305   cat > conftest.$ac_ext <<EOF
4306 #line 4307 "configure"
4307 #include "confdefs.h"
4308 #include <$ac_hdr>
4309 EOF
4310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4311 { (eval echo configure:4312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4313 if test -z "$ac_err"; then
4314   rm -rf conftest*
4315   eval "ac_cv_header_$ac_safe=yes"
4316 else
4317   echo "$ac_err" >&5
4318   echo "configure: failed program was:" >&5
4319   cat conftest.$ac_ext >&5
4320   rm -rf conftest*
4321   eval "ac_cv_header_$ac_safe=no"
4322 fi
4323 rm -f conftest*
4324 fi
4325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4326   echo "$ac_t""yes" 1>&6
4327     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4328   cat >> confdefs.h <<EOF
4329 #define $ac_tr_hdr 1
4330 EOF
4331  
4332       for termlib in ncurses curses termcap terminfo termlib; do
4333        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4334 echo "configure:4335: checking for tgetent in -l${termlib}" >&5
4335 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4337   echo $ac_n "(cached) $ac_c" 1>&6
4338 else
4339   ac_save_LIBS="$LIBS"
4340 LIBS="-l${termlib}  $LIBS"
4341 cat > conftest.$ac_ext <<EOF
4342 #line 4343 "configure"
4343 #include "confdefs.h"
4344 /* Override any gcc2 internal prototype to avoid an error.  */
4345 /* We use char because int might match the return type of a gcc2
4346     builtin and then its argument prototype would still apply.  */
4347 char tgetent();
4348
4349 int main() {
4350 tgetent()
4351 ; return 0; }
4352 EOF
4353 if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4354   rm -rf conftest*
4355   eval "ac_cv_lib_$ac_lib_var=yes"
4356 else
4357   echo "configure: failed program was:" >&5
4358   cat conftest.$ac_ext >&5
4359   rm -rf conftest*
4360   eval "ac_cv_lib_$ac_lib_var=no"
4361 fi
4362 rm -f conftest*
4363 LIBS="$ac_save_LIBS"
4364
4365 fi
4366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4367   echo "$ac_t""yes" 1>&6
4368   TERMLIBS="-l${termlib}"; break
4369 else
4370   echo "$ac_t""no" 1>&6
4371 fi
4372
4373       done
4374       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4375 echo "configure:4376: checking for rl_callback_handler_install in -lreadline" >&5
4376 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4377 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4378   echo $ac_n "(cached) $ac_c" 1>&6
4379 else
4380   ac_save_LIBS="$LIBS"
4381 LIBS="-lreadline $TERMLIBS $LIBS"
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 /* Override any gcc2 internal prototype to avoid an error.  */
4386 /* We use char because int might match the return type of a gcc2
4387     builtin and then its argument prototype would still apply.  */
4388 char rl_callback_handler_install();
4389
4390 int main() {
4391 rl_callback_handler_install()
4392 ; return 0; }
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4395   rm -rf conftest*
4396   eval "ac_cv_lib_$ac_lib_var=yes"
4397 else
4398   echo "configure: failed program was:" >&5
4399   cat conftest.$ac_ext >&5
4400   rm -rf conftest*
4401   eval "ac_cv_lib_$ac_lib_var=no"
4402 fi
4403 rm -f conftest*
4404 LIBS="$ac_save_LIBS"
4405
4406 fi
4407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4408   echo "$ac_t""yes" 1>&6
4409   TERMLIBS="-lreadline $TERMLIBS"
4410        cat >> confdefs.h <<\EOF
4411 #define HAVE_LIBREADLINE 1
4412 EOF
4413
4414        break
4415 else
4416   echo "$ac_t""no" 1>&6
4417 TERMLIBS=
4418 fi
4419
4420 else
4421   echo "$ac_t""no" 1>&6
4422 fi
4423 done
4424
4425     ;;
4426   no)
4427     echo "$ac_t""no" 1>&6
4428     ;;
4429   *)
4430     echo "$ac_t""yes" 1>&6
4431
4432     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4433     # alternate readline path
4434     _ldflags=${LDFLAGS}
4435     _cppflags=${CPPFLAGS}
4436
4437     # Add additional search path
4438     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4439     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4440
4441     for ac_hdr in readline.h history.h readline/readline.h
4442 do
4443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4445 echo "configure:4446: checking for $ac_hdr" >&5
4446 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   cat > conftest.$ac_ext <<EOF
4450 #line 4451 "configure"
4451 #include "confdefs.h"
4452 #include <$ac_hdr>
4453 EOF
4454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4455 { (eval echo configure:4456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4457 if test -z "$ac_err"; then
4458   rm -rf conftest*
4459   eval "ac_cv_header_$ac_safe=yes"
4460 else
4461   echo "$ac_err" >&5
4462   echo "configure: failed program was:" >&5
4463   cat conftest.$ac_ext >&5
4464   rm -rf conftest*
4465   eval "ac_cv_header_$ac_safe=no"
4466 fi
4467 rm -f conftest*
4468 fi
4469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4470   echo "$ac_t""yes" 1>&6
4471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4472   cat >> confdefs.h <<EOF
4473 #define $ac_tr_hdr 1
4474 EOF
4475  
4476 else
4477   echo "$ac_t""no" 1>&6
4478 fi
4479 done
4480
4481     for ac_hdr in readline/history.h
4482 do
4483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4485 echo "configure:4486: checking for $ac_hdr" >&5
4486 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4487   echo $ac_n "(cached) $ac_c" 1>&6
4488 else
4489   cat > conftest.$ac_ext <<EOF
4490 #line 4491 "configure"
4491 #include "confdefs.h"
4492 #include <$ac_hdr>
4493 EOF
4494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4495 { (eval echo configure:4496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4497 if test -z "$ac_err"; then
4498   rm -rf conftest*
4499   eval "ac_cv_header_$ac_safe=yes"
4500 else
4501   echo "$ac_err" >&5
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   eval "ac_cv_header_$ac_safe=no"
4506 fi
4507 rm -f conftest*
4508 fi
4509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4510   echo "$ac_t""yes" 1>&6
4511     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4512   cat >> confdefs.h <<EOF
4513 #define $ac_tr_hdr 1
4514 EOF
4515  
4516 else
4517   echo "$ac_t""no" 1>&6
4518 fi
4519 done
4520
4521
4522     for ac_hdr in readline.h readline/readline.h
4523 do
4524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_hdr" >&5
4527 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   cat > conftest.$ac_ext <<EOF
4531 #line 4532 "configure"
4532 #include "confdefs.h"
4533 #include <$ac_hdr>
4534 EOF
4535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4536 { (eval echo configure:4537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4538 if test -z "$ac_err"; then
4539   rm -rf conftest*
4540   eval "ac_cv_header_$ac_safe=yes"
4541 else
4542   echo "$ac_err" >&5
4543   echo "configure: failed program was:" >&5
4544   cat conftest.$ac_ext >&5
4545   rm -rf conftest*
4546   eval "ac_cv_header_$ac_safe=no"
4547 fi
4548 rm -f conftest*
4549 fi
4550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4551   echo "$ac_t""yes" 1>&6
4552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4553   cat >> confdefs.h <<EOF
4554 #define $ac_tr_hdr 1
4555 EOF
4556  
4557       for termlib in ncurses curses termcap terminfo termlib; do
4558        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4559 echo "configure:4560: checking for tgetent in -l${termlib}" >&5
4560 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4561 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   ac_save_LIBS="$LIBS"
4565 LIBS="-l${termlib}  $LIBS"
4566 cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 /* Override any gcc2 internal prototype to avoid an error.  */
4570 /* We use char because int might match the return type of a gcc2
4571     builtin and then its argument prototype would still apply.  */
4572 char tgetent();
4573
4574 int main() {
4575 tgetent()
4576 ; return 0; }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4579   rm -rf conftest*
4580   eval "ac_cv_lib_$ac_lib_var=yes"
4581 else
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -rf conftest*
4585   eval "ac_cv_lib_$ac_lib_var=no"
4586 fi
4587 rm -f conftest*
4588 LIBS="$ac_save_LIBS"
4589
4590 fi
4591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4592   echo "$ac_t""yes" 1>&6
4593   TERMLIBS="-l${termlib}"; break
4594 else
4595   echo "$ac_t""no" 1>&6
4596 fi
4597
4598       done
4599       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4600 echo "configure:4601: checking for rl_callback_handler_install in -lreadline" >&5
4601 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   ac_save_LIBS="$LIBS"
4606 LIBS="-lreadline $TERMLIBS $LIBS"
4607 cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610 /* Override any gcc2 internal prototype to avoid an error.  */
4611 /* We use char because int might match the return type of a gcc2
4612     builtin and then its argument prototype would still apply.  */
4613 char rl_callback_handler_install();
4614
4615 int main() {
4616 rl_callback_handler_install()
4617 ; return 0; }
4618 EOF
4619 if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4620   rm -rf conftest*
4621   eval "ac_cv_lib_$ac_lib_var=yes"
4622 else
4623   echo "configure: failed program was:" >&5
4624   cat conftest.$ac_ext >&5
4625   rm -rf conftest*
4626   eval "ac_cv_lib_$ac_lib_var=no"
4627 fi
4628 rm -f conftest*
4629 LIBS="$ac_save_LIBS"
4630
4631 fi
4632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4633   echo "$ac_t""yes" 1>&6
4634   TERMLDFLAGS="-L$with_readline/lib"
4635        TERMCPPFLAGS="-I$with_readline/include"
4636        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4637        TERMLIBS="-lreadline $TERMLIBS"
4638        cat >> confdefs.h <<\EOF
4639 #define HAVE_LIBREADLINE 1
4640 EOF
4641
4642        break
4643 else
4644   echo "$ac_t""no" 1>&6
4645 TERMLIBS= CPPFLAGS=$_cppflags
4646 fi
4647
4648 else
4649   echo "$ac_t""no" 1>&6
4650 fi
4651 done
4652
4653
4654     LDFLAGS=$_ldflags
4655     ;;
4656   esac
4657 else
4658   echo "$ac_t""no" 1>&6
4659
4660 fi
4661
4662
4663
4664
4665 # The readline API changed slightly from readline3 to readline4, so
4666 # code will generate warnings on one of them unless we have a few
4667 # special cases.
4668 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4669 echo "configure:4670: checking for rl_completion_matches in -lreadline" >&5
4670 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4671 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   ac_save_LIBS="$LIBS"
4675 LIBS="-lreadline $TERMLIBS $LIBS"
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 /* Override any gcc2 internal prototype to avoid an error.  */
4680 /* We use char because int might match the return type of a gcc2
4681     builtin and then its argument prototype would still apply.  */
4682 char rl_completion_matches();
4683
4684 int main() {
4685 rl_completion_matches()
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689   rm -rf conftest*
4690   eval "ac_cv_lib_$ac_lib_var=yes"
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -rf conftest*
4695   eval "ac_cv_lib_$ac_lib_var=no"
4696 fi
4697 rm -f conftest*
4698 LIBS="$ac_save_LIBS"
4699
4700 fi
4701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4702   echo "$ac_t""yes" 1>&6
4703   cat >> confdefs.h <<\EOF
4704 #define HAVE_NEW_LIBREADLINE 1
4705 EOF
4706
4707 else
4708   echo "$ac_t""no" 1>&6
4709 fi
4710
4711
4712 # The following test taken from the cvs sources
4713 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4714 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4715 # libsocket.so which has a bad implementation of gethostbyname (it
4716 # only looks in /etc/hosts), so we only look for -lsocket if we need
4717 # it.
4718 for ac_func in connect
4719 do
4720 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4721 echo "configure:4722: checking for $ac_func" >&5
4722 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4723   echo $ac_n "(cached) $ac_c" 1>&6
4724 else
4725   cat > conftest.$ac_ext <<EOF
4726 #line 4727 "configure"
4727 #include "confdefs.h"
4728 /* System header to define __stub macros and hopefully few prototypes,
4729     which can conflict with char $ac_func(); below.  */
4730 #include <assert.h>
4731 /* Override any gcc2 internal prototype to avoid an error.  */
4732 /* We use char because int might match the return type of a gcc2
4733     builtin and then its argument prototype would still apply.  */
4734 char $ac_func();
4735
4736 int main() {
4737
4738 /* The GNU C library defines this for functions which it implements
4739     to always fail with ENOSYS.  Some functions are actually named
4740     something starting with __ and the normal name is an alias.  */
4741 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4742 choke me
4743 #else
4744 $ac_func();
4745 #endif
4746
4747 ; return 0; }
4748 EOF
4749 if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4750   rm -rf conftest*
4751   eval "ac_cv_func_$ac_func=yes"
4752 else
4753   echo "configure: failed program was:" >&5
4754   cat conftest.$ac_ext >&5
4755   rm -rf conftest*
4756   eval "ac_cv_func_$ac_func=no"
4757 fi
4758 rm -f conftest*
4759 fi
4760
4761 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4762   echo "$ac_t""yes" 1>&6
4763     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4764   cat >> confdefs.h <<EOF
4765 #define $ac_tr_func 1
4766 EOF
4767  
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771 done
4772
4773 if test x"$ac_cv_func_connect" = x"no"; then
4774     case "$LIBS" in
4775     *-lnsl*) ;;
4776     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4777 echo "configure:4778: checking for printf in -lnsl_s" >&5
4778 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   ac_save_LIBS="$LIBS"
4783 LIBS="-lnsl_s  $LIBS"
4784 cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787 /* Override any gcc2 internal prototype to avoid an error.  */
4788 /* We use char because int might match the return type of a gcc2
4789     builtin and then its argument prototype would still apply.  */
4790 char printf();
4791
4792 int main() {
4793 printf()
4794 ; return 0; }
4795 EOF
4796 if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4797   rm -rf conftest*
4798   eval "ac_cv_lib_$ac_lib_var=yes"
4799 else
4800   echo "configure: failed program was:" >&5
4801   cat conftest.$ac_ext >&5
4802   rm -rf conftest*
4803   eval "ac_cv_lib_$ac_lib_var=no"
4804 fi
4805 rm -f conftest*
4806 LIBS="$ac_save_LIBS"
4807
4808 fi
4809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4810   echo "$ac_t""yes" 1>&6
4811     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4812     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4813   cat >> confdefs.h <<EOF
4814 #define $ac_tr_lib 1
4815 EOF
4816
4817   LIBS="-lnsl_s $LIBS"
4818
4819 else
4820   echo "$ac_t""no" 1>&6
4821 fi
4822  ;;
4823     esac
4824     case "$LIBS" in
4825     *-lnsl*) ;;
4826     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4827 echo "configure:4828: checking for printf in -lnsl" >&5
4828 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4829 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4830   echo $ac_n "(cached) $ac_c" 1>&6
4831 else
4832   ac_save_LIBS="$LIBS"
4833 LIBS="-lnsl  $LIBS"
4834 cat > conftest.$ac_ext <<EOF
4835 #line 4836 "configure"
4836 #include "confdefs.h"
4837 /* Override any gcc2 internal prototype to avoid an error.  */
4838 /* We use char because int might match the return type of a gcc2
4839     builtin and then its argument prototype would still apply.  */
4840 char printf();
4841
4842 int main() {
4843 printf()
4844 ; return 0; }
4845 EOF
4846 if { (eval echo configure:4847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4847   rm -rf conftest*
4848   eval "ac_cv_lib_$ac_lib_var=yes"
4849 else
4850   echo "configure: failed program was:" >&5
4851   cat conftest.$ac_ext >&5
4852   rm -rf conftest*
4853   eval "ac_cv_lib_$ac_lib_var=no"
4854 fi
4855 rm -f conftest*
4856 LIBS="$ac_save_LIBS"
4857
4858 fi
4859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4860   echo "$ac_t""yes" 1>&6
4861     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4862     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4863   cat >> confdefs.h <<EOF
4864 #define $ac_tr_lib 1
4865 EOF
4866
4867   LIBS="-lnsl $LIBS"
4868
4869 else
4870   echo "$ac_t""no" 1>&6
4871 fi
4872  ;;
4873     esac
4874     case "$LIBS" in
4875     *-lsocket*) ;;
4876     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4877 echo "configure:4878: checking for connect in -lsocket" >&5
4878 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4880   echo $ac_n "(cached) $ac_c" 1>&6
4881 else
4882   ac_save_LIBS="$LIBS"
4883 LIBS="-lsocket  $LIBS"
4884 cat > conftest.$ac_ext <<EOF
4885 #line 4886 "configure"
4886 #include "confdefs.h"
4887 /* Override any gcc2 internal prototype to avoid an error.  */
4888 /* We use char because int might match the return type of a gcc2
4889     builtin and then its argument prototype would still apply.  */
4890 char connect();
4891
4892 int main() {
4893 connect()
4894 ; return 0; }
4895 EOF
4896 if { (eval echo configure:4897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4897   rm -rf conftest*
4898   eval "ac_cv_lib_$ac_lib_var=yes"
4899 else
4900   echo "configure: failed program was:" >&5
4901   cat conftest.$ac_ext >&5
4902   rm -rf conftest*
4903   eval "ac_cv_lib_$ac_lib_var=no"
4904 fi
4905 rm -f conftest*
4906 LIBS="$ac_save_LIBS"
4907
4908 fi
4909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4910   echo "$ac_t""yes" 1>&6
4911     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4912     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4913   cat >> confdefs.h <<EOF
4914 #define $ac_tr_lib 1
4915 EOF
4916
4917   LIBS="-lsocket $LIBS"
4918
4919 else
4920   echo "$ac_t""no" 1>&6
4921 fi
4922  ;;
4923     esac
4924     case "$LIBS" in
4925     *-linet*) ;;
4926     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4927 echo "configure:4928: checking for connect in -linet" >&5
4928 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4929 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4930   echo $ac_n "(cached) $ac_c" 1>&6
4931 else
4932   ac_save_LIBS="$LIBS"
4933 LIBS="-linet  $LIBS"
4934 cat > conftest.$ac_ext <<EOF
4935 #line 4936 "configure"
4936 #include "confdefs.h"
4937 /* Override any gcc2 internal prototype to avoid an error.  */
4938 /* We use char because int might match the return type of a gcc2
4939     builtin and then its argument prototype would still apply.  */
4940 char connect();
4941
4942 int main() {
4943 connect()
4944 ; return 0; }
4945 EOF
4946 if { (eval echo configure:4947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=yes"
4949 else
4950   echo "configure: failed program was:" >&5
4951   cat conftest.$ac_ext >&5
4952   rm -rf conftest*
4953   eval "ac_cv_lib_$ac_lib_var=no"
4954 fi
4955 rm -f conftest*
4956 LIBS="$ac_save_LIBS"
4957
4958 fi
4959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4960   echo "$ac_t""yes" 1>&6
4961     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4962     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4963   cat >> confdefs.h <<EOF
4964 #define $ac_tr_lib 1
4965 EOF
4966
4967   LIBS="-linet $LIBS"
4968
4969 else
4970   echo "$ac_t""no" 1>&6
4971 fi
4972  ;;
4973     esac
4974             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4975        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4976         # ac_cv_func_connect=yes
4977         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4978         cat >> confdefs.h <<\EOF
4979 #define HAVE_CONNECT 1
4980 EOF
4981
4982     fi
4983 fi
4984
4985 ###############################################
4986 # test for where we get get_yp_default_domain() from
4987 for ac_func in yp_get_default_domain
4988 do
4989 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4990 echo "configure:4991: checking for $ac_func" >&5
4991 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4992   echo $ac_n "(cached) $ac_c" 1>&6
4993 else
4994   cat > conftest.$ac_ext <<EOF
4995 #line 4996 "configure"
4996 #include "confdefs.h"
4997 /* System header to define __stub macros and hopefully few prototypes,
4998     which can conflict with char $ac_func(); below.  */
4999 #include <assert.h>
5000 /* Override any gcc2 internal prototype to avoid an error.  */
5001 /* We use char because int might match the return type of a gcc2
5002     builtin and then its argument prototype would still apply.  */
5003 char $ac_func();
5004
5005 int main() {
5006
5007 /* The GNU C library defines this for functions which it implements
5008     to always fail with ENOSYS.  Some functions are actually named
5009     something starting with __ and the normal name is an alias.  */
5010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5011 choke me
5012 #else
5013 $ac_func();
5014 #endif
5015
5016 ; return 0; }
5017 EOF
5018 if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5019   rm -rf conftest*
5020   eval "ac_cv_func_$ac_func=yes"
5021 else
5022   echo "configure: failed program was:" >&5
5023   cat conftest.$ac_ext >&5
5024   rm -rf conftest*
5025   eval "ac_cv_func_$ac_func=no"
5026 fi
5027 rm -f conftest*
5028 fi
5029
5030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5031   echo "$ac_t""yes" 1>&6
5032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5033   cat >> confdefs.h <<EOF
5034 #define $ac_tr_func 1
5035 EOF
5036  
5037 else
5038   echo "$ac_t""no" 1>&6
5039 fi
5040 done
5041
5042 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5043         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5044 echo "configure:5045: checking for yp_get_default_domain in -lnsl" >&5
5045 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5046 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5047   echo $ac_n "(cached) $ac_c" 1>&6
5048 else
5049   ac_save_LIBS="$LIBS"
5050 LIBS="-lnsl  $LIBS"
5051 cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054 /* Override any gcc2 internal prototype to avoid an error.  */
5055 /* We use char because int might match the return type of a gcc2
5056     builtin and then its argument prototype would still apply.  */
5057 char yp_get_default_domain();
5058
5059 int main() {
5060 yp_get_default_domain()
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=no"
5071 fi
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5074
5075 fi
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078   LIBS="$LIBS -lnsl";
5079         cat >> confdefs.h <<\EOF
5080 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5081 EOF
5082
5083 else
5084   echo "$ac_t""no" 1>&6
5085 fi
5086  
5087 fi
5088
5089 # Check if we have execl, if not we need to compile smbrun.
5090 for ac_func in execl
5091 do
5092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5093 echo "configure:5094: checking for $ac_func" >&5
5094 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5095   echo $ac_n "(cached) $ac_c" 1>&6
5096 else
5097   cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 /* System header to define __stub macros and hopefully few prototypes,
5101     which can conflict with char $ac_func(); below.  */
5102 #include <assert.h>
5103 /* Override any gcc2 internal prototype to avoid an error.  */
5104 /* We use char because int might match the return type of a gcc2
5105     builtin and then its argument prototype would still apply.  */
5106 char $ac_func();
5107
5108 int main() {
5109
5110 /* The GNU C library defines this for functions which it implements
5111     to always fail with ENOSYS.  Some functions are actually named
5112     something starting with __ and the normal name is an alias.  */
5113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5114 choke me
5115 #else
5116 $ac_func();
5117 #endif
5118
5119 ; return 0; }
5120 EOF
5121 if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5122   rm -rf conftest*
5123   eval "ac_cv_func_$ac_func=yes"
5124 else
5125   echo "configure: failed program was:" >&5
5126   cat conftest.$ac_ext >&5
5127   rm -rf conftest*
5128   eval "ac_cv_func_$ac_func=no"
5129 fi
5130 rm -f conftest*
5131 fi
5132
5133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5134   echo "$ac_t""yes" 1>&6
5135     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5136   cat >> confdefs.h <<EOF
5137 #define $ac_tr_func 1
5138 EOF
5139  
5140 else
5141   echo "$ac_t""no" 1>&6
5142 fi
5143 done
5144
5145 if test x"$ac_cv_func_execl" = x"no"; then
5146     RUNPROG="bin/smbrun"
5147 else
5148     RUNPROG=""
5149 fi
5150
5151 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5152 do
5153 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5154 echo "configure:5155: checking for $ac_func" >&5
5155 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5156   echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158   cat > conftest.$ac_ext <<EOF
5159 #line 5160 "configure"
5160 #include "confdefs.h"
5161 /* System header to define __stub macros and hopefully few prototypes,
5162     which can conflict with char $ac_func(); below.  */
5163 #include <assert.h>
5164 /* Override any gcc2 internal prototype to avoid an error.  */
5165 /* We use char because int might match the return type of a gcc2
5166     builtin and then its argument prototype would still apply.  */
5167 char $ac_func();
5168
5169 int main() {
5170
5171 /* The GNU C library defines this for functions which it implements
5172     to always fail with ENOSYS.  Some functions are actually named
5173     something starting with __ and the normal name is an alias.  */
5174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5175 choke me
5176 #else
5177 $ac_func();
5178 #endif
5179
5180 ; return 0; }
5181 EOF
5182 if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5183   rm -rf conftest*
5184   eval "ac_cv_func_$ac_func=yes"
5185 else
5186   echo "configure: failed program was:" >&5
5187   cat conftest.$ac_ext >&5
5188   rm -rf conftest*
5189   eval "ac_cv_func_$ac_func=no"
5190 fi
5191 rm -f conftest*
5192 fi
5193
5194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5195   echo "$ac_t""yes" 1>&6
5196     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5197   cat >> confdefs.h <<EOF
5198 #define $ac_tr_func 1
5199 EOF
5200  
5201 else
5202   echo "$ac_t""no" 1>&6
5203 fi
5204 done
5205
5206 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5207 do
5208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5209 echo "configure:5210: checking for $ac_func" >&5
5210 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5211   echo $ac_n "(cached) $ac_c" 1>&6
5212 else
5213   cat > conftest.$ac_ext <<EOF
5214 #line 5215 "configure"
5215 #include "confdefs.h"
5216 /* System header to define __stub macros and hopefully few prototypes,
5217     which can conflict with char $ac_func(); below.  */
5218 #include <assert.h>
5219 /* Override any gcc2 internal prototype to avoid an error.  */
5220 /* We use char because int might match the return type of a gcc2
5221     builtin and then its argument prototype would still apply.  */
5222 char $ac_func();
5223
5224 int main() {
5225
5226 /* The GNU C library defines this for functions which it implements
5227     to always fail with ENOSYS.  Some functions are actually named
5228     something starting with __ and the normal name is an alias.  */
5229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5230 choke me
5231 #else
5232 $ac_func();
5233 #endif
5234
5235 ; return 0; }
5236 EOF
5237 if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5238   rm -rf conftest*
5239   eval "ac_cv_func_$ac_func=yes"
5240 else
5241   echo "configure: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   rm -rf conftest*
5244   eval "ac_cv_func_$ac_func=no"
5245 fi
5246 rm -f conftest*
5247 fi
5248
5249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5250   echo "$ac_t""yes" 1>&6
5251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5252   cat >> confdefs.h <<EOF
5253 #define $ac_tr_func 1
5254 EOF
5255  
5256 else
5257   echo "$ac_t""no" 1>&6
5258 fi
5259 done
5260
5261 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5262 do
5263 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5264 echo "configure:5265: checking for $ac_func" >&5
5265 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5266   echo $ac_n "(cached) $ac_c" 1>&6
5267 else
5268   cat > conftest.$ac_ext <<EOF
5269 #line 5270 "configure"
5270 #include "confdefs.h"
5271 /* System header to define __stub macros and hopefully few prototypes,
5272     which can conflict with char $ac_func(); below.  */
5273 #include <assert.h>
5274 /* Override any gcc2 internal prototype to avoid an error.  */
5275 /* We use char because int might match the return type of a gcc2
5276     builtin and then its argument prototype would still apply.  */
5277 char $ac_func();
5278
5279 int main() {
5280
5281 /* The GNU C library defines this for functions which it implements
5282     to always fail with ENOSYS.  Some functions are actually named
5283     something starting with __ and the normal name is an alias.  */
5284 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5285 choke me
5286 #else
5287 $ac_func();
5288 #endif
5289
5290 ; return 0; }
5291 EOF
5292 if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5293   rm -rf conftest*
5294   eval "ac_cv_func_$ac_func=yes"
5295 else
5296   echo "configure: failed program was:" >&5
5297   cat conftest.$ac_ext >&5
5298   rm -rf conftest*
5299   eval "ac_cv_func_$ac_func=no"
5300 fi
5301 rm -f conftest*
5302 fi
5303
5304 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5305   echo "$ac_t""yes" 1>&6
5306     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5307   cat >> confdefs.h <<EOF
5308 #define $ac_tr_func 1
5309 EOF
5310  
5311 else
5312   echo "$ac_t""no" 1>&6
5313 fi
5314 done
5315
5316 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5317 do
5318 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5319 echo "configure:5320: checking for $ac_func" >&5
5320 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5321   echo $ac_n "(cached) $ac_c" 1>&6
5322 else
5323   cat > conftest.$ac_ext <<EOF
5324 #line 5325 "configure"
5325 #include "confdefs.h"
5326 /* System header to define __stub macros and hopefully few prototypes,
5327     which can conflict with char $ac_func(); below.  */
5328 #include <assert.h>
5329 /* Override any gcc2 internal prototype to avoid an error.  */
5330 /* We use char because int might match the return type of a gcc2
5331     builtin and then its argument prototype would still apply.  */
5332 char $ac_func();
5333
5334 int main() {
5335
5336 /* The GNU C library defines this for functions which it implements
5337     to always fail with ENOSYS.  Some functions are actually named
5338     something starting with __ and the normal name is an alias.  */
5339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5340 choke me
5341 #else
5342 $ac_func();
5343 #endif
5344
5345 ; return 0; }
5346 EOF
5347 if { (eval echo configure:5348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5348   rm -rf conftest*
5349   eval "ac_cv_func_$ac_func=yes"
5350 else
5351   echo "configure: failed program was:" >&5
5352   cat conftest.$ac_ext >&5
5353   rm -rf conftest*
5354   eval "ac_cv_func_$ac_func=no"
5355 fi
5356 rm -f conftest*
5357 fi
5358
5359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5360   echo "$ac_t""yes" 1>&6
5361     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5362   cat >> confdefs.h <<EOF
5363 #define $ac_tr_func 1
5364 EOF
5365  
5366 else
5367   echo "$ac_t""no" 1>&6
5368 fi
5369 done
5370
5371 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5372 do
5373 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5374 echo "configure:5375: checking for $ac_func" >&5
5375 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5376   echo $ac_n "(cached) $ac_c" 1>&6
5377 else
5378   cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381 /* System header to define __stub macros and hopefully few prototypes,
5382     which can conflict with char $ac_func(); below.  */
5383 #include <assert.h>
5384 /* Override any gcc2 internal prototype to avoid an error.  */
5385 /* We use char because int might match the return type of a gcc2
5386     builtin and then its argument prototype would still apply.  */
5387 char $ac_func();
5388
5389 int main() {
5390
5391 /* The GNU C library defines this for functions which it implements
5392     to always fail with ENOSYS.  Some functions are actually named
5393     something starting with __ and the normal name is an alias.  */
5394 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5395 choke me
5396 #else
5397 $ac_func();
5398 #endif
5399
5400 ; return 0; }
5401 EOF
5402 if { (eval echo configure:5403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5403   rm -rf conftest*
5404   eval "ac_cv_func_$ac_func=yes"
5405 else
5406   echo "configure: failed program was:" >&5
5407   cat conftest.$ac_ext >&5
5408   rm -rf conftest*
5409   eval "ac_cv_func_$ac_func=no"
5410 fi
5411 rm -f conftest*
5412 fi
5413
5414 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5415   echo "$ac_t""yes" 1>&6
5416     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5417   cat >> confdefs.h <<EOF
5418 #define $ac_tr_func 1
5419 EOF
5420  
5421 else
5422   echo "$ac_t""no" 1>&6
5423 fi
5424 done
5425
5426 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5427 do
5428 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5429 echo "configure:5430: checking for $ac_func" >&5
5430 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5431   echo $ac_n "(cached) $ac_c" 1>&6
5432 else
5433   cat > conftest.$ac_ext <<EOF
5434 #line 5435 "configure"
5435 #include "confdefs.h"
5436 /* System header to define __stub macros and hopefully few prototypes,
5437     which can conflict with char $ac_func(); below.  */
5438 #include <assert.h>
5439 /* Override any gcc2 internal prototype to avoid an error.  */
5440 /* We use char because int might match the return type of a gcc2
5441     builtin and then its argument prototype would still apply.  */
5442 char $ac_func();
5443
5444 int main() {
5445
5446 /* The GNU C library defines this for functions which it implements
5447     to always fail with ENOSYS.  Some functions are actually named
5448     something starting with __ and the normal name is an alias.  */
5449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5450 choke me
5451 #else
5452 $ac_func();
5453 #endif
5454
5455 ; return 0; }
5456 EOF
5457 if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5458   rm -rf conftest*
5459   eval "ac_cv_func_$ac_func=yes"
5460 else
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463   rm -rf conftest*
5464   eval "ac_cv_func_$ac_func=no"
5465 fi
5466 rm -f conftest*
5467 fi
5468
5469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5470   echo "$ac_t""yes" 1>&6
5471     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5472   cat >> confdefs.h <<EOF
5473 #define $ac_tr_func 1
5474 EOF
5475  
5476 else
5477   echo "$ac_t""no" 1>&6
5478 fi
5479 done
5480
5481 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5482 do
5483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5484 echo "configure:5485: checking for $ac_func" >&5
5485 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5486   echo $ac_n "(cached) $ac_c" 1>&6
5487 else
5488   cat > conftest.$ac_ext <<EOF
5489 #line 5490 "configure"
5490 #include "confdefs.h"
5491 /* System header to define __stub macros and hopefully few prototypes,
5492     which can conflict with char $ac_func(); below.  */
5493 #include <assert.h>
5494 /* Override any gcc2 internal prototype to avoid an error.  */
5495 /* We use char because int might match the return type of a gcc2
5496     builtin and then its argument prototype would still apply.  */
5497 char $ac_func();
5498
5499 int main() {
5500
5501 /* The GNU C library defines this for functions which it implements
5502     to always fail with ENOSYS.  Some functions are actually named
5503     something starting with __ and the normal name is an alias.  */
5504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5505 choke me
5506 #else
5507 $ac_func();
5508 #endif
5509
5510 ; return 0; }
5511 EOF
5512 if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5513   rm -rf conftest*
5514   eval "ac_cv_func_$ac_func=yes"
5515 else
5516   echo "configure: failed program was:" >&5
5517   cat conftest.$ac_ext >&5
5518   rm -rf conftest*
5519   eval "ac_cv_func_$ac_func=no"
5520 fi
5521 rm -f conftest*
5522 fi
5523
5524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5525   echo "$ac_t""yes" 1>&6
5526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5527   cat >> confdefs.h <<EOF
5528 #define $ac_tr_func 1
5529 EOF
5530  
5531 else
5532   echo "$ac_t""no" 1>&6
5533 fi
5534 done
5535
5536 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5537 do
5538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5539 echo "configure:5540: checking for $ac_func" >&5
5540 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5541   echo $ac_n "(cached) $ac_c" 1>&6
5542 else
5543   cat > conftest.$ac_ext <<EOF
5544 #line 5545 "configure"
5545 #include "confdefs.h"
5546 /* System header to define __stub macros and hopefully few prototypes,
5547     which can conflict with char $ac_func(); below.  */
5548 #include <assert.h>
5549 /* Override any gcc2 internal prototype to avoid an error.  */
5550 /* We use char because int might match the return type of a gcc2
5551     builtin and then its argument prototype would still apply.  */
5552 char $ac_func();
5553
5554 int main() {
5555
5556 /* The GNU C library defines this for functions which it implements
5557     to always fail with ENOSYS.  Some functions are actually named
5558     something starting with __ and the normal name is an alias.  */
5559 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5560 choke me
5561 #else
5562 $ac_func();
5563 #endif
5564
5565 ; return 0; }
5566 EOF
5567 if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5568   rm -rf conftest*
5569   eval "ac_cv_func_$ac_func=yes"
5570 else
5571   echo "configure: failed program was:" >&5
5572   cat conftest.$ac_ext >&5
5573   rm -rf conftest*
5574   eval "ac_cv_func_$ac_func=no"
5575 fi
5576 rm -f conftest*
5577 fi
5578
5579 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5580   echo "$ac_t""yes" 1>&6
5581     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5582   cat >> confdefs.h <<EOF
5583 #define $ac_tr_func 1
5584 EOF
5585  
5586 else
5587   echo "$ac_t""no" 1>&6
5588 fi
5589 done
5590
5591 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5592 do
5593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5594 echo "configure:5595: checking for $ac_func" >&5
5595 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5596   echo $ac_n "(cached) $ac_c" 1>&6
5597 else
5598   cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 /* System header to define __stub macros and hopefully few prototypes,
5602     which can conflict with char $ac_func(); below.  */
5603 #include <assert.h>
5604 /* Override any gcc2 internal prototype to avoid an error.  */
5605 /* We use char because int might match the return type of a gcc2
5606     builtin and then its argument prototype would still apply.  */
5607 char $ac_func();
5608
5609 int main() {
5610
5611 /* The GNU C library defines this for functions which it implements
5612     to always fail with ENOSYS.  Some functions are actually named
5613     something starting with __ and the normal name is an alias.  */
5614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5615 choke me
5616 #else
5617 $ac_func();
5618 #endif
5619
5620 ; return 0; }
5621 EOF
5622 if { (eval echo configure:5623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5623   rm -rf conftest*
5624   eval "ac_cv_func_$ac_func=yes"
5625 else
5626   echo "configure: failed program was:" >&5
5627   cat conftest.$ac_ext >&5
5628   rm -rf conftest*
5629   eval "ac_cv_func_$ac_func=no"
5630 fi
5631 rm -f conftest*
5632 fi
5633
5634 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5635   echo "$ac_t""yes" 1>&6
5636     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5637   cat >> confdefs.h <<EOF
5638 #define $ac_tr_func 1
5639 EOF
5640  
5641 else
5642   echo "$ac_t""no" 1>&6
5643 fi
5644 done
5645
5646 for ac_func in syslog vsyslog
5647 do
5648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5649 echo "configure:5650: checking for $ac_func" >&5
5650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5651   echo $ac_n "(cached) $ac_c" 1>&6
5652 else
5653   cat > conftest.$ac_ext <<EOF
5654 #line 5655 "configure"
5655 #include "confdefs.h"
5656 /* System header to define __stub macros and hopefully few prototypes,
5657     which can conflict with char $ac_func(); below.  */
5658 #include <assert.h>
5659 /* Override any gcc2 internal prototype to avoid an error.  */
5660 /* We use char because int might match the return type of a gcc2
5661     builtin and then its argument prototype would still apply.  */
5662 char $ac_func();
5663
5664 int main() {
5665
5666 /* The GNU C library defines this for functions which it implements
5667     to always fail with ENOSYS.  Some functions are actually named
5668     something starting with __ and the normal name is an alias.  */
5669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5670 choke me
5671 #else
5672 $ac_func();
5673 #endif
5674
5675 ; return 0; }
5676 EOF
5677 if { (eval echo configure:5678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5678   rm -rf conftest*
5679   eval "ac_cv_func_$ac_func=yes"
5680 else
5681   echo "configure: failed program was:" >&5
5682   cat conftest.$ac_ext >&5
5683   rm -rf conftest*
5684   eval "ac_cv_func_$ac_func=no"
5685 fi
5686 rm -f conftest*
5687 fi
5688
5689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5690   echo "$ac_t""yes" 1>&6
5691     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5692   cat >> confdefs.h <<EOF
5693 #define $ac_tr_func 1
5694 EOF
5695  
5696 else
5697   echo "$ac_t""no" 1>&6
5698 fi
5699 done
5700
5701 # setbuffer is needed for smbtorture
5702 for ac_func in setbuffer
5703 do
5704 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5705 echo "configure:5706: checking for $ac_func" >&5
5706 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5707   echo $ac_n "(cached) $ac_c" 1>&6
5708 else
5709   cat > conftest.$ac_ext <<EOF
5710 #line 5711 "configure"
5711 #include "confdefs.h"
5712 /* System header to define __stub macros and hopefully few prototypes,
5713     which can conflict with char $ac_func(); below.  */
5714 #include <assert.h>
5715 /* Override any gcc2 internal prototype to avoid an error.  */
5716 /* We use char because int might match the return type of a gcc2
5717     builtin and then its argument prototype would still apply.  */
5718 char $ac_func();
5719
5720 int main() {
5721
5722 /* The GNU C library defines this for functions which it implements
5723     to always fail with ENOSYS.  Some functions are actually named
5724     something starting with __ and the normal name is an alias.  */
5725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5726 choke me
5727 #else
5728 $ac_func();
5729 #endif
5730
5731 ; return 0; }
5732 EOF
5733 if { (eval echo configure:5734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5734   rm -rf conftest*
5735   eval "ac_cv_func_$ac_func=yes"
5736 else
5737   echo "configure: failed program was:" >&5
5738   cat conftest.$ac_ext >&5
5739   rm -rf conftest*
5740   eval "ac_cv_func_$ac_func=no"
5741 fi
5742 rm -f conftest*
5743 fi
5744
5745 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5746   echo "$ac_t""yes" 1>&6
5747     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5748   cat >> confdefs.h <<EOF
5749 #define $ac_tr_func 1
5750 EOF
5751  
5752 else
5753   echo "$ac_t""no" 1>&6
5754 fi
5755 done
5756
5757
5758 # syscall() is needed for smbwrapper.
5759 for ac_func in syscall
5760 do
5761 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5762 echo "configure:5763: checking for $ac_func" >&5
5763 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5764   echo $ac_n "(cached) $ac_c" 1>&6
5765 else
5766   cat > conftest.$ac_ext <<EOF
5767 #line 5768 "configure"
5768 #include "confdefs.h"
5769 /* System header to define __stub macros and hopefully few prototypes,
5770     which can conflict with char $ac_func(); below.  */
5771 #include <assert.h>
5772 /* Override any gcc2 internal prototype to avoid an error.  */
5773 /* We use char because int might match the return type of a gcc2
5774     builtin and then its argument prototype would still apply.  */
5775 char $ac_func();
5776
5777 int main() {
5778
5779 /* The GNU C library defines this for functions which it implements
5780     to always fail with ENOSYS.  Some functions are actually named
5781     something starting with __ and the normal name is an alias.  */
5782 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5783 choke me
5784 #else
5785 $ac_func();
5786 #endif
5787
5788 ; return 0; }
5789 EOF
5790 if { (eval echo configure:5791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5791   rm -rf conftest*
5792   eval "ac_cv_func_$ac_func=yes"
5793 else
5794   echo "configure: failed program was:" >&5
5795   cat conftest.$ac_ext >&5
5796   rm -rf conftest*
5797   eval "ac_cv_func_$ac_func=no"
5798 fi
5799 rm -f conftest*
5800 fi
5801
5802 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5803   echo "$ac_t""yes" 1>&6
5804     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5805   cat >> confdefs.h <<EOF
5806 #define $ac_tr_func 1
5807 EOF
5808  
5809 else
5810   echo "$ac_t""no" 1>&6
5811 fi
5812 done
5813
5814
5815 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5816 do
5817 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5818 echo "configure:5819: checking for $ac_func" >&5
5819 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5820   echo $ac_n "(cached) $ac_c" 1>&6
5821 else
5822   cat > conftest.$ac_ext <<EOF
5823 #line 5824 "configure"
5824 #include "confdefs.h"
5825 /* System header to define __stub macros and hopefully few prototypes,
5826     which can conflict with char $ac_func(); below.  */
5827 #include <assert.h>
5828 /* Override any gcc2 internal prototype to avoid an error.  */
5829 /* We use char because int might match the return type of a gcc2
5830     builtin and then its argument prototype would still apply.  */
5831 char $ac_func();
5832
5833 int main() {
5834
5835 /* The GNU C library defines this for functions which it implements
5836     to always fail with ENOSYS.  Some functions are actually named
5837     something starting with __ and the normal name is an alias.  */
5838 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5839 choke me
5840 #else
5841 $ac_func();
5842 #endif
5843
5844 ; return 0; }
5845 EOF
5846 if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5847   rm -rf conftest*
5848   eval "ac_cv_func_$ac_func=yes"
5849 else
5850   echo "configure: failed program was:" >&5
5851   cat conftest.$ac_ext >&5
5852   rm -rf conftest*
5853   eval "ac_cv_func_$ac_func=no"
5854 fi
5855 rm -f conftest*
5856 fi
5857
5858 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5859   echo "$ac_t""yes" 1>&6
5860     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5861   cat >> confdefs.h <<EOF
5862 #define $ac_tr_func 1
5863 EOF
5864  
5865 else
5866   echo "$ac_t""no" 1>&6
5867 fi
5868 done
5869
5870 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5871 do
5872 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5873 echo "configure:5874: checking for $ac_func" >&5
5874 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5875   echo $ac_n "(cached) $ac_c" 1>&6
5876 else
5877   cat > conftest.$ac_ext <<EOF
5878 #line 5879 "configure"
5879 #include "confdefs.h"
5880 /* System header to define __stub macros and hopefully few prototypes,
5881     which can conflict with char $ac_func(); below.  */
5882 #include <assert.h>
5883 /* Override any gcc2 internal prototype to avoid an error.  */
5884 /* We use char because int might match the return type of a gcc2
5885     builtin and then its argument prototype would still apply.  */
5886 char $ac_func();
5887
5888 int main() {
5889
5890 /* The GNU C library defines this for functions which it implements
5891     to always fail with ENOSYS.  Some functions are actually named
5892     something starting with __ and the normal name is an alias.  */
5893 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5894 choke me
5895 #else
5896 $ac_func();
5897 #endif
5898
5899 ; return 0; }
5900 EOF
5901 if { (eval echo configure:5902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5902   rm -rf conftest*
5903   eval "ac_cv_func_$ac_func=yes"
5904 else
5905   echo "configure: failed program was:" >&5
5906   cat conftest.$ac_ext >&5
5907   rm -rf conftest*
5908   eval "ac_cv_func_$ac_func=no"
5909 fi
5910 rm -f conftest*
5911 fi
5912
5913 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5914   echo "$ac_t""yes" 1>&6
5915     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5916   cat >> confdefs.h <<EOF
5917 #define $ac_tr_func 1
5918 EOF
5919  
5920 else
5921   echo "$ac_t""no" 1>&6
5922 fi
5923 done
5924
5925 for ac_func in __getcwd _getcwd
5926 do
5927 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5928 echo "configure:5929: checking for $ac_func" >&5
5929 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5930   echo $ac_n "(cached) $ac_c" 1>&6
5931 else
5932   cat > conftest.$ac_ext <<EOF
5933 #line 5934 "configure"
5934 #include "confdefs.h"
5935 /* System header to define __stub macros and hopefully few prototypes,
5936     which can conflict with char $ac_func(); below.  */
5937 #include <assert.h>
5938 /* Override any gcc2 internal prototype to avoid an error.  */
5939 /* We use char because int might match the return type of a gcc2
5940     builtin and then its argument prototype would still apply.  */
5941 char $ac_func();
5942
5943 int main() {
5944
5945 /* The GNU C library defines this for functions which it implements
5946     to always fail with ENOSYS.  Some functions are actually named
5947     something starting with __ and the normal name is an alias.  */
5948 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5949 choke me
5950 #else
5951 $ac_func();
5952 #endif
5953
5954 ; return 0; }
5955 EOF
5956 if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5957   rm -rf conftest*
5958   eval "ac_cv_func_$ac_func=yes"
5959 else
5960   echo "configure: failed program was:" >&5
5961   cat conftest.$ac_ext >&5
5962   rm -rf conftest*
5963   eval "ac_cv_func_$ac_func=no"
5964 fi
5965 rm -f conftest*
5966 fi
5967
5968 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5969   echo "$ac_t""yes" 1>&6
5970     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5971   cat >> confdefs.h <<EOF
5972 #define $ac_tr_func 1
5973 EOF
5974  
5975 else
5976   echo "$ac_t""no" 1>&6
5977 fi
5978 done
5979
5980 for ac_func in __xstat __fxstat __lxstat
5981 do
5982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5983 echo "configure:5984: checking for $ac_func" >&5
5984 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5985   echo $ac_n "(cached) $ac_c" 1>&6
5986 else
5987   cat > conftest.$ac_ext <<EOF
5988 #line 5989 "configure"
5989 #include "confdefs.h"
5990 /* System header to define __stub macros and hopefully few prototypes,
5991     which can conflict with char $ac_func(); below.  */
5992 #include <assert.h>
5993 /* Override any gcc2 internal prototype to avoid an error.  */
5994 /* We use char because int might match the return type of a gcc2
5995     builtin and then its argument prototype would still apply.  */
5996 char $ac_func();
5997
5998 int main() {
5999
6000 /* The GNU C library defines this for functions which it implements
6001     to always fail with ENOSYS.  Some functions are actually named
6002     something starting with __ and the normal name is an alias.  */
6003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6004 choke me
6005 #else
6006 $ac_func();
6007 #endif
6008
6009 ; return 0; }
6010 EOF
6011 if { (eval echo configure:6012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6012   rm -rf conftest*
6013   eval "ac_cv_func_$ac_func=yes"
6014 else
6015   echo "configure: failed program was:" >&5
6016   cat conftest.$ac_ext >&5
6017   rm -rf conftest*
6018   eval "ac_cv_func_$ac_func=no"
6019 fi
6020 rm -f conftest*
6021 fi
6022
6023 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6024   echo "$ac_t""yes" 1>&6
6025     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6026   cat >> confdefs.h <<EOF
6027 #define $ac_tr_func 1
6028 EOF
6029  
6030 else
6031   echo "$ac_t""no" 1>&6
6032 fi
6033 done
6034
6035 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6036 do
6037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6038 echo "configure:6039: checking for $ac_func" >&5
6039 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6040   echo $ac_n "(cached) $ac_c" 1>&6
6041 else
6042   cat > conftest.$ac_ext <<EOF
6043 #line 6044 "configure"
6044 #include "confdefs.h"
6045 /* System header to define __stub macros and hopefully few prototypes,
6046     which can conflict with char $ac_func(); below.  */
6047 #include <assert.h>
6048 /* Override any gcc2 internal prototype to avoid an error.  */
6049 /* We use char because int might match the return type of a gcc2
6050     builtin and then its argument prototype would still apply.  */
6051 char $ac_func();
6052
6053 int main() {
6054
6055 /* The GNU C library defines this for functions which it implements
6056     to always fail with ENOSYS.  Some functions are actually named
6057     something starting with __ and the normal name is an alias.  */
6058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6059 choke me
6060 #else
6061 $ac_func();
6062 #endif
6063
6064 ; return 0; }
6065 EOF
6066 if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6067   rm -rf conftest*
6068   eval "ac_cv_func_$ac_func=yes"
6069 else
6070   echo "configure: failed program was:" >&5
6071   cat conftest.$ac_ext >&5
6072   rm -rf conftest*
6073   eval "ac_cv_func_$ac_func=no"
6074 fi
6075 rm -f conftest*
6076 fi
6077
6078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6079   echo "$ac_t""yes" 1>&6
6080     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6081   cat >> confdefs.h <<EOF
6082 #define $ac_tr_func 1
6083 EOF
6084  
6085 else
6086   echo "$ac_t""no" 1>&6
6087 fi
6088 done
6089
6090 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6091 do
6092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6093 echo "configure:6094: checking for $ac_func" >&5
6094 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6095   echo $ac_n "(cached) $ac_c" 1>&6
6096 else
6097   cat > conftest.$ac_ext <<EOF
6098 #line 6099 "configure"
6099 #include "confdefs.h"
6100 /* System header to define __stub macros and hopefully few prototypes,
6101     which can conflict with char $ac_func(); below.  */
6102 #include <assert.h>
6103 /* Override any gcc2 internal prototype to avoid an error.  */
6104 /* We use char because int might match the return type of a gcc2
6105     builtin and then its argument prototype would still apply.  */
6106 char $ac_func();
6107
6108 int main() {
6109
6110 /* The GNU C library defines this for functions which it implements
6111     to always fail with ENOSYS.  Some functions are actually named
6112     something starting with __ and the normal name is an alias.  */
6113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6114 choke me
6115 #else
6116 $ac_func();
6117 #endif
6118
6119 ; return 0; }
6120 EOF
6121 if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6122   rm -rf conftest*
6123   eval "ac_cv_func_$ac_func=yes"
6124 else
6125   echo "configure: failed program was:" >&5
6126   cat conftest.$ac_ext >&5
6127   rm -rf conftest*
6128   eval "ac_cv_func_$ac_func=no"
6129 fi
6130 rm -f conftest*
6131 fi
6132
6133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6134   echo "$ac_t""yes" 1>&6
6135     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6136   cat >> confdefs.h <<EOF
6137 #define $ac_tr_func 1
6138 EOF
6139  
6140 else
6141   echo "$ac_t""no" 1>&6
6142 fi
6143 done
6144
6145 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6146 do
6147 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6148 echo "configure:6149: checking for $ac_func" >&5
6149 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6150   echo $ac_n "(cached) $ac_c" 1>&6
6151 else
6152   cat > conftest.$ac_ext <<EOF
6153 #line 6154 "configure"
6154 #include "confdefs.h"
6155 /* System header to define __stub macros and hopefully few prototypes,
6156     which can conflict with char $ac_func(); below.  */
6157 #include <assert.h>
6158 /* Override any gcc2 internal prototype to avoid an error.  */
6159 /* We use char because int might match the return type of a gcc2
6160     builtin and then its argument prototype would still apply.  */
6161 char $ac_func();
6162
6163 int main() {
6164
6165 /* The GNU C library defines this for functions which it implements
6166     to always fail with ENOSYS.  Some functions are actually named
6167     something starting with __ and the normal name is an alias.  */
6168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6169 choke me
6170 #else
6171 $ac_func();
6172 #endif
6173
6174 ; return 0; }
6175 EOF
6176 if { (eval echo configure:6177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6177   rm -rf conftest*
6178   eval "ac_cv_func_$ac_func=yes"
6179 else
6180   echo "configure: failed program was:" >&5
6181   cat conftest.$ac_ext >&5
6182   rm -rf conftest*
6183   eval "ac_cv_func_$ac_func=no"
6184 fi
6185 rm -f conftest*
6186 fi
6187
6188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6189   echo "$ac_t""yes" 1>&6
6190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6191   cat >> confdefs.h <<EOF
6192 #define $ac_tr_func 1
6193 EOF
6194  
6195 else
6196   echo "$ac_t""no" 1>&6
6197 fi
6198 done
6199
6200 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6201 do
6202 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6203 echo "configure:6204: checking for $ac_func" >&5
6204 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6205   echo $ac_n "(cached) $ac_c" 1>&6
6206 else
6207   cat > conftest.$ac_ext <<EOF
6208 #line 6209 "configure"
6209 #include "confdefs.h"
6210 /* System header to define __stub macros and hopefully few prototypes,
6211     which can conflict with char $ac_func(); below.  */
6212 #include <assert.h>
6213 /* Override any gcc2 internal prototype to avoid an error.  */
6214 /* We use char because int might match the return type of a gcc2
6215     builtin and then its argument prototype would still apply.  */
6216 char $ac_func();
6217
6218 int main() {
6219
6220 /* The GNU C library defines this for functions which it implements
6221     to always fail with ENOSYS.  Some functions are actually named
6222     something starting with __ and the normal name is an alias.  */
6223 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6224 choke me
6225 #else
6226 $ac_func();
6227 #endif
6228
6229 ; return 0; }
6230 EOF
6231 if { (eval echo configure:6232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6232   rm -rf conftest*
6233   eval "ac_cv_func_$ac_func=yes"
6234 else
6235   echo "configure: failed program was:" >&5
6236   cat conftest.$ac_ext >&5
6237   rm -rf conftest*
6238   eval "ac_cv_func_$ac_func=no"
6239 fi
6240 rm -f conftest*
6241 fi
6242
6243 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6244   echo "$ac_t""yes" 1>&6
6245     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6246   cat >> confdefs.h <<EOF
6247 #define $ac_tr_func 1
6248 EOF
6249  
6250 else
6251   echo "$ac_t""no" 1>&6
6252 fi
6253 done
6254
6255 for ac_func in _write __write _fork __fork
6256 do
6257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6258 echo "configure:6259: checking for $ac_func" >&5
6259 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6260   echo $ac_n "(cached) $ac_c" 1>&6
6261 else
6262   cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265 /* System header to define __stub macros and hopefully few prototypes,
6266     which can conflict with char $ac_func(); below.  */
6267 #include <assert.h>
6268 /* Override any gcc2 internal prototype to avoid an error.  */
6269 /* We use char because int might match the return type of a gcc2
6270     builtin and then its argument prototype would still apply.  */
6271 char $ac_func();
6272
6273 int main() {
6274
6275 /* The GNU C library defines this for functions which it implements
6276     to always fail with ENOSYS.  Some functions are actually named
6277     something starting with __ and the normal name is an alias.  */
6278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6279 choke me
6280 #else
6281 $ac_func();
6282 #endif
6283
6284 ; return 0; }
6285 EOF
6286 if { (eval echo configure:6287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6287   rm -rf conftest*
6288   eval "ac_cv_func_$ac_func=yes"
6289 else
6290   echo "configure: failed program was:" >&5
6291   cat conftest.$ac_ext >&5
6292   rm -rf conftest*
6293   eval "ac_cv_func_$ac_func=no"
6294 fi
6295 rm -f conftest*
6296 fi
6297
6298 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6299   echo "$ac_t""yes" 1>&6
6300     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6301   cat >> confdefs.h <<EOF
6302 #define $ac_tr_func 1
6303 EOF
6304  
6305 else
6306   echo "$ac_t""no" 1>&6
6307 fi
6308 done
6309
6310 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6311 do
6312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6313 echo "configure:6314: checking for $ac_func" >&5
6314 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6315   echo $ac_n "(cached) $ac_c" 1>&6
6316 else
6317   cat > conftest.$ac_ext <<EOF
6318 #line 6319 "configure"
6319 #include "confdefs.h"
6320 /* System header to define __stub macros and hopefully few prototypes,
6321     which can conflict with char $ac_func(); below.  */
6322 #include <assert.h>
6323 /* Override any gcc2 internal prototype to avoid an error.  */
6324 /* We use char because int might match the return type of a gcc2
6325     builtin and then its argument prototype would still apply.  */
6326 char $ac_func();
6327
6328 int main() {
6329
6330 /* The GNU C library defines this for functions which it implements
6331     to always fail with ENOSYS.  Some functions are actually named
6332     something starting with __ and the normal name is an alias.  */
6333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6334 choke me
6335 #else
6336 $ac_func();
6337 #endif
6338
6339 ; return 0; }
6340 EOF
6341 if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6342   rm -rf conftest*
6343   eval "ac_cv_func_$ac_func=yes"
6344 else
6345   echo "configure: failed program was:" >&5
6346   cat conftest.$ac_ext >&5
6347   rm -rf conftest*
6348   eval "ac_cv_func_$ac_func=no"
6349 fi
6350 rm -f conftest*
6351 fi
6352
6353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6354   echo "$ac_t""yes" 1>&6
6355     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6356   cat >> confdefs.h <<EOF
6357 #define $ac_tr_func 1
6358 EOF
6359  
6360 else
6361   echo "$ac_t""no" 1>&6
6362 fi
6363 done
6364
6365 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6366 do
6367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6368 echo "configure:6369: checking for $ac_func" >&5
6369 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6370   echo $ac_n "(cached) $ac_c" 1>&6
6371 else
6372   cat > conftest.$ac_ext <<EOF
6373 #line 6374 "configure"
6374 #include "confdefs.h"
6375 /* System header to define __stub macros and hopefully few prototypes,
6376     which can conflict with char $ac_func(); below.  */
6377 #include <assert.h>
6378 /* Override any gcc2 internal prototype to avoid an error.  */
6379 /* We use char because int might match the return type of a gcc2
6380     builtin and then its argument prototype would still apply.  */
6381 char $ac_func();
6382
6383 int main() {
6384
6385 /* The GNU C library defines this for functions which it implements
6386     to always fail with ENOSYS.  Some functions are actually named
6387     something starting with __ and the normal name is an alias.  */
6388 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6389 choke me
6390 #else
6391 $ac_func();
6392 #endif
6393
6394 ; return 0; }
6395 EOF
6396 if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6397   rm -rf conftest*
6398   eval "ac_cv_func_$ac_func=yes"
6399 else
6400   echo "configure: failed program was:" >&5
6401   cat conftest.$ac_ext >&5
6402   rm -rf conftest*
6403   eval "ac_cv_func_$ac_func=no"
6404 fi
6405 rm -f conftest*
6406 fi
6407
6408 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6409   echo "$ac_t""yes" 1>&6
6410     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6411   cat >> confdefs.h <<EOF
6412 #define $ac_tr_func 1
6413 EOF
6414  
6415 else
6416   echo "$ac_t""no" 1>&6
6417 fi
6418 done
6419
6420 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6421 do
6422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6423 echo "configure:6424: checking for $ac_func" >&5
6424 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6425   echo $ac_n "(cached) $ac_c" 1>&6
6426 else
6427   cat > conftest.$ac_ext <<EOF
6428 #line 6429 "configure"
6429 #include "confdefs.h"
6430 /* System header to define __stub macros and hopefully few prototypes,
6431     which can conflict with char $ac_func(); below.  */
6432 #include <assert.h>
6433 /* Override any gcc2 internal prototype to avoid an error.  */
6434 /* We use char because int might match the return type of a gcc2
6435     builtin and then its argument prototype would still apply.  */
6436 char $ac_func();
6437
6438 int main() {
6439
6440 /* The GNU C library defines this for functions which it implements
6441     to always fail with ENOSYS.  Some functions are actually named
6442     something starting with __ and the normal name is an alias.  */
6443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6444 choke me
6445 #else
6446 $ac_func();
6447 #endif
6448
6449 ; return 0; }
6450 EOF
6451 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6452   rm -rf conftest*
6453   eval "ac_cv_func_$ac_func=yes"
6454 else
6455   echo "configure: failed program was:" >&5
6456   cat conftest.$ac_ext >&5
6457   rm -rf conftest*
6458   eval "ac_cv_func_$ac_func=no"
6459 fi
6460 rm -f conftest*
6461 fi
6462
6463 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6464   echo "$ac_t""yes" 1>&6
6465     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6466   cat >> confdefs.h <<EOF
6467 #define $ac_tr_func 1
6468 EOF
6469  
6470 else
6471   echo "$ac_t""no" 1>&6
6472 fi
6473 done
6474
6475 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6476 do
6477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6478 echo "configure:6479: checking for $ac_func" >&5
6479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6480   echo $ac_n "(cached) $ac_c" 1>&6
6481 else
6482   cat > conftest.$ac_ext <<EOF
6483 #line 6484 "configure"
6484 #include "confdefs.h"
6485 /* System header to define __stub macros and hopefully few prototypes,
6486     which can conflict with char $ac_func(); below.  */
6487 #include <assert.h>
6488 /* Override any gcc2 internal prototype to avoid an error.  */
6489 /* We use char because int might match the return type of a gcc2
6490     builtin and then its argument prototype would still apply.  */
6491 char $ac_func();
6492
6493 int main() {
6494
6495 /* The GNU C library defines this for functions which it implements
6496     to always fail with ENOSYS.  Some functions are actually named
6497     something starting with __ and the normal name is an alias.  */
6498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6499 choke me
6500 #else
6501 $ac_func();
6502 #endif
6503
6504 ; return 0; }
6505 EOF
6506 if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6507   rm -rf conftest*
6508   eval "ac_cv_func_$ac_func=yes"
6509 else
6510   echo "configure: failed program was:" >&5
6511   cat conftest.$ac_ext >&5
6512   rm -rf conftest*
6513   eval "ac_cv_func_$ac_func=no"
6514 fi
6515 rm -f conftest*
6516 fi
6517
6518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6519   echo "$ac_t""yes" 1>&6
6520     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6521   cat >> confdefs.h <<EOF
6522 #define $ac_tr_func 1
6523 EOF
6524  
6525 else
6526   echo "$ac_t""no" 1>&6
6527 fi
6528 done
6529
6530 for ac_func in open64 _open64 __open64 creat64
6531 do
6532 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6533 echo "configure:6534: checking for $ac_func" >&5
6534 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6535   echo $ac_n "(cached) $ac_c" 1>&6
6536 else
6537   cat > conftest.$ac_ext <<EOF
6538 #line 6539 "configure"
6539 #include "confdefs.h"
6540 /* System header to define __stub macros and hopefully few prototypes,
6541     which can conflict with char $ac_func(); below.  */
6542 #include <assert.h>
6543 /* Override any gcc2 internal prototype to avoid an error.  */
6544 /* We use char because int might match the return type of a gcc2
6545     builtin and then its argument prototype would still apply.  */
6546 char $ac_func();
6547
6548 int main() {
6549
6550 /* The GNU C library defines this for functions which it implements
6551     to always fail with ENOSYS.  Some functions are actually named
6552     something starting with __ and the normal name is an alias.  */
6553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6554 choke me
6555 #else
6556 $ac_func();
6557 #endif
6558
6559 ; return 0; }
6560 EOF
6561 if { (eval echo configure:6562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6562   rm -rf conftest*
6563   eval "ac_cv_func_$ac_func=yes"
6564 else
6565   echo "configure: failed program was:" >&5
6566   cat conftest.$ac_ext >&5
6567   rm -rf conftest*
6568   eval "ac_cv_func_$ac_func=no"
6569 fi
6570 rm -f conftest*
6571 fi
6572
6573 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6574   echo "$ac_t""yes" 1>&6
6575     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6576   cat >> confdefs.h <<EOF
6577 #define $ac_tr_func 1
6578 EOF
6579  
6580 else
6581   echo "$ac_t""no" 1>&6
6582 fi
6583 done
6584
6585
6586 #
6587 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6588 #
6589
6590 if test x$ac_cv_func_stat64 = xno ; then
6591   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6592 echo "configure:6593: checking for stat64 in <sys/stat.h>" >&5
6593   cat > conftest.$ac_ext <<EOF
6594 #line 6595 "configure"
6595 #include "confdefs.h"
6596
6597 #if defined(HAVE_UNISTD_H)
6598 #include <unistd.h>
6599 #endif
6600 #include <sys/stat.h>
6601
6602 int main() {
6603 struct stat64 st64; exit(stat64(".",&st64));
6604 ; return 0; }
6605 EOF
6606 if { (eval echo configure:6607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6607   rm -rf conftest*
6608   ac_cv_func_stat64=yes
6609 else
6610   echo "configure: failed program was:" >&5
6611   cat conftest.$ac_ext >&5
6612 fi
6613 rm -f conftest*
6614   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6615   if test x$ac_cv_func_stat64 = xyes ; then
6616     cat >> confdefs.h <<\EOF
6617 #define HAVE_STAT64 1
6618 EOF
6619
6620   fi
6621 fi
6622
6623 if test x$ac_cv_func_lstat64 = xno ; then
6624   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6625 echo "configure:6626: checking for lstat64 in <sys/stat.h>" >&5
6626   cat > conftest.$ac_ext <<EOF
6627 #line 6628 "configure"
6628 #include "confdefs.h"
6629
6630 #if defined(HAVE_UNISTD_H)
6631 #include <unistd.h>
6632 #endif
6633 #include <sys/stat.h>
6634
6635 int main() {
6636 struct stat64 st64; exit(lstat64(".",&st64));
6637 ; return 0; }
6638 EOF
6639 if { (eval echo configure:6640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6640   rm -rf conftest*
6641   ac_cv_func_lstat64=yes
6642 else
6643   echo "configure: failed program was:" >&5
6644   cat conftest.$ac_ext >&5
6645 fi
6646 rm -f conftest*
6647   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6648   if test x$ac_cv_func_lstat64 = xyes ; then
6649     cat >> confdefs.h <<\EOF
6650 #define HAVE_LSTAT64 1
6651 EOF
6652
6653   fi
6654 fi
6655
6656 if test x$ac_cv_func_fstat64 = xno ; then
6657   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6658 echo "configure:6659: checking for fstat64 in <sys/stat.h>" >&5
6659   cat > conftest.$ac_ext <<EOF
6660 #line 6661 "configure"
6661 #include "confdefs.h"
6662
6663 #if defined(HAVE_UNISTD_H)
6664 #include <unistd.h>
6665 #endif
6666 #include <sys/stat.h>
6667
6668 int main() {
6669 struct stat64 st64; exit(fstat64(0,&st64));
6670 ; return 0; }
6671 EOF
6672 if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6673   rm -rf conftest*
6674   ac_cv_func_fstat64=yes
6675 else
6676   echo "configure: failed program was:" >&5
6677   cat conftest.$ac_ext >&5
6678 fi
6679 rm -f conftest*
6680   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6681   if test x$ac_cv_func_fstat64 = xyes ; then
6682     cat >> confdefs.h <<\EOF
6683 #define HAVE_FSTAT64 1
6684 EOF
6685
6686   fi
6687 fi
6688
6689 #####################################
6690 # we might need the resolv library on some systems
6691 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6692 echo "configure:6693: checking for dn_expand in -lresolv" >&5
6693 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6694 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6695   echo $ac_n "(cached) $ac_c" 1>&6
6696 else
6697   ac_save_LIBS="$LIBS"
6698 LIBS="-lresolv  $LIBS"
6699 cat > conftest.$ac_ext <<EOF
6700 #line 6701 "configure"
6701 #include "confdefs.h"
6702 /* Override any gcc2 internal prototype to avoid an error.  */
6703 /* We use char because int might match the return type of a gcc2
6704     builtin and then its argument prototype would still apply.  */
6705 char dn_expand();
6706
6707 int main() {
6708 dn_expand()
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6712   rm -rf conftest*
6713   eval "ac_cv_lib_$ac_lib_var=yes"
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_lib_$ac_lib_var=no"
6719 fi
6720 rm -f conftest*
6721 LIBS="$ac_save_LIBS"
6722
6723 fi
6724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6725   echo "$ac_t""yes" 1>&6
6726     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6727     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6728   cat >> confdefs.h <<EOF
6729 #define $ac_tr_lib 1
6730 EOF
6731
6732   LIBS="-lresolv $LIBS"
6733
6734 else
6735   echo "$ac_t""no" 1>&6
6736 fi
6737
6738
6739 #
6740 # Check for the functions putprpwnam, set_auth_parameters,
6741 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6742 # Needed for OSF1 and HPUX.
6743 #
6744
6745 case "$LIBS" in
6746   *-lsecurity*) for ac_func in putprpwnam
6747 do
6748 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6749 echo "configure:6750: checking for $ac_func" >&5
6750 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6751   echo $ac_n "(cached) $ac_c" 1>&6
6752 else
6753   cat > conftest.$ac_ext <<EOF
6754 #line 6755 "configure"
6755 #include "confdefs.h"
6756 /* System header to define __stub macros and hopefully few prototypes,
6757     which can conflict with char $ac_func(); below.  */
6758 #include <assert.h>
6759 /* Override any gcc2 internal prototype to avoid an error.  */
6760 /* We use char because int might match the return type of a gcc2
6761     builtin and then its argument prototype would still apply.  */
6762 char $ac_func();
6763
6764 int main() {
6765
6766 /* The GNU C library defines this for functions which it implements
6767     to always fail with ENOSYS.  Some functions are actually named
6768     something starting with __ and the normal name is an alias.  */
6769 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6770 choke me
6771 #else
6772 $ac_func();
6773 #endif
6774
6775 ; return 0; }
6776 EOF
6777 if { (eval echo configure:6778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6778   rm -rf conftest*
6779   eval "ac_cv_func_$ac_func=yes"
6780 else
6781   echo "configure: failed program was:" >&5
6782   cat conftest.$ac_ext >&5
6783   rm -rf conftest*
6784   eval "ac_cv_func_$ac_func=no"
6785 fi
6786 rm -f conftest*
6787 fi
6788
6789 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6790   echo "$ac_t""yes" 1>&6
6791     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6792   cat >> confdefs.h <<EOF
6793 #define $ac_tr_func 1
6794 EOF
6795  
6796 else
6797   echo "$ac_t""no" 1>&6
6798 fi
6799 done
6800  ;;
6801   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6802 echo "configure:6803: checking for putprpwnam in -lsecurity" >&5
6803 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6804 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6805   echo $ac_n "(cached) $ac_c" 1>&6
6806 else
6807   ac_save_LIBS="$LIBS"
6808 LIBS="-lsecurity  $LIBS"
6809 cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 /* Override any gcc2 internal prototype to avoid an error.  */
6813 /* We use char because int might match the return type of a gcc2
6814     builtin and then its argument prototype would still apply.  */
6815 char putprpwnam();
6816
6817 int main() {
6818 putprpwnam()
6819 ; return 0; }
6820 EOF
6821 if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6822   rm -rf conftest*
6823   eval "ac_cv_lib_$ac_lib_var=yes"
6824 else
6825   echo "configure: failed program was:" >&5
6826   cat conftest.$ac_ext >&5
6827   rm -rf conftest*
6828   eval "ac_cv_lib_$ac_lib_var=no"
6829 fi
6830 rm -f conftest*
6831 LIBS="$ac_save_LIBS"
6832
6833 fi
6834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6835   echo "$ac_t""yes" 1>&6
6836     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6837     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6838   cat >> confdefs.h <<EOF
6839 #define $ac_tr_lib 1
6840 EOF
6841
6842   LIBS="-lsecurity $LIBS"
6843
6844 else
6845   echo "$ac_t""no" 1>&6
6846 fi
6847  
6848      for ac_func in putprpwnam
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   ;;
6904   esac
6905
6906 case "$LIBS" in
6907   *-lsec*) for ac_func in putprpwnam
6908 do
6909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6910 echo "configure:6911: checking for $ac_func" >&5
6911 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6912   echo $ac_n "(cached) $ac_c" 1>&6
6913 else
6914   cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917 /* System header to define __stub macros and hopefully few prototypes,
6918     which can conflict with char $ac_func(); below.  */
6919 #include <assert.h>
6920 /* Override any gcc2 internal prototype to avoid an error.  */
6921 /* We use char because int might match the return type of a gcc2
6922     builtin and then its argument prototype would still apply.  */
6923 char $ac_func();
6924
6925 int main() {
6926
6927 /* The GNU C library defines this for functions which it implements
6928     to always fail with ENOSYS.  Some functions are actually named
6929     something starting with __ and the normal name is an alias.  */
6930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6931 choke me
6932 #else
6933 $ac_func();
6934 #endif
6935
6936 ; return 0; }
6937 EOF
6938 if { (eval echo configure:6939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6939   rm -rf conftest*
6940   eval "ac_cv_func_$ac_func=yes"
6941 else
6942   echo "configure: failed program was:" >&5
6943   cat conftest.$ac_ext >&5
6944   rm -rf conftest*
6945   eval "ac_cv_func_$ac_func=no"
6946 fi
6947 rm -f conftest*
6948 fi
6949
6950 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6951   echo "$ac_t""yes" 1>&6
6952     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6953   cat >> confdefs.h <<EOF
6954 #define $ac_tr_func 1
6955 EOF
6956  
6957 else
6958   echo "$ac_t""no" 1>&6
6959 fi
6960 done
6961  ;;
6962   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6963 echo "configure:6964: checking for putprpwnam in -lsec" >&5
6964 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6965 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6966   echo $ac_n "(cached) $ac_c" 1>&6
6967 else
6968   ac_save_LIBS="$LIBS"
6969 LIBS="-lsec  $LIBS"
6970 cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973 /* Override any gcc2 internal prototype to avoid an error.  */
6974 /* We use char because int might match the return type of a gcc2
6975     builtin and then its argument prototype would still apply.  */
6976 char putprpwnam();
6977
6978 int main() {
6979 putprpwnam()
6980 ; return 0; }
6981 EOF
6982 if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6983   rm -rf conftest*
6984   eval "ac_cv_lib_$ac_lib_var=yes"
6985 else
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988   rm -rf conftest*
6989   eval "ac_cv_lib_$ac_lib_var=no"
6990 fi
6991 rm -f conftest*
6992 LIBS="$ac_save_LIBS"
6993
6994 fi
6995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6996   echo "$ac_t""yes" 1>&6
6997     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6998     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6999   cat >> confdefs.h <<EOF
7000 #define $ac_tr_lib 1
7001 EOF
7002
7003   LIBS="-lsec $LIBS"
7004
7005 else
7006   echo "$ac_t""no" 1>&6
7007 fi
7008  
7009      for ac_func in putprpwnam
7010 do
7011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7012 echo "configure:7013: checking for $ac_func" >&5
7013 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7014   echo $ac_n "(cached) $ac_c" 1>&6
7015 else
7016   cat > conftest.$ac_ext <<EOF
7017 #line 7018 "configure"
7018 #include "confdefs.h"
7019 /* System header to define __stub macros and hopefully few prototypes,
7020     which can conflict with char $ac_func(); below.  */
7021 #include <assert.h>
7022 /* Override any gcc2 internal prototype to avoid an error.  */
7023 /* We use char because int might match the return type of a gcc2
7024     builtin and then its argument prototype would still apply.  */
7025 char $ac_func();
7026
7027 int main() {
7028
7029 /* The GNU C library defines this for functions which it implements
7030     to always fail with ENOSYS.  Some functions are actually named
7031     something starting with __ and the normal name is an alias.  */
7032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7033 choke me
7034 #else
7035 $ac_func();
7036 #endif
7037
7038 ; return 0; }
7039 EOF
7040 if { (eval echo configure:7041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7041   rm -rf conftest*
7042   eval "ac_cv_func_$ac_func=yes"
7043 else
7044   echo "configure: failed program was:" >&5
7045   cat conftest.$ac_ext >&5
7046   rm -rf conftest*
7047   eval "ac_cv_func_$ac_func=no"
7048 fi
7049 rm -f conftest*
7050 fi
7051
7052 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7053   echo "$ac_t""yes" 1>&6
7054     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7055   cat >> confdefs.h <<EOF
7056 #define $ac_tr_func 1
7057 EOF
7058  
7059 else
7060   echo "$ac_t""no" 1>&6
7061 fi
7062 done
7063
7064   ;;
7065   esac
7066
7067
7068 case "$LIBS" in
7069   *-lsecurity*) for ac_func in set_auth_parameters
7070 do
7071 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7072 echo "configure:7073: checking for $ac_func" >&5
7073 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7074   echo $ac_n "(cached) $ac_c" 1>&6
7075 else
7076   cat > conftest.$ac_ext <<EOF
7077 #line 7078 "configure"
7078 #include "confdefs.h"
7079 /* System header to define __stub macros and hopefully few prototypes,
7080     which can conflict with char $ac_func(); below.  */
7081 #include <assert.h>
7082 /* Override any gcc2 internal prototype to avoid an error.  */
7083 /* We use char because int might match the return type of a gcc2
7084     builtin and then its argument prototype would still apply.  */
7085 char $ac_func();
7086
7087 int main() {
7088
7089 /* The GNU C library defines this for functions which it implements
7090     to always fail with ENOSYS.  Some functions are actually named
7091     something starting with __ and the normal name is an alias.  */
7092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7093 choke me
7094 #else
7095 $ac_func();
7096 #endif
7097
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   eval "ac_cv_func_$ac_func=yes"
7103 else
7104   echo "configure: failed program was:" >&5
7105   cat conftest.$ac_ext >&5
7106   rm -rf conftest*
7107   eval "ac_cv_func_$ac_func=no"
7108 fi
7109 rm -f conftest*
7110 fi
7111
7112 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7113   echo "$ac_t""yes" 1>&6
7114     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7115   cat >> confdefs.h <<EOF
7116 #define $ac_tr_func 1
7117 EOF
7118  
7119 else
7120   echo "$ac_t""no" 1>&6
7121 fi
7122 done
7123  ;;
7124   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7125 echo "configure:7126: checking for set_auth_parameters in -lsecurity" >&5
7126 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7127 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7128   echo $ac_n "(cached) $ac_c" 1>&6
7129 else
7130   ac_save_LIBS="$LIBS"
7131 LIBS="-lsecurity  $LIBS"
7132 cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135 /* Override any gcc2 internal prototype to avoid an error.  */
7136 /* We use char because int might match the return type of a gcc2
7137     builtin and then its argument prototype would still apply.  */
7138 char set_auth_parameters();
7139
7140 int main() {
7141 set_auth_parameters()
7142 ; return 0; }
7143 EOF
7144 if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7145   rm -rf conftest*
7146   eval "ac_cv_lib_$ac_lib_var=yes"
7147 else
7148   echo "configure: failed program was:" >&5
7149   cat conftest.$ac_ext >&5
7150   rm -rf conftest*
7151   eval "ac_cv_lib_$ac_lib_var=no"
7152 fi
7153 rm -f conftest*
7154 LIBS="$ac_save_LIBS"
7155
7156 fi
7157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7158   echo "$ac_t""yes" 1>&6
7159     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7160     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7161   cat >> confdefs.h <<EOF
7162 #define $ac_tr_lib 1
7163 EOF
7164
7165   LIBS="-lsecurity $LIBS"
7166
7167 else
7168   echo "$ac_t""no" 1>&6
7169 fi
7170  
7171      for ac_func in set_auth_parameters
7172 do
7173 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7174 echo "configure:7175: checking for $ac_func" >&5
7175 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7176   echo $ac_n "(cached) $ac_c" 1>&6
7177 else
7178   cat > conftest.$ac_ext <<EOF
7179 #line 7180 "configure"
7180 #include "confdefs.h"
7181 /* System header to define __stub macros and hopefully few prototypes,
7182     which can conflict with char $ac_func(); below.  */
7183 #include <assert.h>
7184 /* Override any gcc2 internal prototype to avoid an error.  */
7185 /* We use char because int might match the return type of a gcc2
7186     builtin and then its argument prototype would still apply.  */
7187 char $ac_func();
7188
7189 int main() {
7190
7191 /* The GNU C library defines this for functions which it implements
7192     to always fail with ENOSYS.  Some functions are actually named
7193     something starting with __ and the normal name is an alias.  */
7194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7195 choke me
7196 #else
7197 $ac_func();
7198 #endif
7199
7200 ; return 0; }
7201 EOF
7202 if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7203   rm -rf conftest*
7204   eval "ac_cv_func_$ac_func=yes"
7205 else
7206   echo "configure: failed program was:" >&5
7207   cat conftest.$ac_ext >&5
7208   rm -rf conftest*
7209   eval "ac_cv_func_$ac_func=no"
7210 fi
7211 rm -f conftest*
7212 fi
7213
7214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7215   echo "$ac_t""yes" 1>&6
7216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7217   cat >> confdefs.h <<EOF
7218 #define $ac_tr_func 1
7219 EOF
7220  
7221 else
7222   echo "$ac_t""no" 1>&6
7223 fi
7224 done
7225
7226   ;;
7227   esac
7228
7229 case "$LIBS" in
7230   *-lsec*) for ac_func in set_auth_parameters
7231 do
7232 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7233 echo "configure:7234: checking for $ac_func" >&5
7234 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7235   echo $ac_n "(cached) $ac_c" 1>&6
7236 else
7237   cat > conftest.$ac_ext <<EOF
7238 #line 7239 "configure"
7239 #include "confdefs.h"
7240 /* System header to define __stub macros and hopefully few prototypes,
7241     which can conflict with char $ac_func(); below.  */
7242 #include <assert.h>
7243 /* Override any gcc2 internal prototype to avoid an error.  */
7244 /* We use char because int might match the return type of a gcc2
7245     builtin and then its argument prototype would still apply.  */
7246 char $ac_func();
7247
7248 int main() {
7249
7250 /* The GNU C library defines this for functions which it implements
7251     to always fail with ENOSYS.  Some functions are actually named
7252     something starting with __ and the normal name is an alias.  */
7253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7254 choke me
7255 #else
7256 $ac_func();
7257 #endif
7258
7259 ; return 0; }
7260 EOF
7261 if { (eval echo configure:7262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7262   rm -rf conftest*
7263   eval "ac_cv_func_$ac_func=yes"
7264 else
7265   echo "configure: failed program was:" >&5
7266   cat conftest.$ac_ext >&5
7267   rm -rf conftest*
7268   eval "ac_cv_func_$ac_func=no"
7269 fi
7270 rm -f conftest*
7271 fi
7272
7273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7274   echo "$ac_t""yes" 1>&6
7275     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7276   cat >> confdefs.h <<EOF
7277 #define $ac_tr_func 1
7278 EOF
7279  
7280 else
7281   echo "$ac_t""no" 1>&6
7282 fi
7283 done
7284  ;;
7285   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7286 echo "configure:7287: checking for set_auth_parameters in -lsec" >&5
7287 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7288 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7289   echo $ac_n "(cached) $ac_c" 1>&6
7290 else
7291   ac_save_LIBS="$LIBS"
7292 LIBS="-lsec  $LIBS"
7293 cat > conftest.$ac_ext <<EOF
7294 #line 7295 "configure"
7295 #include "confdefs.h"
7296 /* Override any gcc2 internal prototype to avoid an error.  */
7297 /* We use char because int might match the return type of a gcc2
7298     builtin and then its argument prototype would still apply.  */
7299 char set_auth_parameters();
7300
7301 int main() {
7302 set_auth_parameters()
7303 ; return 0; }
7304 EOF
7305 if { (eval echo configure:7306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7306   rm -rf conftest*
7307   eval "ac_cv_lib_$ac_lib_var=yes"
7308 else
7309   echo "configure: failed program was:" >&5
7310   cat conftest.$ac_ext >&5
7311   rm -rf conftest*
7312   eval "ac_cv_lib_$ac_lib_var=no"
7313 fi
7314 rm -f conftest*
7315 LIBS="$ac_save_LIBS"
7316
7317 fi
7318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7319   echo "$ac_t""yes" 1>&6
7320     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7321     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7322   cat >> confdefs.h <<EOF
7323 #define $ac_tr_lib 1
7324 EOF
7325
7326   LIBS="-lsec $LIBS"
7327
7328 else
7329   echo "$ac_t""no" 1>&6
7330 fi
7331  
7332      for ac_func in set_auth_parameters
7333 do
7334 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7335 echo "configure:7336: checking for $ac_func" >&5
7336 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7337   echo $ac_n "(cached) $ac_c" 1>&6
7338 else
7339   cat > conftest.$ac_ext <<EOF
7340 #line 7341 "configure"
7341 #include "confdefs.h"
7342 /* System header to define __stub macros and hopefully few prototypes,
7343     which can conflict with char $ac_func(); below.  */
7344 #include <assert.h>
7345 /* Override any gcc2 internal prototype to avoid an error.  */
7346 /* We use char because int might match the return type of a gcc2
7347     builtin and then its argument prototype would still apply.  */
7348 char $ac_func();
7349
7350 int main() {
7351
7352 /* The GNU C library defines this for functions which it implements
7353     to always fail with ENOSYS.  Some functions are actually named
7354     something starting with __ and the normal name is an alias.  */
7355 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7356 choke me
7357 #else
7358 $ac_func();
7359 #endif
7360
7361 ; return 0; }
7362 EOF
7363 if { (eval echo configure:7364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7364   rm -rf conftest*
7365   eval "ac_cv_func_$ac_func=yes"
7366 else
7367   echo "configure: failed program was:" >&5
7368   cat conftest.$ac_ext >&5
7369   rm -rf conftest*
7370   eval "ac_cv_func_$ac_func=no"
7371 fi
7372 rm -f conftest*
7373 fi
7374
7375 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7376   echo "$ac_t""yes" 1>&6
7377     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7378   cat >> confdefs.h <<EOF
7379 #define $ac_tr_func 1
7380 EOF
7381  
7382 else
7383   echo "$ac_t""no" 1>&6
7384 fi
7385 done
7386
7387   ;;
7388   esac
7389
7390
7391 # UnixWare 7.x has its getspnam in -lgen
7392 case "$LIBS" in
7393   *-lgen*) for ac_func in getspnam
7394 do
7395 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7396 echo "configure:7397: checking for $ac_func" >&5
7397 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7398   echo $ac_n "(cached) $ac_c" 1>&6
7399 else
7400   cat > conftest.$ac_ext <<EOF
7401 #line 7402 "configure"
7402 #include "confdefs.h"
7403 /* System header to define __stub macros and hopefully few prototypes,
7404     which can conflict with char $ac_func(); below.  */
7405 #include <assert.h>
7406 /* Override any gcc2 internal prototype to avoid an error.  */
7407 /* We use char because int might match the return type of a gcc2
7408     builtin and then its argument prototype would still apply.  */
7409 char $ac_func();
7410
7411 int main() {
7412
7413 /* The GNU C library defines this for functions which it implements
7414     to always fail with ENOSYS.  Some functions are actually named
7415     something starting with __ and the normal name is an alias.  */
7416 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7417 choke me
7418 #else
7419 $ac_func();
7420 #endif
7421
7422 ; return 0; }
7423 EOF
7424 if { (eval echo configure:7425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7425   rm -rf conftest*
7426   eval "ac_cv_func_$ac_func=yes"
7427 else
7428   echo "configure: failed program was:" >&5
7429   cat conftest.$ac_ext >&5
7430   rm -rf conftest*
7431   eval "ac_cv_func_$ac_func=no"
7432 fi
7433 rm -f conftest*
7434 fi
7435
7436 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7437   echo "$ac_t""yes" 1>&6
7438     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7439   cat >> confdefs.h <<EOF
7440 #define $ac_tr_func 1
7441 EOF
7442  
7443 else
7444   echo "$ac_t""no" 1>&6
7445 fi
7446 done
7447  ;;
7448   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7449 echo "configure:7450: checking for getspnam in -lgen" >&5
7450 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7451 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7452   echo $ac_n "(cached) $ac_c" 1>&6
7453 else
7454   ac_save_LIBS="$LIBS"
7455 LIBS="-lgen  $LIBS"
7456 cat > conftest.$ac_ext <<EOF
7457 #line 7458 "configure"
7458 #include "confdefs.h"
7459 /* Override any gcc2 internal prototype to avoid an error.  */
7460 /* We use char because int might match the return type of a gcc2
7461     builtin and then its argument prototype would still apply.  */
7462 char getspnam();
7463
7464 int main() {
7465 getspnam()
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_lib_$ac_lib_var=yes"
7471 else
7472   echo "configure: failed program was:" >&5
7473   cat conftest.$ac_ext >&5
7474   rm -rf conftest*
7475   eval "ac_cv_lib_$ac_lib_var=no"
7476 fi
7477 rm -f conftest*
7478 LIBS="$ac_save_LIBS"
7479
7480 fi
7481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7482   echo "$ac_t""yes" 1>&6
7483     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7484     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7485   cat >> confdefs.h <<EOF
7486 #define $ac_tr_lib 1
7487 EOF
7488
7489   LIBS="-lgen $LIBS"
7490
7491 else
7492   echo "$ac_t""no" 1>&6
7493 fi
7494  
7495      for ac_func in getspnam
7496 do
7497 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7498 echo "configure:7499: checking for $ac_func" >&5
7499 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7500   echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502   cat > conftest.$ac_ext <<EOF
7503 #line 7504 "configure"
7504 #include "confdefs.h"
7505 /* System header to define __stub macros and hopefully few prototypes,
7506     which can conflict with char $ac_func(); below.  */
7507 #include <assert.h>
7508 /* Override any gcc2 internal prototype to avoid an error.  */
7509 /* We use char because int might match the return type of a gcc2
7510     builtin and then its argument prototype would still apply.  */
7511 char $ac_func();
7512
7513 int main() {
7514
7515 /* The GNU C library defines this for functions which it implements
7516     to always fail with ENOSYS.  Some functions are actually named
7517     something starting with __ and the normal name is an alias.  */
7518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7519 choke me
7520 #else
7521 $ac_func();
7522 #endif
7523
7524 ; return 0; }
7525 EOF
7526 if { (eval echo configure:7527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7527   rm -rf conftest*
7528   eval "ac_cv_func_$ac_func=yes"
7529 else
7530   echo "configure: failed program was:" >&5
7531   cat conftest.$ac_ext >&5
7532   rm -rf conftest*
7533   eval "ac_cv_func_$ac_func=no"
7534 fi
7535 rm -f conftest*
7536 fi
7537
7538 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7539   echo "$ac_t""yes" 1>&6
7540     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7541   cat >> confdefs.h <<EOF
7542 #define $ac_tr_func 1
7543 EOF
7544  
7545 else
7546   echo "$ac_t""no" 1>&6
7547 fi
7548 done
7549
7550   ;;
7551   esac
7552
7553
7554 case "$LIBS" in
7555   *-lsecurity*) for ac_func in getspnam
7556 do
7557 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7558 echo "configure:7559: checking for $ac_func" >&5
7559 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7560   echo $ac_n "(cached) $ac_c" 1>&6
7561 else
7562   cat > conftest.$ac_ext <<EOF
7563 #line 7564 "configure"
7564 #include "confdefs.h"
7565 /* System header to define __stub macros and hopefully few prototypes,
7566     which can conflict with char $ac_func(); below.  */
7567 #include <assert.h>
7568 /* Override any gcc2 internal prototype to avoid an error.  */
7569 /* We use char because int might match the return type of a gcc2
7570     builtin and then its argument prototype would still apply.  */
7571 char $ac_func();
7572
7573 int main() {
7574
7575 /* The GNU C library defines this for functions which it implements
7576     to always fail with ENOSYS.  Some functions are actually named
7577     something starting with __ and the normal name is an alias.  */
7578 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7579 choke me
7580 #else
7581 $ac_func();
7582 #endif
7583
7584 ; return 0; }
7585 EOF
7586 if { (eval echo configure:7587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7587   rm -rf conftest*
7588   eval "ac_cv_func_$ac_func=yes"
7589 else
7590   echo "configure: failed program was:" >&5
7591   cat conftest.$ac_ext >&5
7592   rm -rf conftest*
7593   eval "ac_cv_func_$ac_func=no"
7594 fi
7595 rm -f conftest*
7596 fi
7597
7598 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7599   echo "$ac_t""yes" 1>&6
7600     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7601   cat >> confdefs.h <<EOF
7602 #define $ac_tr_func 1
7603 EOF
7604  
7605 else
7606   echo "$ac_t""no" 1>&6
7607 fi
7608 done
7609  ;;
7610   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7611 echo "configure:7612: checking for getspnam in -lsecurity" >&5
7612 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7614   echo $ac_n "(cached) $ac_c" 1>&6
7615 else
7616   ac_save_LIBS="$LIBS"
7617 LIBS="-lsecurity  $LIBS"
7618 cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 /* Override any gcc2 internal prototype to avoid an error.  */
7622 /* We use char because int might match the return type of a gcc2
7623     builtin and then its argument prototype would still apply.  */
7624 char getspnam();
7625
7626 int main() {
7627 getspnam()
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_lib_$ac_lib_var=yes"
7633 else
7634   echo "configure: failed program was:" >&5
7635   cat conftest.$ac_ext >&5
7636   rm -rf conftest*
7637   eval "ac_cv_lib_$ac_lib_var=no"
7638 fi
7639 rm -f conftest*
7640 LIBS="$ac_save_LIBS"
7641
7642 fi
7643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7644   echo "$ac_t""yes" 1>&6
7645     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7646     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7647   cat >> confdefs.h <<EOF
7648 #define $ac_tr_lib 1
7649 EOF
7650
7651   LIBS="-lsecurity $LIBS"
7652
7653 else
7654   echo "$ac_t""no" 1>&6
7655 fi
7656  
7657      for ac_func in getspnam
7658 do
7659 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7660 echo "configure:7661: checking for $ac_func" >&5
7661 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7662   echo $ac_n "(cached) $ac_c" 1>&6
7663 else
7664   cat > conftest.$ac_ext <<EOF
7665 #line 7666 "configure"
7666 #include "confdefs.h"
7667 /* System header to define __stub macros and hopefully few prototypes,
7668     which can conflict with char $ac_func(); below.  */
7669 #include <assert.h>
7670 /* Override any gcc2 internal prototype to avoid an error.  */
7671 /* We use char because int might match the return type of a gcc2
7672     builtin and then its argument prototype would still apply.  */
7673 char $ac_func();
7674
7675 int main() {
7676
7677 /* The GNU C library defines this for functions which it implements
7678     to always fail with ENOSYS.  Some functions are actually named
7679     something starting with __ and the normal name is an alias.  */
7680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7681 choke me
7682 #else
7683 $ac_func();
7684 #endif
7685
7686 ; return 0; }
7687 EOF
7688 if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7689   rm -rf conftest*
7690   eval "ac_cv_func_$ac_func=yes"
7691 else
7692   echo "configure: failed program was:" >&5
7693   cat conftest.$ac_ext >&5
7694   rm -rf conftest*
7695   eval "ac_cv_func_$ac_func=no"
7696 fi
7697 rm -f conftest*
7698 fi
7699
7700 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7701   echo "$ac_t""yes" 1>&6
7702     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7703   cat >> confdefs.h <<EOF
7704 #define $ac_tr_func 1
7705 EOF
7706  
7707 else
7708   echo "$ac_t""no" 1>&6
7709 fi
7710 done
7711
7712   ;;
7713   esac
7714
7715 case "$LIBS" in
7716   *-lsec*) for ac_func in getspnam
7717 do
7718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7719 echo "configure:7720: checking for $ac_func" >&5
7720 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7721   echo $ac_n "(cached) $ac_c" 1>&6
7722 else
7723   cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 /* System header to define __stub macros and hopefully few prototypes,
7727     which can conflict with char $ac_func(); below.  */
7728 #include <assert.h>
7729 /* Override any gcc2 internal prototype to avoid an error.  */
7730 /* We use char because int might match the return type of a gcc2
7731     builtin and then its argument prototype would still apply.  */
7732 char $ac_func();
7733
7734 int main() {
7735
7736 /* The GNU C library defines this for functions which it implements
7737     to always fail with ENOSYS.  Some functions are actually named
7738     something starting with __ and the normal name is an alias.  */
7739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7740 choke me
7741 #else
7742 $ac_func();
7743 #endif
7744
7745 ; return 0; }
7746 EOF
7747 if { (eval echo configure:7748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7748   rm -rf conftest*
7749   eval "ac_cv_func_$ac_func=yes"
7750 else
7751   echo "configure: failed program was:" >&5
7752   cat conftest.$ac_ext >&5
7753   rm -rf conftest*
7754   eval "ac_cv_func_$ac_func=no"
7755 fi
7756 rm -f conftest*
7757 fi
7758
7759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7760   echo "$ac_t""yes" 1>&6
7761     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7762   cat >> confdefs.h <<EOF
7763 #define $ac_tr_func 1
7764 EOF
7765  
7766 else
7767   echo "$ac_t""no" 1>&6
7768 fi
7769 done
7770  ;;
7771   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7772 echo "configure:7773: checking for getspnam in -lsec" >&5
7773 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7774 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7775   echo $ac_n "(cached) $ac_c" 1>&6
7776 else
7777   ac_save_LIBS="$LIBS"
7778 LIBS="-lsec  $LIBS"
7779 cat > conftest.$ac_ext <<EOF
7780 #line 7781 "configure"
7781 #include "confdefs.h"
7782 /* Override any gcc2 internal prototype to avoid an error.  */
7783 /* We use char because int might match the return type of a gcc2
7784     builtin and then its argument prototype would still apply.  */
7785 char getspnam();
7786
7787 int main() {
7788 getspnam()
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_lib_$ac_lib_var=yes"
7794 else
7795   echo "configure: failed program was:" >&5
7796   cat conftest.$ac_ext >&5
7797   rm -rf conftest*
7798   eval "ac_cv_lib_$ac_lib_var=no"
7799 fi
7800 rm -f conftest*
7801 LIBS="$ac_save_LIBS"
7802
7803 fi
7804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7805   echo "$ac_t""yes" 1>&6
7806     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7807     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7808   cat >> confdefs.h <<EOF
7809 #define $ac_tr_lib 1
7810 EOF
7811
7812   LIBS="-lsec $LIBS"
7813
7814 else
7815   echo "$ac_t""no" 1>&6
7816 fi
7817  
7818      for ac_func in getspnam
7819 do
7820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7821 echo "configure:7822: checking for $ac_func" >&5
7822 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7823   echo $ac_n "(cached) $ac_c" 1>&6
7824 else
7825   cat > conftest.$ac_ext <<EOF
7826 #line 7827 "configure"
7827 #include "confdefs.h"
7828 /* System header to define __stub macros and hopefully few prototypes,
7829     which can conflict with char $ac_func(); below.  */
7830 #include <assert.h>
7831 /* Override any gcc2 internal prototype to avoid an error.  */
7832 /* We use char because int might match the return type of a gcc2
7833     builtin and then its argument prototype would still apply.  */
7834 char $ac_func();
7835
7836 int main() {
7837
7838 /* The GNU C library defines this for functions which it implements
7839     to always fail with ENOSYS.  Some functions are actually named
7840     something starting with __ and the normal name is an alias.  */
7841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7842 choke me
7843 #else
7844 $ac_func();
7845 #endif
7846
7847 ; return 0; }
7848 EOF
7849 if { (eval echo configure:7850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7850   rm -rf conftest*
7851   eval "ac_cv_func_$ac_func=yes"
7852 else
7853   echo "configure: failed program was:" >&5
7854   cat conftest.$ac_ext >&5
7855   rm -rf conftest*
7856   eval "ac_cv_func_$ac_func=no"
7857 fi
7858 rm -f conftest*
7859 fi
7860
7861 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7862   echo "$ac_t""yes" 1>&6
7863     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7864   cat >> confdefs.h <<EOF
7865 #define $ac_tr_func 1
7866 EOF
7867  
7868 else
7869   echo "$ac_t""no" 1>&6
7870 fi
7871 done
7872
7873   ;;
7874   esac
7875
7876
7877 case "$LIBS" in
7878   *-lsecurity*) for ac_func in bigcrypt
7879 do
7880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7881 echo "configure:7882: checking for $ac_func" >&5
7882 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7883   echo $ac_n "(cached) $ac_c" 1>&6
7884 else
7885   cat > conftest.$ac_ext <<EOF
7886 #line 7887 "configure"
7887 #include "confdefs.h"
7888 /* System header to define __stub macros and hopefully few prototypes,
7889     which can conflict with char $ac_func(); below.  */
7890 #include <assert.h>
7891 /* Override any gcc2 internal prototype to avoid an error.  */
7892 /* We use char because int might match the return type of a gcc2
7893     builtin and then its argument prototype would still apply.  */
7894 char $ac_func();
7895
7896 int main() {
7897
7898 /* The GNU C library defines this for functions which it implements
7899     to always fail with ENOSYS.  Some functions are actually named
7900     something starting with __ and the normal name is an alias.  */
7901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7902 choke me
7903 #else
7904 $ac_func();
7905 #endif
7906
7907 ; return 0; }
7908 EOF
7909 if { (eval echo configure:7910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7910   rm -rf conftest*
7911   eval "ac_cv_func_$ac_func=yes"
7912 else
7913   echo "configure: failed program was:" >&5
7914   cat conftest.$ac_ext >&5
7915   rm -rf conftest*
7916   eval "ac_cv_func_$ac_func=no"
7917 fi
7918 rm -f conftest*
7919 fi
7920
7921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7922   echo "$ac_t""yes" 1>&6
7923     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7924   cat >> confdefs.h <<EOF
7925 #define $ac_tr_func 1
7926 EOF
7927  
7928 else
7929   echo "$ac_t""no" 1>&6
7930 fi
7931 done
7932  ;;
7933   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7934 echo "configure:7935: checking for bigcrypt in -lsecurity" >&5
7935 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7936 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7937   echo $ac_n "(cached) $ac_c" 1>&6
7938 else
7939   ac_save_LIBS="$LIBS"
7940 LIBS="-lsecurity  $LIBS"
7941 cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 /* Override any gcc2 internal prototype to avoid an error.  */
7945 /* We use char because int might match the return type of a gcc2
7946     builtin and then its argument prototype would still apply.  */
7947 char bigcrypt();
7948
7949 int main() {
7950 bigcrypt()
7951 ; return 0; }
7952 EOF
7953 if { (eval echo configure:7954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7954   rm -rf conftest*
7955   eval "ac_cv_lib_$ac_lib_var=yes"
7956 else
7957   echo "configure: failed program was:" >&5
7958   cat conftest.$ac_ext >&5
7959   rm -rf conftest*
7960   eval "ac_cv_lib_$ac_lib_var=no"
7961 fi
7962 rm -f conftest*
7963 LIBS="$ac_save_LIBS"
7964
7965 fi
7966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7967   echo "$ac_t""yes" 1>&6
7968     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7969     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7970   cat >> confdefs.h <<EOF
7971 #define $ac_tr_lib 1
7972 EOF
7973
7974   LIBS="-lsecurity $LIBS"
7975
7976 else
7977   echo "$ac_t""no" 1>&6
7978 fi
7979  
7980      for ac_func in bigcrypt
7981 do
7982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7983 echo "configure:7984: checking for $ac_func" >&5
7984 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7985   echo $ac_n "(cached) $ac_c" 1>&6
7986 else
7987   cat > conftest.$ac_ext <<EOF
7988 #line 7989 "configure"
7989 #include "confdefs.h"
7990 /* System header to define __stub macros and hopefully few prototypes,
7991     which can conflict with char $ac_func(); below.  */
7992 #include <assert.h>
7993 /* Override any gcc2 internal prototype to avoid an error.  */
7994 /* We use char because int might match the return type of a gcc2
7995     builtin and then its argument prototype would still apply.  */
7996 char $ac_func();
7997
7998 int main() {
7999
8000 /* The GNU C library defines this for functions which it implements
8001     to always fail with ENOSYS.  Some functions are actually named
8002     something starting with __ and the normal name is an alias.  */
8003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8004 choke me
8005 #else
8006 $ac_func();
8007 #endif
8008
8009 ; return 0; }
8010 EOF
8011 if { (eval echo configure:8012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8012   rm -rf conftest*
8013   eval "ac_cv_func_$ac_func=yes"
8014 else
8015   echo "configure: failed program was:" >&5
8016   cat conftest.$ac_ext >&5
8017   rm -rf conftest*
8018   eval "ac_cv_func_$ac_func=no"
8019 fi
8020 rm -f conftest*
8021 fi
8022
8023 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8024   echo "$ac_t""yes" 1>&6
8025     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8026   cat >> confdefs.h <<EOF
8027 #define $ac_tr_func 1
8028 EOF
8029  
8030 else
8031   echo "$ac_t""no" 1>&6
8032 fi
8033 done
8034
8035   ;;
8036   esac
8037
8038 case "$LIBS" in
8039   *-lsec*) for ac_func in bigcrypt
8040 do
8041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8042 echo "configure:8043: checking for $ac_func" >&5
8043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8044   echo $ac_n "(cached) $ac_c" 1>&6
8045 else
8046   cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049 /* System header to define __stub macros and hopefully few prototypes,
8050     which can conflict with char $ac_func(); below.  */
8051 #include <assert.h>
8052 /* Override any gcc2 internal prototype to avoid an error.  */
8053 /* We use char because int might match the return type of a gcc2
8054     builtin and then its argument prototype would still apply.  */
8055 char $ac_func();
8056
8057 int main() {
8058
8059 /* The GNU C library defines this for functions which it implements
8060     to always fail with ENOSYS.  Some functions are actually named
8061     something starting with __ and the normal name is an alias.  */
8062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8063 choke me
8064 #else
8065 $ac_func();
8066 #endif
8067
8068 ; return 0; }
8069 EOF
8070 if { (eval echo configure:8071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8071   rm -rf conftest*
8072   eval "ac_cv_func_$ac_func=yes"
8073 else
8074   echo "configure: failed program was:" >&5
8075   cat conftest.$ac_ext >&5
8076   rm -rf conftest*
8077   eval "ac_cv_func_$ac_func=no"
8078 fi
8079 rm -f conftest*
8080 fi
8081
8082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8083   echo "$ac_t""yes" 1>&6
8084     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8085   cat >> confdefs.h <<EOF
8086 #define $ac_tr_func 1
8087 EOF
8088  
8089 else
8090   echo "$ac_t""no" 1>&6
8091 fi
8092 done
8093  ;;
8094   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8095 echo "configure:8096: checking for bigcrypt in -lsec" >&5
8096 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8097 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8098   echo $ac_n "(cached) $ac_c" 1>&6
8099 else
8100   ac_save_LIBS="$LIBS"
8101 LIBS="-lsec  $LIBS"
8102 cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105 /* Override any gcc2 internal prototype to avoid an error.  */
8106 /* We use char because int might match the return type of a gcc2
8107     builtin and then its argument prototype would still apply.  */
8108 char bigcrypt();
8109
8110 int main() {
8111 bigcrypt()
8112 ; return 0; }
8113 EOF
8114 if { (eval echo configure:8115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8115   rm -rf conftest*
8116   eval "ac_cv_lib_$ac_lib_var=yes"
8117 else
8118   echo "configure: failed program was:" >&5
8119   cat conftest.$ac_ext >&5
8120   rm -rf conftest*
8121   eval "ac_cv_lib_$ac_lib_var=no"
8122 fi
8123 rm -f conftest*
8124 LIBS="$ac_save_LIBS"
8125
8126 fi
8127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8128   echo "$ac_t""yes" 1>&6
8129     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8130     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8131   cat >> confdefs.h <<EOF
8132 #define $ac_tr_lib 1
8133 EOF
8134
8135   LIBS="-lsec $LIBS"
8136
8137 else
8138   echo "$ac_t""no" 1>&6
8139 fi
8140  
8141      for ac_func in bigcrypt
8142 do
8143 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8144 echo "configure:8145: checking for $ac_func" >&5
8145 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8146   echo $ac_n "(cached) $ac_c" 1>&6
8147 else
8148   cat > conftest.$ac_ext <<EOF
8149 #line 8150 "configure"
8150 #include "confdefs.h"
8151 /* System header to define __stub macros and hopefully few prototypes,
8152     which can conflict with char $ac_func(); below.  */
8153 #include <assert.h>
8154 /* Override any gcc2 internal prototype to avoid an error.  */
8155 /* We use char because int might match the return type of a gcc2
8156     builtin and then its argument prototype would still apply.  */
8157 char $ac_func();
8158
8159 int main() {
8160
8161 /* The GNU C library defines this for functions which it implements
8162     to always fail with ENOSYS.  Some functions are actually named
8163     something starting with __ and the normal name is an alias.  */
8164 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8165 choke me
8166 #else
8167 $ac_func();
8168 #endif
8169
8170 ; return 0; }
8171 EOF
8172 if { (eval echo configure:8173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8173   rm -rf conftest*
8174   eval "ac_cv_func_$ac_func=yes"
8175 else
8176   echo "configure: failed program was:" >&5
8177   cat conftest.$ac_ext >&5
8178   rm -rf conftest*
8179   eval "ac_cv_func_$ac_func=no"
8180 fi
8181 rm -f conftest*
8182 fi
8183
8184 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8185   echo "$ac_t""yes" 1>&6
8186     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8187   cat >> confdefs.h <<EOF
8188 #define $ac_tr_func 1
8189 EOF
8190  
8191 else
8192   echo "$ac_t""no" 1>&6
8193 fi
8194 done
8195
8196   ;;
8197   esac
8198
8199
8200 case "$LIBS" in
8201   *-lsecurity*) for ac_func in getprpwnam
8202 do
8203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8204 echo "configure:8205: checking for $ac_func" >&5
8205 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8206   echo $ac_n "(cached) $ac_c" 1>&6
8207 else
8208   cat > conftest.$ac_ext <<EOF
8209 #line 8210 "configure"
8210 #include "confdefs.h"
8211 /* System header to define __stub macros and hopefully few prototypes,
8212     which can conflict with char $ac_func(); below.  */
8213 #include <assert.h>
8214 /* Override any gcc2 internal prototype to avoid an error.  */
8215 /* We use char because int might match the return type of a gcc2
8216     builtin and then its argument prototype would still apply.  */
8217 char $ac_func();
8218
8219 int main() {
8220
8221 /* The GNU C library defines this for functions which it implements
8222     to always fail with ENOSYS.  Some functions are actually named
8223     something starting with __ and the normal name is an alias.  */
8224 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8225 choke me
8226 #else
8227 $ac_func();
8228 #endif
8229
8230 ; return 0; }
8231 EOF
8232 if { (eval echo configure:8233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8233   rm -rf conftest*
8234   eval "ac_cv_func_$ac_func=yes"
8235 else
8236   echo "configure: failed program was:" >&5
8237   cat conftest.$ac_ext >&5
8238   rm -rf conftest*
8239   eval "ac_cv_func_$ac_func=no"
8240 fi
8241 rm -f conftest*
8242 fi
8243
8244 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8245   echo "$ac_t""yes" 1>&6
8246     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8247   cat >> confdefs.h <<EOF
8248 #define $ac_tr_func 1
8249 EOF
8250  
8251 else
8252   echo "$ac_t""no" 1>&6
8253 fi
8254 done
8255  ;;
8256   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8257 echo "configure:8258: checking for getprpwnam in -lsecurity" >&5
8258 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8259 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8260   echo $ac_n "(cached) $ac_c" 1>&6
8261 else
8262   ac_save_LIBS="$LIBS"
8263 LIBS="-lsecurity  $LIBS"
8264 cat > conftest.$ac_ext <<EOF
8265 #line 8266 "configure"
8266 #include "confdefs.h"
8267 /* Override any gcc2 internal prototype to avoid an error.  */
8268 /* We use char because int might match the return type of a gcc2
8269     builtin and then its argument prototype would still apply.  */
8270 char getprpwnam();
8271
8272 int main() {
8273 getprpwnam()
8274 ; return 0; }
8275 EOF
8276 if { (eval echo configure:8277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8277   rm -rf conftest*
8278   eval "ac_cv_lib_$ac_lib_var=yes"
8279 else
8280   echo "configure: failed program was:" >&5
8281   cat conftest.$ac_ext >&5
8282   rm -rf conftest*
8283   eval "ac_cv_lib_$ac_lib_var=no"
8284 fi
8285 rm -f conftest*
8286 LIBS="$ac_save_LIBS"
8287
8288 fi
8289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8290   echo "$ac_t""yes" 1>&6
8291     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8292     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8293   cat >> confdefs.h <<EOF
8294 #define $ac_tr_lib 1
8295 EOF
8296
8297   LIBS="-lsecurity $LIBS"
8298
8299 else
8300   echo "$ac_t""no" 1>&6
8301 fi
8302  
8303      for ac_func in getprpwnam
8304 do
8305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8306 echo "configure:8307: checking for $ac_func" >&5
8307 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8308   echo $ac_n "(cached) $ac_c" 1>&6
8309 else
8310   cat > conftest.$ac_ext <<EOF
8311 #line 8312 "configure"
8312 #include "confdefs.h"
8313 /* System header to define __stub macros and hopefully few prototypes,
8314     which can conflict with char $ac_func(); below.  */
8315 #include <assert.h>
8316 /* Override any gcc2 internal prototype to avoid an error.  */
8317 /* We use char because int might match the return type of a gcc2
8318     builtin and then its argument prototype would still apply.  */
8319 char $ac_func();
8320
8321 int main() {
8322
8323 /* The GNU C library defines this for functions which it implements
8324     to always fail with ENOSYS.  Some functions are actually named
8325     something starting with __ and the normal name is an alias.  */
8326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8327 choke me
8328 #else
8329 $ac_func();
8330 #endif
8331
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8335   rm -rf conftest*
8336   eval "ac_cv_func_$ac_func=yes"
8337 else
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   eval "ac_cv_func_$ac_func=no"
8342 fi
8343 rm -f conftest*
8344 fi
8345
8346 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8347   echo "$ac_t""yes" 1>&6
8348     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8349   cat >> confdefs.h <<EOF
8350 #define $ac_tr_func 1
8351 EOF
8352  
8353 else
8354   echo "$ac_t""no" 1>&6
8355 fi
8356 done
8357
8358   ;;
8359   esac
8360
8361 case "$LIBS" in
8362   *-lsec*) for ac_func in getprpwnam
8363 do
8364 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8365 echo "configure:8366: checking for $ac_func" >&5
8366 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8367   echo $ac_n "(cached) $ac_c" 1>&6
8368 else
8369   cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 /* System header to define __stub macros and hopefully few prototypes,
8373     which can conflict with char $ac_func(); below.  */
8374 #include <assert.h>
8375 /* Override any gcc2 internal prototype to avoid an error.  */
8376 /* We use char because int might match the return type of a gcc2
8377     builtin and then its argument prototype would still apply.  */
8378 char $ac_func();
8379
8380 int main() {
8381
8382 /* The GNU C library defines this for functions which it implements
8383     to always fail with ENOSYS.  Some functions are actually named
8384     something starting with __ and the normal name is an alias.  */
8385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8386 choke me
8387 #else
8388 $ac_func();
8389 #endif
8390
8391 ; return 0; }
8392 EOF
8393 if { (eval echo configure:8394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8394   rm -rf conftest*
8395   eval "ac_cv_func_$ac_func=yes"
8396 else
8397   echo "configure: failed program was:" >&5
8398   cat conftest.$ac_ext >&5
8399   rm -rf conftest*
8400   eval "ac_cv_func_$ac_func=no"
8401 fi
8402 rm -f conftest*
8403 fi
8404
8405 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8406   echo "$ac_t""yes" 1>&6
8407     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8408   cat >> confdefs.h <<EOF
8409 #define $ac_tr_func 1
8410 EOF
8411  
8412 else
8413   echo "$ac_t""no" 1>&6
8414 fi
8415 done
8416  ;;
8417   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8418 echo "configure:8419: checking for getprpwnam in -lsec" >&5
8419 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8421   echo $ac_n "(cached) $ac_c" 1>&6
8422 else
8423   ac_save_LIBS="$LIBS"
8424 LIBS="-lsec  $LIBS"
8425 cat > conftest.$ac_ext <<EOF
8426 #line 8427 "configure"
8427 #include "confdefs.h"
8428 /* Override any gcc2 internal prototype to avoid an error.  */
8429 /* We use char because int might match the return type of a gcc2
8430     builtin and then its argument prototype would still apply.  */
8431 char getprpwnam();
8432
8433 int main() {
8434 getprpwnam()
8435 ; return 0; }
8436 EOF
8437 if { (eval echo configure:8438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8438   rm -rf conftest*
8439   eval "ac_cv_lib_$ac_lib_var=yes"
8440 else
8441   echo "configure: failed program was:" >&5
8442   cat conftest.$ac_ext >&5
8443   rm -rf conftest*
8444   eval "ac_cv_lib_$ac_lib_var=no"
8445 fi
8446 rm -f conftest*
8447 LIBS="$ac_save_LIBS"
8448
8449 fi
8450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8451   echo "$ac_t""yes" 1>&6
8452     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8453     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8454   cat >> confdefs.h <<EOF
8455 #define $ac_tr_lib 1
8456 EOF
8457
8458   LIBS="-lsec $LIBS"
8459
8460 else
8461   echo "$ac_t""no" 1>&6
8462 fi
8463  
8464      for ac_func in getprpwnam
8465 do
8466 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8467 echo "configure:8468: checking for $ac_func" >&5
8468 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8469   echo $ac_n "(cached) $ac_c" 1>&6
8470 else
8471   cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 /* System header to define __stub macros and hopefully few prototypes,
8475     which can conflict with char $ac_func(); below.  */
8476 #include <assert.h>
8477 /* Override any gcc2 internal prototype to avoid an error.  */
8478 /* We use char because int might match the return type of a gcc2
8479     builtin and then its argument prototype would still apply.  */
8480 char $ac_func();
8481
8482 int main() {
8483
8484 /* The GNU C library defines this for functions which it implements
8485     to always fail with ENOSYS.  Some functions are actually named
8486     something starting with __ and the normal name is an alias.  */
8487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8488 choke me
8489 #else
8490 $ac_func();
8491 #endif
8492
8493 ; return 0; }
8494 EOF
8495 if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8496   rm -rf conftest*
8497   eval "ac_cv_func_$ac_func=yes"
8498 else
8499   echo "configure: failed program was:" >&5
8500   cat conftest.$ac_ext >&5
8501   rm -rf conftest*
8502   eval "ac_cv_func_$ac_func=no"
8503 fi
8504 rm -f conftest*
8505 fi
8506
8507 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8508   echo "$ac_t""yes" 1>&6
8509     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8510   cat >> confdefs.h <<EOF
8511 #define $ac_tr_func 1
8512 EOF
8513  
8514 else
8515   echo "$ac_t""no" 1>&6
8516 fi
8517 done
8518
8519   ;;
8520   esac
8521
8522
8523 # this bit needs to be modified for each OS that is suported by
8524 # smbwrapper. You need to specify how to created a shared library and
8525 # how to compile C code to produce PIC object files
8526
8527 # these are the defaults, good for lots of systems
8528 HOST_OS="$host_os"
8529 LDSHFLAGS="-shared"
8530 SHLD="\${CC}"
8531 PICFLAG=""
8532 PICSUFFIX="po"
8533 POBAD_CC="#"
8534 SHLIBEXT="so"
8535 # Assume non-shared by default and override below
8536 BLDSHARED="false"
8537 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8538 echo "configure:8539: checking ability to build shared libraries" >&5
8539
8540 # and these are for particular systems
8541 case "$host_os" in
8542                 *linux*)   cat >> confdefs.h <<\EOF
8543 #define LINUX 1
8544 EOF
8545
8546                         BLDSHARED="true"
8547                         LDSHFLAGS="-shared" 
8548                         PICFLAG="-fPIC"
8549                         cat >> confdefs.h <<\EOF
8550 #define STAT_ST_BLOCKSIZE 512
8551 EOF
8552
8553                 ;;
8554                 *solaris*) cat >> confdefs.h <<\EOF
8555 #define SUNOS5 1
8556 EOF
8557
8558                         BLDSHARED="true"
8559                         LDSHFLAGS="-h \$@ -G"
8560                         if test "${ac_cv_prog_CC}" = "gcc"; then
8561                                 PICFLAG="-fPIC"
8562                         else
8563                                 PICFLAG="-KPIC"
8564                                 POBAD_CC=""
8565                                 PICSUFFIX="po.o"
8566                         fi
8567                         cat >> confdefs.h <<\EOF
8568 #define STAT_ST_BLOCKSIZE 512
8569 EOF
8570
8571                 ;;
8572                 *sunos*) cat >> confdefs.h <<\EOF
8573 #define SUNOS4 1
8574 EOF
8575
8576                         BLDSHARED="true"
8577                         LDSHFLAGS="-Wl,-h,\$@ -G"
8578                         PICFLAG="-KPIC"   # Is this correct for SunOS
8579                 ;;
8580                 *bsd*)  BLDSHARED="true"
8581                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8582                         PICFLAG="-fPIC"
8583                         cat >> confdefs.h <<\EOF
8584 #define STAT_ST_BLOCKSIZE 512
8585 EOF
8586
8587                 ;;
8588                 *irix*) cat >> confdefs.h <<\EOF
8589 #define IRIX 1
8590 EOF
8591
8592                         case "$host_os" in
8593                         *irix6*) cat >> confdefs.h <<\EOF
8594 #define IRIX6 1
8595 EOF
8596
8597                         ;;
8598                         esac
8599                         ATTEMPT_WRAP32_BUILD=yes
8600                         BLDSHARED="true"
8601                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8602                         if test "${ac_cv_prog_CC}" = "gcc"; then
8603                                 PICFLAG="-fPIC"
8604                         else 
8605                                 PICFLAG="-KPIC"
8606                         fi
8607                         cat >> confdefs.h <<\EOF
8608 #define STAT_ST_BLOCKSIZE 512
8609 EOF
8610
8611                 ;;
8612                 *aix*) cat >> confdefs.h <<\EOF
8613 #define AIX 1
8614 EOF
8615
8616                         BLDSHARED="true"
8617                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8618                         PICFLAG="-O2 -qmaxmem=6000"
8619                         cat >> confdefs.h <<\EOF
8620 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8621 EOF
8622
8623                 ;;
8624                 *hpux*) cat >> confdefs.h <<\EOF
8625 #define HPUX 1
8626 EOF
8627
8628                         SHLIBEXT="sl"
8629                         # Use special PIC flags for the native HP-UX compiler.
8630                         if test $ac_cv_prog_cc_Ae = yes; then
8631                                 #BLDSHARED="true"
8632                                 LDSHFLAGS="-b -z +h \$@"
8633                                 PICFLAG="+z"
8634                         fi
8635                         cat >> confdefs.h <<\EOF
8636 #define STAT_ST_BLOCKSIZE 8192
8637 EOF
8638
8639                 ;;
8640                 *qnx*) cat >> confdefs.h <<\EOF
8641 #define QNX 1
8642 EOF
8643 ;;
8644                 *osf*) cat >> confdefs.h <<\EOF
8645 #define OSF1 1
8646 EOF
8647
8648                         BLDSHARED="true"
8649                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8650                         PICFLAG="-fPIC"
8651                 ;;
8652                 *sco*) cat >> confdefs.h <<\EOF
8653 #define SCO 1
8654 EOF
8655 ;;
8656                 *unixware*) cat >> confdefs.h <<\EOF
8657 #define UNIXWARE 1
8658 EOF
8659
8660                         BLDSHARED="true"
8661                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8662                         PICFLAG="-KPIC"
8663                 ;;
8664                 *next2*) cat >> confdefs.h <<\EOF
8665 #define NEXT2 1
8666 EOF
8667 ;;
8668                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8669 set dummy groff; ac_word=$2
8670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8671 echo "configure:8672: checking for $ac_word" >&5
8672 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8673   echo $ac_n "(cached) $ac_c" 1>&6
8674 else
8675   if test -n "$ROFF"; then
8676   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8677 else
8678   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8679   ac_dummy="$PATH"
8680   for ac_dir in $ac_dummy; do
8681     test -z "$ac_dir" && ac_dir=.
8682     if test -f $ac_dir/$ac_word; then
8683       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8684       break
8685     fi
8686   done
8687   IFS="$ac_save_ifs"
8688 fi
8689 fi
8690 ROFF="$ac_cv_prog_ROFF"
8691 if test -n "$ROFF"; then
8692   echo "$ac_t""$ROFF" 1>&6
8693 else
8694   echo "$ac_t""no" 1>&6
8695 fi
8696 ;;
8697                 *sysv4*)
8698                         case "$host" in
8699                                 *-univel-*)     if  test "$GCC" != yes ; then
8700                                                                         cat >> confdefs.h <<\EOF
8701 #define HAVE_MEMSET 1
8702 EOF
8703
8704                                                                 fi
8705                                                                 LDSHFLAGS="-G"
8706                                 ;;
8707                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8708 #define RELIANTUNIX 1
8709 EOF
8710 ;;
8711                         esac
8712                         ;;
8713                 *sysv5*)
8714                         if  test "$GCC" != yes ; then
8715                                 cat >> confdefs.h <<\EOF
8716 #define HAVE_MEMSET 1
8717 EOF
8718
8719                         fi
8720                         LDSHFLAGS="-G"
8721                         ;;
8722 esac
8723 echo "$ac_t""$BLDSHARED" 1>&6
8724 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8725 echo "configure:8726: checking linker flags for shared libraries" >&5
8726 echo "$ac_t""$LDSHFLAGS" 1>&6
8727 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8728 echo "configure:8729: checking compiler flags for position-independent code" >&5
8729 echo "$ac_t""$PICFLAGS" 1>&6
8730
8731 #######################################################
8732 # test whether building a shared library actually works
8733 if test $BLDSHARED = true; then
8734 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
8735 echo "configure:8736: checking whether building shared libraries actually works" >&5
8736 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
8737   echo $ac_n "(cached) $ac_c" 1>&6
8738 else
8739   
8740    ac_cv_shlib_works=no
8741    # try building a trivial shared library
8742    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
8743      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
8744      ac_cv_shlib_works=yes
8745    rm -f shlib.so shlib.po
8746
8747 fi
8748
8749 echo "$ac_t""$ac_cv_shlib_works" 1>&6
8750 if test $ac_cv_shlib_works = no; then
8751    BLDSHARED=false
8752 fi
8753 fi
8754
8755
8756 # this updates our target list if we can build shared libs
8757 if test $BLDSHARED = true; then
8758    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8759 else
8760    LIBSMBCLIENT_SHARED=
8761 fi
8762
8763 ################
8764
8765 echo $ac_n "checking for long long""... $ac_c" 1>&6
8766 echo "configure:8767: checking for long long" >&5
8767 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8768   echo $ac_n "(cached) $ac_c" 1>&6
8769 else
8770   
8771 if test "$cross_compiling" = yes; then
8772   samba_cv_have_longlong=cross
8773 else
8774   cat > conftest.$ac_ext <<EOF
8775 #line 8776 "configure"
8776 #include "confdefs.h"
8777 #include <stdio.h>
8778 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8779 EOF
8780 if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8781 then
8782   samba_cv_have_longlong=yes
8783 else
8784   echo "configure: failed program was:" >&5
8785   cat conftest.$ac_ext >&5
8786   rm -fr conftest*
8787   samba_cv_have_longlong=no
8788 fi
8789 rm -fr conftest*
8790 fi
8791
8792 fi
8793
8794 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8795 if test x"$samba_cv_have_longlong" = x"yes"; then
8796     cat >> confdefs.h <<\EOF
8797 #define HAVE_LONGLONG 1
8798 EOF
8799
8800 fi
8801
8802 #
8803 # Check if the compiler supports the LL prefix on long long integers.
8804 # AIX needs this.
8805
8806 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8807 echo "configure:8808: checking for LL suffix on long long integers" >&5
8808 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8809   echo $ac_n "(cached) $ac_c" 1>&6
8810 else
8811   
8812     cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 #include <stdio.h>
8816 int main() {
8817 long long i = 0x8000000000LL
8818 ; return 0; }
8819 EOF
8820 if { (eval echo configure:8821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8821   rm -rf conftest*
8822   samba_cv_compiler_supports_ll=yes
8823 else
8824   echo "configure: failed program was:" >&5
8825   cat conftest.$ac_ext >&5
8826   rm -rf conftest*
8827   samba_cv_compiler_supports_ll=no
8828 fi
8829 rm -f conftest*
8830 fi
8831
8832 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8833 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8834    cat >> confdefs.h <<\EOF
8835 #define COMPILER_SUPPORTS_LL 1
8836 EOF
8837
8838 fi
8839
8840   
8841 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8842 echo "configure:8843: checking for 64 bit off_t" >&5
8843 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8844   echo $ac_n "(cached) $ac_c" 1>&6
8845 else
8846   
8847 if test "$cross_compiling" = yes; then
8848   samba_cv_SIZEOF_OFF_T=cross
8849 else
8850   cat > conftest.$ac_ext <<EOF
8851 #line 8852 "configure"
8852 #include "confdefs.h"
8853 #include <stdio.h>
8854 #include <sys/stat.h>
8855 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8856 EOF
8857 if { (eval echo configure:8858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8858 then
8859   samba_cv_SIZEOF_OFF_T=yes
8860 else
8861   echo "configure: failed program was:" >&5
8862   cat conftest.$ac_ext >&5
8863   rm -fr conftest*
8864   samba_cv_SIZEOF_OFF_T=no
8865 fi
8866 rm -fr conftest*
8867 fi
8868
8869 fi
8870
8871 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8872 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8873     cat >> confdefs.h <<\EOF
8874 #define SIZEOF_OFF_T 8
8875 EOF
8876
8877 fi
8878
8879 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8880 echo "configure:8881: checking for off64_t" >&5
8881 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8882   echo $ac_n "(cached) $ac_c" 1>&6
8883 else
8884   
8885 if test "$cross_compiling" = yes; then
8886   samba_cv_HAVE_OFF64_T=cross
8887 else
8888   cat > conftest.$ac_ext <<EOF
8889 #line 8890 "configure"
8890 #include "confdefs.h"
8891
8892 #if defined(HAVE_UNISTD_H)
8893 #include <unistd.h>
8894 #endif
8895 #include <stdio.h>
8896 #include <sys/stat.h>
8897 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8898 EOF
8899 if { (eval echo configure:8900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8900 then
8901   samba_cv_HAVE_OFF64_T=yes
8902 else
8903   echo "configure: failed program was:" >&5
8904   cat conftest.$ac_ext >&5
8905   rm -fr conftest*
8906   samba_cv_HAVE_OFF64_T=no
8907 fi
8908 rm -fr conftest*
8909 fi
8910
8911 fi
8912
8913 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8914 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8915     cat >> confdefs.h <<\EOF
8916 #define HAVE_OFF64_T 1
8917 EOF
8918
8919 fi
8920
8921 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8922 echo "configure:8923: checking for 64 bit ino_t" >&5
8923 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8924   echo $ac_n "(cached) $ac_c" 1>&6
8925 else
8926   
8927 if test "$cross_compiling" = yes; then
8928   samba_cv_SIZEOF_INO_T=cross
8929 else
8930   cat > conftest.$ac_ext <<EOF
8931 #line 8932 "configure"
8932 #include "confdefs.h"
8933 #include <stdio.h>
8934 #include <sys/stat.h>
8935 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8936 EOF
8937 if { (eval echo configure:8938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8938 then
8939   samba_cv_SIZEOF_INO_T=yes
8940 else
8941   echo "configure: failed program was:" >&5
8942   cat conftest.$ac_ext >&5
8943   rm -fr conftest*
8944   samba_cv_SIZEOF_INO_T=no
8945 fi
8946 rm -fr conftest*
8947 fi
8948
8949 fi
8950
8951 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8952 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8953     cat >> confdefs.h <<\EOF
8954 #define SIZEOF_INO_T 8
8955 EOF
8956
8957 fi
8958
8959 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8960 echo "configure:8961: checking for ino64_t" >&5
8961 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8962   echo $ac_n "(cached) $ac_c" 1>&6
8963 else
8964   
8965 if test "$cross_compiling" = yes; then
8966   samba_cv_HAVE_INO64_T=cross
8967 else
8968   cat > conftest.$ac_ext <<EOF
8969 #line 8970 "configure"
8970 #include "confdefs.h"
8971
8972 #if defined(HAVE_UNISTD_H)
8973 #include <unistd.h>
8974 #endif
8975 #include <stdio.h>
8976 #include <sys/stat.h>
8977 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8978 EOF
8979 if { (eval echo configure:8980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8980 then
8981   samba_cv_HAVE_INO64_T=yes
8982 else
8983   echo "configure: failed program was:" >&5
8984   cat conftest.$ac_ext >&5
8985   rm -fr conftest*
8986   samba_cv_HAVE_INO64_T=no
8987 fi
8988 rm -fr conftest*
8989 fi
8990
8991 fi
8992
8993 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8994 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8995     cat >> confdefs.h <<\EOF
8996 #define HAVE_INO64_T 1
8997 EOF
8998
8999 fi
9000
9001 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9002 echo "configure:9003: checking for dev64_t" >&5
9003 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9004   echo $ac_n "(cached) $ac_c" 1>&6
9005 else
9006   
9007 if test "$cross_compiling" = yes; then
9008   samba_cv_HAVE_DEV64_T=cross
9009 else
9010   cat > conftest.$ac_ext <<EOF
9011 #line 9012 "configure"
9012 #include "confdefs.h"
9013
9014 #if defined(HAVE_UNISTD_H)
9015 #include <unistd.h>
9016 #endif
9017 #include <stdio.h>
9018 #include <sys/stat.h>
9019 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9020 EOF
9021 if { (eval echo configure:9022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9022 then
9023   samba_cv_HAVE_DEV64_T=yes
9024 else
9025   echo "configure: failed program was:" >&5
9026   cat conftest.$ac_ext >&5
9027   rm -fr conftest*
9028   samba_cv_HAVE_DEV64_T=no
9029 fi
9030 rm -fr conftest*
9031 fi
9032
9033 fi
9034
9035 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9036 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9037     cat >> confdefs.h <<\EOF
9038 #define HAVE_DEV64_T 1
9039 EOF
9040
9041 fi
9042
9043 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9044 echo "configure:9045: checking for struct dirent64" >&5
9045 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9046   echo $ac_n "(cached) $ac_c" 1>&6
9047 else
9048   
9049 cat > conftest.$ac_ext <<EOF
9050 #line 9051 "configure"
9051 #include "confdefs.h"
9052
9053 #if defined(HAVE_UNISTD_H)
9054 #include <unistd.h>
9055 #endif
9056 #include <sys/types.h>
9057 #include <dirent.h>
9058 int main() {
9059 struct dirent64 de;
9060 ; return 0; }
9061 EOF
9062 if { (eval echo configure:9063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9063   rm -rf conftest*
9064   samba_cv_HAVE_STRUCT_DIRENT64=yes
9065 else
9066   echo "configure: failed program was:" >&5
9067   cat conftest.$ac_ext >&5
9068   rm -rf conftest*
9069   samba_cv_HAVE_STRUCT_DIRENT64=no
9070 fi
9071 rm -f conftest*
9072 fi
9073
9074 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9075 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9076     cat >> confdefs.h <<\EOF
9077 #define HAVE_STRUCT_DIRENT64 1
9078 EOF
9079
9080 fi
9081
9082 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9083 echo "configure:9084: checking for unsigned char" >&5
9084 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9085   echo $ac_n "(cached) $ac_c" 1>&6
9086 else
9087   
9088 if test "$cross_compiling" = yes; then
9089   samba_cv_HAVE_UNSIGNED_CHAR=cross
9090 else
9091   cat > conftest.$ac_ext <<EOF
9092 #line 9093 "configure"
9093 #include "confdefs.h"
9094 #include <stdio.h>
9095 main() { char c; c=250; exit((c > 0)?0:1); }
9096 EOF
9097 if { (eval echo configure:9098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9098 then
9099   samba_cv_HAVE_UNSIGNED_CHAR=yes
9100 else
9101   echo "configure: failed program was:" >&5
9102   cat conftest.$ac_ext >&5
9103   rm -fr conftest*
9104   samba_cv_HAVE_UNSIGNED_CHAR=no
9105 fi
9106 rm -fr conftest*
9107 fi
9108
9109 fi
9110
9111 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9112 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9113     cat >> confdefs.h <<\EOF
9114 #define HAVE_UNSIGNED_CHAR 1
9115 EOF
9116
9117 fi
9118
9119 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9120 echo "configure:9121: checking for sin_len in sock" >&5
9121 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9122   echo $ac_n "(cached) $ac_c" 1>&6
9123 else
9124   
9125 cat > conftest.$ac_ext <<EOF
9126 #line 9127 "configure"
9127 #include "confdefs.h"
9128 #include <sys/types.h>
9129 #include <sys/socket.h>
9130 #include <netinet/in.h>
9131 int main() {
9132 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9133 ; return 0; }
9134 EOF
9135 if { (eval echo configure:9136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9136   rm -rf conftest*
9137   samba_cv_HAVE_SOCK_SIN_LEN=yes
9138 else
9139   echo "configure: failed program was:" >&5
9140   cat conftest.$ac_ext >&5
9141   rm -rf conftest*
9142   samba_cv_HAVE_SOCK_SIN_LEN=no
9143 fi
9144 rm -f conftest*
9145 fi
9146
9147 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9148 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9149     cat >> confdefs.h <<\EOF
9150 #define HAVE_SOCK_SIN_LEN 1
9151 EOF
9152
9153 fi
9154
9155 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9156 echo "configure:9157: checking whether seekdir returns void" >&5
9157 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9158   echo $ac_n "(cached) $ac_c" 1>&6
9159 else
9160   
9161 cat > conftest.$ac_ext <<EOF
9162 #line 9163 "configure"
9163 #include "confdefs.h"
9164 #include <sys/types.h>
9165 #include <dirent.h>
9166 void seekdir(DIR *d, long loc) { return; }
9167 int main() {
9168 return 0;
9169 ; return 0; }
9170 EOF
9171 if { (eval echo configure:9172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9172   rm -rf conftest*
9173   samba_cv_SEEKDIR_RETURNS_VOID=yes
9174 else
9175   echo "configure: failed program was:" >&5
9176   cat conftest.$ac_ext >&5
9177   rm -rf conftest*
9178   samba_cv_SEEKDIR_RETURNS_VOID=no
9179 fi
9180 rm -f conftest*
9181 fi
9182
9183 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9184 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9185     cat >> confdefs.h <<\EOF
9186 #define SEEKDIR_RETURNS_VOID 1
9187 EOF
9188
9189 fi
9190
9191 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9192 echo "configure:9193: checking for __FILE__ macro" >&5
9193 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9194   echo $ac_n "(cached) $ac_c" 1>&6
9195 else
9196   
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200 #include <stdio.h>
9201 int main() {
9202 printf("%s\n", __FILE__);
9203 ; return 0; }
9204 EOF
9205 if { (eval echo configure:9206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9206   rm -rf conftest*
9207   samba_cv_HAVE_FILE_MACRO=yes
9208 else
9209   echo "configure: failed program was:" >&5
9210   cat conftest.$ac_ext >&5
9211   rm -rf conftest*
9212   samba_cv_HAVE_FILE_MACRO=no
9213 fi
9214 rm -f conftest*
9215 fi
9216
9217 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9218 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9219     cat >> confdefs.h <<\EOF
9220 #define HAVE_FILE_MACRO 1
9221 EOF
9222
9223 fi
9224
9225 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9226 echo "configure:9227: checking for __FUNCTION__ macro" >&5
9227 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9228   echo $ac_n "(cached) $ac_c" 1>&6
9229 else
9230   
9231 cat > conftest.$ac_ext <<EOF
9232 #line 9233 "configure"
9233 #include "confdefs.h"
9234 #include <stdio.h>
9235 int main() {
9236 printf("%s\n", __FUNCTION__);
9237 ; return 0; }
9238 EOF
9239 if { (eval echo configure:9240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9240   rm -rf conftest*
9241   samba_cv_HAVE_FUNCTION_MACRO=yes
9242 else
9243   echo "configure: failed program was:" >&5
9244   cat conftest.$ac_ext >&5
9245   rm -rf conftest*
9246   samba_cv_HAVE_FUNCTION_MACRO=no
9247 fi
9248 rm -f conftest*
9249 fi
9250
9251 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9252 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9253     cat >> confdefs.h <<\EOF
9254 #define HAVE_FUNCTION_MACRO 1
9255 EOF
9256
9257 fi
9258
9259 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9260 echo "configure:9261: checking if gettimeofday takes tz argument" >&5
9261 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9262   echo $ac_n "(cached) $ac_c" 1>&6
9263 else
9264   
9265 if test "$cross_compiling" = yes; then
9266   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9267 else
9268   cat > conftest.$ac_ext <<EOF
9269 #line 9270 "configure"
9270 #include "confdefs.h"
9271
9272 #include <sys/time.h>
9273 #include <unistd.h>
9274 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9275 EOF
9276 if { (eval echo configure:9277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9277 then
9278   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9279 else
9280   echo "configure: failed program was:" >&5
9281   cat conftest.$ac_ext >&5
9282   rm -fr conftest*
9283   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9284 fi
9285 rm -fr conftest*
9286 fi
9287
9288 fi
9289
9290 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9291 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9292     cat >> confdefs.h <<\EOF
9293 #define HAVE_GETTIMEOFDAY_TZ 1
9294 EOF
9295
9296 fi
9297
9298 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9299 echo "configure:9300: checking for C99 vsnprintf" >&5
9300 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9301   echo $ac_n "(cached) $ac_c" 1>&6
9302 else
9303   
9304 if test "$cross_compiling" = yes; then
9305   samba_cv_HAVE_C99_VSNPRINTF=cross
9306 else
9307   cat > conftest.$ac_ext <<EOF
9308 #line 9309 "configure"
9309 #include "confdefs.h"
9310
9311 #include <sys/types.h>
9312 #include <stdarg.h>
9313 void foo(const char *format, ...) { 
9314        va_list ap;
9315        int len;
9316        char buf[5];
9317
9318        va_start(ap, format);
9319        len = vsnprintf(0, 0, format, ap);
9320        va_end(ap);
9321        if (len != 5) exit(1);
9322
9323        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9324
9325        exit(0);
9326 }
9327 main() { foo("hello"); }
9328
9329 EOF
9330 if { (eval echo configure:9331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9331 then
9332   samba_cv_HAVE_C99_VSNPRINTF=yes
9333 else
9334   echo "configure: failed program was:" >&5
9335   cat conftest.$ac_ext >&5
9336   rm -fr conftest*
9337   samba_cv_HAVE_C99_VSNPRINTF=no
9338 fi
9339 rm -fr conftest*
9340 fi
9341
9342 fi
9343
9344 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9345 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9346     cat >> confdefs.h <<\EOF
9347 #define HAVE_C99_VSNPRINTF 1
9348 EOF
9349
9350 fi
9351
9352 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9353 echo "configure:9354: checking for broken readdir" >&5
9354 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9355   echo $ac_n "(cached) $ac_c" 1>&6
9356 else
9357   
9358 if test "$cross_compiling" = yes; then
9359   samba_cv_HAVE_BROKEN_READDIR=cross
9360 else
9361   cat > conftest.$ac_ext <<EOF
9362 #line 9363 "configure"
9363 #include "confdefs.h"
9364 #include <sys/types.h>
9365 #include <dirent.h>
9366 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9367 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9368 di->d_name[0] == 0) exit(0); exit(1);} 
9369 EOF
9370 if { (eval echo configure:9371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9371 then
9372   samba_cv_HAVE_BROKEN_READDIR=yes
9373 else
9374   echo "configure: failed program was:" >&5
9375   cat conftest.$ac_ext >&5
9376   rm -fr conftest*
9377   samba_cv_HAVE_BROKEN_READDIR=no
9378 fi
9379 rm -fr conftest*
9380 fi
9381
9382 fi
9383
9384 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9385 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9386     cat >> confdefs.h <<\EOF
9387 #define HAVE_BROKEN_READDIR 1
9388 EOF
9389
9390 fi
9391
9392 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9393 echo "configure:9394: checking for utimbuf" >&5
9394 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9395   echo $ac_n "(cached) $ac_c" 1>&6
9396 else
9397   
9398 cat > conftest.$ac_ext <<EOF
9399 #line 9400 "configure"
9400 #include "confdefs.h"
9401 #include <sys/types.h>
9402 #include <utime.h>
9403 int main() {
9404 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9405 ; return 0; }
9406 EOF
9407 if { (eval echo configure:9408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9408   rm -rf conftest*
9409   samba_cv_HAVE_UTIMBUF=yes
9410 else
9411   echo "configure: failed program was:" >&5
9412   cat conftest.$ac_ext >&5
9413   rm -rf conftest*
9414   samba_cv_HAVE_UTIMBUF=no
9415 fi
9416 rm -f conftest*
9417 fi
9418
9419 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9420 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9421     cat >> confdefs.h <<\EOF
9422 #define HAVE_UTIMBUF 1
9423 EOF
9424
9425 fi
9426
9427
9428 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9429 do
9430 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9431 echo "configure:9432: checking for $ac_func" >&5
9432 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9433   echo $ac_n "(cached) $ac_c" 1>&6
9434 else
9435   cat > conftest.$ac_ext <<EOF
9436 #line 9437 "configure"
9437 #include "confdefs.h"
9438 /* System header to define __stub macros and hopefully few prototypes,
9439     which can conflict with char $ac_func(); below.  */
9440 #include <assert.h>
9441 /* Override any gcc2 internal prototype to avoid an error.  */
9442 /* We use char because int might match the return type of a gcc2
9443     builtin and then its argument prototype would still apply.  */
9444 char $ac_func();
9445
9446 int main() {
9447
9448 /* The GNU C library defines this for functions which it implements
9449     to always fail with ENOSYS.  Some functions are actually named
9450     something starting with __ and the normal name is an alias.  */
9451 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9452 choke me
9453 #else
9454 $ac_func();
9455 #endif
9456
9457 ; return 0; }
9458 EOF
9459 if { (eval echo configure:9460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9460   rm -rf conftest*
9461   eval "ac_cv_func_$ac_func=yes"
9462 else
9463   echo "configure: failed program was:" >&5
9464   cat conftest.$ac_ext >&5
9465   rm -rf conftest*
9466   eval "ac_cv_func_$ac_func=no"
9467 fi
9468 rm -f conftest*
9469 fi
9470
9471 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9472   echo "$ac_t""yes" 1>&6
9473     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9474   cat >> confdefs.h <<EOF
9475 #define $ac_tr_func 1
9476 EOF
9477  
9478 else
9479   echo "$ac_t""no" 1>&6
9480 fi
9481 done
9482
9483
9484 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9485 echo "configure:9486: checking for ut_name in utmp" >&5
9486 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9487   echo $ac_n "(cached) $ac_c" 1>&6
9488 else
9489   
9490 cat > conftest.$ac_ext <<EOF
9491 #line 9492 "configure"
9492 #include "confdefs.h"
9493 #include <sys/types.h>
9494 #include <utmp.h>
9495 int main() {
9496 struct utmp ut;  ut.ut_name[0] = 'a';
9497 ; return 0; }
9498 EOF
9499 if { (eval echo configure:9500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9500   rm -rf conftest*
9501   samba_cv_HAVE_UT_UT_NAME=yes
9502 else
9503   echo "configure: failed program was:" >&5
9504   cat conftest.$ac_ext >&5
9505   rm -rf conftest*
9506   samba_cv_HAVE_UT_UT_NAME=no
9507 fi
9508 rm -f conftest*
9509 fi
9510
9511 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9512 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9513     cat >> confdefs.h <<\EOF
9514 #define HAVE_UT_UT_NAME 1
9515 EOF
9516
9517 fi 
9518
9519 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9520 echo "configure:9521: checking for ut_user in utmp" >&5
9521 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   
9525 cat > conftest.$ac_ext <<EOF
9526 #line 9527 "configure"
9527 #include "confdefs.h"
9528 #include <sys/types.h>
9529 #include <utmp.h>
9530 int main() {
9531 struct utmp ut;  ut.ut_user[0] = 'a';
9532 ; return 0; }
9533 EOF
9534 if { (eval echo configure:9535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9535   rm -rf conftest*
9536   samba_cv_HAVE_UT_UT_USER=yes
9537 else
9538   echo "configure: failed program was:" >&5
9539   cat conftest.$ac_ext >&5
9540   rm -rf conftest*
9541   samba_cv_HAVE_UT_UT_USER=no
9542 fi
9543 rm -f conftest*
9544 fi
9545
9546 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9547 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9548     cat >> confdefs.h <<\EOF
9549 #define HAVE_UT_UT_USER 1
9550 EOF
9551
9552 fi 
9553
9554 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9555 echo "configure:9556: checking for ut_id in utmp" >&5
9556 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9557   echo $ac_n "(cached) $ac_c" 1>&6
9558 else
9559   
9560 cat > conftest.$ac_ext <<EOF
9561 #line 9562 "configure"
9562 #include "confdefs.h"
9563 #include <sys/types.h>
9564 #include <utmp.h>
9565 int main() {
9566 struct utmp ut;  ut.ut_id[0] = 'a';
9567 ; return 0; }
9568 EOF
9569 if { (eval echo configure:9570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9570   rm -rf conftest*
9571   samba_cv_HAVE_UT_UT_ID=yes
9572 else
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   samba_cv_HAVE_UT_UT_ID=no
9577 fi
9578 rm -f conftest*
9579 fi
9580
9581 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9582 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9583     cat >> confdefs.h <<\EOF
9584 #define HAVE_UT_UT_ID 1
9585 EOF
9586
9587 fi 
9588
9589 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9590 echo "configure:9591: checking for ut_host in utmp" >&5
9591 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9592   echo $ac_n "(cached) $ac_c" 1>&6
9593 else
9594   
9595 cat > conftest.$ac_ext <<EOF
9596 #line 9597 "configure"
9597 #include "confdefs.h"
9598 #include <sys/types.h>
9599 #include <utmp.h>
9600 int main() {
9601 struct utmp ut;  ut.ut_host[0] = 'a';
9602 ; return 0; }
9603 EOF
9604 if { (eval echo configure:9605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9605   rm -rf conftest*
9606   samba_cv_HAVE_UT_UT_HOST=yes
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610   rm -rf conftest*
9611   samba_cv_HAVE_UT_UT_HOST=no
9612 fi
9613 rm -f conftest*
9614 fi
9615
9616 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9617 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9618     cat >> confdefs.h <<\EOF
9619 #define HAVE_UT_UT_HOST 1
9620 EOF
9621
9622 fi 
9623
9624 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9625 echo "configure:9626: checking for ut_time in utmp" >&5
9626 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9627   echo $ac_n "(cached) $ac_c" 1>&6
9628 else
9629   
9630 cat > conftest.$ac_ext <<EOF
9631 #line 9632 "configure"
9632 #include "confdefs.h"
9633 #include <sys/types.h>
9634 #include <utmp.h>
9635 int main() {
9636 struct utmp ut;  time_t t; ut.ut_time = t;
9637 ; return 0; }
9638 EOF
9639 if { (eval echo configure:9640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9640   rm -rf conftest*
9641   samba_cv_HAVE_UT_UT_TIME=yes
9642 else
9643   echo "configure: failed program was:" >&5
9644   cat conftest.$ac_ext >&5
9645   rm -rf conftest*
9646   samba_cv_HAVE_UT_UT_TIME=no
9647 fi
9648 rm -f conftest*
9649 fi
9650
9651 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9652 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9653     cat >> confdefs.h <<\EOF
9654 #define HAVE_UT_UT_TIME 1
9655 EOF
9656
9657 fi 
9658
9659 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9660 echo "configure:9661: checking for ut_tv in utmp" >&5
9661 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   
9665 cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 #include <sys/types.h>
9669 #include <utmp.h>
9670 int main() {
9671 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9672 ; return 0; }
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9675   rm -rf conftest*
9676   samba_cv_HAVE_UT_UT_TV=yes
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -rf conftest*
9681   samba_cv_HAVE_UT_UT_TV=no
9682 fi
9683 rm -f conftest*
9684 fi
9685
9686 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9687 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9688     cat >> confdefs.h <<\EOF
9689 #define HAVE_UT_UT_TV 1
9690 EOF
9691
9692 fi 
9693
9694 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9695 echo "configure:9696: checking for ut_type in utmp" >&5
9696 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9697   echo $ac_n "(cached) $ac_c" 1>&6
9698 else
9699   
9700 cat > conftest.$ac_ext <<EOF
9701 #line 9702 "configure"
9702 #include "confdefs.h"
9703 #include <sys/types.h>
9704 #include <utmp.h>
9705 int main() {
9706 struct utmp ut;  ut.ut_type = 0;
9707 ; return 0; }
9708 EOF
9709 if { (eval echo configure:9710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9710   rm -rf conftest*
9711   samba_cv_HAVE_UT_UT_TYPE=yes
9712 else
9713   echo "configure: failed program was:" >&5
9714   cat conftest.$ac_ext >&5
9715   rm -rf conftest*
9716   samba_cv_HAVE_UT_UT_TYPE=no
9717 fi
9718 rm -f conftest*
9719 fi
9720
9721 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9722 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9723     cat >> confdefs.h <<\EOF
9724 #define HAVE_UT_UT_TYPE 1
9725 EOF
9726
9727 fi 
9728
9729 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9730 echo "configure:9731: checking for ut_pid in utmp" >&5
9731 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9732   echo $ac_n "(cached) $ac_c" 1>&6
9733 else
9734   
9735 cat > conftest.$ac_ext <<EOF
9736 #line 9737 "configure"
9737 #include "confdefs.h"
9738 #include <sys/types.h>
9739 #include <utmp.h>
9740 int main() {
9741 struct utmp ut;  ut.ut_pid = 0;
9742 ; return 0; }
9743 EOF
9744 if { (eval echo configure:9745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9745   rm -rf conftest*
9746   samba_cv_HAVE_UT_UT_PID=yes
9747 else
9748   echo "configure: failed program was:" >&5
9749   cat conftest.$ac_ext >&5
9750   rm -rf conftest*
9751   samba_cv_HAVE_UT_UT_PID=no
9752 fi
9753 rm -f conftest*
9754 fi
9755
9756 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9757 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9758     cat >> confdefs.h <<\EOF
9759 #define HAVE_UT_UT_PID 1
9760 EOF
9761
9762 fi 
9763
9764 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9765 echo "configure:9766: checking for ut_exit in utmp" >&5
9766 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9767   echo $ac_n "(cached) $ac_c" 1>&6
9768 else
9769   
9770 cat > conftest.$ac_ext <<EOF
9771 #line 9772 "configure"
9772 #include "confdefs.h"
9773 #include <sys/types.h>
9774 #include <utmp.h>
9775 int main() {
9776 struct utmp ut;  ut.ut_exit.e_exit = 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_HAVE_UT_UT_EXIT=yes
9782 else
9783   echo "configure: failed program was:" >&5
9784   cat conftest.$ac_ext >&5
9785   rm -rf conftest*
9786   samba_cv_HAVE_UT_UT_EXIT=no
9787 fi
9788 rm -f conftest*
9789 fi
9790
9791 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9792 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9793     cat >> confdefs.h <<\EOF
9794 #define HAVE_UT_UT_EXIT 1
9795 EOF
9796
9797 fi 
9798
9799 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9800 echo "configure:9801: checking for ut_addr in utmp" >&5
9801 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+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 <sys/types.h>
9809 #include <utmp.h>
9810 int main() {
9811 struct utmp ut;  ut.ut_addr = 0;
9812 ; return 0; }
9813 EOF
9814 if { (eval echo configure:9815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9815   rm -rf conftest*
9816   samba_cv_HAVE_UT_UT_ADDR=yes
9817 else
9818   echo "configure: failed program was:" >&5
9819   cat conftest.$ac_ext >&5
9820   rm -rf conftest*
9821   samba_cv_HAVE_UT_UT_ADDR=no
9822 fi
9823 rm -f conftest*
9824 fi
9825
9826 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9827 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9828     cat >> confdefs.h <<\EOF
9829 #define HAVE_UT_UT_ADDR 1
9830 EOF
9831
9832 fi 
9833
9834 if test x$ac_cv_func_pututline = xyes ; then
9835   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9836 echo "configure:9837: checking whether pututline returns pointer" >&5
9837 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9838   echo $ac_n "(cached) $ac_c" 1>&6
9839 else
9840   
9841   cat > conftest.$ac_ext <<EOF
9842 #line 9843 "configure"
9843 #include "confdefs.h"
9844 #include <sys/types.h>
9845 #include <utmp.h>
9846 int main() {
9847 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9848 ; return 0; }
9849 EOF
9850 if { (eval echo configure:9851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9851   rm -rf conftest*
9852   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9853 else
9854   echo "configure: failed program was:" >&5
9855   cat conftest.$ac_ext >&5
9856   rm -rf conftest*
9857   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9858 fi
9859 rm -f conftest*
9860 fi
9861
9862 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9863   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9864       cat >> confdefs.h <<\EOF
9865 #define PUTUTLINE_RETURNS_UTMP 1
9866 EOF
9867
9868   fi
9869 fi
9870
9871 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9872 echo "configure:9873: checking for ut_syslen in utmpx" >&5
9873 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9874   echo $ac_n "(cached) $ac_c" 1>&6
9875 else
9876   
9877 cat > conftest.$ac_ext <<EOF
9878 #line 9879 "configure"
9879 #include "confdefs.h"
9880 #include <sys/types.h>
9881 #include <utmpx.h>
9882 int main() {
9883 struct utmpx ux;  ux.ut_syslen = 0;
9884 ; return 0; }
9885 EOF
9886 if { (eval echo configure:9887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9887   rm -rf conftest*
9888   samba_cv_HAVE_UX_UT_SYSLEN=yes
9889 else
9890   echo "configure: failed program was:" >&5
9891   cat conftest.$ac_ext >&5
9892   rm -rf conftest*
9893   samba_cv_HAVE_UX_UT_SYSLEN=no
9894 fi
9895 rm -f conftest*
9896 fi
9897
9898 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9899 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9900     cat >> confdefs.h <<\EOF
9901 #define HAVE_UX_UT_SYSLEN 1
9902 EOF
9903
9904 fi 
9905
9906
9907 #################################################
9908 # check for libiconv support
9909 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9910 echo "configure:9911: checking whether to use libiconv" >&5
9911 # Check whether --with-libiconv or --without-libiconv was given.
9912 if test "${with_libiconv+set}" = set; then
9913   withval="$with_libiconv"
9914    case "$withval" in
9915   no)
9916     echo "$ac_t""no" 1>&6
9917     ;;
9918   *)
9919     echo "$ac_t""yes" 1>&6
9920     CFLAGS="$CFLAGS -I$withval/include"
9921     LDFLAGS="$LDFLAGS -L$withval/lib"
9922     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9923 echo "configure:9924: checking for iconv_open in -liconv" >&5
9924 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9925 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9926   echo $ac_n "(cached) $ac_c" 1>&6
9927 else
9928   ac_save_LIBS="$LIBS"
9929 LIBS="-liconv  $LIBS"
9930 cat > conftest.$ac_ext <<EOF
9931 #line 9932 "configure"
9932 #include "confdefs.h"
9933 /* Override any gcc2 internal prototype to avoid an error.  */
9934 /* We use char because int might match the return type of a gcc2
9935     builtin and then its argument prototype would still apply.  */
9936 char iconv_open();
9937
9938 int main() {
9939 iconv_open()
9940 ; return 0; }
9941 EOF
9942 if { (eval echo configure:9943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9943   rm -rf conftest*
9944   eval "ac_cv_lib_$ac_lib_var=yes"
9945 else
9946   echo "configure: failed program was:" >&5
9947   cat conftest.$ac_ext >&5
9948   rm -rf conftest*
9949   eval "ac_cv_lib_$ac_lib_var=no"
9950 fi
9951 rm -f conftest*
9952 LIBS="$ac_save_LIBS"
9953
9954 fi
9955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9956   echo "$ac_t""yes" 1>&6
9957     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9958     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9959   cat >> confdefs.h <<EOF
9960 #define $ac_tr_lib 1
9961 EOF
9962
9963   LIBS="-liconv $LIBS"
9964
9965 else
9966   echo "$ac_t""no" 1>&6
9967 fi
9968
9969     cat >> confdefs.h <<EOF
9970 #define WITH_LIBICONV "${withval}"
9971 EOF
9972
9973     ;;
9974   esac 
9975 else
9976   echo "$ac_t""no" 1>&6
9977
9978 fi
9979
9980
9981
9982 ############
9983 # check for iconv in libc
9984 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9985 echo "configure:9986: checking for working iconv" >&5
9986 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9987   echo $ac_n "(cached) $ac_c" 1>&6
9988 else
9989   
9990 if test "$cross_compiling" = yes; then
9991   samba_cv_HAVE_NATIVE_ICONV=cross
9992 else
9993   cat > conftest.$ac_ext <<EOF
9994 #line 9995 "configure"
9995 #include "confdefs.h"
9996
9997 #include <iconv.h>
9998 main() {
9999        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10000        if (cd == 0 || cd == (iconv_t)-1) return -1;
10001        return 0;
10002 }
10003
10004 EOF
10005 if { (eval echo configure:10006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10006 then
10007   samba_cv_HAVE_NATIVE_ICONV=yes
10008 else
10009   echo "configure: failed program was:" >&5
10010   cat conftest.$ac_ext >&5
10011   rm -fr conftest*
10012   samba_cv_HAVE_NATIVE_ICONV=no
10013 fi
10014 rm -fr conftest*
10015 fi
10016
10017 fi
10018
10019 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10020 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10021     cat >> confdefs.h <<\EOF
10022 #define HAVE_NATIVE_ICONV 1
10023 EOF
10024
10025 fi
10026
10027
10028 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10029 echo "configure:10030: checking for Linux kernel oplocks" >&5
10030 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10031   echo $ac_n "(cached) $ac_c" 1>&6
10032 else
10033   
10034 if test "$cross_compiling" = yes; then
10035   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10036 else
10037   cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040
10041 #include <sys/types.h>
10042 #include <fcntl.h>
10043 #ifndef F_GETLEASE
10044 #define F_GETLEASE      1025
10045 #endif
10046 main() {
10047        int fd = open("/dev/null", O_RDONLY);
10048        return fcntl(fd, F_GETLEASE, 0) == -1;
10049 }
10050
10051 EOF
10052 if { (eval echo configure:10053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10053 then
10054   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10055 else
10056   echo "configure: failed program was:" >&5
10057   cat conftest.$ac_ext >&5
10058   rm -fr conftest*
10059   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10060 fi
10061 rm -fr conftest*
10062 fi
10063
10064 fi
10065
10066 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10067 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10068     cat >> confdefs.h <<\EOF
10069 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10070 EOF
10071
10072 fi
10073
10074 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10075 echo "configure:10076: checking for kernel change notify support" >&5
10076 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10077   echo $ac_n "(cached) $ac_c" 1>&6
10078 else
10079   
10080 if test "$cross_compiling" = yes; then
10081   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10082 else
10083   cat > conftest.$ac_ext <<EOF
10084 #line 10085 "configure"
10085 #include "confdefs.h"
10086
10087 #include <sys/types.h>
10088 #include <fcntl.h>
10089 #include <signal.h>
10090 #ifndef F_NOTIFY
10091 #define F_NOTIFY 1026
10092 #endif
10093 main() {
10094         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10095 }
10096
10097 EOF
10098 if { (eval echo configure:10099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10099 then
10100   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10101 else
10102   echo "configure: failed program was:" >&5
10103   cat conftest.$ac_ext >&5
10104   rm -fr conftest*
10105   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10106 fi
10107 rm -fr conftest*
10108 fi
10109
10110 fi
10111
10112 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10113 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10114     cat >> confdefs.h <<\EOF
10115 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10116 EOF
10117
10118 fi
10119
10120 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10121 echo "configure:10122: checking for kernel share modes" >&5
10122 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10123   echo $ac_n "(cached) $ac_c" 1>&6
10124 else
10125   
10126 if test "$cross_compiling" = yes; then
10127   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10128 else
10129   cat > conftest.$ac_ext <<EOF
10130 #line 10131 "configure"
10131 #include "confdefs.h"
10132
10133 #include <sys/types.h>
10134 #include <fcntl.h>
10135 #include <signal.h>
10136 #include <sys/file.h>
10137 #ifndef LOCK_MAND
10138 #define LOCK_MAND       32
10139 #define LOCK_READ       64
10140 #endif
10141 main() {
10142         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10143 }
10144
10145 EOF
10146 if { (eval echo configure:10147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10147 then
10148   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10149 else
10150   echo "configure: failed program was:" >&5
10151   cat conftest.$ac_ext >&5
10152   rm -fr conftest*
10153   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10154 fi
10155 rm -fr conftest*
10156 fi
10157
10158 fi
10159
10160 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10161 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10162     cat >> confdefs.h <<\EOF
10163 #define HAVE_KERNEL_SHARE_MODES 1
10164 EOF
10165
10166 fi
10167
10168
10169
10170
10171 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10172 echo "configure:10173: checking for IRIX kernel oplock type definitions" >&5
10173 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10174   echo $ac_n "(cached) $ac_c" 1>&6
10175 else
10176   
10177 cat > conftest.$ac_ext <<EOF
10178 #line 10179 "configure"
10179 #include "confdefs.h"
10180 #include <sys/types.h>
10181 #include <fcntl.h>
10182 int main() {
10183 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10184 ; return 0; }
10185 EOF
10186 if { (eval echo configure:10187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10187   rm -rf conftest*
10188   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10189 else
10190   echo "configure: failed program was:" >&5
10191   cat conftest.$ac_ext >&5
10192   rm -rf conftest*
10193   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10194 fi
10195 rm -f conftest*
10196 fi
10197
10198 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10199 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10200     cat >> confdefs.h <<\EOF
10201 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10202 EOF
10203
10204 fi
10205
10206 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10207 echo "configure:10208: checking for irix specific capabilities" >&5
10208 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10209   echo $ac_n "(cached) $ac_c" 1>&6
10210 else
10211   
10212 if test "$cross_compiling" = yes; then
10213   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10214 else
10215   cat > conftest.$ac_ext <<EOF
10216 #line 10217 "configure"
10217 #include "confdefs.h"
10218 #include <sys/types.h>
10219 #include <sys/capability.h>
10220 main() {
10221  cap_t cap;
10222  if ((cap = cap_get_proc()) == NULL)
10223    exit(1);
10224  cap->cap_effective |= CAP_NETWORK_MGT;
10225  cap->cap_inheritable |= CAP_NETWORK_MGT;
10226  cap_set_proc(cap);
10227  exit(0);
10228 }
10229
10230 EOF
10231 if { (eval echo configure:10232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10232 then
10233   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10234 else
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -fr conftest*
10238   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10239 fi
10240 rm -fr conftest*
10241 fi
10242
10243 fi
10244
10245 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10246 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10247     cat >> confdefs.h <<\EOF
10248 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10249 EOF
10250
10251 fi
10252
10253 #
10254 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10255 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10256 #
10257
10258 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10259 echo "configure:10260: checking for int16 typedef included by rpc/rpc.h" >&5
10260 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   
10264 cat > conftest.$ac_ext <<EOF
10265 #line 10266 "configure"
10266 #include "confdefs.h"
10267 #include <sys/types.h>
10268 #if defined(HAVE_RPC_RPC_H)
10269 #include <rpc/rpc.h>
10270 #endif
10271 int main() {
10272 int16 testvar;
10273 ; return 0; }
10274 EOF
10275 if { (eval echo configure:10276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10276   rm -rf conftest*
10277   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10278 else
10279   echo "configure: failed program was:" >&5
10280   cat conftest.$ac_ext >&5
10281   rm -rf conftest*
10282   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10283 fi
10284 rm -f conftest*
10285 fi
10286
10287 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10288 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10289     cat >> confdefs.h <<\EOF
10290 #define HAVE_INT16_FROM_RPC_RPC_H 1
10291 EOF
10292
10293 fi
10294
10295 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10296 echo "configure:10297: checking for uint16 typedef included by rpc/rpc.h" >&5
10297 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   
10301 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 #include <sys/types.h>
10305 #if defined(HAVE_RPC_RPC_H)
10306 #include <rpc/rpc.h>
10307 #endif
10308 int main() {
10309 uint16 testvar;
10310 ; return 0; }
10311 EOF
10312 if { (eval echo configure:10313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10313   rm -rf conftest*
10314   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10315 else
10316   echo "configure: failed program was:" >&5
10317   cat conftest.$ac_ext >&5
10318   rm -rf conftest*
10319   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10320 fi
10321 rm -f conftest*
10322 fi
10323
10324 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10325 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10326     cat >> confdefs.h <<\EOF
10327 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10328 EOF
10329
10330 fi
10331
10332 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10333 echo "configure:10334: checking for int32 typedef included by rpc/rpc.h" >&5
10334 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10335   echo $ac_n "(cached) $ac_c" 1>&6
10336 else
10337   
10338 cat > conftest.$ac_ext <<EOF
10339 #line 10340 "configure"
10340 #include "confdefs.h"
10341 #include <sys/types.h>
10342 #if defined(HAVE_RPC_RPC_H)
10343 #include <rpc/rpc.h>
10344 #endif
10345 int main() {
10346 int32 testvar;
10347 ; return 0; }
10348 EOF
10349 if { (eval echo configure:10350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10350   rm -rf conftest*
10351   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10352 else
10353   echo "configure: failed program was:" >&5
10354   cat conftest.$ac_ext >&5
10355   rm -rf conftest*
10356   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10357 fi
10358 rm -f conftest*
10359 fi
10360
10361 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10362 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10363     cat >> confdefs.h <<\EOF
10364 #define HAVE_INT32_FROM_RPC_RPC_H 1
10365 EOF
10366
10367 fi
10368
10369 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10370 echo "configure:10371: checking for uint32 typedef included by rpc/rpc.h" >&5
10371 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10372   echo $ac_n "(cached) $ac_c" 1>&6
10373 else
10374   
10375 cat > conftest.$ac_ext <<EOF
10376 #line 10377 "configure"
10377 #include "confdefs.h"
10378 #include <sys/types.h>
10379 #if defined(HAVE_RPC_RPC_H)
10380 #include <rpc/rpc.h>
10381 #endif
10382 int main() {
10383 uint32 testvar;
10384 ; return 0; }
10385 EOF
10386 if { (eval echo configure:10387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10387   rm -rf conftest*
10388   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10389 else
10390   echo "configure: failed program was:" >&5
10391   cat conftest.$ac_ext >&5
10392   rm -rf conftest*
10393   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10394 fi
10395 rm -f conftest*
10396 fi
10397
10398 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10399 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10400     cat >> confdefs.h <<\EOF
10401 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10402 EOF
10403
10404 fi
10405
10406
10407 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10408 echo "configure:10409: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10409 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10410   echo $ac_n "(cached) $ac_c" 1>&6
10411 else
10412   
10413 cat > conftest.$ac_ext <<EOF
10414 #line 10415 "configure"
10415 #include "confdefs.h"
10416 #include <sys/types.h>
10417 #ifdef HAVE_SYS_SECURITY_H
10418 #include <sys/security.h>
10419 #include <prot.h>
10420 #endif  /* HAVE_SYS_SECURITY_H */
10421 #if defined(HAVE_RPC_RPC_H)
10422 #include <rpc/rpc.h>
10423 #endif
10424 int main() {
10425 int testvar;
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_RPC_AUTH_ERROR_CONFLICT=no
10431 else
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -rf conftest*
10435   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10436 fi
10437 rm -f conftest*
10438 fi
10439
10440 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10441 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10442     cat >> confdefs.h <<\EOF
10443 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10444 EOF
10445
10446 fi
10447
10448 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10449 echo "configure:10450: checking for test routines" >&5
10450 if test "$cross_compiling" = yes; then
10451   echo "configure: warning: cannot run when cross-compiling" 1>&2
10452 else
10453   cat > conftest.$ac_ext <<EOF
10454 #line 10455 "configure"
10455 #include "confdefs.h"
10456 #include "${srcdir-.}/tests/trivial.c"
10457 EOF
10458 if { (eval echo configure:10459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10459 then
10460   echo "$ac_t""yes" 1>&6
10461 else
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -fr conftest*
10465   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10466 fi
10467 rm -fr conftest*
10468 fi
10469
10470
10471 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10472 echo "configure:10473: checking for ftruncate extend" >&5
10473 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10474   echo $ac_n "(cached) $ac_c" 1>&6
10475 else
10476   
10477 if test "$cross_compiling" = yes; then
10478   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10479 else
10480   cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 #include "${srcdir-.}/tests/ftruncate.c"
10484 EOF
10485 if { (eval echo configure:10486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10486 then
10487   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10488 else
10489   echo "configure: failed program was:" >&5
10490   cat conftest.$ac_ext >&5
10491   rm -fr conftest*
10492   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10493 fi
10494 rm -fr conftest*
10495 fi
10496
10497 fi
10498
10499 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10500 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10501     cat >> confdefs.h <<\EOF
10502 #define HAVE_FTRUNCATE_EXTEND 1
10503 EOF
10504
10505 fi
10506
10507 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10508 echo "configure:10509: checking for AF_LOCAL socket support" >&5
10509 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10510   echo $ac_n "(cached) $ac_c" 1>&6
10511 else
10512   
10513 if test "$cross_compiling" = yes; then
10514   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10515 else
10516   cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519 #include "${srcdir-.}/tests/unixsock.c"
10520 EOF
10521 if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10522 then
10523   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10524 else
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -fr conftest*
10528   samba_cv_HAVE_WORKING_AF_LOCAL=no
10529 fi
10530 rm -fr conftest*
10531 fi
10532
10533 fi
10534
10535 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10536 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10537 then
10538     cat >> confdefs.h <<\EOF
10539 #define HAVE_WORKING_AF_LOCAL 1
10540 EOF
10541
10542 fi
10543
10544 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10545 echo "configure:10546: checking for broken getgroups" >&5
10546 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10547   echo $ac_n "(cached) $ac_c" 1>&6
10548 else
10549   
10550 if test "$cross_compiling" = yes; then
10551   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10552 else
10553   cat > conftest.$ac_ext <<EOF
10554 #line 10555 "configure"
10555 #include "confdefs.h"
10556 #include "${srcdir-.}/tests/getgroups.c"
10557 EOF
10558 if { (eval echo configure:10559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10559 then
10560   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10561 else
10562   echo "configure: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   rm -fr conftest*
10565   samba_cv_HAVE_BROKEN_GETGROUPS=no
10566 fi
10567 rm -fr conftest*
10568 fi
10569
10570 fi
10571
10572 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10573 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10574     cat >> confdefs.h <<\EOF
10575 #define HAVE_BROKEN_GETGROUPS 1
10576 EOF
10577
10578 fi
10579
10580 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10581 echo "configure:10582: checking whether getpass should be replaced" >&5
10582 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10583   echo $ac_n "(cached) $ac_c" 1>&6
10584 else
10585   
10586 SAVE_CPPFLAGS="$CPPFLAGS"
10587 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10588 cat > conftest.$ac_ext <<EOF
10589 #line 10590 "configure"
10590 #include "confdefs.h"
10591
10592 #define REPLACE_GETPASS 1
10593 #define NO_CONFIG_H 1
10594 #define main dont_declare_main
10595 #include "${srcdir-.}/lib/getsmbpass.c"
10596 #undef main
10597
10598 int main() {
10599
10600 ; return 0; }
10601 EOF
10602 if { (eval echo configure:10603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10603   rm -rf conftest*
10604   samba_cv_REPLACE_GETPASS=yes
10605 else
10606   echo "configure: failed program was:" >&5
10607   cat conftest.$ac_ext >&5
10608   rm -rf conftest*
10609   samba_cv_REPLACE_GETPASS=no
10610 fi
10611 rm -f conftest*
10612 CPPFLAGS="$SAVE_CPPFLAGS"
10613
10614 fi
10615
10616 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10617 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10618         cat >> confdefs.h <<\EOF
10619 #define REPLACE_GETPASS 1
10620 EOF
10621
10622 fi
10623
10624 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10625 echo "configure:10626: checking for broken inet_ntoa" >&5
10626 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10627   echo $ac_n "(cached) $ac_c" 1>&6
10628 else
10629   
10630 if test "$cross_compiling" = yes; then
10631   samba_cv_REPLACE_INET_NTOA=cross
10632 else
10633   cat > conftest.$ac_ext <<EOF
10634 #line 10635 "configure"
10635 #include "confdefs.h"
10636
10637 #include <stdio.h>
10638 #include <sys/types.h>
10639 #include <netinet/in.h>
10640 #ifdef HAVE_ARPA_INET_H
10641 #include <arpa/inet.h>
10642 #endif
10643 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10644 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10645     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10646 exit(1);}
10647 EOF
10648 if { (eval echo configure:10649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10649 then
10650   samba_cv_REPLACE_INET_NTOA=yes
10651 else
10652   echo "configure: failed program was:" >&5
10653   cat conftest.$ac_ext >&5
10654   rm -fr conftest*
10655   samba_cv_REPLACE_INET_NTOA=no
10656 fi
10657 rm -fr conftest*
10658 fi
10659
10660 fi
10661
10662 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10663 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10664     cat >> confdefs.h <<\EOF
10665 #define REPLACE_INET_NTOA 1
10666 EOF
10667
10668 fi
10669
10670 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10671 echo "configure:10672: checking for secure mkstemp" >&5
10672 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10673   echo $ac_n "(cached) $ac_c" 1>&6
10674 else
10675   
10676 if test "$cross_compiling" = yes; then
10677   samba_cv_HAVE_SECURE_MKSTEMP=cross
10678 else
10679   cat > conftest.$ac_ext <<EOF
10680 #line 10681 "configure"
10681 #include "confdefs.h"
10682 #include <stdlib.h>
10683 #include <sys/types.h>
10684 #include <sys/stat.h>
10685 #include <unistd.h>
10686 main() { 
10687   struct stat st;
10688   char tpl[20]="/tmp/test.XXXXXX"; 
10689   int fd = mkstemp(tpl); 
10690   if (fd == -1) exit(1);
10691   unlink(tpl);
10692   if (fstat(fd, &st) != 0) exit(1);
10693   if ((st.st_mode & 0777) != 0600) exit(1);
10694   exit(0);
10695 }
10696 EOF
10697 if { (eval echo configure:10698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10698 then
10699   samba_cv_HAVE_SECURE_MKSTEMP=yes
10700 else
10701   echo "configure: failed program was:" >&5
10702   cat conftest.$ac_ext >&5
10703   rm -fr conftest*
10704   samba_cv_HAVE_SECURE_MKSTEMP=no
10705 fi
10706 rm -fr conftest*
10707 fi
10708
10709 fi
10710
10711 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10712 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10713     cat >> confdefs.h <<\EOF
10714 #define HAVE_SECURE_MKSTEMP 1
10715 EOF
10716
10717 fi
10718
10719 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10720 echo "configure:10721: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10721 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10722   echo $ac_n "(cached) $ac_c" 1>&6
10723 else
10724   
10725 if test "$cross_compiling" = yes; then
10726   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10727 else
10728   cat > conftest.$ac_ext <<EOF
10729 #line 10730 "configure"
10730 #include "confdefs.h"
10731 #include <unistd.h>
10732 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10733 EOF
10734 if { (eval echo configure:10735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10735 then
10736   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10737 else
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -fr conftest*
10741   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10742 fi
10743 rm -fr conftest*
10744 fi
10745
10746 fi
10747
10748 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10749 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10750     cat >> confdefs.h <<\EOF
10751 #define SYSCONF_SC_NGROUPS_MAX 1
10752 EOF
10753
10754 fi
10755
10756 echo $ac_n "checking for root""... $ac_c" 1>&6
10757 echo "configure:10758: checking for root" >&5
10758 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10759   echo $ac_n "(cached) $ac_c" 1>&6
10760 else
10761   
10762 if test "$cross_compiling" = yes; then
10763   samba_cv_HAVE_ROOT=cross
10764 else
10765   cat > conftest.$ac_ext <<EOF
10766 #line 10767 "configure"
10767 #include "confdefs.h"
10768 main() { exit(getuid() != 0); }
10769 EOF
10770 if { (eval echo configure:10771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10771 then
10772   samba_cv_HAVE_ROOT=yes
10773 else
10774   echo "configure: failed program was:" >&5
10775   cat conftest.$ac_ext >&5
10776   rm -fr conftest*
10777   samba_cv_HAVE_ROOT=no
10778 fi
10779 rm -fr conftest*
10780 fi
10781
10782 fi
10783
10784 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10785 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10786     cat >> confdefs.h <<\EOF
10787 #define HAVE_ROOT 1
10788 EOF
10789
10790 else
10791     echo "configure: warning: running as non-root will disable some tests" 1>&2
10792 fi
10793
10794 ##################
10795 # look for a method of finding the list of network interfaces
10796 iface=no;
10797 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10798 echo "configure:10799: checking for iface AIX" >&5
10799 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10800   echo $ac_n "(cached) $ac_c" 1>&6
10801 else
10802   
10803 if test "$cross_compiling" = yes; then
10804   samba_cv_HAVE_IFACE_AIX=cross
10805 else
10806   cat > conftest.$ac_ext <<EOF
10807 #line 10808 "configure"
10808 #include "confdefs.h"
10809
10810 #define HAVE_IFACE_AIX 1
10811 #define AUTOCONF_TEST 1
10812 #include "confdefs.h"
10813 #include "${srcdir-.}/lib/interfaces.c"
10814 EOF
10815 if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10816 then
10817   samba_cv_HAVE_IFACE_AIX=yes
10818 else
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -fr conftest*
10822   samba_cv_HAVE_IFACE_AIX=no
10823 fi
10824 rm -fr conftest*
10825 fi
10826
10827 fi
10828
10829 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10830 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10831     iface=yes;cat >> confdefs.h <<\EOF
10832 #define HAVE_IFACE_AIX 1
10833 EOF
10834
10835 fi
10836
10837 if test $iface = no; then
10838 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10839 echo "configure:10840: checking for iface ifconf" >&5
10840 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10841   echo $ac_n "(cached) $ac_c" 1>&6
10842 else
10843   
10844 if test "$cross_compiling" = yes; then
10845   samba_cv_HAVE_IFACE_IFCONF=cross
10846 else
10847   cat > conftest.$ac_ext <<EOF
10848 #line 10849 "configure"
10849 #include "confdefs.h"
10850
10851 #define HAVE_IFACE_IFCONF 1
10852 #define AUTOCONF_TEST 1
10853 #include "confdefs.h"
10854 #include "${srcdir-.}/lib/interfaces.c"
10855 EOF
10856 if { (eval echo configure:10857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10857 then
10858   samba_cv_HAVE_IFACE_IFCONF=yes
10859 else
10860   echo "configure: failed program was:" >&5
10861   cat conftest.$ac_ext >&5
10862   rm -fr conftest*
10863   samba_cv_HAVE_IFACE_IFCONF=no
10864 fi
10865 rm -fr conftest*
10866 fi
10867
10868 fi
10869
10870 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10871 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10872     iface=yes;cat >> confdefs.h <<\EOF
10873 #define HAVE_IFACE_IFCONF 1
10874 EOF
10875
10876 fi
10877 fi
10878
10879 if test $iface = no; then
10880 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10881 echo "configure:10882: checking for iface ifreq" >&5
10882 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10883   echo $ac_n "(cached) $ac_c" 1>&6
10884 else
10885   
10886 if test "$cross_compiling" = yes; then
10887   samba_cv_HAVE_IFACE_IFREQ=cross
10888 else
10889   cat > conftest.$ac_ext <<EOF
10890 #line 10891 "configure"
10891 #include "confdefs.h"
10892
10893 #define HAVE_IFACE_IFREQ 1
10894 #define AUTOCONF_TEST 1
10895 #include "confdefs.h"
10896 #include "${srcdir-.}/lib/interfaces.c"
10897 EOF
10898 if { (eval echo configure:10899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10899 then
10900   samba_cv_HAVE_IFACE_IFREQ=yes
10901 else
10902   echo "configure: failed program was:" >&5
10903   cat conftest.$ac_ext >&5
10904   rm -fr conftest*
10905   samba_cv_HAVE_IFACE_IFREQ=no
10906 fi
10907 rm -fr conftest*
10908 fi
10909
10910 fi
10911
10912 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10913 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10914     iface=yes;cat >> confdefs.h <<\EOF
10915 #define HAVE_IFACE_IFREQ 1
10916 EOF
10917
10918 fi
10919 fi
10920
10921
10922 ################################################
10923 # look for a method of setting the effective uid
10924 seteuid=no;
10925 if test $seteuid = no; then
10926 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10927 echo "configure:10928: checking for setresuid" >&5
10928 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10929   echo $ac_n "(cached) $ac_c" 1>&6
10930 else
10931   
10932 if test "$cross_compiling" = yes; then
10933   samba_cv_USE_SETRESUID=cross
10934 else
10935   cat > conftest.$ac_ext <<EOF
10936 #line 10937 "configure"
10937 #include "confdefs.h"
10938
10939 #define AUTOCONF_TEST 1
10940 #define USE_SETRESUID 1
10941 #include "confdefs.h"
10942 #include "${srcdir-.}/lib/util_sec.c"
10943 EOF
10944 if { (eval echo configure:10945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10945 then
10946   samba_cv_USE_SETRESUID=yes
10947 else
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -fr conftest*
10951   samba_cv_USE_SETRESUID=no
10952 fi
10953 rm -fr conftest*
10954 fi
10955
10956 fi
10957
10958 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10959 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10960     seteuid=yes;cat >> confdefs.h <<\EOF
10961 #define USE_SETRESUID 1
10962 EOF
10963
10964 fi
10965 fi
10966
10967
10968 if test $seteuid = no; then
10969 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10970 echo "configure:10971: checking for setreuid" >&5
10971 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10972   echo $ac_n "(cached) $ac_c" 1>&6
10973 else
10974   
10975 if test "$cross_compiling" = yes; then
10976   samba_cv_USE_SETREUID=cross
10977 else
10978   cat > conftest.$ac_ext <<EOF
10979 #line 10980 "configure"
10980 #include "confdefs.h"
10981
10982 #define AUTOCONF_TEST 1
10983 #define USE_SETREUID 1
10984 #include "confdefs.h"
10985 #include "${srcdir-.}/lib/util_sec.c"
10986 EOF
10987 if { (eval echo configure:10988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10988 then
10989   samba_cv_USE_SETREUID=yes
10990 else
10991   echo "configure: failed program was:" >&5
10992   cat conftest.$ac_ext >&5
10993   rm -fr conftest*
10994   samba_cv_USE_SETREUID=no
10995 fi
10996 rm -fr conftest*
10997 fi
10998
10999 fi
11000
11001 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11002 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11003     seteuid=yes;cat >> confdefs.h <<\EOF
11004 #define USE_SETREUID 1
11005 EOF
11006
11007 fi
11008 fi
11009
11010 if test $seteuid = no; then
11011 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11012 echo "configure:11013: checking for seteuid" >&5
11013 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11014   echo $ac_n "(cached) $ac_c" 1>&6
11015 else
11016   
11017 if test "$cross_compiling" = yes; then
11018   samba_cv_USE_SETEUID=cross
11019 else
11020   cat > conftest.$ac_ext <<EOF
11021 #line 11022 "configure"
11022 #include "confdefs.h"
11023
11024 #define AUTOCONF_TEST 1
11025 #define USE_SETEUID 1
11026 #include "confdefs.h"
11027 #include "${srcdir-.}/lib/util_sec.c"
11028 EOF
11029 if { (eval echo configure:11030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11030 then
11031   samba_cv_USE_SETEUID=yes
11032 else
11033   echo "configure: failed program was:" >&5
11034   cat conftest.$ac_ext >&5
11035   rm -fr conftest*
11036   samba_cv_USE_SETEUID=no
11037 fi
11038 rm -fr conftest*
11039 fi
11040
11041 fi
11042
11043 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11044 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11045     seteuid=yes;cat >> confdefs.h <<\EOF
11046 #define USE_SETEUID 1
11047 EOF
11048
11049 fi
11050 fi
11051
11052 if test $seteuid = no; then
11053 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11054 echo "configure:11055: checking for setuidx" >&5
11055 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11056   echo $ac_n "(cached) $ac_c" 1>&6
11057 else
11058   
11059 if test "$cross_compiling" = yes; then
11060   samba_cv_USE_SETUIDX=cross
11061 else
11062   cat > conftest.$ac_ext <<EOF
11063 #line 11064 "configure"
11064 #include "confdefs.h"
11065
11066 #define AUTOCONF_TEST 1
11067 #define USE_SETUIDX 1
11068 #include "confdefs.h"
11069 #include "${srcdir-.}/lib/util_sec.c"
11070 EOF
11071 if { (eval echo configure:11072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11072 then
11073   samba_cv_USE_SETUIDX=yes
11074 else
11075   echo "configure: failed program was:" >&5
11076   cat conftest.$ac_ext >&5
11077   rm -fr conftest*
11078   samba_cv_USE_SETUIDX=no
11079 fi
11080 rm -fr conftest*
11081 fi
11082
11083 fi
11084
11085 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11086 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11087     seteuid=yes;cat >> confdefs.h <<\EOF
11088 #define USE_SETUIDX 1
11089 EOF
11090
11091 fi
11092 fi
11093
11094
11095 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11096 echo "configure:11097: checking for working mmap" >&5
11097 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11098   echo $ac_n "(cached) $ac_c" 1>&6
11099 else
11100   
11101 if test "$cross_compiling" = yes; then
11102   samba_cv_HAVE_MMAP=cross
11103 else
11104   cat > conftest.$ac_ext <<EOF
11105 #line 11106 "configure"
11106 #include "confdefs.h"
11107 #include "${srcdir-.}/tests/shared_mmap.c"
11108 EOF
11109 if { (eval echo configure:11110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11110 then
11111   samba_cv_HAVE_MMAP=yes
11112 else
11113   echo "configure: failed program was:" >&5
11114   cat conftest.$ac_ext >&5
11115   rm -fr conftest*
11116   samba_cv_HAVE_MMAP=no
11117 fi
11118 rm -fr conftest*
11119 fi
11120
11121 fi
11122
11123 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11124 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11125     cat >> confdefs.h <<\EOF
11126 #define HAVE_MMAP 1
11127 EOF
11128
11129 fi
11130
11131 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11132 echo "configure:11133: checking for ftruncate needs root" >&5
11133 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11134   echo $ac_n "(cached) $ac_c" 1>&6
11135 else
11136   
11137 if test "$cross_compiling" = yes; then
11138   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11139 else
11140   cat > conftest.$ac_ext <<EOF
11141 #line 11142 "configure"
11142 #include "confdefs.h"
11143 #include "${srcdir-.}/tests/ftruncroot.c"
11144 EOF
11145 if { (eval echo configure:11146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11146 then
11147   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11148 else
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -fr conftest*
11152   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11153 fi
11154 rm -fr conftest*
11155 fi
11156
11157 fi
11158
11159 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11160 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11161     cat >> confdefs.h <<\EOF
11162 #define FTRUNCATE_NEEDS_ROOT 1
11163 EOF
11164
11165 fi
11166
11167 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11168 echo "configure:11169: checking for fcntl locking" >&5
11169 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11170   echo $ac_n "(cached) $ac_c" 1>&6
11171 else
11172   
11173 if test "$cross_compiling" = yes; then
11174   samba_cv_HAVE_FCNTL_LOCK=cross
11175 else
11176   cat > conftest.$ac_ext <<EOF
11177 #line 11178 "configure"
11178 #include "confdefs.h"
11179 #include "${srcdir-.}/tests/fcntl_lock.c"
11180 EOF
11181 if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11182 then
11183   samba_cv_HAVE_FCNTL_LOCK=yes
11184 else
11185   echo "configure: failed program was:" >&5
11186   cat conftest.$ac_ext >&5
11187   rm -fr conftest*
11188   samba_cv_HAVE_FCNTL_LOCK=no
11189 fi
11190 rm -fr conftest*
11191 fi
11192
11193 fi
11194
11195 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11196 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11197     cat >> confdefs.h <<\EOF
11198 #define HAVE_FCNTL_LOCK 1
11199 EOF
11200
11201 fi
11202
11203 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11204 echo "configure:11205: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11205 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11206   echo $ac_n "(cached) $ac_c" 1>&6
11207 else
11208   
11209 if test "$cross_compiling" = yes; then
11210   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11211 else
11212   cat > conftest.$ac_ext <<EOF
11213 #line 11214 "configure"
11214 #include "confdefs.h"
11215 #include "${srcdir-.}/tests/fcntl_lock64.c"
11216 EOF
11217 if { (eval echo configure:11218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11218 then
11219   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11220 else
11221   echo "configure: failed program was:" >&5
11222   cat conftest.$ac_ext >&5
11223   rm -fr conftest*
11224   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11225 fi
11226 rm -fr conftest*
11227 fi
11228
11229 fi
11230
11231 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11232 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11233     cat >> confdefs.h <<\EOF
11234 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11235 EOF
11236
11237
11238 else
11239
11240
11241   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11242 echo "configure:11243: checking for 64 bit fcntl locking" >&5
11243 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11244   echo $ac_n "(cached) $ac_c" 1>&6
11245 else
11246   
11247   if test "$cross_compiling" = yes; then
11248   samba_cv_HAVE_STRUCT_FLOCK64=cross
11249 else
11250   cat > conftest.$ac_ext <<EOF
11251 #line 11252 "configure"
11252 #include "confdefs.h"
11253
11254 #if defined(HAVE_UNISTD_H)
11255 #include <unistd.h>
11256 #endif
11257 #include <stdio.h>
11258 #include <stdlib.h>
11259
11260 #ifdef HAVE_FCNTL_H
11261 #include <fcntl.h>
11262 #endif
11263
11264 #ifdef HAVE_SYS_FCNTL_H
11265 #include <sys/fcntl.h>
11266 #endif
11267 main() { struct flock64 fl64;
11268 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11269 exit(0);
11270 #else
11271 exit(1);
11272 #endif
11273 }
11274 EOF
11275 if { (eval echo configure:11276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11276 then
11277   samba_cv_HAVE_STRUCT_FLOCK64=yes
11278 else
11279   echo "configure: failed program was:" >&5
11280   cat conftest.$ac_ext >&5
11281   rm -fr conftest*
11282   samba_cv_HAVE_STRUCT_FLOCK64=no
11283 fi
11284 rm -fr conftest*
11285 fi
11286
11287 fi
11288
11289 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11290
11291   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11292       cat >> confdefs.h <<\EOF
11293 #define HAVE_STRUCT_FLOCK64 1
11294 EOF
11295
11296   fi
11297 fi
11298
11299 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11300 echo "configure:11301: checking for st_blocks in struct stat" >&5
11301 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11302   echo $ac_n "(cached) $ac_c" 1>&6
11303 else
11304   
11305 cat > conftest.$ac_ext <<EOF
11306 #line 11307 "configure"
11307 #include "confdefs.h"
11308 #include <sys/types.h>
11309 #include <sys/stat.h>
11310 #include <unistd.h>
11311 int main() {
11312 struct stat st;  st.st_blocks = 0;
11313 ; return 0; }
11314 EOF
11315 if { (eval echo configure:11316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11316   rm -rf conftest*
11317   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11318 else
11319   echo "configure: failed program was:" >&5
11320   cat conftest.$ac_ext >&5
11321   rm -rf conftest*
11322   samba_cv_HAVE_STAT_ST_BLOCKS=no
11323 fi
11324 rm -f conftest*
11325 fi
11326
11327 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11328 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11329     cat >> confdefs.h <<\EOF
11330 #define HAVE_STAT_ST_BLOCKS 1
11331 EOF
11332
11333 fi 
11334
11335 case "$host_os" in
11336 *linux*)
11337 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11338 echo "configure:11339: checking for broken RedHat 7.2 system header files" >&5
11339 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11340   echo $ac_n "(cached) $ac_c" 1>&6
11341 else
11342   
11343 cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346
11347 #ifdef HAVE_SYS_VFS_H
11348 #include <sys/vfs.h>
11349 #endif
11350 #ifdef HAVE_SYS_CAPABILITY_H
11351 #include <sys/capability.h>
11352 #endif
11353
11354 int main() {
11355 int i;
11356 ; return 0; }
11357 EOF
11358 if { (eval echo configure:11359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11359   rm -rf conftest*
11360   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11361 else
11362   echo "configure: failed program was:" >&5
11363   cat conftest.$ac_ext >&5
11364   rm -rf conftest*
11365   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11366 fi
11367 rm -f conftest*
11368 fi
11369
11370 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11371 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11372    cat >> confdefs.h <<\EOF
11373 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11374 EOF
11375
11376 fi
11377 ;;
11378 esac
11379
11380 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11381 echo "configure:11382: checking for broken nisplus include files" >&5
11382 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11383   echo $ac_n "(cached) $ac_c" 1>&6
11384 else
11385   
11386 cat > conftest.$ac_ext <<EOF
11387 #line 11388 "configure"
11388 #include "confdefs.h"
11389 #include <sys/acl.h>
11390 #if defined(HAVE_RPCSVC_NIS_H)
11391 #include <rpcsvc/nis.h>
11392 #endif
11393 int main() {
11394 int i;
11395 ; return 0; }
11396 EOF
11397 if { (eval echo configure:11398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11398   rm -rf conftest*
11399   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11400 else
11401   echo "configure: failed program was:" >&5
11402   cat conftest.$ac_ext >&5
11403   rm -rf conftest*
11404   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11405 fi
11406 rm -f conftest*
11407 fi
11408
11409 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11410 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11411     cat >> confdefs.h <<\EOF
11412 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11413 EOF
11414
11415 fi
11416
11417
11418 #################################################
11419 # check for smbwrapper support
11420 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11421 echo "configure:11422: checking whether to use smbwrapper" >&5
11422 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11423 if test "${with_smbwrapper+set}" = set; then
11424   withval="$with_smbwrapper"
11425    case "$withval" in
11426   yes)
11427     echo "$ac_t""yes" 1>&6
11428     cat >> confdefs.h <<\EOF
11429 #define WITH_SMBWRAPPER 1
11430 EOF
11431
11432         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11433
11434         if test x$ATTEMPT_WRAP32_BUILD = x; then
11435                 WRAP32=""
11436         else
11437                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11438         fi
11439
11440 # Conditions under which smbwrapper should not be built.
11441
11442         if test x$PICFLAG = x; then
11443            echo No support for PIC code - disabling smbwrapper and smbsh
11444            WRAP=""
11445            WRAP32=""
11446         elif test x$ac_cv_func_syscall = xno; then
11447            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11448            WRAP=""
11449            WRAP32=""
11450         fi
11451     ;;
11452   *)
11453     echo "$ac_t""no" 1>&6
11454     ;;
11455   esac 
11456 else
11457   echo "$ac_t""no" 1>&6
11458
11459 fi
11460
11461
11462 #################################################
11463 # check for AFS clear-text auth support
11464 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11465 echo "configure:11466: checking whether to use AFS clear-text auth" >&5
11466 # Check whether --with-afs or --without-afs was given.
11467 if test "${with_afs+set}" = set; then
11468   withval="$with_afs"
11469    case "$withval" in
11470   yes)
11471     echo "$ac_t""yes" 1>&6
11472     cat >> confdefs.h <<\EOF
11473 #define WITH_AFS 1
11474 EOF
11475
11476     ;;
11477   *)
11478     echo "$ac_t""no" 1>&6
11479     ;;
11480   esac 
11481 else
11482   echo "$ac_t""no" 1>&6
11483
11484 fi
11485
11486
11487
11488 #################################################
11489 # check for the DFS clear-text auth system
11490 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11491 echo "configure:11492: checking whether to use DFS clear-text auth" >&5
11492 # Check whether --with-dfs or --without-dfs was given.
11493 if test "${with_dfs+set}" = set; then
11494   withval="$with_dfs"
11495    case "$withval" in
11496   yes)
11497     echo "$ac_t""yes" 1>&6
11498     cat >> confdefs.h <<\EOF
11499 #define WITH_DFS 1
11500 EOF
11501
11502     ;;
11503   *)
11504     echo "$ac_t""no" 1>&6
11505     ;;
11506   esac 
11507 else
11508   echo "$ac_t""no" 1>&6
11509
11510 fi
11511
11512
11513
11514 #################################################
11515 # see if this box has the RedHat location for kerberos
11516 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11517 echo "configure:11518: checking for /usr/kerberos" >&5
11518 if test -d /usr/kerberos; then
11519     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11520     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11521     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11522     echo "$ac_t""yes" 1>&6
11523 else
11524     echo "$ac_t""no" 1>&6
11525 fi
11526
11527 #################################################
11528 # check for location of Kerberos 5 install
11529 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11530 echo "configure:11531: checking for kerberos 5 install path" >&5
11531 # Check whether --with-krb5 or --without-krb5 was given.
11532 if test "${with_krb5+set}" = set; then
11533   withval="$with_krb5"
11534    case "$withval" in
11535   no)
11536     echo "$ac_t""no" 1>&6
11537     ;;
11538   *)
11539     echo "$ac_t""yes" 1>&6
11540     LIBS="$LIBS -lkrb5"
11541     CFLAGS="$CFLAGS -I$withval/include"
11542     CPPFLAGS="$CPPFLAGS -I$withval/include"
11543     LDFLAGS="$LDFLAGS -L$withval/lib"
11544     ;;
11545   esac 
11546 else
11547   echo "$ac_t""no" 1>&6
11548
11549 fi
11550
11551
11552 # now check for krb5.h. Some systems have the libraries without the headers!
11553 # note that this check is done here to allow for different kerberos
11554 # include paths
11555 for ac_hdr in krb5.h
11556 do
11557 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11558 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11559 echo "configure:11560: checking for $ac_hdr" >&5
11560 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11561   echo $ac_n "(cached) $ac_c" 1>&6
11562 else
11563   cat > conftest.$ac_ext <<EOF
11564 #line 11565 "configure"
11565 #include "confdefs.h"
11566 #include <$ac_hdr>
11567 EOF
11568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11569 { (eval echo configure:11570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11571 if test -z "$ac_err"; then
11572   rm -rf conftest*
11573   eval "ac_cv_header_$ac_safe=yes"
11574 else
11575   echo "$ac_err" >&5
11576   echo "configure: failed program was:" >&5
11577   cat conftest.$ac_ext >&5
11578   rm -rf conftest*
11579   eval "ac_cv_header_$ac_safe=no"
11580 fi
11581 rm -f conftest*
11582 fi
11583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11584   echo "$ac_t""yes" 1>&6
11585     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11586   cat >> confdefs.h <<EOF
11587 #define $ac_tr_hdr 1
11588 EOF
11589  
11590 else
11591   echo "$ac_t""no" 1>&6
11592 fi
11593 done
11594
11595
11596 # now check for gssapi headers.  This is also done here to allow for
11597 # different kerberos include paths
11598 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11599 do
11600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11602 echo "configure:11603: checking for $ac_hdr" >&5
11603 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11604   echo $ac_n "(cached) $ac_c" 1>&6
11605 else
11606   cat > conftest.$ac_ext <<EOF
11607 #line 11608 "configure"
11608 #include "confdefs.h"
11609 #include <$ac_hdr>
11610 EOF
11611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11612 { (eval echo configure:11613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11614 if test -z "$ac_err"; then
11615   rm -rf conftest*
11616   eval "ac_cv_header_$ac_safe=yes"
11617 else
11618   echo "$ac_err" >&5
11619   echo "configure: failed program was:" >&5
11620   cat conftest.$ac_ext >&5
11621   rm -rf conftest*
11622   eval "ac_cv_header_$ac_safe=no"
11623 fi
11624 rm -f conftest*
11625 fi
11626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11627   echo "$ac_t""yes" 1>&6
11628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11629   cat >> confdefs.h <<EOF
11630 #define $ac_tr_hdr 1
11631 EOF
11632  
11633 else
11634   echo "$ac_t""no" 1>&6
11635 fi
11636 done
11637
11638
11639 ##################################################################
11640 # we might need the k5crypto and com_err libraries on some systems
11641 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11642 echo "configure:11643: checking for _et_list in -lcom_err" >&5
11643 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11644 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11645   echo $ac_n "(cached) $ac_c" 1>&6
11646 else
11647   ac_save_LIBS="$LIBS"
11648 LIBS="-lcom_err  $LIBS"
11649 cat > conftest.$ac_ext <<EOF
11650 #line 11651 "configure"
11651 #include "confdefs.h"
11652 /* Override any gcc2 internal prototype to avoid an error.  */
11653 /* We use char because int might match the return type of a gcc2
11654     builtin and then its argument prototype would still apply.  */
11655 char _et_list();
11656
11657 int main() {
11658 _et_list()
11659 ; return 0; }
11660 EOF
11661 if { (eval echo configure:11662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11662   rm -rf conftest*
11663   eval "ac_cv_lib_$ac_lib_var=yes"
11664 else
11665   echo "configure: failed program was:" >&5
11666   cat conftest.$ac_ext >&5
11667   rm -rf conftest*
11668   eval "ac_cv_lib_$ac_lib_var=no"
11669 fi
11670 rm -f conftest*
11671 LIBS="$ac_save_LIBS"
11672
11673 fi
11674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11675   echo "$ac_t""yes" 1>&6
11676   LIBS="$LIBS -lcom_err"
11677 else
11678   echo "$ac_t""no" 1>&6
11679 fi
11680
11681 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11682 echo "configure:11683: checking for krb5_encrypt_data in -lk5crypto" >&5
11683 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11684 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11685   echo $ac_n "(cached) $ac_c" 1>&6
11686 else
11687   ac_save_LIBS="$LIBS"
11688 LIBS="-lk5crypto  $LIBS"
11689 cat > conftest.$ac_ext <<EOF
11690 #line 11691 "configure"
11691 #include "confdefs.h"
11692 /* Override any gcc2 internal prototype to avoid an error.  */
11693 /* We use char because int might match the return type of a gcc2
11694     builtin and then its argument prototype would still apply.  */
11695 char krb5_encrypt_data();
11696
11697 int main() {
11698 krb5_encrypt_data()
11699 ; return 0; }
11700 EOF
11701 if { (eval echo configure:11702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11702   rm -rf conftest*
11703   eval "ac_cv_lib_$ac_lib_var=yes"
11704 else
11705   echo "configure: failed program was:" >&5
11706   cat conftest.$ac_ext >&5
11707   rm -rf conftest*
11708   eval "ac_cv_lib_$ac_lib_var=no"
11709 fi
11710 rm -f conftest*
11711 LIBS="$ac_save_LIBS"
11712
11713 fi
11714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11715   echo "$ac_t""yes" 1>&6
11716   LIBS="$LIBS -lk5crypto"
11717 else
11718   echo "$ac_t""no" 1>&6
11719 fi
11720
11721 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11722 echo "configure:11723: checking for gss_display_status in -lgssapi_krb5" >&5
11723 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11725   echo $ac_n "(cached) $ac_c" 1>&6
11726 else
11727   ac_save_LIBS="$LIBS"
11728 LIBS="-lgssapi_krb5  $LIBS"
11729 cat > conftest.$ac_ext <<EOF
11730 #line 11731 "configure"
11731 #include "confdefs.h"
11732 /* Override any gcc2 internal prototype to avoid an error.  */
11733 /* We use char because int might match the return type of a gcc2
11734     builtin and then its argument prototype would still apply.  */
11735 char gss_display_status();
11736
11737 int main() {
11738 gss_display_status()
11739 ; return 0; }
11740 EOF
11741 if { (eval echo configure:11742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11742   rm -rf conftest*
11743   eval "ac_cv_lib_$ac_lib_var=yes"
11744 else
11745   echo "configure: failed program was:" >&5
11746   cat conftest.$ac_ext >&5
11747   rm -rf conftest*
11748   eval "ac_cv_lib_$ac_lib_var=no"
11749 fi
11750 rm -f conftest*
11751 LIBS="$ac_save_LIBS"
11752
11753 fi
11754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11755   echo "$ac_t""yes" 1>&6
11756   LIBS="$LIBS -lgssapi_krb5"
11757 else
11758   echo "$ac_t""no" 1>&6
11759 fi
11760
11761
11762
11763 ########################################################
11764 # now see if we can find the krb5 libs in standard paths
11765 # or as specified above
11766 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11767 echo "configure:11768: checking for krb5_mk_req_extended in -lkrb5" >&5
11768 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11769 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11770   echo $ac_n "(cached) $ac_c" 1>&6
11771 else
11772   ac_save_LIBS="$LIBS"
11773 LIBS="-lkrb5  $LIBS"
11774 cat > conftest.$ac_ext <<EOF
11775 #line 11776 "configure"
11776 #include "confdefs.h"
11777 /* Override any gcc2 internal prototype to avoid an error.  */
11778 /* We use char because int might match the return type of a gcc2
11779     builtin and then its argument prototype would still apply.  */
11780 char krb5_mk_req_extended();
11781
11782 int main() {
11783 krb5_mk_req_extended()
11784 ; return 0; }
11785 EOF
11786 if { (eval echo configure:11787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11787   rm -rf conftest*
11788   eval "ac_cv_lib_$ac_lib_var=yes"
11789 else
11790   echo "configure: failed program was:" >&5
11791   cat conftest.$ac_ext >&5
11792   rm -rf conftest*
11793   eval "ac_cv_lib_$ac_lib_var=no"
11794 fi
11795 rm -f conftest*
11796 LIBS="$ac_save_LIBS"
11797
11798 fi
11799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11800   echo "$ac_t""yes" 1>&6
11801   LIBS="$LIBS -lkrb5";
11802         cat >> confdefs.h <<\EOF
11803 #define HAVE_KRB5 1
11804 EOF
11805
11806 else
11807   echo "$ac_t""no" 1>&6
11808 fi
11809
11810
11811 ########################################################
11812 # now see if we can find the gssapi libs in standard paths
11813 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11814 echo "configure:11815: checking for gss_display_status in -lgssapi_krb5" >&5
11815 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11817   echo $ac_n "(cached) $ac_c" 1>&6
11818 else
11819   ac_save_LIBS="$LIBS"
11820 LIBS="-lgssapi_krb5  $LIBS"
11821 cat > conftest.$ac_ext <<EOF
11822 #line 11823 "configure"
11823 #include "confdefs.h"
11824 /* Override any gcc2 internal prototype to avoid an error.  */
11825 /* We use char because int might match the return type of a gcc2
11826     builtin and then its argument prototype would still apply.  */
11827 char gss_display_status();
11828
11829 int main() {
11830 gss_display_status()
11831 ; return 0; }
11832 EOF
11833 if { (eval echo configure:11834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11834   rm -rf conftest*
11835   eval "ac_cv_lib_$ac_lib_var=yes"
11836 else
11837   echo "configure: failed program was:" >&5
11838   cat conftest.$ac_ext >&5
11839   rm -rf conftest*
11840   eval "ac_cv_lib_$ac_lib_var=no"
11841 fi
11842 rm -f conftest*
11843 LIBS="$ac_save_LIBS"
11844
11845 fi
11846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11847   echo "$ac_t""yes" 1>&6
11848   cat >> confdefs.h <<\EOF
11849 #define HAVE_GSSAPI 1
11850 EOF
11851
11852 else
11853   echo "$ac_t""no" 1>&6
11854 fi
11855
11856
11857
11858 ##################################################################
11859 # we might need the lber lib on some systems. To avoid link errors
11860 # this test must be before the libldap test
11861 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11862 echo "configure:11863: checking for ber_scanf in -llber" >&5
11863 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11864 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11865   echo $ac_n "(cached) $ac_c" 1>&6
11866 else
11867   ac_save_LIBS="$LIBS"
11868 LIBS="-llber  $LIBS"
11869 cat > conftest.$ac_ext <<EOF
11870 #line 11871 "configure"
11871 #include "confdefs.h"
11872 /* Override any gcc2 internal prototype to avoid an error.  */
11873 /* We use char because int might match the return type of a gcc2
11874     builtin and then its argument prototype would still apply.  */
11875 char ber_scanf();
11876
11877 int main() {
11878 ber_scanf()
11879 ; return 0; }
11880 EOF
11881 if { (eval echo configure:11882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11882   rm -rf conftest*
11883   eval "ac_cv_lib_$ac_lib_var=yes"
11884 else
11885   echo "configure: failed program was:" >&5
11886   cat conftest.$ac_ext >&5
11887   rm -rf conftest*
11888   eval "ac_cv_lib_$ac_lib_var=no"
11889 fi
11890 rm -f conftest*
11891 LIBS="$ac_save_LIBS"
11892
11893 fi
11894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11895   echo "$ac_t""yes" 1>&6
11896   LIBS="$LIBS -llber"
11897 else
11898   echo "$ac_t""no" 1>&6
11899 fi
11900
11901
11902 ########################################################
11903 # now see if we can find the ldap libs in standard paths
11904 if test x$have_ldap != xyes; then
11905 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
11906 echo "configure:11907: checking for ldap_domain2hostlist in -lldap" >&5
11907 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
11908 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11909   echo $ac_n "(cached) $ac_c" 1>&6
11910 else
11911   ac_save_LIBS="$LIBS"
11912 LIBS="-lldap  $LIBS"
11913 cat > conftest.$ac_ext <<EOF
11914 #line 11915 "configure"
11915 #include "confdefs.h"
11916 /* Override any gcc2 internal prototype to avoid an error.  */
11917 /* We use char because int might match the return type of a gcc2
11918     builtin and then its argument prototype would still apply.  */
11919 char ldap_domain2hostlist();
11920
11921 int main() {
11922 ldap_domain2hostlist()
11923 ; return 0; }
11924 EOF
11925 if { (eval echo configure:11926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11926   rm -rf conftest*
11927   eval "ac_cv_lib_$ac_lib_var=yes"
11928 else
11929   echo "configure: failed program was:" >&5
11930   cat conftest.$ac_ext >&5
11931   rm -rf conftest*
11932   eval "ac_cv_lib_$ac_lib_var=no"
11933 fi
11934 rm -f conftest*
11935 LIBS="$ac_save_LIBS"
11936
11937 fi
11938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11939   echo "$ac_t""yes" 1>&6
11940   LIBS="$LIBS -lldap";
11941         cat >> confdefs.h <<\EOF
11942 #define HAVE_LDAP 1
11943 EOF
11944
11945 else
11946   echo "$ac_t""no" 1>&6
11947 fi
11948
11949 fi
11950
11951 #################################################
11952 # check for automount support
11953 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11954 echo "configure:11955: checking whether to use AUTOMOUNT" >&5
11955 # Check whether --with-automount or --without-automount was given.
11956 if test "${with_automount+set}" = set; then
11957   withval="$with_automount"
11958    case "$withval" in
11959   yes)
11960     echo "$ac_t""yes" 1>&6
11961     cat >> confdefs.h <<\EOF
11962 #define WITH_AUTOMOUNT 1
11963 EOF
11964
11965     ;;
11966   *)
11967     echo "$ac_t""no" 1>&6
11968     ;;
11969   esac 
11970 else
11971   echo "$ac_t""no" 1>&6
11972
11973 fi
11974
11975
11976 #################################################
11977 # check for smbmount support
11978 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11979 echo "configure:11980: checking whether to use SMBMOUNT" >&5
11980 # Check whether --with-smbmount or --without-smbmount was given.
11981 if test "${with_smbmount+set}" = set; then
11982   withval="$with_smbmount"
11983    case "$withval" in
11984   yes)
11985         case "$host_os" in
11986         *linux*)
11987                 echo "$ac_t""yes" 1>&6
11988                 cat >> confdefs.h <<\EOF
11989 #define WITH_SMBMOUNT 1
11990 EOF
11991
11992                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11993                 ;;
11994         *)
11995                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11996                 ;;
11997         esac
11998     ;;
11999   *)
12000     echo "$ac_t""no" 1>&6
12001     MPROGS=
12002     ;;
12003   esac 
12004 else
12005   echo "$ac_t""no" 1>&6
12006   MPROGS=
12007
12008 fi
12009
12010
12011
12012 #################################################
12013 # check for a PAM clear-text auth, accounts, password and session support
12014 with_pam_for_crypt=no
12015 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12016 echo "configure:12017: checking whether to use PAM" >&5
12017 # Check whether --with-pam or --without-pam was given.
12018 if test "${with_pam+set}" = set; then
12019   withval="$with_pam"
12020    case "$withval" in
12021   yes)
12022     echo "$ac_t""yes" 1>&6
12023     cat >> confdefs.h <<\EOF
12024 #define WITH_PAM 1
12025 EOF
12026
12027     LIBS="$LIBS -lpam"
12028     with_pam_for_crypt=yes
12029     ;;
12030   *)
12031     echo "$ac_t""no" 1>&6
12032     ;;
12033   esac 
12034 else
12035   echo "$ac_t""no" 1>&6
12036
12037 fi
12038
12039
12040 # we can't build a pam module if we don't have pam.
12041 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12042 echo "configure:12043: checking for pam_get_data in -lpam" >&5
12043 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12044 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12045   echo $ac_n "(cached) $ac_c" 1>&6
12046 else
12047   ac_save_LIBS="$LIBS"
12048 LIBS="-lpam  $LIBS"
12049 cat > conftest.$ac_ext <<EOF
12050 #line 12051 "configure"
12051 #include "confdefs.h"
12052 /* Override any gcc2 internal prototype to avoid an error.  */
12053 /* We use char because int might match the return type of a gcc2
12054     builtin and then its argument prototype would still apply.  */
12055 char pam_get_data();
12056
12057 int main() {
12058 pam_get_data()
12059 ; return 0; }
12060 EOF
12061 if { (eval echo configure:12062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12062   rm -rf conftest*
12063   eval "ac_cv_lib_$ac_lib_var=yes"
12064 else
12065   echo "configure: failed program was:" >&5
12066   cat conftest.$ac_ext >&5
12067   rm -rf conftest*
12068   eval "ac_cv_lib_$ac_lib_var=no"
12069 fi
12070 rm -f conftest*
12071 LIBS="$ac_save_LIBS"
12072
12073 fi
12074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12075   echo "$ac_t""yes" 1>&6
12076   cat >> confdefs.h <<\EOF
12077 #define HAVE_LIBPAM 1
12078 EOF
12079
12080 else
12081   echo "$ac_t""no" 1>&6
12082 fi
12083
12084
12085 #################################################
12086 # check for pam_smbpass support
12087 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12088 echo "configure:12089: checking whether to use pam_smbpass" >&5
12089 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12090 if test "${with_pam_smbpass+set}" = set; then
12091   withval="$with_pam_smbpass"
12092    case "$withval" in
12093   yes)
12094     echo "$ac_t""yes" 1>&6
12095
12096 # Conditions under which pam_smbpass should not be built.
12097
12098        if test x$PICFLAG = x; then
12099           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12100           PAM_MOD=""
12101        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12102           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12103           PAM_MOD=""
12104        else
12105           PAM_MOD="bin/pam_smbpass.so"
12106        fi
12107     ;;
12108   *)
12109     echo "$ac_t""no" 1>&6
12110     ;;
12111   esac 
12112 else
12113   echo "$ac_t""no" 1>&6
12114
12115 fi
12116
12117
12118
12119 ###############################################
12120 # test for where we get crypt() from, but only
12121 # if not using PAM
12122 if test $with_pam_for_crypt = no; then
12123 for ac_func in crypt
12124 do
12125 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12126 echo "configure:12127: checking for $ac_func" >&5
12127 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12128   echo $ac_n "(cached) $ac_c" 1>&6
12129 else
12130   cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 /* System header to define __stub macros and hopefully few prototypes,
12134     which can conflict with char $ac_func(); below.  */
12135 #include <assert.h>
12136 /* Override any gcc2 internal prototype to avoid an error.  */
12137 /* We use char because int might match the return type of a gcc2
12138     builtin and then its argument prototype would still apply.  */
12139 char $ac_func();
12140
12141 int main() {
12142
12143 /* The GNU C library defines this for functions which it implements
12144     to always fail with ENOSYS.  Some functions are actually named
12145     something starting with __ and the normal name is an alias.  */
12146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12147 choke me
12148 #else
12149 $ac_func();
12150 #endif
12151
12152 ; return 0; }
12153 EOF
12154 if { (eval echo configure:12155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12155   rm -rf conftest*
12156   eval "ac_cv_func_$ac_func=yes"
12157 else
12158   echo "configure: failed program was:" >&5
12159   cat conftest.$ac_ext >&5
12160   rm -rf conftest*
12161   eval "ac_cv_func_$ac_func=no"
12162 fi
12163 rm -f conftest*
12164 fi
12165
12166 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12167   echo "$ac_t""yes" 1>&6
12168     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12169   cat >> confdefs.h <<EOF
12170 #define $ac_tr_func 1
12171 EOF
12172  
12173 else
12174   echo "$ac_t""no" 1>&6
12175 fi
12176 done
12177
12178 if test x"$ac_cv_func_crypt" = x"no"; then
12179     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12180 echo "configure:12181: checking for crypt in -lcrypt" >&5
12181 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12182 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12183   echo $ac_n "(cached) $ac_c" 1>&6
12184 else
12185   ac_save_LIBS="$LIBS"
12186 LIBS="-lcrypt  $LIBS"
12187 cat > conftest.$ac_ext <<EOF
12188 #line 12189 "configure"
12189 #include "confdefs.h"
12190 /* Override any gcc2 internal prototype to avoid an error.  */
12191 /* We use char because int might match the return type of a gcc2
12192     builtin and then its argument prototype would still apply.  */
12193 char crypt();
12194
12195 int main() {
12196 crypt()
12197 ; return 0; }
12198 EOF
12199 if { (eval echo configure:12200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12200   rm -rf conftest*
12201   eval "ac_cv_lib_$ac_lib_var=yes"
12202 else
12203   echo "configure: failed program was:" >&5
12204   cat conftest.$ac_ext >&5
12205   rm -rf conftest*
12206   eval "ac_cv_lib_$ac_lib_var=no"
12207 fi
12208 rm -f conftest*
12209 LIBS="$ac_save_LIBS"
12210
12211 fi
12212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12213   echo "$ac_t""yes" 1>&6
12214   LIBS="$LIBS -lcrypt";
12215         cat >> confdefs.h <<\EOF
12216 #define HAVE_CRYPT 1
12217 EOF
12218
12219 else
12220   echo "$ac_t""no" 1>&6
12221 fi
12222
12223 fi
12224 fi
12225
12226 ##
12227 ## moved after the check for -lcrypt in order to
12228 ## ensure that the necessary libraries are included
12229 ## check checking for truncated salt.  Wrapped by the
12230 ## $with_pam_for_crypt variable as above   --jerry
12231 ##
12232 if test $with_pam_for_crypt = no; then
12233 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12234 echo "configure:12235: checking for a crypt that needs truncated salt" >&5
12235 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12236   echo $ac_n "(cached) $ac_c" 1>&6
12237 else
12238   
12239 if test "$cross_compiling" = yes; then
12240   samba_cv_HAVE_TRUNCATED_SALT=cross
12241 else
12242   cat > conftest.$ac_ext <<EOF
12243 #line 12244 "configure"
12244 #include "confdefs.h"
12245 #include "${srcdir-.}/tests/crypttest.c"
12246 EOF
12247 if { (eval echo configure:12248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12248 then
12249   samba_cv_HAVE_TRUNCATED_SALT=no
12250 else
12251   echo "configure: failed program was:" >&5
12252   cat conftest.$ac_ext >&5
12253   rm -fr conftest*
12254   samba_cv_HAVE_TRUNCATED_SALT=yes
12255 fi
12256 rm -fr conftest*
12257 fi
12258
12259 fi
12260
12261 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12262 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12263         cat >> confdefs.h <<\EOF
12264 #define HAVE_TRUNCATED_SALT 1
12265 EOF
12266
12267 fi
12268 fi
12269
12270
12271
12272 ########################################################################################
12273 ##
12274 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12275 ##
12276 ########################################################################################
12277
12278 ## set the with_smbpasswd_sam as the default
12279 with_smbpasswd_sam=yes
12280
12281
12282 #################################################
12283 # check for a TDB password database
12284 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12285 echo "configure:12286: checking whether to use TDB SAM database" >&5
12286 # Check whether --with-tdbsam or --without-tdbsam was given.
12287 if test "${with_tdbsam+set}" = set; then
12288   withval="$with_tdbsam"
12289    case "$withval" in
12290   yes)
12291     echo "$ac_t""yes" 1>&6
12292     cat >> confdefs.h <<\EOF
12293 #define WITH_TDB_SAM 1
12294 EOF
12295
12296     with_smbpasswd_sam=no
12297     ;;
12298   *)
12299     echo "$ac_t""no" 1>&6
12300     ;;
12301   esac 
12302 else
12303   echo "$ac_t""no" 1>&6
12304
12305 fi
12306
12307
12308 #################################################
12309 # check for a LDAP password database
12310 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12311 echo "configure:12312: checking whether to use LDAP SAM database" >&5
12312 # Check whether --with-ldapsam or --without-ldapsam was given.
12313 if test "${with_ldapsam+set}" = set; then
12314   withval="$with_ldapsam"
12315    case "$withval" in
12316   yes)
12317     echo "$ac_t""yes" 1>&6
12318     cat >> confdefs.h <<\EOF
12319 #define WITH_LDAP_SAM 1
12320 EOF
12321
12322     LIBS="-lldap -llber $LIBS"
12323     with_smbpasswd_sam=no
12324     ;;
12325   *)
12326     echo "$ac_t""no" 1>&6
12327     ;;
12328   esac 
12329 else
12330   echo "$ac_t""no" 1>&6
12331
12332 fi
12333
12334
12335 #################################################
12336 # check for a NISPLUS password database
12337 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12338 echo "configure:12339: checking whether to use NISPLUS SAM database" >&5
12339 # Check whether --with-nisplussam or --without-nisplussam was given.
12340 if test "${with_nisplussam+set}" = set; then
12341   withval="$with_nisplussam"
12342    case "$withval" in
12343   yes)
12344     echo "$ac_t""yes" 1>&6
12345     cat >> confdefs.h <<\EOF
12346 #define WITH_NISPLUS_SAM 1
12347 EOF
12348
12349     with_smbpasswd_sam=no
12350     ;;
12351   *)
12352     echo "$ac_t""no" 1>&6
12353     ;;
12354   esac 
12355 else
12356   echo "$ac_t""no" 1>&6
12357
12358 fi
12359
12360
12361 ################################################
12362 # This test should come last because the
12363 # smbpasswd SAM is only used if another format
12364 # has not been defined
12365 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
12366 echo "configure:12367: checking whether to use traditional smbpasswd file" >&5
12367 if test $with_smbpasswd_sam = yes; then
12368         echo "$ac_t""yes" 1>&6
12369         cat >> confdefs.h <<\EOF
12370 #define WITH_SMBPASSWD_SAM 1
12371 EOF
12372
12373 else
12374         echo "$ac_t""no" 1>&6
12375 fi
12376
12377 ########################################################################################
12378 ##
12379 ## END OF TESTS FOR SAM BACKENDS.  
12380 ##
12381 ########################################################################################
12382
12383 #################################################
12384 # check for a NISPLUS_HOME support 
12385 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12386 echo "configure:12387: checking whether to use NISPLUS_HOME" >&5
12387 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12388 if test "${with_nisplus_home+set}" = set; then
12389   withval="$with_nisplus_home"
12390    case "$withval" in
12391   yes)
12392     echo "$ac_t""yes" 1>&6
12393     cat >> confdefs.h <<\EOF
12394 #define WITH_NISPLUS_HOME 1
12395 EOF
12396
12397     ;;
12398   *)
12399     echo "$ac_t""no" 1>&6
12400     ;;
12401   esac 
12402 else
12403   echo "$ac_t""no" 1>&6
12404
12405 fi
12406
12407
12408 #################################################
12409 # check for the secure socket layer
12410 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12411 echo "configure:12412: checking whether to use SSL" >&5
12412 # Check whether --with-ssl or --without-ssl was given.
12413 if test "${with_ssl+set}" = set; then
12414   withval="$with_ssl"
12415    case "$withval" in
12416   yes)
12417     echo "$ac_t""yes" 1>&6
12418     cat >> confdefs.h <<\EOF
12419 #define WITH_SSL 1
12420 EOF
12421
12422     withval="/usr/local/ssl"     # default
12423
12424     if test "${with_sslinc+set}" = set; then
12425
12426         withval="$with_sslinc"
12427         case "$withval" in
12428         yes|no)
12429           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12430           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12431         ;;
12432         * )
12433           CFLAGS="-I${withval} $CFLAGS"
12434         ;;
12435         esac
12436
12437     else
12438
12439         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12440
12441     fi
12442
12443     if test "${with_ssllib+set}" = set; then
12444
12445         withval="$with_ssllib"
12446         case "$withval" in
12447         yes|no)
12448           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12449           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12450         ;;
12451         * )
12452           LDFLAGS="-L${withval}/lib $LDFLAGS"
12453         ;;
12454         esac
12455
12456     else
12457
12458         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12459
12460     fi
12461
12462     LIBS="-lssl -lcrypto $LIBS"
12463
12464 #    if test ! -d ${withval}; then
12465 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12466 #      exit 1
12467 #    fi 
12468
12469     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12470
12471     ;;
12472   *)
12473     echo "$ac_t""no" 1>&6
12474     ;;
12475   esac 
12476 else
12477   echo "$ac_t""no" 1>&6
12478
12479 fi
12480
12481
12482 #################################################
12483 # check for syslog logging
12484 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12485 echo "configure:12486: checking whether to use syslog logging" >&5
12486 # Check whether --with-syslog or --without-syslog was given.
12487 if test "${with_syslog+set}" = set; then
12488   withval="$with_syslog"
12489    case "$withval" in
12490   yes)
12491     echo "$ac_t""yes" 1>&6
12492     cat >> confdefs.h <<\EOF
12493 #define WITH_SYSLOG 1
12494 EOF
12495
12496     ;;
12497   *)
12498     echo "$ac_t""no" 1>&6
12499     ;;
12500   esac 
12501 else
12502   echo "$ac_t""no" 1>&6
12503
12504 fi
12505
12506
12507 #################################################
12508 # check for a shared memory profiling support
12509 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12510 echo "configure:12511: checking whether to use profiling" >&5
12511 # Check whether --with-profiling-data or --without-profiling-data was given.
12512 if test "${with_profiling_data+set}" = set; then
12513   withval="$with_profiling_data"
12514    case "$withval" in
12515   yes)
12516     echo "$ac_t""yes" 1>&6
12517     cat >> confdefs.h <<\EOF
12518 #define WITH_PROFILE 1
12519 EOF
12520
12521     ;;
12522   *)
12523     echo "$ac_t""no" 1>&6
12524     ;;
12525   esac 
12526 else
12527   echo "$ac_t""no" 1>&6
12528
12529 fi
12530
12531
12532
12533 #################################################
12534 # check for experimental disk-quotas support
12535 QUOTAOBJS=smbd/noquotas.o
12536
12537 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12538 echo "configure:12539: checking whether to support disk-quotas" >&5
12539 # Check whether --with-quotas or --without-quotas was given.
12540 if test "${with_quotas+set}" = set; then
12541   withval="$with_quotas"
12542    case "$withval" in
12543   yes)
12544     echo "$ac_t""yes" 1>&6
12545     case "$host_os" in
12546       *linux*)
12547         # Check for kernel 2.4.x quota braindamage...
12548         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12549 echo "configure:12550: checking for linux 2.4.x quota braindamage.." >&5
12550 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12551   echo $ac_n "(cached) $ac_c" 1>&6
12552 else
12553   
12554         cat > conftest.$ac_ext <<EOF
12555 #line 12556 "configure"
12556 #include "confdefs.h"
12557 #include <stdio.h>
12558 #include <sys/types.h>
12559 #include <asm/types.h>
12560 #include <linux/quota.h>
12561 #include <mntent.h>
12562 #include <linux/unistd.h>
12563 int main() {
12564 struct mem_dqblk D;
12565 ; return 0; }
12566 EOF
12567 if { (eval echo configure:12568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12568   rm -rf conftest*
12569   samba_cv_linux_2_4_quota_braindamage=yes
12570 else
12571   echo "configure: failed program was:" >&5
12572   cat conftest.$ac_ext >&5
12573   rm -rf conftest*
12574   samba_cv_linux_2_4_quota_braindamage=no
12575 fi
12576 rm -f conftest*
12577 fi
12578
12579 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12580 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12581         cat >> confdefs.h <<\EOF
12582 #define LINUX_QUOTAS_2 1
12583 EOF
12584
12585 else
12586         cat >> confdefs.h <<\EOF
12587 #define LINUX_QUOTAS_1 1
12588 EOF
12589
12590 fi
12591         ;;
12592       *)
12593         ;;
12594     esac
12595     QUOTAOBJS=smbd/quotas.o
12596     cat >> confdefs.h <<\EOF
12597 #define WITH_QUOTAS 1
12598 EOF
12599
12600     ;;
12601   *)
12602     echo "$ac_t""no" 1>&6
12603     ;;
12604   esac 
12605 else
12606   echo "$ac_t""no" 1>&6
12607
12608 fi
12609
12610
12611
12612 #################################################
12613 # check for experimental utmp accounting
12614
12615 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12616 echo "configure:12617: checking whether to support utmp accounting" >&5
12617 # Check whether --with-utmp or --without-utmp was given.
12618 if test "${with_utmp+set}" = set; then
12619   withval="$with_utmp"
12620    case "$withval" in
12621   yes)
12622     echo "$ac_t""yes" 1>&6
12623     cat >> confdefs.h <<\EOF
12624 #define WITH_UTMP 1
12625 EOF
12626
12627     ;;
12628   *)
12629     echo "$ac_t""no" 1>&6
12630     ;;
12631   esac 
12632 else
12633   echo "$ac_t""no" 1>&6
12634
12635 fi
12636
12637
12638 #################################################
12639 # set private directory location
12640 # Check whether --with-privatedir or --without-privatedir was given.
12641 if test "${with_privatedir+set}" = set; then
12642   withval="$with_privatedir"
12643    case "$withval" in
12644   yes|no)
12645   #
12646   # Just in case anybody calls it without argument
12647   #
12648     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12649     privatedir='${prefix}/private'
12650   ;;
12651   * )
12652     privatedir="$withval"
12653     ;;
12654   esac
12655   
12656 else
12657   privatedir='${prefix}/private'
12658    
12659
12660 fi
12661
12662
12663 #################################################
12664 # set lock directory location
12665 # Check whether --with-lockdir or --without-lockdir was given.
12666 if test "${with_lockdir+set}" = set; then
12667   withval="$with_lockdir"
12668    case "$withval" in
12669   yes|no)
12670   #
12671   # Just in case anybody calls it without argument
12672   #
12673     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12674     lockdir='$(VARDIR)/locks'
12675   ;;
12676   * )
12677     lockdir="$withval"
12678     ;;
12679   esac
12680   
12681 else
12682   lockdir='$(VARDIR)/locks'
12683    
12684
12685 fi
12686
12687
12688 #################################################
12689 # set SWAT directory location
12690 # Check whether --with-swatdir or --without-swatdir was given.
12691 if test "${with_swatdir+set}" = set; then
12692   withval="$with_swatdir"
12693    case "$withval" in
12694   yes|no)
12695   #
12696   # Just in case anybody does it
12697   #
12698     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12699     swatdir='${prefix}/swat'
12700   ;;
12701   * )
12702     swatdir="$withval"
12703     ;;
12704   esac
12705   
12706 else
12707   swatdir='${prefix}/swat'
12708    
12709
12710 fi
12711
12712
12713 #################################################
12714 # choose native language(s) of man pages
12715 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12716 echo "configure:12717: checking chosen man pages' language(s)" >&5
12717 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12718 if test "${with_manpages_langs+set}" = set; then
12719   withval="$with_manpages_langs"
12720    case "$withval" in
12721   yes|no)
12722     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12723     manlangs="en"
12724   ;;
12725   *)
12726     manlangs="$withval"
12727   ;;
12728   esac
12729
12730   echo "$ac_t""$manlangs" 1>&6
12731   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12732   
12733 else
12734   manlangs="en"
12735   echo "$ac_t""$manlangs" 1>&6
12736   
12737
12738 fi
12739
12740
12741 #################################################
12742 # these tests are taken from the GNU fileutils package
12743 echo "checking how to get filesystem space usage" 1>&6
12744 echo "configure:12745: checking how to get filesystem space usage" >&5
12745 space=no
12746
12747 # Test for statvfs64.
12748 if test $space = no; then
12749   # SVR4
12750   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12751 echo "configure:12752: checking statvfs64 function (SVR4)" >&5
12752 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12753   echo $ac_n "(cached) $ac_c" 1>&6
12754 else
12755   if test "$cross_compiling" = yes; then
12756   fu_cv_sys_stat_statvfs64=cross
12757 else
12758   cat > conftest.$ac_ext <<EOF
12759 #line 12760 "configure"
12760 #include "confdefs.h"
12761
12762 #if defined(HAVE_UNISTD_H)
12763 #include <unistd.h>
12764 #endif
12765 #include <sys/types.h>
12766 #include <sys/statvfs.h>
12767   main ()
12768   {
12769     struct statvfs64 fsd;
12770     exit (statvfs64 (".", &fsd));
12771   }
12772 EOF
12773 if { (eval echo configure:12774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12774 then
12775   fu_cv_sys_stat_statvfs64=yes
12776 else
12777   echo "configure: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   rm -fr conftest*
12780   fu_cv_sys_stat_statvfs64=no
12781 fi
12782 rm -fr conftest*
12783 fi
12784
12785 fi
12786
12787 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12788   if test $fu_cv_sys_stat_statvfs64 = yes; then
12789     space=yes
12790     cat >> confdefs.h <<\EOF
12791 #define STAT_STATVFS64 1
12792 EOF
12793
12794   fi
12795 fi
12796
12797 # Perform only the link test since it seems there are no variants of the
12798 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12799 # because that got a false positive on SCO OSR5.  Adding the declaration
12800 # of a `struct statvfs' causes this test to fail (as it should) on such
12801 # systems.  That system is reported to work fine with STAT_STATFS4 which
12802 # is what it gets when this test fails.
12803 if test $space = no; then
12804   # SVR4
12805   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12806 echo "configure:12807: checking statvfs function (SVR4)" >&5
12807 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12808   echo $ac_n "(cached) $ac_c" 1>&6
12809 else
12810   cat > conftest.$ac_ext <<EOF
12811 #line 12812 "configure"
12812 #include "confdefs.h"
12813 #include <sys/types.h>
12814 #include <sys/statvfs.h>
12815 int main() {
12816 struct statvfs fsd; statvfs (0, &fsd);
12817 ; return 0; }
12818 EOF
12819 if { (eval echo configure:12820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12820   rm -rf conftest*
12821   fu_cv_sys_stat_statvfs=yes
12822 else
12823   echo "configure: failed program was:" >&5
12824   cat conftest.$ac_ext >&5
12825   rm -rf conftest*
12826   fu_cv_sys_stat_statvfs=no
12827 fi
12828 rm -f conftest*
12829 fi
12830
12831 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12832   if test $fu_cv_sys_stat_statvfs = yes; then
12833     space=yes
12834     cat >> confdefs.h <<\EOF
12835 #define STAT_STATVFS 1
12836 EOF
12837
12838   fi
12839 fi
12840
12841 if test $space = no; then
12842   # DEC Alpha running OSF/1
12843   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12844 echo "configure:12845: checking for 3-argument statfs function (DEC OSF/1)" >&5
12845   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12846   echo $ac_n "(cached) $ac_c" 1>&6
12847 else
12848   if test "$cross_compiling" = yes; then
12849   fu_cv_sys_stat_statfs3_osf1=no
12850 else
12851   cat > conftest.$ac_ext <<EOF
12852 #line 12853 "configure"
12853 #include "confdefs.h"
12854
12855 #include <sys/param.h>
12856 #include <sys/types.h>
12857 #include <sys/mount.h>
12858   main ()
12859   {
12860     struct statfs fsd;
12861     fsd.f_fsize = 0;
12862     exit (statfs (".", &fsd, sizeof (struct statfs)));
12863   }
12864 EOF
12865 if { (eval echo configure:12866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12866 then
12867   fu_cv_sys_stat_statfs3_osf1=yes
12868 else
12869   echo "configure: failed program was:" >&5
12870   cat conftest.$ac_ext >&5
12871   rm -fr conftest*
12872   fu_cv_sys_stat_statfs3_osf1=no
12873 fi
12874 rm -fr conftest*
12875 fi
12876
12877 fi
12878
12879   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12880   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12881     space=yes
12882     cat >> confdefs.h <<\EOF
12883 #define STAT_STATFS3_OSF1 1
12884 EOF
12885
12886   fi
12887 fi
12888
12889 if test $space = no; then
12890 # AIX
12891   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12892 echo "configure:12893: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12893   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12894   echo $ac_n "(cached) $ac_c" 1>&6
12895 else
12896   if test "$cross_compiling" = yes; then
12897   fu_cv_sys_stat_statfs2_bsize=no
12898 else
12899   cat > conftest.$ac_ext <<EOF
12900 #line 12901 "configure"
12901 #include "confdefs.h"
12902
12903 #ifdef HAVE_SYS_PARAM_H
12904 #include <sys/param.h>
12905 #endif
12906 #ifdef HAVE_SYS_MOUNT_H
12907 #include <sys/mount.h>
12908 #endif
12909 #ifdef HAVE_SYS_VFS_H
12910 #include <sys/vfs.h>
12911 #endif
12912   main ()
12913   {
12914   struct statfs fsd;
12915   fsd.f_bsize = 0;
12916   exit (statfs (".", &fsd));
12917   }
12918 EOF
12919 if { (eval echo configure:12920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12920 then
12921   fu_cv_sys_stat_statfs2_bsize=yes
12922 else
12923   echo "configure: failed program was:" >&5
12924   cat conftest.$ac_ext >&5
12925   rm -fr conftest*
12926   fu_cv_sys_stat_statfs2_bsize=no
12927 fi
12928 rm -fr conftest*
12929 fi
12930
12931 fi
12932
12933   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12934   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12935     space=yes
12936     cat >> confdefs.h <<\EOF
12937 #define STAT_STATFS2_BSIZE 1
12938 EOF
12939
12940   fi
12941 fi
12942
12943 if test $space = no; then
12944 # SVR3
12945   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12946 echo "configure:12947: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12947   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12948   echo $ac_n "(cached) $ac_c" 1>&6
12949 else
12950   if test "$cross_compiling" = yes; then
12951   fu_cv_sys_stat_statfs4=no
12952 else
12953   cat > conftest.$ac_ext <<EOF
12954 #line 12955 "configure"
12955 #include "confdefs.h"
12956 #include <sys/types.h>
12957 #include <sys/statfs.h>
12958   main ()
12959   {
12960   struct statfs fsd;
12961   exit (statfs (".", &fsd, sizeof fsd, 0));
12962   }
12963 EOF
12964 if { (eval echo configure:12965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12965 then
12966   fu_cv_sys_stat_statfs4=yes
12967 else
12968   echo "configure: failed program was:" >&5
12969   cat conftest.$ac_ext >&5
12970   rm -fr conftest*
12971   fu_cv_sys_stat_statfs4=no
12972 fi
12973 rm -fr conftest*
12974 fi
12975
12976 fi
12977
12978   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12979   if test $fu_cv_sys_stat_statfs4 = yes; then
12980     space=yes
12981     cat >> confdefs.h <<\EOF
12982 #define STAT_STATFS4 1
12983 EOF
12984
12985   fi
12986 fi
12987
12988 if test $space = no; then
12989 # 4.4BSD and NetBSD
12990   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12991 echo "configure:12992: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12992   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12993   echo $ac_n "(cached) $ac_c" 1>&6
12994 else
12995   if test "$cross_compiling" = yes; then
12996   fu_cv_sys_stat_statfs2_fsize=no
12997 else
12998   cat > conftest.$ac_ext <<EOF
12999 #line 13000 "configure"
13000 #include "confdefs.h"
13001 #include <sys/types.h>
13002 #ifdef HAVE_SYS_PARAM_H
13003 #include <sys/param.h>
13004 #endif
13005 #ifdef HAVE_SYS_MOUNT_H
13006 #include <sys/mount.h>
13007 #endif
13008   main ()
13009   {
13010   struct statfs fsd;
13011   fsd.f_fsize = 0;
13012   exit (statfs (".", &fsd));
13013   }
13014 EOF
13015 if { (eval echo configure:13016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13016 then
13017   fu_cv_sys_stat_statfs2_fsize=yes
13018 else
13019   echo "configure: failed program was:" >&5
13020   cat conftest.$ac_ext >&5
13021   rm -fr conftest*
13022   fu_cv_sys_stat_statfs2_fsize=no
13023 fi
13024 rm -fr conftest*
13025 fi
13026
13027 fi
13028
13029   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13030   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13031     space=yes
13032     cat >> confdefs.h <<\EOF
13033 #define STAT_STATFS2_FSIZE 1
13034 EOF
13035
13036   fi
13037 fi
13038
13039 if test $space = no; then
13040   # Ultrix
13041   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13042 echo "configure:13043: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13043   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13044   echo $ac_n "(cached) $ac_c" 1>&6
13045 else
13046   if test "$cross_compiling" = yes; then
13047   fu_cv_sys_stat_fs_data=no
13048 else
13049   cat > conftest.$ac_ext <<EOF
13050 #line 13051 "configure"
13051 #include "confdefs.h"
13052 #include <sys/types.h>
13053 #ifdef HAVE_SYS_PARAM_H
13054 #include <sys/param.h>
13055 #endif
13056 #ifdef HAVE_SYS_MOUNT_H
13057 #include <sys/mount.h>
13058 #endif
13059 #ifdef HAVE_SYS_FS_TYPES_H
13060 #include <sys/fs_types.h>
13061 #endif
13062   main ()
13063   {
13064   struct fs_data fsd;
13065   /* Ultrix's statfs returns 1 for success,
13066      0 for not mounted, -1 for failure.  */
13067   exit (statfs (".", &fsd) != 1);
13068   }
13069 EOF
13070 if { (eval echo configure:13071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13071 then
13072   fu_cv_sys_stat_fs_data=yes
13073 else
13074   echo "configure: failed program was:" >&5
13075   cat conftest.$ac_ext >&5
13076   rm -fr conftest*
13077   fu_cv_sys_stat_fs_data=no
13078 fi
13079 rm -fr conftest*
13080 fi
13081
13082 fi
13083
13084   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13085   if test $fu_cv_sys_stat_fs_data = yes; then
13086     space=yes
13087     cat >> confdefs.h <<\EOF
13088 #define STAT_STATFS2_FS_DATA 1
13089 EOF
13090
13091   fi
13092 fi
13093
13094 #
13095 # As a gating factor for large file support, in order to
13096 # use <4GB files we must have the following minimal support
13097 # available.
13098 # long long, and a 64 bit off_t or off64_t.
13099 # If we don't have all of these then disable large
13100 # file support.
13101 #
13102 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13103 echo "configure:13104: checking if large file support can be enabled" >&5
13104 cat > conftest.$ac_ext <<EOF
13105 #line 13106 "configure"
13106 #include "confdefs.h"
13107
13108 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13109 #include <sys/types.h>
13110 #else
13111 __COMPILE_ERROR_
13112 #endif
13113
13114 int main() {
13115 int i
13116 ; return 0; }
13117 EOF
13118 if { (eval echo configure:13119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13119   rm -rf conftest*
13120   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13121 else
13122   echo "configure: failed program was:" >&5
13123   cat conftest.$ac_ext >&5
13124   rm -rf conftest*
13125   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13126 fi
13127 rm -f conftest*
13128 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13129     cat >> confdefs.h <<\EOF
13130 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13131 EOF
13132
13133 fi
13134 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13135
13136 # Check whether --with-spinlocks or --without-spinlocks was given.
13137 if test "${with_spinlocks+set}" = set; then
13138   withval="$with_spinlocks"
13139   :
13140 fi
13141
13142 if test "x$with_spinlocks" = "xyes"; then
13143     cat >> confdefs.h <<\EOF
13144 #define USE_SPINLOCKS 1
13145 EOF
13146
13147
13148     case "$host_cpu" in
13149         sparc)
13150             cat >> confdefs.h <<\EOF
13151 #define SPARC_SPINLOCKS 1
13152 EOF
13153
13154             ;;
13155
13156         i386|i486|i586|i686)
13157             cat >> confdefs.h <<\EOF
13158 #define INTEL_SPINLOCKS 1
13159 EOF
13160
13161             ;;
13162
13163         mips)
13164             cat >> confdefs.h <<\EOF
13165 #define MIPS_SPINLOCKS 1
13166 EOF
13167
13168             ;;
13169
13170         powerpc)
13171             cat >> confdefs.h <<\EOF
13172 #define POWERPC_SPINLOCKS 1
13173 EOF
13174
13175             ;;
13176     esac
13177 fi
13178
13179 #################################################
13180 # check for ACL support
13181
13182 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13183 echo "configure:13184: checking whether to support ACLs" >&5
13184 # Check whether --with-acl-support or --without-acl-support was given.
13185 if test "${with_acl_support+set}" = set; then
13186   withval="$with_acl_support"
13187    case "$withval" in
13188   yes)
13189
13190         case "$host_os" in
13191         *sysv5*)
13192                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13193                 cat >> confdefs.h <<\EOF
13194 #define HAVE_UNIXWARE_ACLS 1
13195 EOF
13196
13197                 ;;
13198         *solaris*)
13199                 echo "$ac_t""Using solaris ACLs" 1>&6
13200                 cat >> confdefs.h <<\EOF
13201 #define HAVE_SOLARIS_ACLS 1
13202 EOF
13203
13204                 ;;
13205         *hpux*)
13206                 echo "$ac_t""Using HPUX ACLs" 1>&6
13207                 cat >> confdefs.h <<\EOF
13208 #define HAVE_HPUX_ACLS 1
13209 EOF
13210
13211                 ;;
13212         *irix*)
13213                 echo "$ac_t""Using IRIX ACLs" 1>&6
13214                 cat >> confdefs.h <<\EOF
13215 #define HAVE_IRIX_ACLS 1
13216 EOF
13217
13218                 ;;
13219         *aix*)
13220                 echo "$ac_t""Using AIX ACLs" 1>&6
13221                 cat >> confdefs.h <<\EOF
13222 #define HAVE_AIX_ACLS 1
13223 EOF
13224
13225                 ;;
13226         *osf*)
13227                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13228                 cat >> confdefs.h <<\EOF
13229 #define HAVE_TRU64_ACLS 1
13230 EOF
13231
13232                 LIBS="$LIBS -lpacl"
13233                 ;;
13234         *)
13235                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13236 echo "configure:13237: checking for acl_get_file in -lacl" >&5
13237 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13238 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13239   echo $ac_n "(cached) $ac_c" 1>&6
13240 else
13241   ac_save_LIBS="$LIBS"
13242 LIBS="-lacl  $LIBS"
13243 cat > conftest.$ac_ext <<EOF
13244 #line 13245 "configure"
13245 #include "confdefs.h"
13246 /* Override any gcc2 internal prototype to avoid an error.  */
13247 /* We use char because int might match the return type of a gcc2
13248     builtin and then its argument prototype would still apply.  */
13249 char acl_get_file();
13250
13251 int main() {
13252 acl_get_file()
13253 ; return 0; }
13254 EOF
13255 if { (eval echo configure:13256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13256   rm -rf conftest*
13257   eval "ac_cv_lib_$ac_lib_var=yes"
13258 else
13259   echo "configure: failed program was:" >&5
13260   cat conftest.$ac_ext >&5
13261   rm -rf conftest*
13262   eval "ac_cv_lib_$ac_lib_var=no"
13263 fi
13264 rm -f conftest*
13265 LIBS="$ac_save_LIBS"
13266
13267 fi
13268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13269   echo "$ac_t""yes" 1>&6
13270     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13272   cat >> confdefs.h <<EOF
13273 #define $ac_tr_lib 1
13274 EOF
13275
13276   LIBS="-lacl $LIBS"
13277
13278 else
13279   echo "$ac_t""no" 1>&6
13280 fi
13281
13282                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13283 echo "configure:13284: checking for ACL support" >&5
13284 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13285   echo $ac_n "(cached) $ac_c" 1>&6
13286 else
13287   
13288                 cat > conftest.$ac_ext <<EOF
13289 #line 13290 "configure"
13290 #include "confdefs.h"
13291 #include <sys/types.h>
13292 #include <sys/acl.h>
13293 int main() {
13294  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13295 ; return 0; }
13296 EOF
13297 if { (eval echo configure:13298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13298   rm -rf conftest*
13299   samba_cv_HAVE_POSIX_ACLS=yes
13300 else
13301   echo "configure: failed program was:" >&5
13302   cat conftest.$ac_ext >&5
13303   rm -rf conftest*
13304   samba_cv_HAVE_POSIX_ACLS=no
13305 fi
13306 rm -f conftest*
13307 fi
13308
13309 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13310                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13311                                 echo "$ac_t""Using posix ACLs" 1>&6
13312                                 cat >> confdefs.h <<\EOF
13313 #define HAVE_POSIX_ACLS 1
13314 EOF
13315
13316                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13317 echo "configure:13318: checking for acl_get_perm_np" >&5
13318 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13319   echo $ac_n "(cached) $ac_c" 1>&6
13320 else
13321   
13322                                 cat > conftest.$ac_ext <<EOF
13323 #line 13324 "configure"
13324 #include "confdefs.h"
13325 #include <sys/types.h>
13326 #include <sys/acl.h>
13327 int main() {
13328  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13329 ; return 0; }
13330 EOF
13331 if { (eval echo configure:13332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13332   rm -rf conftest*
13333   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13334 else
13335   echo "configure: failed program was:" >&5
13336   cat conftest.$ac_ext >&5
13337   rm -rf conftest*
13338   samba_cv_HAVE_ACL_GET_PERM_NP=no
13339 fi
13340 rm -f conftest*
13341 fi
13342
13343 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13344                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13345                                         cat >> confdefs.h <<\EOF
13346 #define HAVE_ACL_GET_PERM_NP 1
13347 EOF
13348
13349                                 fi
13350                         fi
13351             ;;
13352         esac
13353         ;;
13354   *)
13355     echo "$ac_t""no" 1>&6
13356     cat >> confdefs.h <<\EOF
13357 #define HAVE_NO_ACLS 1
13358 EOF
13359
13360     ;;
13361   esac 
13362 else
13363   cat >> confdefs.h <<\EOF
13364 #define HAVE_NO_ACLS 1
13365 EOF
13366
13367   echo "$ac_t""no" 1>&6
13368
13369 fi
13370
13371
13372 #################################################
13373 # Check whether winbind is supported on this platform.  If so we need to
13374 # build and install client programs (WINBIND_TARGETS), sbin programs
13375 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13376
13377 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13378 echo "configure:13379: checking whether to build winbind" >&5
13379
13380 # Initially, the value of $host_os decides whether winbind is supported
13381
13382 case "$host_os" in 
13383         *linux*|*solaris*|*irix*)
13384                 HAVE_WINBIND=yes
13385                 ;;
13386         *)
13387                 HAVE_WINBIND=no
13388                 winbind_no_reason=", unsupported on $host_os"
13389                 ;;
13390 esac
13391
13392 # Check the setting of --with-winbindd
13393
13394 # Check whether --with-winbind or --without-winbind was given.
13395 if test "${with_winbind+set}" = set; then
13396   withval="$with_winbind"
13397    
13398   case "$withval" in
13399         yes)
13400                 HAVE_WINBIND=yes
13401                 ;;
13402         no)
13403                 HAVE_WINBIND=no
13404                 winbind_reason=""
13405                 ;;
13406   esac 
13407 fi
13408
13409
13410 # We need unix domain sockets for winbind
13411
13412 if test x"$HAVE_WINBIND" = x"yes"; then
13413         if test x"$samba_cv_unixsocket" = x"no"; then
13414                 winbind_no_reason=", no unix domain socket support on $host_os"
13415                 HAVE_WINBIND=no
13416         fi
13417 fi
13418
13419 # Display test results
13420
13421
13422 WINBIND_TARGETS=""
13423 WINBIND_STARGETS=""
13424 WINBIND_LTARGETS=""
13425 WINBIND_PAM_PROGS=""
13426
13427 if test x"$HAVE_WINBIND" = x"yes"; then
13428         echo "$ac_t""yes" 1>&6
13429
13430         WINBIND_TARGETS="bin/wbinfo"
13431         WINBIND_STARGETS="bin/winbindd"
13432         if test x"$BLDSHARED" = x"true"; then
13433                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13434                 if test x"$with_pam" = x"yes"; then
13435                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13436                 fi
13437         fi
13438 else
13439         echo "$ac_t""no$winbind_no_reason" 1>&6
13440 fi
13441
13442 # Substitution time!
13443
13444
13445
13446
13447
13448
13449 #################################################
13450 # Check to see if we should use the included popt 
13451
13452 # Check whether --with-included-popt or --without-included-popt was given.
13453 if test "${with_included_popt+set}" = set; then
13454   withval="$with_included_popt"
13455    
13456   case "$withval" in
13457         yes)
13458                 INCLUDED_POPT=yes
13459                 ;;
13460         no)
13461                 INCLUDED_POPT=no
13462                 ;;
13463   esac 
13464 fi
13465
13466 if test x"$INCLUDED_POPT" != x"yes"; then
13467     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13468 echo "configure:13469: checking for poptGetContext in -lpopt" >&5
13469 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13470 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13471   echo $ac_n "(cached) $ac_c" 1>&6
13472 else
13473   ac_save_LIBS="$LIBS"
13474 LIBS="-lpopt  $LIBS"
13475 cat > conftest.$ac_ext <<EOF
13476 #line 13477 "configure"
13477 #include "confdefs.h"
13478 /* Override any gcc2 internal prototype to avoid an error.  */
13479 /* We use char because int might match the return type of a gcc2
13480     builtin and then its argument prototype would still apply.  */
13481 char poptGetContext();
13482
13483 int main() {
13484 poptGetContext()
13485 ; return 0; }
13486 EOF
13487 if { (eval echo configure:13488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13488   rm -rf conftest*
13489   eval "ac_cv_lib_$ac_lib_var=yes"
13490 else
13491   echo "configure: failed program was:" >&5
13492   cat conftest.$ac_ext >&5
13493   rm -rf conftest*
13494   eval "ac_cv_lib_$ac_lib_var=no"
13495 fi
13496 rm -f conftest*
13497 LIBS="$ac_save_LIBS"
13498
13499 fi
13500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13501   echo "$ac_t""yes" 1>&6
13502   INCLUDED_POPT=no
13503 else
13504   echo "$ac_t""no" 1>&6
13505 INCLUDED_POPT=yes
13506 fi
13507
13508 fi
13509
13510 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13511 echo "configure:13512: checking whether to use included popt" >&5
13512 if test x"$INCLUDED_POPT" = x"yes"; then
13513     echo "$ac_t""$srcdir/popt" 1>&6
13514     BUILD_POPT='$(POPT_OBJS)'
13515     FLAGS1="-I$srcdir/popt"
13516 else
13517     echo "$ac_t""no" 1>&6
13518     LIBS="$LIBS -lpopt"
13519 fi
13520
13521
13522
13523 #################################################
13524 # final configure stuff
13525
13526 echo "checking configure summary"
13527 if test "$cross_compiling" = yes; then
13528   :
13529 else
13530   cat > conftest.$ac_ext <<EOF
13531 #line 13532 "configure"
13532 #include "confdefs.h"
13533 #include "${srcdir-.}/tests/summary.c"
13534 EOF
13535 if { (eval echo configure:13536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13536 then
13537   echo "configure OK";
13538 else
13539   echo "configure: failed program was:" >&5
13540   cat conftest.$ac_ext >&5
13541   rm -fr conftest*
13542   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13543 fi
13544 rm -fr conftest*
13545 fi
13546
13547
13548 builddir=`pwd`
13549
13550
13551 trap '' 1 2 15
13552 cat > confcache <<\EOF
13553 # This file is a shell script that caches the results of configure
13554 # tests run on this system so they can be shared between configure
13555 # scripts and configure runs.  It is not useful on other systems.
13556 # If it contains results you don't want to keep, you may remove or edit it.
13557 #
13558 # By default, configure uses ./config.cache as the cache file,
13559 # creating it if it does not exist already.  You can give configure
13560 # the --cache-file=FILE option to use a different cache file; that is
13561 # what configure does when it calls configure scripts in
13562 # subdirectories, so they share the cache.
13563 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13564 # config.status only pays attention to the cache file if you give it the
13565 # --recheck option to rerun configure.
13566 #
13567 EOF
13568 # The following way of writing the cache mishandles newlines in values,
13569 # but we know of no workaround that is simple, portable, and efficient.
13570 # So, don't put newlines in cache variables' values.
13571 # Ultrix sh set writes to stderr and can't be redirected directly,
13572 # and sets the high bit in the cache file unless we assign to the vars.
13573 (set) 2>&1 |
13574   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13575   *ac_space=\ *)
13576     # `set' does not quote correctly, so add quotes (double-quote substitution
13577     # turns \\\\ into \\, and sed turns \\ into \).
13578     sed -n \
13579       -e "s/'/'\\\\''/g" \
13580       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13581     ;;
13582   *)
13583     # `set' quotes correctly as required by POSIX, so do not add quotes.
13584     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13585     ;;
13586   esac >> confcache
13587 if cmp -s $cache_file confcache; then
13588   :
13589 else
13590   if test -w $cache_file; then
13591     echo "updating cache $cache_file"
13592     cat confcache > $cache_file
13593   else
13594     echo "not updating unwritable cache $cache_file"
13595   fi
13596 fi
13597 rm -f confcache
13598
13599 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13600
13601 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13602 # Let make expand exec_prefix.
13603 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13604
13605 # Any assignment to VPATH causes Sun make to only execute
13606 # the first set of double-colon rules, so remove it if not needed.
13607 # If there is a colon in the path, we need to keep it.
13608 if test "x$srcdir" = x.; then
13609   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13610 fi
13611
13612 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13613
13614 DEFS=-DHAVE_CONFIG_H
13615
13616 # Without the "./", some shells look in PATH for config.status.
13617 : ${CONFIG_STATUS=./config.status}
13618
13619 echo creating $CONFIG_STATUS
13620 rm -f $CONFIG_STATUS
13621 cat > $CONFIG_STATUS <<EOF
13622 #! /bin/sh
13623 # Generated automatically by configure.
13624 # Run this file to recreate the current configuration.
13625 # This directory was configured as follows,
13626 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13627 #
13628 # $0 $ac_configure_args
13629 #
13630 # Compiler output produced by configure, useful for debugging
13631 # configure, is in ./config.log if it exists.
13632
13633 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13634 for ac_option
13635 do
13636   case "\$ac_option" in
13637   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13638     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13639     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13640   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13641     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13642     exit 0 ;;
13643   -help | --help | --hel | --he | --h)
13644     echo "\$ac_cs_usage"; exit 0 ;;
13645   *) echo "\$ac_cs_usage"; exit 1 ;;
13646   esac
13647 done
13648
13649 ac_given_srcdir=$srcdir
13650 ac_given_INSTALL="$INSTALL"
13651
13652 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13653 EOF
13654 cat >> $CONFIG_STATUS <<EOF
13655
13656 # Protect against being on the right side of a sed subst in config.status.
13657 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13658  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13659 $ac_vpsub
13660 $extrasub
13661 s%@SHELL@%$SHELL%g
13662 s%@CFLAGS@%$CFLAGS%g
13663 s%@CPPFLAGS@%$CPPFLAGS%g
13664 s%@CXXFLAGS@%$CXXFLAGS%g
13665 s%@FFLAGS@%$FFLAGS%g
13666 s%@DEFS@%$DEFS%g
13667 s%@LDFLAGS@%$LDFLAGS%g
13668 s%@LIBS@%$LIBS%g
13669 s%@exec_prefix@%$exec_prefix%g
13670 s%@prefix@%$prefix%g
13671 s%@program_transform_name@%$program_transform_name%g
13672 s%@bindir@%$bindir%g
13673 s%@sbindir@%$sbindir%g
13674 s%@libexecdir@%$libexecdir%g
13675 s%@datadir@%$datadir%g
13676 s%@sysconfdir@%$sysconfdir%g
13677 s%@sharedstatedir@%$sharedstatedir%g
13678 s%@localstatedir@%$localstatedir%g
13679 s%@libdir@%$libdir%g
13680 s%@includedir@%$includedir%g
13681 s%@oldincludedir@%$oldincludedir%g
13682 s%@infodir@%$infodir%g
13683 s%@mandir@%$mandir%g
13684 s%@RUNPROG@%$RUNPROG%g
13685 s%@MPROGS@%$MPROGS%g
13686 s%@LDSHFLAGS@%$LDSHFLAGS%g
13687 s%@SHLD@%$SHLD%g
13688 s%@HOST_OS@%$HOST_OS%g
13689 s%@PAM_MOD@%$PAM_MOD%g
13690 s%@WRAP@%$WRAP%g
13691 s%@WRAP32@%$WRAP32%g
13692 s%@PICFLAG@%$PICFLAG%g
13693 s%@PICSUFFIX@%$PICSUFFIX%g
13694 s%@POBAD_CC@%$POBAD_CC%g
13695 s%@SHLIBEXT@%$SHLIBEXT%g
13696 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13697 s%@CC@%$CC%g
13698 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13699 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13700 s%@INSTALL_DATA@%$INSTALL_DATA%g
13701 s%@AWK@%$AWK%g
13702 s%@BROKEN_CC@%$BROKEN_CC%g
13703 s%@host@%$host%g
13704 s%@host_alias@%$host_alias%g
13705 s%@host_cpu@%$host_cpu%g
13706 s%@host_vendor@%$host_vendor%g
13707 s%@host_os@%$host_os%g
13708 s%@target@%$target%g
13709 s%@target_alias@%$target_alias%g
13710 s%@target_cpu@%$target_cpu%g
13711 s%@target_vendor@%$target_vendor%g
13712 s%@target_os@%$target_os%g
13713 s%@build@%$build%g
13714 s%@build_alias@%$build_alias%g
13715 s%@build_cpu@%$build_cpu%g
13716 s%@build_vendor@%$build_vendor%g
13717 s%@build_os@%$build_os%g
13718 s%@CPP@%$CPP%g
13719 s%@LIBOBJS@%$LIBOBJS%g
13720 s%@TERMLIBS@%$TERMLIBS%g
13721 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13722 s%@ROFF@%$ROFF%g
13723 s%@QUOTAOBJS@%$QUOTAOBJS%g
13724 s%@privatedir@%$privatedir%g
13725 s%@lockdir@%$lockdir%g
13726 s%@swatdir@%$swatdir%g
13727 s%@manlangs@%$manlangs%g
13728 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13729 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13730 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13731 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13732 s%@BUILD_POPT@%$BUILD_POPT%g
13733 s%@FLAGS1@%$FLAGS1%g
13734 s%@builddir@%$builddir%g
13735
13736 CEOF
13737 EOF
13738
13739 cat >> $CONFIG_STATUS <<\EOF
13740
13741 # Split the substitutions into bite-sized pieces for seds with
13742 # small command number limits, like on Digital OSF/1 and HP-UX.
13743 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13744 ac_file=1 # Number of current file.
13745 ac_beg=1 # First line for current file.
13746 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13747 ac_more_lines=:
13748 ac_sed_cmds=""
13749 while $ac_more_lines; do
13750   if test $ac_beg -gt 1; then
13751     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13752   else
13753     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13754   fi
13755   if test ! -s conftest.s$ac_file; then
13756     ac_more_lines=false
13757     rm -f conftest.s$ac_file
13758   else
13759     if test -z "$ac_sed_cmds"; then
13760       ac_sed_cmds="sed -f conftest.s$ac_file"
13761     else
13762       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13763     fi
13764     ac_file=`expr $ac_file + 1`
13765     ac_beg=$ac_end
13766     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13767   fi
13768 done
13769 if test -z "$ac_sed_cmds"; then
13770   ac_sed_cmds=cat
13771 fi
13772 EOF
13773
13774 cat >> $CONFIG_STATUS <<EOF
13775
13776 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13777 EOF
13778 cat >> $CONFIG_STATUS <<\EOF
13779 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13780   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13781   case "$ac_file" in
13782   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13783        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13784   *) ac_file_in="${ac_file}.in" ;;
13785   esac
13786
13787   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13788
13789   # Remove last slash and all that follows it.  Not all systems have dirname.
13790   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13791   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13792     # The file is in a subdirectory.
13793     test ! -d "$ac_dir" && mkdir "$ac_dir"
13794     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13795     # A "../" for each directory in $ac_dir_suffix.
13796     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13797   else
13798     ac_dir_suffix= ac_dots=
13799   fi
13800
13801   case "$ac_given_srcdir" in
13802   .)  srcdir=.
13803       if test -z "$ac_dots"; then top_srcdir=.
13804       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13805   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13806   *) # Relative path.
13807     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13808     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13809   esac
13810
13811   case "$ac_given_INSTALL" in
13812   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13813   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13814   esac
13815
13816   echo creating "$ac_file"
13817   rm -f "$ac_file"
13818   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13819   case "$ac_file" in
13820   *Makefile*) ac_comsub="1i\\
13821 # $configure_input" ;;
13822   *) ac_comsub= ;;
13823   esac
13824
13825   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13826   sed -e "$ac_comsub
13827 s%@configure_input@%$configure_input%g
13828 s%@srcdir@%$srcdir%g
13829 s%@top_srcdir@%$top_srcdir%g
13830 s%@INSTALL@%$INSTALL%g
13831 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13832 fi; done
13833 rm -f conftest.s*
13834
13835 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13836 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13837 #
13838 # ac_d sets the value in "#define NAME VALUE" lines.
13839 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13840 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13841 ac_dC='\3'
13842 ac_dD='%g'
13843 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13844 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13845 ac_uB='\([      ]\)%\1#\2define\3'
13846 ac_uC=' '
13847 ac_uD='\4%g'
13848 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13849 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13850 ac_eB='$%\1#\2define\3'
13851 ac_eC=' '
13852 ac_eD='%g'
13853
13854 if test "${CONFIG_HEADERS+set}" != set; then
13855 EOF
13856 cat >> $CONFIG_STATUS <<EOF
13857   CONFIG_HEADERS="include/config.h"
13858 EOF
13859 cat >> $CONFIG_STATUS <<\EOF
13860 fi
13861 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13862   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13863   case "$ac_file" in
13864   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13865        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13866   *) ac_file_in="${ac_file}.in" ;;
13867   esac
13868
13869   echo creating $ac_file
13870
13871   rm -f conftest.frag conftest.in conftest.out
13872   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13873   cat $ac_file_inputs > conftest.in
13874
13875 EOF
13876
13877 # Transform confdefs.h into a sed script conftest.vals that substitutes
13878 # the proper values into config.h.in to produce config.h.  And first:
13879 # Protect against being on the right side of a sed subst in config.status.
13880 # Protect against being in an unquoted here document in config.status.
13881 rm -f conftest.vals
13882 cat > conftest.hdr <<\EOF
13883 s/[\\&%]/\\&/g
13884 s%[\\$`]%\\&%g
13885 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13886 s%ac_d%ac_u%gp
13887 s%ac_u%ac_e%gp
13888 EOF
13889 sed -n -f conftest.hdr confdefs.h > conftest.vals
13890 rm -f conftest.hdr
13891
13892 # This sed command replaces #undef with comments.  This is necessary, for
13893 # example, in the case of _POSIX_SOURCE, which is predefined and required
13894 # on some systems where configure will not decide to define it.
13895 cat >> conftest.vals <<\EOF
13896 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13897 EOF
13898
13899 # Break up conftest.vals because some shells have a limit on
13900 # the size of here documents, and old seds have small limits too.
13901
13902 rm -f conftest.tail
13903 while :
13904 do
13905   ac_lines=`grep -c . conftest.vals`
13906   # grep -c gives empty output for an empty file on some AIX systems.
13907   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13908   # Write a limited-size here document to conftest.frag.
13909   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13910   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13911   echo 'CEOF
13912   sed -f conftest.frag conftest.in > conftest.out
13913   rm -f conftest.in
13914   mv conftest.out conftest.in
13915 ' >> $CONFIG_STATUS
13916   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13917   rm -f conftest.vals
13918   mv conftest.tail conftest.vals
13919 done
13920 rm -f conftest.vals
13921
13922 cat >> $CONFIG_STATUS <<\EOF
13923   rm -f conftest.frag conftest.h
13924   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13925   cat conftest.in >> conftest.h
13926   rm -f conftest.in
13927   if cmp -s $ac_file conftest.h 2>/dev/null; then
13928     echo "$ac_file is unchanged"
13929     rm -f conftest.h
13930   else
13931     # Remove last slash and all that follows it.  Not all systems have dirname.
13932       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13933       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13934       # The file is in a subdirectory.
13935       test ! -d "$ac_dir" && mkdir "$ac_dir"
13936     fi
13937     rm -f $ac_file
13938     mv conftest.h $ac_file
13939   fi
13940 fi; done
13941
13942 EOF
13943 cat >> $CONFIG_STATUS <<EOF
13944
13945 EOF
13946 cat >> $CONFIG_STATUS <<\EOF
13947
13948 exit 0
13949 EOF
13950 chmod +x $CONFIG_STATUS
13951 rm -fr confdefs* $ac_clean_files
13952 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13953
13954
13955 #################################################
13956 # Print very concise instructions on building/use
13957 if test "x$enable_dmalloc" = xyes
13958 then
13959         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
13960         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
13961 fi