cope with systems that don't have full gssapi libs
[bbaumbach/samba-autobuild/.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug          turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-developer      turn on developer warnings and debugging [default=no]"
19 ac_help="$ac_help
20   --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 compatibe 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         LIBS="$LIBS -ldmalloc"  
641 fi
642
643 # Extract the first word of "gcc", so it can be a program name with args.
644 set dummy gcc; ac_word=$2
645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
646 echo "configure:647: checking for $ac_word" >&5
647 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
648   echo $ac_n "(cached) $ac_c" 1>&6
649 else
650   if test -n "$CC"; then
651   ac_cv_prog_CC="$CC" # Let the user override the test.
652 else
653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
654   ac_dummy="$PATH"
655   for ac_dir in $ac_dummy; do
656     test -z "$ac_dir" && ac_dir=.
657     if test -f $ac_dir/$ac_word; then
658       ac_cv_prog_CC="gcc"
659       break
660     fi
661   done
662   IFS="$ac_save_ifs"
663 fi
664 fi
665 CC="$ac_cv_prog_CC"
666 if test -n "$CC"; then
667   echo "$ac_t""$CC" 1>&6
668 else
669   echo "$ac_t""no" 1>&6
670 fi
671
672 if test -z "$CC"; then
673   # Extract the first word of "cc", so it can be a program name with args.
674 set dummy cc; ac_word=$2
675 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
676 echo "configure:677: checking for $ac_word" >&5
677 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
678   echo $ac_n "(cached) $ac_c" 1>&6
679 else
680   if test -n "$CC"; then
681   ac_cv_prog_CC="$CC" # Let the user override the test.
682 else
683   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
684   ac_prog_rejected=no
685   ac_dummy="$PATH"
686   for ac_dir in $ac_dummy; do
687     test -z "$ac_dir" && ac_dir=.
688     if test -f $ac_dir/$ac_word; then
689       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
690         ac_prog_rejected=yes
691         continue
692       fi
693       ac_cv_prog_CC="cc"
694       break
695     fi
696   done
697   IFS="$ac_save_ifs"
698 if test $ac_prog_rejected = yes; then
699   # We found a bogon in the path, so make sure we never use it.
700   set dummy $ac_cv_prog_CC
701   shift
702   if test $# -gt 0; then
703     # We chose a different compiler from the bogus one.
704     # However, it has the same basename, so the bogon will be chosen
705     # first if we set CC to just the basename; use the full file name.
706     shift
707     set dummy "$ac_dir/$ac_word" "$@"
708     shift
709     ac_cv_prog_CC="$@"
710   fi
711 fi
712 fi
713 fi
714 CC="$ac_cv_prog_CC"
715 if test -n "$CC"; then
716   echo "$ac_t""$CC" 1>&6
717 else
718   echo "$ac_t""no" 1>&6
719 fi
720
721   if test -z "$CC"; then
722     case "`uname -s`" in
723     *win32* | *WIN32*)
724       # Extract the first word of "cl", so it can be a program name with args.
725 set dummy cl; ac_word=$2
726 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
727 echo "configure:728: checking for $ac_word" >&5
728 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
729   echo $ac_n "(cached) $ac_c" 1>&6
730 else
731   if test -n "$CC"; then
732   ac_cv_prog_CC="$CC" # Let the user override the test.
733 else
734   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
735   ac_dummy="$PATH"
736   for ac_dir in $ac_dummy; do
737     test -z "$ac_dir" && ac_dir=.
738     if test -f $ac_dir/$ac_word; then
739       ac_cv_prog_CC="cl"
740       break
741     fi
742   done
743   IFS="$ac_save_ifs"
744 fi
745 fi
746 CC="$ac_cv_prog_CC"
747 if test -n "$CC"; then
748   echo "$ac_t""$CC" 1>&6
749 else
750   echo "$ac_t""no" 1>&6
751 fi
752  ;;
753     esac
754   fi
755   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
756 fi
757
758 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
759 echo "configure:760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
760
761 ac_ext=c
762 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
763 ac_cpp='$CPP $CPPFLAGS'
764 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
765 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
766 cross_compiling=$ac_cv_prog_cc_cross
767
768 cat > conftest.$ac_ext << EOF
769
770 #line 771 "configure"
771 #include "confdefs.h"
772
773 main(){return(0);}
774 EOF
775 if { (eval echo configure:776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
776   ac_cv_prog_cc_works=yes
777   # If we can't run a trivial program, we are probably using a cross compiler.
778   if (./conftest; exit) 2>/dev/null; then
779     ac_cv_prog_cc_cross=no
780   else
781     ac_cv_prog_cc_cross=yes
782   fi
783 else
784   echo "configure: failed program was:" >&5
785   cat conftest.$ac_ext >&5
786   ac_cv_prog_cc_works=no
787 fi
788 rm -fr conftest*
789 ac_ext=c
790 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
791 ac_cpp='$CPP $CPPFLAGS'
792 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
793 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
794 cross_compiling=$ac_cv_prog_cc_cross
795
796 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
797 if test $ac_cv_prog_cc_works = no; then
798   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
799 fi
800 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
801 echo "configure:802: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
802 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
803 cross_compiling=$ac_cv_prog_cc_cross
804
805 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
806 echo "configure:807: checking whether we are using GNU C" >&5
807 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
808   echo $ac_n "(cached) $ac_c" 1>&6
809 else
810   cat > conftest.c <<EOF
811 #ifdef __GNUC__
812   yes;
813 #endif
814 EOF
815 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
816   ac_cv_prog_gcc=yes
817 else
818   ac_cv_prog_gcc=no
819 fi
820 fi
821
822 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
823
824 if test $ac_cv_prog_gcc = yes; then
825   GCC=yes
826 else
827   GCC=
828 fi
829
830 ac_test_CFLAGS="${CFLAGS+set}"
831 ac_save_CFLAGS="$CFLAGS"
832 CFLAGS=
833 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
834 echo "configure:835: checking whether ${CC-cc} accepts -g" >&5
835 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
836   echo $ac_n "(cached) $ac_c" 1>&6
837 else
838   echo 'void f(){}' > conftest.c
839 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
840   ac_cv_prog_cc_g=yes
841 else
842   ac_cv_prog_cc_g=no
843 fi
844 rm -f conftest*
845
846 fi
847
848 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
849 if test "$ac_test_CFLAGS" = set; then
850   CFLAGS="$ac_save_CFLAGS"
851 elif test $ac_cv_prog_cc_g = yes; then
852   if test "$GCC" = yes; then
853     CFLAGS="-g -O2"
854   else
855     CFLAGS="-g"
856   fi
857 else
858   if test "$GCC" = yes; then
859     CFLAGS="-O2"
860   else
861     CFLAGS=
862   fi
863 fi
864
865 ac_aux_dir=
866 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
867   if test -f $ac_dir/install-sh; then
868     ac_aux_dir=$ac_dir
869     ac_install_sh="$ac_aux_dir/install-sh -c"
870     break
871   elif 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   fi
876 done
877 if test -z "$ac_aux_dir"; then
878   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
879 fi
880 ac_config_guess=$ac_aux_dir/config.guess
881 ac_config_sub=$ac_aux_dir/config.sub
882 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
883
884 # Find a good install program.  We prefer a C program (faster),
885 # so one script is as good as another.  But avoid the broken or
886 # incompatible versions:
887 # SysV /etc/install, /usr/sbin/install
888 # SunOS /usr/etc/install
889 # IRIX /sbin/install
890 # AIX /bin/install
891 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
892 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
893 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
894 # ./install, which can be erroneously created by make from ./install.sh.
895 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
896 echo "configure:897: checking for a BSD compatible install" >&5
897 if test -z "$INSTALL"; then
898 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
899   echo $ac_n "(cached) $ac_c" 1>&6
900 else
901     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
902   for ac_dir in $PATH; do
903     # Account for people who put trailing slashes in PATH elements.
904     case "$ac_dir/" in
905     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
906     *)
907       # OSF1 and SCO ODT 3.0 have their own names for install.
908       # Don't use installbsd from OSF since it installs stuff as root
909       # by default.
910       for ac_prog in ginstall scoinst install; do
911         if test -f $ac_dir/$ac_prog; then
912           if test $ac_prog = install &&
913             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
914             # AIX install.  It has an incompatible calling convention.
915             :
916           else
917             ac_cv_path_install="$ac_dir/$ac_prog -c"
918             break 2
919           fi
920         fi
921       done
922       ;;
923     esac
924   done
925   IFS="$ac_save_IFS"
926
927 fi
928   if test "${ac_cv_path_install+set}" = set; then
929     INSTALL="$ac_cv_path_install"
930   else
931     # As a last resort, use the slow shell script.  We don't cache a
932     # path for INSTALL within a source directory, because that will
933     # break other packages using the cache if that directory is
934     # removed, or if the path is relative.
935     INSTALL="$ac_install_sh"
936   fi
937 fi
938 echo "$ac_t""$INSTALL" 1>&6
939
940 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
941 # It thinks the first close brace ends the variable substitution.
942 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
943
944 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
945
946 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
947
948 for ac_prog in mawk gawk nawk awk
949 do
950 # Extract the first word of "$ac_prog", so it can be a program name with args.
951 set dummy $ac_prog; ac_word=$2
952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
953 echo "configure:954: checking for $ac_word" >&5
954 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
955   echo $ac_n "(cached) $ac_c" 1>&6
956 else
957   if test -n "$AWK"; then
958   ac_cv_prog_AWK="$AWK" # Let the user override the test.
959 else
960   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
961   ac_dummy="$PATH"
962   for ac_dir in $ac_dummy; do
963     test -z "$ac_dir" && ac_dir=.
964     if test -f $ac_dir/$ac_word; then
965       ac_cv_prog_AWK="$ac_prog"
966       break
967     fi
968   done
969   IFS="$ac_save_ifs"
970 fi
971 fi
972 AWK="$ac_cv_prog_AWK"
973 if test -n "$AWK"; then
974   echo "$ac_t""$AWK" 1>&6
975 else
976   echo "$ac_t""no" 1>&6
977 fi
978
979 test -n "$AWK" && break
980 done
981
982
983 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
984 echo "configure:985: checking for POSIXized ISC" >&5
985 if test -d /etc/conf/kconfig.d &&
986   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
987 then
988   echo "$ac_t""yes" 1>&6
989   ISC=yes # If later tests want to check for ISC.
990   cat >> confdefs.h <<\EOF
991 #define _POSIX_SOURCE 1
992 EOF
993
994   if test "$GCC" = yes; then
995     CC="$CC -posix"
996   else
997     CC="$CC -Xp"
998   fi
999 else
1000   echo "$ac_t""no" 1>&6
1001   ISC=
1002 fi
1003
1004
1005 if test "x$CC" != xcc; then
1006   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1007 echo "configure:1008: checking whether $CC and cc understand -c and -o together" >&5
1008 else
1009   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1010 echo "configure:1011: checking whether cc understands -c and -o together" >&5
1011 fi
1012 set dummy $CC; ac_cc="`echo $2 |
1013                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1014 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1015   echo $ac_n "(cached) $ac_c" 1>&6
1016 else
1017   echo 'foo(){}' > conftest.c
1018 # Make sure it works both with $CC and with simple cc.
1019 # We do the test twice because some compilers refuse to overwrite an
1020 # existing .o file with -o, though they will create one.
1021 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1022 if { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1023    test -f conftest.o && { (eval echo configure:1024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1024 then
1025   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1026   if test "x$CC" != xcc; then
1027     # Test first that cc exists at all.
1028     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1029       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1030       if { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1031          test -f conftest.o && { (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1032       then
1033         # cc works too.
1034         :
1035       else
1036         # cc exists but doesn't like -o.
1037         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1038       fi
1039     fi
1040   fi
1041 else
1042   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1043 fi
1044 rm -f conftest*
1045
1046 fi
1047 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1048   echo "$ac_t""yes" 1>&6
1049 else
1050   echo "$ac_t""no" 1>&6
1051   cat >> confdefs.h <<\EOF
1052 #define NO_MINUS_C_MINUS_O 1
1053 EOF
1054
1055 fi
1056
1057 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1058       BROKEN_CC=
1059 else
1060       BROKEN_CC=#
1061 fi
1062
1063
1064 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1065 echo "configure:1066: checking that the C compiler understands volatile" >&5
1066 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1067   echo $ac_n "(cached) $ac_c" 1>&6
1068 else
1069   
1070     cat > conftest.$ac_ext <<EOF
1071 #line 1072 "configure"
1072 #include "confdefs.h"
1073 #include <sys/types.h>
1074 int main() {
1075 volatile int i = 0
1076 ; return 0; }
1077 EOF
1078 if { (eval echo configure:1079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1079   rm -rf conftest*
1080   samba_cv_volatile=yes
1081 else
1082   echo "configure: failed program was:" >&5
1083   cat conftest.$ac_ext >&5
1084   rm -rf conftest*
1085   samba_cv_volatile=no
1086 fi
1087 rm -f conftest*
1088 fi
1089
1090 echo "$ac_t""$samba_cv_volatile" 1>&6
1091 if test x"$samba_cv_volatile" = x"yes"; then
1092    cat >> confdefs.h <<\EOF
1093 #define HAVE_VOLATILE 1
1094 EOF
1095
1096 fi
1097
1098
1099
1100 # Do some error checking and defaulting for the host and target type.
1101 # The inputs are:
1102 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1103 #
1104 # The rules are:
1105 # 1. You are not allowed to specify --host, --target, and nonopt at the
1106 #    same time.
1107 # 2. Host defaults to nonopt.
1108 # 3. If nonopt is not specified, then host defaults to the current host,
1109 #    as determined by config.guess.
1110 # 4. Target and build default to nonopt.
1111 # 5. If nonopt is not specified, then target and build default to host.
1112
1113 # The aliases save the names the user supplied, while $host etc.
1114 # will get canonicalized.
1115 case $host---$target---$nonopt in
1116 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1117 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1118 esac
1119
1120
1121 # Make sure we can run config.sub.
1122 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1123 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1124 fi
1125
1126 echo $ac_n "checking host system type""... $ac_c" 1>&6
1127 echo "configure:1128: checking host system type" >&5
1128
1129 host_alias=$host
1130 case "$host_alias" in
1131 NONE)
1132   case $nonopt in
1133   NONE)
1134     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1135     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1136     fi ;;
1137   *) host_alias=$nonopt ;;
1138   esac ;;
1139 esac
1140
1141 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1142 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1143 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1144 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1145 echo "$ac_t""$host" 1>&6
1146
1147 echo $ac_n "checking target system type""... $ac_c" 1>&6
1148 echo "configure:1149: checking target system type" >&5
1149
1150 target_alias=$target
1151 case "$target_alias" in
1152 NONE)
1153   case $nonopt in
1154   NONE) target_alias=$host_alias ;;
1155   *) target_alias=$nonopt ;;
1156   esac ;;
1157 esac
1158
1159 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1160 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1161 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1162 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 echo "$ac_t""$target" 1>&6
1164
1165 echo $ac_n "checking build system type""... $ac_c" 1>&6
1166 echo "configure:1167: checking build system type" >&5
1167
1168 build_alias=$build
1169 case "$build_alias" in
1170 NONE)
1171   case $nonopt in
1172   NONE) build_alias=$host_alias ;;
1173   *) build_alias=$nonopt ;;
1174   esac ;;
1175 esac
1176
1177 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1178 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1179 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1180 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1181 echo "$ac_t""$build" 1>&6
1182
1183 test "$host_alias" != "$target_alias" &&
1184   test "$program_prefix$program_suffix$program_transform_name" = \
1185     NONENONEs,x,x, &&
1186   program_prefix=${target_alias}-
1187
1188
1189   case "$host_os" in
1190         *irix6*) cat >> confdefs.h <<\EOF
1191 #include <standards.h>
1192 EOF
1193
1194         ;;
1195 esac
1196
1197
1198     
1199     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1200 echo "configure:1201: checking config.cache system type" >&5
1201     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1202          test x"$ac_cv_host_system_type" != x"$host"; } ||
1203        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1204          test x"$ac_cv_build_system_type" != x"$build"; } ||
1205        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1206          test x"$ac_cv_target_system_type" != x"$target"; }; then
1207         echo "$ac_t""different" 1>&6
1208         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1209     else
1210         echo "$ac_t""same" 1>&6
1211     fi
1212     ac_cv_host_system_type="$host"
1213     ac_cv_build_system_type="$build"
1214     ac_cv_target_system_type="$target"
1215
1216
1217 #
1218 # Config CPPFLAG settings for strange OS's that must be set
1219 # before other tests.
1220 #
1221 case "$host_os" in
1222 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1223     *hpux*)
1224       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1225 echo "configure:1226: checking whether ${CC-cc} accepts -Ae" >&5
1226 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1227   echo $ac_n "(cached) $ac_c" 1>&6
1228 else
1229   echo 'void f(){}' > conftest.c
1230 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1231   ac_cv_prog_cc_Ae=yes
1232 else
1233   ac_cv_prog_cc_Ae=no
1234 fi
1235 rm -f conftest*
1236
1237 fi
1238
1239 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1240       # mmap on HPUX is completely broken...
1241       cat >> confdefs.h <<\EOF
1242 #define MMAP_BLACKLIST 1
1243 EOF
1244
1245       if test $ac_cv_prog_cc_Ae = yes; then
1246         CPPFLAGS="$CPPFLAGS -Ae"
1247       fi
1248 #
1249 # Defines needed for HPUX support.
1250 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1251 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1252 #
1253       case `uname -r` in
1254                         *9*|*10*)
1255                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1256                                 cat >> confdefs.h <<\EOF
1257 #define USE_BOTH_CRYPT_CALLS 1
1258 EOF
1259
1260                                 ;;
1261                         *11*)
1262                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1263                                 cat >> confdefs.h <<\EOF
1264 #define USE_BOTH_CRYPT_CALLS 1
1265 EOF
1266
1267                                 ;;
1268       esac
1269       ;;
1270 #
1271 # AIX4.x doesn't even admit to having large
1272 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1273 #
1274     *aix4*)
1275           echo "$ac_t""enabling large file support" 1>&6
1276       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1277       ;;    
1278 #
1279 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1280 # to the existance of large files..
1281 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1282 # recommendations on large file support, however it makes the
1283 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1284 # recommendation makes the compile fail on gcc2.7. JRA.
1285 #
1286         *solaris*)
1287                 case `uname -r` in
1288                         5.0*|5.1*|5.2*|5.3*|5.5*)
1289                                 echo "$ac_t""no large file support" 1>&6
1290                                 ;;
1291                         5.*)
1292                         echo "$ac_t""enabling large file support" 1>&6
1293                         if test "$ac_cv_prog_gcc" = yes; then
1294                                 ${CC-cc} -v >conftest.c 2>&1
1295                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1296                                 rm -fr conftest.c
1297                                 case "$ac_cv_gcc_compiler_version_number" in
1298                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1299                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1300                                                 ;;
1301                                         *)
1302                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1303                                                 ;;
1304                                 esac
1305                         else
1306                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1307                         fi
1308                         ;;
1309                 esac
1310                 ;;
1311 #
1312 # Tests needed for SINIX large file support.
1313 #
1314     *sysv4*)
1315       if test $host = mips-sni-sysv4 ; then
1316         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1317 echo "configure:1318: checking for LFS support" >&5
1318         old_CPPFLAGS="$CPPFLAGS"
1319         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1320         if test "$cross_compiling" = yes; then
1321   SINIX_LFS_SUPPORT=cross
1322 else
1323   cat > conftest.$ac_ext <<EOF
1324 #line 1325 "configure"
1325 #include "confdefs.h"
1326
1327 #include <unistd.h>
1328 main () {
1329 #if _LFS64_LARGEFILE == 1
1330 exit(0);
1331 #else
1332 exit(1);
1333 #endif
1334 }
1335 EOF
1336 if { (eval echo configure:1337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1337 then
1338   SINIX_LFS_SUPPORT=yes
1339 else
1340   echo "configure: failed program was:" >&5
1341   cat conftest.$ac_ext >&5
1342   rm -fr conftest*
1343   SINIX_LFS_SUPPORT=no
1344 fi
1345 rm -fr conftest*
1346 fi
1347
1348         CPPFLAGS="$old_CPPFLAGS"
1349         if test x$SINIX_LFS_SUPPORT = xyes ; then
1350           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1351           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1352           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1353           LIBS="`getconf LFS64_LIBS` $LIBS"
1354         fi
1355       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1356       fi
1357     ;;
1358
1359 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1360 #
1361     *linux*)
1362         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1363 echo "configure:1364: checking for LFS support" >&5
1364         old_CPPFLAGS="$CPPFLAGS"
1365         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1366        if test "$cross_compiling" = yes; then
1367   LINUX_LFS_SUPPORT=cross
1368 else
1369   cat > conftest.$ac_ext <<EOF
1370 #line 1371 "configure"
1371 #include "confdefs.h"
1372
1373 #include <unistd.h>
1374 #include <sys/utsname.h>
1375 main() {
1376 #if _LFS64_LARGEFILE == 1
1377        struct utsname uts;
1378        char *release;
1379        int major, minor;
1380
1381        /* Ensure this is glibc 2.2 or higher */
1382 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1383        int libc_major = __GLIBC__;
1384        int libc_minor = __GLIBC_MINOR__;
1385
1386        if (libc_major < 2)
1387               exit(1);
1388        if (libc_minor < 2)
1389               exit(1);
1390 #endif
1391
1392        /* Ensure this is kernel 2.4 or higher */
1393
1394        uname(&uts);
1395        release = uts.release;
1396        major = atoi(strsep(&release, "."));
1397        minor = atoi(strsep(&release, "."));
1398
1399        if (major > 2 || (major == 2 && minor > 3))
1400                exit(0);
1401        exit(1);
1402 #else
1403        exit(1);
1404 #endif
1405 }
1406
1407 EOF
1408 if { (eval echo configure:1409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1409 then
1410   LINUX_LFS_SUPPORT=yes
1411 else
1412   echo "configure: failed program was:" >&5
1413   cat conftest.$ac_ext >&5
1414   rm -fr conftest*
1415   LINUX_LFS_SUPPORT=no
1416 fi
1417 rm -fr conftest*
1418 fi
1419
1420         CPPFLAGS="$old_CPPFLAGS"
1421         if test x$LINUX_LFS_SUPPORT = xyes ; then
1422           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1423         fi
1424        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1425                 ;;
1426
1427     *hurd*)
1428         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1429 echo "configure:1430: checking for LFS support" >&5
1430         old_CPPFLAGS="$CPPFLAGS"
1431         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1432         if test "$cross_compiling" = yes; then
1433   GLIBC_LFS_SUPPORT=cross
1434 else
1435   cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1438
1439 #include <unistd.h>
1440 main () {
1441 #if _LFS64_LARGEFILE == 1
1442 exit(0);
1443 #else
1444 exit(1);
1445 #endif
1446 }
1447 EOF
1448 if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1449 then
1450   GLIBC_LFS_SUPPORT=yes
1451 else
1452   echo "configure: failed program was:" >&5
1453   cat conftest.$ac_ext >&5
1454   rm -fr conftest*
1455   GLIBC_LFS_SUPPORT=no
1456 fi
1457 rm -fr conftest*
1458 fi
1459
1460         CPPFLAGS="$old_CPPFLAGS"
1461         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1462           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1463         fi
1464       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1465     ;;
1466
1467 esac
1468
1469 echo $ac_n "checking for inline""... $ac_c" 1>&6
1470 echo "configure:1471: checking for inline" >&5
1471 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1472   echo $ac_n "(cached) $ac_c" 1>&6
1473 else
1474   ac_cv_c_inline=no
1475 for ac_kw in inline __inline__ __inline; do
1476   cat > conftest.$ac_ext <<EOF
1477 #line 1478 "configure"
1478 #include "confdefs.h"
1479
1480 int main() {
1481 } $ac_kw foo() {
1482 ; return 0; }
1483 EOF
1484 if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1485   rm -rf conftest*
1486   ac_cv_c_inline=$ac_kw; break
1487 else
1488   echo "configure: failed program was:" >&5
1489   cat conftest.$ac_ext >&5
1490 fi
1491 rm -f conftest*
1492 done
1493
1494 fi
1495
1496 echo "$ac_t""$ac_cv_c_inline" 1>&6
1497 case "$ac_cv_c_inline" in
1498   inline | yes) ;;
1499   no) cat >> confdefs.h <<\EOF
1500 #define inline 
1501 EOF
1502  ;;
1503   *)  cat >> confdefs.h <<EOF
1504 #define inline $ac_cv_c_inline
1505 EOF
1506  ;;
1507 esac
1508
1509 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1510 echo "configure:1511: checking how to run the C preprocessor" >&5
1511 # On Suns, sometimes $CPP names a directory.
1512 if test -n "$CPP" && test -d "$CPP"; then
1513   CPP=
1514 fi
1515 if test -z "$CPP"; then
1516 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1517   echo $ac_n "(cached) $ac_c" 1>&6
1518 else
1519     # This must be in double quotes, not single quotes, because CPP may get
1520   # substituted into the Makefile and "${CC-cc}" will confuse make.
1521   CPP="${CC-cc} -E"
1522   # On the NeXT, cc -E runs the code through the compiler's parser,
1523   # not just through cpp.
1524   cat > conftest.$ac_ext <<EOF
1525 #line 1526 "configure"
1526 #include "confdefs.h"
1527 #include <assert.h>
1528 Syntax Error
1529 EOF
1530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1531 { (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1533 if test -z "$ac_err"; then
1534   :
1535 else
1536   echo "$ac_err" >&5
1537   echo "configure: failed program was:" >&5
1538   cat conftest.$ac_ext >&5
1539   rm -rf conftest*
1540   CPP="${CC-cc} -E -traditional-cpp"
1541   cat > conftest.$ac_ext <<EOF
1542 #line 1543 "configure"
1543 #include "confdefs.h"
1544 #include <assert.h>
1545 Syntax Error
1546 EOF
1547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1548 { (eval echo configure:1549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1550 if test -z "$ac_err"; then
1551   :
1552 else
1553   echo "$ac_err" >&5
1554   echo "configure: failed program was:" >&5
1555   cat conftest.$ac_ext >&5
1556   rm -rf conftest*
1557   CPP="${CC-cc} -nologo -E"
1558   cat > conftest.$ac_ext <<EOF
1559 #line 1560 "configure"
1560 #include "confdefs.h"
1561 #include <assert.h>
1562 Syntax Error
1563 EOF
1564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1565 { (eval echo configure:1566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1567 if test -z "$ac_err"; then
1568   :
1569 else
1570   echo "$ac_err" >&5
1571   echo "configure: failed program was:" >&5
1572   cat conftest.$ac_ext >&5
1573   rm -rf conftest*
1574   CPP=/lib/cpp
1575 fi
1576 rm -f conftest*
1577 fi
1578 rm -f conftest*
1579 fi
1580 rm -f conftest*
1581   ac_cv_prog_CPP="$CPP"
1582 fi
1583   CPP="$ac_cv_prog_CPP"
1584 else
1585   ac_cv_prog_CPP="$CPP"
1586 fi
1587 echo "$ac_t""$CPP" 1>&6
1588
1589 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1590 echo "configure:1591: checking for ANSI C header files" >&5
1591 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1592   echo $ac_n "(cached) $ac_c" 1>&6
1593 else
1594   cat > conftest.$ac_ext <<EOF
1595 #line 1596 "configure"
1596 #include "confdefs.h"
1597 #include <stdlib.h>
1598 #include <stdarg.h>
1599 #include <string.h>
1600 #include <float.h>
1601 EOF
1602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1603 { (eval echo configure:1604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1605 if test -z "$ac_err"; then
1606   rm -rf conftest*
1607   ac_cv_header_stdc=yes
1608 else
1609   echo "$ac_err" >&5
1610   echo "configure: failed program was:" >&5
1611   cat conftest.$ac_ext >&5
1612   rm -rf conftest*
1613   ac_cv_header_stdc=no
1614 fi
1615 rm -f conftest*
1616
1617 if test $ac_cv_header_stdc = yes; then
1618   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1619 cat > conftest.$ac_ext <<EOF
1620 #line 1621 "configure"
1621 #include "confdefs.h"
1622 #include <string.h>
1623 EOF
1624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1625   egrep "memchr" >/dev/null 2>&1; then
1626   :
1627 else
1628   rm -rf conftest*
1629   ac_cv_header_stdc=no
1630 fi
1631 rm -f conftest*
1632
1633 fi
1634
1635 if test $ac_cv_header_stdc = yes; then
1636   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1637 cat > conftest.$ac_ext <<EOF
1638 #line 1639 "configure"
1639 #include "confdefs.h"
1640 #include <stdlib.h>
1641 EOF
1642 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1643   egrep "free" >/dev/null 2>&1; then
1644   :
1645 else
1646   rm -rf conftest*
1647   ac_cv_header_stdc=no
1648 fi
1649 rm -f conftest*
1650
1651 fi
1652
1653 if test $ac_cv_header_stdc = yes; then
1654   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1655 if test "$cross_compiling" = yes; then
1656   :
1657 else
1658   cat > conftest.$ac_ext <<EOF
1659 #line 1660 "configure"
1660 #include "confdefs.h"
1661 #include <ctype.h>
1662 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1663 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1664 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1665 int main () { int i; for (i = 0; i < 256; i++)
1666 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1667 exit (0); }
1668
1669 EOF
1670 if { (eval echo configure:1671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1671 then
1672   :
1673 else
1674   echo "configure: failed program was:" >&5
1675   cat conftest.$ac_ext >&5
1676   rm -fr conftest*
1677   ac_cv_header_stdc=no
1678 fi
1679 rm -fr conftest*
1680 fi
1681
1682 fi
1683 fi
1684
1685 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1686 if test $ac_cv_header_stdc = yes; then
1687   cat >> confdefs.h <<\EOF
1688 #define STDC_HEADERS 1
1689 EOF
1690
1691 fi
1692
1693 ac_header_dirent=no
1694 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1695 do
1696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1697 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1698 echo "configure:1699: checking for $ac_hdr that defines DIR" >&5
1699 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1700   echo $ac_n "(cached) $ac_c" 1>&6
1701 else
1702   cat > conftest.$ac_ext <<EOF
1703 #line 1704 "configure"
1704 #include "confdefs.h"
1705 #include <sys/types.h>
1706 #include <$ac_hdr>
1707 int main() {
1708 DIR *dirp = 0;
1709 ; return 0; }
1710 EOF
1711 if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1712   rm -rf conftest*
1713   eval "ac_cv_header_dirent_$ac_safe=yes"
1714 else
1715   echo "configure: failed program was:" >&5
1716   cat conftest.$ac_ext >&5
1717   rm -rf conftest*
1718   eval "ac_cv_header_dirent_$ac_safe=no"
1719 fi
1720 rm -f conftest*
1721 fi
1722 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1723   echo "$ac_t""yes" 1>&6
1724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1725   cat >> confdefs.h <<EOF
1726 #define $ac_tr_hdr 1
1727 EOF
1728  ac_header_dirent=$ac_hdr; break
1729 else
1730   echo "$ac_t""no" 1>&6
1731 fi
1732 done
1733 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1734 if test $ac_header_dirent = dirent.h; then
1735 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1736 echo "configure:1737: checking for opendir in -ldir" >&5
1737 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1739   echo $ac_n "(cached) $ac_c" 1>&6
1740 else
1741   ac_save_LIBS="$LIBS"
1742 LIBS="-ldir  $LIBS"
1743 cat > conftest.$ac_ext <<EOF
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746 /* Override any gcc2 internal prototype to avoid an error.  */
1747 /* We use char because int might match the return type of a gcc2
1748     builtin and then its argument prototype would still apply.  */
1749 char opendir();
1750
1751 int main() {
1752 opendir()
1753 ; return 0; }
1754 EOF
1755 if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1756   rm -rf conftest*
1757   eval "ac_cv_lib_$ac_lib_var=yes"
1758 else
1759   echo "configure: failed program was:" >&5
1760   cat conftest.$ac_ext >&5
1761   rm -rf conftest*
1762   eval "ac_cv_lib_$ac_lib_var=no"
1763 fi
1764 rm -f conftest*
1765 LIBS="$ac_save_LIBS"
1766
1767 fi
1768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1769   echo "$ac_t""yes" 1>&6
1770   LIBS="$LIBS -ldir"
1771 else
1772   echo "$ac_t""no" 1>&6
1773 fi
1774
1775 else
1776 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1777 echo "configure:1778: checking for opendir in -lx" >&5
1778 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1780   echo $ac_n "(cached) $ac_c" 1>&6
1781 else
1782   ac_save_LIBS="$LIBS"
1783 LIBS="-lx  $LIBS"
1784 cat > conftest.$ac_ext <<EOF
1785 #line 1786 "configure"
1786 #include "confdefs.h"
1787 /* Override any gcc2 internal prototype to avoid an error.  */
1788 /* We use char because int might match the return type of a gcc2
1789     builtin and then its argument prototype would still apply.  */
1790 char opendir();
1791
1792 int main() {
1793 opendir()
1794 ; return 0; }
1795 EOF
1796 if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1797   rm -rf conftest*
1798   eval "ac_cv_lib_$ac_lib_var=yes"
1799 else
1800   echo "configure: failed program was:" >&5
1801   cat conftest.$ac_ext >&5
1802   rm -rf conftest*
1803   eval "ac_cv_lib_$ac_lib_var=no"
1804 fi
1805 rm -f conftest*
1806 LIBS="$ac_save_LIBS"
1807
1808 fi
1809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1810   echo "$ac_t""yes" 1>&6
1811   LIBS="$LIBS -lx"
1812 else
1813   echo "$ac_t""no" 1>&6
1814 fi
1815
1816 fi
1817
1818 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1819 echo "configure:1820: checking whether time.h and sys/time.h may both be included" >&5
1820 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1821   echo $ac_n "(cached) $ac_c" 1>&6
1822 else
1823   cat > conftest.$ac_ext <<EOF
1824 #line 1825 "configure"
1825 #include "confdefs.h"
1826 #include <sys/types.h>
1827 #include <sys/time.h>
1828 #include <time.h>
1829 int main() {
1830 struct tm *tp;
1831 ; return 0; }
1832 EOF
1833 if { (eval echo configure:1834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1834   rm -rf conftest*
1835   ac_cv_header_time=yes
1836 else
1837   echo "configure: failed program was:" >&5
1838   cat conftest.$ac_ext >&5
1839   rm -rf conftest*
1840   ac_cv_header_time=no
1841 fi
1842 rm -f conftest*
1843 fi
1844
1845 echo "$ac_t""$ac_cv_header_time" 1>&6
1846 if test $ac_cv_header_time = yes; then
1847   cat >> confdefs.h <<\EOF
1848 #define TIME_WITH_SYS_TIME 1
1849 EOF
1850
1851 fi
1852
1853 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1854 echo "configure:1855: checking for sys/wait.h that is POSIX.1 compatible" >&5
1855 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1856   echo $ac_n "(cached) $ac_c" 1>&6
1857 else
1858   cat > conftest.$ac_ext <<EOF
1859 #line 1860 "configure"
1860 #include "confdefs.h"
1861 #include <sys/types.h>
1862 #include <sys/wait.h>
1863 #ifndef WEXITSTATUS
1864 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1865 #endif
1866 #ifndef WIFEXITED
1867 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1868 #endif
1869 int main() {
1870 int s;
1871 wait (&s);
1872 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1873 ; return 0; }
1874 EOF
1875 if { (eval echo configure:1876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1876   rm -rf conftest*
1877   ac_cv_header_sys_wait_h=yes
1878 else
1879   echo "configure: failed program was:" >&5
1880   cat conftest.$ac_ext >&5
1881   rm -rf conftest*
1882   ac_cv_header_sys_wait_h=no
1883 fi
1884 rm -f conftest*
1885 fi
1886
1887 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1888 if test $ac_cv_header_sys_wait_h = yes; then
1889   cat >> confdefs.h <<\EOF
1890 #define HAVE_SYS_WAIT_H 1
1891 EOF
1892
1893 fi
1894
1895 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1896 do
1897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1899 echo "configure:1900: checking for $ac_hdr" >&5
1900 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1901   echo $ac_n "(cached) $ac_c" 1>&6
1902 else
1903   cat > conftest.$ac_ext <<EOF
1904 #line 1905 "configure"
1905 #include "confdefs.h"
1906 #include <$ac_hdr>
1907 EOF
1908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1909 { (eval echo configure:1910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1911 if test -z "$ac_err"; then
1912   rm -rf conftest*
1913   eval "ac_cv_header_$ac_safe=yes"
1914 else
1915   echo "$ac_err" >&5
1916   echo "configure: failed program was:" >&5
1917   cat conftest.$ac_ext >&5
1918   rm -rf conftest*
1919   eval "ac_cv_header_$ac_safe=no"
1920 fi
1921 rm -f conftest*
1922 fi
1923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1924   echo "$ac_t""yes" 1>&6
1925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1926   cat >> confdefs.h <<EOF
1927 #define $ac_tr_hdr 1
1928 EOF
1929  
1930 else
1931   echo "$ac_t""no" 1>&6
1932 fi
1933 done
1934
1935 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1936 do
1937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1939 echo "configure:1940: checking for $ac_hdr" >&5
1940 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1941   echo $ac_n "(cached) $ac_c" 1>&6
1942 else
1943   cat > conftest.$ac_ext <<EOF
1944 #line 1945 "configure"
1945 #include "confdefs.h"
1946 #include <$ac_hdr>
1947 EOF
1948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1949 { (eval echo configure:1950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1951 if test -z "$ac_err"; then
1952   rm -rf conftest*
1953   eval "ac_cv_header_$ac_safe=yes"
1954 else
1955   echo "$ac_err" >&5
1956   echo "configure: failed program was:" >&5
1957   cat conftest.$ac_ext >&5
1958   rm -rf conftest*
1959   eval "ac_cv_header_$ac_safe=no"
1960 fi
1961 rm -f conftest*
1962 fi
1963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1964   echo "$ac_t""yes" 1>&6
1965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1966   cat >> confdefs.h <<EOF
1967 #define $ac_tr_hdr 1
1968 EOF
1969  
1970 else
1971   echo "$ac_t""no" 1>&6
1972 fi
1973 done
1974
1975 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1976 do
1977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1979 echo "configure:1980: checking for $ac_hdr" >&5
1980 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1981   echo $ac_n "(cached) $ac_c" 1>&6
1982 else
1983   cat > conftest.$ac_ext <<EOF
1984 #line 1985 "configure"
1985 #include "confdefs.h"
1986 #include <$ac_hdr>
1987 EOF
1988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1989 { (eval echo configure:1990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1991 if test -z "$ac_err"; then
1992   rm -rf conftest*
1993   eval "ac_cv_header_$ac_safe=yes"
1994 else
1995   echo "$ac_err" >&5
1996   echo "configure: failed program was:" >&5
1997   cat conftest.$ac_ext >&5
1998   rm -rf conftest*
1999   eval "ac_cv_header_$ac_safe=no"
2000 fi
2001 rm -f conftest*
2002 fi
2003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2004   echo "$ac_t""yes" 1>&6
2005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2006   cat >> confdefs.h <<EOF
2007 #define $ac_tr_hdr 1
2008 EOF
2009  
2010 else
2011   echo "$ac_t""no" 1>&6
2012 fi
2013 done
2014
2015 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2016 do
2017 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2018 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2019 echo "configure:2020: checking for $ac_hdr" >&5
2020 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2021   echo $ac_n "(cached) $ac_c" 1>&6
2022 else
2023   cat > conftest.$ac_ext <<EOF
2024 #line 2025 "configure"
2025 #include "confdefs.h"
2026 #include <$ac_hdr>
2027 EOF
2028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2029 { (eval echo configure:2030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2031 if test -z "$ac_err"; then
2032   rm -rf conftest*
2033   eval "ac_cv_header_$ac_safe=yes"
2034 else
2035   echo "$ac_err" >&5
2036   echo "configure: failed program was:" >&5
2037   cat conftest.$ac_ext >&5
2038   rm -rf conftest*
2039   eval "ac_cv_header_$ac_safe=no"
2040 fi
2041 rm -f conftest*
2042 fi
2043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2044   echo "$ac_t""yes" 1>&6
2045     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2046   cat >> confdefs.h <<EOF
2047 #define $ac_tr_hdr 1
2048 EOF
2049  
2050 else
2051   echo "$ac_t""no" 1>&6
2052 fi
2053 done
2054
2055 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
2056 do
2057 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2058 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2059 echo "configure:2060: checking for $ac_hdr" >&5
2060 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2061   echo $ac_n "(cached) $ac_c" 1>&6
2062 else
2063   cat > conftest.$ac_ext <<EOF
2064 #line 2065 "configure"
2065 #include "confdefs.h"
2066 #include <$ac_hdr>
2067 EOF
2068 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2069 { (eval echo configure:2070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2070 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2071 if test -z "$ac_err"; then
2072   rm -rf conftest*
2073   eval "ac_cv_header_$ac_safe=yes"
2074 else
2075   echo "$ac_err" >&5
2076   echo "configure: failed program was:" >&5
2077   cat conftest.$ac_ext >&5
2078   rm -rf conftest*
2079   eval "ac_cv_header_$ac_safe=no"
2080 fi
2081 rm -f conftest*
2082 fi
2083 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2084   echo "$ac_t""yes" 1>&6
2085     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2086   cat >> confdefs.h <<EOF
2087 #define $ac_tr_hdr 1
2088 EOF
2089  
2090 else
2091   echo "$ac_t""no" 1>&6
2092 fi
2093 done
2094
2095 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2096 do
2097 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2098 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2099 echo "configure:2100: checking for $ac_hdr" >&5
2100 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2101   echo $ac_n "(cached) $ac_c" 1>&6
2102 else
2103   cat > conftest.$ac_ext <<EOF
2104 #line 2105 "configure"
2105 #include "confdefs.h"
2106 #include <$ac_hdr>
2107 EOF
2108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2109 { (eval echo configure:2110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2111 if test -z "$ac_err"; then
2112   rm -rf conftest*
2113   eval "ac_cv_header_$ac_safe=yes"
2114 else
2115   echo "$ac_err" >&5
2116   echo "configure: failed program was:" >&5
2117   cat conftest.$ac_ext >&5
2118   rm -rf conftest*
2119   eval "ac_cv_header_$ac_safe=no"
2120 fi
2121 rm -f conftest*
2122 fi
2123 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2124   echo "$ac_t""yes" 1>&6
2125     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2126   cat >> confdefs.h <<EOF
2127 #define $ac_tr_hdr 1
2128 EOF
2129  
2130 else
2131   echo "$ac_t""no" 1>&6
2132 fi
2133 done
2134
2135 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2136 do
2137 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2138 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2139 echo "configure:2140: checking for $ac_hdr" >&5
2140 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2141   echo $ac_n "(cached) $ac_c" 1>&6
2142 else
2143   cat > conftest.$ac_ext <<EOF
2144 #line 2145 "configure"
2145 #include "confdefs.h"
2146 #include <$ac_hdr>
2147 EOF
2148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2149 { (eval echo configure:2150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2150 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2151 if test -z "$ac_err"; then
2152   rm -rf conftest*
2153   eval "ac_cv_header_$ac_safe=yes"
2154 else
2155   echo "$ac_err" >&5
2156   echo "configure: failed program was:" >&5
2157   cat conftest.$ac_ext >&5
2158   rm -rf conftest*
2159   eval "ac_cv_header_$ac_safe=no"
2160 fi
2161 rm -f conftest*
2162 fi
2163 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2164   echo "$ac_t""yes" 1>&6
2165     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2166   cat >> confdefs.h <<EOF
2167 #define $ac_tr_hdr 1
2168 EOF
2169  
2170 else
2171   echo "$ac_t""no" 1>&6
2172 fi
2173 done
2174
2175 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h
2176 do
2177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2179 echo "configure:2180: checking for $ac_hdr" >&5
2180 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2181   echo $ac_n "(cached) $ac_c" 1>&6
2182 else
2183   cat > conftest.$ac_ext <<EOF
2184 #line 2185 "configure"
2185 #include "confdefs.h"
2186 #include <$ac_hdr>
2187 EOF
2188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2189 { (eval echo configure:2190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2191 if test -z "$ac_err"; then
2192   rm -rf conftest*
2193   eval "ac_cv_header_$ac_safe=yes"
2194 else
2195   echo "$ac_err" >&5
2196   echo "configure: failed program was:" >&5
2197   cat conftest.$ac_ext >&5
2198   rm -rf conftest*
2199   eval "ac_cv_header_$ac_safe=no"
2200 fi
2201 rm -f conftest*
2202 fi
2203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2204   echo "$ac_t""yes" 1>&6
2205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2206   cat >> confdefs.h <<EOF
2207 #define $ac_tr_hdr 1
2208 EOF
2209  
2210 else
2211   echo "$ac_t""no" 1>&6
2212 fi
2213 done
2214
2215
2216 #
2217 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2218 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2219 #
2220 case "$host_os" in
2221     *hpux*)
2222                 cat > conftest.$ac_ext <<EOF
2223 #line 2224 "configure"
2224 #include "confdefs.h"
2225 #include <shadow.h>
2226 int main() {
2227 struct spwd testme
2228 ; return 0; }
2229 EOF
2230 if { (eval echo configure:2231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2231   rm -rf conftest*
2232   ac_cv_header_shadow_h=yes
2233 else
2234   echo "configure: failed program was:" >&5
2235   cat conftest.$ac_ext >&5
2236   rm -rf conftest*
2237   ac_cv_header_shadow_h=no
2238 fi
2239 rm -f conftest*
2240                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2241                    cat >> confdefs.h <<\EOF
2242 #define HAVE_SHADOW_H 1
2243 EOF
2244
2245                 fi
2246         ;;
2247 esac
2248 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2249 do
2250 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2251 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2252 echo "configure:2253: checking for $ac_hdr" >&5
2253 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2254   echo $ac_n "(cached) $ac_c" 1>&6
2255 else
2256   cat > conftest.$ac_ext <<EOF
2257 #line 2258 "configure"
2258 #include "confdefs.h"
2259 #include <$ac_hdr>
2260 EOF
2261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2262 { (eval echo configure:2263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2264 if test -z "$ac_err"; then
2265   rm -rf conftest*
2266   eval "ac_cv_header_$ac_safe=yes"
2267 else
2268   echo "$ac_err" >&5
2269   echo "configure: failed program was:" >&5
2270   cat conftest.$ac_ext >&5
2271   rm -rf conftest*
2272   eval "ac_cv_header_$ac_safe=no"
2273 fi
2274 rm -f conftest*
2275 fi
2276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2277   echo "$ac_t""yes" 1>&6
2278     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2279   cat >> confdefs.h <<EOF
2280 #define $ac_tr_hdr 1
2281 EOF
2282  
2283 else
2284   echo "$ac_t""no" 1>&6
2285 fi
2286 done
2287
2288 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2289 do
2290 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2291 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2292 echo "configure:2293: checking for $ac_hdr" >&5
2293 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2294   echo $ac_n "(cached) $ac_c" 1>&6
2295 else
2296   cat > conftest.$ac_ext <<EOF
2297 #line 2298 "configure"
2298 #include "confdefs.h"
2299 #include <$ac_hdr>
2300 EOF
2301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2302 { (eval echo configure:2303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2304 if test -z "$ac_err"; then
2305   rm -rf conftest*
2306   eval "ac_cv_header_$ac_safe=yes"
2307 else
2308   echo "$ac_err" >&5
2309   echo "configure: failed program was:" >&5
2310   cat conftest.$ac_ext >&5
2311   rm -rf conftest*
2312   eval "ac_cv_header_$ac_safe=no"
2313 fi
2314 rm -f conftest*
2315 fi
2316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2317   echo "$ac_t""yes" 1>&6
2318     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2319   cat >> confdefs.h <<EOF
2320 #define $ac_tr_hdr 1
2321 EOF
2322  
2323 else
2324   echo "$ac_t""no" 1>&6
2325 fi
2326 done
2327
2328 for ac_hdr in stropts.h poll.h
2329 do
2330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2332 echo "configure:2333: checking for $ac_hdr" >&5
2333 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2334   echo $ac_n "(cached) $ac_c" 1>&6
2335 else
2336   cat > conftest.$ac_ext <<EOF
2337 #line 2338 "configure"
2338 #include "confdefs.h"
2339 #include <$ac_hdr>
2340 EOF
2341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2342 { (eval echo configure:2343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2344 if test -z "$ac_err"; then
2345   rm -rf conftest*
2346   eval "ac_cv_header_$ac_safe=yes"
2347 else
2348   echo "$ac_err" >&5
2349   echo "configure: failed program was:" >&5
2350   cat conftest.$ac_ext >&5
2351   rm -rf conftest*
2352   eval "ac_cv_header_$ac_safe=no"
2353 fi
2354 rm -f conftest*
2355 fi
2356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2357   echo "$ac_t""yes" 1>&6
2358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2359   cat >> confdefs.h <<EOF
2360 #define $ac_tr_hdr 1
2361 EOF
2362  
2363 else
2364   echo "$ac_t""no" 1>&6
2365 fi
2366 done
2367
2368 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2369 do
2370 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2371 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2372 echo "configure:2373: checking for $ac_hdr" >&5
2373 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2374   echo $ac_n "(cached) $ac_c" 1>&6
2375 else
2376   cat > conftest.$ac_ext <<EOF
2377 #line 2378 "configure"
2378 #include "confdefs.h"
2379 #include <$ac_hdr>
2380 EOF
2381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2382 { (eval echo configure:2383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2384 if test -z "$ac_err"; then
2385   rm -rf conftest*
2386   eval "ac_cv_header_$ac_safe=yes"
2387 else
2388   echo "$ac_err" >&5
2389   echo "configure: failed program was:" >&5
2390   cat conftest.$ac_ext >&5
2391   rm -rf conftest*
2392   eval "ac_cv_header_$ac_safe=no"
2393 fi
2394 rm -f conftest*
2395 fi
2396 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2397   echo "$ac_t""yes" 1>&6
2398     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2399   cat >> confdefs.h <<EOF
2400 #define $ac_tr_hdr 1
2401 EOF
2402  
2403 else
2404   echo "$ac_t""no" 1>&6
2405 fi
2406 done
2407
2408 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2409 do
2410 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2411 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2412 echo "configure:2413: checking for $ac_hdr" >&5
2413 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2414   echo $ac_n "(cached) $ac_c" 1>&6
2415 else
2416   cat > conftest.$ac_ext <<EOF
2417 #line 2418 "configure"
2418 #include "confdefs.h"
2419 #include <$ac_hdr>
2420 EOF
2421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2422 { (eval echo configure:2423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2424 if test -z "$ac_err"; then
2425   rm -rf conftest*
2426   eval "ac_cv_header_$ac_safe=yes"
2427 else
2428   echo "$ac_err" >&5
2429   echo "configure: failed program was:" >&5
2430   cat conftest.$ac_ext >&5
2431   rm -rf conftest*
2432   eval "ac_cv_header_$ac_safe=no"
2433 fi
2434 rm -f conftest*
2435 fi
2436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2437   echo "$ac_t""yes" 1>&6
2438     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2439   cat >> confdefs.h <<EOF
2440 #define $ac_tr_hdr 1
2441 EOF
2442  
2443 else
2444   echo "$ac_t""no" 1>&6
2445 fi
2446 done
2447
2448
2449 # For experimental utmp support (lastlog on some BSD-like systems)
2450 for ac_hdr in utmp.h utmpx.h lastlog.h
2451 do
2452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2454 echo "configure:2455: checking for $ac_hdr" >&5
2455 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2456   echo $ac_n "(cached) $ac_c" 1>&6
2457 else
2458   cat > conftest.$ac_ext <<EOF
2459 #line 2460 "configure"
2460 #include "confdefs.h"
2461 #include <$ac_hdr>
2462 EOF
2463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2464 { (eval echo configure:2465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2466 if test -z "$ac_err"; then
2467   rm -rf conftest*
2468   eval "ac_cv_header_$ac_safe=yes"
2469 else
2470   echo "$ac_err" >&5
2471   echo "configure: failed program was:" >&5
2472   cat conftest.$ac_ext >&5
2473   rm -rf conftest*
2474   eval "ac_cv_header_$ac_safe=no"
2475 fi
2476 rm -f conftest*
2477 fi
2478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2479   echo "$ac_t""yes" 1>&6
2480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2481   cat >> confdefs.h <<EOF
2482 #define $ac_tr_hdr 1
2483 EOF
2484  
2485 else
2486   echo "$ac_t""no" 1>&6
2487 fi
2488 done
2489
2490  
2491 # For quotas on Veritas VxFS filesystems
2492 for ac_hdr in sys/fs/vx_quota.h
2493 do
2494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2496 echo "configure:2497: checking for $ac_hdr" >&5
2497 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2498   echo $ac_n "(cached) $ac_c" 1>&6
2499 else
2500   cat > conftest.$ac_ext <<EOF
2501 #line 2502 "configure"
2502 #include "confdefs.h"
2503 #include <$ac_hdr>
2504 EOF
2505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2506 { (eval echo configure:2507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2508 if test -z "$ac_err"; then
2509   rm -rf conftest*
2510   eval "ac_cv_header_$ac_safe=yes"
2511 else
2512   echo "$ac_err" >&5
2513   echo "configure: failed program was:" >&5
2514   cat conftest.$ac_ext >&5
2515   rm -rf conftest*
2516   eval "ac_cv_header_$ac_safe=no"
2517 fi
2518 rm -f conftest*
2519 fi
2520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2521   echo "$ac_t""yes" 1>&6
2522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2523   cat >> confdefs.h <<EOF
2524 #define $ac_tr_hdr 1
2525 EOF
2526  
2527 else
2528   echo "$ac_t""no" 1>&6
2529 fi
2530 done
2531
2532
2533 # For quotas on Linux XFS filesystems
2534 for ac_hdr in linux/xqm.h
2535 do
2536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2537 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2538 echo "configure:2539: checking for $ac_hdr" >&5
2539 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2540   echo $ac_n "(cached) $ac_c" 1>&6
2541 else
2542   cat > conftest.$ac_ext <<EOF
2543 #line 2544 "configure"
2544 #include "confdefs.h"
2545 #include <$ac_hdr>
2546 EOF
2547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2548 { (eval echo configure:2549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2550 if test -z "$ac_err"; then
2551   rm -rf conftest*
2552   eval "ac_cv_header_$ac_safe=yes"
2553 else
2554   echo "$ac_err" >&5
2555   echo "configure: failed program was:" >&5
2556   cat conftest.$ac_ext >&5
2557   rm -rf conftest*
2558   eval "ac_cv_header_$ac_safe=no"
2559 fi
2560 rm -f conftest*
2561 fi
2562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2563   echo "$ac_t""yes" 1>&6
2564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2565   cat >> confdefs.h <<EOF
2566 #define $ac_tr_hdr 1
2567 EOF
2568  
2569 else
2570   echo "$ac_t""no" 1>&6
2571 fi
2572 done
2573
2574
2575 echo $ac_n "checking size of int""... $ac_c" 1>&6
2576 echo "configure:2577: checking size of int" >&5
2577 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2578   echo $ac_n "(cached) $ac_c" 1>&6
2579 else
2580   if test "$cross_compiling" = yes; then
2581   ac_cv_sizeof_int=cross
2582 else
2583   cat > conftest.$ac_ext <<EOF
2584 #line 2585 "configure"
2585 #include "confdefs.h"
2586 #include <stdio.h>
2587 #include <sys/types.h>
2588 main()
2589 {
2590   FILE *f=fopen("conftestval", "w");
2591   if (!f) exit(1);
2592   fprintf(f, "%d\n", sizeof(int));
2593   exit(0);
2594 }
2595 EOF
2596 if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2597 then
2598   ac_cv_sizeof_int=`cat conftestval`
2599 else
2600   echo "configure: failed program was:" >&5
2601   cat conftest.$ac_ext >&5
2602   rm -fr conftest*
2603   ac_cv_sizeof_int=0
2604 fi
2605 rm -fr conftest*
2606 fi
2607
2608 fi
2609 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2610 cat >> confdefs.h <<EOF
2611 #define SIZEOF_INT $ac_cv_sizeof_int
2612 EOF
2613
2614
2615 echo $ac_n "checking size of long""... $ac_c" 1>&6
2616 echo "configure:2617: checking size of long" >&5
2617 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2618   echo $ac_n "(cached) $ac_c" 1>&6
2619 else
2620   if test "$cross_compiling" = yes; then
2621   ac_cv_sizeof_long=cross
2622 else
2623   cat > conftest.$ac_ext <<EOF
2624 #line 2625 "configure"
2625 #include "confdefs.h"
2626 #include <stdio.h>
2627 #include <sys/types.h>
2628 main()
2629 {
2630   FILE *f=fopen("conftestval", "w");
2631   if (!f) exit(1);
2632   fprintf(f, "%d\n", sizeof(long));
2633   exit(0);
2634 }
2635 EOF
2636 if { (eval echo configure:2637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2637 then
2638   ac_cv_sizeof_long=`cat conftestval`
2639 else
2640   echo "configure: failed program was:" >&5
2641   cat conftest.$ac_ext >&5
2642   rm -fr conftest*
2643   ac_cv_sizeof_long=0
2644 fi
2645 rm -fr conftest*
2646 fi
2647
2648 fi
2649 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2650 cat >> confdefs.h <<EOF
2651 #define SIZEOF_LONG $ac_cv_sizeof_long
2652 EOF
2653
2654
2655 echo $ac_n "checking size of short""... $ac_c" 1>&6
2656 echo "configure:2657: checking size of short" >&5
2657 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2658   echo $ac_n "(cached) $ac_c" 1>&6
2659 else
2660   if test "$cross_compiling" = yes; then
2661   ac_cv_sizeof_short=cross
2662 else
2663   cat > conftest.$ac_ext <<EOF
2664 #line 2665 "configure"
2665 #include "confdefs.h"
2666 #include <stdio.h>
2667 #include <sys/types.h>
2668 main()
2669 {
2670   FILE *f=fopen("conftestval", "w");
2671   if (!f) exit(1);
2672   fprintf(f, "%d\n", sizeof(short));
2673   exit(0);
2674 }
2675 EOF
2676 if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2677 then
2678   ac_cv_sizeof_short=`cat conftestval`
2679 else
2680   echo "configure: failed program was:" >&5
2681   cat conftest.$ac_ext >&5
2682   rm -fr conftest*
2683   ac_cv_sizeof_short=0
2684 fi
2685 rm -fr conftest*
2686 fi
2687
2688 fi
2689 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2690 cat >> confdefs.h <<EOF
2691 #define SIZEOF_SHORT $ac_cv_sizeof_short
2692 EOF
2693
2694
2695
2696 echo $ac_n "checking for working const""... $ac_c" 1>&6
2697 echo "configure:2698: checking for working const" >&5
2698 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2699   echo $ac_n "(cached) $ac_c" 1>&6
2700 else
2701   cat > conftest.$ac_ext <<EOF
2702 #line 2703 "configure"
2703 #include "confdefs.h"
2704
2705 int main() {
2706
2707 /* Ultrix mips cc rejects this.  */
2708 typedef int charset[2]; const charset x;
2709 /* SunOS 4.1.1 cc rejects this.  */
2710 char const *const *ccp;
2711 char **p;
2712 /* NEC SVR4.0.2 mips cc rejects this.  */
2713 struct point {int x, y;};
2714 static struct point const zero = {0,0};
2715 /* AIX XL C 1.02.0.0 rejects this.
2716    It does not let you subtract one const X* pointer from another in an arm
2717    of an if-expression whose if-part is not a constant expression */
2718 const char *g = "string";
2719 ccp = &g + (g ? g-g : 0);
2720 /* HPUX 7.0 cc rejects these. */
2721 ++ccp;
2722 p = (char**) ccp;
2723 ccp = (char const *const *) p;
2724 { /* SCO 3.2v4 cc rejects this.  */
2725   char *t;
2726   char const *s = 0 ? (char *) 0 : (char const *) 0;
2727
2728   *t++ = 0;
2729 }
2730 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2731   int x[] = {25, 17};
2732   const int *foo = &x[0];
2733   ++foo;
2734 }
2735 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2736   typedef const int *iptr;
2737   iptr p = 0;
2738   ++p;
2739 }
2740 { /* AIX XL C 1.02.0.0 rejects this saying
2741      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2742   struct s { int j; const int *ap[3]; };
2743   struct s *b; b->j = 5;
2744 }
2745 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2746   const int foo = 10;
2747 }
2748
2749 ; return 0; }
2750 EOF
2751 if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2752   rm -rf conftest*
2753   ac_cv_c_const=yes
2754 else
2755   echo "configure: failed program was:" >&5
2756   cat conftest.$ac_ext >&5
2757   rm -rf conftest*
2758   ac_cv_c_const=no
2759 fi
2760 rm -f conftest*
2761 fi
2762
2763 echo "$ac_t""$ac_cv_c_const" 1>&6
2764 if test $ac_cv_c_const = no; then
2765   cat >> confdefs.h <<\EOF
2766 #define const 
2767 EOF
2768
2769 fi
2770
2771 echo $ac_n "checking for inline""... $ac_c" 1>&6
2772 echo "configure:2773: checking for inline" >&5
2773 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2774   echo $ac_n "(cached) $ac_c" 1>&6
2775 else
2776   ac_cv_c_inline=no
2777 for ac_kw in inline __inline__ __inline; do
2778   cat > conftest.$ac_ext <<EOF
2779 #line 2780 "configure"
2780 #include "confdefs.h"
2781
2782 int main() {
2783 } $ac_kw foo() {
2784 ; return 0; }
2785 EOF
2786 if { (eval echo configure:2787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2787   rm -rf conftest*
2788   ac_cv_c_inline=$ac_kw; break
2789 else
2790   echo "configure: failed program was:" >&5
2791   cat conftest.$ac_ext >&5
2792 fi
2793 rm -f conftest*
2794 done
2795
2796 fi
2797
2798 echo "$ac_t""$ac_cv_c_inline" 1>&6
2799 case "$ac_cv_c_inline" in
2800   inline | yes) ;;
2801   no) cat >> confdefs.h <<\EOF
2802 #define inline 
2803 EOF
2804  ;;
2805   *)  cat >> confdefs.h <<EOF
2806 #define inline $ac_cv_c_inline
2807 EOF
2808  ;;
2809 esac
2810
2811 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2812 echo "configure:2813: checking whether byte ordering is bigendian" >&5
2813 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2814   echo $ac_n "(cached) $ac_c" 1>&6
2815 else
2816   ac_cv_c_bigendian=unknown
2817 # See if sys/param.h defines the BYTE_ORDER macro.
2818 cat > conftest.$ac_ext <<EOF
2819 #line 2820 "configure"
2820 #include "confdefs.h"
2821 #include <sys/types.h>
2822 #include <sys/param.h>
2823 int main() {
2824
2825 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2826  bogus endian macros
2827 #endif
2828 ; return 0; }
2829 EOF
2830 if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2831   rm -rf conftest*
2832   # It does; now see whether it defined to BIG_ENDIAN or not.
2833 cat > conftest.$ac_ext <<EOF
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836 #include <sys/types.h>
2837 #include <sys/param.h>
2838 int main() {
2839
2840 #if BYTE_ORDER != BIG_ENDIAN
2841  not big endian
2842 #endif
2843 ; return 0; }
2844 EOF
2845 if { (eval echo configure:2846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2846   rm -rf conftest*
2847   ac_cv_c_bigendian=yes
2848 else
2849   echo "configure: failed program was:" >&5
2850   cat conftest.$ac_ext >&5
2851   rm -rf conftest*
2852   ac_cv_c_bigendian=no
2853 fi
2854 rm -f conftest*
2855 else
2856   echo "configure: failed program was:" >&5
2857   cat conftest.$ac_ext >&5
2858 fi
2859 rm -f conftest*
2860 if test $ac_cv_c_bigendian = unknown; then
2861 if test "$cross_compiling" = yes; then
2862     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2863 else
2864   cat > conftest.$ac_ext <<EOF
2865 #line 2866 "configure"
2866 #include "confdefs.h"
2867 main () {
2868   /* Are we little or big endian?  From Harbison&Steele.  */
2869   union
2870   {
2871     long l;
2872     char c[sizeof (long)];
2873   } u;
2874   u.l = 1;
2875   exit (u.c[sizeof (long) - 1] == 1);
2876 }
2877 EOF
2878 if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2879 then
2880   ac_cv_c_bigendian=no
2881 else
2882   echo "configure: failed program was:" >&5
2883   cat conftest.$ac_ext >&5
2884   rm -fr conftest*
2885   ac_cv_c_bigendian=yes
2886 fi
2887 rm -fr conftest*
2888 fi
2889
2890 fi
2891 fi
2892
2893 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2894 if test $ac_cv_c_bigendian = yes; then
2895   cat >> confdefs.h <<\EOF
2896 #define WORDS_BIGENDIAN 1
2897 EOF
2898
2899 fi
2900
2901 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2902 echo "configure:2903: checking whether char is unsigned" >&5
2903 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2904   echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906   if test "$GCC" = yes; then
2907   # GCC predefines this symbol on systems where it applies.
2908 cat > conftest.$ac_ext <<EOF
2909 #line 2910 "configure"
2910 #include "confdefs.h"
2911 #ifdef __CHAR_UNSIGNED__
2912   yes
2913 #endif
2914
2915 EOF
2916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2917   egrep "yes" >/dev/null 2>&1; then
2918   rm -rf conftest*
2919   ac_cv_c_char_unsigned=yes
2920 else
2921   rm -rf conftest*
2922   ac_cv_c_char_unsigned=no
2923 fi
2924 rm -f conftest*
2925
2926 else
2927 if test "$cross_compiling" = yes; then
2928     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2929 else
2930   cat > conftest.$ac_ext <<EOF
2931 #line 2932 "configure"
2932 #include "confdefs.h"
2933 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2934 #if !defined(__STDC__) || __STDC__ != 1
2935 #define volatile
2936 #endif
2937 main() {
2938   volatile char c = 255; exit(c < 0);
2939 }
2940 EOF
2941 if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2942 then
2943   ac_cv_c_char_unsigned=yes
2944 else
2945   echo "configure: failed program was:" >&5
2946   cat conftest.$ac_ext >&5
2947   rm -fr conftest*
2948   ac_cv_c_char_unsigned=no
2949 fi
2950 rm -fr conftest*
2951 fi
2952
2953 fi
2954 fi
2955
2956 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2957 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2958   cat >> confdefs.h <<\EOF
2959 #define __CHAR_UNSIGNED__ 1
2960 EOF
2961
2962 fi
2963
2964
2965 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2966 echo "configure:2967: checking return type of signal handlers" >&5
2967 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2968   echo $ac_n "(cached) $ac_c" 1>&6
2969 else
2970   cat > conftest.$ac_ext <<EOF
2971 #line 2972 "configure"
2972 #include "confdefs.h"
2973 #include <sys/types.h>
2974 #include <signal.h>
2975 #ifdef signal
2976 #undef signal
2977 #endif
2978 #ifdef __cplusplus
2979 extern "C" void (*signal (int, void (*)(int)))(int);
2980 #else
2981 void (*signal ()) ();
2982 #endif
2983
2984 int main() {
2985 int i;
2986 ; return 0; }
2987 EOF
2988 if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2989   rm -rf conftest*
2990   ac_cv_type_signal=void
2991 else
2992   echo "configure: failed program was:" >&5
2993   cat conftest.$ac_ext >&5
2994   rm -rf conftest*
2995   ac_cv_type_signal=int
2996 fi
2997 rm -f conftest*
2998 fi
2999
3000 echo "$ac_t""$ac_cv_type_signal" 1>&6
3001 cat >> confdefs.h <<EOF
3002 #define RETSIGTYPE $ac_cv_type_signal
3003 EOF
3004
3005
3006 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3007 echo "configure:3008: checking for uid_t in sys/types.h" >&5
3008 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3009   echo $ac_n "(cached) $ac_c" 1>&6
3010 else
3011   cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3014 #include <sys/types.h>
3015 EOF
3016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3017   egrep "uid_t" >/dev/null 2>&1; then
3018   rm -rf conftest*
3019   ac_cv_type_uid_t=yes
3020 else
3021   rm -rf conftest*
3022   ac_cv_type_uid_t=no
3023 fi
3024 rm -f conftest*
3025
3026 fi
3027
3028 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3029 if test $ac_cv_type_uid_t = no; then
3030   cat >> confdefs.h <<\EOF
3031 #define uid_t int
3032 EOF
3033
3034   cat >> confdefs.h <<\EOF
3035 #define gid_t int
3036 EOF
3037
3038 fi
3039
3040 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3041 echo "configure:3042: checking for mode_t" >&5
3042 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3043   echo $ac_n "(cached) $ac_c" 1>&6
3044 else
3045   cat > conftest.$ac_ext <<EOF
3046 #line 3047 "configure"
3047 #include "confdefs.h"
3048 #include <sys/types.h>
3049 #if STDC_HEADERS
3050 #include <stdlib.h>
3051 #include <stddef.h>
3052 #endif
3053 EOF
3054 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3055   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3056   rm -rf conftest*
3057   ac_cv_type_mode_t=yes
3058 else
3059   rm -rf conftest*
3060   ac_cv_type_mode_t=no
3061 fi
3062 rm -f conftest*
3063
3064 fi
3065 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3066 if test $ac_cv_type_mode_t = no; then
3067   cat >> confdefs.h <<\EOF
3068 #define mode_t int
3069 EOF
3070
3071 fi
3072
3073 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3074 echo "configure:3075: checking for off_t" >&5
3075 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3076   echo $ac_n "(cached) $ac_c" 1>&6
3077 else
3078   cat > conftest.$ac_ext <<EOF
3079 #line 3080 "configure"
3080 #include "confdefs.h"
3081 #include <sys/types.h>
3082 #if STDC_HEADERS
3083 #include <stdlib.h>
3084 #include <stddef.h>
3085 #endif
3086 EOF
3087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3088   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3089   rm -rf conftest*
3090   ac_cv_type_off_t=yes
3091 else
3092   rm -rf conftest*
3093   ac_cv_type_off_t=no
3094 fi
3095 rm -f conftest*
3096
3097 fi
3098 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3099 if test $ac_cv_type_off_t = no; then
3100   cat >> confdefs.h <<\EOF
3101 #define off_t long
3102 EOF
3103
3104 fi
3105
3106 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3107 echo "configure:3108: checking for size_t" >&5
3108 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3109   echo $ac_n "(cached) $ac_c" 1>&6
3110 else
3111   cat > conftest.$ac_ext <<EOF
3112 #line 3113 "configure"
3113 #include "confdefs.h"
3114 #include <sys/types.h>
3115 #if STDC_HEADERS
3116 #include <stdlib.h>
3117 #include <stddef.h>
3118 #endif
3119 EOF
3120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3121   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3122   rm -rf conftest*
3123   ac_cv_type_size_t=yes
3124 else
3125   rm -rf conftest*
3126   ac_cv_type_size_t=no
3127 fi
3128 rm -f conftest*
3129
3130 fi
3131 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3132 if test $ac_cv_type_size_t = no; then
3133   cat >> confdefs.h <<\EOF
3134 #define size_t unsigned
3135 EOF
3136
3137 fi
3138
3139 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3140 echo "configure:3141: checking for pid_t" >&5
3141 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3142   echo $ac_n "(cached) $ac_c" 1>&6
3143 else
3144   cat > conftest.$ac_ext <<EOF
3145 #line 3146 "configure"
3146 #include "confdefs.h"
3147 #include <sys/types.h>
3148 #if STDC_HEADERS
3149 #include <stdlib.h>
3150 #include <stddef.h>
3151 #endif
3152 EOF
3153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3154   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3155   rm -rf conftest*
3156   ac_cv_type_pid_t=yes
3157 else
3158   rm -rf conftest*
3159   ac_cv_type_pid_t=no
3160 fi
3161 rm -f conftest*
3162
3163 fi
3164 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3165 if test $ac_cv_type_pid_t = no; then
3166   cat >> confdefs.h <<\EOF
3167 #define pid_t int
3168 EOF
3169
3170 fi
3171
3172 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3173 echo "configure:3174: checking for st_rdev in struct stat" >&5
3174 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177   cat > conftest.$ac_ext <<EOF
3178 #line 3179 "configure"
3179 #include "confdefs.h"
3180 #include <sys/types.h>
3181 #include <sys/stat.h>
3182 int main() {
3183 struct stat s; s.st_rdev;
3184 ; return 0; }
3185 EOF
3186 if { (eval echo configure:3187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3187   rm -rf conftest*
3188   ac_cv_struct_st_rdev=yes
3189 else
3190   echo "configure: failed program was:" >&5
3191   cat conftest.$ac_ext >&5
3192   rm -rf conftest*
3193   ac_cv_struct_st_rdev=no
3194 fi
3195 rm -f conftest*
3196 fi
3197
3198 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3199 if test $ac_cv_struct_st_rdev = yes; then
3200   cat >> confdefs.h <<\EOF
3201 #define HAVE_ST_RDEV 1
3202 EOF
3203
3204 fi
3205
3206 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3207 echo "configure:3208: checking for d_off in dirent" >&5
3208 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211   cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214
3215 #include <unistd.h>
3216 #include <sys/types.h>
3217 #include <dirent.h>
3218 int main() {
3219 struct dirent d; d.d_off;
3220 ; return 0; }
3221 EOF
3222 if { (eval echo configure:3223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3223   rm -rf conftest*
3224   ac_cv_dirent_d_off=yes
3225 else
3226   echo "configure: failed program was:" >&5
3227   cat conftest.$ac_ext >&5
3228   rm -rf conftest*
3229   ac_cv_dirent_d_off=no
3230 fi
3231 rm -f conftest*
3232 fi
3233
3234 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3235 if test $ac_cv_dirent_d_off = yes; then
3236   cat >> confdefs.h <<\EOF
3237 #define HAVE_DIRENT_D_OFF 1
3238 EOF
3239
3240 fi
3241
3242 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3243 echo "configure:3244: checking for ino_t" >&5
3244 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3245   echo $ac_n "(cached) $ac_c" 1>&6
3246 else
3247   cat > conftest.$ac_ext <<EOF
3248 #line 3249 "configure"
3249 #include "confdefs.h"
3250 #include <sys/types.h>
3251 #if STDC_HEADERS
3252 #include <stdlib.h>
3253 #include <stddef.h>
3254 #endif
3255 EOF
3256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3257   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3258   rm -rf conftest*
3259   ac_cv_type_ino_t=yes
3260 else
3261   rm -rf conftest*
3262   ac_cv_type_ino_t=no
3263 fi
3264 rm -f conftest*
3265
3266 fi
3267 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3268 if test $ac_cv_type_ino_t = no; then
3269   cat >> confdefs.h <<\EOF
3270 #define ino_t unsigned
3271 EOF
3272
3273 fi
3274
3275 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3276 echo "configure:3277: checking for loff_t" >&5
3277 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3278   echo $ac_n "(cached) $ac_c" 1>&6
3279 else
3280   cat > conftest.$ac_ext <<EOF
3281 #line 3282 "configure"
3282 #include "confdefs.h"
3283 #include <sys/types.h>
3284 #if STDC_HEADERS
3285 #include <stdlib.h>
3286 #include <stddef.h>
3287 #endif
3288 EOF
3289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3290   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3291   rm -rf conftest*
3292   ac_cv_type_loff_t=yes
3293 else
3294   rm -rf conftest*
3295   ac_cv_type_loff_t=no
3296 fi
3297 rm -f conftest*
3298
3299 fi
3300 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3301 if test $ac_cv_type_loff_t = no; then
3302   cat >> confdefs.h <<\EOF
3303 #define loff_t off_t
3304 EOF
3305
3306 fi
3307
3308 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3309 echo "configure:3310: checking for offset_t" >&5
3310 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3311   echo $ac_n "(cached) $ac_c" 1>&6
3312 else
3313   cat > conftest.$ac_ext <<EOF
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3316 #include <sys/types.h>
3317 #if STDC_HEADERS
3318 #include <stdlib.h>
3319 #include <stddef.h>
3320 #endif
3321 EOF
3322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3323   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3324   rm -rf conftest*
3325   ac_cv_type_offset_t=yes
3326 else
3327   rm -rf conftest*
3328   ac_cv_type_offset_t=no
3329 fi
3330 rm -f conftest*
3331
3332 fi
3333 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3334 if test $ac_cv_type_offset_t = no; then
3335   cat >> confdefs.h <<\EOF
3336 #define offset_t loff_t
3337 EOF
3338
3339 fi
3340
3341 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3342 echo "configure:3343: checking for ssize_t" >&5
3343 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3344   echo $ac_n "(cached) $ac_c" 1>&6
3345 else
3346   cat > conftest.$ac_ext <<EOF
3347 #line 3348 "configure"
3348 #include "confdefs.h"
3349 #include <sys/types.h>
3350 #if STDC_HEADERS
3351 #include <stdlib.h>
3352 #include <stddef.h>
3353 #endif
3354 EOF
3355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3356   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3357   rm -rf conftest*
3358   ac_cv_type_ssize_t=yes
3359 else
3360   rm -rf conftest*
3361   ac_cv_type_ssize_t=no
3362 fi
3363 rm -f conftest*
3364
3365 fi
3366 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3367 if test $ac_cv_type_ssize_t = no; then
3368   cat >> confdefs.h <<\EOF
3369 #define ssize_t int
3370 EOF
3371
3372 fi
3373
3374 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3375 echo "configure:3376: checking for wchar_t" >&5
3376 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3377   echo $ac_n "(cached) $ac_c" 1>&6
3378 else
3379   cat > conftest.$ac_ext <<EOF
3380 #line 3381 "configure"
3381 #include "confdefs.h"
3382 #include <sys/types.h>
3383 #if STDC_HEADERS
3384 #include <stdlib.h>
3385 #include <stddef.h>
3386 #endif
3387 EOF
3388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3389   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3390   rm -rf conftest*
3391   ac_cv_type_wchar_t=yes
3392 else
3393   rm -rf conftest*
3394   ac_cv_type_wchar_t=no
3395 fi
3396 rm -f conftest*
3397
3398 fi
3399 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3400 if test $ac_cv_type_wchar_t = no; then
3401   cat >> confdefs.h <<\EOF
3402 #define wchar_t unsigned short
3403 EOF
3404
3405 fi
3406
3407
3408 ############################################
3409 # for cups support we need libcups, and a handful of header files
3410
3411 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3412 echo "configure:3413: checking for httpConnect in -lcups" >&5
3413 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3415   echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417   ac_save_LIBS="$LIBS"
3418 LIBS="-lcups  $LIBS"
3419 cat > conftest.$ac_ext <<EOF
3420 #line 3421 "configure"
3421 #include "confdefs.h"
3422 /* Override any gcc2 internal prototype to avoid an error.  */
3423 /* We use char because int might match the return type of a gcc2
3424     builtin and then its argument prototype would still apply.  */
3425 char httpConnect();
3426
3427 int main() {
3428 httpConnect()
3429 ; return 0; }
3430 EOF
3431 if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3432   rm -rf conftest*
3433   eval "ac_cv_lib_$ac_lib_var=yes"
3434 else
3435   echo "configure: failed program was:" >&5
3436   cat conftest.$ac_ext >&5
3437   rm -rf conftest*
3438   eval "ac_cv_lib_$ac_lib_var=no"
3439 fi
3440 rm -f conftest*
3441 LIBS="$ac_save_LIBS"
3442
3443 fi
3444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3445   echo "$ac_t""yes" 1>&6
3446     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3447     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3448   cat >> confdefs.h <<EOF
3449 #define $ac_tr_lib 1
3450 EOF
3451
3452   LIBS="-lcups $LIBS"
3453
3454 else
3455   echo "$ac_t""no" 1>&6
3456 fi
3457
3458
3459 # I wonder if there is a nicer way of doing this?
3460
3461 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3462         for ac_hdr in cups/cups.h cups/language.h
3463 do
3464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3466 echo "configure:3467: checking for $ac_hdr" >&5
3467 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3468   echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470   cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473 #include <$ac_hdr>
3474 EOF
3475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3476 { (eval echo configure:3477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3478 if test -z "$ac_err"; then
3479   rm -rf conftest*
3480   eval "ac_cv_header_$ac_safe=yes"
3481 else
3482   echo "$ac_err" >&5
3483   echo "configure: failed program was:" >&5
3484   cat conftest.$ac_ext >&5
3485   rm -rf conftest*
3486   eval "ac_cv_header_$ac_safe=no"
3487 fi
3488 rm -f conftest*
3489 fi
3490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3491   echo "$ac_t""yes" 1>&6
3492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3493   cat >> confdefs.h <<EOF
3494 #define $ac_tr_hdr 1
3495 EOF
3496  
3497 else
3498   echo "$ac_t""no" 1>&6
3499 fi
3500 done
3501
3502         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3503                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3504                         cat >> confdefs.h <<\EOF
3505 #define HAVE_CUPS 1
3506 EOF
3507
3508                 fi
3509         fi
3510 fi
3511
3512 ############################################
3513 # we need libdl for PAM and the new VFS code
3514 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3515 echo "configure:3516: checking for dlopen in -ldl" >&5
3516 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3517 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3518   echo $ac_n "(cached) $ac_c" 1>&6
3519 else
3520   ac_save_LIBS="$LIBS"
3521 LIBS="-ldl  $LIBS"
3522 cat > conftest.$ac_ext <<EOF
3523 #line 3524 "configure"
3524 #include "confdefs.h"
3525 /* Override any gcc2 internal prototype to avoid an error.  */
3526 /* We use char because int might match the return type of a gcc2
3527     builtin and then its argument prototype would still apply.  */
3528 char dlopen();
3529
3530 int main() {
3531 dlopen()
3532 ; return 0; }
3533 EOF
3534 if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3535   rm -rf conftest*
3536   eval "ac_cv_lib_$ac_lib_var=yes"
3537 else
3538   echo "configure: failed program was:" >&5
3539   cat conftest.$ac_ext >&5
3540   rm -rf conftest*
3541   eval "ac_cv_lib_$ac_lib_var=no"
3542 fi
3543 rm -f conftest*
3544 LIBS="$ac_save_LIBS"
3545
3546 fi
3547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3548   echo "$ac_t""yes" 1>&6
3549   LIBS="$LIBS -ldl";
3550         cat >> confdefs.h <<\EOF
3551 #define HAVE_LIBDL 1
3552 EOF
3553
3554 else
3555   echo "$ac_t""no" 1>&6
3556 fi
3557
3558
3559 ############################################
3560 # check if the compiler can do immediate structures
3561 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3562 echo "configure:3563: checking for immediate structures" >&5
3563 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3564   echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566   
3567     cat > conftest.$ac_ext <<EOF
3568 #line 3569 "configure"
3569 #include "confdefs.h"
3570
3571 #include <stdio.h>
3572 int main() {
3573
3574    #define X_FOOBAR(x) ((FOOBAR) { x })
3575    typedef struct {unsigned x;} FOOBAR;
3576    FOOBAR f = X_FOOBAR(1);   
3577
3578 ; return 0; }
3579 EOF
3580 if { (eval echo configure:3581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3581   rm -rf conftest*
3582   samba_cv_immediate_structures=yes
3583 else
3584   echo "configure: failed program was:" >&5
3585   cat conftest.$ac_ext >&5
3586   rm -rf conftest*
3587   samba_cv_immediate_structures=no
3588 fi
3589 rm -f conftest*
3590 fi
3591
3592 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3593 if test x"$samba_cv_immediate_structures" = x"yes"; then
3594    cat >> confdefs.h <<\EOF
3595 #define HAVE_IMMEDIATE_STRUCTURES 1
3596 EOF
3597
3598 fi
3599
3600 ############################################
3601 # check for unix domain sockets
3602 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3603 echo "configure:3604: checking for unix domain sockets" >&5
3604 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   
3608     cat > conftest.$ac_ext <<EOF
3609 #line 3610 "configure"
3610 #include "confdefs.h"
3611
3612 #include <sys/types.h>
3613 #include <stdlib.h>
3614 #include <stddef.h>
3615 #include <sys/socket.h>
3616 #include <sys/un.h>
3617 int main() {
3618
3619   struct sockaddr_un sunaddr; 
3620   sunaddr.sun_family = AF_UNIX;
3621
3622 ; return 0; }
3623 EOF
3624 if { (eval echo configure:3625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3625   rm -rf conftest*
3626   samba_cv_unixsocket=yes
3627 else
3628   echo "configure: failed program was:" >&5
3629   cat conftest.$ac_ext >&5
3630   rm -rf conftest*
3631   samba_cv_unixsocket=no
3632 fi
3633 rm -f conftest*
3634 fi
3635
3636 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3637 if test x"$samba_cv_unixsocket" = x"yes"; then
3638    cat >> confdefs.h <<\EOF
3639 #define HAVE_UNIXSOCKET 1
3640 EOF
3641
3642 fi
3643
3644
3645 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3646 echo "configure:3647: checking for socklen_t type" >&5
3647 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3648   echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650   
3651     cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654
3655 #include <sys/types.h>
3656 #if STDC_HEADERS
3657 #include <stdlib.h>
3658 #include <stddef.h>
3659 #endif
3660 #include <sys/socket.h>
3661 int main() {
3662 socklen_t i = 0
3663 ; return 0; }
3664 EOF
3665 if { (eval echo configure:3666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3666   rm -rf conftest*
3667   samba_cv_socklen_t=yes
3668 else
3669   echo "configure: failed program was:" >&5
3670   cat conftest.$ac_ext >&5
3671   rm -rf conftest*
3672   samba_cv_socklen_t=no
3673 fi
3674 rm -f conftest*
3675 fi
3676
3677 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3678 if test x"$samba_cv_socklen_t" = x"yes"; then
3679    cat >> confdefs.h <<\EOF
3680 #define HAVE_SOCKLEN_T_TYPE 1
3681 EOF
3682
3683 fi
3684
3685 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3686 echo "configure:3687: checking for sig_atomic_t type" >&5
3687 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3688   echo $ac_n "(cached) $ac_c" 1>&6
3689 else
3690   
3691     cat > conftest.$ac_ext <<EOF
3692 #line 3693 "configure"
3693 #include "confdefs.h"
3694
3695 #include <sys/types.h>
3696 #if STDC_HEADERS
3697 #include <stdlib.h>
3698 #include <stddef.h>
3699 #endif
3700 #include <signal.h>
3701 int main() {
3702 sig_atomic_t i = 0
3703 ; return 0; }
3704 EOF
3705 if { (eval echo configure:3706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3706   rm -rf conftest*
3707   samba_cv_sig_atomic_t=yes
3708 else
3709   echo "configure: failed program was:" >&5
3710   cat conftest.$ac_ext >&5
3711   rm -rf conftest*
3712   samba_cv_sig_atomic_t=no
3713 fi
3714 rm -f conftest*
3715 fi
3716
3717 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3718 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3719    cat >> confdefs.h <<\EOF
3720 #define HAVE_SIG_ATOMIC_T_TYPE 1
3721 EOF
3722
3723 fi
3724
3725 # stupid headers have the functions but no declaration. grrrr.
3726
3727  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3728 echo "configure:3729: checking for errno declaration" >&5
3729 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3730   echo $ac_n "(cached) $ac_c" 1>&6
3731 else
3732   
3733     cat > conftest.$ac_ext <<EOF
3734 #line 3735 "configure"
3735 #include "confdefs.h"
3736 #include <errno.h>
3737 int main() {
3738 int i = (int)errno
3739 ; return 0; }
3740 EOF
3741 if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3742   rm -rf conftest*
3743   ac_cv_have_errno_decl=yes
3744 else
3745   echo "configure: failed program was:" >&5
3746   cat conftest.$ac_ext >&5
3747   rm -rf conftest*
3748   ac_cv_have_errno_decl=no
3749 fi
3750 rm -f conftest*
3751 fi
3752
3753 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3754  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3755     cat >> confdefs.h <<\EOF
3756 #define HAVE_ERRNO_DECL 1
3757 EOF
3758
3759  fi
3760
3761
3762  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3763 echo "configure:3764: checking for setresuid declaration" >&5
3764 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3765   echo $ac_n "(cached) $ac_c" 1>&6
3766 else
3767   
3768     cat > conftest.$ac_ext <<EOF
3769 #line 3770 "configure"
3770 #include "confdefs.h"
3771 #include <unistd.h>
3772 int main() {
3773 int i = (int)setresuid
3774 ; return 0; }
3775 EOF
3776 if { (eval echo configure:3777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3777   rm -rf conftest*
3778   ac_cv_have_setresuid_decl=yes
3779 else
3780   echo "configure: failed program was:" >&5
3781   cat conftest.$ac_ext >&5
3782   rm -rf conftest*
3783   ac_cv_have_setresuid_decl=no
3784 fi
3785 rm -f conftest*
3786 fi
3787
3788 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3789  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3790     cat >> confdefs.h <<\EOF
3791 #define HAVE_SETRESUID_DECL 1
3792 EOF
3793
3794  fi
3795
3796
3797  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3798 echo "configure:3799: checking for setresgid declaration" >&5
3799 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3800   echo $ac_n "(cached) $ac_c" 1>&6
3801 else
3802   
3803     cat > conftest.$ac_ext <<EOF
3804 #line 3805 "configure"
3805 #include "confdefs.h"
3806 #include <unistd.h>
3807 int main() {
3808 int i = (int)setresgid
3809 ; return 0; }
3810 EOF
3811 if { (eval echo configure:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3812   rm -rf conftest*
3813   ac_cv_have_setresgid_decl=yes
3814 else
3815   echo "configure: failed program was:" >&5
3816   cat conftest.$ac_ext >&5
3817   rm -rf conftest*
3818   ac_cv_have_setresgid_decl=no
3819 fi
3820 rm -f conftest*
3821 fi
3822
3823 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3824  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3825     cat >> confdefs.h <<\EOF
3826 #define HAVE_SETRESGID_DECL 1
3827 EOF
3828
3829  fi
3830
3831
3832  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3833 echo "configure:3834: checking for asprintf declaration" >&5
3834 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3835   echo $ac_n "(cached) $ac_c" 1>&6
3836 else
3837   
3838     cat > conftest.$ac_ext <<EOF
3839 #line 3840 "configure"
3840 #include "confdefs.h"
3841 #include <stdio.h>
3842 int main() {
3843 int i = (int)asprintf
3844 ; return 0; }
3845 EOF
3846 if { (eval echo configure:3847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3847   rm -rf conftest*
3848   ac_cv_have_asprintf_decl=yes
3849 else
3850   echo "configure: failed program was:" >&5
3851   cat conftest.$ac_ext >&5
3852   rm -rf conftest*
3853   ac_cv_have_asprintf_decl=no
3854 fi
3855 rm -f conftest*
3856 fi
3857
3858 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3859  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3860     cat >> confdefs.h <<\EOF
3861 #define HAVE_ASPRINTF_DECL 1
3862 EOF
3863
3864  fi
3865
3866
3867  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3868 echo "configure:3869: checking for vasprintf declaration" >&5
3869 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3870   echo $ac_n "(cached) $ac_c" 1>&6
3871 else
3872   
3873     cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3876 #include <stdio.h>
3877 int main() {
3878 int i = (int)vasprintf
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882   rm -rf conftest*
3883   ac_cv_have_vasprintf_decl=yes
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   ac_cv_have_vasprintf_decl=no
3889 fi
3890 rm -f conftest*
3891 fi
3892
3893 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3894  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3895     cat >> confdefs.h <<\EOF
3896 #define HAVE_VASPRINTF_DECL 1
3897 EOF
3898
3899  fi
3900
3901
3902  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3903 echo "configure:3904: checking for vsnprintf declaration" >&5
3904 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3905   echo $ac_n "(cached) $ac_c" 1>&6
3906 else
3907   
3908     cat > conftest.$ac_ext <<EOF
3909 #line 3910 "configure"
3910 #include "confdefs.h"
3911 #include <stdio.h>
3912 int main() {
3913 int i = (int)vsnprintf
3914 ; return 0; }
3915 EOF
3916 if { (eval echo configure:3917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3917   rm -rf conftest*
3918   ac_cv_have_vsnprintf_decl=yes
3919 else
3920   echo "configure: failed program was:" >&5
3921   cat conftest.$ac_ext >&5
3922   rm -rf conftest*
3923   ac_cv_have_vsnprintf_decl=no
3924 fi
3925 rm -f conftest*
3926 fi
3927
3928 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3929  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3930     cat >> confdefs.h <<\EOF
3931 #define HAVE_VSNPRINTF_DECL 1
3932 EOF
3933
3934  fi
3935
3936
3937  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3938 echo "configure:3939: checking for snprintf declaration" >&5
3939 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3940   echo $ac_n "(cached) $ac_c" 1>&6
3941 else
3942   
3943     cat > conftest.$ac_ext <<EOF
3944 #line 3945 "configure"
3945 #include "confdefs.h"
3946 #include <stdio.h>
3947 int main() {
3948 int i = (int)snprintf
3949 ; return 0; }
3950 EOF
3951 if { (eval echo configure:3952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3952   rm -rf conftest*
3953   ac_cv_have_snprintf_decl=yes
3954 else
3955   echo "configure: failed program was:" >&5
3956   cat conftest.$ac_ext >&5
3957   rm -rf conftest*
3958   ac_cv_have_snprintf_decl=no
3959 fi
3960 rm -f conftest*
3961 fi
3962
3963 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3964  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3965     cat >> confdefs.h <<\EOF
3966 #define HAVE_SNPRINTF_DECL 1
3967 EOF
3968
3969  fi
3970
3971
3972 # and glibc has setresuid under linux but the function does
3973 # nothing until kernel 2.1.44! very dumb.
3974 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3975 echo "configure:3976: checking for real setresuid" >&5
3976 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3977   echo $ac_n "(cached) $ac_c" 1>&6
3978 else
3979   
3980     if test "$cross_compiling" = yes; then
3981   samba_cv_have_setresuid=cross
3982 else
3983   cat > conftest.$ac_ext <<EOF
3984 #line 3985 "configure"
3985 #include "confdefs.h"
3986 #include <errno.h>
3987 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3988 EOF
3989 if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3990 then
3991   samba_cv_have_setresuid=yes
3992 else
3993   echo "configure: failed program was:" >&5
3994   cat conftest.$ac_ext >&5
3995   rm -fr conftest*
3996   samba_cv_have_setresuid=no
3997 fi
3998 rm -fr conftest*
3999 fi
4000
4001 fi
4002
4003 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4004 if test x"$samba_cv_have_setresuid" = x"yes"; then
4005     cat >> confdefs.h <<\EOF
4006 #define HAVE_SETRESUID 1
4007 EOF
4008
4009 fi
4010
4011 # Do the same check for setresguid...
4012 #
4013 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4014 echo "configure:4015: checking for real setresgid" >&5
4015 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4016   echo $ac_n "(cached) $ac_c" 1>&6
4017 else
4018   
4019     if test "$cross_compiling" = yes; then
4020   samba_cv_have_setresgid=cross
4021 else
4022   cat > conftest.$ac_ext <<EOF
4023 #line 4024 "configure"
4024 #include "confdefs.h"
4025 #include <unistd.h>
4026 #include <errno.h>
4027 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4028 EOF
4029 if { (eval echo configure:4030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4030 then
4031   samba_cv_have_setresgid=yes
4032 else
4033   echo "configure: failed program was:" >&5
4034   cat conftest.$ac_ext >&5
4035   rm -fr conftest*
4036   samba_cv_have_setresgid=no
4037 fi
4038 rm -fr conftest*
4039 fi
4040
4041 fi
4042
4043 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4044 if test x"$samba_cv_have_setresgid" = x"yes"; then
4045     cat >> confdefs.h <<\EOF
4046 #define HAVE_SETRESGID 1
4047 EOF
4048
4049 fi
4050
4051 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4052 echo "configure:4053: checking for 8-bit clean memcmp" >&5
4053 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4054   echo $ac_n "(cached) $ac_c" 1>&6
4055 else
4056   if test "$cross_compiling" = yes; then
4057   ac_cv_func_memcmp_clean=no
4058 else
4059   cat > conftest.$ac_ext <<EOF
4060 #line 4061 "configure"
4061 #include "confdefs.h"
4062
4063 main()
4064 {
4065   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4066   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4067 }
4068
4069 EOF
4070 if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4071 then
4072   ac_cv_func_memcmp_clean=yes
4073 else
4074   echo "configure: failed program was:" >&5
4075   cat conftest.$ac_ext >&5
4076   rm -fr conftest*
4077   ac_cv_func_memcmp_clean=no
4078 fi
4079 rm -fr conftest*
4080 fi
4081
4082 fi
4083
4084 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4085 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4086
4087
4088 ###############################################
4089 # test for where we get crypt() from
4090 for ac_func in crypt
4091 do
4092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4093 echo "configure:4094: checking for $ac_func" >&5
4094 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4095   echo $ac_n "(cached) $ac_c" 1>&6
4096 else
4097   cat > conftest.$ac_ext <<EOF
4098 #line 4099 "configure"
4099 #include "confdefs.h"
4100 /* System header to define __stub macros and hopefully few prototypes,
4101     which can conflict with char $ac_func(); below.  */
4102 #include <assert.h>
4103 /* Override any gcc2 internal prototype to avoid an error.  */
4104 /* We use char because int might match the return type of a gcc2
4105     builtin and then its argument prototype would still apply.  */
4106 char $ac_func();
4107
4108 int main() {
4109
4110 /* The GNU C library defines this for functions which it implements
4111     to always fail with ENOSYS.  Some functions are actually named
4112     something starting with __ and the normal name is an alias.  */
4113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4114 choke me
4115 #else
4116 $ac_func();
4117 #endif
4118
4119 ; return 0; }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4122   rm -rf conftest*
4123   eval "ac_cv_func_$ac_func=yes"
4124 else
4125   echo "configure: failed program was:" >&5
4126   cat conftest.$ac_ext >&5
4127   rm -rf conftest*
4128   eval "ac_cv_func_$ac_func=no"
4129 fi
4130 rm -f conftest*
4131 fi
4132
4133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4134   echo "$ac_t""yes" 1>&6
4135     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4136   cat >> confdefs.h <<EOF
4137 #define $ac_tr_func 1
4138 EOF
4139  
4140 else
4141   echo "$ac_t""no" 1>&6
4142 fi
4143 done
4144
4145 if test x"$ac_cv_func_crypt" = x"no"; then
4146     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4147 echo "configure:4148: checking for crypt in -lcrypt" >&5
4148 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4149 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4150   echo $ac_n "(cached) $ac_c" 1>&6
4151 else
4152   ac_save_LIBS="$LIBS"
4153 LIBS="-lcrypt  $LIBS"
4154 cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157 /* Override any gcc2 internal prototype to avoid an error.  */
4158 /* We use char because int might match the return type of a gcc2
4159     builtin and then its argument prototype would still apply.  */
4160 char crypt();
4161
4162 int main() {
4163 crypt()
4164 ; return 0; }
4165 EOF
4166 if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4167   rm -rf conftest*
4168   eval "ac_cv_lib_$ac_lib_var=yes"
4169 else
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   eval "ac_cv_lib_$ac_lib_var=no"
4174 fi
4175 rm -f conftest*
4176 LIBS="$ac_save_LIBS"
4177
4178 fi
4179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4180   echo "$ac_t""yes" 1>&6
4181   LIBS="$LIBS -lcrypt";
4182         cat >> confdefs.h <<\EOF
4183 #define HAVE_CRYPT 1
4184 EOF
4185
4186 else
4187   echo "$ac_t""no" 1>&6
4188 fi
4189
4190 fi
4191
4192
4193 ###############################################
4194 # Readline included by default unless explicitly asked not to
4195 test "${with_readline+set}" != "set" && with_readline=yes
4196
4197 # test for where we get readline() from
4198 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4199 echo "configure:4200: checking whether to use readline" >&5
4200 # Check whether --with-readline or --without-readline was given.
4201 if test "${with_readline+set}" = set; then
4202   withval="$with_readline"
4203     case "$with_readline" in
4204   yes)
4205     echo "$ac_t""yes" 1>&6
4206
4207     for ac_hdr in readline.h history.h readline/readline.h
4208 do
4209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4211 echo "configure:4212: checking for $ac_hdr" >&5
4212 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4213   echo $ac_n "(cached) $ac_c" 1>&6
4214 else
4215   cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 #include <$ac_hdr>
4219 EOF
4220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4221 { (eval echo configure:4222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4223 if test -z "$ac_err"; then
4224   rm -rf conftest*
4225   eval "ac_cv_header_$ac_safe=yes"
4226 else
4227   echo "$ac_err" >&5
4228   echo "configure: failed program was:" >&5
4229   cat conftest.$ac_ext >&5
4230   rm -rf conftest*
4231   eval "ac_cv_header_$ac_safe=no"
4232 fi
4233 rm -f conftest*
4234 fi
4235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4236   echo "$ac_t""yes" 1>&6
4237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4238   cat >> confdefs.h <<EOF
4239 #define $ac_tr_hdr 1
4240 EOF
4241  
4242 else
4243   echo "$ac_t""no" 1>&6
4244 fi
4245 done
4246
4247     for ac_hdr in readline/history.h
4248 do
4249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4251 echo "configure:4252: checking for $ac_hdr" >&5
4252 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4253   echo $ac_n "(cached) $ac_c" 1>&6
4254 else
4255   cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 #include <$ac_hdr>
4259 EOF
4260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4261 { (eval echo configure:4262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4263 if test -z "$ac_err"; then
4264   rm -rf conftest*
4265   eval "ac_cv_header_$ac_safe=yes"
4266 else
4267   echo "$ac_err" >&5
4268   echo "configure: failed program was:" >&5
4269   cat conftest.$ac_ext >&5
4270   rm -rf conftest*
4271   eval "ac_cv_header_$ac_safe=no"
4272 fi
4273 rm -f conftest*
4274 fi
4275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4276   echo "$ac_t""yes" 1>&6
4277     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4278   cat >> confdefs.h <<EOF
4279 #define $ac_tr_hdr 1
4280 EOF
4281  
4282 else
4283   echo "$ac_t""no" 1>&6
4284 fi
4285 done
4286
4287
4288     for ac_hdr in readline.h readline/readline.h
4289 do
4290 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4291 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4292 echo "configure:4293: checking for $ac_hdr" >&5
4293 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4294   echo $ac_n "(cached) $ac_c" 1>&6
4295 else
4296   cat > conftest.$ac_ext <<EOF
4297 #line 4298 "configure"
4298 #include "confdefs.h"
4299 #include <$ac_hdr>
4300 EOF
4301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4302 { (eval echo configure:4303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4304 if test -z "$ac_err"; then
4305   rm -rf conftest*
4306   eval "ac_cv_header_$ac_safe=yes"
4307 else
4308   echo "$ac_err" >&5
4309   echo "configure: failed program was:" >&5
4310   cat conftest.$ac_ext >&5
4311   rm -rf conftest*
4312   eval "ac_cv_header_$ac_safe=no"
4313 fi
4314 rm -f conftest*
4315 fi
4316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4317   echo "$ac_t""yes" 1>&6
4318     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4319   cat >> confdefs.h <<EOF
4320 #define $ac_tr_hdr 1
4321 EOF
4322  
4323       for termlib in ncurses curses termcap terminfo termlib; do
4324        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4325 echo "configure:4326: checking for tgetent in -l${termlib}" >&5
4326 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4327 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4328   echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330   ac_save_LIBS="$LIBS"
4331 LIBS="-l${termlib}  $LIBS"
4332 cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 /* Override any gcc2 internal prototype to avoid an error.  */
4336 /* We use char because int might match the return type of a gcc2
4337     builtin and then its argument prototype would still apply.  */
4338 char tgetent();
4339
4340 int main() {
4341 tgetent()
4342 ; return 0; }
4343 EOF
4344 if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4345   rm -rf conftest*
4346   eval "ac_cv_lib_$ac_lib_var=yes"
4347 else
4348   echo "configure: failed program was:" >&5
4349   cat conftest.$ac_ext >&5
4350   rm -rf conftest*
4351   eval "ac_cv_lib_$ac_lib_var=no"
4352 fi
4353 rm -f conftest*
4354 LIBS="$ac_save_LIBS"
4355
4356 fi
4357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4358   echo "$ac_t""yes" 1>&6
4359   TERMLIBS="-l${termlib}"; break
4360 else
4361   echo "$ac_t""no" 1>&6
4362 fi
4363
4364       done
4365       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4366 echo "configure:4367: checking for rl_callback_handler_install in -lreadline" >&5
4367 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4368 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4369   echo $ac_n "(cached) $ac_c" 1>&6
4370 else
4371   ac_save_LIBS="$LIBS"
4372 LIBS="-lreadline $TERMLIBS $LIBS"
4373 cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376 /* Override any gcc2 internal prototype to avoid an error.  */
4377 /* We use char because int might match the return type of a gcc2
4378     builtin and then its argument prototype would still apply.  */
4379 char rl_callback_handler_install();
4380
4381 int main() {
4382 rl_callback_handler_install()
4383 ; return 0; }
4384 EOF
4385 if { (eval echo configure:4386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4386   rm -rf conftest*
4387   eval "ac_cv_lib_$ac_lib_var=yes"
4388 else
4389   echo "configure: failed program was:" >&5
4390   cat conftest.$ac_ext >&5
4391   rm -rf conftest*
4392   eval "ac_cv_lib_$ac_lib_var=no"
4393 fi
4394 rm -f conftest*
4395 LIBS="$ac_save_LIBS"
4396
4397 fi
4398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4399   echo "$ac_t""yes" 1>&6
4400   TERMLIBS="-lreadline $TERMLIBS"
4401        cat >> confdefs.h <<\EOF
4402 #define HAVE_LIBREADLINE 1
4403 EOF
4404
4405        break
4406 else
4407   echo "$ac_t""no" 1>&6
4408 TERMLIBS=
4409 fi
4410
4411 else
4412   echo "$ac_t""no" 1>&6
4413 fi
4414 done
4415
4416     ;;
4417   no)
4418     echo "$ac_t""no" 1>&6
4419     ;;
4420   *)
4421     echo "$ac_t""yes" 1>&6
4422
4423     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4424     # alternate readline path
4425     _ldflags=${LDFLAGS}
4426     _cppflags=${CPPFLAGS}
4427
4428     # Add additional search path
4429     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4430     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4431
4432     for ac_hdr in readline.h history.h readline/readline.h
4433 do
4434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4436 echo "configure:4437: checking for $ac_hdr" >&5
4437 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4438   echo $ac_n "(cached) $ac_c" 1>&6
4439 else
4440   cat > conftest.$ac_ext <<EOF
4441 #line 4442 "configure"
4442 #include "confdefs.h"
4443 #include <$ac_hdr>
4444 EOF
4445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4446 { (eval echo configure:4447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4448 if test -z "$ac_err"; then
4449   rm -rf conftest*
4450   eval "ac_cv_header_$ac_safe=yes"
4451 else
4452   echo "$ac_err" >&5
4453   echo "configure: failed program was:" >&5
4454   cat conftest.$ac_ext >&5
4455   rm -rf conftest*
4456   eval "ac_cv_header_$ac_safe=no"
4457 fi
4458 rm -f conftest*
4459 fi
4460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4461   echo "$ac_t""yes" 1>&6
4462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4463   cat >> confdefs.h <<EOF
4464 #define $ac_tr_hdr 1
4465 EOF
4466  
4467 else
4468   echo "$ac_t""no" 1>&6
4469 fi
4470 done
4471
4472     for ac_hdr in readline/history.h
4473 do
4474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4476 echo "configure:4477: checking for $ac_hdr" >&5
4477 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   cat > conftest.$ac_ext <<EOF
4481 #line 4482 "configure"
4482 #include "confdefs.h"
4483 #include <$ac_hdr>
4484 EOF
4485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4486 { (eval echo configure:4487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4488 if test -z "$ac_err"; then
4489   rm -rf conftest*
4490   eval "ac_cv_header_$ac_safe=yes"
4491 else
4492   echo "$ac_err" >&5
4493   echo "configure: failed program was:" >&5
4494   cat conftest.$ac_ext >&5
4495   rm -rf conftest*
4496   eval "ac_cv_header_$ac_safe=no"
4497 fi
4498 rm -f conftest*
4499 fi
4500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4501   echo "$ac_t""yes" 1>&6
4502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4503   cat >> confdefs.h <<EOF
4504 #define $ac_tr_hdr 1
4505 EOF
4506  
4507 else
4508   echo "$ac_t""no" 1>&6
4509 fi
4510 done
4511
4512
4513     for ac_hdr in readline.h readline/readline.h
4514 do
4515 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4516 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4517 echo "configure:4518: checking for $ac_hdr" >&5
4518 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4519   echo $ac_n "(cached) $ac_c" 1>&6
4520 else
4521   cat > conftest.$ac_ext <<EOF
4522 #line 4523 "configure"
4523 #include "confdefs.h"
4524 #include <$ac_hdr>
4525 EOF
4526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4527 { (eval echo configure:4528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4529 if test -z "$ac_err"; then
4530   rm -rf conftest*
4531   eval "ac_cv_header_$ac_safe=yes"
4532 else
4533   echo "$ac_err" >&5
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -rf conftest*
4537   eval "ac_cv_header_$ac_safe=no"
4538 fi
4539 rm -f conftest*
4540 fi
4541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4542   echo "$ac_t""yes" 1>&6
4543     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4544   cat >> confdefs.h <<EOF
4545 #define $ac_tr_hdr 1
4546 EOF
4547  
4548       for termlib in ncurses curses termcap terminfo termlib; do
4549        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4550 echo "configure:4551: checking for tgetent in -l${termlib}" >&5
4551 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4552 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4553   echo $ac_n "(cached) $ac_c" 1>&6
4554 else
4555   ac_save_LIBS="$LIBS"
4556 LIBS="-l${termlib}  $LIBS"
4557 cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4560 /* Override any gcc2 internal prototype to avoid an error.  */
4561 /* We use char because int might match the return type of a gcc2
4562     builtin and then its argument prototype would still apply.  */
4563 char tgetent();
4564
4565 int main() {
4566 tgetent()
4567 ; return 0; }
4568 EOF
4569 if { (eval echo configure:4570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4570   rm -rf conftest*
4571   eval "ac_cv_lib_$ac_lib_var=yes"
4572 else
4573   echo "configure: failed program was:" >&5
4574   cat conftest.$ac_ext >&5
4575   rm -rf conftest*
4576   eval "ac_cv_lib_$ac_lib_var=no"
4577 fi
4578 rm -f conftest*
4579 LIBS="$ac_save_LIBS"
4580
4581 fi
4582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4583   echo "$ac_t""yes" 1>&6
4584   TERMLIBS="-l${termlib}"; break
4585 else
4586   echo "$ac_t""no" 1>&6
4587 fi
4588
4589       done
4590       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4591 echo "configure:4592: checking for rl_callback_handler_install in -lreadline" >&5
4592 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596   ac_save_LIBS="$LIBS"
4597 LIBS="-lreadline $TERMLIBS $LIBS"
4598 cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601 /* Override any gcc2 internal prototype to avoid an error.  */
4602 /* We use char because int might match the return type of a gcc2
4603     builtin and then its argument prototype would still apply.  */
4604 char rl_callback_handler_install();
4605
4606 int main() {
4607 rl_callback_handler_install()
4608 ; return 0; }
4609 EOF
4610 if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4611   rm -rf conftest*
4612   eval "ac_cv_lib_$ac_lib_var=yes"
4613 else
4614   echo "configure: failed program was:" >&5
4615   cat conftest.$ac_ext >&5
4616   rm -rf conftest*
4617   eval "ac_cv_lib_$ac_lib_var=no"
4618 fi
4619 rm -f conftest*
4620 LIBS="$ac_save_LIBS"
4621
4622 fi
4623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4624   echo "$ac_t""yes" 1>&6
4625   TERMLDFLAGS="-L$with_readline/lib"
4626        TERMCPPFLAGS="-I$with_readline/include"
4627        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4628        TERMLIBS="-lreadline $TERMLIBS"
4629        cat >> confdefs.h <<\EOF
4630 #define HAVE_LIBREADLINE 1
4631 EOF
4632
4633        break
4634 else
4635   echo "$ac_t""no" 1>&6
4636 TERMLIBS= CPPFLAGS=$_cppflags
4637 fi
4638
4639 else
4640   echo "$ac_t""no" 1>&6
4641 fi
4642 done
4643
4644
4645     LDFLAGS=$_ldflags
4646     ;;
4647   esac
4648 else
4649   echo "$ac_t""no" 1>&6
4650
4651 fi
4652
4653
4654
4655
4656 # The readline API changed slightly from readline3 to readline4, so
4657 # code will generate warnings on one of them unless we have a few
4658 # special cases.
4659 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4660 echo "configure:4661: checking for rl_completion_matches in -lreadline" >&5
4661 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4662 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   ac_save_LIBS="$LIBS"
4666 LIBS="-lreadline $TERMLIBS $LIBS"
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670 /* Override any gcc2 internal prototype to avoid an error.  */
4671 /* We use char because int might match the return type of a gcc2
4672     builtin and then its argument prototype would still apply.  */
4673 char rl_completion_matches();
4674
4675 int main() {
4676 rl_completion_matches()
4677 ; return 0; }
4678 EOF
4679 if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4680   rm -rf conftest*
4681   eval "ac_cv_lib_$ac_lib_var=yes"
4682 else
4683   echo "configure: failed program was:" >&5
4684   cat conftest.$ac_ext >&5
4685   rm -rf conftest*
4686   eval "ac_cv_lib_$ac_lib_var=no"
4687 fi
4688 rm -f conftest*
4689 LIBS="$ac_save_LIBS"
4690
4691 fi
4692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4693   echo "$ac_t""yes" 1>&6
4694   cat >> confdefs.h <<\EOF
4695 #define HAVE_NEW_LIBREADLINE 1
4696 EOF
4697
4698 else
4699   echo "$ac_t""no" 1>&6
4700 fi
4701
4702
4703 # The following test taken from the cvs sources
4704 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4705 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4706 # libsocket.so which has a bad implementation of gethostbyname (it
4707 # only looks in /etc/hosts), so we only look for -lsocket if we need
4708 # it.
4709 for ac_func in connect
4710 do
4711 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4712 echo "configure:4713: checking for $ac_func" >&5
4713 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4714   echo $ac_n "(cached) $ac_c" 1>&6
4715 else
4716   cat > conftest.$ac_ext <<EOF
4717 #line 4718 "configure"
4718 #include "confdefs.h"
4719 /* System header to define __stub macros and hopefully few prototypes,
4720     which can conflict with char $ac_func(); below.  */
4721 #include <assert.h>
4722 /* Override any gcc2 internal prototype to avoid an error.  */
4723 /* We use char because int might match the return type of a gcc2
4724     builtin and then its argument prototype would still apply.  */
4725 char $ac_func();
4726
4727 int main() {
4728
4729 /* The GNU C library defines this for functions which it implements
4730     to always fail with ENOSYS.  Some functions are actually named
4731     something starting with __ and the normal name is an alias.  */
4732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4733 choke me
4734 #else
4735 $ac_func();
4736 #endif
4737
4738 ; return 0; }
4739 EOF
4740 if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4741   rm -rf conftest*
4742   eval "ac_cv_func_$ac_func=yes"
4743 else
4744   echo "configure: failed program was:" >&5
4745   cat conftest.$ac_ext >&5
4746   rm -rf conftest*
4747   eval "ac_cv_func_$ac_func=no"
4748 fi
4749 rm -f conftest*
4750 fi
4751
4752 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4753   echo "$ac_t""yes" 1>&6
4754     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4755   cat >> confdefs.h <<EOF
4756 #define $ac_tr_func 1
4757 EOF
4758  
4759 else
4760   echo "$ac_t""no" 1>&6
4761 fi
4762 done
4763
4764 if test x"$ac_cv_func_connect" = x"no"; then
4765     case "$LIBS" in
4766     *-lnsl*) ;;
4767     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4768 echo "configure:4769: checking for printf in -lnsl_s" >&5
4769 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4770 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4771   echo $ac_n "(cached) $ac_c" 1>&6
4772 else
4773   ac_save_LIBS="$LIBS"
4774 LIBS="-lnsl_s  $LIBS"
4775 cat > conftest.$ac_ext <<EOF
4776 #line 4777 "configure"
4777 #include "confdefs.h"
4778 /* Override any gcc2 internal prototype to avoid an error.  */
4779 /* We use char because int might match the return type of a gcc2
4780     builtin and then its argument prototype would still apply.  */
4781 char printf();
4782
4783 int main() {
4784 printf()
4785 ; return 0; }
4786 EOF
4787 if { (eval echo configure:4788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4788   rm -rf conftest*
4789   eval "ac_cv_lib_$ac_lib_var=yes"
4790 else
4791   echo "configure: failed program was:" >&5
4792   cat conftest.$ac_ext >&5
4793   rm -rf conftest*
4794   eval "ac_cv_lib_$ac_lib_var=no"
4795 fi
4796 rm -f conftest*
4797 LIBS="$ac_save_LIBS"
4798
4799 fi
4800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4801   echo "$ac_t""yes" 1>&6
4802     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4803     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4804   cat >> confdefs.h <<EOF
4805 #define $ac_tr_lib 1
4806 EOF
4807
4808   LIBS="-lnsl_s $LIBS"
4809
4810 else
4811   echo "$ac_t""no" 1>&6
4812 fi
4813  ;;
4814     esac
4815     case "$LIBS" in
4816     *-lnsl*) ;;
4817     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4818 echo "configure:4819: checking for printf in -lnsl" >&5
4819 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4820 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4821   echo $ac_n "(cached) $ac_c" 1>&6
4822 else
4823   ac_save_LIBS="$LIBS"
4824 LIBS="-lnsl  $LIBS"
4825 cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 /* Override any gcc2 internal prototype to avoid an error.  */
4829 /* We use char because int might match the return type of a gcc2
4830     builtin and then its argument prototype would still apply.  */
4831 char printf();
4832
4833 int main() {
4834 printf()
4835 ; return 0; }
4836 EOF
4837 if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4838   rm -rf conftest*
4839   eval "ac_cv_lib_$ac_lib_var=yes"
4840 else
4841   echo "configure: failed program was:" >&5
4842   cat conftest.$ac_ext >&5
4843   rm -rf conftest*
4844   eval "ac_cv_lib_$ac_lib_var=no"
4845 fi
4846 rm -f conftest*
4847 LIBS="$ac_save_LIBS"
4848
4849 fi
4850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4851   echo "$ac_t""yes" 1>&6
4852     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4853     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4854   cat >> confdefs.h <<EOF
4855 #define $ac_tr_lib 1
4856 EOF
4857
4858   LIBS="-lnsl $LIBS"
4859
4860 else
4861   echo "$ac_t""no" 1>&6
4862 fi
4863  ;;
4864     esac
4865     case "$LIBS" in
4866     *-lsocket*) ;;
4867     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4868 echo "configure:4869: checking for connect in -lsocket" >&5
4869 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4870 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   ac_save_LIBS="$LIBS"
4874 LIBS="-lsocket  $LIBS"
4875 cat > conftest.$ac_ext <<EOF
4876 #line 4877 "configure"
4877 #include "confdefs.h"
4878 /* Override any gcc2 internal prototype to avoid an error.  */
4879 /* We use char because int might match the return type of a gcc2
4880     builtin and then its argument prototype would still apply.  */
4881 char connect();
4882
4883 int main() {
4884 connect()
4885 ; return 0; }
4886 EOF
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888   rm -rf conftest*
4889   eval "ac_cv_lib_$ac_lib_var=yes"
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   eval "ac_cv_lib_$ac_lib_var=no"
4895 fi
4896 rm -f conftest*
4897 LIBS="$ac_save_LIBS"
4898
4899 fi
4900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4901   echo "$ac_t""yes" 1>&6
4902     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4903     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4904   cat >> confdefs.h <<EOF
4905 #define $ac_tr_lib 1
4906 EOF
4907
4908   LIBS="-lsocket $LIBS"
4909
4910 else
4911   echo "$ac_t""no" 1>&6
4912 fi
4913  ;;
4914     esac
4915     case "$LIBS" in
4916     *-linet*) ;;
4917     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4918 echo "configure:4919: checking for connect in -linet" >&5
4919 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4920 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4921   echo $ac_n "(cached) $ac_c" 1>&6
4922 else
4923   ac_save_LIBS="$LIBS"
4924 LIBS="-linet  $LIBS"
4925 cat > conftest.$ac_ext <<EOF
4926 #line 4927 "configure"
4927 #include "confdefs.h"
4928 /* Override any gcc2 internal prototype to avoid an error.  */
4929 /* We use char because int might match the return type of a gcc2
4930     builtin and then its argument prototype would still apply.  */
4931 char connect();
4932
4933 int main() {
4934 connect()
4935 ; return 0; }
4936 EOF
4937 if { (eval echo configure:4938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4938   rm -rf conftest*
4939   eval "ac_cv_lib_$ac_lib_var=yes"
4940 else
4941   echo "configure: failed program was:" >&5
4942   cat conftest.$ac_ext >&5
4943   rm -rf conftest*
4944   eval "ac_cv_lib_$ac_lib_var=no"
4945 fi
4946 rm -f conftest*
4947 LIBS="$ac_save_LIBS"
4948
4949 fi
4950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4951   echo "$ac_t""yes" 1>&6
4952     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4953     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4954   cat >> confdefs.h <<EOF
4955 #define $ac_tr_lib 1
4956 EOF
4957
4958   LIBS="-linet $LIBS"
4959
4960 else
4961   echo "$ac_t""no" 1>&6
4962 fi
4963  ;;
4964     esac
4965             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4966        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4967         # ac_cv_func_connect=yes
4968         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4969         cat >> confdefs.h <<\EOF
4970 #define HAVE_CONNECT 1
4971 EOF
4972
4973     fi
4974 fi
4975
4976 ###############################################
4977 # test for where we get get_yp_default_domain() from
4978 for ac_func in yp_get_default_domain
4979 do
4980 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4981 echo "configure:4982: checking for $ac_func" >&5
4982 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4983   echo $ac_n "(cached) $ac_c" 1>&6
4984 else
4985   cat > conftest.$ac_ext <<EOF
4986 #line 4987 "configure"
4987 #include "confdefs.h"
4988 /* System header to define __stub macros and hopefully few prototypes,
4989     which can conflict with char $ac_func(); below.  */
4990 #include <assert.h>
4991 /* Override any gcc2 internal prototype to avoid an error.  */
4992 /* We use char because int might match the return type of a gcc2
4993     builtin and then its argument prototype would still apply.  */
4994 char $ac_func();
4995
4996 int main() {
4997
4998 /* The GNU C library defines this for functions which it implements
4999     to always fail with ENOSYS.  Some functions are actually named
5000     something starting with __ and the normal name is an alias.  */
5001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5002 choke me
5003 #else
5004 $ac_func();
5005 #endif
5006
5007 ; return 0; }
5008 EOF
5009 if { (eval echo configure:5010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5010   rm -rf conftest*
5011   eval "ac_cv_func_$ac_func=yes"
5012 else
5013   echo "configure: failed program was:" >&5
5014   cat conftest.$ac_ext >&5
5015   rm -rf conftest*
5016   eval "ac_cv_func_$ac_func=no"
5017 fi
5018 rm -f conftest*
5019 fi
5020
5021 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5022   echo "$ac_t""yes" 1>&6
5023     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5024   cat >> confdefs.h <<EOF
5025 #define $ac_tr_func 1
5026 EOF
5027  
5028 else
5029   echo "$ac_t""no" 1>&6
5030 fi
5031 done
5032
5033 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5034         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5035 echo "configure:5036: checking for yp_get_default_domain in -lnsl" >&5
5036 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5037 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5038   echo $ac_n "(cached) $ac_c" 1>&6
5039 else
5040   ac_save_LIBS="$LIBS"
5041 LIBS="-lnsl  $LIBS"
5042 cat > conftest.$ac_ext <<EOF
5043 #line 5044 "configure"
5044 #include "confdefs.h"
5045 /* Override any gcc2 internal prototype to avoid an error.  */
5046 /* We use char because int might match the return type of a gcc2
5047     builtin and then its argument prototype would still apply.  */
5048 char yp_get_default_domain();
5049
5050 int main() {
5051 yp_get_default_domain()
5052 ; return 0; }
5053 EOF
5054 if { (eval echo configure:5055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5055   rm -rf conftest*
5056   eval "ac_cv_lib_$ac_lib_var=yes"
5057 else
5058   echo "configure: failed program was:" >&5
5059   cat conftest.$ac_ext >&5
5060   rm -rf conftest*
5061   eval "ac_cv_lib_$ac_lib_var=no"
5062 fi
5063 rm -f conftest*
5064 LIBS="$ac_save_LIBS"
5065
5066 fi
5067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5068   echo "$ac_t""yes" 1>&6
5069   LIBS="$LIBS -lnsl";
5070         cat >> confdefs.h <<\EOF
5071 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5072 EOF
5073
5074 else
5075   echo "$ac_t""no" 1>&6
5076 fi
5077  
5078 fi
5079
5080 # Check if we have execl, if not we need to compile smbrun.
5081 for ac_func in execl
5082 do
5083 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5084 echo "configure:5085: checking for $ac_func" >&5
5085 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5086   echo $ac_n "(cached) $ac_c" 1>&6
5087 else
5088   cat > conftest.$ac_ext <<EOF
5089 #line 5090 "configure"
5090 #include "confdefs.h"
5091 /* System header to define __stub macros and hopefully few prototypes,
5092     which can conflict with char $ac_func(); below.  */
5093 #include <assert.h>
5094 /* Override any gcc2 internal prototype to avoid an error.  */
5095 /* We use char because int might match the return type of a gcc2
5096     builtin and then its argument prototype would still apply.  */
5097 char $ac_func();
5098
5099 int main() {
5100
5101 /* The GNU C library defines this for functions which it implements
5102     to always fail with ENOSYS.  Some functions are actually named
5103     something starting with __ and the normal name is an alias.  */
5104 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5105 choke me
5106 #else
5107 $ac_func();
5108 #endif
5109
5110 ; return 0; }
5111 EOF
5112 if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5113   rm -rf conftest*
5114   eval "ac_cv_func_$ac_func=yes"
5115 else
5116   echo "configure: failed program was:" >&5
5117   cat conftest.$ac_ext >&5
5118   rm -rf conftest*
5119   eval "ac_cv_func_$ac_func=no"
5120 fi
5121 rm -f conftest*
5122 fi
5123
5124 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5125   echo "$ac_t""yes" 1>&6
5126     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5127   cat >> confdefs.h <<EOF
5128 #define $ac_tr_func 1
5129 EOF
5130  
5131 else
5132   echo "$ac_t""no" 1>&6
5133 fi
5134 done
5135
5136 if test x"$ac_cv_func_execl" = x"no"; then
5137     RUNPROG="bin/smbrun"
5138 else
5139     RUNPROG=""
5140 fi
5141
5142 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5143 do
5144 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5145 echo "configure:5146: checking for $ac_func" >&5
5146 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5147   echo $ac_n "(cached) $ac_c" 1>&6
5148 else
5149   cat > conftest.$ac_ext <<EOF
5150 #line 5151 "configure"
5151 #include "confdefs.h"
5152 /* System header to define __stub macros and hopefully few prototypes,
5153     which can conflict with char $ac_func(); below.  */
5154 #include <assert.h>
5155 /* Override any gcc2 internal prototype to avoid an error.  */
5156 /* We use char because int might match the return type of a gcc2
5157     builtin and then its argument prototype would still apply.  */
5158 char $ac_func();
5159
5160 int main() {
5161
5162 /* The GNU C library defines this for functions which it implements
5163     to always fail with ENOSYS.  Some functions are actually named
5164     something starting with __ and the normal name is an alias.  */
5165 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5166 choke me
5167 #else
5168 $ac_func();
5169 #endif
5170
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5174   rm -rf conftest*
5175   eval "ac_cv_func_$ac_func=yes"
5176 else
5177   echo "configure: failed program was:" >&5
5178   cat conftest.$ac_ext >&5
5179   rm -rf conftest*
5180   eval "ac_cv_func_$ac_func=no"
5181 fi
5182 rm -f conftest*
5183 fi
5184
5185 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5186   echo "$ac_t""yes" 1>&6
5187     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5188   cat >> confdefs.h <<EOF
5189 #define $ac_tr_func 1
5190 EOF
5191  
5192 else
5193   echo "$ac_t""no" 1>&6
5194 fi
5195 done
5196
5197 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5198 do
5199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5200 echo "configure:5201: checking for $ac_func" >&5
5201 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5202   echo $ac_n "(cached) $ac_c" 1>&6
5203 else
5204   cat > conftest.$ac_ext <<EOF
5205 #line 5206 "configure"
5206 #include "confdefs.h"
5207 /* System header to define __stub macros and hopefully few prototypes,
5208     which can conflict with char $ac_func(); below.  */
5209 #include <assert.h>
5210 /* Override any gcc2 internal prototype to avoid an error.  */
5211 /* We use char because int might match the return type of a gcc2
5212     builtin and then its argument prototype would still apply.  */
5213 char $ac_func();
5214
5215 int main() {
5216
5217 /* The GNU C library defines this for functions which it implements
5218     to always fail with ENOSYS.  Some functions are actually named
5219     something starting with __ and the normal name is an alias.  */
5220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5221 choke me
5222 #else
5223 $ac_func();
5224 #endif
5225
5226 ; return 0; }
5227 EOF
5228 if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5229   rm -rf conftest*
5230   eval "ac_cv_func_$ac_func=yes"
5231 else
5232   echo "configure: failed program was:" >&5
5233   cat conftest.$ac_ext >&5
5234   rm -rf conftest*
5235   eval "ac_cv_func_$ac_func=no"
5236 fi
5237 rm -f conftest*
5238 fi
5239
5240 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5241   echo "$ac_t""yes" 1>&6
5242     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5243   cat >> confdefs.h <<EOF
5244 #define $ac_tr_func 1
5245 EOF
5246  
5247 else
5248   echo "$ac_t""no" 1>&6
5249 fi
5250 done
5251
5252 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5253 do
5254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5255 echo "configure:5256: checking for $ac_func" >&5
5256 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5257   echo $ac_n "(cached) $ac_c" 1>&6
5258 else
5259   cat > conftest.$ac_ext <<EOF
5260 #line 5261 "configure"
5261 #include "confdefs.h"
5262 /* System header to define __stub macros and hopefully few prototypes,
5263     which can conflict with char $ac_func(); below.  */
5264 #include <assert.h>
5265 /* Override any gcc2 internal prototype to avoid an error.  */
5266 /* We use char because int might match the return type of a gcc2
5267     builtin and then its argument prototype would still apply.  */
5268 char $ac_func();
5269
5270 int main() {
5271
5272 /* The GNU C library defines this for functions which it implements
5273     to always fail with ENOSYS.  Some functions are actually named
5274     something starting with __ and the normal name is an alias.  */
5275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5276 choke me
5277 #else
5278 $ac_func();
5279 #endif
5280
5281 ; return 0; }
5282 EOF
5283 if { (eval echo configure:5284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5284   rm -rf conftest*
5285   eval "ac_cv_func_$ac_func=yes"
5286 else
5287   echo "configure: failed program was:" >&5
5288   cat conftest.$ac_ext >&5
5289   rm -rf conftest*
5290   eval "ac_cv_func_$ac_func=no"
5291 fi
5292 rm -f conftest*
5293 fi
5294
5295 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5296   echo "$ac_t""yes" 1>&6
5297     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5298   cat >> confdefs.h <<EOF
5299 #define $ac_tr_func 1
5300 EOF
5301  
5302 else
5303   echo "$ac_t""no" 1>&6
5304 fi
5305 done
5306
5307 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5308 do
5309 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5310 echo "configure:5311: checking for $ac_func" >&5
5311 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5312   echo $ac_n "(cached) $ac_c" 1>&6
5313 else
5314   cat > conftest.$ac_ext <<EOF
5315 #line 5316 "configure"
5316 #include "confdefs.h"
5317 /* System header to define __stub macros and hopefully few prototypes,
5318     which can conflict with char $ac_func(); below.  */
5319 #include <assert.h>
5320 /* Override any gcc2 internal prototype to avoid an error.  */
5321 /* We use char because int might match the return type of a gcc2
5322     builtin and then its argument prototype would still apply.  */
5323 char $ac_func();
5324
5325 int main() {
5326
5327 /* The GNU C library defines this for functions which it implements
5328     to always fail with ENOSYS.  Some functions are actually named
5329     something starting with __ and the normal name is an alias.  */
5330 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5331 choke me
5332 #else
5333 $ac_func();
5334 #endif
5335
5336 ; return 0; }
5337 EOF
5338 if { (eval echo configure:5339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5339   rm -rf conftest*
5340   eval "ac_cv_func_$ac_func=yes"
5341 else
5342   echo "configure: failed program was:" >&5
5343   cat conftest.$ac_ext >&5
5344   rm -rf conftest*
5345   eval "ac_cv_func_$ac_func=no"
5346 fi
5347 rm -f conftest*
5348 fi
5349
5350 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5351   echo "$ac_t""yes" 1>&6
5352     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5353   cat >> confdefs.h <<EOF
5354 #define $ac_tr_func 1
5355 EOF
5356  
5357 else
5358   echo "$ac_t""no" 1>&6
5359 fi
5360 done
5361
5362 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5363 do
5364 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5365 echo "configure:5366: checking for $ac_func" >&5
5366 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5367   echo $ac_n "(cached) $ac_c" 1>&6
5368 else
5369   cat > conftest.$ac_ext <<EOF
5370 #line 5371 "configure"
5371 #include "confdefs.h"
5372 /* System header to define __stub macros and hopefully few prototypes,
5373     which can conflict with char $ac_func(); below.  */
5374 #include <assert.h>
5375 /* Override any gcc2 internal prototype to avoid an error.  */
5376 /* We use char because int might match the return type of a gcc2
5377     builtin and then its argument prototype would still apply.  */
5378 char $ac_func();
5379
5380 int main() {
5381
5382 /* The GNU C library defines this for functions which it implements
5383     to always fail with ENOSYS.  Some functions are actually named
5384     something starting with __ and the normal name is an alias.  */
5385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5386 choke me
5387 #else
5388 $ac_func();
5389 #endif
5390
5391 ; return 0; }
5392 EOF
5393 if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5394   rm -rf conftest*
5395   eval "ac_cv_func_$ac_func=yes"
5396 else
5397   echo "configure: failed program was:" >&5
5398   cat conftest.$ac_ext >&5
5399   rm -rf conftest*
5400   eval "ac_cv_func_$ac_func=no"
5401 fi
5402 rm -f conftest*
5403 fi
5404
5405 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5406   echo "$ac_t""yes" 1>&6
5407     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5408   cat >> confdefs.h <<EOF
5409 #define $ac_tr_func 1
5410 EOF
5411  
5412 else
5413   echo "$ac_t""no" 1>&6
5414 fi
5415 done
5416
5417 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5418 do
5419 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5420 echo "configure:5421: checking for $ac_func" >&5
5421 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5422   echo $ac_n "(cached) $ac_c" 1>&6
5423 else
5424   cat > conftest.$ac_ext <<EOF
5425 #line 5426 "configure"
5426 #include "confdefs.h"
5427 /* System header to define __stub macros and hopefully few prototypes,
5428     which can conflict with char $ac_func(); below.  */
5429 #include <assert.h>
5430 /* Override any gcc2 internal prototype to avoid an error.  */
5431 /* We use char because int might match the return type of a gcc2
5432     builtin and then its argument prototype would still apply.  */
5433 char $ac_func();
5434
5435 int main() {
5436
5437 /* The GNU C library defines this for functions which it implements
5438     to always fail with ENOSYS.  Some functions are actually named
5439     something starting with __ and the normal name is an alias.  */
5440 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5441 choke me
5442 #else
5443 $ac_func();
5444 #endif
5445
5446 ; return 0; }
5447 EOF
5448 if { (eval echo configure:5449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5449   rm -rf conftest*
5450   eval "ac_cv_func_$ac_func=yes"
5451 else
5452   echo "configure: failed program was:" >&5
5453   cat conftest.$ac_ext >&5
5454   rm -rf conftest*
5455   eval "ac_cv_func_$ac_func=no"
5456 fi
5457 rm -f conftest*
5458 fi
5459
5460 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5461   echo "$ac_t""yes" 1>&6
5462     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5463   cat >> confdefs.h <<EOF
5464 #define $ac_tr_func 1
5465 EOF
5466  
5467 else
5468   echo "$ac_t""no" 1>&6
5469 fi
5470 done
5471
5472 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5473 do
5474 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5475 echo "configure:5476: checking for $ac_func" >&5
5476 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5477   echo $ac_n "(cached) $ac_c" 1>&6
5478 else
5479   cat > conftest.$ac_ext <<EOF
5480 #line 5481 "configure"
5481 #include "confdefs.h"
5482 /* System header to define __stub macros and hopefully few prototypes,
5483     which can conflict with char $ac_func(); below.  */
5484 #include <assert.h>
5485 /* Override any gcc2 internal prototype to avoid an error.  */
5486 /* We use char because int might match the return type of a gcc2
5487     builtin and then its argument prototype would still apply.  */
5488 char $ac_func();
5489
5490 int main() {
5491
5492 /* The GNU C library defines this for functions which it implements
5493     to always fail with ENOSYS.  Some functions are actually named
5494     something starting with __ and the normal name is an alias.  */
5495 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5496 choke me
5497 #else
5498 $ac_func();
5499 #endif
5500
5501 ; return 0; }
5502 EOF
5503 if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5504   rm -rf conftest*
5505   eval "ac_cv_func_$ac_func=yes"
5506 else
5507   echo "configure: failed program was:" >&5
5508   cat conftest.$ac_ext >&5
5509   rm -rf conftest*
5510   eval "ac_cv_func_$ac_func=no"
5511 fi
5512 rm -f conftest*
5513 fi
5514
5515 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5516   echo "$ac_t""yes" 1>&6
5517     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5518   cat >> confdefs.h <<EOF
5519 #define $ac_tr_func 1
5520 EOF
5521  
5522 else
5523   echo "$ac_t""no" 1>&6
5524 fi
5525 done
5526
5527 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5528 do
5529 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5530 echo "configure:5531: checking for $ac_func" >&5
5531 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5532   echo $ac_n "(cached) $ac_c" 1>&6
5533 else
5534   cat > conftest.$ac_ext <<EOF
5535 #line 5536 "configure"
5536 #include "confdefs.h"
5537 /* System header to define __stub macros and hopefully few prototypes,
5538     which can conflict with char $ac_func(); below.  */
5539 #include <assert.h>
5540 /* Override any gcc2 internal prototype to avoid an error.  */
5541 /* We use char because int might match the return type of a gcc2
5542     builtin and then its argument prototype would still apply.  */
5543 char $ac_func();
5544
5545 int main() {
5546
5547 /* The GNU C library defines this for functions which it implements
5548     to always fail with ENOSYS.  Some functions are actually named
5549     something starting with __ and the normal name is an alias.  */
5550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5551 choke me
5552 #else
5553 $ac_func();
5554 #endif
5555
5556 ; return 0; }
5557 EOF
5558 if { (eval echo configure:5559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5559   rm -rf conftest*
5560   eval "ac_cv_func_$ac_func=yes"
5561 else
5562   echo "configure: failed program was:" >&5
5563   cat conftest.$ac_ext >&5
5564   rm -rf conftest*
5565   eval "ac_cv_func_$ac_func=no"
5566 fi
5567 rm -f conftest*
5568 fi
5569
5570 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5571   echo "$ac_t""yes" 1>&6
5572     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5573   cat >> confdefs.h <<EOF
5574 #define $ac_tr_func 1
5575 EOF
5576  
5577 else
5578   echo "$ac_t""no" 1>&6
5579 fi
5580 done
5581
5582 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5583 do
5584 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5585 echo "configure:5586: checking for $ac_func" >&5
5586 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5587   echo $ac_n "(cached) $ac_c" 1>&6
5588 else
5589   cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5592 /* System header to define __stub macros and hopefully few prototypes,
5593     which can conflict with char $ac_func(); below.  */
5594 #include <assert.h>
5595 /* Override any gcc2 internal prototype to avoid an error.  */
5596 /* We use char because int might match the return type of a gcc2
5597     builtin and then its argument prototype would still apply.  */
5598 char $ac_func();
5599
5600 int main() {
5601
5602 /* The GNU C library defines this for functions which it implements
5603     to always fail with ENOSYS.  Some functions are actually named
5604     something starting with __ and the normal name is an alias.  */
5605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5606 choke me
5607 #else
5608 $ac_func();
5609 #endif
5610
5611 ; return 0; }
5612 EOF
5613 if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5614   rm -rf conftest*
5615   eval "ac_cv_func_$ac_func=yes"
5616 else
5617   echo "configure: failed program was:" >&5
5618   cat conftest.$ac_ext >&5
5619   rm -rf conftest*
5620   eval "ac_cv_func_$ac_func=no"
5621 fi
5622 rm -f conftest*
5623 fi
5624
5625 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5626   echo "$ac_t""yes" 1>&6
5627     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5628   cat >> confdefs.h <<EOF
5629 #define $ac_tr_func 1
5630 EOF
5631  
5632 else
5633   echo "$ac_t""no" 1>&6
5634 fi
5635 done
5636
5637 for ac_func in syslog vsyslog
5638 do
5639 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5640 echo "configure:5641: checking for $ac_func" >&5
5641 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5642   echo $ac_n "(cached) $ac_c" 1>&6
5643 else
5644   cat > conftest.$ac_ext <<EOF
5645 #line 5646 "configure"
5646 #include "confdefs.h"
5647 /* System header to define __stub macros and hopefully few prototypes,
5648     which can conflict with char $ac_func(); below.  */
5649 #include <assert.h>
5650 /* Override any gcc2 internal prototype to avoid an error.  */
5651 /* We use char because int might match the return type of a gcc2
5652     builtin and then its argument prototype would still apply.  */
5653 char $ac_func();
5654
5655 int main() {
5656
5657 /* The GNU C library defines this for functions which it implements
5658     to always fail with ENOSYS.  Some functions are actually named
5659     something starting with __ and the normal name is an alias.  */
5660 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5661 choke me
5662 #else
5663 $ac_func();
5664 #endif
5665
5666 ; return 0; }
5667 EOF
5668 if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5669   rm -rf conftest*
5670   eval "ac_cv_func_$ac_func=yes"
5671 else
5672   echo "configure: failed program was:" >&5
5673   cat conftest.$ac_ext >&5
5674   rm -rf conftest*
5675   eval "ac_cv_func_$ac_func=no"
5676 fi
5677 rm -f conftest*
5678 fi
5679
5680 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5681   echo "$ac_t""yes" 1>&6
5682     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5683   cat >> confdefs.h <<EOF
5684 #define $ac_tr_func 1
5685 EOF
5686  
5687 else
5688   echo "$ac_t""no" 1>&6
5689 fi
5690 done
5691
5692 # setbuffer is needed for smbtorture
5693 for ac_func in setbuffer
5694 do
5695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5696 echo "configure:5697: checking for $ac_func" >&5
5697 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5698   echo $ac_n "(cached) $ac_c" 1>&6
5699 else
5700   cat > conftest.$ac_ext <<EOF
5701 #line 5702 "configure"
5702 #include "confdefs.h"
5703 /* System header to define __stub macros and hopefully few prototypes,
5704     which can conflict with char $ac_func(); below.  */
5705 #include <assert.h>
5706 /* Override any gcc2 internal prototype to avoid an error.  */
5707 /* We use char because int might match the return type of a gcc2
5708     builtin and then its argument prototype would still apply.  */
5709 char $ac_func();
5710
5711 int main() {
5712
5713 /* The GNU C library defines this for functions which it implements
5714     to always fail with ENOSYS.  Some functions are actually named
5715     something starting with __ and the normal name is an alias.  */
5716 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5717 choke me
5718 #else
5719 $ac_func();
5720 #endif
5721
5722 ; return 0; }
5723 EOF
5724 if { (eval echo configure:5725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5725   rm -rf conftest*
5726   eval "ac_cv_func_$ac_func=yes"
5727 else
5728   echo "configure: failed program was:" >&5
5729   cat conftest.$ac_ext >&5
5730   rm -rf conftest*
5731   eval "ac_cv_func_$ac_func=no"
5732 fi
5733 rm -f conftest*
5734 fi
5735
5736 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5737   echo "$ac_t""yes" 1>&6
5738     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5739   cat >> confdefs.h <<EOF
5740 #define $ac_tr_func 1
5741 EOF
5742  
5743 else
5744   echo "$ac_t""no" 1>&6
5745 fi
5746 done
5747
5748
5749 # syscall() is needed for smbwrapper.
5750 for ac_func in syscall
5751 do
5752 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5753 echo "configure:5754: checking for $ac_func" >&5
5754 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5755   echo $ac_n "(cached) $ac_c" 1>&6
5756 else
5757   cat > conftest.$ac_ext <<EOF
5758 #line 5759 "configure"
5759 #include "confdefs.h"
5760 /* System header to define __stub macros and hopefully few prototypes,
5761     which can conflict with char $ac_func(); below.  */
5762 #include <assert.h>
5763 /* Override any gcc2 internal prototype to avoid an error.  */
5764 /* We use char because int might match the return type of a gcc2
5765     builtin and then its argument prototype would still apply.  */
5766 char $ac_func();
5767
5768 int main() {
5769
5770 /* The GNU C library defines this for functions which it implements
5771     to always fail with ENOSYS.  Some functions are actually named
5772     something starting with __ and the normal name is an alias.  */
5773 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5774 choke me
5775 #else
5776 $ac_func();
5777 #endif
5778
5779 ; return 0; }
5780 EOF
5781 if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5782   rm -rf conftest*
5783   eval "ac_cv_func_$ac_func=yes"
5784 else
5785   echo "configure: failed program was:" >&5
5786   cat conftest.$ac_ext >&5
5787   rm -rf conftest*
5788   eval "ac_cv_func_$ac_func=no"
5789 fi
5790 rm -f conftest*
5791 fi
5792
5793 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5794   echo "$ac_t""yes" 1>&6
5795     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5796   cat >> confdefs.h <<EOF
5797 #define $ac_tr_func 1
5798 EOF
5799  
5800 else
5801   echo "$ac_t""no" 1>&6
5802 fi
5803 done
5804
5805
5806 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5807 do
5808 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5809 echo "configure:5810: checking for $ac_func" >&5
5810 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5811   echo $ac_n "(cached) $ac_c" 1>&6
5812 else
5813   cat > conftest.$ac_ext <<EOF
5814 #line 5815 "configure"
5815 #include "confdefs.h"
5816 /* System header to define __stub macros and hopefully few prototypes,
5817     which can conflict with char $ac_func(); below.  */
5818 #include <assert.h>
5819 /* Override any gcc2 internal prototype to avoid an error.  */
5820 /* We use char because int might match the return type of a gcc2
5821     builtin and then its argument prototype would still apply.  */
5822 char $ac_func();
5823
5824 int main() {
5825
5826 /* The GNU C library defines this for functions which it implements
5827     to always fail with ENOSYS.  Some functions are actually named
5828     something starting with __ and the normal name is an alias.  */
5829 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5830 choke me
5831 #else
5832 $ac_func();
5833 #endif
5834
5835 ; return 0; }
5836 EOF
5837 if { (eval echo configure:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5838   rm -rf conftest*
5839   eval "ac_cv_func_$ac_func=yes"
5840 else
5841   echo "configure: failed program was:" >&5
5842   cat conftest.$ac_ext >&5
5843   rm -rf conftest*
5844   eval "ac_cv_func_$ac_func=no"
5845 fi
5846 rm -f conftest*
5847 fi
5848
5849 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5850   echo "$ac_t""yes" 1>&6
5851     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5852   cat >> confdefs.h <<EOF
5853 #define $ac_tr_func 1
5854 EOF
5855  
5856 else
5857   echo "$ac_t""no" 1>&6
5858 fi
5859 done
5860
5861 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5862 do
5863 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5864 echo "configure:5865: checking for $ac_func" >&5
5865 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5866   echo $ac_n "(cached) $ac_c" 1>&6
5867 else
5868   cat > conftest.$ac_ext <<EOF
5869 #line 5870 "configure"
5870 #include "confdefs.h"
5871 /* System header to define __stub macros and hopefully few prototypes,
5872     which can conflict with char $ac_func(); below.  */
5873 #include <assert.h>
5874 /* Override any gcc2 internal prototype to avoid an error.  */
5875 /* We use char because int might match the return type of a gcc2
5876     builtin and then its argument prototype would still apply.  */
5877 char $ac_func();
5878
5879 int main() {
5880
5881 /* The GNU C library defines this for functions which it implements
5882     to always fail with ENOSYS.  Some functions are actually named
5883     something starting with __ and the normal name is an alias.  */
5884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5885 choke me
5886 #else
5887 $ac_func();
5888 #endif
5889
5890 ; return 0; }
5891 EOF
5892 if { (eval echo configure:5893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5893   rm -rf conftest*
5894   eval "ac_cv_func_$ac_func=yes"
5895 else
5896   echo "configure: failed program was:" >&5
5897   cat conftest.$ac_ext >&5
5898   rm -rf conftest*
5899   eval "ac_cv_func_$ac_func=no"
5900 fi
5901 rm -f conftest*
5902 fi
5903
5904 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5905   echo "$ac_t""yes" 1>&6
5906     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5907   cat >> confdefs.h <<EOF
5908 #define $ac_tr_func 1
5909 EOF
5910  
5911 else
5912   echo "$ac_t""no" 1>&6
5913 fi
5914 done
5915
5916 for ac_func in __getcwd _getcwd
5917 do
5918 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5919 echo "configure:5920: checking for $ac_func" >&5
5920 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5921   echo $ac_n "(cached) $ac_c" 1>&6
5922 else
5923   cat > conftest.$ac_ext <<EOF
5924 #line 5925 "configure"
5925 #include "confdefs.h"
5926 /* System header to define __stub macros and hopefully few prototypes,
5927     which can conflict with char $ac_func(); below.  */
5928 #include <assert.h>
5929 /* Override any gcc2 internal prototype to avoid an error.  */
5930 /* We use char because int might match the return type of a gcc2
5931     builtin and then its argument prototype would still apply.  */
5932 char $ac_func();
5933
5934 int main() {
5935
5936 /* The GNU C library defines this for functions which it implements
5937     to always fail with ENOSYS.  Some functions are actually named
5938     something starting with __ and the normal name is an alias.  */
5939 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5940 choke me
5941 #else
5942 $ac_func();
5943 #endif
5944
5945 ; return 0; }
5946 EOF
5947 if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5948   rm -rf conftest*
5949   eval "ac_cv_func_$ac_func=yes"
5950 else
5951   echo "configure: failed program was:" >&5
5952   cat conftest.$ac_ext >&5
5953   rm -rf conftest*
5954   eval "ac_cv_func_$ac_func=no"
5955 fi
5956 rm -f conftest*
5957 fi
5958
5959 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5960   echo "$ac_t""yes" 1>&6
5961     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5962   cat >> confdefs.h <<EOF
5963 #define $ac_tr_func 1
5964 EOF
5965  
5966 else
5967   echo "$ac_t""no" 1>&6
5968 fi
5969 done
5970
5971 for ac_func in __xstat __fxstat __lxstat
5972 do
5973 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5974 echo "configure:5975: checking for $ac_func" >&5
5975 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5976   echo $ac_n "(cached) $ac_c" 1>&6
5977 else
5978   cat > conftest.$ac_ext <<EOF
5979 #line 5980 "configure"
5980 #include "confdefs.h"
5981 /* System header to define __stub macros and hopefully few prototypes,
5982     which can conflict with char $ac_func(); below.  */
5983 #include <assert.h>
5984 /* Override any gcc2 internal prototype to avoid an error.  */
5985 /* We use char because int might match the return type of a gcc2
5986     builtin and then its argument prototype would still apply.  */
5987 char $ac_func();
5988
5989 int main() {
5990
5991 /* The GNU C library defines this for functions which it implements
5992     to always fail with ENOSYS.  Some functions are actually named
5993     something starting with __ and the normal name is an alias.  */
5994 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5995 choke me
5996 #else
5997 $ac_func();
5998 #endif
5999
6000 ; return 0; }
6001 EOF
6002 if { (eval echo configure:6003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6003   rm -rf conftest*
6004   eval "ac_cv_func_$ac_func=yes"
6005 else
6006   echo "configure: failed program was:" >&5
6007   cat conftest.$ac_ext >&5
6008   rm -rf conftest*
6009   eval "ac_cv_func_$ac_func=no"
6010 fi
6011 rm -f conftest*
6012 fi
6013
6014 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6015   echo "$ac_t""yes" 1>&6
6016     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6017   cat >> confdefs.h <<EOF
6018 #define $ac_tr_func 1
6019 EOF
6020  
6021 else
6022   echo "$ac_t""no" 1>&6
6023 fi
6024 done
6025
6026 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6027 do
6028 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6029 echo "configure:6030: checking for $ac_func" >&5
6030 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6031   echo $ac_n "(cached) $ac_c" 1>&6
6032 else
6033   cat > conftest.$ac_ext <<EOF
6034 #line 6035 "configure"
6035 #include "confdefs.h"
6036 /* System header to define __stub macros and hopefully few prototypes,
6037     which can conflict with char $ac_func(); below.  */
6038 #include <assert.h>
6039 /* Override any gcc2 internal prototype to avoid an error.  */
6040 /* We use char because int might match the return type of a gcc2
6041     builtin and then its argument prototype would still apply.  */
6042 char $ac_func();
6043
6044 int main() {
6045
6046 /* The GNU C library defines this for functions which it implements
6047     to always fail with ENOSYS.  Some functions are actually named
6048     something starting with __ and the normal name is an alias.  */
6049 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6050 choke me
6051 #else
6052 $ac_func();
6053 #endif
6054
6055 ; return 0; }
6056 EOF
6057 if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6058   rm -rf conftest*
6059   eval "ac_cv_func_$ac_func=yes"
6060 else
6061   echo "configure: failed program was:" >&5
6062   cat conftest.$ac_ext >&5
6063   rm -rf conftest*
6064   eval "ac_cv_func_$ac_func=no"
6065 fi
6066 rm -f conftest*
6067 fi
6068
6069 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6070   echo "$ac_t""yes" 1>&6
6071     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6072   cat >> confdefs.h <<EOF
6073 #define $ac_tr_func 1
6074 EOF
6075  
6076 else
6077   echo "$ac_t""no" 1>&6
6078 fi
6079 done
6080
6081 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6082 do
6083 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6084 echo "configure:6085: checking for $ac_func" >&5
6085 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6086   echo $ac_n "(cached) $ac_c" 1>&6
6087 else
6088   cat > conftest.$ac_ext <<EOF
6089 #line 6090 "configure"
6090 #include "confdefs.h"
6091 /* System header to define __stub macros and hopefully few prototypes,
6092     which can conflict with char $ac_func(); below.  */
6093 #include <assert.h>
6094 /* Override any gcc2 internal prototype to avoid an error.  */
6095 /* We use char because int might match the return type of a gcc2
6096     builtin and then its argument prototype would still apply.  */
6097 char $ac_func();
6098
6099 int main() {
6100
6101 /* The GNU C library defines this for functions which it implements
6102     to always fail with ENOSYS.  Some functions are actually named
6103     something starting with __ and the normal name is an alias.  */
6104 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6105 choke me
6106 #else
6107 $ac_func();
6108 #endif
6109
6110 ; return 0; }
6111 EOF
6112 if { (eval echo configure:6113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6113   rm -rf conftest*
6114   eval "ac_cv_func_$ac_func=yes"
6115 else
6116   echo "configure: failed program was:" >&5
6117   cat conftest.$ac_ext >&5
6118   rm -rf conftest*
6119   eval "ac_cv_func_$ac_func=no"
6120 fi
6121 rm -f conftest*
6122 fi
6123
6124 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6125   echo "$ac_t""yes" 1>&6
6126     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6127   cat >> confdefs.h <<EOF
6128 #define $ac_tr_func 1
6129 EOF
6130  
6131 else
6132   echo "$ac_t""no" 1>&6
6133 fi
6134 done
6135
6136 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6137 do
6138 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6139 echo "configure:6140: checking for $ac_func" >&5
6140 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6141   echo $ac_n "(cached) $ac_c" 1>&6
6142 else
6143   cat > conftest.$ac_ext <<EOF
6144 #line 6145 "configure"
6145 #include "confdefs.h"
6146 /* System header to define __stub macros and hopefully few prototypes,
6147     which can conflict with char $ac_func(); below.  */
6148 #include <assert.h>
6149 /* Override any gcc2 internal prototype to avoid an error.  */
6150 /* We use char because int might match the return type of a gcc2
6151     builtin and then its argument prototype would still apply.  */
6152 char $ac_func();
6153
6154 int main() {
6155
6156 /* The GNU C library defines this for functions which it implements
6157     to always fail with ENOSYS.  Some functions are actually named
6158     something starting with __ and the normal name is an alias.  */
6159 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6160 choke me
6161 #else
6162 $ac_func();
6163 #endif
6164
6165 ; return 0; }
6166 EOF
6167 if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6168   rm -rf conftest*
6169   eval "ac_cv_func_$ac_func=yes"
6170 else
6171   echo "configure: failed program was:" >&5
6172   cat conftest.$ac_ext >&5
6173   rm -rf conftest*
6174   eval "ac_cv_func_$ac_func=no"
6175 fi
6176 rm -f conftest*
6177 fi
6178
6179 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6180   echo "$ac_t""yes" 1>&6
6181     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6182   cat >> confdefs.h <<EOF
6183 #define $ac_tr_func 1
6184 EOF
6185  
6186 else
6187   echo "$ac_t""no" 1>&6
6188 fi
6189 done
6190
6191 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6192 do
6193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6194 echo "configure:6195: checking for $ac_func" >&5
6195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6196   echo $ac_n "(cached) $ac_c" 1>&6
6197 else
6198   cat > conftest.$ac_ext <<EOF
6199 #line 6200 "configure"
6200 #include "confdefs.h"
6201 /* System header to define __stub macros and hopefully few prototypes,
6202     which can conflict with char $ac_func(); below.  */
6203 #include <assert.h>
6204 /* Override any gcc2 internal prototype to avoid an error.  */
6205 /* We use char because int might match the return type of a gcc2
6206     builtin and then its argument prototype would still apply.  */
6207 char $ac_func();
6208
6209 int main() {
6210
6211 /* The GNU C library defines this for functions which it implements
6212     to always fail with ENOSYS.  Some functions are actually named
6213     something starting with __ and the normal name is an alias.  */
6214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6215 choke me
6216 #else
6217 $ac_func();
6218 #endif
6219
6220 ; return 0; }
6221 EOF
6222 if { (eval echo configure:6223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6223   rm -rf conftest*
6224   eval "ac_cv_func_$ac_func=yes"
6225 else
6226   echo "configure: failed program was:" >&5
6227   cat conftest.$ac_ext >&5
6228   rm -rf conftest*
6229   eval "ac_cv_func_$ac_func=no"
6230 fi
6231 rm -f conftest*
6232 fi
6233
6234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6235   echo "$ac_t""yes" 1>&6
6236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6237   cat >> confdefs.h <<EOF
6238 #define $ac_tr_func 1
6239 EOF
6240  
6241 else
6242   echo "$ac_t""no" 1>&6
6243 fi
6244 done
6245
6246 for ac_func in _write __write _fork __fork
6247 do
6248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6249 echo "configure:6250: checking for $ac_func" >&5
6250 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6251   echo $ac_n "(cached) $ac_c" 1>&6
6252 else
6253   cat > conftest.$ac_ext <<EOF
6254 #line 6255 "configure"
6255 #include "confdefs.h"
6256 /* System header to define __stub macros and hopefully few prototypes,
6257     which can conflict with char $ac_func(); below.  */
6258 #include <assert.h>
6259 /* Override any gcc2 internal prototype to avoid an error.  */
6260 /* We use char because int might match the return type of a gcc2
6261     builtin and then its argument prototype would still apply.  */
6262 char $ac_func();
6263
6264 int main() {
6265
6266 /* The GNU C library defines this for functions which it implements
6267     to always fail with ENOSYS.  Some functions are actually named
6268     something starting with __ and the normal name is an alias.  */
6269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6270 choke me
6271 #else
6272 $ac_func();
6273 #endif
6274
6275 ; return 0; }
6276 EOF
6277 if { (eval echo configure:6278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6278   rm -rf conftest*
6279   eval "ac_cv_func_$ac_func=yes"
6280 else
6281   echo "configure: failed program was:" >&5
6282   cat conftest.$ac_ext >&5
6283   rm -rf conftest*
6284   eval "ac_cv_func_$ac_func=no"
6285 fi
6286 rm -f conftest*
6287 fi
6288
6289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6290   echo "$ac_t""yes" 1>&6
6291     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6292   cat >> confdefs.h <<EOF
6293 #define $ac_tr_func 1
6294 EOF
6295  
6296 else
6297   echo "$ac_t""no" 1>&6
6298 fi
6299 done
6300
6301 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6302 do
6303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6304 echo "configure:6305: checking for $ac_func" >&5
6305 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6306   echo $ac_n "(cached) $ac_c" 1>&6
6307 else
6308   cat > conftest.$ac_ext <<EOF
6309 #line 6310 "configure"
6310 #include "confdefs.h"
6311 /* System header to define __stub macros and hopefully few prototypes,
6312     which can conflict with char $ac_func(); below.  */
6313 #include <assert.h>
6314 /* Override any gcc2 internal prototype to avoid an error.  */
6315 /* We use char because int might match the return type of a gcc2
6316     builtin and then its argument prototype would still apply.  */
6317 char $ac_func();
6318
6319 int main() {
6320
6321 /* The GNU C library defines this for functions which it implements
6322     to always fail with ENOSYS.  Some functions are actually named
6323     something starting with __ and the normal name is an alias.  */
6324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6325 choke me
6326 #else
6327 $ac_func();
6328 #endif
6329
6330 ; return 0; }
6331 EOF
6332 if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6333   rm -rf conftest*
6334   eval "ac_cv_func_$ac_func=yes"
6335 else
6336   echo "configure: failed program was:" >&5
6337   cat conftest.$ac_ext >&5
6338   rm -rf conftest*
6339   eval "ac_cv_func_$ac_func=no"
6340 fi
6341 rm -f conftest*
6342 fi
6343
6344 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6345   echo "$ac_t""yes" 1>&6
6346     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6347   cat >> confdefs.h <<EOF
6348 #define $ac_tr_func 1
6349 EOF
6350  
6351 else
6352   echo "$ac_t""no" 1>&6
6353 fi
6354 done
6355
6356 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6357 do
6358 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6359 echo "configure:6360: checking for $ac_func" >&5
6360 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6361   echo $ac_n "(cached) $ac_c" 1>&6
6362 else
6363   cat > conftest.$ac_ext <<EOF
6364 #line 6365 "configure"
6365 #include "confdefs.h"
6366 /* System header to define __stub macros and hopefully few prototypes,
6367     which can conflict with char $ac_func(); below.  */
6368 #include <assert.h>
6369 /* Override any gcc2 internal prototype to avoid an error.  */
6370 /* We use char because int might match the return type of a gcc2
6371     builtin and then its argument prototype would still apply.  */
6372 char $ac_func();
6373
6374 int main() {
6375
6376 /* The GNU C library defines this for functions which it implements
6377     to always fail with ENOSYS.  Some functions are actually named
6378     something starting with __ and the normal name is an alias.  */
6379 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6380 choke me
6381 #else
6382 $ac_func();
6383 #endif
6384
6385 ; return 0; }
6386 EOF
6387 if { (eval echo configure:6388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6388   rm -rf conftest*
6389   eval "ac_cv_func_$ac_func=yes"
6390 else
6391   echo "configure: failed program was:" >&5
6392   cat conftest.$ac_ext >&5
6393   rm -rf conftest*
6394   eval "ac_cv_func_$ac_func=no"
6395 fi
6396 rm -f conftest*
6397 fi
6398
6399 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6400   echo "$ac_t""yes" 1>&6
6401     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6402   cat >> confdefs.h <<EOF
6403 #define $ac_tr_func 1
6404 EOF
6405  
6406 else
6407   echo "$ac_t""no" 1>&6
6408 fi
6409 done
6410
6411 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6412 do
6413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6414 echo "configure:6415: checking for $ac_func" >&5
6415 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6416   echo $ac_n "(cached) $ac_c" 1>&6
6417 else
6418   cat > conftest.$ac_ext <<EOF
6419 #line 6420 "configure"
6420 #include "confdefs.h"
6421 /* System header to define __stub macros and hopefully few prototypes,
6422     which can conflict with char $ac_func(); below.  */
6423 #include <assert.h>
6424 /* Override any gcc2 internal prototype to avoid an error.  */
6425 /* We use char because int might match the return type of a gcc2
6426     builtin and then its argument prototype would still apply.  */
6427 char $ac_func();
6428
6429 int main() {
6430
6431 /* The GNU C library defines this for functions which it implements
6432     to always fail with ENOSYS.  Some functions are actually named
6433     something starting with __ and the normal name is an alias.  */
6434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6435 choke me
6436 #else
6437 $ac_func();
6438 #endif
6439
6440 ; return 0; }
6441 EOF
6442 if { (eval echo configure:6443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6443   rm -rf conftest*
6444   eval "ac_cv_func_$ac_func=yes"
6445 else
6446   echo "configure: failed program was:" >&5
6447   cat conftest.$ac_ext >&5
6448   rm -rf conftest*
6449   eval "ac_cv_func_$ac_func=no"
6450 fi
6451 rm -f conftest*
6452 fi
6453
6454 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6455   echo "$ac_t""yes" 1>&6
6456     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6457   cat >> confdefs.h <<EOF
6458 #define $ac_tr_func 1
6459 EOF
6460  
6461 else
6462   echo "$ac_t""no" 1>&6
6463 fi
6464 done
6465
6466 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6467 do
6468 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6469 echo "configure:6470: checking for $ac_func" >&5
6470 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6471   echo $ac_n "(cached) $ac_c" 1>&6
6472 else
6473   cat > conftest.$ac_ext <<EOF
6474 #line 6475 "configure"
6475 #include "confdefs.h"
6476 /* System header to define __stub macros and hopefully few prototypes,
6477     which can conflict with char $ac_func(); below.  */
6478 #include <assert.h>
6479 /* Override any gcc2 internal prototype to avoid an error.  */
6480 /* We use char because int might match the return type of a gcc2
6481     builtin and then its argument prototype would still apply.  */
6482 char $ac_func();
6483
6484 int main() {
6485
6486 /* The GNU C library defines this for functions which it implements
6487     to always fail with ENOSYS.  Some functions are actually named
6488     something starting with __ and the normal name is an alias.  */
6489 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6490 choke me
6491 #else
6492 $ac_func();
6493 #endif
6494
6495 ; return 0; }
6496 EOF
6497 if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6498   rm -rf conftest*
6499   eval "ac_cv_func_$ac_func=yes"
6500 else
6501   echo "configure: failed program was:" >&5
6502   cat conftest.$ac_ext >&5
6503   rm -rf conftest*
6504   eval "ac_cv_func_$ac_func=no"
6505 fi
6506 rm -f conftest*
6507 fi
6508
6509 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6510   echo "$ac_t""yes" 1>&6
6511     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6512   cat >> confdefs.h <<EOF
6513 #define $ac_tr_func 1
6514 EOF
6515  
6516 else
6517   echo "$ac_t""no" 1>&6
6518 fi
6519 done
6520
6521 for ac_func in open64 _open64 __open64 creat64
6522 do
6523 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6524 echo "configure:6525: checking for $ac_func" >&5
6525 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6526   echo $ac_n "(cached) $ac_c" 1>&6
6527 else
6528   cat > conftest.$ac_ext <<EOF
6529 #line 6530 "configure"
6530 #include "confdefs.h"
6531 /* System header to define __stub macros and hopefully few prototypes,
6532     which can conflict with char $ac_func(); below.  */
6533 #include <assert.h>
6534 /* Override any gcc2 internal prototype to avoid an error.  */
6535 /* We use char because int might match the return type of a gcc2
6536     builtin and then its argument prototype would still apply.  */
6537 char $ac_func();
6538
6539 int main() {
6540
6541 /* The GNU C library defines this for functions which it implements
6542     to always fail with ENOSYS.  Some functions are actually named
6543     something starting with __ and the normal name is an alias.  */
6544 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6545 choke me
6546 #else
6547 $ac_func();
6548 #endif
6549
6550 ; return 0; }
6551 EOF
6552 if { (eval echo configure:6553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6553   rm -rf conftest*
6554   eval "ac_cv_func_$ac_func=yes"
6555 else
6556   echo "configure: failed program was:" >&5
6557   cat conftest.$ac_ext >&5
6558   rm -rf conftest*
6559   eval "ac_cv_func_$ac_func=no"
6560 fi
6561 rm -f conftest*
6562 fi
6563
6564 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6565   echo "$ac_t""yes" 1>&6
6566     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6567   cat >> confdefs.h <<EOF
6568 #define $ac_tr_func 1
6569 EOF
6570  
6571 else
6572   echo "$ac_t""no" 1>&6
6573 fi
6574 done
6575
6576
6577 #
6578 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6579 #
6580
6581 if test x$ac_cv_func_stat64 = xno ; then
6582   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6583 echo "configure:6584: checking for stat64 in <sys/stat.h>" >&5
6584   cat > conftest.$ac_ext <<EOF
6585 #line 6586 "configure"
6586 #include "confdefs.h"
6587
6588 #if defined(HAVE_UNISTD_H)
6589 #include <unistd.h>
6590 #endif
6591 #include <sys/stat.h>
6592
6593 int main() {
6594 struct stat64 st64; exit(stat64(".",&st64));
6595 ; return 0; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6598   rm -rf conftest*
6599   ac_cv_func_stat64=yes
6600 else
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603 fi
6604 rm -f conftest*
6605   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6606   if test x$ac_cv_func_stat64 = xyes ; then
6607     cat >> confdefs.h <<\EOF
6608 #define HAVE_STAT64 1
6609 EOF
6610
6611   fi
6612 fi
6613
6614 if test x$ac_cv_func_lstat64 = xno ; then
6615   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6616 echo "configure:6617: checking for lstat64 in <sys/stat.h>" >&5
6617   cat > conftest.$ac_ext <<EOF
6618 #line 6619 "configure"
6619 #include "confdefs.h"
6620
6621 #if defined(HAVE_UNISTD_H)
6622 #include <unistd.h>
6623 #endif
6624 #include <sys/stat.h>
6625
6626 int main() {
6627 struct stat64 st64; exit(lstat64(".",&st64));
6628 ; return 0; }
6629 EOF
6630 if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6631   rm -rf conftest*
6632   ac_cv_func_lstat64=yes
6633 else
6634   echo "configure: failed program was:" >&5
6635   cat conftest.$ac_ext >&5
6636 fi
6637 rm -f conftest*
6638   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6639   if test x$ac_cv_func_lstat64 = xyes ; then
6640     cat >> confdefs.h <<\EOF
6641 #define HAVE_LSTAT64 1
6642 EOF
6643
6644   fi
6645 fi
6646
6647 if test x$ac_cv_func_fstat64 = xno ; then
6648   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6649 echo "configure:6650: checking for fstat64 in <sys/stat.h>" >&5
6650   cat > conftest.$ac_ext <<EOF
6651 #line 6652 "configure"
6652 #include "confdefs.h"
6653
6654 #if defined(HAVE_UNISTD_H)
6655 #include <unistd.h>
6656 #endif
6657 #include <sys/stat.h>
6658
6659 int main() {
6660 struct stat64 st64; exit(fstat64(0,&st64));
6661 ; return 0; }
6662 EOF
6663 if { (eval echo configure:6664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6664   rm -rf conftest*
6665   ac_cv_func_fstat64=yes
6666 else
6667   echo "configure: failed program was:" >&5
6668   cat conftest.$ac_ext >&5
6669 fi
6670 rm -f conftest*
6671   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6672   if test x$ac_cv_func_fstat64 = xyes ; then
6673     cat >> confdefs.h <<\EOF
6674 #define HAVE_FSTAT64 1
6675 EOF
6676
6677   fi
6678 fi
6679
6680 #####################################
6681 # we might need the resolv library on some systems
6682 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6683 echo "configure:6684: checking for dn_expand in -lresolv" >&5
6684 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6685 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6686   echo $ac_n "(cached) $ac_c" 1>&6
6687 else
6688   ac_save_LIBS="$LIBS"
6689 LIBS="-lresolv  $LIBS"
6690 cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693 /* Override any gcc2 internal prototype to avoid an error.  */
6694 /* We use char because int might match the return type of a gcc2
6695     builtin and then its argument prototype would still apply.  */
6696 char dn_expand();
6697
6698 int main() {
6699 dn_expand()
6700 ; return 0; }
6701 EOF
6702 if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6703   rm -rf conftest*
6704   eval "ac_cv_lib_$ac_lib_var=yes"
6705 else
6706   echo "configure: failed program was:" >&5
6707   cat conftest.$ac_ext >&5
6708   rm -rf conftest*
6709   eval "ac_cv_lib_$ac_lib_var=no"
6710 fi
6711 rm -f conftest*
6712 LIBS="$ac_save_LIBS"
6713
6714 fi
6715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6716   echo "$ac_t""yes" 1>&6
6717     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6718     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6719   cat >> confdefs.h <<EOF
6720 #define $ac_tr_lib 1
6721 EOF
6722
6723   LIBS="-lresolv $LIBS"
6724
6725 else
6726   echo "$ac_t""no" 1>&6
6727 fi
6728
6729
6730 #
6731 # Check for the functions putprpwnam, set_auth_parameters,
6732 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6733 # Needed for OSF1 and HPUX.
6734 #
6735
6736 case "$LIBS" in
6737   *-lsecurity*) for ac_func in putprpwnam
6738 do
6739 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6740 echo "configure:6741: checking for $ac_func" >&5
6741 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6742   echo $ac_n "(cached) $ac_c" 1>&6
6743 else
6744   cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 /* System header to define __stub macros and hopefully few prototypes,
6748     which can conflict with char $ac_func(); below.  */
6749 #include <assert.h>
6750 /* Override any gcc2 internal prototype to avoid an error.  */
6751 /* We use char because int might match the return type of a gcc2
6752     builtin and then its argument prototype would still apply.  */
6753 char $ac_func();
6754
6755 int main() {
6756
6757 /* The GNU C library defines this for functions which it implements
6758     to always fail with ENOSYS.  Some functions are actually named
6759     something starting with __ and the normal name is an alias.  */
6760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6761 choke me
6762 #else
6763 $ac_func();
6764 #endif
6765
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769   rm -rf conftest*
6770   eval "ac_cv_func_$ac_func=yes"
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   eval "ac_cv_func_$ac_func=no"
6776 fi
6777 rm -f conftest*
6778 fi
6779
6780 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6781   echo "$ac_t""yes" 1>&6
6782     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6783   cat >> confdefs.h <<EOF
6784 #define $ac_tr_func 1
6785 EOF
6786  
6787 else
6788   echo "$ac_t""no" 1>&6
6789 fi
6790 done
6791  ;;
6792   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6793 echo "configure:6794: checking for putprpwnam in -lsecurity" >&5
6794 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6795 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6796   echo $ac_n "(cached) $ac_c" 1>&6
6797 else
6798   ac_save_LIBS="$LIBS"
6799 LIBS="-lsecurity  $LIBS"
6800 cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 /* Override any gcc2 internal prototype to avoid an error.  */
6804 /* We use char because int might match the return type of a gcc2
6805     builtin and then its argument prototype would still apply.  */
6806 char putprpwnam();
6807
6808 int main() {
6809 putprpwnam()
6810 ; return 0; }
6811 EOF
6812 if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6813   rm -rf conftest*
6814   eval "ac_cv_lib_$ac_lib_var=yes"
6815 else
6816   echo "configure: failed program was:" >&5
6817   cat conftest.$ac_ext >&5
6818   rm -rf conftest*
6819   eval "ac_cv_lib_$ac_lib_var=no"
6820 fi
6821 rm -f conftest*
6822 LIBS="$ac_save_LIBS"
6823
6824 fi
6825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6826   echo "$ac_t""yes" 1>&6
6827     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6828     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6829   cat >> confdefs.h <<EOF
6830 #define $ac_tr_lib 1
6831 EOF
6832
6833   LIBS="-lsecurity $LIBS"
6834
6835 else
6836   echo "$ac_t""no" 1>&6
6837 fi
6838  
6839      for ac_func in putprpwnam
6840 do
6841 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6842 echo "configure:6843: checking for $ac_func" >&5
6843 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6844   echo $ac_n "(cached) $ac_c" 1>&6
6845 else
6846   cat > conftest.$ac_ext <<EOF
6847 #line 6848 "configure"
6848 #include "confdefs.h"
6849 /* System header to define __stub macros and hopefully few prototypes,
6850     which can conflict with char $ac_func(); below.  */
6851 #include <assert.h>
6852 /* Override any gcc2 internal prototype to avoid an error.  */
6853 /* We use char because int might match the return type of a gcc2
6854     builtin and then its argument prototype would still apply.  */
6855 char $ac_func();
6856
6857 int main() {
6858
6859 /* The GNU C library defines this for functions which it implements
6860     to always fail with ENOSYS.  Some functions are actually named
6861     something starting with __ and the normal name is an alias.  */
6862 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6863 choke me
6864 #else
6865 $ac_func();
6866 #endif
6867
6868 ; return 0; }
6869 EOF
6870 if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6871   rm -rf conftest*
6872   eval "ac_cv_func_$ac_func=yes"
6873 else
6874   echo "configure: failed program was:" >&5
6875   cat conftest.$ac_ext >&5
6876   rm -rf conftest*
6877   eval "ac_cv_func_$ac_func=no"
6878 fi
6879 rm -f conftest*
6880 fi
6881
6882 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6883   echo "$ac_t""yes" 1>&6
6884     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6885   cat >> confdefs.h <<EOF
6886 #define $ac_tr_func 1
6887 EOF
6888  
6889 else
6890   echo "$ac_t""no" 1>&6
6891 fi
6892 done
6893
6894   ;;
6895   esac
6896
6897 case "$LIBS" in
6898   *-lsec*) for ac_func in putprpwnam
6899 do
6900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6901 echo "configure:6902: checking for $ac_func" >&5
6902 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905   cat > conftest.$ac_ext <<EOF
6906 #line 6907 "configure"
6907 #include "confdefs.h"
6908 /* System header to define __stub macros and hopefully few prototypes,
6909     which can conflict with char $ac_func(); below.  */
6910 #include <assert.h>
6911 /* Override any gcc2 internal prototype to avoid an error.  */
6912 /* We use char because int might match the return type of a gcc2
6913     builtin and then its argument prototype would still apply.  */
6914 char $ac_func();
6915
6916 int main() {
6917
6918 /* The GNU C library defines this for functions which it implements
6919     to always fail with ENOSYS.  Some functions are actually named
6920     something starting with __ and the normal name is an alias.  */
6921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6922 choke me
6923 #else
6924 $ac_func();
6925 #endif
6926
6927 ; return 0; }
6928 EOF
6929 if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6930   rm -rf conftest*
6931   eval "ac_cv_func_$ac_func=yes"
6932 else
6933   echo "configure: failed program was:" >&5
6934   cat conftest.$ac_ext >&5
6935   rm -rf conftest*
6936   eval "ac_cv_func_$ac_func=no"
6937 fi
6938 rm -f conftest*
6939 fi
6940
6941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6942   echo "$ac_t""yes" 1>&6
6943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6944   cat >> confdefs.h <<EOF
6945 #define $ac_tr_func 1
6946 EOF
6947  
6948 else
6949   echo "$ac_t""no" 1>&6
6950 fi
6951 done
6952  ;;
6953   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6954 echo "configure:6955: checking for putprpwnam in -lsec" >&5
6955 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6957   echo $ac_n "(cached) $ac_c" 1>&6
6958 else
6959   ac_save_LIBS="$LIBS"
6960 LIBS="-lsec  $LIBS"
6961 cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964 /* Override any gcc2 internal prototype to avoid an error.  */
6965 /* We use char because int might match the return type of a gcc2
6966     builtin and then its argument prototype would still apply.  */
6967 char putprpwnam();
6968
6969 int main() {
6970 putprpwnam()
6971 ; return 0; }
6972 EOF
6973 if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6974   rm -rf conftest*
6975   eval "ac_cv_lib_$ac_lib_var=yes"
6976 else
6977   echo "configure: failed program was:" >&5
6978   cat conftest.$ac_ext >&5
6979   rm -rf conftest*
6980   eval "ac_cv_lib_$ac_lib_var=no"
6981 fi
6982 rm -f conftest*
6983 LIBS="$ac_save_LIBS"
6984
6985 fi
6986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6987   echo "$ac_t""yes" 1>&6
6988     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6990   cat >> confdefs.h <<EOF
6991 #define $ac_tr_lib 1
6992 EOF
6993
6994   LIBS="-lsec $LIBS"
6995
6996 else
6997   echo "$ac_t""no" 1>&6
6998 fi
6999  
7000      for ac_func in putprpwnam
7001 do
7002 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7003 echo "configure:7004: checking for $ac_func" >&5
7004 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7005   echo $ac_n "(cached) $ac_c" 1>&6
7006 else
7007   cat > conftest.$ac_ext <<EOF
7008 #line 7009 "configure"
7009 #include "confdefs.h"
7010 /* System header to define __stub macros and hopefully few prototypes,
7011     which can conflict with char $ac_func(); below.  */
7012 #include <assert.h>
7013 /* Override any gcc2 internal prototype to avoid an error.  */
7014 /* We use char because int might match the return type of a gcc2
7015     builtin and then its argument prototype would still apply.  */
7016 char $ac_func();
7017
7018 int main() {
7019
7020 /* The GNU C library defines this for functions which it implements
7021     to always fail with ENOSYS.  Some functions are actually named
7022     something starting with __ and the normal name is an alias.  */
7023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7024 choke me
7025 #else
7026 $ac_func();
7027 #endif
7028
7029 ; return 0; }
7030 EOF
7031 if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7032   rm -rf conftest*
7033   eval "ac_cv_func_$ac_func=yes"
7034 else
7035   echo "configure: failed program was:" >&5
7036   cat conftest.$ac_ext >&5
7037   rm -rf conftest*
7038   eval "ac_cv_func_$ac_func=no"
7039 fi
7040 rm -f conftest*
7041 fi
7042
7043 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7044   echo "$ac_t""yes" 1>&6
7045     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7046   cat >> confdefs.h <<EOF
7047 #define $ac_tr_func 1
7048 EOF
7049  
7050 else
7051   echo "$ac_t""no" 1>&6
7052 fi
7053 done
7054
7055   ;;
7056   esac
7057
7058
7059 case "$LIBS" in
7060   *-lsecurity*) for ac_func in set_auth_parameters
7061 do
7062 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7063 echo "configure:7064: checking for $ac_func" >&5
7064 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7065   echo $ac_n "(cached) $ac_c" 1>&6
7066 else
7067   cat > conftest.$ac_ext <<EOF
7068 #line 7069 "configure"
7069 #include "confdefs.h"
7070 /* System header to define __stub macros and hopefully few prototypes,
7071     which can conflict with char $ac_func(); below.  */
7072 #include <assert.h>
7073 /* Override any gcc2 internal prototype to avoid an error.  */
7074 /* We use char because int might match the return type of a gcc2
7075     builtin and then its argument prototype would still apply.  */
7076 char $ac_func();
7077
7078 int main() {
7079
7080 /* The GNU C library defines this for functions which it implements
7081     to always fail with ENOSYS.  Some functions are actually named
7082     something starting with __ and the normal name is an alias.  */
7083 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7084 choke me
7085 #else
7086 $ac_func();
7087 #endif
7088
7089 ; return 0; }
7090 EOF
7091 if { (eval echo configure:7092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7092   rm -rf conftest*
7093   eval "ac_cv_func_$ac_func=yes"
7094 else
7095   echo "configure: failed program was:" >&5
7096   cat conftest.$ac_ext >&5
7097   rm -rf conftest*
7098   eval "ac_cv_func_$ac_func=no"
7099 fi
7100 rm -f conftest*
7101 fi
7102
7103 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7104   echo "$ac_t""yes" 1>&6
7105     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7106   cat >> confdefs.h <<EOF
7107 #define $ac_tr_func 1
7108 EOF
7109  
7110 else
7111   echo "$ac_t""no" 1>&6
7112 fi
7113 done
7114  ;;
7115   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7116 echo "configure:7117: checking for set_auth_parameters in -lsecurity" >&5
7117 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7118 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7119   echo $ac_n "(cached) $ac_c" 1>&6
7120 else
7121   ac_save_LIBS="$LIBS"
7122 LIBS="-lsecurity  $LIBS"
7123 cat > conftest.$ac_ext <<EOF
7124 #line 7125 "configure"
7125 #include "confdefs.h"
7126 /* Override any gcc2 internal prototype to avoid an error.  */
7127 /* We use char because int might match the return type of a gcc2
7128     builtin and then its argument prototype would still apply.  */
7129 char set_auth_parameters();
7130
7131 int main() {
7132 set_auth_parameters()
7133 ; return 0; }
7134 EOF
7135 if { (eval echo configure:7136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7136   rm -rf conftest*
7137   eval "ac_cv_lib_$ac_lib_var=yes"
7138 else
7139   echo "configure: failed program was:" >&5
7140   cat conftest.$ac_ext >&5
7141   rm -rf conftest*
7142   eval "ac_cv_lib_$ac_lib_var=no"
7143 fi
7144 rm -f conftest*
7145 LIBS="$ac_save_LIBS"
7146
7147 fi
7148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7149   echo "$ac_t""yes" 1>&6
7150     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7151     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7152   cat >> confdefs.h <<EOF
7153 #define $ac_tr_lib 1
7154 EOF
7155
7156   LIBS="-lsecurity $LIBS"
7157
7158 else
7159   echo "$ac_t""no" 1>&6
7160 fi
7161  
7162      for ac_func in set_auth_parameters
7163 do
7164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7165 echo "configure:7166: checking for $ac_func" >&5
7166 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7167   echo $ac_n "(cached) $ac_c" 1>&6
7168 else
7169   cat > conftest.$ac_ext <<EOF
7170 #line 7171 "configure"
7171 #include "confdefs.h"
7172 /* System header to define __stub macros and hopefully few prototypes,
7173     which can conflict with char $ac_func(); below.  */
7174 #include <assert.h>
7175 /* Override any gcc2 internal prototype to avoid an error.  */
7176 /* We use char because int might match the return type of a gcc2
7177     builtin and then its argument prototype would still apply.  */
7178 char $ac_func();
7179
7180 int main() {
7181
7182 /* The GNU C library defines this for functions which it implements
7183     to always fail with ENOSYS.  Some functions are actually named
7184     something starting with __ and the normal name is an alias.  */
7185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7186 choke me
7187 #else
7188 $ac_func();
7189 #endif
7190
7191 ; return 0; }
7192 EOF
7193 if { (eval echo configure:7194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7194   rm -rf conftest*
7195   eval "ac_cv_func_$ac_func=yes"
7196 else
7197   echo "configure: failed program was:" >&5
7198   cat conftest.$ac_ext >&5
7199   rm -rf conftest*
7200   eval "ac_cv_func_$ac_func=no"
7201 fi
7202 rm -f conftest*
7203 fi
7204
7205 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7206   echo "$ac_t""yes" 1>&6
7207     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7208   cat >> confdefs.h <<EOF
7209 #define $ac_tr_func 1
7210 EOF
7211  
7212 else
7213   echo "$ac_t""no" 1>&6
7214 fi
7215 done
7216
7217   ;;
7218   esac
7219
7220 case "$LIBS" in
7221   *-lsec*) for ac_func in set_auth_parameters
7222 do
7223 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7224 echo "configure:7225: checking for $ac_func" >&5
7225 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7226   echo $ac_n "(cached) $ac_c" 1>&6
7227 else
7228   cat > conftest.$ac_ext <<EOF
7229 #line 7230 "configure"
7230 #include "confdefs.h"
7231 /* System header to define __stub macros and hopefully few prototypes,
7232     which can conflict with char $ac_func(); below.  */
7233 #include <assert.h>
7234 /* Override any gcc2 internal prototype to avoid an error.  */
7235 /* We use char because int might match the return type of a gcc2
7236     builtin and then its argument prototype would still apply.  */
7237 char $ac_func();
7238
7239 int main() {
7240
7241 /* The GNU C library defines this for functions which it implements
7242     to always fail with ENOSYS.  Some functions are actually named
7243     something starting with __ and the normal name is an alias.  */
7244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7245 choke me
7246 #else
7247 $ac_func();
7248 #endif
7249
7250 ; return 0; }
7251 EOF
7252 if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7253   rm -rf conftest*
7254   eval "ac_cv_func_$ac_func=yes"
7255 else
7256   echo "configure: failed program was:" >&5
7257   cat conftest.$ac_ext >&5
7258   rm -rf conftest*
7259   eval "ac_cv_func_$ac_func=no"
7260 fi
7261 rm -f conftest*
7262 fi
7263
7264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7265   echo "$ac_t""yes" 1>&6
7266     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7267   cat >> confdefs.h <<EOF
7268 #define $ac_tr_func 1
7269 EOF
7270  
7271 else
7272   echo "$ac_t""no" 1>&6
7273 fi
7274 done
7275  ;;
7276   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7277 echo "configure:7278: checking for set_auth_parameters in -lsec" >&5
7278 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7279 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7280   echo $ac_n "(cached) $ac_c" 1>&6
7281 else
7282   ac_save_LIBS="$LIBS"
7283 LIBS="-lsec  $LIBS"
7284 cat > conftest.$ac_ext <<EOF
7285 #line 7286 "configure"
7286 #include "confdefs.h"
7287 /* Override any gcc2 internal prototype to avoid an error.  */
7288 /* We use char because int might match the return type of a gcc2
7289     builtin and then its argument prototype would still apply.  */
7290 char set_auth_parameters();
7291
7292 int main() {
7293 set_auth_parameters()
7294 ; return 0; }
7295 EOF
7296 if { (eval echo configure:7297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7297   rm -rf conftest*
7298   eval "ac_cv_lib_$ac_lib_var=yes"
7299 else
7300   echo "configure: failed program was:" >&5
7301   cat conftest.$ac_ext >&5
7302   rm -rf conftest*
7303   eval "ac_cv_lib_$ac_lib_var=no"
7304 fi
7305 rm -f conftest*
7306 LIBS="$ac_save_LIBS"
7307
7308 fi
7309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7310   echo "$ac_t""yes" 1>&6
7311     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7312     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7313   cat >> confdefs.h <<EOF
7314 #define $ac_tr_lib 1
7315 EOF
7316
7317   LIBS="-lsec $LIBS"
7318
7319 else
7320   echo "$ac_t""no" 1>&6
7321 fi
7322  
7323      for ac_func in set_auth_parameters
7324 do
7325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7326 echo "configure:7327: checking for $ac_func" >&5
7327 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7328   echo $ac_n "(cached) $ac_c" 1>&6
7329 else
7330   cat > conftest.$ac_ext <<EOF
7331 #line 7332 "configure"
7332 #include "confdefs.h"
7333 /* System header to define __stub macros and hopefully few prototypes,
7334     which can conflict with char $ac_func(); below.  */
7335 #include <assert.h>
7336 /* Override any gcc2 internal prototype to avoid an error.  */
7337 /* We use char because int might match the return type of a gcc2
7338     builtin and then its argument prototype would still apply.  */
7339 char $ac_func();
7340
7341 int main() {
7342
7343 /* The GNU C library defines this for functions which it implements
7344     to always fail with ENOSYS.  Some functions are actually named
7345     something starting with __ and the normal name is an alias.  */
7346 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7347 choke me
7348 #else
7349 $ac_func();
7350 #endif
7351
7352 ; return 0; }
7353 EOF
7354 if { (eval echo configure:7355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7355   rm -rf conftest*
7356   eval "ac_cv_func_$ac_func=yes"
7357 else
7358   echo "configure: failed program was:" >&5
7359   cat conftest.$ac_ext >&5
7360   rm -rf conftest*
7361   eval "ac_cv_func_$ac_func=no"
7362 fi
7363 rm -f conftest*
7364 fi
7365
7366 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7367   echo "$ac_t""yes" 1>&6
7368     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7369   cat >> confdefs.h <<EOF
7370 #define $ac_tr_func 1
7371 EOF
7372  
7373 else
7374   echo "$ac_t""no" 1>&6
7375 fi
7376 done
7377
7378   ;;
7379   esac
7380
7381
7382 # UnixWare 7.x has its getspnam in -lgen
7383 case "$LIBS" in
7384   *-lgen*) for ac_func in getspnam
7385 do
7386 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7387 echo "configure:7388: checking for $ac_func" >&5
7388 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7389   echo $ac_n "(cached) $ac_c" 1>&6
7390 else
7391   cat > conftest.$ac_ext <<EOF
7392 #line 7393 "configure"
7393 #include "confdefs.h"
7394 /* System header to define __stub macros and hopefully few prototypes,
7395     which can conflict with char $ac_func(); below.  */
7396 #include <assert.h>
7397 /* Override any gcc2 internal prototype to avoid an error.  */
7398 /* We use char because int might match the return type of a gcc2
7399     builtin and then its argument prototype would still apply.  */
7400 char $ac_func();
7401
7402 int main() {
7403
7404 /* The GNU C library defines this for functions which it implements
7405     to always fail with ENOSYS.  Some functions are actually named
7406     something starting with __ and the normal name is an alias.  */
7407 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7408 choke me
7409 #else
7410 $ac_func();
7411 #endif
7412
7413 ; return 0; }
7414 EOF
7415 if { (eval echo configure:7416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7416   rm -rf conftest*
7417   eval "ac_cv_func_$ac_func=yes"
7418 else
7419   echo "configure: failed program was:" >&5
7420   cat conftest.$ac_ext >&5
7421   rm -rf conftest*
7422   eval "ac_cv_func_$ac_func=no"
7423 fi
7424 rm -f conftest*
7425 fi
7426
7427 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7428   echo "$ac_t""yes" 1>&6
7429     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7430   cat >> confdefs.h <<EOF
7431 #define $ac_tr_func 1
7432 EOF
7433  
7434 else
7435   echo "$ac_t""no" 1>&6
7436 fi
7437 done
7438  ;;
7439   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7440 echo "configure:7441: checking for getspnam in -lgen" >&5
7441 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7442 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7443   echo $ac_n "(cached) $ac_c" 1>&6
7444 else
7445   ac_save_LIBS="$LIBS"
7446 LIBS="-lgen  $LIBS"
7447 cat > conftest.$ac_ext <<EOF
7448 #line 7449 "configure"
7449 #include "confdefs.h"
7450 /* Override any gcc2 internal prototype to avoid an error.  */
7451 /* We use char because int might match the return type of a gcc2
7452     builtin and then its argument prototype would still apply.  */
7453 char getspnam();
7454
7455 int main() {
7456 getspnam()
7457 ; return 0; }
7458 EOF
7459 if { (eval echo configure:7460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7460   rm -rf conftest*
7461   eval "ac_cv_lib_$ac_lib_var=yes"
7462 else
7463   echo "configure: failed program was:" >&5
7464   cat conftest.$ac_ext >&5
7465   rm -rf conftest*
7466   eval "ac_cv_lib_$ac_lib_var=no"
7467 fi
7468 rm -f conftest*
7469 LIBS="$ac_save_LIBS"
7470
7471 fi
7472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7473   echo "$ac_t""yes" 1>&6
7474     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7475     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7476   cat >> confdefs.h <<EOF
7477 #define $ac_tr_lib 1
7478 EOF
7479
7480   LIBS="-lgen $LIBS"
7481
7482 else
7483   echo "$ac_t""no" 1>&6
7484 fi
7485  
7486      for ac_func in getspnam
7487 do
7488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7489 echo "configure:7490: checking for $ac_func" >&5
7490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7491   echo $ac_n "(cached) $ac_c" 1>&6
7492 else
7493   cat > conftest.$ac_ext <<EOF
7494 #line 7495 "configure"
7495 #include "confdefs.h"
7496 /* System header to define __stub macros and hopefully few prototypes,
7497     which can conflict with char $ac_func(); below.  */
7498 #include <assert.h>
7499 /* Override any gcc2 internal prototype to avoid an error.  */
7500 /* We use char because int might match the return type of a gcc2
7501     builtin and then its argument prototype would still apply.  */
7502 char $ac_func();
7503
7504 int main() {
7505
7506 /* The GNU C library defines this for functions which it implements
7507     to always fail with ENOSYS.  Some functions are actually named
7508     something starting with __ and the normal name is an alias.  */
7509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7510 choke me
7511 #else
7512 $ac_func();
7513 #endif
7514
7515 ; return 0; }
7516 EOF
7517 if { (eval echo configure:7518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7518   rm -rf conftest*
7519   eval "ac_cv_func_$ac_func=yes"
7520 else
7521   echo "configure: failed program was:" >&5
7522   cat conftest.$ac_ext >&5
7523   rm -rf conftest*
7524   eval "ac_cv_func_$ac_func=no"
7525 fi
7526 rm -f conftest*
7527 fi
7528
7529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7530   echo "$ac_t""yes" 1>&6
7531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7532   cat >> confdefs.h <<EOF
7533 #define $ac_tr_func 1
7534 EOF
7535  
7536 else
7537   echo "$ac_t""no" 1>&6
7538 fi
7539 done
7540
7541   ;;
7542   esac
7543
7544
7545 case "$LIBS" in
7546   *-lsecurity*) for ac_func in getspnam
7547 do
7548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7549 echo "configure:7550: checking for $ac_func" >&5
7550 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7551   echo $ac_n "(cached) $ac_c" 1>&6
7552 else
7553   cat > conftest.$ac_ext <<EOF
7554 #line 7555 "configure"
7555 #include "confdefs.h"
7556 /* System header to define __stub macros and hopefully few prototypes,
7557     which can conflict with char $ac_func(); below.  */
7558 #include <assert.h>
7559 /* Override any gcc2 internal prototype to avoid an error.  */
7560 /* We use char because int might match the return type of a gcc2
7561     builtin and then its argument prototype would still apply.  */
7562 char $ac_func();
7563
7564 int main() {
7565
7566 /* The GNU C library defines this for functions which it implements
7567     to always fail with ENOSYS.  Some functions are actually named
7568     something starting with __ and the normal name is an alias.  */
7569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7570 choke me
7571 #else
7572 $ac_func();
7573 #endif
7574
7575 ; return 0; }
7576 EOF
7577 if { (eval echo configure:7578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7578   rm -rf conftest*
7579   eval "ac_cv_func_$ac_func=yes"
7580 else
7581   echo "configure: failed program was:" >&5
7582   cat conftest.$ac_ext >&5
7583   rm -rf conftest*
7584   eval "ac_cv_func_$ac_func=no"
7585 fi
7586 rm -f conftest*
7587 fi
7588
7589 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7590   echo "$ac_t""yes" 1>&6
7591     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7592   cat >> confdefs.h <<EOF
7593 #define $ac_tr_func 1
7594 EOF
7595  
7596 else
7597   echo "$ac_t""no" 1>&6
7598 fi
7599 done
7600  ;;
7601   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7602 echo "configure:7603: checking for getspnam in -lsecurity" >&5
7603 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7605   echo $ac_n "(cached) $ac_c" 1>&6
7606 else
7607   ac_save_LIBS="$LIBS"
7608 LIBS="-lsecurity  $LIBS"
7609 cat > conftest.$ac_ext <<EOF
7610 #line 7611 "configure"
7611 #include "confdefs.h"
7612 /* Override any gcc2 internal prototype to avoid an error.  */
7613 /* We use char because int might match the return type of a gcc2
7614     builtin and then its argument prototype would still apply.  */
7615 char getspnam();
7616
7617 int main() {
7618 getspnam()
7619 ; return 0; }
7620 EOF
7621 if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7622   rm -rf conftest*
7623   eval "ac_cv_lib_$ac_lib_var=yes"
7624 else
7625   echo "configure: failed program was:" >&5
7626   cat conftest.$ac_ext >&5
7627   rm -rf conftest*
7628   eval "ac_cv_lib_$ac_lib_var=no"
7629 fi
7630 rm -f conftest*
7631 LIBS="$ac_save_LIBS"
7632
7633 fi
7634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7635   echo "$ac_t""yes" 1>&6
7636     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7637     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7638   cat >> confdefs.h <<EOF
7639 #define $ac_tr_lib 1
7640 EOF
7641
7642   LIBS="-lsecurity $LIBS"
7643
7644 else
7645   echo "$ac_t""no" 1>&6
7646 fi
7647  
7648      for ac_func in getspnam
7649 do
7650 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7651 echo "configure:7652: checking for $ac_func" >&5
7652 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7653   echo $ac_n "(cached) $ac_c" 1>&6
7654 else
7655   cat > conftest.$ac_ext <<EOF
7656 #line 7657 "configure"
7657 #include "confdefs.h"
7658 /* System header to define __stub macros and hopefully few prototypes,
7659     which can conflict with char $ac_func(); below.  */
7660 #include <assert.h>
7661 /* Override any gcc2 internal prototype to avoid an error.  */
7662 /* We use char because int might match the return type of a gcc2
7663     builtin and then its argument prototype would still apply.  */
7664 char $ac_func();
7665
7666 int main() {
7667
7668 /* The GNU C library defines this for functions which it implements
7669     to always fail with ENOSYS.  Some functions are actually named
7670     something starting with __ and the normal name is an alias.  */
7671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7672 choke me
7673 #else
7674 $ac_func();
7675 #endif
7676
7677 ; return 0; }
7678 EOF
7679 if { (eval echo configure:7680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7680   rm -rf conftest*
7681   eval "ac_cv_func_$ac_func=yes"
7682 else
7683   echo "configure: failed program was:" >&5
7684   cat conftest.$ac_ext >&5
7685   rm -rf conftest*
7686   eval "ac_cv_func_$ac_func=no"
7687 fi
7688 rm -f conftest*
7689 fi
7690
7691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7692   echo "$ac_t""yes" 1>&6
7693     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7694   cat >> confdefs.h <<EOF
7695 #define $ac_tr_func 1
7696 EOF
7697  
7698 else
7699   echo "$ac_t""no" 1>&6
7700 fi
7701 done
7702
7703   ;;
7704   esac
7705
7706 case "$LIBS" in
7707   *-lsec*) for ac_func in getspnam
7708 do
7709 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7710 echo "configure:7711: checking for $ac_func" >&5
7711 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7712   echo $ac_n "(cached) $ac_c" 1>&6
7713 else
7714   cat > conftest.$ac_ext <<EOF
7715 #line 7716 "configure"
7716 #include "confdefs.h"
7717 /* System header to define __stub macros and hopefully few prototypes,
7718     which can conflict with char $ac_func(); below.  */
7719 #include <assert.h>
7720 /* Override any gcc2 internal prototype to avoid an error.  */
7721 /* We use char because int might match the return type of a gcc2
7722     builtin and then its argument prototype would still apply.  */
7723 char $ac_func();
7724
7725 int main() {
7726
7727 /* The GNU C library defines this for functions which it implements
7728     to always fail with ENOSYS.  Some functions are actually named
7729     something starting with __ and the normal name is an alias.  */
7730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7731 choke me
7732 #else
7733 $ac_func();
7734 #endif
7735
7736 ; return 0; }
7737 EOF
7738 if { (eval echo configure:7739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7739   rm -rf conftest*
7740   eval "ac_cv_func_$ac_func=yes"
7741 else
7742   echo "configure: failed program was:" >&5
7743   cat conftest.$ac_ext >&5
7744   rm -rf conftest*
7745   eval "ac_cv_func_$ac_func=no"
7746 fi
7747 rm -f conftest*
7748 fi
7749
7750 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7751   echo "$ac_t""yes" 1>&6
7752     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7753   cat >> confdefs.h <<EOF
7754 #define $ac_tr_func 1
7755 EOF
7756  
7757 else
7758   echo "$ac_t""no" 1>&6
7759 fi
7760 done
7761  ;;
7762   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7763 echo "configure:7764: checking for getspnam in -lsec" >&5
7764 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7765 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7766   echo $ac_n "(cached) $ac_c" 1>&6
7767 else
7768   ac_save_LIBS="$LIBS"
7769 LIBS="-lsec  $LIBS"
7770 cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 /* Override any gcc2 internal prototype to avoid an error.  */
7774 /* We use char because int might match the return type of a gcc2
7775     builtin and then its argument prototype would still apply.  */
7776 char getspnam();
7777
7778 int main() {
7779 getspnam()
7780 ; return 0; }
7781 EOF
7782 if { (eval echo configure:7783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7783   rm -rf conftest*
7784   eval "ac_cv_lib_$ac_lib_var=yes"
7785 else
7786   echo "configure: failed program was:" >&5
7787   cat conftest.$ac_ext >&5
7788   rm -rf conftest*
7789   eval "ac_cv_lib_$ac_lib_var=no"
7790 fi
7791 rm -f conftest*
7792 LIBS="$ac_save_LIBS"
7793
7794 fi
7795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7796   echo "$ac_t""yes" 1>&6
7797     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7798     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7799   cat >> confdefs.h <<EOF
7800 #define $ac_tr_lib 1
7801 EOF
7802
7803   LIBS="-lsec $LIBS"
7804
7805 else
7806   echo "$ac_t""no" 1>&6
7807 fi
7808  
7809      for ac_func in getspnam
7810 do
7811 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7812 echo "configure:7813: checking for $ac_func" >&5
7813 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7814   echo $ac_n "(cached) $ac_c" 1>&6
7815 else
7816   cat > conftest.$ac_ext <<EOF
7817 #line 7818 "configure"
7818 #include "confdefs.h"
7819 /* System header to define __stub macros and hopefully few prototypes,
7820     which can conflict with char $ac_func(); below.  */
7821 #include <assert.h>
7822 /* Override any gcc2 internal prototype to avoid an error.  */
7823 /* We use char because int might match the return type of a gcc2
7824     builtin and then its argument prototype would still apply.  */
7825 char $ac_func();
7826
7827 int main() {
7828
7829 /* The GNU C library defines this for functions which it implements
7830     to always fail with ENOSYS.  Some functions are actually named
7831     something starting with __ and the normal name is an alias.  */
7832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7833 choke me
7834 #else
7835 $ac_func();
7836 #endif
7837
7838 ; return 0; }
7839 EOF
7840 if { (eval echo configure:7841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7841   rm -rf conftest*
7842   eval "ac_cv_func_$ac_func=yes"
7843 else
7844   echo "configure: failed program was:" >&5
7845   cat conftest.$ac_ext >&5
7846   rm -rf conftest*
7847   eval "ac_cv_func_$ac_func=no"
7848 fi
7849 rm -f conftest*
7850 fi
7851
7852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7853   echo "$ac_t""yes" 1>&6
7854     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7855   cat >> confdefs.h <<EOF
7856 #define $ac_tr_func 1
7857 EOF
7858  
7859 else
7860   echo "$ac_t""no" 1>&6
7861 fi
7862 done
7863
7864   ;;
7865   esac
7866
7867
7868 case "$LIBS" in
7869   *-lsecurity*) for ac_func in bigcrypt
7870 do
7871 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7872 echo "configure:7873: checking for $ac_func" >&5
7873 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7874   echo $ac_n "(cached) $ac_c" 1>&6
7875 else
7876   cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879 /* System header to define __stub macros and hopefully few prototypes,
7880     which can conflict with char $ac_func(); below.  */
7881 #include <assert.h>
7882 /* Override any gcc2 internal prototype to avoid an error.  */
7883 /* We use char because int might match the return type of a gcc2
7884     builtin and then its argument prototype would still apply.  */
7885 char $ac_func();
7886
7887 int main() {
7888
7889 /* The GNU C library defines this for functions which it implements
7890     to always fail with ENOSYS.  Some functions are actually named
7891     something starting with __ and the normal name is an alias.  */
7892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7893 choke me
7894 #else
7895 $ac_func();
7896 #endif
7897
7898 ; return 0; }
7899 EOF
7900 if { (eval echo configure:7901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7901   rm -rf conftest*
7902   eval "ac_cv_func_$ac_func=yes"
7903 else
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -rf conftest*
7907   eval "ac_cv_func_$ac_func=no"
7908 fi
7909 rm -f conftest*
7910 fi
7911
7912 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7913   echo "$ac_t""yes" 1>&6
7914     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7915   cat >> confdefs.h <<EOF
7916 #define $ac_tr_func 1
7917 EOF
7918  
7919 else
7920   echo "$ac_t""no" 1>&6
7921 fi
7922 done
7923  ;;
7924   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7925 echo "configure:7926: checking for bigcrypt in -lsecurity" >&5
7926 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7927 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7928   echo $ac_n "(cached) $ac_c" 1>&6
7929 else
7930   ac_save_LIBS="$LIBS"
7931 LIBS="-lsecurity  $LIBS"
7932 cat > conftest.$ac_ext <<EOF
7933 #line 7934 "configure"
7934 #include "confdefs.h"
7935 /* Override any gcc2 internal prototype to avoid an error.  */
7936 /* We use char because int might match the return type of a gcc2
7937     builtin and then its argument prototype would still apply.  */
7938 char bigcrypt();
7939
7940 int main() {
7941 bigcrypt()
7942 ; return 0; }
7943 EOF
7944 if { (eval echo configure:7945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7945   rm -rf conftest*
7946   eval "ac_cv_lib_$ac_lib_var=yes"
7947 else
7948   echo "configure: failed program was:" >&5
7949   cat conftest.$ac_ext >&5
7950   rm -rf conftest*
7951   eval "ac_cv_lib_$ac_lib_var=no"
7952 fi
7953 rm -f conftest*
7954 LIBS="$ac_save_LIBS"
7955
7956 fi
7957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7958   echo "$ac_t""yes" 1>&6
7959     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7960     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7961   cat >> confdefs.h <<EOF
7962 #define $ac_tr_lib 1
7963 EOF
7964
7965   LIBS="-lsecurity $LIBS"
7966
7967 else
7968   echo "$ac_t""no" 1>&6
7969 fi
7970  
7971      for ac_func in bigcrypt
7972 do
7973 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7974 echo "configure:7975: checking for $ac_func" >&5
7975 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7976   echo $ac_n "(cached) $ac_c" 1>&6
7977 else
7978   cat > conftest.$ac_ext <<EOF
7979 #line 7980 "configure"
7980 #include "confdefs.h"
7981 /* System header to define __stub macros and hopefully few prototypes,
7982     which can conflict with char $ac_func(); below.  */
7983 #include <assert.h>
7984 /* Override any gcc2 internal prototype to avoid an error.  */
7985 /* We use char because int might match the return type of a gcc2
7986     builtin and then its argument prototype would still apply.  */
7987 char $ac_func();
7988
7989 int main() {
7990
7991 /* The GNU C library defines this for functions which it implements
7992     to always fail with ENOSYS.  Some functions are actually named
7993     something starting with __ and the normal name is an alias.  */
7994 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7995 choke me
7996 #else
7997 $ac_func();
7998 #endif
7999
8000 ; return 0; }
8001 EOF
8002 if { (eval echo configure:8003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8003   rm -rf conftest*
8004   eval "ac_cv_func_$ac_func=yes"
8005 else
8006   echo "configure: failed program was:" >&5
8007   cat conftest.$ac_ext >&5
8008   rm -rf conftest*
8009   eval "ac_cv_func_$ac_func=no"
8010 fi
8011 rm -f conftest*
8012 fi
8013
8014 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8015   echo "$ac_t""yes" 1>&6
8016     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8017   cat >> confdefs.h <<EOF
8018 #define $ac_tr_func 1
8019 EOF
8020  
8021 else
8022   echo "$ac_t""no" 1>&6
8023 fi
8024 done
8025
8026   ;;
8027   esac
8028
8029 case "$LIBS" in
8030   *-lsec*) for ac_func in bigcrypt
8031 do
8032 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8033 echo "configure:8034: checking for $ac_func" >&5
8034 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8035   echo $ac_n "(cached) $ac_c" 1>&6
8036 else
8037   cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 /* System header to define __stub macros and hopefully few prototypes,
8041     which can conflict with char $ac_func(); below.  */
8042 #include <assert.h>
8043 /* Override any gcc2 internal prototype to avoid an error.  */
8044 /* We use char because int might match the return type of a gcc2
8045     builtin and then its argument prototype would still apply.  */
8046 char $ac_func();
8047
8048 int main() {
8049
8050 /* The GNU C library defines this for functions which it implements
8051     to always fail with ENOSYS.  Some functions are actually named
8052     something starting with __ and the normal name is an alias.  */
8053 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8054 choke me
8055 #else
8056 $ac_func();
8057 #endif
8058
8059 ; return 0; }
8060 EOF
8061 if { (eval echo configure:8062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8062   rm -rf conftest*
8063   eval "ac_cv_func_$ac_func=yes"
8064 else
8065   echo "configure: failed program was:" >&5
8066   cat conftest.$ac_ext >&5
8067   rm -rf conftest*
8068   eval "ac_cv_func_$ac_func=no"
8069 fi
8070 rm -f conftest*
8071 fi
8072
8073 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8074   echo "$ac_t""yes" 1>&6
8075     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8076   cat >> confdefs.h <<EOF
8077 #define $ac_tr_func 1
8078 EOF
8079  
8080 else
8081   echo "$ac_t""no" 1>&6
8082 fi
8083 done
8084  ;;
8085   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8086 echo "configure:8087: checking for bigcrypt in -lsec" >&5
8087 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8088 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8089   echo $ac_n "(cached) $ac_c" 1>&6
8090 else
8091   ac_save_LIBS="$LIBS"
8092 LIBS="-lsec  $LIBS"
8093 cat > conftest.$ac_ext <<EOF
8094 #line 8095 "configure"
8095 #include "confdefs.h"
8096 /* Override any gcc2 internal prototype to avoid an error.  */
8097 /* We use char because int might match the return type of a gcc2
8098     builtin and then its argument prototype would still apply.  */
8099 char bigcrypt();
8100
8101 int main() {
8102 bigcrypt()
8103 ; return 0; }
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8106   rm -rf conftest*
8107   eval "ac_cv_lib_$ac_lib_var=yes"
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=no"
8113 fi
8114 rm -f conftest*
8115 LIBS="$ac_save_LIBS"
8116
8117 fi
8118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8119   echo "$ac_t""yes" 1>&6
8120     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8122   cat >> confdefs.h <<EOF
8123 #define $ac_tr_lib 1
8124 EOF
8125
8126   LIBS="-lsec $LIBS"
8127
8128 else
8129   echo "$ac_t""no" 1>&6
8130 fi
8131  
8132      for ac_func in bigcrypt
8133 do
8134 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8135 echo "configure:8136: checking for $ac_func" >&5
8136 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8137   echo $ac_n "(cached) $ac_c" 1>&6
8138 else
8139   cat > conftest.$ac_ext <<EOF
8140 #line 8141 "configure"
8141 #include "confdefs.h"
8142 /* System header to define __stub macros and hopefully few prototypes,
8143     which can conflict with char $ac_func(); below.  */
8144 #include <assert.h>
8145 /* Override any gcc2 internal prototype to avoid an error.  */
8146 /* We use char because int might match the return type of a gcc2
8147     builtin and then its argument prototype would still apply.  */
8148 char $ac_func();
8149
8150 int main() {
8151
8152 /* The GNU C library defines this for functions which it implements
8153     to always fail with ENOSYS.  Some functions are actually named
8154     something starting with __ and the normal name is an alias.  */
8155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8156 choke me
8157 #else
8158 $ac_func();
8159 #endif
8160
8161 ; return 0; }
8162 EOF
8163 if { (eval echo configure:8164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8164   rm -rf conftest*
8165   eval "ac_cv_func_$ac_func=yes"
8166 else
8167   echo "configure: failed program was:" >&5
8168   cat conftest.$ac_ext >&5
8169   rm -rf conftest*
8170   eval "ac_cv_func_$ac_func=no"
8171 fi
8172 rm -f conftest*
8173 fi
8174
8175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8176   echo "$ac_t""yes" 1>&6
8177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8178   cat >> confdefs.h <<EOF
8179 #define $ac_tr_func 1
8180 EOF
8181  
8182 else
8183   echo "$ac_t""no" 1>&6
8184 fi
8185 done
8186
8187   ;;
8188   esac
8189
8190
8191 case "$LIBS" in
8192   *-lsecurity*) for ac_func in getprpwnam
8193 do
8194 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8195 echo "configure:8196: checking for $ac_func" >&5
8196 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8197   echo $ac_n "(cached) $ac_c" 1>&6
8198 else
8199   cat > conftest.$ac_ext <<EOF
8200 #line 8201 "configure"
8201 #include "confdefs.h"
8202 /* System header to define __stub macros and hopefully few prototypes,
8203     which can conflict with char $ac_func(); below.  */
8204 #include <assert.h>
8205 /* Override any gcc2 internal prototype to avoid an error.  */
8206 /* We use char because int might match the return type of a gcc2
8207     builtin and then its argument prototype would still apply.  */
8208 char $ac_func();
8209
8210 int main() {
8211
8212 /* The GNU C library defines this for functions which it implements
8213     to always fail with ENOSYS.  Some functions are actually named
8214     something starting with __ and the normal name is an alias.  */
8215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8216 choke me
8217 #else
8218 $ac_func();
8219 #endif
8220
8221 ; return 0; }
8222 EOF
8223 if { (eval echo configure:8224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8224   rm -rf conftest*
8225   eval "ac_cv_func_$ac_func=yes"
8226 else
8227   echo "configure: failed program was:" >&5
8228   cat conftest.$ac_ext >&5
8229   rm -rf conftest*
8230   eval "ac_cv_func_$ac_func=no"
8231 fi
8232 rm -f conftest*
8233 fi
8234
8235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8236   echo "$ac_t""yes" 1>&6
8237     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8238   cat >> confdefs.h <<EOF
8239 #define $ac_tr_func 1
8240 EOF
8241  
8242 else
8243   echo "$ac_t""no" 1>&6
8244 fi
8245 done
8246  ;;
8247   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8248 echo "configure:8249: checking for getprpwnam in -lsecurity" >&5
8249 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8250 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8251   echo $ac_n "(cached) $ac_c" 1>&6
8252 else
8253   ac_save_LIBS="$LIBS"
8254 LIBS="-lsecurity  $LIBS"
8255 cat > conftest.$ac_ext <<EOF
8256 #line 8257 "configure"
8257 #include "confdefs.h"
8258 /* Override any gcc2 internal prototype to avoid an error.  */
8259 /* We use char because int might match the return type of a gcc2
8260     builtin and then its argument prototype would still apply.  */
8261 char getprpwnam();
8262
8263 int main() {
8264 getprpwnam()
8265 ; return 0; }
8266 EOF
8267 if { (eval echo configure:8268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8268   rm -rf conftest*
8269   eval "ac_cv_lib_$ac_lib_var=yes"
8270 else
8271   echo "configure: failed program was:" >&5
8272   cat conftest.$ac_ext >&5
8273   rm -rf conftest*
8274   eval "ac_cv_lib_$ac_lib_var=no"
8275 fi
8276 rm -f conftest*
8277 LIBS="$ac_save_LIBS"
8278
8279 fi
8280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8281   echo "$ac_t""yes" 1>&6
8282     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8283     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8284   cat >> confdefs.h <<EOF
8285 #define $ac_tr_lib 1
8286 EOF
8287
8288   LIBS="-lsecurity $LIBS"
8289
8290 else
8291   echo "$ac_t""no" 1>&6
8292 fi
8293  
8294      for ac_func in getprpwnam
8295 do
8296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8297 echo "configure:8298: checking for $ac_func" >&5
8298 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8299   echo $ac_n "(cached) $ac_c" 1>&6
8300 else
8301   cat > conftest.$ac_ext <<EOF
8302 #line 8303 "configure"
8303 #include "confdefs.h"
8304 /* System header to define __stub macros and hopefully few prototypes,
8305     which can conflict with char $ac_func(); below.  */
8306 #include <assert.h>
8307 /* Override any gcc2 internal prototype to avoid an error.  */
8308 /* We use char because int might match the return type of a gcc2
8309     builtin and then its argument prototype would still apply.  */
8310 char $ac_func();
8311
8312 int main() {
8313
8314 /* The GNU C library defines this for functions which it implements
8315     to always fail with ENOSYS.  Some functions are actually named
8316     something starting with __ and the normal name is an alias.  */
8317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8318 choke me
8319 #else
8320 $ac_func();
8321 #endif
8322
8323 ; return 0; }
8324 EOF
8325 if { (eval echo configure:8326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8326   rm -rf conftest*
8327   eval "ac_cv_func_$ac_func=yes"
8328 else
8329   echo "configure: failed program was:" >&5
8330   cat conftest.$ac_ext >&5
8331   rm -rf conftest*
8332   eval "ac_cv_func_$ac_func=no"
8333 fi
8334 rm -f conftest*
8335 fi
8336
8337 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8338   echo "$ac_t""yes" 1>&6
8339     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8340   cat >> confdefs.h <<EOF
8341 #define $ac_tr_func 1
8342 EOF
8343  
8344 else
8345   echo "$ac_t""no" 1>&6
8346 fi
8347 done
8348
8349   ;;
8350   esac
8351
8352 case "$LIBS" in
8353   *-lsec*) for ac_func in getprpwnam
8354 do
8355 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8356 echo "configure:8357: checking for $ac_func" >&5
8357 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8358   echo $ac_n "(cached) $ac_c" 1>&6
8359 else
8360   cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 /* System header to define __stub macros and hopefully few prototypes,
8364     which can conflict with char $ac_func(); below.  */
8365 #include <assert.h>
8366 /* Override any gcc2 internal prototype to avoid an error.  */
8367 /* We use char because int might match the return type of a gcc2
8368     builtin and then its argument prototype would still apply.  */
8369 char $ac_func();
8370
8371 int main() {
8372
8373 /* The GNU C library defines this for functions which it implements
8374     to always fail with ENOSYS.  Some functions are actually named
8375     something starting with __ and the normal name is an alias.  */
8376 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8377 choke me
8378 #else
8379 $ac_func();
8380 #endif
8381
8382 ; return 0; }
8383 EOF
8384 if { (eval echo configure:8385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8385   rm -rf conftest*
8386   eval "ac_cv_func_$ac_func=yes"
8387 else
8388   echo "configure: failed program was:" >&5
8389   cat conftest.$ac_ext >&5
8390   rm -rf conftest*
8391   eval "ac_cv_func_$ac_func=no"
8392 fi
8393 rm -f conftest*
8394 fi
8395
8396 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8397   echo "$ac_t""yes" 1>&6
8398     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8399   cat >> confdefs.h <<EOF
8400 #define $ac_tr_func 1
8401 EOF
8402  
8403 else
8404   echo "$ac_t""no" 1>&6
8405 fi
8406 done
8407  ;;
8408   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8409 echo "configure:8410: checking for getprpwnam in -lsec" >&5
8410 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8411 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8412   echo $ac_n "(cached) $ac_c" 1>&6
8413 else
8414   ac_save_LIBS="$LIBS"
8415 LIBS="-lsec  $LIBS"
8416 cat > conftest.$ac_ext <<EOF
8417 #line 8418 "configure"
8418 #include "confdefs.h"
8419 /* Override any gcc2 internal prototype to avoid an error.  */
8420 /* We use char because int might match the return type of a gcc2
8421     builtin and then its argument prototype would still apply.  */
8422 char getprpwnam();
8423
8424 int main() {
8425 getprpwnam()
8426 ; return 0; }
8427 EOF
8428 if { (eval echo configure:8429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8429   rm -rf conftest*
8430   eval "ac_cv_lib_$ac_lib_var=yes"
8431 else
8432   echo "configure: failed program was:" >&5
8433   cat conftest.$ac_ext >&5
8434   rm -rf conftest*
8435   eval "ac_cv_lib_$ac_lib_var=no"
8436 fi
8437 rm -f conftest*
8438 LIBS="$ac_save_LIBS"
8439
8440 fi
8441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8442   echo "$ac_t""yes" 1>&6
8443     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8444     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8445   cat >> confdefs.h <<EOF
8446 #define $ac_tr_lib 1
8447 EOF
8448
8449   LIBS="-lsec $LIBS"
8450
8451 else
8452   echo "$ac_t""no" 1>&6
8453 fi
8454  
8455      for ac_func in getprpwnam
8456 do
8457 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8458 echo "configure:8459: checking for $ac_func" >&5
8459 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8460   echo $ac_n "(cached) $ac_c" 1>&6
8461 else
8462   cat > conftest.$ac_ext <<EOF
8463 #line 8464 "configure"
8464 #include "confdefs.h"
8465 /* System header to define __stub macros and hopefully few prototypes,
8466     which can conflict with char $ac_func(); below.  */
8467 #include <assert.h>
8468 /* Override any gcc2 internal prototype to avoid an error.  */
8469 /* We use char because int might match the return type of a gcc2
8470     builtin and then its argument prototype would still apply.  */
8471 char $ac_func();
8472
8473 int main() {
8474
8475 /* The GNU C library defines this for functions which it implements
8476     to always fail with ENOSYS.  Some functions are actually named
8477     something starting with __ and the normal name is an alias.  */
8478 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8479 choke me
8480 #else
8481 $ac_func();
8482 #endif
8483
8484 ; return 0; }
8485 EOF
8486 if { (eval echo configure:8487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8487   rm -rf conftest*
8488   eval "ac_cv_func_$ac_func=yes"
8489 else
8490   echo "configure: failed program was:" >&5
8491   cat conftest.$ac_ext >&5
8492   rm -rf conftest*
8493   eval "ac_cv_func_$ac_func=no"
8494 fi
8495 rm -f conftest*
8496 fi
8497
8498 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8499   echo "$ac_t""yes" 1>&6
8500     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8501   cat >> confdefs.h <<EOF
8502 #define $ac_tr_func 1
8503 EOF
8504  
8505 else
8506   echo "$ac_t""no" 1>&6
8507 fi
8508 done
8509
8510   ;;
8511   esac
8512
8513
8514 # this bit needs to be modified for each OS that is suported by
8515 # smbwrapper. You need to specify how to created a shared library and
8516 # how to compile C code to produce PIC object files
8517
8518 # these are the defaults, good for lots of systems
8519 HOST_OS="$host_os"
8520 LDSHFLAGS="-shared"
8521 SHLD="\${CC}"
8522 PICFLAG=""
8523 PICSUFFIX="po"
8524 POBAD_CC="#"
8525 SHLIBEXT="so"
8526 # Assume non-shared by default and override below
8527 BLDSHARED="false"
8528 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8529 echo "configure:8530: checking ability to build shared libraries" >&5
8530
8531 # and these are for particular systems
8532 case "$host_os" in
8533                 *linux*)   cat >> confdefs.h <<\EOF
8534 #define LINUX 1
8535 EOF
8536
8537                         BLDSHARED="true"
8538                         LDSHFLAGS="-shared" 
8539                         PICFLAG="-fPIC"
8540                 ;;
8541                 *solaris*) cat >> confdefs.h <<\EOF
8542 #define SUNOS5 1
8543 EOF
8544
8545                         BLDSHARED="true"
8546                         LDSHFLAGS="-h \$@ -G"
8547                         if test "${ac_cv_prog_CC}" = "gcc"; then
8548                                 PICFLAG="-fPIC"
8549                         else
8550                                 PICFLAG="-KPIC"
8551                                 POBAD_CC=""
8552                                 PICSUFFIX="po.o"
8553                         fi
8554                 ;;
8555                 *sunos*) cat >> confdefs.h <<\EOF
8556 #define SUNOS4 1
8557 EOF
8558
8559                         BLDSHARED="true"
8560                         LDSHFLAGS="-Wl,-h,\$@ -G"
8561                         PICFLAG="-KPIC"   # Is this correct for SunOS
8562                 ;;
8563                 *bsd*)  BLDSHARED="true"
8564                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8565                         PICFLAG="-fPIC"
8566                 ;;
8567                 *irix*) cat >> confdefs.h <<\EOF
8568 #define IRIX 1
8569 EOF
8570
8571                         case "$host_os" in
8572                         *irix6*) cat >> confdefs.h <<\EOF
8573 #define IRIX6 1
8574 EOF
8575
8576                         ;;
8577                         esac
8578                         ATTEMPT_WRAP32_BUILD=yes
8579                         BLDSHARED="true"
8580                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8581                         if test "${ac_cv_prog_CC}" = "gcc"; then
8582                                 PICFLAG="-fPIC"
8583                         else 
8584                                 PICFLAG="-KPIC"
8585                         fi
8586                 ;;
8587                 *aix*) cat >> confdefs.h <<\EOF
8588 #define AIX 1
8589 EOF
8590
8591                         BLDSHARED="true"
8592                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8593                         PICFLAG="-O2 -qmaxmem=6000"
8594                 ;;
8595                 *hpux*) cat >> confdefs.h <<\EOF
8596 #define HPUX 1
8597 EOF
8598
8599                         SHLIBEXT="sl"
8600                         # Use special PIC flags for the native HP-UX compiler.
8601                         if test $ac_cv_prog_cc_Ae = yes; then
8602                                 #BLDSHARED="true"
8603                                 LDSHFLAGS="-b -z +h \$@"
8604                                 PICFLAG="+z"
8605                         fi
8606                 ;;
8607                 *qnx*) cat >> confdefs.h <<\EOF
8608 #define QNX 1
8609 EOF
8610 ;;
8611                 *osf*) cat >> confdefs.h <<\EOF
8612 #define OSF1 1
8613 EOF
8614
8615                         BLDSHARED="true"
8616                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8617                         PICFLAG="-fPIC"
8618                 ;;
8619                 *sco*) cat >> confdefs.h <<\EOF
8620 #define SCO 1
8621 EOF
8622 ;;
8623                 *unixware*) cat >> confdefs.h <<\EOF
8624 #define UNIXWARE 1
8625 EOF
8626
8627                         BLDSHARED="true"
8628                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8629                         PICFLAG="-KPIC"
8630                 ;;
8631                 *next2*) cat >> confdefs.h <<\EOF
8632 #define NEXT2 1
8633 EOF
8634 ;;
8635                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8636 set dummy groff; ac_word=$2
8637 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8638 echo "configure:8639: checking for $ac_word" >&5
8639 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8640   echo $ac_n "(cached) $ac_c" 1>&6
8641 else
8642   if test -n "$ROFF"; then
8643   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8644 else
8645   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8646   ac_dummy="$PATH"
8647   for ac_dir in $ac_dummy; do
8648     test -z "$ac_dir" && ac_dir=.
8649     if test -f $ac_dir/$ac_word; then
8650       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8651       break
8652     fi
8653   done
8654   IFS="$ac_save_ifs"
8655 fi
8656 fi
8657 ROFF="$ac_cv_prog_ROFF"
8658 if test -n "$ROFF"; then
8659   echo "$ac_t""$ROFF" 1>&6
8660 else
8661   echo "$ac_t""no" 1>&6
8662 fi
8663 ;;
8664                 *sysv4*)
8665                         case "$host" in
8666                                 *-univel-*)     if  test "$GCC" != yes ; then
8667                                                                         cat >> confdefs.h <<\EOF
8668 #define HAVE_MEMSET 1
8669 EOF
8670
8671                                                                 fi
8672                                                                 LDSHFLAGS="-G"
8673                                 ;;
8674                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8675 #define RELIANTUNIX 1
8676 EOF
8677 ;;
8678                         esac
8679                         ;;
8680                 *sysv5*)
8681                         if  test "$GCC" != yes ; then
8682                                 cat >> confdefs.h <<\EOF
8683 #define HAVE_MEMSET 1
8684 EOF
8685
8686                         fi
8687                         LDSHFLAGS="-G"
8688                         ;;
8689 esac
8690 echo "$ac_t""$BLDSHARED" 1>&6
8691 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8692 echo "configure:8693: checking linker flags for shared libraries" >&5
8693 echo "$ac_t""$LDSHFLAGS" 1>&6
8694 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8695 echo "configure:8696: checking compiler flags for position-independent code" >&5
8696 echo "$ac_t""$PICFLAGS" 1>&6
8697
8698 # this updates our target list if we can build shared libs
8699 if test $BLDSHARED = true; then
8700    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8701 else
8702    LIBSMBCLIENT_SHARED=
8703 fi
8704
8705 ################
8706
8707 echo $ac_n "checking for long long""... $ac_c" 1>&6
8708 echo "configure:8709: checking for long long" >&5
8709 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8710   echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712   
8713 if test "$cross_compiling" = yes; then
8714   samba_cv_have_longlong=cross
8715 else
8716   cat > conftest.$ac_ext <<EOF
8717 #line 8718 "configure"
8718 #include "confdefs.h"
8719 #include <stdio.h>
8720 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8721 EOF
8722 if { (eval echo configure:8723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8723 then
8724   samba_cv_have_longlong=yes
8725 else
8726   echo "configure: failed program was:" >&5
8727   cat conftest.$ac_ext >&5
8728   rm -fr conftest*
8729   samba_cv_have_longlong=no
8730 fi
8731 rm -fr conftest*
8732 fi
8733
8734 fi
8735
8736 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8737 if test x"$samba_cv_have_longlong" = x"yes"; then
8738     cat >> confdefs.h <<\EOF
8739 #define HAVE_LONGLONG 1
8740 EOF
8741
8742 fi
8743
8744 #
8745 # Check if the compiler supports the LL prefix on long long integers.
8746 # AIX needs this.
8747
8748 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8749 echo "configure:8750: checking for LL suffix on long long integers" >&5
8750 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8751   echo $ac_n "(cached) $ac_c" 1>&6
8752 else
8753   
8754     cat > conftest.$ac_ext <<EOF
8755 #line 8756 "configure"
8756 #include "confdefs.h"
8757 #include <stdio.h>
8758 int main() {
8759 long long i = 0x8000000000LL
8760 ; return 0; }
8761 EOF
8762 if { (eval echo configure:8763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8763   rm -rf conftest*
8764   samba_cv_compiler_supports_ll=yes
8765 else
8766   echo "configure: failed program was:" >&5
8767   cat conftest.$ac_ext >&5
8768   rm -rf conftest*
8769   samba_cv_compiler_supports_ll=no
8770 fi
8771 rm -f conftest*
8772 fi
8773
8774 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8775 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8776    cat >> confdefs.h <<\EOF
8777 #define COMPILER_SUPPORTS_LL 1
8778 EOF
8779
8780 fi
8781
8782   
8783 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8784 echo "configure:8785: checking for 64 bit off_t" >&5
8785 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8786   echo $ac_n "(cached) $ac_c" 1>&6
8787 else
8788   
8789 if test "$cross_compiling" = yes; then
8790   samba_cv_SIZEOF_OFF_T=cross
8791 else
8792   cat > conftest.$ac_ext <<EOF
8793 #line 8794 "configure"
8794 #include "confdefs.h"
8795 #include <stdio.h>
8796 #include <sys/stat.h>
8797 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8798 EOF
8799 if { (eval echo configure:8800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8800 then
8801   samba_cv_SIZEOF_OFF_T=yes
8802 else
8803   echo "configure: failed program was:" >&5
8804   cat conftest.$ac_ext >&5
8805   rm -fr conftest*
8806   samba_cv_SIZEOF_OFF_T=no
8807 fi
8808 rm -fr conftest*
8809 fi
8810
8811 fi
8812
8813 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8814 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8815     cat >> confdefs.h <<\EOF
8816 #define SIZEOF_OFF_T 8
8817 EOF
8818
8819 fi
8820
8821 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8822 echo "configure:8823: checking for off64_t" >&5
8823 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8824   echo $ac_n "(cached) $ac_c" 1>&6
8825 else
8826   
8827 if test "$cross_compiling" = yes; then
8828   samba_cv_HAVE_OFF64_T=cross
8829 else
8830   cat > conftest.$ac_ext <<EOF
8831 #line 8832 "configure"
8832 #include "confdefs.h"
8833
8834 #if defined(HAVE_UNISTD_H)
8835 #include <unistd.h>
8836 #endif
8837 #include <stdio.h>
8838 #include <sys/stat.h>
8839 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8840 EOF
8841 if { (eval echo configure:8842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8842 then
8843   samba_cv_HAVE_OFF64_T=yes
8844 else
8845   echo "configure: failed program was:" >&5
8846   cat conftest.$ac_ext >&5
8847   rm -fr conftest*
8848   samba_cv_HAVE_OFF64_T=no
8849 fi
8850 rm -fr conftest*
8851 fi
8852
8853 fi
8854
8855 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8856 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8857     cat >> confdefs.h <<\EOF
8858 #define HAVE_OFF64_T 1
8859 EOF
8860
8861 fi
8862
8863 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8864 echo "configure:8865: checking for 64 bit ino_t" >&5
8865 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8866   echo $ac_n "(cached) $ac_c" 1>&6
8867 else
8868   
8869 if test "$cross_compiling" = yes; then
8870   samba_cv_SIZEOF_INO_T=cross
8871 else
8872   cat > conftest.$ac_ext <<EOF
8873 #line 8874 "configure"
8874 #include "confdefs.h"
8875 #include <stdio.h>
8876 #include <sys/stat.h>
8877 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8878 EOF
8879 if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8880 then
8881   samba_cv_SIZEOF_INO_T=yes
8882 else
8883   echo "configure: failed program was:" >&5
8884   cat conftest.$ac_ext >&5
8885   rm -fr conftest*
8886   samba_cv_SIZEOF_INO_T=no
8887 fi
8888 rm -fr conftest*
8889 fi
8890
8891 fi
8892
8893 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8894 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8895     cat >> confdefs.h <<\EOF
8896 #define SIZEOF_INO_T 8
8897 EOF
8898
8899 fi
8900
8901 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8902 echo "configure:8903: checking for ino64_t" >&5
8903 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8904   echo $ac_n "(cached) $ac_c" 1>&6
8905 else
8906   
8907 if test "$cross_compiling" = yes; then
8908   samba_cv_HAVE_INO64_T=cross
8909 else
8910   cat > conftest.$ac_ext <<EOF
8911 #line 8912 "configure"
8912 #include "confdefs.h"
8913
8914 #if defined(HAVE_UNISTD_H)
8915 #include <unistd.h>
8916 #endif
8917 #include <stdio.h>
8918 #include <sys/stat.h>
8919 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8920 EOF
8921 if { (eval echo configure:8922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8922 then
8923   samba_cv_HAVE_INO64_T=yes
8924 else
8925   echo "configure: failed program was:" >&5
8926   cat conftest.$ac_ext >&5
8927   rm -fr conftest*
8928   samba_cv_HAVE_INO64_T=no
8929 fi
8930 rm -fr conftest*
8931 fi
8932
8933 fi
8934
8935 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8936 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8937     cat >> confdefs.h <<\EOF
8938 #define HAVE_INO64_T 1
8939 EOF
8940
8941 fi
8942
8943 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8944 echo "configure:8945: checking for struct dirent64" >&5
8945 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8946   echo $ac_n "(cached) $ac_c" 1>&6
8947 else
8948   
8949 cat > conftest.$ac_ext <<EOF
8950 #line 8951 "configure"
8951 #include "confdefs.h"
8952
8953 #if defined(HAVE_UNISTD_H)
8954 #include <unistd.h>
8955 #endif
8956 #include <sys/types.h>
8957 #include <dirent.h>
8958 int main() {
8959 struct dirent64 de;
8960 ; return 0; }
8961 EOF
8962 if { (eval echo configure:8963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8963   rm -rf conftest*
8964   samba_cv_HAVE_STRUCT_DIRENT64=yes
8965 else
8966   echo "configure: failed program was:" >&5
8967   cat conftest.$ac_ext >&5
8968   rm -rf conftest*
8969   samba_cv_HAVE_STRUCT_DIRENT64=no
8970 fi
8971 rm -f conftest*
8972 fi
8973
8974 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8975 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8976     cat >> confdefs.h <<\EOF
8977 #define HAVE_STRUCT_DIRENT64 1
8978 EOF
8979
8980 fi
8981
8982 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8983 echo "configure:8984: checking for unsigned char" >&5
8984 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8985   echo $ac_n "(cached) $ac_c" 1>&6
8986 else
8987   
8988 if test "$cross_compiling" = yes; then
8989   samba_cv_HAVE_UNSIGNED_CHAR=cross
8990 else
8991   cat > conftest.$ac_ext <<EOF
8992 #line 8993 "configure"
8993 #include "confdefs.h"
8994 #include <stdio.h>
8995 main() { char c; c=250; exit((c > 0)?0:1); }
8996 EOF
8997 if { (eval echo configure:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8998 then
8999   samba_cv_HAVE_UNSIGNED_CHAR=yes
9000 else
9001   echo "configure: failed program was:" >&5
9002   cat conftest.$ac_ext >&5
9003   rm -fr conftest*
9004   samba_cv_HAVE_UNSIGNED_CHAR=no
9005 fi
9006 rm -fr conftest*
9007 fi
9008
9009 fi
9010
9011 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9012 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9013     cat >> confdefs.h <<\EOF
9014 #define HAVE_UNSIGNED_CHAR 1
9015 EOF
9016
9017 fi
9018
9019 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9020 echo "configure:9021: checking for sin_len in sock" >&5
9021 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9022   echo $ac_n "(cached) $ac_c" 1>&6
9023 else
9024   
9025 cat > conftest.$ac_ext <<EOF
9026 #line 9027 "configure"
9027 #include "confdefs.h"
9028 #include <sys/types.h>
9029 #include <sys/socket.h>
9030 #include <netinet/in.h>
9031 int main() {
9032 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9033 ; return 0; }
9034 EOF
9035 if { (eval echo configure:9036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9036   rm -rf conftest*
9037   samba_cv_HAVE_SOCK_SIN_LEN=yes
9038 else
9039   echo "configure: failed program was:" >&5
9040   cat conftest.$ac_ext >&5
9041   rm -rf conftest*
9042   samba_cv_HAVE_SOCK_SIN_LEN=no
9043 fi
9044 rm -f conftest*
9045 fi
9046
9047 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9048 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9049     cat >> confdefs.h <<\EOF
9050 #define HAVE_SOCK_SIN_LEN 1
9051 EOF
9052
9053 fi
9054
9055 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9056 echo "configure:9057: checking whether seekdir returns void" >&5
9057 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9058   echo $ac_n "(cached) $ac_c" 1>&6
9059 else
9060   
9061 cat > conftest.$ac_ext <<EOF
9062 #line 9063 "configure"
9063 #include "confdefs.h"
9064 #include <sys/types.h>
9065 #include <dirent.h>
9066 void seekdir(DIR *d, long loc) { return; }
9067 int main() {
9068 return 0;
9069 ; return 0; }
9070 EOF
9071 if { (eval echo configure:9072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9072   rm -rf conftest*
9073   samba_cv_SEEKDIR_RETURNS_VOID=yes
9074 else
9075   echo "configure: failed program was:" >&5
9076   cat conftest.$ac_ext >&5
9077   rm -rf conftest*
9078   samba_cv_SEEKDIR_RETURNS_VOID=no
9079 fi
9080 rm -f conftest*
9081 fi
9082
9083 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9084 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9085     cat >> confdefs.h <<\EOF
9086 #define SEEKDIR_RETURNS_VOID 1
9087 EOF
9088
9089 fi
9090
9091 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9092 echo "configure:9093: checking for __FILE__ macro" >&5
9093 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9094   echo $ac_n "(cached) $ac_c" 1>&6
9095 else
9096   
9097 cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100 #include <stdio.h>
9101 int main() {
9102 printf("%s\n", __FILE__);
9103 ; return 0; }
9104 EOF
9105 if { (eval echo configure:9106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9106   rm -rf conftest*
9107   samba_cv_HAVE_FILE_MACRO=yes
9108 else
9109   echo "configure: failed program was:" >&5
9110   cat conftest.$ac_ext >&5
9111   rm -rf conftest*
9112   samba_cv_HAVE_FILE_MACRO=no
9113 fi
9114 rm -f conftest*
9115 fi
9116
9117 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9118 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9119     cat >> confdefs.h <<\EOF
9120 #define HAVE_FILE_MACRO 1
9121 EOF
9122
9123 fi
9124
9125 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9126 echo "configure:9127: checking for __FUNCTION__ macro" >&5
9127 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9128   echo $ac_n "(cached) $ac_c" 1>&6
9129 else
9130   
9131 cat > conftest.$ac_ext <<EOF
9132 #line 9133 "configure"
9133 #include "confdefs.h"
9134 #include <stdio.h>
9135 int main() {
9136 printf("%s\n", __FUNCTION__);
9137 ; return 0; }
9138 EOF
9139 if { (eval echo configure:9140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9140   rm -rf conftest*
9141   samba_cv_HAVE_FUNCTION_MACRO=yes
9142 else
9143   echo "configure: failed program was:" >&5
9144   cat conftest.$ac_ext >&5
9145   rm -rf conftest*
9146   samba_cv_HAVE_FUNCTION_MACRO=no
9147 fi
9148 rm -f conftest*
9149 fi
9150
9151 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9152 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9153     cat >> confdefs.h <<\EOF
9154 #define HAVE_FUNCTION_MACRO 1
9155 EOF
9156
9157 fi
9158
9159 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9160 echo "configure:9161: checking if gettimeofday takes tz argument" >&5
9161 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9162   echo $ac_n "(cached) $ac_c" 1>&6
9163 else
9164   
9165 if test "$cross_compiling" = yes; then
9166   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9167 else
9168   cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171
9172 #include <sys/time.h>
9173 #include <unistd.h>
9174 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9175 EOF
9176 if { (eval echo configure:9177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9177 then
9178   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9179 else
9180   echo "configure: failed program was:" >&5
9181   cat conftest.$ac_ext >&5
9182   rm -fr conftest*
9183   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9184 fi
9185 rm -fr conftest*
9186 fi
9187
9188 fi
9189
9190 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9191 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9192     cat >> confdefs.h <<\EOF
9193 #define HAVE_GETTIMEOFDAY_TZ 1
9194 EOF
9195
9196 fi
9197
9198 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9199 echo "configure:9200: checking for C99 vsnprintf" >&5
9200 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9201   echo $ac_n "(cached) $ac_c" 1>&6
9202 else
9203   
9204 if test "$cross_compiling" = yes; then
9205   samba_cv_HAVE_C99_VSNPRINTF=cross
9206 else
9207   cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210
9211 #include <sys/types.h>
9212 #include <stdarg.h>
9213 void foo(const char *format, ...) { 
9214        va_list ap;
9215        int len;
9216        char buf[5];
9217
9218        va_start(ap, format);
9219        len = vsnprintf(0, 0, format, ap);
9220        va_end(ap);
9221        if (len != 5) exit(1);
9222
9223        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9224
9225        exit(0);
9226 }
9227 main() { foo("hello"); }
9228
9229 EOF
9230 if { (eval echo configure:9231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9231 then
9232   samba_cv_HAVE_C99_VSNPRINTF=yes
9233 else
9234   echo "configure: failed program was:" >&5
9235   cat conftest.$ac_ext >&5
9236   rm -fr conftest*
9237   samba_cv_HAVE_C99_VSNPRINTF=no
9238 fi
9239 rm -fr conftest*
9240 fi
9241
9242 fi
9243
9244 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9245 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9246     cat >> confdefs.h <<\EOF
9247 #define HAVE_C99_VSNPRINTF 1
9248 EOF
9249
9250 fi
9251
9252 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9253 echo "configure:9254: checking for broken readdir" >&5
9254 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9255   echo $ac_n "(cached) $ac_c" 1>&6
9256 else
9257   
9258 if test "$cross_compiling" = yes; then
9259   samba_cv_HAVE_BROKEN_READDIR=cross
9260 else
9261   cat > conftest.$ac_ext <<EOF
9262 #line 9263 "configure"
9263 #include "confdefs.h"
9264 #include <sys/types.h>
9265 #include <dirent.h>
9266 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9267 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9268 di->d_name[0] == 0) exit(0); exit(1);} 
9269 EOF
9270 if { (eval echo configure:9271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9271 then
9272   samba_cv_HAVE_BROKEN_READDIR=yes
9273 else
9274   echo "configure: failed program was:" >&5
9275   cat conftest.$ac_ext >&5
9276   rm -fr conftest*
9277   samba_cv_HAVE_BROKEN_READDIR=no
9278 fi
9279 rm -fr conftest*
9280 fi
9281
9282 fi
9283
9284 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9285 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9286     cat >> confdefs.h <<\EOF
9287 #define HAVE_BROKEN_READDIR 1
9288 EOF
9289
9290 fi
9291
9292 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9293 echo "configure:9294: checking for utimbuf" >&5
9294 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9295   echo $ac_n "(cached) $ac_c" 1>&6
9296 else
9297   
9298 cat > conftest.$ac_ext <<EOF
9299 #line 9300 "configure"
9300 #include "confdefs.h"
9301 #include <sys/types.h>
9302 #include <utime.h>
9303 int main() {
9304 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9305 ; return 0; }
9306 EOF
9307 if { (eval echo configure:9308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9308   rm -rf conftest*
9309   samba_cv_HAVE_UTIMBUF=yes
9310 else
9311   echo "configure: failed program was:" >&5
9312   cat conftest.$ac_ext >&5
9313   rm -rf conftest*
9314   samba_cv_HAVE_UTIMBUF=no
9315 fi
9316 rm -f conftest*
9317 fi
9318
9319 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9320 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9321     cat >> confdefs.h <<\EOF
9322 #define HAVE_UTIMBUF 1
9323 EOF
9324
9325 fi
9326
9327
9328 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9329 do
9330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9331 echo "configure:9332: checking for $ac_func" >&5
9332 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9333   echo $ac_n "(cached) $ac_c" 1>&6
9334 else
9335   cat > conftest.$ac_ext <<EOF
9336 #line 9337 "configure"
9337 #include "confdefs.h"
9338 /* System header to define __stub macros and hopefully few prototypes,
9339     which can conflict with char $ac_func(); below.  */
9340 #include <assert.h>
9341 /* Override any gcc2 internal prototype to avoid an error.  */
9342 /* We use char because int might match the return type of a gcc2
9343     builtin and then its argument prototype would still apply.  */
9344 char $ac_func();
9345
9346 int main() {
9347
9348 /* The GNU C library defines this for functions which it implements
9349     to always fail with ENOSYS.  Some functions are actually named
9350     something starting with __ and the normal name is an alias.  */
9351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9352 choke me
9353 #else
9354 $ac_func();
9355 #endif
9356
9357 ; return 0; }
9358 EOF
9359 if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9360   rm -rf conftest*
9361   eval "ac_cv_func_$ac_func=yes"
9362 else
9363   echo "configure: failed program was:" >&5
9364   cat conftest.$ac_ext >&5
9365   rm -rf conftest*
9366   eval "ac_cv_func_$ac_func=no"
9367 fi
9368 rm -f conftest*
9369 fi
9370
9371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9372   echo "$ac_t""yes" 1>&6
9373     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9374   cat >> confdefs.h <<EOF
9375 #define $ac_tr_func 1
9376 EOF
9377  
9378 else
9379   echo "$ac_t""no" 1>&6
9380 fi
9381 done
9382
9383
9384 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9385 echo "configure:9386: checking for ut_name in utmp" >&5
9386 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9387   echo $ac_n "(cached) $ac_c" 1>&6
9388 else
9389   
9390 cat > conftest.$ac_ext <<EOF
9391 #line 9392 "configure"
9392 #include "confdefs.h"
9393 #include <sys/types.h>
9394 #include <utmp.h>
9395 int main() {
9396 struct utmp ut;  ut.ut_name[0] = 'a';
9397 ; return 0; }
9398 EOF
9399 if { (eval echo configure:9400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9400   rm -rf conftest*
9401   samba_cv_HAVE_UT_UT_NAME=yes
9402 else
9403   echo "configure: failed program was:" >&5
9404   cat conftest.$ac_ext >&5
9405   rm -rf conftest*
9406   samba_cv_HAVE_UT_UT_NAME=no
9407 fi
9408 rm -f conftest*
9409 fi
9410
9411 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9412 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9413     cat >> confdefs.h <<\EOF
9414 #define HAVE_UT_UT_NAME 1
9415 EOF
9416
9417 fi 
9418
9419 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9420 echo "configure:9421: checking for ut_user in utmp" >&5
9421 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9422   echo $ac_n "(cached) $ac_c" 1>&6
9423 else
9424   
9425 cat > conftest.$ac_ext <<EOF
9426 #line 9427 "configure"
9427 #include "confdefs.h"
9428 #include <sys/types.h>
9429 #include <utmp.h>
9430 int main() {
9431 struct utmp ut;  ut.ut_user[0] = 'a';
9432 ; return 0; }
9433 EOF
9434 if { (eval echo configure:9435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9435   rm -rf conftest*
9436   samba_cv_HAVE_UT_UT_USER=yes
9437 else
9438   echo "configure: failed program was:" >&5
9439   cat conftest.$ac_ext >&5
9440   rm -rf conftest*
9441   samba_cv_HAVE_UT_UT_USER=no
9442 fi
9443 rm -f conftest*
9444 fi
9445
9446 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9447 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9448     cat >> confdefs.h <<\EOF
9449 #define HAVE_UT_UT_USER 1
9450 EOF
9451
9452 fi 
9453
9454 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9455 echo "configure:9456: checking for ut_id in utmp" >&5
9456 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9457   echo $ac_n "(cached) $ac_c" 1>&6
9458 else
9459   
9460 cat > conftest.$ac_ext <<EOF
9461 #line 9462 "configure"
9462 #include "confdefs.h"
9463 #include <sys/types.h>
9464 #include <utmp.h>
9465 int main() {
9466 struct utmp ut;  ut.ut_id[0] = 'a';
9467 ; return 0; }
9468 EOF
9469 if { (eval echo configure:9470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9470   rm -rf conftest*
9471   samba_cv_HAVE_UT_UT_ID=yes
9472 else
9473   echo "configure: failed program was:" >&5
9474   cat conftest.$ac_ext >&5
9475   rm -rf conftest*
9476   samba_cv_HAVE_UT_UT_ID=no
9477 fi
9478 rm -f conftest*
9479 fi
9480
9481 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9482 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9483     cat >> confdefs.h <<\EOF
9484 #define HAVE_UT_UT_ID 1
9485 EOF
9486
9487 fi 
9488
9489 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9490 echo "configure:9491: checking for ut_host in utmp" >&5
9491 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9492   echo $ac_n "(cached) $ac_c" 1>&6
9493 else
9494   
9495 cat > conftest.$ac_ext <<EOF
9496 #line 9497 "configure"
9497 #include "confdefs.h"
9498 #include <sys/types.h>
9499 #include <utmp.h>
9500 int main() {
9501 struct utmp ut;  ut.ut_host[0] = 'a';
9502 ; return 0; }
9503 EOF
9504 if { (eval echo configure:9505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9505   rm -rf conftest*
9506   samba_cv_HAVE_UT_UT_HOST=yes
9507 else
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   samba_cv_HAVE_UT_UT_HOST=no
9512 fi
9513 rm -f conftest*
9514 fi
9515
9516 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9517 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9518     cat >> confdefs.h <<\EOF
9519 #define HAVE_UT_UT_HOST 1
9520 EOF
9521
9522 fi 
9523
9524 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9525 echo "configure:9526: checking for ut_time in utmp" >&5
9526 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9527   echo $ac_n "(cached) $ac_c" 1>&6
9528 else
9529   
9530 cat > conftest.$ac_ext <<EOF
9531 #line 9532 "configure"
9532 #include "confdefs.h"
9533 #include <sys/types.h>
9534 #include <utmp.h>
9535 int main() {
9536 struct utmp ut;  time_t t; ut.ut_time = t;
9537 ; return 0; }
9538 EOF
9539 if { (eval echo configure:9540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9540   rm -rf conftest*
9541   samba_cv_HAVE_UT_UT_TIME=yes
9542 else
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -rf conftest*
9546   samba_cv_HAVE_UT_UT_TIME=no
9547 fi
9548 rm -f conftest*
9549 fi
9550
9551 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9552 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9553     cat >> confdefs.h <<\EOF
9554 #define HAVE_UT_UT_TIME 1
9555 EOF
9556
9557 fi 
9558
9559 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9560 echo "configure:9561: checking for ut_tv in utmp" >&5
9561 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9562   echo $ac_n "(cached) $ac_c" 1>&6
9563 else
9564   
9565 cat > conftest.$ac_ext <<EOF
9566 #line 9567 "configure"
9567 #include "confdefs.h"
9568 #include <sys/types.h>
9569 #include <utmp.h>
9570 int main() {
9571 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9572 ; return 0; }
9573 EOF
9574 if { (eval echo configure:9575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9575   rm -rf conftest*
9576   samba_cv_HAVE_UT_UT_TV=yes
9577 else
9578   echo "configure: failed program was:" >&5
9579   cat conftest.$ac_ext >&5
9580   rm -rf conftest*
9581   samba_cv_HAVE_UT_UT_TV=no
9582 fi
9583 rm -f conftest*
9584 fi
9585
9586 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9587 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9588     cat >> confdefs.h <<\EOF
9589 #define HAVE_UT_UT_TV 1
9590 EOF
9591
9592 fi 
9593
9594 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9595 echo "configure:9596: checking for ut_type in utmp" >&5
9596 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9597   echo $ac_n "(cached) $ac_c" 1>&6
9598 else
9599   
9600 cat > conftest.$ac_ext <<EOF
9601 #line 9602 "configure"
9602 #include "confdefs.h"
9603 #include <sys/types.h>
9604 #include <utmp.h>
9605 int main() {
9606 struct utmp ut;  ut.ut_type = 0;
9607 ; return 0; }
9608 EOF
9609 if { (eval echo configure:9610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9610   rm -rf conftest*
9611   samba_cv_HAVE_UT_UT_TYPE=yes
9612 else
9613   echo "configure: failed program was:" >&5
9614   cat conftest.$ac_ext >&5
9615   rm -rf conftest*
9616   samba_cv_HAVE_UT_UT_TYPE=no
9617 fi
9618 rm -f conftest*
9619 fi
9620
9621 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9622 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9623     cat >> confdefs.h <<\EOF
9624 #define HAVE_UT_UT_TYPE 1
9625 EOF
9626
9627 fi 
9628
9629 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9630 echo "configure:9631: checking for ut_pid in utmp" >&5
9631 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9632   echo $ac_n "(cached) $ac_c" 1>&6
9633 else
9634   
9635 cat > conftest.$ac_ext <<EOF
9636 #line 9637 "configure"
9637 #include "confdefs.h"
9638 #include <sys/types.h>
9639 #include <utmp.h>
9640 int main() {
9641 struct utmp ut;  ut.ut_pid = 0;
9642 ; return 0; }
9643 EOF
9644 if { (eval echo configure:9645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9645   rm -rf conftest*
9646   samba_cv_HAVE_UT_UT_PID=yes
9647 else
9648   echo "configure: failed program was:" >&5
9649   cat conftest.$ac_ext >&5
9650   rm -rf conftest*
9651   samba_cv_HAVE_UT_UT_PID=no
9652 fi
9653 rm -f conftest*
9654 fi
9655
9656 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9657 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9658     cat >> confdefs.h <<\EOF
9659 #define HAVE_UT_UT_PID 1
9660 EOF
9661
9662 fi 
9663
9664 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9665 echo "configure:9666: checking for ut_exit in utmp" >&5
9666 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9667   echo $ac_n "(cached) $ac_c" 1>&6
9668 else
9669   
9670 cat > conftest.$ac_ext <<EOF
9671 #line 9672 "configure"
9672 #include "confdefs.h"
9673 #include <sys/types.h>
9674 #include <utmp.h>
9675 int main() {
9676 struct utmp ut;  ut.ut_exit.e_exit = 0;
9677 ; return 0; }
9678 EOF
9679 if { (eval echo configure:9680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9680   rm -rf conftest*
9681   samba_cv_HAVE_UT_UT_EXIT=yes
9682 else
9683   echo "configure: failed program was:" >&5
9684   cat conftest.$ac_ext >&5
9685   rm -rf conftest*
9686   samba_cv_HAVE_UT_UT_EXIT=no
9687 fi
9688 rm -f conftest*
9689 fi
9690
9691 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9692 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9693     cat >> confdefs.h <<\EOF
9694 #define HAVE_UT_UT_EXIT 1
9695 EOF
9696
9697 fi 
9698
9699 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9700 echo "configure:9701: checking for ut_addr in utmp" >&5
9701 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9702   echo $ac_n "(cached) $ac_c" 1>&6
9703 else
9704   
9705 cat > conftest.$ac_ext <<EOF
9706 #line 9707 "configure"
9707 #include "confdefs.h"
9708 #include <sys/types.h>
9709 #include <utmp.h>
9710 int main() {
9711 struct utmp ut;  ut.ut_addr = 0;
9712 ; return 0; }
9713 EOF
9714 if { (eval echo configure:9715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9715   rm -rf conftest*
9716   samba_cv_HAVE_UT_UT_ADDR=yes
9717 else
9718   echo "configure: failed program was:" >&5
9719   cat conftest.$ac_ext >&5
9720   rm -rf conftest*
9721   samba_cv_HAVE_UT_UT_ADDR=no
9722 fi
9723 rm -f conftest*
9724 fi
9725
9726 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9727 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9728     cat >> confdefs.h <<\EOF
9729 #define HAVE_UT_UT_ADDR 1
9730 EOF
9731
9732 fi 
9733
9734 if test x$ac_cv_func_pututline = xyes ; then
9735   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9736 echo "configure:9737: checking whether pututline returns pointer" >&5
9737 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9738   echo $ac_n "(cached) $ac_c" 1>&6
9739 else
9740   
9741   cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744 #include <sys/types.h>
9745 #include <utmp.h>
9746 int main() {
9747 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9748 ; return 0; }
9749 EOF
9750 if { (eval echo configure:9751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9751   rm -rf conftest*
9752   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9753 else
9754   echo "configure: failed program was:" >&5
9755   cat conftest.$ac_ext >&5
9756   rm -rf conftest*
9757   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9758 fi
9759 rm -f conftest*
9760 fi
9761
9762 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9763   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9764       cat >> confdefs.h <<\EOF
9765 #define PUTUTLINE_RETURNS_UTMP 1
9766 EOF
9767
9768   fi
9769 fi
9770
9771 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9772 echo "configure:9773: checking for ut_syslen in utmpx" >&5
9773 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9774   echo $ac_n "(cached) $ac_c" 1>&6
9775 else
9776   
9777 cat > conftest.$ac_ext <<EOF
9778 #line 9779 "configure"
9779 #include "confdefs.h"
9780 #include <sys/types.h>
9781 #include <utmpx.h>
9782 int main() {
9783 struct utmpx ux;  ux.ut_syslen = 0;
9784 ; return 0; }
9785 EOF
9786 if { (eval echo configure:9787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9787   rm -rf conftest*
9788   samba_cv_HAVE_UX_UT_SYSLEN=yes
9789 else
9790   echo "configure: failed program was:" >&5
9791   cat conftest.$ac_ext >&5
9792   rm -rf conftest*
9793   samba_cv_HAVE_UX_UT_SYSLEN=no
9794 fi
9795 rm -f conftest*
9796 fi
9797
9798 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9799 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9800     cat >> confdefs.h <<\EOF
9801 #define HAVE_UX_UT_SYSLEN 1
9802 EOF
9803
9804 fi 
9805
9806
9807 #################################################
9808 # check for libiconv support
9809 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9810 echo "configure:9811: checking whether to use libiconv" >&5
9811 # Check whether --with-libiconv or --without-libiconv was given.
9812 if test "${with_libiconv+set}" = set; then
9813   withval="$with_libiconv"
9814    case "$withval" in
9815   no)
9816     echo "$ac_t""no" 1>&6
9817     ;;
9818   *)
9819     echo "$ac_t""yes" 1>&6
9820     CFLAGS="$CFLAGS -I$withval/include"
9821     LDFLAGS="$LDFLAGS -L$withval/lib"
9822     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9823 echo "configure:9824: checking for iconv_open in -liconv" >&5
9824 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9825 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9826   echo $ac_n "(cached) $ac_c" 1>&6
9827 else
9828   ac_save_LIBS="$LIBS"
9829 LIBS="-liconv  $LIBS"
9830 cat > conftest.$ac_ext <<EOF
9831 #line 9832 "configure"
9832 #include "confdefs.h"
9833 /* Override any gcc2 internal prototype to avoid an error.  */
9834 /* We use char because int might match the return type of a gcc2
9835     builtin and then its argument prototype would still apply.  */
9836 char iconv_open();
9837
9838 int main() {
9839 iconv_open()
9840 ; return 0; }
9841 EOF
9842 if { (eval echo configure:9843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9843   rm -rf conftest*
9844   eval "ac_cv_lib_$ac_lib_var=yes"
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   eval "ac_cv_lib_$ac_lib_var=no"
9850 fi
9851 rm -f conftest*
9852 LIBS="$ac_save_LIBS"
9853
9854 fi
9855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9856   echo "$ac_t""yes" 1>&6
9857     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9858     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9859   cat >> confdefs.h <<EOF
9860 #define $ac_tr_lib 1
9861 EOF
9862
9863   LIBS="-liconv $LIBS"
9864
9865 else
9866   echo "$ac_t""no" 1>&6
9867 fi
9868
9869     cat >> confdefs.h <<EOF
9870 #define WITH_LIBICONV "${withval}"
9871 EOF
9872
9873     ;;
9874   esac 
9875 else
9876   echo "$ac_t""no" 1>&6
9877
9878 fi
9879
9880
9881
9882 ############
9883 # check for iconv in libc
9884 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9885 echo "configure:9886: checking for working iconv" >&5
9886 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9887   echo $ac_n "(cached) $ac_c" 1>&6
9888 else
9889   
9890 if test "$cross_compiling" = yes; then
9891   samba_cv_HAVE_NATIVE_ICONV=cross
9892 else
9893   cat > conftest.$ac_ext <<EOF
9894 #line 9895 "configure"
9895 #include "confdefs.h"
9896
9897 #include <iconv.h>
9898 main() {
9899        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9900        if (cd == 0 || cd == (iconv_t)-1) return -1;
9901        return 0;
9902 }
9903
9904 EOF
9905 if { (eval echo configure:9906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9906 then
9907   samba_cv_HAVE_NATIVE_ICONV=yes
9908 else
9909   echo "configure: failed program was:" >&5
9910   cat conftest.$ac_ext >&5
9911   rm -fr conftest*
9912   samba_cv_HAVE_NATIVE_ICONV=no
9913 fi
9914 rm -fr conftest*
9915 fi
9916
9917 fi
9918
9919 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9920 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9921     cat >> confdefs.h <<\EOF
9922 #define HAVE_NATIVE_ICONV 1
9923 EOF
9924
9925 fi
9926
9927
9928 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9929 echo "configure:9930: checking for Linux kernel oplocks" >&5
9930 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9931   echo $ac_n "(cached) $ac_c" 1>&6
9932 else
9933   
9934 if test "$cross_compiling" = yes; then
9935   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9936 else
9937   cat > conftest.$ac_ext <<EOF
9938 #line 9939 "configure"
9939 #include "confdefs.h"
9940
9941 #include <sys/types.h>
9942 #include <fcntl.h>
9943 #ifndef F_GETLEASE
9944 #define F_GETLEASE      1025
9945 #endif
9946 main() {
9947        int fd = open("/dev/null", O_RDONLY);
9948        return fcntl(fd, F_GETLEASE, 0) == -1;
9949 }
9950
9951 EOF
9952 if { (eval echo configure:9953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9953 then
9954   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9955 else
9956   echo "configure: failed program was:" >&5
9957   cat conftest.$ac_ext >&5
9958   rm -fr conftest*
9959   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9960 fi
9961 rm -fr conftest*
9962 fi
9963
9964 fi
9965
9966 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9967 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9968     cat >> confdefs.h <<\EOF
9969 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9970 EOF
9971
9972 fi
9973
9974 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9975 echo "configure:9976: checking for kernel change notify support" >&5
9976 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9977   echo $ac_n "(cached) $ac_c" 1>&6
9978 else
9979   
9980 if test "$cross_compiling" = yes; then
9981   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9982 else
9983   cat > conftest.$ac_ext <<EOF
9984 #line 9985 "configure"
9985 #include "confdefs.h"
9986
9987 #include <sys/types.h>
9988 #include <fcntl.h>
9989 #include <signal.h>
9990 #ifndef F_NOTIFY
9991 #define F_NOTIFY 1026
9992 #endif
9993 main() {
9994         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9995 }
9996
9997 EOF
9998 if { (eval echo configure:9999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9999 then
10000   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10001 else
10002   echo "configure: failed program was:" >&5
10003   cat conftest.$ac_ext >&5
10004   rm -fr conftest*
10005   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10006 fi
10007 rm -fr conftest*
10008 fi
10009
10010 fi
10011
10012 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10013 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10014     cat >> confdefs.h <<\EOF
10015 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10016 EOF
10017
10018 fi
10019
10020 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10021 echo "configure:10022: checking for kernel share modes" >&5
10022 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10023   echo $ac_n "(cached) $ac_c" 1>&6
10024 else
10025   
10026 if test "$cross_compiling" = yes; then
10027   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10028 else
10029   cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032
10033 #include <sys/types.h>
10034 #include <fcntl.h>
10035 #include <signal.h>
10036 #include <sys/file.h>
10037 #ifndef LOCK_MAND
10038 #define LOCK_MAND       32
10039 #define LOCK_READ       64
10040 #endif
10041 main() {
10042         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10043 }
10044
10045 EOF
10046 if { (eval echo configure:10047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10047 then
10048   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10049 else
10050   echo "configure: failed program was:" >&5
10051   cat conftest.$ac_ext >&5
10052   rm -fr conftest*
10053   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10054 fi
10055 rm -fr conftest*
10056 fi
10057
10058 fi
10059
10060 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10061 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10062     cat >> confdefs.h <<\EOF
10063 #define HAVE_KERNEL_SHARE_MODES 1
10064 EOF
10065
10066 fi
10067
10068
10069
10070
10071 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10072 echo "configure:10073: checking for IRIX kernel oplock type definitions" >&5
10073 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10074   echo $ac_n "(cached) $ac_c" 1>&6
10075 else
10076   
10077 cat > conftest.$ac_ext <<EOF
10078 #line 10079 "configure"
10079 #include "confdefs.h"
10080 #include <sys/types.h>
10081 #include <fcntl.h>
10082 int main() {
10083 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10084 ; return 0; }
10085 EOF
10086 if { (eval echo configure:10087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10087   rm -rf conftest*
10088   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10089 else
10090   echo "configure: failed program was:" >&5
10091   cat conftest.$ac_ext >&5
10092   rm -rf conftest*
10093   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10094 fi
10095 rm -f conftest*
10096 fi
10097
10098 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10099 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10100     cat >> confdefs.h <<\EOF
10101 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10102 EOF
10103
10104 fi
10105
10106 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10107 echo "configure:10108: checking for irix specific capabilities" >&5
10108 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10109   echo $ac_n "(cached) $ac_c" 1>&6
10110 else
10111   
10112 if test "$cross_compiling" = yes; then
10113   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10114 else
10115   cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 #include <sys/types.h>
10119 #include <sys/capability.h>
10120 main() {
10121  cap_t cap;
10122  if ((cap = cap_get_proc()) == NULL)
10123    exit(1);
10124  cap->cap_effective |= CAP_NETWORK_MGT;
10125  cap->cap_inheritable |= CAP_NETWORK_MGT;
10126  cap_set_proc(cap);
10127  exit(0);
10128 }
10129
10130 EOF
10131 if { (eval echo configure:10132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10132 then
10133   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10134 else
10135   echo "configure: failed program was:" >&5
10136   cat conftest.$ac_ext >&5
10137   rm -fr conftest*
10138   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10139 fi
10140 rm -fr conftest*
10141 fi
10142
10143 fi
10144
10145 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10146 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10147     cat >> confdefs.h <<\EOF
10148 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10149 EOF
10150
10151 fi
10152
10153 #
10154 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10155 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10156 #
10157
10158 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10159 echo "configure:10160: checking for int16 typedef included by rpc/rpc.h" >&5
10160 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10161   echo $ac_n "(cached) $ac_c" 1>&6
10162 else
10163   
10164 cat > conftest.$ac_ext <<EOF
10165 #line 10166 "configure"
10166 #include "confdefs.h"
10167 #include <sys/types.h>
10168 #if defined(HAVE_RPC_RPC_H)
10169 #include <rpc/rpc.h>
10170 #endif
10171 int main() {
10172 int16 testvar;
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10176   rm -rf conftest*
10177   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10183 fi
10184 rm -f conftest*
10185 fi
10186
10187 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10188 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10189     cat >> confdefs.h <<\EOF
10190 #define HAVE_INT16_FROM_RPC_RPC_H 1
10191 EOF
10192
10193 fi
10194
10195 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10196 echo "configure:10197: checking for uint16 typedef included by rpc/rpc.h" >&5
10197 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10198   echo $ac_n "(cached) $ac_c" 1>&6
10199 else
10200   
10201 cat > conftest.$ac_ext <<EOF
10202 #line 10203 "configure"
10203 #include "confdefs.h"
10204 #include <sys/types.h>
10205 #if defined(HAVE_RPC_RPC_H)
10206 #include <rpc/rpc.h>
10207 #endif
10208 int main() {
10209 uint16 testvar;
10210 ; return 0; }
10211 EOF
10212 if { (eval echo configure:10213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10213   rm -rf conftest*
10214   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10215 else
10216   echo "configure: failed program was:" >&5
10217   cat conftest.$ac_ext >&5
10218   rm -rf conftest*
10219   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10220 fi
10221 rm -f conftest*
10222 fi
10223
10224 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10225 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10226     cat >> confdefs.h <<\EOF
10227 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10228 EOF
10229
10230 fi
10231
10232 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10233 echo "configure:10234: checking for int32 typedef included by rpc/rpc.h" >&5
10234 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10235   echo $ac_n "(cached) $ac_c" 1>&6
10236 else
10237   
10238 cat > conftest.$ac_ext <<EOF
10239 #line 10240 "configure"
10240 #include "confdefs.h"
10241 #include <sys/types.h>
10242 #if defined(HAVE_RPC_RPC_H)
10243 #include <rpc/rpc.h>
10244 #endif
10245 int main() {
10246 int32 testvar;
10247 ; return 0; }
10248 EOF
10249 if { (eval echo configure:10250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10250   rm -rf conftest*
10251   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10252 else
10253   echo "configure: failed program was:" >&5
10254   cat conftest.$ac_ext >&5
10255   rm -rf conftest*
10256   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10257 fi
10258 rm -f conftest*
10259 fi
10260
10261 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10262 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10263     cat >> confdefs.h <<\EOF
10264 #define HAVE_INT32_FROM_RPC_RPC_H 1
10265 EOF
10266
10267 fi
10268
10269 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10270 echo "configure:10271: checking for uint32 typedef included by rpc/rpc.h" >&5
10271 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10272   echo $ac_n "(cached) $ac_c" 1>&6
10273 else
10274   
10275 cat > conftest.$ac_ext <<EOF
10276 #line 10277 "configure"
10277 #include "confdefs.h"
10278 #include <sys/types.h>
10279 #if defined(HAVE_RPC_RPC_H)
10280 #include <rpc/rpc.h>
10281 #endif
10282 int main() {
10283 uint32 testvar;
10284 ; return 0; }
10285 EOF
10286 if { (eval echo configure:10287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10287   rm -rf conftest*
10288   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10289 else
10290   echo "configure: failed program was:" >&5
10291   cat conftest.$ac_ext >&5
10292   rm -rf conftest*
10293   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10294 fi
10295 rm -f conftest*
10296 fi
10297
10298 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10299 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10300     cat >> confdefs.h <<\EOF
10301 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10302 EOF
10303
10304 fi
10305
10306
10307 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10308 echo "configure:10309: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10309 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10310   echo $ac_n "(cached) $ac_c" 1>&6
10311 else
10312   
10313 cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316 #include <sys/types.h>
10317 #ifdef HAVE_SYS_SECURITY_H
10318 #include <sys/security.h>
10319 #include <prot.h>
10320 #endif  /* HAVE_SYS_SECURITY_H */
10321 #if defined(HAVE_RPC_RPC_H)
10322 #include <rpc/rpc.h>
10323 #endif
10324 int main() {
10325 int testvar;
10326 ; return 0; }
10327 EOF
10328 if { (eval echo configure:10329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10329   rm -rf conftest*
10330   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10331 else
10332   echo "configure: failed program was:" >&5
10333   cat conftest.$ac_ext >&5
10334   rm -rf conftest*
10335   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10336 fi
10337 rm -f conftest*
10338 fi
10339
10340 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10341 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10342     cat >> confdefs.h <<\EOF
10343 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10344 EOF
10345
10346 fi
10347
10348 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10349 echo "configure:10350: checking for test routines" >&5
10350 if test "$cross_compiling" = yes; then
10351   echo "configure: warning: cannot run when cross-compiling" 1>&2
10352 else
10353   cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356 #include "${srcdir-.}/tests/trivial.c"
10357 EOF
10358 if { (eval echo configure:10359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10359 then
10360   echo "$ac_t""yes" 1>&6
10361 else
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -fr conftest*
10365   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10366 fi
10367 rm -fr conftest*
10368 fi
10369
10370
10371 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10372 echo "configure:10373: checking for ftruncate extend" >&5
10373 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10374   echo $ac_n "(cached) $ac_c" 1>&6
10375 else
10376   
10377 if test "$cross_compiling" = yes; then
10378   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10379 else
10380   cat > conftest.$ac_ext <<EOF
10381 #line 10382 "configure"
10382 #include "confdefs.h"
10383 #include "${srcdir-.}/tests/ftruncate.c"
10384 EOF
10385 if { (eval echo configure:10386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10386 then
10387   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10388 else
10389   echo "configure: failed program was:" >&5
10390   cat conftest.$ac_ext >&5
10391   rm -fr conftest*
10392   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10393 fi
10394 rm -fr conftest*
10395 fi
10396
10397 fi
10398
10399 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10400 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10401     cat >> confdefs.h <<\EOF
10402 #define HAVE_FTRUNCATE_EXTEND 1
10403 EOF
10404
10405 fi
10406
10407 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10408 echo "configure:10409: checking for AF_LOCAL socket support" >&5
10409 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10410   echo $ac_n "(cached) $ac_c" 1>&6
10411 else
10412   
10413 if test "$cross_compiling" = yes; then
10414   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10415 else
10416   cat > conftest.$ac_ext <<EOF
10417 #line 10418 "configure"
10418 #include "confdefs.h"
10419 #include "${srcdir-.}/tests/unixsock.c"
10420 EOF
10421 if { (eval echo configure:10422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10422 then
10423   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10424 else
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -fr conftest*
10428   samba_cv_HAVE_WORKING_AF_LOCAL=no
10429 fi
10430 rm -fr conftest*
10431 fi
10432
10433 fi
10434
10435 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10436 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10437 then
10438     cat >> confdefs.h <<\EOF
10439 #define HAVE_WORKING_AF_LOCAL 1
10440 EOF
10441
10442 fi
10443
10444 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10445 echo "configure:10446: checking for broken getgroups" >&5
10446 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10447   echo $ac_n "(cached) $ac_c" 1>&6
10448 else
10449   
10450 if test "$cross_compiling" = yes; then
10451   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10452 else
10453   cat > conftest.$ac_ext <<EOF
10454 #line 10455 "configure"
10455 #include "confdefs.h"
10456 #include "${srcdir-.}/tests/getgroups.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   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10461 else
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -fr conftest*
10465   samba_cv_HAVE_BROKEN_GETGROUPS=no
10466 fi
10467 rm -fr conftest*
10468 fi
10469
10470 fi
10471
10472 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10473 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10474     cat >> confdefs.h <<\EOF
10475 #define HAVE_BROKEN_GETGROUPS 1
10476 EOF
10477
10478 fi
10479
10480 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10481 echo "configure:10482: checking whether getpass should be replaced" >&5
10482 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10483   echo $ac_n "(cached) $ac_c" 1>&6
10484 else
10485   
10486 SAVE_CPPFLAGS="$CPPFLAGS"
10487 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10488 cat > conftest.$ac_ext <<EOF
10489 #line 10490 "configure"
10490 #include "confdefs.h"
10491
10492 #define REPLACE_GETPASS 1
10493 #define NO_CONFIG_H 1
10494 #define main dont_declare_main
10495 #include "${srcdir-.}/lib/getsmbpass.c"
10496 #undef main
10497
10498 int main() {
10499
10500 ; return 0; }
10501 EOF
10502 if { (eval echo configure:10503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10503   rm -rf conftest*
10504   samba_cv_REPLACE_GETPASS=yes
10505 else
10506   echo "configure: failed program was:" >&5
10507   cat conftest.$ac_ext >&5
10508   rm -rf conftest*
10509   samba_cv_REPLACE_GETPASS=no
10510 fi
10511 rm -f conftest*
10512 CPPFLAGS="$SAVE_CPPFLAGS"
10513
10514 fi
10515
10516 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10517 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10518         cat >> confdefs.h <<\EOF
10519 #define REPLACE_GETPASS 1
10520 EOF
10521
10522 fi
10523
10524 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10525 echo "configure:10526: checking for broken inet_ntoa" >&5
10526 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10527   echo $ac_n "(cached) $ac_c" 1>&6
10528 else
10529   
10530 if test "$cross_compiling" = yes; then
10531   samba_cv_REPLACE_INET_NTOA=cross
10532 else
10533   cat > conftest.$ac_ext <<EOF
10534 #line 10535 "configure"
10535 #include "confdefs.h"
10536
10537 #include <stdio.h>
10538 #include <sys/types.h>
10539 #include <netinet/in.h>
10540 #ifdef HAVE_ARPA_INET_H
10541 #include <arpa/inet.h>
10542 #endif
10543 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10544 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10545     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10546 exit(1);}
10547 EOF
10548 if { (eval echo configure:10549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10549 then
10550   samba_cv_REPLACE_INET_NTOA=yes
10551 else
10552   echo "configure: failed program was:" >&5
10553   cat conftest.$ac_ext >&5
10554   rm -fr conftest*
10555   samba_cv_REPLACE_INET_NTOA=no
10556 fi
10557 rm -fr conftest*
10558 fi
10559
10560 fi
10561
10562 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10563 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10564     cat >> confdefs.h <<\EOF
10565 #define REPLACE_INET_NTOA 1
10566 EOF
10567
10568 fi
10569
10570 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10571 echo "configure:10572: checking for secure mkstemp" >&5
10572 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10573   echo $ac_n "(cached) $ac_c" 1>&6
10574 else
10575   
10576 if test "$cross_compiling" = yes; then
10577   samba_cv_HAVE_SECURE_MKSTEMP=cross
10578 else
10579   cat > conftest.$ac_ext <<EOF
10580 #line 10581 "configure"
10581 #include "confdefs.h"
10582 #include <stdlib.h>
10583 #include <sys/types.h>
10584 #include <sys/stat.h>
10585 #include <unistd.h>
10586 main() { 
10587   struct stat st;
10588   char tpl[20]="/tmp/test.XXXXXX"; 
10589   int fd = mkstemp(tpl); 
10590   if (fd == -1) exit(1);
10591   unlink(tpl);
10592   if (fstat(fd, &st) != 0) exit(1);
10593   if ((st.st_mode & 0777) != 0600) exit(1);
10594   exit(0);
10595 }
10596 EOF
10597 if { (eval echo configure:10598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10598 then
10599   samba_cv_HAVE_SECURE_MKSTEMP=yes
10600 else
10601   echo "configure: failed program was:" >&5
10602   cat conftest.$ac_ext >&5
10603   rm -fr conftest*
10604   samba_cv_HAVE_SECURE_MKSTEMP=no
10605 fi
10606 rm -fr conftest*
10607 fi
10608
10609 fi
10610
10611 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10612 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10613     cat >> confdefs.h <<\EOF
10614 #define HAVE_SECURE_MKSTEMP 1
10615 EOF
10616
10617 fi
10618
10619 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10620 echo "configure:10621: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10621 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10622   echo $ac_n "(cached) $ac_c" 1>&6
10623 else
10624   
10625 if test "$cross_compiling" = yes; then
10626   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10627 else
10628   cat > conftest.$ac_ext <<EOF
10629 #line 10630 "configure"
10630 #include "confdefs.h"
10631 #include <unistd.h>
10632 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10633 EOF
10634 if { (eval echo configure:10635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10635 then
10636   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10637 else
10638   echo "configure: failed program was:" >&5
10639   cat conftest.$ac_ext >&5
10640   rm -fr conftest*
10641   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10642 fi
10643 rm -fr conftest*
10644 fi
10645
10646 fi
10647
10648 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10649 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10650     cat >> confdefs.h <<\EOF
10651 #define SYSCONF_SC_NGROUPS_MAX 1
10652 EOF
10653
10654 fi
10655
10656 echo $ac_n "checking for root""... $ac_c" 1>&6
10657 echo "configure:10658: checking for root" >&5
10658 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10659   echo $ac_n "(cached) $ac_c" 1>&6
10660 else
10661   
10662 if test "$cross_compiling" = yes; then
10663   samba_cv_HAVE_ROOT=cross
10664 else
10665   cat > conftest.$ac_ext <<EOF
10666 #line 10667 "configure"
10667 #include "confdefs.h"
10668 main() { exit(getuid() != 0); }
10669 EOF
10670 if { (eval echo configure:10671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10671 then
10672   samba_cv_HAVE_ROOT=yes
10673 else
10674   echo "configure: failed program was:" >&5
10675   cat conftest.$ac_ext >&5
10676   rm -fr conftest*
10677   samba_cv_HAVE_ROOT=no
10678 fi
10679 rm -fr conftest*
10680 fi
10681
10682 fi
10683
10684 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10685 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10686     cat >> confdefs.h <<\EOF
10687 #define HAVE_ROOT 1
10688 EOF
10689
10690 else
10691     echo "configure: warning: running as non-root will disable some tests" 1>&2
10692 fi
10693
10694 ##################
10695 # look for a method of finding the list of network interfaces
10696 iface=no;
10697 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10698 echo "configure:10699: checking for iface AIX" >&5
10699 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   
10703 if test "$cross_compiling" = yes; then
10704   samba_cv_HAVE_IFACE_AIX=cross
10705 else
10706   cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709
10710 #define HAVE_IFACE_AIX 1
10711 #define AUTOCONF_TEST 1
10712 #include "confdefs.h"
10713 #include "${srcdir-.}/lib/interfaces.c"
10714 EOF
10715 if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10716 then
10717   samba_cv_HAVE_IFACE_AIX=yes
10718 else
10719   echo "configure: failed program was:" >&5
10720   cat conftest.$ac_ext >&5
10721   rm -fr conftest*
10722   samba_cv_HAVE_IFACE_AIX=no
10723 fi
10724 rm -fr conftest*
10725 fi
10726
10727 fi
10728
10729 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10730 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10731     iface=yes;cat >> confdefs.h <<\EOF
10732 #define HAVE_IFACE_AIX 1
10733 EOF
10734
10735 fi
10736
10737 if test $iface = no; then
10738 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10739 echo "configure:10740: checking for iface ifconf" >&5
10740 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   
10744 if test "$cross_compiling" = yes; then
10745   samba_cv_HAVE_IFACE_IFCONF=cross
10746 else
10747   cat > conftest.$ac_ext <<EOF
10748 #line 10749 "configure"
10749 #include "confdefs.h"
10750
10751 #define HAVE_IFACE_IFCONF 1
10752 #define AUTOCONF_TEST 1
10753 #include "confdefs.h"
10754 #include "${srcdir-.}/lib/interfaces.c"
10755 EOF
10756 if { (eval echo configure:10757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10757 then
10758   samba_cv_HAVE_IFACE_IFCONF=yes
10759 else
10760   echo "configure: failed program was:" >&5
10761   cat conftest.$ac_ext >&5
10762   rm -fr conftest*
10763   samba_cv_HAVE_IFACE_IFCONF=no
10764 fi
10765 rm -fr conftest*
10766 fi
10767
10768 fi
10769
10770 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10771 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10772     iface=yes;cat >> confdefs.h <<\EOF
10773 #define HAVE_IFACE_IFCONF 1
10774 EOF
10775
10776 fi
10777 fi
10778
10779 if test $iface = no; then
10780 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10781 echo "configure:10782: checking for iface ifreq" >&5
10782 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10783   echo $ac_n "(cached) $ac_c" 1>&6
10784 else
10785   
10786 if test "$cross_compiling" = yes; then
10787   samba_cv_HAVE_IFACE_IFREQ=cross
10788 else
10789   cat > conftest.$ac_ext <<EOF
10790 #line 10791 "configure"
10791 #include "confdefs.h"
10792
10793 #define HAVE_IFACE_IFREQ 1
10794 #define AUTOCONF_TEST 1
10795 #include "confdefs.h"
10796 #include "${srcdir-.}/lib/interfaces.c"
10797 EOF
10798 if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10799 then
10800   samba_cv_HAVE_IFACE_IFREQ=yes
10801 else
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -fr conftest*
10805   samba_cv_HAVE_IFACE_IFREQ=no
10806 fi
10807 rm -fr conftest*
10808 fi
10809
10810 fi
10811
10812 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10813 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10814     iface=yes;cat >> confdefs.h <<\EOF
10815 #define HAVE_IFACE_IFREQ 1
10816 EOF
10817
10818 fi
10819 fi
10820
10821
10822 ################################################
10823 # look for a method of setting the effective uid
10824 seteuid=no;
10825 if test $seteuid = no; then
10826 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10827 echo "configure:10828: checking for setresuid" >&5
10828 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10829   echo $ac_n "(cached) $ac_c" 1>&6
10830 else
10831   
10832 if test "$cross_compiling" = yes; then
10833   samba_cv_USE_SETRESUID=cross
10834 else
10835   cat > conftest.$ac_ext <<EOF
10836 #line 10837 "configure"
10837 #include "confdefs.h"
10838
10839 #define AUTOCONF_TEST 1
10840 #define USE_SETRESUID 1
10841 #include "confdefs.h"
10842 #include "${srcdir-.}/lib/util_sec.c"
10843 EOF
10844 if { (eval echo configure:10845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10845 then
10846   samba_cv_USE_SETRESUID=yes
10847 else
10848   echo "configure: failed program was:" >&5
10849   cat conftest.$ac_ext >&5
10850   rm -fr conftest*
10851   samba_cv_USE_SETRESUID=no
10852 fi
10853 rm -fr conftest*
10854 fi
10855
10856 fi
10857
10858 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10859 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10860     seteuid=yes;cat >> confdefs.h <<\EOF
10861 #define USE_SETRESUID 1
10862 EOF
10863
10864 fi
10865 fi
10866
10867
10868 if test $seteuid = no; then
10869 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10870 echo "configure:10871: checking for setreuid" >&5
10871 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10872   echo $ac_n "(cached) $ac_c" 1>&6
10873 else
10874   
10875 if test "$cross_compiling" = yes; then
10876   samba_cv_USE_SETREUID=cross
10877 else
10878   cat > conftest.$ac_ext <<EOF
10879 #line 10880 "configure"
10880 #include "confdefs.h"
10881
10882 #define AUTOCONF_TEST 1
10883 #define USE_SETREUID 1
10884 #include "confdefs.h"
10885 #include "${srcdir-.}/lib/util_sec.c"
10886 EOF
10887 if { (eval echo configure:10888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10888 then
10889   samba_cv_USE_SETREUID=yes
10890 else
10891   echo "configure: failed program was:" >&5
10892   cat conftest.$ac_ext >&5
10893   rm -fr conftest*
10894   samba_cv_USE_SETREUID=no
10895 fi
10896 rm -fr conftest*
10897 fi
10898
10899 fi
10900
10901 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10902 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10903     seteuid=yes;cat >> confdefs.h <<\EOF
10904 #define USE_SETREUID 1
10905 EOF
10906
10907 fi
10908 fi
10909
10910 if test $seteuid = no; then
10911 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10912 echo "configure:10913: checking for seteuid" >&5
10913 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10914   echo $ac_n "(cached) $ac_c" 1>&6
10915 else
10916   
10917 if test "$cross_compiling" = yes; then
10918   samba_cv_USE_SETEUID=cross
10919 else
10920   cat > conftest.$ac_ext <<EOF
10921 #line 10922 "configure"
10922 #include "confdefs.h"
10923
10924 #define AUTOCONF_TEST 1
10925 #define USE_SETEUID 1
10926 #include "confdefs.h"
10927 #include "${srcdir-.}/lib/util_sec.c"
10928 EOF
10929 if { (eval echo configure:10930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10930 then
10931   samba_cv_USE_SETEUID=yes
10932 else
10933   echo "configure: failed program was:" >&5
10934   cat conftest.$ac_ext >&5
10935   rm -fr conftest*
10936   samba_cv_USE_SETEUID=no
10937 fi
10938 rm -fr conftest*
10939 fi
10940
10941 fi
10942
10943 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10944 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10945     seteuid=yes;cat >> confdefs.h <<\EOF
10946 #define USE_SETEUID 1
10947 EOF
10948
10949 fi
10950 fi
10951
10952 if test $seteuid = no; then
10953 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10954 echo "configure:10955: checking for setuidx" >&5
10955 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10956   echo $ac_n "(cached) $ac_c" 1>&6
10957 else
10958   
10959 if test "$cross_compiling" = yes; then
10960   samba_cv_USE_SETUIDX=cross
10961 else
10962   cat > conftest.$ac_ext <<EOF
10963 #line 10964 "configure"
10964 #include "confdefs.h"
10965
10966 #define AUTOCONF_TEST 1
10967 #define USE_SETUIDX 1
10968 #include "confdefs.h"
10969 #include "${srcdir-.}/lib/util_sec.c"
10970 EOF
10971 if { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10972 then
10973   samba_cv_USE_SETUIDX=yes
10974 else
10975   echo "configure: failed program was:" >&5
10976   cat conftest.$ac_ext >&5
10977   rm -fr conftest*
10978   samba_cv_USE_SETUIDX=no
10979 fi
10980 rm -fr conftest*
10981 fi
10982
10983 fi
10984
10985 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10986 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10987     seteuid=yes;cat >> confdefs.h <<\EOF
10988 #define USE_SETUIDX 1
10989 EOF
10990
10991 fi
10992 fi
10993
10994
10995 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10996 echo "configure:10997: checking for working mmap" >&5
10997 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10998   echo $ac_n "(cached) $ac_c" 1>&6
10999 else
11000   
11001 if test "$cross_compiling" = yes; then
11002   samba_cv_HAVE_MMAP=cross
11003 else
11004   cat > conftest.$ac_ext <<EOF
11005 #line 11006 "configure"
11006 #include "confdefs.h"
11007 #include "${srcdir-.}/tests/shared_mmap.c"
11008 EOF
11009 if { (eval echo configure:11010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11010 then
11011   samba_cv_HAVE_MMAP=yes
11012 else
11013   echo "configure: failed program was:" >&5
11014   cat conftest.$ac_ext >&5
11015   rm -fr conftest*
11016   samba_cv_HAVE_MMAP=no
11017 fi
11018 rm -fr conftest*
11019 fi
11020
11021 fi
11022
11023 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11024 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11025     cat >> confdefs.h <<\EOF
11026 #define HAVE_MMAP 1
11027 EOF
11028
11029 fi
11030
11031 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11032 echo "configure:11033: checking for ftruncate needs root" >&5
11033 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11034   echo $ac_n "(cached) $ac_c" 1>&6
11035 else
11036   
11037 if test "$cross_compiling" = yes; then
11038   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11039 else
11040   cat > conftest.$ac_ext <<EOF
11041 #line 11042 "configure"
11042 #include "confdefs.h"
11043 #include "${srcdir-.}/tests/ftruncroot.c"
11044 EOF
11045 if { (eval echo configure:11046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11046 then
11047   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11048 else
11049   echo "configure: failed program was:" >&5
11050   cat conftest.$ac_ext >&5
11051   rm -fr conftest*
11052   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11053 fi
11054 rm -fr conftest*
11055 fi
11056
11057 fi
11058
11059 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11060 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11061     cat >> confdefs.h <<\EOF
11062 #define FTRUNCATE_NEEDS_ROOT 1
11063 EOF
11064
11065 fi
11066
11067 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11068 echo "configure:11069: checking for fcntl locking" >&5
11069 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11070   echo $ac_n "(cached) $ac_c" 1>&6
11071 else
11072   
11073 if test "$cross_compiling" = yes; then
11074   samba_cv_HAVE_FCNTL_LOCK=cross
11075 else
11076   cat > conftest.$ac_ext <<EOF
11077 #line 11078 "configure"
11078 #include "confdefs.h"
11079 #include "${srcdir-.}/tests/fcntl_lock.c"
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11082 then
11083   samba_cv_HAVE_FCNTL_LOCK=yes
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -fr conftest*
11088   samba_cv_HAVE_FCNTL_LOCK=no
11089 fi
11090 rm -fr conftest*
11091 fi
11092
11093 fi
11094
11095 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11096 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11097     cat >> confdefs.h <<\EOF
11098 #define HAVE_FCNTL_LOCK 1
11099 EOF
11100
11101 fi
11102
11103 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11104 echo "configure:11105: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11105 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11106   echo $ac_n "(cached) $ac_c" 1>&6
11107 else
11108   
11109 if test "$cross_compiling" = yes; then
11110   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11111 else
11112   cat > conftest.$ac_ext <<EOF
11113 #line 11114 "configure"
11114 #include "confdefs.h"
11115 #include "${srcdir-.}/tests/fcntl_lock64.c"
11116 EOF
11117 if { (eval echo configure:11118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11118 then
11119   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11120 else
11121   echo "configure: failed program was:" >&5
11122   cat conftest.$ac_ext >&5
11123   rm -fr conftest*
11124   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11125 fi
11126 rm -fr conftest*
11127 fi
11128
11129 fi
11130
11131 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11132 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11133     cat >> confdefs.h <<\EOF
11134 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11135 EOF
11136
11137
11138 else
11139
11140
11141   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11142 echo "configure:11143: checking for 64 bit fcntl locking" >&5
11143 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11144   echo $ac_n "(cached) $ac_c" 1>&6
11145 else
11146   
11147   if test "$cross_compiling" = yes; then
11148   samba_cv_HAVE_STRUCT_FLOCK64=cross
11149 else
11150   cat > conftest.$ac_ext <<EOF
11151 #line 11152 "configure"
11152 #include "confdefs.h"
11153
11154 #if defined(HAVE_UNISTD_H)
11155 #include <unistd.h>
11156 #endif
11157 #include <stdio.h>
11158 #include <stdlib.h>
11159
11160 #ifdef HAVE_FCNTL_H
11161 #include <fcntl.h>
11162 #endif
11163
11164 #ifdef HAVE_SYS_FCNTL_H
11165 #include <sys/fcntl.h>
11166 #endif
11167 main() { struct flock64 fl64;
11168 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11169 exit(0);
11170 #else
11171 exit(1);
11172 #endif
11173 }
11174 EOF
11175 if { (eval echo configure:11176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11176 then
11177   samba_cv_HAVE_STRUCT_FLOCK64=yes
11178 else
11179   echo "configure: failed program was:" >&5
11180   cat conftest.$ac_ext >&5
11181   rm -fr conftest*
11182   samba_cv_HAVE_STRUCT_FLOCK64=no
11183 fi
11184 rm -fr conftest*
11185 fi
11186
11187 fi
11188
11189 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11190
11191   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11192       cat >> confdefs.h <<\EOF
11193 #define HAVE_STRUCT_FLOCK64 1
11194 EOF
11195
11196   fi
11197 fi
11198
11199
11200 case "$host_os" in
11201 *linux*)
11202 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11203 echo "configure:11204: checking for broken RedHat 7.2 system header files" >&5
11204 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11205   echo $ac_n "(cached) $ac_c" 1>&6
11206 else
11207   
11208 cat > conftest.$ac_ext <<EOF
11209 #line 11210 "configure"
11210 #include "confdefs.h"
11211
11212 #ifdef HAVE_SYS_VFS_H
11213 #include <sys/vfs.h>
11214 #endif
11215 #ifdef HAVE_SYS_CAPABILITY_H
11216 #include <sys/capability.h>
11217 #endif
11218
11219 int main() {
11220 int i;
11221 ; return 0; }
11222 EOF
11223 if { (eval echo configure:11224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11224   rm -rf conftest*
11225   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11226 else
11227   echo "configure: failed program was:" >&5
11228   cat conftest.$ac_ext >&5
11229   rm -rf conftest*
11230   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11231 fi
11232 rm -f conftest*
11233 fi
11234
11235 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11236 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11237    cat >> confdefs.h <<\EOF
11238 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11239 EOF
11240
11241 fi
11242 ;;
11243 esac
11244
11245 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11246 echo "configure:11247: checking for broken nisplus include files" >&5
11247 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11248   echo $ac_n "(cached) $ac_c" 1>&6
11249 else
11250   
11251 cat > conftest.$ac_ext <<EOF
11252 #line 11253 "configure"
11253 #include "confdefs.h"
11254 #include <sys/acl.h>
11255 #if defined(HAVE_RPCSVC_NIS_H)
11256 #include <rpcsvc/nis.h>
11257 #endif
11258 int main() {
11259 int i;
11260 ; return 0; }
11261 EOF
11262 if { (eval echo configure:11263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11263   rm -rf conftest*
11264   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11265 else
11266   echo "configure: failed program was:" >&5
11267   cat conftest.$ac_ext >&5
11268   rm -rf conftest*
11269   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11270 fi
11271 rm -f conftest*
11272 fi
11273
11274 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11275 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11276     cat >> confdefs.h <<\EOF
11277 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11278 EOF
11279
11280 fi
11281
11282
11283 #################################################
11284 # check for smbwrapper support
11285 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11286 echo "configure:11287: checking whether to use smbwrapper" >&5
11287 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11288 if test "${with_smbwrapper+set}" = set; then
11289   withval="$with_smbwrapper"
11290    case "$withval" in
11291   yes)
11292     echo "$ac_t""yes" 1>&6
11293     cat >> confdefs.h <<\EOF
11294 #define WITH_SMBWRAPPER 1
11295 EOF
11296
11297         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11298
11299         if test x$ATTEMPT_WRAP32_BUILD = x; then
11300                 WRAP32=""
11301         else
11302                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11303         fi
11304
11305 # Conditions under which smbwrapper should not be built.
11306
11307         if test x$PICFLAG = x; then
11308            echo No support for PIC code - disabling smbwrapper and smbsh
11309            WRAP=""
11310            WRAP32=""
11311         elif test x$ac_cv_func_syscall = xno; then
11312            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11313            WRAP=""
11314            WRAP32=""
11315         fi
11316     ;;
11317   *)
11318     echo "$ac_t""no" 1>&6
11319     ;;
11320   esac 
11321 else
11322   echo "$ac_t""no" 1>&6
11323
11324 fi
11325
11326
11327 #################################################
11328 # check for AFS clear-text auth support
11329 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11330 echo "configure:11331: checking whether to use AFS clear-text auth" >&5
11331 # Check whether --with-afs or --without-afs was given.
11332 if test "${with_afs+set}" = set; then
11333   withval="$with_afs"
11334    case "$withval" in
11335   yes)
11336     echo "$ac_t""yes" 1>&6
11337     cat >> confdefs.h <<\EOF
11338 #define WITH_AFS 1
11339 EOF
11340
11341     ;;
11342   *)
11343     echo "$ac_t""no" 1>&6
11344     ;;
11345   esac 
11346 else
11347   echo "$ac_t""no" 1>&6
11348
11349 fi
11350
11351
11352
11353 #################################################
11354 # check for the DFS clear-text auth system
11355 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11356 echo "configure:11357: checking whether to use DFS clear-text auth" >&5
11357 # Check whether --with-dfs or --without-dfs was given.
11358 if test "${with_dfs+set}" = set; then
11359   withval="$with_dfs"
11360    case "$withval" in
11361   yes)
11362     echo "$ac_t""yes" 1>&6
11363     cat >> confdefs.h <<\EOF
11364 #define WITH_DFS 1
11365 EOF
11366
11367     ;;
11368   *)
11369     echo "$ac_t""no" 1>&6
11370     ;;
11371   esac 
11372 else
11373   echo "$ac_t""no" 1>&6
11374
11375 fi
11376
11377
11378
11379 #################################################
11380 # see if this box has the RedHat location for kerberos
11381 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11382 echo "configure:11383: checking for /usr/kerberos" >&5
11383 if test -d /usr/kerberos; then
11384     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11385     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11386     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11387     echo "$ac_t""yes" 1>&6
11388 else
11389     echo "$ac_t""no" 1>&6
11390 fi
11391
11392 #################################################
11393 # check for location of Kerberos 5 install
11394 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11395 echo "configure:11396: checking for kerberos 5 install path" >&5
11396 # Check whether --with-krb5 or --without-krb5 was given.
11397 if test "${with_krb5+set}" = set; then
11398   withval="$with_krb5"
11399    case "$withval" in
11400   no)
11401     echo "$ac_t""no" 1>&6
11402     ;;
11403   *)
11404     echo "$ac_t""yes" 1>&6
11405     LIBS="$LIBS -lkrb5"
11406     CFLAGS="$CFLAGS -I$withval/include"
11407     CPPFLAGS="$CPPFLAGS -I$withval/include"
11408     LDFLAGS="$LDFLAGS -L$withval/lib"
11409     ;;
11410   esac 
11411 else
11412   echo "$ac_t""no" 1>&6
11413
11414 fi
11415
11416
11417 # now check for krb5.h. Some systems have the libraries without the headers!
11418 # note that this check is done here to allow for different kerberos
11419 # include paths
11420 for ac_hdr in krb5.h
11421 do
11422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11424 echo "configure:11425: checking for $ac_hdr" >&5
11425 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11426   echo $ac_n "(cached) $ac_c" 1>&6
11427 else
11428   cat > conftest.$ac_ext <<EOF
11429 #line 11430 "configure"
11430 #include "confdefs.h"
11431 #include <$ac_hdr>
11432 EOF
11433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11434 { (eval echo configure:11435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11436 if test -z "$ac_err"; then
11437   rm -rf conftest*
11438   eval "ac_cv_header_$ac_safe=yes"
11439 else
11440   echo "$ac_err" >&5
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   eval "ac_cv_header_$ac_safe=no"
11445 fi
11446 rm -f conftest*
11447 fi
11448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11449   echo "$ac_t""yes" 1>&6
11450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11451   cat >> confdefs.h <<EOF
11452 #define $ac_tr_hdr 1
11453 EOF
11454  
11455 else
11456   echo "$ac_t""no" 1>&6
11457 fi
11458 done
11459
11460
11461 # now check for gssapi headers.  This is also done here to allow for
11462 # different kerberos include paths
11463 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11464 do
11465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11467 echo "configure:11468: checking for $ac_hdr" >&5
11468 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11469   echo $ac_n "(cached) $ac_c" 1>&6
11470 else
11471   cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474 #include <$ac_hdr>
11475 EOF
11476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11477 { (eval echo configure:11478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11479 if test -z "$ac_err"; then
11480   rm -rf conftest*
11481   eval "ac_cv_header_$ac_safe=yes"
11482 else
11483   echo "$ac_err" >&5
11484   echo "configure: failed program was:" >&5
11485   cat conftest.$ac_ext >&5
11486   rm -rf conftest*
11487   eval "ac_cv_header_$ac_safe=no"
11488 fi
11489 rm -f conftest*
11490 fi
11491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11492   echo "$ac_t""yes" 1>&6
11493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11494   cat >> confdefs.h <<EOF
11495 #define $ac_tr_hdr 1
11496 EOF
11497  
11498 else
11499   echo "$ac_t""no" 1>&6
11500 fi
11501 done
11502
11503
11504 ##################################################################
11505 # we might need the k5crypto and com_err libraries on some systems
11506 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11507 echo "configure:11508: checking for _et_list in -lcom_err" >&5
11508 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11509 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11510   echo $ac_n "(cached) $ac_c" 1>&6
11511 else
11512   ac_save_LIBS="$LIBS"
11513 LIBS="-lcom_err  $LIBS"
11514 cat > conftest.$ac_ext <<EOF
11515 #line 11516 "configure"
11516 #include "confdefs.h"
11517 /* Override any gcc2 internal prototype to avoid an error.  */
11518 /* We use char because int might match the return type of a gcc2
11519     builtin and then its argument prototype would still apply.  */
11520 char _et_list();
11521
11522 int main() {
11523 _et_list()
11524 ; return 0; }
11525 EOF
11526 if { (eval echo configure:11527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11527   rm -rf conftest*
11528   eval "ac_cv_lib_$ac_lib_var=yes"
11529 else
11530   echo "configure: failed program was:" >&5
11531   cat conftest.$ac_ext >&5
11532   rm -rf conftest*
11533   eval "ac_cv_lib_$ac_lib_var=no"
11534 fi
11535 rm -f conftest*
11536 LIBS="$ac_save_LIBS"
11537
11538 fi
11539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11540   echo "$ac_t""yes" 1>&6
11541   LIBS="$LIBS -lcom_err"
11542 else
11543   echo "$ac_t""no" 1>&6
11544 fi
11545
11546 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11547 echo "configure:11548: checking for krb5_encrypt_data in -lk5crypto" >&5
11548 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11549 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11550   echo $ac_n "(cached) $ac_c" 1>&6
11551 else
11552   ac_save_LIBS="$LIBS"
11553 LIBS="-lk5crypto  $LIBS"
11554 cat > conftest.$ac_ext <<EOF
11555 #line 11556 "configure"
11556 #include "confdefs.h"
11557 /* Override any gcc2 internal prototype to avoid an error.  */
11558 /* We use char because int might match the return type of a gcc2
11559     builtin and then its argument prototype would still apply.  */
11560 char krb5_encrypt_data();
11561
11562 int main() {
11563 krb5_encrypt_data()
11564 ; return 0; }
11565 EOF
11566 if { (eval echo configure:11567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11567   rm -rf conftest*
11568   eval "ac_cv_lib_$ac_lib_var=yes"
11569 else
11570   echo "configure: failed program was:" >&5
11571   cat conftest.$ac_ext >&5
11572   rm -rf conftest*
11573   eval "ac_cv_lib_$ac_lib_var=no"
11574 fi
11575 rm -f conftest*
11576 LIBS="$ac_save_LIBS"
11577
11578 fi
11579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11580   echo "$ac_t""yes" 1>&6
11581   LIBS="$LIBS -lk5crypto"
11582 else
11583   echo "$ac_t""no" 1>&6
11584 fi
11585
11586 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11587 echo "configure:11588: checking for gss_display_status in -lgssapi_krb5" >&5
11588 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   ac_save_LIBS="$LIBS"
11593 LIBS="-lgssapi_krb5  $LIBS"
11594 cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597 /* Override any gcc2 internal prototype to avoid an error.  */
11598 /* We use char because int might match the return type of a gcc2
11599     builtin and then its argument prototype would still apply.  */
11600 char gss_display_status();
11601
11602 int main() {
11603 gss_display_status()
11604 ; return 0; }
11605 EOF
11606 if { (eval echo configure:11607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11607   rm -rf conftest*
11608   eval "ac_cv_lib_$ac_lib_var=yes"
11609 else
11610   echo "configure: failed program was:" >&5
11611   cat conftest.$ac_ext >&5
11612   rm -rf conftest*
11613   eval "ac_cv_lib_$ac_lib_var=no"
11614 fi
11615 rm -f conftest*
11616 LIBS="$ac_save_LIBS"
11617
11618 fi
11619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11620   echo "$ac_t""yes" 1>&6
11621   LIBS="$LIBS -lgssapi_krb5"
11622 else
11623   echo "$ac_t""no" 1>&6
11624 fi
11625
11626
11627
11628 ########################################################
11629 # now see if we can find the krb5 libs in standard paths
11630 # or as specified above
11631 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11632 echo "configure:11633: checking for krb5_mk_req_extended in -lkrb5" >&5
11633 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11634 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11635   echo $ac_n "(cached) $ac_c" 1>&6
11636 else
11637   ac_save_LIBS="$LIBS"
11638 LIBS="-lkrb5  $LIBS"
11639 cat > conftest.$ac_ext <<EOF
11640 #line 11641 "configure"
11641 #include "confdefs.h"
11642 /* Override any gcc2 internal prototype to avoid an error.  */
11643 /* We use char because int might match the return type of a gcc2
11644     builtin and then its argument prototype would still apply.  */
11645 char krb5_mk_req_extended();
11646
11647 int main() {
11648 krb5_mk_req_extended()
11649 ; return 0; }
11650 EOF
11651 if { (eval echo configure:11652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11652   rm -rf conftest*
11653   eval "ac_cv_lib_$ac_lib_var=yes"
11654 else
11655   echo "configure: failed program was:" >&5
11656   cat conftest.$ac_ext >&5
11657   rm -rf conftest*
11658   eval "ac_cv_lib_$ac_lib_var=no"
11659 fi
11660 rm -f conftest*
11661 LIBS="$ac_save_LIBS"
11662
11663 fi
11664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11665   echo "$ac_t""yes" 1>&6
11666   LIBS="$LIBS -lkrb5";
11667         cat >> confdefs.h <<\EOF
11668 #define HAVE_KRB5 1
11669 EOF
11670
11671 else
11672   echo "$ac_t""no" 1>&6
11673 fi
11674
11675
11676 ########################################################
11677 # now see if we can find the gssapi libs in standard paths
11678 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11679 echo "configure:11680: checking for gss_display_status in -lgssapi_krb5" >&5
11680 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11681 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11682   echo $ac_n "(cached) $ac_c" 1>&6
11683 else
11684   ac_save_LIBS="$LIBS"
11685 LIBS="-lgssapi_krb5  $LIBS"
11686 cat > conftest.$ac_ext <<EOF
11687 #line 11688 "configure"
11688 #include "confdefs.h"
11689 /* Override any gcc2 internal prototype to avoid an error.  */
11690 /* We use char because int might match the return type of a gcc2
11691     builtin and then its argument prototype would still apply.  */
11692 char gss_display_status();
11693
11694 int main() {
11695 gss_display_status()
11696 ; return 0; }
11697 EOF
11698 if { (eval echo configure:11699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11699   rm -rf conftest*
11700   eval "ac_cv_lib_$ac_lib_var=yes"
11701 else
11702   echo "configure: failed program was:" >&5
11703   cat conftest.$ac_ext >&5
11704   rm -rf conftest*
11705   eval "ac_cv_lib_$ac_lib_var=no"
11706 fi
11707 rm -f conftest*
11708 LIBS="$ac_save_LIBS"
11709
11710 fi
11711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11712   echo "$ac_t""yes" 1>&6
11713   cat >> confdefs.h <<\EOF
11714 #define HAVE_GSSAPI 1
11715 EOF
11716
11717 else
11718   echo "$ac_t""no" 1>&6
11719 fi
11720
11721
11722
11723 ##################################################################
11724 # we might need the lber lib on some systems. To avoid link errors
11725 # this test must be before the libldap test
11726 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11727 echo "configure:11728: checking for ber_scanf in -llber" >&5
11728 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11729 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11730   echo $ac_n "(cached) $ac_c" 1>&6
11731 else
11732   ac_save_LIBS="$LIBS"
11733 LIBS="-llber  $LIBS"
11734 cat > conftest.$ac_ext <<EOF
11735 #line 11736 "configure"
11736 #include "confdefs.h"
11737 /* Override any gcc2 internal prototype to avoid an error.  */
11738 /* We use char because int might match the return type of a gcc2
11739     builtin and then its argument prototype would still apply.  */
11740 char ber_scanf();
11741
11742 int main() {
11743 ber_scanf()
11744 ; return 0; }
11745 EOF
11746 if { (eval echo configure:11747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11747   rm -rf conftest*
11748   eval "ac_cv_lib_$ac_lib_var=yes"
11749 else
11750   echo "configure: failed program was:" >&5
11751   cat conftest.$ac_ext >&5
11752   rm -rf conftest*
11753   eval "ac_cv_lib_$ac_lib_var=no"
11754 fi
11755 rm -f conftest*
11756 LIBS="$ac_save_LIBS"
11757
11758 fi
11759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11760   echo "$ac_t""yes" 1>&6
11761   LIBS="$LIBS -llber"
11762 else
11763   echo "$ac_t""no" 1>&6
11764 fi
11765
11766
11767 ########################################################
11768 # now see if we can find the ldap libs in standard paths
11769 if test x$have_ldap != xyes; then
11770 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
11771 echo "configure:11772: checking for ldap_domain2hostlist in -lldap" >&5
11772 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
11773 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11774   echo $ac_n "(cached) $ac_c" 1>&6
11775 else
11776   ac_save_LIBS="$LIBS"
11777 LIBS="-lldap  $LIBS"
11778 cat > conftest.$ac_ext <<EOF
11779 #line 11780 "configure"
11780 #include "confdefs.h"
11781 /* Override any gcc2 internal prototype to avoid an error.  */
11782 /* We use char because int might match the return type of a gcc2
11783     builtin and then its argument prototype would still apply.  */
11784 char ldap_domain2hostlist();
11785
11786 int main() {
11787 ldap_domain2hostlist()
11788 ; return 0; }
11789 EOF
11790 if { (eval echo configure:11791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11791   rm -rf conftest*
11792   eval "ac_cv_lib_$ac_lib_var=yes"
11793 else
11794   echo "configure: failed program was:" >&5
11795   cat conftest.$ac_ext >&5
11796   rm -rf conftest*
11797   eval "ac_cv_lib_$ac_lib_var=no"
11798 fi
11799 rm -f conftest*
11800 LIBS="$ac_save_LIBS"
11801
11802 fi
11803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11804   echo "$ac_t""yes" 1>&6
11805   LIBS="$LIBS -lldap";
11806         cat >> confdefs.h <<\EOF
11807 #define HAVE_LDAP 1
11808 EOF
11809
11810 else
11811   echo "$ac_t""no" 1>&6
11812 fi
11813
11814 fi
11815
11816 #################################################
11817 # check for automount support
11818 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11819 echo "configure:11820: checking whether to use AUTOMOUNT" >&5
11820 # Check whether --with-automount or --without-automount was given.
11821 if test "${with_automount+set}" = set; then
11822   withval="$with_automount"
11823    case "$withval" in
11824   yes)
11825     echo "$ac_t""yes" 1>&6
11826     cat >> confdefs.h <<\EOF
11827 #define WITH_AUTOMOUNT 1
11828 EOF
11829
11830     ;;
11831   *)
11832     echo "$ac_t""no" 1>&6
11833     ;;
11834   esac 
11835 else
11836   echo "$ac_t""no" 1>&6
11837
11838 fi
11839
11840
11841 #################################################
11842 # check for smbmount support
11843 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11844 echo "configure:11845: checking whether to use SMBMOUNT" >&5
11845 # Check whether --with-smbmount or --without-smbmount was given.
11846 if test "${with_smbmount+set}" = set; then
11847   withval="$with_smbmount"
11848    case "$withval" in
11849   yes)
11850         case "$host_os" in
11851         *linux*)
11852                 echo "$ac_t""yes" 1>&6
11853                 cat >> confdefs.h <<\EOF
11854 #define WITH_SMBMOUNT 1
11855 EOF
11856
11857                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11858                 ;;
11859         *)
11860                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11861                 ;;
11862         esac
11863     ;;
11864   *)
11865     echo "$ac_t""no" 1>&6
11866     MPROGS=
11867     ;;
11868   esac 
11869 else
11870   echo "$ac_t""no" 1>&6
11871   MPROGS=
11872
11873 fi
11874
11875
11876
11877 #################################################
11878 # check for a PAM clear-text auth, accounts, password and session support
11879 with_pam_for_crypt=no
11880 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
11881 echo "configure:11882: checking whether to use PAM" >&5
11882 # Check whether --with-pam or --without-pam was given.
11883 if test "${with_pam+set}" = set; then
11884   withval="$with_pam"
11885    case "$withval" in
11886   yes)
11887     echo "$ac_t""yes" 1>&6
11888     cat >> confdefs.h <<\EOF
11889 #define WITH_PAM 1
11890 EOF
11891
11892     LIBS="$LIBS -lpam"
11893     with_pam_for_crypt=yes
11894     ;;
11895   *)
11896     echo "$ac_t""no" 1>&6
11897     ;;
11898   esac 
11899 else
11900   echo "$ac_t""no" 1>&6
11901
11902 fi
11903
11904
11905 # we can't build a pam module if we don't have pam.
11906 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11907 echo "configure:11908: checking for pam_get_data in -lpam" >&5
11908 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11910   echo $ac_n "(cached) $ac_c" 1>&6
11911 else
11912   ac_save_LIBS="$LIBS"
11913 LIBS="-lpam  $LIBS"
11914 cat > conftest.$ac_ext <<EOF
11915 #line 11916 "configure"
11916 #include "confdefs.h"
11917 /* Override any gcc2 internal prototype to avoid an error.  */
11918 /* We use char because int might match the return type of a gcc2
11919     builtin and then its argument prototype would still apply.  */
11920 char pam_get_data();
11921
11922 int main() {
11923 pam_get_data()
11924 ; return 0; }
11925 EOF
11926 if { (eval echo configure:11927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11927   rm -rf conftest*
11928   eval "ac_cv_lib_$ac_lib_var=yes"
11929 else
11930   echo "configure: failed program was:" >&5
11931   cat conftest.$ac_ext >&5
11932   rm -rf conftest*
11933   eval "ac_cv_lib_$ac_lib_var=no"
11934 fi
11935 rm -f conftest*
11936 LIBS="$ac_save_LIBS"
11937
11938 fi
11939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11940   echo "$ac_t""yes" 1>&6
11941   cat >> confdefs.h <<\EOF
11942 #define HAVE_LIBPAM 1
11943 EOF
11944
11945 else
11946   echo "$ac_t""no" 1>&6
11947 fi
11948
11949
11950 #################################################
11951 # check for pam_smbpass support
11952 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11953 echo "configure:11954: checking whether to use pam_smbpass" >&5
11954 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11955 if test "${with_pam_smbpass+set}" = set; then
11956   withval="$with_pam_smbpass"
11957    case "$withval" in
11958   yes)
11959     echo "$ac_t""yes" 1>&6
11960
11961 # Conditions under which pam_smbpass should not be built.
11962
11963        if test x$PICFLAG = x; then
11964           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11965           PAM_MOD=""
11966        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11967           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11968           PAM_MOD=""
11969        else
11970           PAM_MOD="bin/pam_smbpass.so"
11971        fi
11972     ;;
11973   *)
11974     echo "$ac_t""no" 1>&6
11975     ;;
11976   esac 
11977 else
11978   echo "$ac_t""no" 1>&6
11979
11980 fi
11981
11982
11983
11984 ###############################################
11985 # test for where we get crypt() from, but only
11986 # if not using PAM
11987 if test $with_pam_for_crypt = no; then
11988 for ac_func in crypt
11989 do
11990 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11991 echo "configure:11992: checking for $ac_func" >&5
11992 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11993   echo $ac_n "(cached) $ac_c" 1>&6
11994 else
11995   cat > conftest.$ac_ext <<EOF
11996 #line 11997 "configure"
11997 #include "confdefs.h"
11998 /* System header to define __stub macros and hopefully few prototypes,
11999     which can conflict with char $ac_func(); below.  */
12000 #include <assert.h>
12001 /* Override any gcc2 internal prototype to avoid an error.  */
12002 /* We use char because int might match the return type of a gcc2
12003     builtin and then its argument prototype would still apply.  */
12004 char $ac_func();
12005
12006 int main() {
12007
12008 /* The GNU C library defines this for functions which it implements
12009     to always fail with ENOSYS.  Some functions are actually named
12010     something starting with __ and the normal name is an alias.  */
12011 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12012 choke me
12013 #else
12014 $ac_func();
12015 #endif
12016
12017 ; return 0; }
12018 EOF
12019 if { (eval echo configure:12020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12020   rm -rf conftest*
12021   eval "ac_cv_func_$ac_func=yes"
12022 else
12023   echo "configure: failed program was:" >&5
12024   cat conftest.$ac_ext >&5
12025   rm -rf conftest*
12026   eval "ac_cv_func_$ac_func=no"
12027 fi
12028 rm -f conftest*
12029 fi
12030
12031 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12032   echo "$ac_t""yes" 1>&6
12033     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12034   cat >> confdefs.h <<EOF
12035 #define $ac_tr_func 1
12036 EOF
12037  
12038 else
12039   echo "$ac_t""no" 1>&6
12040 fi
12041 done
12042
12043 if test x"$ac_cv_func_crypt" = x"no"; then
12044     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12045 echo "configure:12046: checking for crypt in -lcrypt" >&5
12046 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12048   echo $ac_n "(cached) $ac_c" 1>&6
12049 else
12050   ac_save_LIBS="$LIBS"
12051 LIBS="-lcrypt  $LIBS"
12052 cat > conftest.$ac_ext <<EOF
12053 #line 12054 "configure"
12054 #include "confdefs.h"
12055 /* Override any gcc2 internal prototype to avoid an error.  */
12056 /* We use char because int might match the return type of a gcc2
12057     builtin and then its argument prototype would still apply.  */
12058 char crypt();
12059
12060 int main() {
12061 crypt()
12062 ; return 0; }
12063 EOF
12064 if { (eval echo configure:12065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12065   rm -rf conftest*
12066   eval "ac_cv_lib_$ac_lib_var=yes"
12067 else
12068   echo "configure: failed program was:" >&5
12069   cat conftest.$ac_ext >&5
12070   rm -rf conftest*
12071   eval "ac_cv_lib_$ac_lib_var=no"
12072 fi
12073 rm -f conftest*
12074 LIBS="$ac_save_LIBS"
12075
12076 fi
12077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12078   echo "$ac_t""yes" 1>&6
12079   LIBS="$LIBS -lcrypt";
12080         cat >> confdefs.h <<\EOF
12081 #define HAVE_CRYPT 1
12082 EOF
12083
12084 else
12085   echo "$ac_t""no" 1>&6
12086 fi
12087
12088 fi
12089 fi
12090
12091 ##
12092 ## moved after the check for -lcrypt in order to
12093 ## ensure that the necessary libraries are included
12094 ## check checking for truncated salt.  Wrapped by the
12095 ## $with_pam_for_crypt variable as above   --jerry
12096 ##
12097 if test $with_pam_for_crypt = no; then
12098 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12099 echo "configure:12100: checking for a crypt that needs truncated salt" >&5
12100 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12101   echo $ac_n "(cached) $ac_c" 1>&6
12102 else
12103   
12104 if test "$cross_compiling" = yes; then
12105   samba_cv_HAVE_TRUNCATED_SALT=cross
12106 else
12107   cat > conftest.$ac_ext <<EOF
12108 #line 12109 "configure"
12109 #include "confdefs.h"
12110 #include "${srcdir-.}/tests/crypttest.c"
12111 EOF
12112 if { (eval echo configure:12113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12113 then
12114   samba_cv_HAVE_TRUNCATED_SALT=no
12115 else
12116   echo "configure: failed program was:" >&5
12117   cat conftest.$ac_ext >&5
12118   rm -fr conftest*
12119   samba_cv_HAVE_TRUNCATED_SALT=yes
12120 fi
12121 rm -fr conftest*
12122 fi
12123
12124 fi
12125
12126 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12127 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12128         cat >> confdefs.h <<\EOF
12129 #define HAVE_TRUNCATED_SALT 1
12130 EOF
12131
12132 fi
12133 fi
12134
12135
12136
12137 ########################################################################################
12138 ##
12139 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12140 ##
12141 ########################################################################################
12142
12143 ## set the with_smbpasswd_sam as the default
12144 with_smbpasswd_sam=yes
12145
12146
12147 #################################################
12148 # check for a TDB password database
12149 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12150 echo "configure:12151: checking whether to use TDB SAM database" >&5
12151 # Check whether --with-tdbsam or --without-tdbsam was given.
12152 if test "${with_tdbsam+set}" = set; then
12153   withval="$with_tdbsam"
12154    case "$withval" in
12155   yes)
12156     echo "$ac_t""yes" 1>&6
12157     cat >> confdefs.h <<\EOF
12158 #define WITH_TDB_SAM 1
12159 EOF
12160
12161     with_smbpasswd_sam=no
12162     ;;
12163   *)
12164     echo "$ac_t""no" 1>&6
12165     ;;
12166   esac 
12167 else
12168   echo "$ac_t""no" 1>&6
12169
12170 fi
12171
12172
12173 #################################################
12174 # check for a LDAP password database
12175 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12176 echo "configure:12177: checking whether to use LDAP SAM database" >&5
12177 # Check whether --with-ldapsam or --without-ldapsam was given.
12178 if test "${with_ldapsam+set}" = set; then
12179   withval="$with_ldapsam"
12180    case "$withval" in
12181   yes)
12182     echo "$ac_t""yes" 1>&6
12183     cat >> confdefs.h <<\EOF
12184 #define WITH_LDAP_SAM 1
12185 EOF
12186
12187     LIBS="-lldap -llber $LIBS"
12188     with_smbpasswd_sam=no
12189     ;;
12190   *)
12191     echo "$ac_t""no" 1>&6
12192     ;;
12193   esac 
12194 else
12195   echo "$ac_t""no" 1>&6
12196
12197 fi
12198
12199
12200 #################################################
12201 # check for a NISPLUS password database
12202 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12203 echo "configure:12204: checking whether to use NISPLUS SAM database" >&5
12204 # Check whether --with-nisplussam or --without-nisplussam was given.
12205 if test "${with_nisplussam+set}" = set; then
12206   withval="$with_nisplussam"
12207    case "$withval" in
12208   yes)
12209     echo "$ac_t""yes" 1>&6
12210     cat >> confdefs.h <<\EOF
12211 #define WITH_NISPLUS_SAM 1
12212 EOF
12213
12214     with_smbpasswd_sam=no
12215     ;;
12216   *)
12217     echo "$ac_t""no" 1>&6
12218     ;;
12219   esac 
12220 else
12221   echo "$ac_t""no" 1>&6
12222
12223 fi
12224
12225
12226 ################################################
12227 # This test should come last because the
12228 # smbpasswd SAM is only used if another format
12229 # has not been defined
12230 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
12231 echo "configure:12232: checking whether to use traditional smbpasswd file" >&5
12232 if test $with_smbpasswd_sam = yes; then
12233         echo "$ac_t""yes" 1>&6
12234         cat >> confdefs.h <<\EOF
12235 #define WITH_SMBPASSWD_SAM 1
12236 EOF
12237
12238 else
12239         echo "$ac_t""no" 1>&6
12240 fi
12241
12242 ########################################################################################
12243 ##
12244 ## END OF TESTS FOR SAM BACKENDS.  
12245 ##
12246 ########################################################################################
12247
12248 #################################################
12249 # check for a NISPLUS_HOME support 
12250 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12251 echo "configure:12252: checking whether to use NISPLUS_HOME" >&5
12252 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12253 if test "${with_nisplus_home+set}" = set; then
12254   withval="$with_nisplus_home"
12255    case "$withval" in
12256   yes)
12257     echo "$ac_t""yes" 1>&6
12258     cat >> confdefs.h <<\EOF
12259 #define WITH_NISPLUS_HOME 1
12260 EOF
12261
12262     ;;
12263   *)
12264     echo "$ac_t""no" 1>&6
12265     ;;
12266   esac 
12267 else
12268   echo "$ac_t""no" 1>&6
12269
12270 fi
12271
12272
12273 #################################################
12274 # check for the secure socket layer
12275 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12276 echo "configure:12277: checking whether to use SSL" >&5
12277 # Check whether --with-ssl or --without-ssl was given.
12278 if test "${with_ssl+set}" = set; then
12279   withval="$with_ssl"
12280    case "$withval" in
12281   yes)
12282     echo "$ac_t""yes" 1>&6
12283     cat >> confdefs.h <<\EOF
12284 #define WITH_SSL 1
12285 EOF
12286
12287     withval="/usr/local/ssl"     # default
12288
12289     if test "${with_sslinc+set}" = set; then
12290
12291         withval="$with_sslinc"
12292         case "$withval" in
12293         yes|no)
12294           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12295           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12296         ;;
12297         * )
12298           CFLAGS="-I${withval} $CFLAGS"
12299         ;;
12300         esac
12301
12302     else
12303
12304         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12305
12306     fi
12307
12308     if test "${with_ssllib+set}" = set; then
12309
12310         withval="$with_ssllib"
12311         case "$withval" in
12312         yes|no)
12313           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12314           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12315         ;;
12316         * )
12317           LDFLAGS="-L${withval}/lib $LDFLAGS"
12318         ;;
12319         esac
12320
12321     else
12322
12323         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12324
12325     fi
12326
12327     LIBS="-lssl -lcrypto $LIBS"
12328
12329 #    if test ! -d ${withval}; then
12330 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12331 #      exit 1
12332 #    fi 
12333
12334     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12335
12336     ;;
12337   *)
12338     echo "$ac_t""no" 1>&6
12339     ;;
12340   esac 
12341 else
12342   echo "$ac_t""no" 1>&6
12343
12344 fi
12345
12346
12347 #################################################
12348 # check for syslog logging
12349 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12350 echo "configure:12351: checking whether to use syslog logging" >&5
12351 # Check whether --with-syslog or --without-syslog was given.
12352 if test "${with_syslog+set}" = set; then
12353   withval="$with_syslog"
12354    case "$withval" in
12355   yes)
12356     echo "$ac_t""yes" 1>&6
12357     cat >> confdefs.h <<\EOF
12358 #define WITH_SYSLOG 1
12359 EOF
12360
12361     ;;
12362   *)
12363     echo "$ac_t""no" 1>&6
12364     ;;
12365   esac 
12366 else
12367   echo "$ac_t""no" 1>&6
12368
12369 fi
12370
12371
12372 #################################################
12373 # check for a shared memory profiling support
12374 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12375 echo "configure:12376: checking whether to use profiling" >&5
12376 # Check whether --with-profiling-data or --without-profiling-data was given.
12377 if test "${with_profiling_data+set}" = set; then
12378   withval="$with_profiling_data"
12379    case "$withval" in
12380   yes)
12381     echo "$ac_t""yes" 1>&6
12382     cat >> confdefs.h <<\EOF
12383 #define WITH_PROFILE 1
12384 EOF
12385
12386     ;;
12387   *)
12388     echo "$ac_t""no" 1>&6
12389     ;;
12390   esac 
12391 else
12392   echo "$ac_t""no" 1>&6
12393
12394 fi
12395
12396
12397
12398 #################################################
12399 # check for experimental disk-quotas support
12400 QUOTAOBJS=smbd/noquotas.o
12401
12402 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12403 echo "configure:12404: checking whether to support disk-quotas" >&5
12404 # Check whether --with-quotas or --without-quotas was given.
12405 if test "${with_quotas+set}" = set; then
12406   withval="$with_quotas"
12407    case "$withval" in
12408   yes)
12409     echo "$ac_t""yes" 1>&6
12410     case "$host_os" in
12411       *linux*)
12412         # Check for kernel 2.4.x quota braindamage...
12413         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12414 echo "configure:12415: checking for linux 2.4.x quota braindamage.." >&5
12415 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12416   echo $ac_n "(cached) $ac_c" 1>&6
12417 else
12418   
12419         cat > conftest.$ac_ext <<EOF
12420 #line 12421 "configure"
12421 #include "confdefs.h"
12422 #include <stdio.h>
12423 #include <sys/types.h>
12424 #include <asm/types.h>
12425 #include <linux/quota.h>
12426 #include <mntent.h>
12427 #include <linux/unistd.h>
12428 int main() {
12429 struct mem_dqblk D;
12430 ; return 0; }
12431 EOF
12432 if { (eval echo configure:12433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12433   rm -rf conftest*
12434   samba_cv_linux_2_4_quota_braindamage=yes
12435 else
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -rf conftest*
12439   samba_cv_linux_2_4_quota_braindamage=no
12440 fi
12441 rm -f conftest*
12442 fi
12443
12444 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12445 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12446         cat >> confdefs.h <<\EOF
12447 #define LINUX_QUOTAS_2 1
12448 EOF
12449
12450 else
12451         cat >> confdefs.h <<\EOF
12452 #define LINUX_QUOTAS_1 1
12453 EOF
12454
12455 fi
12456         ;;
12457       *)
12458         ;;
12459     esac
12460     QUOTAOBJS=smbd/quotas.o
12461     cat >> confdefs.h <<\EOF
12462 #define WITH_QUOTAS 1
12463 EOF
12464
12465     ;;
12466   *)
12467     echo "$ac_t""no" 1>&6
12468     ;;
12469   esac 
12470 else
12471   echo "$ac_t""no" 1>&6
12472
12473 fi
12474
12475
12476
12477 #################################################
12478 # check for experimental utmp accounting
12479
12480 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12481 echo "configure:12482: checking whether to support utmp accounting" >&5
12482 # Check whether --with-utmp or --without-utmp was given.
12483 if test "${with_utmp+set}" = set; then
12484   withval="$with_utmp"
12485    case "$withval" in
12486   yes)
12487     echo "$ac_t""yes" 1>&6
12488     cat >> confdefs.h <<\EOF
12489 #define WITH_UTMP 1
12490 EOF
12491
12492     ;;
12493   *)
12494     echo "$ac_t""no" 1>&6
12495     ;;
12496   esac 
12497 else
12498   echo "$ac_t""no" 1>&6
12499
12500 fi
12501
12502
12503 #################################################
12504 # set private directory location
12505 # Check whether --with-privatedir or --without-privatedir was given.
12506 if test "${with_privatedir+set}" = set; then
12507   withval="$with_privatedir"
12508    case "$withval" in
12509   yes|no)
12510   #
12511   # Just in case anybody calls it without argument
12512   #
12513     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12514     privatedir='${prefix}/private'
12515   ;;
12516   * )
12517     privatedir="$withval"
12518     ;;
12519   esac
12520   
12521 else
12522   privatedir='${prefix}/private'
12523    
12524
12525 fi
12526
12527
12528 #################################################
12529 # set lock directory location
12530 # Check whether --with-lockdir or --without-lockdir was given.
12531 if test "${with_lockdir+set}" = set; then
12532   withval="$with_lockdir"
12533    case "$withval" in
12534   yes|no)
12535   #
12536   # Just in case anybody calls it without argument
12537   #
12538     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12539     lockdir='$(VARDIR)/locks'
12540   ;;
12541   * )
12542     lockdir="$withval"
12543     ;;
12544   esac
12545   
12546 else
12547   lockdir='$(VARDIR)/locks'
12548    
12549
12550 fi
12551
12552
12553 #################################################
12554 # set SWAT directory location
12555 # Check whether --with-swatdir or --without-swatdir was given.
12556 if test "${with_swatdir+set}" = set; then
12557   withval="$with_swatdir"
12558    case "$withval" in
12559   yes|no)
12560   #
12561   # Just in case anybody does it
12562   #
12563     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12564     swatdir='${prefix}/swat'
12565   ;;
12566   * )
12567     swatdir="$withval"
12568     ;;
12569   esac
12570   
12571 else
12572   swatdir='${prefix}/swat'
12573    
12574
12575 fi
12576
12577
12578 #################################################
12579 # choose native language(s) of man pages
12580 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12581 echo "configure:12582: checking chosen man pages' language(s)" >&5
12582 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12583 if test "${with_manpages_langs+set}" = set; then
12584   withval="$with_manpages_langs"
12585    case "$withval" in
12586   yes|no)
12587     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12588     manlangs="en"
12589   ;;
12590   *)
12591     manlangs="$withval"
12592   ;;
12593   esac
12594
12595   echo "$ac_t""$manlangs" 1>&6
12596   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12597   
12598 else
12599   manlangs="en"
12600   echo "$ac_t""$manlangs" 1>&6
12601   
12602
12603 fi
12604
12605
12606 #################################################
12607 # these tests are taken from the GNU fileutils package
12608 echo "checking how to get filesystem space usage" 1>&6
12609 echo "configure:12610: checking how to get filesystem space usage" >&5
12610 space=no
12611
12612 # Test for statvfs64.
12613 if test $space = no; then
12614   # SVR4
12615   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12616 echo "configure:12617: checking statvfs64 function (SVR4)" >&5
12617 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12618   echo $ac_n "(cached) $ac_c" 1>&6
12619 else
12620   if test "$cross_compiling" = yes; then
12621   fu_cv_sys_stat_statvfs64=cross
12622 else
12623   cat > conftest.$ac_ext <<EOF
12624 #line 12625 "configure"
12625 #include "confdefs.h"
12626
12627 #if defined(HAVE_UNISTD_H)
12628 #include <unistd.h>
12629 #endif
12630 #include <sys/types.h>
12631 #include <sys/statvfs.h>
12632   main ()
12633   {
12634     struct statvfs64 fsd;
12635     exit (statvfs64 (".", &fsd));
12636   }
12637 EOF
12638 if { (eval echo configure:12639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12639 then
12640   fu_cv_sys_stat_statvfs64=yes
12641 else
12642   echo "configure: failed program was:" >&5
12643   cat conftest.$ac_ext >&5
12644   rm -fr conftest*
12645   fu_cv_sys_stat_statvfs64=no
12646 fi
12647 rm -fr conftest*
12648 fi
12649
12650 fi
12651
12652 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12653   if test $fu_cv_sys_stat_statvfs64 = yes; then
12654     space=yes
12655     cat >> confdefs.h <<\EOF
12656 #define STAT_STATVFS64 1
12657 EOF
12658
12659   fi
12660 fi
12661
12662 # Perform only the link test since it seems there are no variants of the
12663 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12664 # because that got a false positive on SCO OSR5.  Adding the declaration
12665 # of a `struct statvfs' causes this test to fail (as it should) on such
12666 # systems.  That system is reported to work fine with STAT_STATFS4 which
12667 # is what it gets when this test fails.
12668 if test $space = no; then
12669   # SVR4
12670   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12671 echo "configure:12672: checking statvfs function (SVR4)" >&5
12672 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12673   echo $ac_n "(cached) $ac_c" 1>&6
12674 else
12675   cat > conftest.$ac_ext <<EOF
12676 #line 12677 "configure"
12677 #include "confdefs.h"
12678 #include <sys/types.h>
12679 #include <sys/statvfs.h>
12680 int main() {
12681 struct statvfs fsd; statvfs (0, &fsd);
12682 ; return 0; }
12683 EOF
12684 if { (eval echo configure:12685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12685   rm -rf conftest*
12686   fu_cv_sys_stat_statvfs=yes
12687 else
12688   echo "configure: failed program was:" >&5
12689   cat conftest.$ac_ext >&5
12690   rm -rf conftest*
12691   fu_cv_sys_stat_statvfs=no
12692 fi
12693 rm -f conftest*
12694 fi
12695
12696 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12697   if test $fu_cv_sys_stat_statvfs = yes; then
12698     space=yes
12699     cat >> confdefs.h <<\EOF
12700 #define STAT_STATVFS 1
12701 EOF
12702
12703   fi
12704 fi
12705
12706 if test $space = no; then
12707   # DEC Alpha running OSF/1
12708   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12709 echo "configure:12710: checking for 3-argument statfs function (DEC OSF/1)" >&5
12710   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12711   echo $ac_n "(cached) $ac_c" 1>&6
12712 else
12713   if test "$cross_compiling" = yes; then
12714   fu_cv_sys_stat_statfs3_osf1=no
12715 else
12716   cat > conftest.$ac_ext <<EOF
12717 #line 12718 "configure"
12718 #include "confdefs.h"
12719
12720 #include <sys/param.h>
12721 #include <sys/types.h>
12722 #include <sys/mount.h>
12723   main ()
12724   {
12725     struct statfs fsd;
12726     fsd.f_fsize = 0;
12727     exit (statfs (".", &fsd, sizeof (struct statfs)));
12728   }
12729 EOF
12730 if { (eval echo configure:12731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12731 then
12732   fu_cv_sys_stat_statfs3_osf1=yes
12733 else
12734   echo "configure: failed program was:" >&5
12735   cat conftest.$ac_ext >&5
12736   rm -fr conftest*
12737   fu_cv_sys_stat_statfs3_osf1=no
12738 fi
12739 rm -fr conftest*
12740 fi
12741
12742 fi
12743
12744   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12745   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12746     space=yes
12747     cat >> confdefs.h <<\EOF
12748 #define STAT_STATFS3_OSF1 1
12749 EOF
12750
12751   fi
12752 fi
12753
12754 if test $space = no; then
12755 # AIX
12756   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12757 echo "configure:12758: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12758   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12759   echo $ac_n "(cached) $ac_c" 1>&6
12760 else
12761   if test "$cross_compiling" = yes; then
12762   fu_cv_sys_stat_statfs2_bsize=no
12763 else
12764   cat > conftest.$ac_ext <<EOF
12765 #line 12766 "configure"
12766 #include "confdefs.h"
12767
12768 #ifdef HAVE_SYS_PARAM_H
12769 #include <sys/param.h>
12770 #endif
12771 #ifdef HAVE_SYS_MOUNT_H
12772 #include <sys/mount.h>
12773 #endif
12774 #ifdef HAVE_SYS_VFS_H
12775 #include <sys/vfs.h>
12776 #endif
12777   main ()
12778   {
12779   struct statfs fsd;
12780   fsd.f_bsize = 0;
12781   exit (statfs (".", &fsd));
12782   }
12783 EOF
12784 if { (eval echo configure:12785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12785 then
12786   fu_cv_sys_stat_statfs2_bsize=yes
12787 else
12788   echo "configure: failed program was:" >&5
12789   cat conftest.$ac_ext >&5
12790   rm -fr conftest*
12791   fu_cv_sys_stat_statfs2_bsize=no
12792 fi
12793 rm -fr conftest*
12794 fi
12795
12796 fi
12797
12798   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12799   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12800     space=yes
12801     cat >> confdefs.h <<\EOF
12802 #define STAT_STATFS2_BSIZE 1
12803 EOF
12804
12805   fi
12806 fi
12807
12808 if test $space = no; then
12809 # SVR3
12810   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12811 echo "configure:12812: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12812   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12813   echo $ac_n "(cached) $ac_c" 1>&6
12814 else
12815   if test "$cross_compiling" = yes; then
12816   fu_cv_sys_stat_statfs4=no
12817 else
12818   cat > conftest.$ac_ext <<EOF
12819 #line 12820 "configure"
12820 #include "confdefs.h"
12821 #include <sys/types.h>
12822 #include <sys/statfs.h>
12823   main ()
12824   {
12825   struct statfs fsd;
12826   exit (statfs (".", &fsd, sizeof fsd, 0));
12827   }
12828 EOF
12829 if { (eval echo configure:12830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12830 then
12831   fu_cv_sys_stat_statfs4=yes
12832 else
12833   echo "configure: failed program was:" >&5
12834   cat conftest.$ac_ext >&5
12835   rm -fr conftest*
12836   fu_cv_sys_stat_statfs4=no
12837 fi
12838 rm -fr conftest*
12839 fi
12840
12841 fi
12842
12843   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12844   if test $fu_cv_sys_stat_statfs4 = yes; then
12845     space=yes
12846     cat >> confdefs.h <<\EOF
12847 #define STAT_STATFS4 1
12848 EOF
12849
12850   fi
12851 fi
12852
12853 if test $space = no; then
12854 # 4.4BSD and NetBSD
12855   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12856 echo "configure:12857: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12857   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12858   echo $ac_n "(cached) $ac_c" 1>&6
12859 else
12860   if test "$cross_compiling" = yes; then
12861   fu_cv_sys_stat_statfs2_fsize=no
12862 else
12863   cat > conftest.$ac_ext <<EOF
12864 #line 12865 "configure"
12865 #include "confdefs.h"
12866 #include <sys/types.h>
12867 #ifdef HAVE_SYS_PARAM_H
12868 #include <sys/param.h>
12869 #endif
12870 #ifdef HAVE_SYS_MOUNT_H
12871 #include <sys/mount.h>
12872 #endif
12873   main ()
12874   {
12875   struct statfs fsd;
12876   fsd.f_fsize = 0;
12877   exit (statfs (".", &fsd));
12878   }
12879 EOF
12880 if { (eval echo configure:12881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12881 then
12882   fu_cv_sys_stat_statfs2_fsize=yes
12883 else
12884   echo "configure: failed program was:" >&5
12885   cat conftest.$ac_ext >&5
12886   rm -fr conftest*
12887   fu_cv_sys_stat_statfs2_fsize=no
12888 fi
12889 rm -fr conftest*
12890 fi
12891
12892 fi
12893
12894   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12895   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12896     space=yes
12897     cat >> confdefs.h <<\EOF
12898 #define STAT_STATFS2_FSIZE 1
12899 EOF
12900
12901   fi
12902 fi
12903
12904 if test $space = no; then
12905   # Ultrix
12906   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12907 echo "configure:12908: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12908   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12909   echo $ac_n "(cached) $ac_c" 1>&6
12910 else
12911   if test "$cross_compiling" = yes; then
12912   fu_cv_sys_stat_fs_data=no
12913 else
12914   cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917 #include <sys/types.h>
12918 #ifdef HAVE_SYS_PARAM_H
12919 #include <sys/param.h>
12920 #endif
12921 #ifdef HAVE_SYS_MOUNT_H
12922 #include <sys/mount.h>
12923 #endif
12924 #ifdef HAVE_SYS_FS_TYPES_H
12925 #include <sys/fs_types.h>
12926 #endif
12927   main ()
12928   {
12929   struct fs_data fsd;
12930   /* Ultrix's statfs returns 1 for success,
12931      0 for not mounted, -1 for failure.  */
12932   exit (statfs (".", &fsd) != 1);
12933   }
12934 EOF
12935 if { (eval echo configure:12936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12936 then
12937   fu_cv_sys_stat_fs_data=yes
12938 else
12939   echo "configure: failed program was:" >&5
12940   cat conftest.$ac_ext >&5
12941   rm -fr conftest*
12942   fu_cv_sys_stat_fs_data=no
12943 fi
12944 rm -fr conftest*
12945 fi
12946
12947 fi
12948
12949   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12950   if test $fu_cv_sys_stat_fs_data = yes; then
12951     space=yes
12952     cat >> confdefs.h <<\EOF
12953 #define STAT_STATFS2_FS_DATA 1
12954 EOF
12955
12956   fi
12957 fi
12958
12959 #
12960 # As a gating factor for large file support, in order to
12961 # use <4GB files we must have the following minimal support
12962 # available.
12963 # long long, and a 64 bit off_t or off64_t.
12964 # If we don't have all of these then disable large
12965 # file support.
12966 #
12967 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12968 echo "configure:12969: checking if large file support can be enabled" >&5
12969 cat > conftest.$ac_ext <<EOF
12970 #line 12971 "configure"
12971 #include "confdefs.h"
12972
12973 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12974 #include <sys/types.h>
12975 #else
12976 __COMPILE_ERROR_
12977 #endif
12978
12979 int main() {
12980 int i
12981 ; return 0; }
12982 EOF
12983 if { (eval echo configure:12984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12984   rm -rf conftest*
12985   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12986 else
12987   echo "configure: failed program was:" >&5
12988   cat conftest.$ac_ext >&5
12989   rm -rf conftest*
12990   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12991 fi
12992 rm -f conftest*
12993 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12994     cat >> confdefs.h <<\EOF
12995 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12996 EOF
12997
12998 fi
12999 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13000
13001 # Check whether --with-spinlocks or --without-spinlocks was given.
13002 if test "${with_spinlocks+set}" = set; then
13003   withval="$with_spinlocks"
13004   :
13005 fi
13006
13007 if test "x$with_spinlocks" = "xyes"; then
13008     cat >> confdefs.h <<\EOF
13009 #define USE_SPINLOCKS 1
13010 EOF
13011
13012
13013     case "$host_cpu" in
13014         sparc)
13015             cat >> confdefs.h <<\EOF
13016 #define SPARC_SPINLOCKS 1
13017 EOF
13018
13019             ;;
13020
13021         i386|i486|i586|i686)
13022             cat >> confdefs.h <<\EOF
13023 #define INTEL_SPINLOCKS 1
13024 EOF
13025
13026             ;;
13027
13028         mips)
13029             cat >> confdefs.h <<\EOF
13030 #define MIPS_SPINLOCKS 1
13031 EOF
13032
13033             ;;
13034
13035         powerpc)
13036             cat >> confdefs.h <<\EOF
13037 #define POWERPC_SPINLOCKS 1
13038 EOF
13039
13040             ;;
13041     esac
13042 fi
13043
13044 #################################################
13045 # check for ACL support
13046
13047 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13048 echo "configure:13049: checking whether to support ACLs" >&5
13049 # Check whether --with-acl-support or --without-acl-support was given.
13050 if test "${with_acl_support+set}" = set; then
13051   withval="$with_acl_support"
13052    case "$withval" in
13053   yes)
13054
13055         case "$host_os" in
13056         *sysv5*)
13057                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13058                 cat >> confdefs.h <<\EOF
13059 #define HAVE_UNIXWARE_ACLS 1
13060 EOF
13061
13062                 ;;
13063         *solaris*)
13064                 echo "$ac_t""Using solaris ACLs" 1>&6
13065                 cat >> confdefs.h <<\EOF
13066 #define HAVE_SOLARIS_ACLS 1
13067 EOF
13068
13069                 ;;
13070         *hpux*)
13071                 echo "$ac_t""Using HPUX ACLs" 1>&6
13072                 cat >> confdefs.h <<\EOF
13073 #define HAVE_HPUX_ACLS 1
13074 EOF
13075
13076                 ;;
13077         *irix*)
13078                 echo "$ac_t""Using IRIX ACLs" 1>&6
13079                 cat >> confdefs.h <<\EOF
13080 #define HAVE_IRIX_ACLS 1
13081 EOF
13082
13083                 ;;
13084         *aix*)
13085                 echo "$ac_t""Using AIX ACLs" 1>&6
13086                 cat >> confdefs.h <<\EOF
13087 #define HAVE_AIX_ACLS 1
13088 EOF
13089
13090                 ;;
13091         *osf*)
13092                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13093                 cat >> confdefs.h <<\EOF
13094 #define HAVE_TRU64_ACLS 1
13095 EOF
13096
13097                 LIBS="$LIBS -lpacl"
13098                 ;;
13099         *)
13100                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13101 echo "configure:13102: checking for acl_get_file in -lacl" >&5
13102 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13104   echo $ac_n "(cached) $ac_c" 1>&6
13105 else
13106   ac_save_LIBS="$LIBS"
13107 LIBS="-lacl  $LIBS"
13108 cat > conftest.$ac_ext <<EOF
13109 #line 13110 "configure"
13110 #include "confdefs.h"
13111 /* Override any gcc2 internal prototype to avoid an error.  */
13112 /* We use char because int might match the return type of a gcc2
13113     builtin and then its argument prototype would still apply.  */
13114 char acl_get_file();
13115
13116 int main() {
13117 acl_get_file()
13118 ; return 0; }
13119 EOF
13120 if { (eval echo configure:13121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13121   rm -rf conftest*
13122   eval "ac_cv_lib_$ac_lib_var=yes"
13123 else
13124   echo "configure: failed program was:" >&5
13125   cat conftest.$ac_ext >&5
13126   rm -rf conftest*
13127   eval "ac_cv_lib_$ac_lib_var=no"
13128 fi
13129 rm -f conftest*
13130 LIBS="$ac_save_LIBS"
13131
13132 fi
13133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13134   echo "$ac_t""yes" 1>&6
13135     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13136     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13137   cat >> confdefs.h <<EOF
13138 #define $ac_tr_lib 1
13139 EOF
13140
13141   LIBS="-lacl $LIBS"
13142
13143 else
13144   echo "$ac_t""no" 1>&6
13145 fi
13146
13147                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13148 echo "configure:13149: checking for ACL support" >&5
13149 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13150   echo $ac_n "(cached) $ac_c" 1>&6
13151 else
13152   
13153                 cat > conftest.$ac_ext <<EOF
13154 #line 13155 "configure"
13155 #include "confdefs.h"
13156 #include <sys/types.h>
13157 #include <sys/acl.h>
13158 int main() {
13159  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13160 ; return 0; }
13161 EOF
13162 if { (eval echo configure:13163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13163   rm -rf conftest*
13164   samba_cv_HAVE_POSIX_ACLS=yes
13165 else
13166   echo "configure: failed program was:" >&5
13167   cat conftest.$ac_ext >&5
13168   rm -rf conftest*
13169   samba_cv_HAVE_POSIX_ACLS=no
13170 fi
13171 rm -f conftest*
13172 fi
13173
13174 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13175                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13176                                 echo "$ac_t""Using posix ACLs" 1>&6
13177                                 cat >> confdefs.h <<\EOF
13178 #define HAVE_POSIX_ACLS 1
13179 EOF
13180
13181                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13182 echo "configure:13183: checking for acl_get_perm_np" >&5
13183 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13184   echo $ac_n "(cached) $ac_c" 1>&6
13185 else
13186   
13187                                 cat > conftest.$ac_ext <<EOF
13188 #line 13189 "configure"
13189 #include "confdefs.h"
13190 #include <sys/types.h>
13191 #include <sys/acl.h>
13192 int main() {
13193  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13194 ; return 0; }
13195 EOF
13196 if { (eval echo configure:13197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13197   rm -rf conftest*
13198   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13199 else
13200   echo "configure: failed program was:" >&5
13201   cat conftest.$ac_ext >&5
13202   rm -rf conftest*
13203   samba_cv_HAVE_ACL_GET_PERM_NP=no
13204 fi
13205 rm -f conftest*
13206 fi
13207
13208 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13209                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13210                                         cat >> confdefs.h <<\EOF
13211 #define HAVE_ACL_GET_PERM_NP 1
13212 EOF
13213
13214                                 fi
13215                         fi
13216             ;;
13217         esac
13218         ;;
13219   *)
13220     echo "$ac_t""no" 1>&6
13221     cat >> confdefs.h <<\EOF
13222 #define HAVE_NO_ACLS 1
13223 EOF
13224
13225     ;;
13226   esac 
13227 else
13228   cat >> confdefs.h <<\EOF
13229 #define HAVE_NO_ACLS 1
13230 EOF
13231
13232   echo "$ac_t""no" 1>&6
13233
13234 fi
13235
13236
13237 #################################################
13238 # Check whether winbind is supported on this platform.  If so we need to
13239 # build and install client programs (WINBIND_TARGETS), sbin programs
13240 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13241
13242 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13243 echo "configure:13244: checking whether to build winbind" >&5
13244
13245 # Initially, the value of $host_os decides whether winbind is supported
13246
13247 case "$host_os" in 
13248         *linux*|*solaris*|*irix*)
13249                 HAVE_WINBIND=yes
13250                 ;;
13251         *)
13252                 HAVE_WINBIND=no
13253                 winbind_no_reason=", unsupported on $host_os"
13254                 ;;
13255 esac
13256
13257 # Check the setting of --with-winbindd
13258
13259 # Check whether --with-winbind or --without-winbind was given.
13260 if test "${with_winbind+set}" = set; then
13261   withval="$with_winbind"
13262    
13263   case "$withval" in
13264         yes)
13265                 HAVE_WINBIND=yes
13266                 ;;
13267         no)
13268                 HAVE_WINBIND=no
13269                 winbind_reason=""
13270                 ;;
13271   esac 
13272 fi
13273
13274
13275 # We need unix domain sockets for winbind
13276
13277 if test x"$HAVE_WINBIND" = x"yes"; then
13278         if test x"$samba_cv_unixsocket" = x"no"; then
13279                 winbind_no_reason=", no unix domain socket support on $host_os"
13280                 HAVE_WINBIND=no
13281         fi
13282 fi
13283
13284 # Display test results
13285
13286 if test x"$HAVE_WINBIND" = x"yes"; then
13287
13288         echo "$ac_t""yes" 1>&6
13289
13290         WINBIND_TARGETS="bin/wbinfo"
13291         WINBIND_STARGETS="bin/winbindd"
13292         WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13293         case "$with_pam" in
13294                 yes)
13295                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13296                 ;;
13297         esac
13298 else
13299         echo "$ac_t""no$winbind_no_reason" 1>&6
13300
13301         WINBIND_TARGETS=""
13302         WINBIND_STARGETS=""
13303         WINBIND_LTARGETS=""
13304         WINBIND_PAM_PROGS=""
13305 fi
13306
13307 # Substitution time!
13308
13309
13310
13311
13312
13313
13314 #################################################
13315 # Check to see if we should use the included popt 
13316
13317 # Check whether --with-included-popt or --without-included-popt was given.
13318 if test "${with_included_popt+set}" = set; then
13319   withval="$with_included_popt"
13320    
13321   case "$withval" in
13322         yes)
13323                 INCLUDED_POPT=yes
13324                 ;;
13325         no)
13326                 INCLUDED_POPT=no
13327                 ;;
13328   esac 
13329 fi
13330
13331 if test x"$INCLUDED_POPT" != x"yes"; then
13332     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13333 echo "configure:13334: checking for poptGetContext in -lpopt" >&5
13334 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13335 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13336   echo $ac_n "(cached) $ac_c" 1>&6
13337 else
13338   ac_save_LIBS="$LIBS"
13339 LIBS="-lpopt  $LIBS"
13340 cat > conftest.$ac_ext <<EOF
13341 #line 13342 "configure"
13342 #include "confdefs.h"
13343 /* Override any gcc2 internal prototype to avoid an error.  */
13344 /* We use char because int might match the return type of a gcc2
13345     builtin and then its argument prototype would still apply.  */
13346 char poptGetContext();
13347
13348 int main() {
13349 poptGetContext()
13350 ; return 0; }
13351 EOF
13352 if { (eval echo configure:13353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13353   rm -rf conftest*
13354   eval "ac_cv_lib_$ac_lib_var=yes"
13355 else
13356   echo "configure: failed program was:" >&5
13357   cat conftest.$ac_ext >&5
13358   rm -rf conftest*
13359   eval "ac_cv_lib_$ac_lib_var=no"
13360 fi
13361 rm -f conftest*
13362 LIBS="$ac_save_LIBS"
13363
13364 fi
13365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13366   echo "$ac_t""yes" 1>&6
13367   INCLUDED_POPT=no
13368 else
13369   echo "$ac_t""no" 1>&6
13370 INCLUDED_POPT=yes
13371 fi
13372
13373 fi
13374
13375 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13376 echo "configure:13377: checking whether to use included popt" >&5
13377 if test x"$INCLUDED_POPT" = x"yes"; then
13378     echo "$ac_t""$srcdir/popt" 1>&6
13379     BUILD_POPT='$(POPT_OBJS)'
13380     FLAGS1="-I$srcdir/popt"
13381 else
13382     echo "$ac_t""no" 1>&6
13383     LIBS="$LIBS -lpopt"
13384 fi
13385
13386
13387
13388 #################################################
13389 # final configure stuff
13390
13391 echo "checking configure summary"
13392 if test "$cross_compiling" = yes; then
13393   :
13394 else
13395   cat > conftest.$ac_ext <<EOF
13396 #line 13397 "configure"
13397 #include "confdefs.h"
13398 #include "${srcdir-.}/tests/summary.c"
13399 EOF
13400 if { (eval echo configure:13401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13401 then
13402   echo "configure OK";
13403 else
13404   echo "configure: failed program was:" >&5
13405   cat conftest.$ac_ext >&5
13406   rm -fr conftest*
13407   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13408 fi
13409 rm -fr conftest*
13410 fi
13411
13412
13413 builddir=`pwd`
13414
13415
13416 trap '' 1 2 15
13417 cat > confcache <<\EOF
13418 # This file is a shell script that caches the results of configure
13419 # tests run on this system so they can be shared between configure
13420 # scripts and configure runs.  It is not useful on other systems.
13421 # If it contains results you don't want to keep, you may remove or edit it.
13422 #
13423 # By default, configure uses ./config.cache as the cache file,
13424 # creating it if it does not exist already.  You can give configure
13425 # the --cache-file=FILE option to use a different cache file; that is
13426 # what configure does when it calls configure scripts in
13427 # subdirectories, so they share the cache.
13428 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13429 # config.status only pays attention to the cache file if you give it the
13430 # --recheck option to rerun configure.
13431 #
13432 EOF
13433 # The following way of writing the cache mishandles newlines in values,
13434 # but we know of no workaround that is simple, portable, and efficient.
13435 # So, don't put newlines in cache variables' values.
13436 # Ultrix sh set writes to stderr and can't be redirected directly,
13437 # and sets the high bit in the cache file unless we assign to the vars.
13438 (set) 2>&1 |
13439   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13440   *ac_space=\ *)
13441     # `set' does not quote correctly, so add quotes (double-quote substitution
13442     # turns \\\\ into \\, and sed turns \\ into \).
13443     sed -n \
13444       -e "s/'/'\\\\''/g" \
13445       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13446     ;;
13447   *)
13448     # `set' quotes correctly as required by POSIX, so do not add quotes.
13449     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13450     ;;
13451   esac >> confcache
13452 if cmp -s $cache_file confcache; then
13453   :
13454 else
13455   if test -w $cache_file; then
13456     echo "updating cache $cache_file"
13457     cat confcache > $cache_file
13458   else
13459     echo "not updating unwritable cache $cache_file"
13460   fi
13461 fi
13462 rm -f confcache
13463
13464 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13465
13466 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13467 # Let make expand exec_prefix.
13468 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13469
13470 # Any assignment to VPATH causes Sun make to only execute
13471 # the first set of double-colon rules, so remove it if not needed.
13472 # If there is a colon in the path, we need to keep it.
13473 if test "x$srcdir" = x.; then
13474   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13475 fi
13476
13477 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13478
13479 DEFS=-DHAVE_CONFIG_H
13480
13481 # Without the "./", some shells look in PATH for config.status.
13482 : ${CONFIG_STATUS=./config.status}
13483
13484 echo creating $CONFIG_STATUS
13485 rm -f $CONFIG_STATUS
13486 cat > $CONFIG_STATUS <<EOF
13487 #! /bin/sh
13488 # Generated automatically by configure.
13489 # Run this file to recreate the current configuration.
13490 # This directory was configured as follows,
13491 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13492 #
13493 # $0 $ac_configure_args
13494 #
13495 # Compiler output produced by configure, useful for debugging
13496 # configure, is in ./config.log if it exists.
13497
13498 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13499 for ac_option
13500 do
13501   case "\$ac_option" in
13502   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13503     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13504     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13505   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13506     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13507     exit 0 ;;
13508   -help | --help | --hel | --he | --h)
13509     echo "\$ac_cs_usage"; exit 0 ;;
13510   *) echo "\$ac_cs_usage"; exit 1 ;;
13511   esac
13512 done
13513
13514 ac_given_srcdir=$srcdir
13515 ac_given_INSTALL="$INSTALL"
13516
13517 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13518 EOF
13519 cat >> $CONFIG_STATUS <<EOF
13520
13521 # Protect against being on the right side of a sed subst in config.status.
13522 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13523  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13524 $ac_vpsub
13525 $extrasub
13526 s%@SHELL@%$SHELL%g
13527 s%@CFLAGS@%$CFLAGS%g
13528 s%@CPPFLAGS@%$CPPFLAGS%g
13529 s%@CXXFLAGS@%$CXXFLAGS%g
13530 s%@FFLAGS@%$FFLAGS%g
13531 s%@DEFS@%$DEFS%g
13532 s%@LDFLAGS@%$LDFLAGS%g
13533 s%@LIBS@%$LIBS%g
13534 s%@exec_prefix@%$exec_prefix%g
13535 s%@prefix@%$prefix%g
13536 s%@program_transform_name@%$program_transform_name%g
13537 s%@bindir@%$bindir%g
13538 s%@sbindir@%$sbindir%g
13539 s%@libexecdir@%$libexecdir%g
13540 s%@datadir@%$datadir%g
13541 s%@sysconfdir@%$sysconfdir%g
13542 s%@sharedstatedir@%$sharedstatedir%g
13543 s%@localstatedir@%$localstatedir%g
13544 s%@libdir@%$libdir%g
13545 s%@includedir@%$includedir%g
13546 s%@oldincludedir@%$oldincludedir%g
13547 s%@infodir@%$infodir%g
13548 s%@mandir@%$mandir%g
13549 s%@RUNPROG@%$RUNPROG%g
13550 s%@MPROGS@%$MPROGS%g
13551 s%@LDSHFLAGS@%$LDSHFLAGS%g
13552 s%@SHLD@%$SHLD%g
13553 s%@HOST_OS@%$HOST_OS%g
13554 s%@PAM_MOD@%$PAM_MOD%g
13555 s%@WRAP@%$WRAP%g
13556 s%@WRAP32@%$WRAP32%g
13557 s%@PICFLAG@%$PICFLAG%g
13558 s%@PICSUFFIX@%$PICSUFFIX%g
13559 s%@POBAD_CC@%$POBAD_CC%g
13560 s%@SHLIBEXT@%$SHLIBEXT%g
13561 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13562 s%@CC@%$CC%g
13563 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13564 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13565 s%@INSTALL_DATA@%$INSTALL_DATA%g
13566 s%@AWK@%$AWK%g
13567 s%@BROKEN_CC@%$BROKEN_CC%g
13568 s%@host@%$host%g
13569 s%@host_alias@%$host_alias%g
13570 s%@host_cpu@%$host_cpu%g
13571 s%@host_vendor@%$host_vendor%g
13572 s%@host_os@%$host_os%g
13573 s%@target@%$target%g
13574 s%@target_alias@%$target_alias%g
13575 s%@target_cpu@%$target_cpu%g
13576 s%@target_vendor@%$target_vendor%g
13577 s%@target_os@%$target_os%g
13578 s%@build@%$build%g
13579 s%@build_alias@%$build_alias%g
13580 s%@build_cpu@%$build_cpu%g
13581 s%@build_vendor@%$build_vendor%g
13582 s%@build_os@%$build_os%g
13583 s%@CPP@%$CPP%g
13584 s%@LIBOBJS@%$LIBOBJS%g
13585 s%@TERMLIBS@%$TERMLIBS%g
13586 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13587 s%@ROFF@%$ROFF%g
13588 s%@QUOTAOBJS@%$QUOTAOBJS%g
13589 s%@privatedir@%$privatedir%g
13590 s%@lockdir@%$lockdir%g
13591 s%@swatdir@%$swatdir%g
13592 s%@manlangs@%$manlangs%g
13593 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13594 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13595 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13596 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13597 s%@BUILD_POPT@%$BUILD_POPT%g
13598 s%@FLAGS1@%$FLAGS1%g
13599 s%@builddir@%$builddir%g
13600
13601 CEOF
13602 EOF
13603
13604 cat >> $CONFIG_STATUS <<\EOF
13605
13606 # Split the substitutions into bite-sized pieces for seds with
13607 # small command number limits, like on Digital OSF/1 and HP-UX.
13608 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13609 ac_file=1 # Number of current file.
13610 ac_beg=1 # First line for current file.
13611 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13612 ac_more_lines=:
13613 ac_sed_cmds=""
13614 while $ac_more_lines; do
13615   if test $ac_beg -gt 1; then
13616     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13617   else
13618     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13619   fi
13620   if test ! -s conftest.s$ac_file; then
13621     ac_more_lines=false
13622     rm -f conftest.s$ac_file
13623   else
13624     if test -z "$ac_sed_cmds"; then
13625       ac_sed_cmds="sed -f conftest.s$ac_file"
13626     else
13627       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13628     fi
13629     ac_file=`expr $ac_file + 1`
13630     ac_beg=$ac_end
13631     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13632   fi
13633 done
13634 if test -z "$ac_sed_cmds"; then
13635   ac_sed_cmds=cat
13636 fi
13637 EOF
13638
13639 cat >> $CONFIG_STATUS <<EOF
13640
13641 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13642 EOF
13643 cat >> $CONFIG_STATUS <<\EOF
13644 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13645   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13646   case "$ac_file" in
13647   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13648        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13649   *) ac_file_in="${ac_file}.in" ;;
13650   esac
13651
13652   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13653
13654   # Remove last slash and all that follows it.  Not all systems have dirname.
13655   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13656   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13657     # The file is in a subdirectory.
13658     test ! -d "$ac_dir" && mkdir "$ac_dir"
13659     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13660     # A "../" for each directory in $ac_dir_suffix.
13661     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13662   else
13663     ac_dir_suffix= ac_dots=
13664   fi
13665
13666   case "$ac_given_srcdir" in
13667   .)  srcdir=.
13668       if test -z "$ac_dots"; then top_srcdir=.
13669       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13670   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13671   *) # Relative path.
13672     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13673     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13674   esac
13675
13676   case "$ac_given_INSTALL" in
13677   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13678   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13679   esac
13680
13681   echo creating "$ac_file"
13682   rm -f "$ac_file"
13683   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13684   case "$ac_file" in
13685   *Makefile*) ac_comsub="1i\\
13686 # $configure_input" ;;
13687   *) ac_comsub= ;;
13688   esac
13689
13690   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13691   sed -e "$ac_comsub
13692 s%@configure_input@%$configure_input%g
13693 s%@srcdir@%$srcdir%g
13694 s%@top_srcdir@%$top_srcdir%g
13695 s%@INSTALL@%$INSTALL%g
13696 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13697 fi; done
13698 rm -f conftest.s*
13699
13700 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13701 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13702 #
13703 # ac_d sets the value in "#define NAME VALUE" lines.
13704 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13705 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13706 ac_dC='\3'
13707 ac_dD='%g'
13708 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13709 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13710 ac_uB='\([      ]\)%\1#\2define\3'
13711 ac_uC=' '
13712 ac_uD='\4%g'
13713 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13714 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13715 ac_eB='$%\1#\2define\3'
13716 ac_eC=' '
13717 ac_eD='%g'
13718
13719 if test "${CONFIG_HEADERS+set}" != set; then
13720 EOF
13721 cat >> $CONFIG_STATUS <<EOF
13722   CONFIG_HEADERS="include/config.h"
13723 EOF
13724 cat >> $CONFIG_STATUS <<\EOF
13725 fi
13726 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13727   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13728   case "$ac_file" in
13729   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13730        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13731   *) ac_file_in="${ac_file}.in" ;;
13732   esac
13733
13734   echo creating $ac_file
13735
13736   rm -f conftest.frag conftest.in conftest.out
13737   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13738   cat $ac_file_inputs > conftest.in
13739
13740 EOF
13741
13742 # Transform confdefs.h into a sed script conftest.vals that substitutes
13743 # the proper values into config.h.in to produce config.h.  And first:
13744 # Protect against being on the right side of a sed subst in config.status.
13745 # Protect against being in an unquoted here document in config.status.
13746 rm -f conftest.vals
13747 cat > conftest.hdr <<\EOF
13748 s/[\\&%]/\\&/g
13749 s%[\\$`]%\\&%g
13750 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13751 s%ac_d%ac_u%gp
13752 s%ac_u%ac_e%gp
13753 EOF
13754 sed -n -f conftest.hdr confdefs.h > conftest.vals
13755 rm -f conftest.hdr
13756
13757 # This sed command replaces #undef with comments.  This is necessary, for
13758 # example, in the case of _POSIX_SOURCE, which is predefined and required
13759 # on some systems where configure will not decide to define it.
13760 cat >> conftest.vals <<\EOF
13761 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13762 EOF
13763
13764 # Break up conftest.vals because some shells have a limit on
13765 # the size of here documents, and old seds have small limits too.
13766
13767 rm -f conftest.tail
13768 while :
13769 do
13770   ac_lines=`grep -c . conftest.vals`
13771   # grep -c gives empty output for an empty file on some AIX systems.
13772   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13773   # Write a limited-size here document to conftest.frag.
13774   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13775   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13776   echo 'CEOF
13777   sed -f conftest.frag conftest.in > conftest.out
13778   rm -f conftest.in
13779   mv conftest.out conftest.in
13780 ' >> $CONFIG_STATUS
13781   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13782   rm -f conftest.vals
13783   mv conftest.tail conftest.vals
13784 done
13785 rm -f conftest.vals
13786
13787 cat >> $CONFIG_STATUS <<\EOF
13788   rm -f conftest.frag conftest.h
13789   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13790   cat conftest.in >> conftest.h
13791   rm -f conftest.in
13792   if cmp -s $ac_file conftest.h 2>/dev/null; then
13793     echo "$ac_file is unchanged"
13794     rm -f conftest.h
13795   else
13796     # Remove last slash and all that follows it.  Not all systems have dirname.
13797       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13798       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13799       # The file is in a subdirectory.
13800       test ! -d "$ac_dir" && mkdir "$ac_dir"
13801     fi
13802     rm -f $ac_file
13803     mv conftest.h $ac_file
13804   fi
13805 fi; done
13806
13807 EOF
13808 cat >> $CONFIG_STATUS <<EOF
13809
13810 EOF
13811 cat >> $CONFIG_STATUS <<\EOF
13812
13813 exit 0
13814 EOF
13815 chmod +x $CONFIG_STATUS
13816 rm -fr confdefs* $ac_clean_files
13817 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13818