Better explanation message for dmalloc.
[nivanova/samba-autobuild/.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug          turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-developer      turn on developer warnings and debugging [default=no]"
19 ac_help="$ac_help
20   --enable-dmalloc          enable heap debugging [default=no]"
21 ac_help="$ac_help
22   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
23 ac_help="$ac_help
24   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
25 ac_help="$ac_help
26   --with-smbwrapper       Include SMB wrapper support (default=no) "
27 ac_help="$ac_help
28   --with-afs              Include AFS clear-text auth support (default=no) "
29 ac_help="$ac_help
30   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
31 ac_help="$ac_help
32   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
33 ac_help="$ac_help
34   --with-automount        Include AUTOMOUNT support (default=no)"
35 ac_help="$ac_help
36   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
37 ac_help="$ac_help
38   --with-pam              Include PAM support (default=no)"
39 ac_help="$ac_help
40   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
41 ac_help="$ac_help
42   --with-tdbsam           Include experimental TDB SAM support (default=no)"
43 ac_help="$ac_help
44   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
45 ac_help="$ac_help
46   --with-nisplussam       Include NISPLUS SAM support (default=no)"
47 ac_help="$ac_help
48   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
49 ac_help="$ac_help
50   --with-ssl              Include SSL support (default=no)
51   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
52   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
53 ac_help="$ac_help
54   --with-syslog           Include experimental SYSLOG support (default=no)"
55 ac_help="$ac_help
56   --with-profiling-data   Include gathering source code profile information (default=no)"
57 ac_help="$ac_help
58   --with-quotas           Include experimental disk-quota support (default=no)"
59 ac_help="$ac_help
60   --with-utmp             Include experimental utmp accounting (default=no)"
61 ac_help="$ac_help
62   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
63 ac_help="$ac_help
64   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
65 ac_help="$ac_help
66   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
67 ac_help="$ac_help
68   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
69 ac_help="$ac_help
70   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
71 ac_help="$ac_help
72   --with-acl-support      Include ACL support (default=no)"
73 ac_help="$ac_help
74   --with-winbind          Build winbind (default, if supported by OS)"
75 ac_help="$ac_help
76   --with-included-popt    use bundled popt library, not from system"
77
78 # Initialize some variables set by options.
79 # The variables have the same names as the options, with
80 # dashes changed to underlines.
81 build=NONE
82 cache_file=./config.cache
83 exec_prefix=NONE
84 host=NONE
85 no_create=
86 nonopt=NONE
87 no_recursion=
88 prefix=NONE
89 program_prefix=NONE
90 program_suffix=NONE
91 program_transform_name=s,x,x,
92 silent=
93 site=
94 srcdir=
95 target=NONE
96 verbose=
97 x_includes=NONE
98 x_libraries=NONE
99 bindir='${exec_prefix}/bin'
100 sbindir='${exec_prefix}/sbin'
101 libexecdir='${exec_prefix}/libexec'
102 datadir='${prefix}/share'
103 sysconfdir='${prefix}/etc'
104 sharedstatedir='${prefix}/com'
105 localstatedir='${prefix}/var'
106 libdir='${exec_prefix}/lib'
107 includedir='${prefix}/include'
108 oldincludedir='/usr/include'
109 infodir='${prefix}/info'
110 mandir='${prefix}/man'
111
112 # Initialize some other variables.
113 subdirs=
114 MFLAGS= MAKEFLAGS=
115 SHELL=${CONFIG_SHELL-/bin/sh}
116 # Maximum number of lines to put in a shell here document.
117 ac_max_here_lines=12
118
119 ac_prev=
120 for ac_option
121 do
122
123   # If the previous option needs an argument, assign it.
124   if test -n "$ac_prev"; then
125     eval "$ac_prev=\$ac_option"
126     ac_prev=
127     continue
128   fi
129
130   case "$ac_option" in
131   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
132   *) ac_optarg= ;;
133   esac
134
135   # Accept the important Cygnus configure options, so we can diagnose typos.
136
137   case "$ac_option" in
138
139   -bindir | --bindir | --bindi | --bind | --bin | --bi)
140     ac_prev=bindir ;;
141   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
142     bindir="$ac_optarg" ;;
143
144   -build | --build | --buil | --bui | --bu)
145     ac_prev=build ;;
146   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
147     build="$ac_optarg" ;;
148
149   -cache-file | --cache-file | --cache-fil | --cache-fi \
150   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
151     ac_prev=cache_file ;;
152   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
153   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
154     cache_file="$ac_optarg" ;;
155
156   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
157     ac_prev=datadir ;;
158   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
159   | --da=*)
160     datadir="$ac_optarg" ;;
161
162   -disable-* | --disable-*)
163     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
164     # Reject names that are not valid shell variable names.
165     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
166       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
167     fi
168     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
169     eval "enable_${ac_feature}=no" ;;
170
171   -enable-* | --enable-*)
172     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
173     # Reject names that are not valid shell variable names.
174     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
175       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
176     fi
177     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
178     case "$ac_option" in
179       *=*) ;;
180       *) ac_optarg=yes ;;
181     esac
182     eval "enable_${ac_feature}='$ac_optarg'" ;;
183
184   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
185   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
186   | --exec | --exe | --ex)
187     ac_prev=exec_prefix ;;
188   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
189   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
190   | --exec=* | --exe=* | --ex=*)
191     exec_prefix="$ac_optarg" ;;
192
193   -gas | --gas | --ga | --g)
194     # Obsolete; use --with-gas.
195     with_gas=yes ;;
196
197   -help | --help | --hel | --he)
198     # Omit some internal or obsolete options to make the list less imposing.
199     # This message is too long to be a string in the A/UX 3.1 sh.
200     cat << EOF
201 Usage: configure [options] [host]
202 Options: [defaults in brackets after descriptions]
203 Configuration:
204   --cache-file=FILE       cache test results in FILE
205   --help                  print this message
206   --no-create             do not create output files
207   --quiet, --silent       do not print \`checking...' messages
208   --version               print the version of autoconf that created configure
209 Directory and file names:
210   --prefix=PREFIX         install architecture-independent files in PREFIX
211                           [$ac_default_prefix]
212   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
213                           [same as prefix]
214   --bindir=DIR            user executables in DIR [EPREFIX/bin]
215   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
216   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
217   --datadir=DIR           read-only architecture-independent data in DIR
218                           [PREFIX/share]
219   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
220   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
221                           [PREFIX/com]
222   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
223   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
224   --includedir=DIR        C header files in DIR [PREFIX/include]
225   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
226   --infodir=DIR           info documentation in DIR [PREFIX/info]
227   --mandir=DIR            man documentation in DIR [PREFIX/man]
228   --srcdir=DIR            find the sources in DIR [configure dir or ..]
229   --program-prefix=PREFIX prepend PREFIX to installed program names
230   --program-suffix=SUFFIX append SUFFIX to installed program names
231   --program-transform-name=PROGRAM
232                           run sed PROGRAM on installed program names
233 EOF
234     cat << EOF
235 Host type:
236   --build=BUILD           configure for building on BUILD [BUILD=HOST]
237   --host=HOST             configure for HOST [guessed]
238   --target=TARGET         configure for TARGET [TARGET=HOST]
239 Features and packages:
240   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
241   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
242   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
243   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
244   --x-includes=DIR        X include files are in DIR
245   --x-libraries=DIR       X library files are in DIR
246 EOF
247     if test -n "$ac_help"; then
248       echo "--enable and --with options recognized:$ac_help"
249     fi
250     exit 0 ;;
251
252   -host | --host | --hos | --ho)
253     ac_prev=host ;;
254   -host=* | --host=* | --hos=* | --ho=*)
255     host="$ac_optarg" ;;
256
257   -includedir | --includedir | --includedi | --included | --include \
258   | --includ | --inclu | --incl | --inc)
259     ac_prev=includedir ;;
260   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
261   | --includ=* | --inclu=* | --incl=* | --inc=*)
262     includedir="$ac_optarg" ;;
263
264   -infodir | --infodir | --infodi | --infod | --info | --inf)
265     ac_prev=infodir ;;
266   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
267     infodir="$ac_optarg" ;;
268
269   -libdir | --libdir | --libdi | --libd)
270     ac_prev=libdir ;;
271   -libdir=* | --libdir=* | --libdi=* | --libd=*)
272     libdir="$ac_optarg" ;;
273
274   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
275   | --libexe | --libex | --libe)
276     ac_prev=libexecdir ;;
277   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
278   | --libexe=* | --libex=* | --libe=*)
279     libexecdir="$ac_optarg" ;;
280
281   -localstatedir | --localstatedir | --localstatedi | --localstated \
282   | --localstate | --localstat | --localsta | --localst \
283   | --locals | --local | --loca | --loc | --lo)
284     ac_prev=localstatedir ;;
285   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
286   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
287   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
288     localstatedir="$ac_optarg" ;;
289
290   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
291     ac_prev=mandir ;;
292   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
293     mandir="$ac_optarg" ;;
294
295   -nfp | --nfp | --nf)
296     # Obsolete; use --without-fp.
297     with_fp=no ;;
298
299   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
300   | --no-cr | --no-c)
301     no_create=yes ;;
302
303   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
304   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
305     no_recursion=yes ;;
306
307   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
308   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
309   | --oldin | --oldi | --old | --ol | --o)
310     ac_prev=oldincludedir ;;
311   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
312   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
313   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
314     oldincludedir="$ac_optarg" ;;
315
316   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
317     ac_prev=prefix ;;
318   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
319     prefix="$ac_optarg" ;;
320
321   -program-prefix | --program-prefix | --program-prefi | --program-pref \
322   | --program-pre | --program-pr | --program-p)
323     ac_prev=program_prefix ;;
324   -program-prefix=* | --program-prefix=* | --program-prefi=* \
325   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
326     program_prefix="$ac_optarg" ;;
327
328   -program-suffix | --program-suffix | --program-suffi | --program-suff \
329   | --program-suf | --program-su | --program-s)
330     ac_prev=program_suffix ;;
331   -program-suffix=* | --program-suffix=* | --program-suffi=* \
332   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
333     program_suffix="$ac_optarg" ;;
334
335   -program-transform-name | --program-transform-name \
336   | --program-transform-nam | --program-transform-na \
337   | --program-transform-n | --program-transform- \
338   | --program-transform | --program-transfor \
339   | --program-transfo | --program-transf \
340   | --program-trans | --program-tran \
341   | --progr-tra | --program-tr | --program-t)
342     ac_prev=program_transform_name ;;
343   -program-transform-name=* | --program-transform-name=* \
344   | --program-transform-nam=* | --program-transform-na=* \
345   | --program-transform-n=* | --program-transform-=* \
346   | --program-transform=* | --program-transfor=* \
347   | --program-transfo=* | --program-transf=* \
348   | --program-trans=* | --program-tran=* \
349   | --progr-tra=* | --program-tr=* | --program-t=*)
350     program_transform_name="$ac_optarg" ;;
351
352   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
353   | -silent | --silent | --silen | --sile | --sil)
354     silent=yes ;;
355
356   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
357     ac_prev=sbindir ;;
358   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
359   | --sbi=* | --sb=*)
360     sbindir="$ac_optarg" ;;
361
362   -sharedstatedir | --sharedstatedir | --sharedstatedi \
363   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
364   | --sharedst | --shareds | --shared | --share | --shar \
365   | --sha | --sh)
366     ac_prev=sharedstatedir ;;
367   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
368   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
369   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
370   | --sha=* | --sh=*)
371     sharedstatedir="$ac_optarg" ;;
372
373   -site | --site | --sit)
374     ac_prev=site ;;
375   -site=* | --site=* | --sit=*)
376     site="$ac_optarg" ;;
377
378   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
379     ac_prev=srcdir ;;
380   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
381     srcdir="$ac_optarg" ;;
382
383   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
384   | --syscon | --sysco | --sysc | --sys | --sy)
385     ac_prev=sysconfdir ;;
386   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
387   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
388     sysconfdir="$ac_optarg" ;;
389
390   -target | --target | --targe | --targ | --tar | --ta | --t)
391     ac_prev=target ;;
392   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
393     target="$ac_optarg" ;;
394
395   -v | -verbose | --verbose | --verbos | --verbo | --verb)
396     verbose=yes ;;
397
398   -version | --version | --versio | --versi | --vers)
399     echo "configure generated by autoconf version 2.13"
400     exit 0 ;;
401
402   -with-* | --with-*)
403     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
404     # Reject names that are not valid shell variable names.
405     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
406       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
407     fi
408     ac_package=`echo $ac_package| sed 's/-/_/g'`
409     case "$ac_option" in
410       *=*) ;;
411       *) ac_optarg=yes ;;
412     esac
413     eval "with_${ac_package}='$ac_optarg'" ;;
414
415   -without-* | --without-*)
416     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
417     # Reject names that are not valid shell variable names.
418     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
419       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
420     fi
421     ac_package=`echo $ac_package| sed 's/-/_/g'`
422     eval "with_${ac_package}=no" ;;
423
424   --x)
425     # Obsolete; use --with-x.
426     with_x=yes ;;
427
428   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
429   | --x-incl | --x-inc | --x-in | --x-i)
430     ac_prev=x_includes ;;
431   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
432   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
433     x_includes="$ac_optarg" ;;
434
435   -x-libraries | --x-libraries | --x-librarie | --x-librari \
436   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
437     ac_prev=x_libraries ;;
438   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
439   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
440     x_libraries="$ac_optarg" ;;
441
442   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
443     ;;
444
445   *)
446     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
447       echo "configure: warning: $ac_option: invalid host type" 1>&2
448     fi
449     if test "x$nonopt" != xNONE; then
450       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
451     fi
452     nonopt="$ac_option"
453     ;;
454
455   esac
456 done
457
458 if test -n "$ac_prev"; then
459   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
460 fi
461
462 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
463
464 # File descriptor usage:
465 # 0 standard input
466 # 1 file creation
467 # 2 errors and warnings
468 # 3 some systems may open it to /dev/tty
469 # 4 used on the Kubota Titan
470 # 6 checking for... messages and results
471 # 5 compiler messages saved in config.log
472 if test "$silent" = yes; then
473   exec 6>/dev/null
474 else
475   exec 6>&1
476 fi
477 exec 5>./config.log
478
479 echo "\
480 This file contains any messages produced by compilers while
481 running configure, to aid debugging if configure makes a mistake.
482 " 1>&5
483
484 # Strip out --no-create and --no-recursion so they do not pile up.
485 # Also quote any args containing shell metacharacters.
486 ac_configure_args=
487 for ac_arg
488 do
489   case "$ac_arg" in
490   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
491   | --no-cr | --no-c) ;;
492   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
493   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
494   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
495   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
496   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
497   esac
498 done
499
500 # NLS nuisances.
501 # Only set these to C if already set.  These must not be set unconditionally
502 # because not all systems understand e.g. LANG=C (notably SCO).
503 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
504 # Non-C LC_CTYPE values break the ctype check.
505 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
506 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
507 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
508 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
509
510 # confdefs.h avoids OS command line length limits that DEFS can exceed.
511 rm -rf conftest* confdefs.h
512 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
513 echo > confdefs.h
514
515 # A filename unique to this package, relative to the directory that
516 # configure is in, which we can look for to find out if srcdir is correct.
517 ac_unique_file=include/includes.h
518
519 # Find the source files, if location was not specified.
520 if test -z "$srcdir"; then
521   ac_srcdir_defaulted=yes
522   # Try the directory containing this script, then its parent.
523   ac_prog=$0
524   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
525   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
526   srcdir=$ac_confdir
527   if test ! -r $srcdir/$ac_unique_file; then
528     srcdir=..
529   fi
530 else
531   ac_srcdir_defaulted=no
532 fi
533 if test ! -r $srcdir/$ac_unique_file; then
534   if test "$ac_srcdir_defaulted" = yes; then
535     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
536   else
537     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
538   fi
539 fi
540 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
541
542 # Prefer explicitly selected file to automatically selected ones.
543 if test -z "$CONFIG_SITE"; then
544   if test "x$prefix" != xNONE; then
545     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
546   else
547     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
548   fi
549 fi
550 for ac_site_file in $CONFIG_SITE; do
551   if test -r "$ac_site_file"; then
552     echo "loading site script $ac_site_file"
553     . "$ac_site_file"
554   fi
555 done
556
557 if test -r "$cache_file"; then
558   echo "loading cache $cache_file"
559   . $cache_file
560 else
561   echo "creating cache $cache_file"
562   > $cache_file
563 fi
564
565 ac_ext=c
566 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
567 ac_cpp='$CPP $CPPFLAGS'
568 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
569 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
570 cross_compiling=$ac_cv_prog_cc_cross
571
572 ac_exeext=
573 ac_objext=o
574 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
575   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
576   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
577     ac_n= ac_c='
578 ' ac_t='        '
579   else
580     ac_n=-n ac_c= ac_t=
581   fi
582 else
583   ac_n= ac_c='\c' ac_t=
584 fi
585
586
587
588 # we want to be compatible with older versions of Samba
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606 # compile with optimisation and without debugging by default
607 CFLAGS="-O ${CFLAGS}"
608
609 # Check whether --enable-debug or --disable-debug was given.
610 if test "${enable_debug+set}" = set; then
611   enableval="$enable_debug"
612   if eval "test x$enable_debug = xyes"; then
613         CFLAGS="${CFLAGS} -g"
614     fi
615 fi
616
617
618 # Check whether --enable-developer or --disable-developer was given.
619 if test "${enable_developer+set}" = set; then
620   enableval="$enable_developer"
621   if eval "test x$enable_developer = xyes"; then
622         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
623     fi
624 fi
625
626
627 # Check whether --enable-dmalloc or --disable-dmalloc was given.
628 if test "${enable_dmalloc+set}" = set; then
629   enableval="$enable_dmalloc"
630   :
631 fi
632
633
634 if test "x$enable_dmalloc" = xyes
635 then
636         cat >> confdefs.h <<\EOF
637 #define ENABLE_DMALLOC 1
638 EOF
639
640         cat >> confdefs.h <<\EOF
641 #define DMALLOC_FUNC_CHECK 1
642 EOF
643
644         LIBS="$LIBS -ldmalloc"  
645 fi
646
647 # Extract the first word of "gcc", so it can be a program name with args.
648 set dummy gcc; ac_word=$2
649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
650 echo "configure:651: checking for $ac_word" >&5
651 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
652   echo $ac_n "(cached) $ac_c" 1>&6
653 else
654   if test -n "$CC"; then
655   ac_cv_prog_CC="$CC" # Let the user override the test.
656 else
657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
658   ac_dummy="$PATH"
659   for ac_dir in $ac_dummy; do
660     test -z "$ac_dir" && ac_dir=.
661     if test -f $ac_dir/$ac_word; then
662       ac_cv_prog_CC="gcc"
663       break
664     fi
665   done
666   IFS="$ac_save_ifs"
667 fi
668 fi
669 CC="$ac_cv_prog_CC"
670 if test -n "$CC"; then
671   echo "$ac_t""$CC" 1>&6
672 else
673   echo "$ac_t""no" 1>&6
674 fi
675
676 if test -z "$CC"; then
677   # Extract the first word of "cc", so it can be a program name with args.
678 set dummy cc; ac_word=$2
679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
680 echo "configure:681: checking for $ac_word" >&5
681 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
682   echo $ac_n "(cached) $ac_c" 1>&6
683 else
684   if test -n "$CC"; then
685   ac_cv_prog_CC="$CC" # Let the user override the test.
686 else
687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
688   ac_prog_rejected=no
689   ac_dummy="$PATH"
690   for ac_dir in $ac_dummy; do
691     test -z "$ac_dir" && ac_dir=.
692     if test -f $ac_dir/$ac_word; then
693       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
694         ac_prog_rejected=yes
695         continue
696       fi
697       ac_cv_prog_CC="cc"
698       break
699     fi
700   done
701   IFS="$ac_save_ifs"
702 if test $ac_prog_rejected = yes; then
703   # We found a bogon in the path, so make sure we never use it.
704   set dummy $ac_cv_prog_CC
705   shift
706   if test $# -gt 0; then
707     # We chose a different compiler from the bogus one.
708     # However, it has the same basename, so the bogon will be chosen
709     # first if we set CC to just the basename; use the full file name.
710     shift
711     set dummy "$ac_dir/$ac_word" "$@"
712     shift
713     ac_cv_prog_CC="$@"
714   fi
715 fi
716 fi
717 fi
718 CC="$ac_cv_prog_CC"
719 if test -n "$CC"; then
720   echo "$ac_t""$CC" 1>&6
721 else
722   echo "$ac_t""no" 1>&6
723 fi
724
725   if test -z "$CC"; then
726     case "`uname -s`" in
727     *win32* | *WIN32*)
728       # Extract the first word of "cl", so it can be a program name with args.
729 set dummy cl; ac_word=$2
730 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
731 echo "configure:732: checking for $ac_word" >&5
732 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
733   echo $ac_n "(cached) $ac_c" 1>&6
734 else
735   if test -n "$CC"; then
736   ac_cv_prog_CC="$CC" # Let the user override the test.
737 else
738   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
739   ac_dummy="$PATH"
740   for ac_dir in $ac_dummy; do
741     test -z "$ac_dir" && ac_dir=.
742     if test -f $ac_dir/$ac_word; then
743       ac_cv_prog_CC="cl"
744       break
745     fi
746   done
747   IFS="$ac_save_ifs"
748 fi
749 fi
750 CC="$ac_cv_prog_CC"
751 if test -n "$CC"; then
752   echo "$ac_t""$CC" 1>&6
753 else
754   echo "$ac_t""no" 1>&6
755 fi
756  ;;
757     esac
758   fi
759   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
760 fi
761
762 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
763 echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
764
765 ac_ext=c
766 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
767 ac_cpp='$CPP $CPPFLAGS'
768 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
769 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
770 cross_compiling=$ac_cv_prog_cc_cross
771
772 cat > conftest.$ac_ext << EOF
773
774 #line 775 "configure"
775 #include "confdefs.h"
776
777 main(){return(0);}
778 EOF
779 if { (eval echo configure:780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
780   ac_cv_prog_cc_works=yes
781   # If we can't run a trivial program, we are probably using a cross compiler.
782   if (./conftest; exit) 2>/dev/null; then
783     ac_cv_prog_cc_cross=no
784   else
785     ac_cv_prog_cc_cross=yes
786   fi
787 else
788   echo "configure: failed program was:" >&5
789   cat conftest.$ac_ext >&5
790   ac_cv_prog_cc_works=no
791 fi
792 rm -fr conftest*
793 ac_ext=c
794 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
795 ac_cpp='$CPP $CPPFLAGS'
796 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
797 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
798 cross_compiling=$ac_cv_prog_cc_cross
799
800 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
801 if test $ac_cv_prog_cc_works = no; then
802   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
803 fi
804 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
805 echo "configure:806: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
806 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
807 cross_compiling=$ac_cv_prog_cc_cross
808
809 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
810 echo "configure:811: checking whether we are using GNU C" >&5
811 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
812   echo $ac_n "(cached) $ac_c" 1>&6
813 else
814   cat > conftest.c <<EOF
815 #ifdef __GNUC__
816   yes;
817 #endif
818 EOF
819 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
820   ac_cv_prog_gcc=yes
821 else
822   ac_cv_prog_gcc=no
823 fi
824 fi
825
826 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
827
828 if test $ac_cv_prog_gcc = yes; then
829   GCC=yes
830 else
831   GCC=
832 fi
833
834 ac_test_CFLAGS="${CFLAGS+set}"
835 ac_save_CFLAGS="$CFLAGS"
836 CFLAGS=
837 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
838 echo "configure:839: checking whether ${CC-cc} accepts -g" >&5
839 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
840   echo $ac_n "(cached) $ac_c" 1>&6
841 else
842   echo 'void f(){}' > conftest.c
843 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
844   ac_cv_prog_cc_g=yes
845 else
846   ac_cv_prog_cc_g=no
847 fi
848 rm -f conftest*
849
850 fi
851
852 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
853 if test "$ac_test_CFLAGS" = set; then
854   CFLAGS="$ac_save_CFLAGS"
855 elif test $ac_cv_prog_cc_g = yes; then
856   if test "$GCC" = yes; then
857     CFLAGS="-g -O2"
858   else
859     CFLAGS="-g"
860   fi
861 else
862   if test "$GCC" = yes; then
863     CFLAGS="-O2"
864   else
865     CFLAGS=
866   fi
867 fi
868
869 ac_aux_dir=
870 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
871   if test -f $ac_dir/install-sh; then
872     ac_aux_dir=$ac_dir
873     ac_install_sh="$ac_aux_dir/install-sh -c"
874     break
875   elif test -f $ac_dir/install.sh; then
876     ac_aux_dir=$ac_dir
877     ac_install_sh="$ac_aux_dir/install.sh -c"
878     break
879   fi
880 done
881 if test -z "$ac_aux_dir"; then
882   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
883 fi
884 ac_config_guess=$ac_aux_dir/config.guess
885 ac_config_sub=$ac_aux_dir/config.sub
886 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
887
888 # Find a good install program.  We prefer a C program (faster),
889 # so one script is as good as another.  But avoid the broken or
890 # incompatible versions:
891 # SysV /etc/install, /usr/sbin/install
892 # SunOS /usr/etc/install
893 # IRIX /sbin/install
894 # AIX /bin/install
895 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
896 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
897 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
898 # ./install, which can be erroneously created by make from ./install.sh.
899 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
900 echo "configure:901: checking for a BSD compatible install" >&5
901 if test -z "$INSTALL"; then
902 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
903   echo $ac_n "(cached) $ac_c" 1>&6
904 else
905     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
906   for ac_dir in $PATH; do
907     # Account for people who put trailing slashes in PATH elements.
908     case "$ac_dir/" in
909     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
910     *)
911       # OSF1 and SCO ODT 3.0 have their own names for install.
912       # Don't use installbsd from OSF since it installs stuff as root
913       # by default.
914       for ac_prog in ginstall scoinst install; do
915         if test -f $ac_dir/$ac_prog; then
916           if test $ac_prog = install &&
917             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
918             # AIX install.  It has an incompatible calling convention.
919             :
920           else
921             ac_cv_path_install="$ac_dir/$ac_prog -c"
922             break 2
923           fi
924         fi
925       done
926       ;;
927     esac
928   done
929   IFS="$ac_save_IFS"
930
931 fi
932   if test "${ac_cv_path_install+set}" = set; then
933     INSTALL="$ac_cv_path_install"
934   else
935     # As a last resort, use the slow shell script.  We don't cache a
936     # path for INSTALL within a source directory, because that will
937     # break other packages using the cache if that directory is
938     # removed, or if the path is relative.
939     INSTALL="$ac_install_sh"
940   fi
941 fi
942 echo "$ac_t""$INSTALL" 1>&6
943
944 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
945 # It thinks the first close brace ends the variable substitution.
946 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
947
948 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
949
950 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
951
952 for ac_prog in gawk mawk nawk awk
953 do
954 # Extract the first word of "$ac_prog", so it can be a program name with args.
955 set dummy $ac_prog; ac_word=$2
956 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
957 echo "configure:958: checking for $ac_word" >&5
958 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
959   echo $ac_n "(cached) $ac_c" 1>&6
960 else
961   if test -n "$AWK"; then
962   ac_cv_prog_AWK="$AWK" # Let the user override the test.
963 else
964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
965   ac_dummy="$PATH"
966   for ac_dir in $ac_dummy; do
967     test -z "$ac_dir" && ac_dir=.
968     if test -f $ac_dir/$ac_word; then
969       ac_cv_prog_AWK="$ac_prog"
970       break
971     fi
972   done
973   IFS="$ac_save_ifs"
974 fi
975 fi
976 AWK="$ac_cv_prog_AWK"
977 if test -n "$AWK"; then
978   echo "$ac_t""$AWK" 1>&6
979 else
980   echo "$ac_t""no" 1>&6
981 fi
982
983 test -n "$AWK" && break
984 done
985
986
987 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
988 echo "configure:989: checking for POSIXized ISC" >&5
989 if test -d /etc/conf/kconfig.d &&
990   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
991 then
992   echo "$ac_t""yes" 1>&6
993   ISC=yes # If later tests want to check for ISC.
994   cat >> confdefs.h <<\EOF
995 #define _POSIX_SOURCE 1
996 EOF
997
998   if test "$GCC" = yes; then
999     CC="$CC -posix"
1000   else
1001     CC="$CC -Xp"
1002   fi
1003 else
1004   echo "$ac_t""no" 1>&6
1005   ISC=
1006 fi
1007
1008
1009 if test "x$CC" != xcc; then
1010   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1011 echo "configure:1012: checking whether $CC and cc understand -c and -o together" >&5
1012 else
1013   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1014 echo "configure:1015: checking whether cc understands -c and -o together" >&5
1015 fi
1016 set dummy $CC; ac_cc="`echo $2 |
1017                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1018 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1019   echo $ac_n "(cached) $ac_c" 1>&6
1020 else
1021   echo 'foo(){}' > conftest.c
1022 # Make sure it works both with $CC and with simple cc.
1023 # We do the test twice because some compilers refuse to overwrite an
1024 # existing .o file with -o, though they will create one.
1025 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1026 if { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1027    test -f conftest.o && { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1028 then
1029   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1030   if test "x$CC" != xcc; then
1031     # Test first that cc exists at all.
1032     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1033       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1034       if { (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1035          test -f conftest.o && { (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1036       then
1037         # cc works too.
1038         :
1039       else
1040         # cc exists but doesn't like -o.
1041         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1042       fi
1043     fi
1044   fi
1045 else
1046   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1047 fi
1048 rm -f conftest*
1049
1050 fi
1051 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1052   echo "$ac_t""yes" 1>&6
1053 else
1054   echo "$ac_t""no" 1>&6
1055   cat >> confdefs.h <<\EOF
1056 #define NO_MINUS_C_MINUS_O 1
1057 EOF
1058
1059 fi
1060
1061 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1062       BROKEN_CC=
1063 else
1064       BROKEN_CC=#
1065 fi
1066
1067
1068 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1069 echo "configure:1070: checking that the C compiler understands volatile" >&5
1070 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1071   echo $ac_n "(cached) $ac_c" 1>&6
1072 else
1073   
1074     cat > conftest.$ac_ext <<EOF
1075 #line 1076 "configure"
1076 #include "confdefs.h"
1077 #include <sys/types.h>
1078 int main() {
1079 volatile int i = 0
1080 ; return 0; }
1081 EOF
1082 if { (eval echo configure:1083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1083   rm -rf conftest*
1084   samba_cv_volatile=yes
1085 else
1086   echo "configure: failed program was:" >&5
1087   cat conftest.$ac_ext >&5
1088   rm -rf conftest*
1089   samba_cv_volatile=no
1090 fi
1091 rm -f conftest*
1092 fi
1093
1094 echo "$ac_t""$samba_cv_volatile" 1>&6
1095 if test x"$samba_cv_volatile" = x"yes"; then
1096    cat >> confdefs.h <<\EOF
1097 #define HAVE_VOLATILE 1
1098 EOF
1099
1100 fi
1101
1102
1103
1104 # Do some error checking and defaulting for the host and target type.
1105 # The inputs are:
1106 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1107 #
1108 # The rules are:
1109 # 1. You are not allowed to specify --host, --target, and nonopt at the
1110 #    same time.
1111 # 2. Host defaults to nonopt.
1112 # 3. If nonopt is not specified, then host defaults to the current host,
1113 #    as determined by config.guess.
1114 # 4. Target and build default to nonopt.
1115 # 5. If nonopt is not specified, then target and build default to host.
1116
1117 # The aliases save the names the user supplied, while $host etc.
1118 # will get canonicalized.
1119 case $host---$target---$nonopt in
1120 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1121 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1122 esac
1123
1124
1125 # Make sure we can run config.sub.
1126 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1127 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1128 fi
1129
1130 echo $ac_n "checking host system type""... $ac_c" 1>&6
1131 echo "configure:1132: checking host system type" >&5
1132
1133 host_alias=$host
1134 case "$host_alias" in
1135 NONE)
1136   case $nonopt in
1137   NONE)
1138     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1139     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1140     fi ;;
1141   *) host_alias=$nonopt ;;
1142   esac ;;
1143 esac
1144
1145 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1146 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1147 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1148 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1149 echo "$ac_t""$host" 1>&6
1150
1151 echo $ac_n "checking target system type""... $ac_c" 1>&6
1152 echo "configure:1153: checking target system type" >&5
1153
1154 target_alias=$target
1155 case "$target_alias" in
1156 NONE)
1157   case $nonopt in
1158   NONE) target_alias=$host_alias ;;
1159   *) target_alias=$nonopt ;;
1160   esac ;;
1161 esac
1162
1163 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1164 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1165 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1166 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1167 echo "$ac_t""$target" 1>&6
1168
1169 echo $ac_n "checking build system type""... $ac_c" 1>&6
1170 echo "configure:1171: checking build system type" >&5
1171
1172 build_alias=$build
1173 case "$build_alias" in
1174 NONE)
1175   case $nonopt in
1176   NONE) build_alias=$host_alias ;;
1177   *) build_alias=$nonopt ;;
1178   esac ;;
1179 esac
1180
1181 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1182 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1183 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1184 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1185 echo "$ac_t""$build" 1>&6
1186
1187 test "$host_alias" != "$target_alias" &&
1188   test "$program_prefix$program_suffix$program_transform_name" = \
1189     NONENONEs,x,x, &&
1190   program_prefix=${target_alias}-
1191
1192
1193   case "$host_os" in
1194         *irix6*) cat >> confdefs.h <<\EOF
1195 #include <standards.h>
1196 EOF
1197
1198         ;;
1199 esac
1200
1201
1202     
1203     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1204 echo "configure:1205: checking config.cache system type" >&5
1205     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1206          test x"$ac_cv_host_system_type" != x"$host"; } ||
1207        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1208          test x"$ac_cv_build_system_type" != x"$build"; } ||
1209        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1210          test x"$ac_cv_target_system_type" != x"$target"; }; then
1211         echo "$ac_t""different" 1>&6
1212         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1213     else
1214         echo "$ac_t""same" 1>&6
1215     fi
1216     ac_cv_host_system_type="$host"
1217     ac_cv_build_system_type="$build"
1218     ac_cv_target_system_type="$target"
1219
1220
1221 #
1222 # Config CPPFLAG settings for strange OS's that must be set
1223 # before other tests.
1224 #
1225 case "$host_os" in
1226 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1227     *hpux*)
1228       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1229 echo "configure:1230: checking whether ${CC-cc} accepts -Ae" >&5
1230 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1231   echo $ac_n "(cached) $ac_c" 1>&6
1232 else
1233   echo 'void f(){}' > conftest.c
1234 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1235   ac_cv_prog_cc_Ae=yes
1236 else
1237   ac_cv_prog_cc_Ae=no
1238 fi
1239 rm -f conftest*
1240
1241 fi
1242
1243 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1244       # mmap on HPUX is completely broken...
1245       cat >> confdefs.h <<\EOF
1246 #define MMAP_BLACKLIST 1
1247 EOF
1248
1249       if test $ac_cv_prog_cc_Ae = yes; then
1250         CPPFLAGS="$CPPFLAGS -Ae"
1251       fi
1252 #
1253 # Defines needed for HPUX support.
1254 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1255 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1256 #
1257       case `uname -r` in
1258                         *9*|*10*)
1259                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1260                                 cat >> confdefs.h <<\EOF
1261 #define USE_BOTH_CRYPT_CALLS 1
1262 EOF
1263
1264                                 ;;
1265                         *11*)
1266                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1267                                 cat >> confdefs.h <<\EOF
1268 #define USE_BOTH_CRYPT_CALLS 1
1269 EOF
1270
1271                                 ;;
1272       esac
1273       ;;
1274
1275 #
1276 # CRAY Unicos has broken const handling
1277        *unicos*)
1278           echo "$ac_t""disabling const" 1>&6
1279           CPPFLAGS="$CPPFLAGS -Dconst="
1280           ;;
1281         
1282 #
1283 # AIX4.x doesn't even admit to having large
1284 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1285 #
1286     *aix4*)
1287           echo "$ac_t""enabling large file support" 1>&6
1288       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1289       ;;    
1290 #
1291 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1292 # to the existance of large files..
1293 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1294 # recommendations on large file support, however it makes the
1295 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1296 # recommendation makes the compile fail on gcc2.7. JRA.
1297 #
1298         *solaris*)
1299                 case `uname -r` in
1300                         5.0*|5.1*|5.2*|5.3*|5.5*)
1301                                 echo "$ac_t""no large file support" 1>&6
1302                                 ;;
1303                         5.*)
1304                         echo "$ac_t""enabling large file support" 1>&6
1305                         if test "$ac_cv_prog_gcc" = yes; then
1306                                 ${CC-cc} -v >conftest.c 2>&1
1307                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1308                                 rm -fr conftest.c
1309                                 case "$ac_cv_gcc_compiler_version_number" in
1310                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1311                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1312                                                 ;;
1313                                         *)
1314                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1315                                                 ;;
1316                                 esac
1317                         else
1318                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1319                         fi
1320                         ;;
1321                 esac
1322                 ;;
1323 #
1324 # Tests needed for SINIX large file support.
1325 #
1326     *sysv4*)
1327       if test $host = mips-sni-sysv4 ; then
1328         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1329 echo "configure:1330: checking for LFS support" >&5
1330         old_CPPFLAGS="$CPPFLAGS"
1331         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1332         if test "$cross_compiling" = yes; then
1333   SINIX_LFS_SUPPORT=cross
1334 else
1335   cat > conftest.$ac_ext <<EOF
1336 #line 1337 "configure"
1337 #include "confdefs.h"
1338
1339 #include <unistd.h>
1340 main () {
1341 #if _LFS64_LARGEFILE == 1
1342 exit(0);
1343 #else
1344 exit(1);
1345 #endif
1346 }
1347 EOF
1348 if { (eval echo configure:1349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1349 then
1350   SINIX_LFS_SUPPORT=yes
1351 else
1352   echo "configure: failed program was:" >&5
1353   cat conftest.$ac_ext >&5
1354   rm -fr conftest*
1355   SINIX_LFS_SUPPORT=no
1356 fi
1357 rm -fr conftest*
1358 fi
1359
1360         CPPFLAGS="$old_CPPFLAGS"
1361         if test x$SINIX_LFS_SUPPORT = xyes ; then
1362           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1363           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1364           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1365           LIBS="`getconf LFS64_LIBS` $LIBS"
1366         fi
1367       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1368       fi
1369     ;;
1370
1371 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1372 #
1373     *linux*)
1374         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1375 echo "configure:1376: checking for LFS support" >&5
1376         old_CPPFLAGS="$CPPFLAGS"
1377         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1378        if test "$cross_compiling" = yes; then
1379   LINUX_LFS_SUPPORT=cross
1380 else
1381   cat > conftest.$ac_ext <<EOF
1382 #line 1383 "configure"
1383 #include "confdefs.h"
1384
1385 #include <unistd.h>
1386 #include <sys/utsname.h>
1387 main() {
1388 #if _LFS64_LARGEFILE == 1
1389        struct utsname uts;
1390        char *release;
1391        int major, minor;
1392
1393        /* Ensure this is glibc 2.2 or higher */
1394 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1395        int libc_major = __GLIBC__;
1396        int libc_minor = __GLIBC_MINOR__;
1397
1398        if (libc_major < 2)
1399               exit(1);
1400        if (libc_minor < 2)
1401               exit(1);
1402 #endif
1403
1404        /* Ensure this is kernel 2.4 or higher */
1405
1406        uname(&uts);
1407        release = uts.release;
1408        major = atoi(strsep(&release, "."));
1409        minor = atoi(strsep(&release, "."));
1410
1411        if (major > 2 || (major == 2 && minor > 3))
1412                exit(0);
1413        exit(1);
1414 #else
1415        exit(1);
1416 #endif
1417 }
1418
1419 EOF
1420 if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1421 then
1422   LINUX_LFS_SUPPORT=yes
1423 else
1424   echo "configure: failed program was:" >&5
1425   cat conftest.$ac_ext >&5
1426   rm -fr conftest*
1427   LINUX_LFS_SUPPORT=no
1428 fi
1429 rm -fr conftest*
1430 fi
1431
1432         CPPFLAGS="$old_CPPFLAGS"
1433         if test x$LINUX_LFS_SUPPORT = xyes ; then
1434           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1435         fi
1436        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1437                 ;;
1438
1439     *hurd*)
1440         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1441 echo "configure:1442: checking for LFS support" >&5
1442         old_CPPFLAGS="$CPPFLAGS"
1443         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1444         if test "$cross_compiling" = yes; then
1445   GLIBC_LFS_SUPPORT=cross
1446 else
1447   cat > conftest.$ac_ext <<EOF
1448 #line 1449 "configure"
1449 #include "confdefs.h"
1450
1451 #include <unistd.h>
1452 main () {
1453 #if _LFS64_LARGEFILE == 1
1454 exit(0);
1455 #else
1456 exit(1);
1457 #endif
1458 }
1459 EOF
1460 if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1461 then
1462   GLIBC_LFS_SUPPORT=yes
1463 else
1464   echo "configure: failed program was:" >&5
1465   cat conftest.$ac_ext >&5
1466   rm -fr conftest*
1467   GLIBC_LFS_SUPPORT=no
1468 fi
1469 rm -fr conftest*
1470 fi
1471
1472         CPPFLAGS="$old_CPPFLAGS"
1473         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1474           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1475         fi
1476       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1477     ;;
1478
1479 esac
1480
1481 echo $ac_n "checking for inline""... $ac_c" 1>&6
1482 echo "configure:1483: checking for inline" >&5
1483 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1484   echo $ac_n "(cached) $ac_c" 1>&6
1485 else
1486   ac_cv_c_inline=no
1487 for ac_kw in inline __inline__ __inline; do
1488   cat > conftest.$ac_ext <<EOF
1489 #line 1490 "configure"
1490 #include "confdefs.h"
1491
1492 int main() {
1493 } $ac_kw foo() {
1494 ; return 0; }
1495 EOF
1496 if { (eval echo configure:1497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1497   rm -rf conftest*
1498   ac_cv_c_inline=$ac_kw; break
1499 else
1500   echo "configure: failed program was:" >&5
1501   cat conftest.$ac_ext >&5
1502 fi
1503 rm -f conftest*
1504 done
1505
1506 fi
1507
1508 echo "$ac_t""$ac_cv_c_inline" 1>&6
1509 case "$ac_cv_c_inline" in
1510   inline | yes) ;;
1511   no) cat >> confdefs.h <<\EOF
1512 #define inline 
1513 EOF
1514  ;;
1515   *)  cat >> confdefs.h <<EOF
1516 #define inline $ac_cv_c_inline
1517 EOF
1518  ;;
1519 esac
1520
1521 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1522 echo "configure:1523: checking how to run the C preprocessor" >&5
1523 # On Suns, sometimes $CPP names a directory.
1524 if test -n "$CPP" && test -d "$CPP"; then
1525   CPP=
1526 fi
1527 if test -z "$CPP"; then
1528 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1529   echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531     # This must be in double quotes, not single quotes, because CPP may get
1532   # substituted into the Makefile and "${CC-cc}" will confuse make.
1533   CPP="${CC-cc} -E"
1534   # On the NeXT, cc -E runs the code through the compiler's parser,
1535   # not just through cpp.
1536   cat > conftest.$ac_ext <<EOF
1537 #line 1538 "configure"
1538 #include "confdefs.h"
1539 #include <assert.h>
1540 Syntax Error
1541 EOF
1542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1543 { (eval echo configure:1544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1545 if test -z "$ac_err"; then
1546   :
1547 else
1548   echo "$ac_err" >&5
1549   echo "configure: failed program was:" >&5
1550   cat conftest.$ac_ext >&5
1551   rm -rf conftest*
1552   CPP="${CC-cc} -E -traditional-cpp"
1553   cat > conftest.$ac_ext <<EOF
1554 #line 1555 "configure"
1555 #include "confdefs.h"
1556 #include <assert.h>
1557 Syntax Error
1558 EOF
1559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1560 { (eval echo configure:1561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1562 if test -z "$ac_err"; then
1563   :
1564 else
1565   echo "$ac_err" >&5
1566   echo "configure: failed program was:" >&5
1567   cat conftest.$ac_ext >&5
1568   rm -rf conftest*
1569   CPP="${CC-cc} -nologo -E"
1570   cat > conftest.$ac_ext <<EOF
1571 #line 1572 "configure"
1572 #include "confdefs.h"
1573 #include <assert.h>
1574 Syntax Error
1575 EOF
1576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1577 { (eval echo configure:1578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1579 if test -z "$ac_err"; then
1580   :
1581 else
1582   echo "$ac_err" >&5
1583   echo "configure: failed program was:" >&5
1584   cat conftest.$ac_ext >&5
1585   rm -rf conftest*
1586   CPP=/lib/cpp
1587 fi
1588 rm -f conftest*
1589 fi
1590 rm -f conftest*
1591 fi
1592 rm -f conftest*
1593   ac_cv_prog_CPP="$CPP"
1594 fi
1595   CPP="$ac_cv_prog_CPP"
1596 else
1597   ac_cv_prog_CPP="$CPP"
1598 fi
1599 echo "$ac_t""$CPP" 1>&6
1600
1601 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1602 echo "configure:1603: checking for ANSI C header files" >&5
1603 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1604   echo $ac_n "(cached) $ac_c" 1>&6
1605 else
1606   cat > conftest.$ac_ext <<EOF
1607 #line 1608 "configure"
1608 #include "confdefs.h"
1609 #include <stdlib.h>
1610 #include <stdarg.h>
1611 #include <string.h>
1612 #include <float.h>
1613 EOF
1614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1615 { (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1617 if test -z "$ac_err"; then
1618   rm -rf conftest*
1619   ac_cv_header_stdc=yes
1620 else
1621   echo "$ac_err" >&5
1622   echo "configure: failed program was:" >&5
1623   cat conftest.$ac_ext >&5
1624   rm -rf conftest*
1625   ac_cv_header_stdc=no
1626 fi
1627 rm -f conftest*
1628
1629 if test $ac_cv_header_stdc = yes; then
1630   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1631 cat > conftest.$ac_ext <<EOF
1632 #line 1633 "configure"
1633 #include "confdefs.h"
1634 #include <string.h>
1635 EOF
1636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1637   egrep "memchr" >/dev/null 2>&1; then
1638   :
1639 else
1640   rm -rf conftest*
1641   ac_cv_header_stdc=no
1642 fi
1643 rm -f conftest*
1644
1645 fi
1646
1647 if test $ac_cv_header_stdc = yes; then
1648   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1649 cat > conftest.$ac_ext <<EOF
1650 #line 1651 "configure"
1651 #include "confdefs.h"
1652 #include <stdlib.h>
1653 EOF
1654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1655   egrep "free" >/dev/null 2>&1; then
1656   :
1657 else
1658   rm -rf conftest*
1659   ac_cv_header_stdc=no
1660 fi
1661 rm -f conftest*
1662
1663 fi
1664
1665 if test $ac_cv_header_stdc = yes; then
1666   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1667 if test "$cross_compiling" = yes; then
1668   :
1669 else
1670   cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1673 #include <ctype.h>
1674 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1675 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1676 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1677 int main () { int i; for (i = 0; i < 256; i++)
1678 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1679 exit (0); }
1680
1681 EOF
1682 if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1683 then
1684   :
1685 else
1686   echo "configure: failed program was:" >&5
1687   cat conftest.$ac_ext >&5
1688   rm -fr conftest*
1689   ac_cv_header_stdc=no
1690 fi
1691 rm -fr conftest*
1692 fi
1693
1694 fi
1695 fi
1696
1697 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1698 if test $ac_cv_header_stdc = yes; then
1699   cat >> confdefs.h <<\EOF
1700 #define STDC_HEADERS 1
1701 EOF
1702
1703 fi
1704
1705 ac_header_dirent=no
1706 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1707 do
1708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1709 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1710 echo "configure:1711: checking for $ac_hdr that defines DIR" >&5
1711 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1712   echo $ac_n "(cached) $ac_c" 1>&6
1713 else
1714   cat > conftest.$ac_ext <<EOF
1715 #line 1716 "configure"
1716 #include "confdefs.h"
1717 #include <sys/types.h>
1718 #include <$ac_hdr>
1719 int main() {
1720 DIR *dirp = 0;
1721 ; return 0; }
1722 EOF
1723 if { (eval echo configure:1724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1724   rm -rf conftest*
1725   eval "ac_cv_header_dirent_$ac_safe=yes"
1726 else
1727   echo "configure: failed program was:" >&5
1728   cat conftest.$ac_ext >&5
1729   rm -rf conftest*
1730   eval "ac_cv_header_dirent_$ac_safe=no"
1731 fi
1732 rm -f conftest*
1733 fi
1734 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1735   echo "$ac_t""yes" 1>&6
1736     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1737   cat >> confdefs.h <<EOF
1738 #define $ac_tr_hdr 1
1739 EOF
1740  ac_header_dirent=$ac_hdr; break
1741 else
1742   echo "$ac_t""no" 1>&6
1743 fi
1744 done
1745 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1746 if test $ac_header_dirent = dirent.h; then
1747 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1748 echo "configure:1749: checking for opendir in -ldir" >&5
1749 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1750 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1751   echo $ac_n "(cached) $ac_c" 1>&6
1752 else
1753   ac_save_LIBS="$LIBS"
1754 LIBS="-ldir  $LIBS"
1755 cat > conftest.$ac_ext <<EOF
1756 #line 1757 "configure"
1757 #include "confdefs.h"
1758 /* Override any gcc2 internal prototype to avoid an error.  */
1759 /* We use char because int might match the return type of a gcc2
1760     builtin and then its argument prototype would still apply.  */
1761 char opendir();
1762
1763 int main() {
1764 opendir()
1765 ; return 0; }
1766 EOF
1767 if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1768   rm -rf conftest*
1769   eval "ac_cv_lib_$ac_lib_var=yes"
1770 else
1771   echo "configure: failed program was:" >&5
1772   cat conftest.$ac_ext >&5
1773   rm -rf conftest*
1774   eval "ac_cv_lib_$ac_lib_var=no"
1775 fi
1776 rm -f conftest*
1777 LIBS="$ac_save_LIBS"
1778
1779 fi
1780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1781   echo "$ac_t""yes" 1>&6
1782   LIBS="$LIBS -ldir"
1783 else
1784   echo "$ac_t""no" 1>&6
1785 fi
1786
1787 else
1788 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1789 echo "configure:1790: checking for opendir in -lx" >&5
1790 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1791 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1792   echo $ac_n "(cached) $ac_c" 1>&6
1793 else
1794   ac_save_LIBS="$LIBS"
1795 LIBS="-lx  $LIBS"
1796 cat > conftest.$ac_ext <<EOF
1797 #line 1798 "configure"
1798 #include "confdefs.h"
1799 /* Override any gcc2 internal prototype to avoid an error.  */
1800 /* We use char because int might match the return type of a gcc2
1801     builtin and then its argument prototype would still apply.  */
1802 char opendir();
1803
1804 int main() {
1805 opendir()
1806 ; return 0; }
1807 EOF
1808 if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1809   rm -rf conftest*
1810   eval "ac_cv_lib_$ac_lib_var=yes"
1811 else
1812   echo "configure: failed program was:" >&5
1813   cat conftest.$ac_ext >&5
1814   rm -rf conftest*
1815   eval "ac_cv_lib_$ac_lib_var=no"
1816 fi
1817 rm -f conftest*
1818 LIBS="$ac_save_LIBS"
1819
1820 fi
1821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1822   echo "$ac_t""yes" 1>&6
1823   LIBS="$LIBS -lx"
1824 else
1825   echo "$ac_t""no" 1>&6
1826 fi
1827
1828 fi
1829
1830 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1831 echo "configure:1832: checking whether time.h and sys/time.h may both be included" >&5
1832 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1833   echo $ac_n "(cached) $ac_c" 1>&6
1834 else
1835   cat > conftest.$ac_ext <<EOF
1836 #line 1837 "configure"
1837 #include "confdefs.h"
1838 #include <sys/types.h>
1839 #include <sys/time.h>
1840 #include <time.h>
1841 int main() {
1842 struct tm *tp;
1843 ; return 0; }
1844 EOF
1845 if { (eval echo configure:1846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1846   rm -rf conftest*
1847   ac_cv_header_time=yes
1848 else
1849   echo "configure: failed program was:" >&5
1850   cat conftest.$ac_ext >&5
1851   rm -rf conftest*
1852   ac_cv_header_time=no
1853 fi
1854 rm -f conftest*
1855 fi
1856
1857 echo "$ac_t""$ac_cv_header_time" 1>&6
1858 if test $ac_cv_header_time = yes; then
1859   cat >> confdefs.h <<\EOF
1860 #define TIME_WITH_SYS_TIME 1
1861 EOF
1862
1863 fi
1864
1865 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1866 echo "configure:1867: checking for sys/wait.h that is POSIX.1 compatible" >&5
1867 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1868   echo $ac_n "(cached) $ac_c" 1>&6
1869 else
1870   cat > conftest.$ac_ext <<EOF
1871 #line 1872 "configure"
1872 #include "confdefs.h"
1873 #include <sys/types.h>
1874 #include <sys/wait.h>
1875 #ifndef WEXITSTATUS
1876 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1877 #endif
1878 #ifndef WIFEXITED
1879 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1880 #endif
1881 int main() {
1882 int s;
1883 wait (&s);
1884 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1885 ; return 0; }
1886 EOF
1887 if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1888   rm -rf conftest*
1889   ac_cv_header_sys_wait_h=yes
1890 else
1891   echo "configure: failed program was:" >&5
1892   cat conftest.$ac_ext >&5
1893   rm -rf conftest*
1894   ac_cv_header_sys_wait_h=no
1895 fi
1896 rm -f conftest*
1897 fi
1898
1899 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1900 if test $ac_cv_header_sys_wait_h = yes; then
1901   cat >> confdefs.h <<\EOF
1902 #define HAVE_SYS_WAIT_H 1
1903 EOF
1904
1905 fi
1906
1907 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1908 do
1909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1911 echo "configure:1912: checking for $ac_hdr" >&5
1912 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1913   echo $ac_n "(cached) $ac_c" 1>&6
1914 else
1915   cat > conftest.$ac_ext <<EOF
1916 #line 1917 "configure"
1917 #include "confdefs.h"
1918 #include <$ac_hdr>
1919 EOF
1920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1921 { (eval echo configure:1922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1923 if test -z "$ac_err"; then
1924   rm -rf conftest*
1925   eval "ac_cv_header_$ac_safe=yes"
1926 else
1927   echo "$ac_err" >&5
1928   echo "configure: failed program was:" >&5
1929   cat conftest.$ac_ext >&5
1930   rm -rf conftest*
1931   eval "ac_cv_header_$ac_safe=no"
1932 fi
1933 rm -f conftest*
1934 fi
1935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1936   echo "$ac_t""yes" 1>&6
1937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1938   cat >> confdefs.h <<EOF
1939 #define $ac_tr_hdr 1
1940 EOF
1941  
1942 else
1943   echo "$ac_t""no" 1>&6
1944 fi
1945 done
1946
1947 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1948 do
1949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1951 echo "configure:1952: checking for $ac_hdr" >&5
1952 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1953   echo $ac_n "(cached) $ac_c" 1>&6
1954 else
1955   cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1958 #include <$ac_hdr>
1959 EOF
1960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1961 { (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1963 if test -z "$ac_err"; then
1964   rm -rf conftest*
1965   eval "ac_cv_header_$ac_safe=yes"
1966 else
1967   echo "$ac_err" >&5
1968   echo "configure: failed program was:" >&5
1969   cat conftest.$ac_ext >&5
1970   rm -rf conftest*
1971   eval "ac_cv_header_$ac_safe=no"
1972 fi
1973 rm -f conftest*
1974 fi
1975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1976   echo "$ac_t""yes" 1>&6
1977     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1978   cat >> confdefs.h <<EOF
1979 #define $ac_tr_hdr 1
1980 EOF
1981  
1982 else
1983   echo "$ac_t""no" 1>&6
1984 fi
1985 done
1986
1987 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1988 do
1989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1991 echo "configure:1992: checking for $ac_hdr" >&5
1992 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1993   echo $ac_n "(cached) $ac_c" 1>&6
1994 else
1995   cat > conftest.$ac_ext <<EOF
1996 #line 1997 "configure"
1997 #include "confdefs.h"
1998 #include <$ac_hdr>
1999 EOF
2000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2001 { (eval echo configure:2002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2003 if test -z "$ac_err"; then
2004   rm -rf conftest*
2005   eval "ac_cv_header_$ac_safe=yes"
2006 else
2007   echo "$ac_err" >&5
2008   echo "configure: failed program was:" >&5
2009   cat conftest.$ac_ext >&5
2010   rm -rf conftest*
2011   eval "ac_cv_header_$ac_safe=no"
2012 fi
2013 rm -f conftest*
2014 fi
2015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2016   echo "$ac_t""yes" 1>&6
2017     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2018   cat >> confdefs.h <<EOF
2019 #define $ac_tr_hdr 1
2020 EOF
2021  
2022 else
2023   echo "$ac_t""no" 1>&6
2024 fi
2025 done
2026
2027 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2028 do
2029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2031 echo "configure:2032: checking for $ac_hdr" >&5
2032 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2033   echo $ac_n "(cached) $ac_c" 1>&6
2034 else
2035   cat > conftest.$ac_ext <<EOF
2036 #line 2037 "configure"
2037 #include "confdefs.h"
2038 #include <$ac_hdr>
2039 EOF
2040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2041 { (eval echo configure:2042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2043 if test -z "$ac_err"; then
2044   rm -rf conftest*
2045   eval "ac_cv_header_$ac_safe=yes"
2046 else
2047   echo "$ac_err" >&5
2048   echo "configure: failed program was:" >&5
2049   cat conftest.$ac_ext >&5
2050   rm -rf conftest*
2051   eval "ac_cv_header_$ac_safe=no"
2052 fi
2053 rm -f conftest*
2054 fi
2055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2056   echo "$ac_t""yes" 1>&6
2057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2058   cat >> confdefs.h <<EOF
2059 #define $ac_tr_hdr 1
2060 EOF
2061  
2062 else
2063   echo "$ac_t""no" 1>&6
2064 fi
2065 done
2066
2067 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
2068 do
2069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2071 echo "configure:2072: checking for $ac_hdr" >&5
2072 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2073   echo $ac_n "(cached) $ac_c" 1>&6
2074 else
2075   cat > conftest.$ac_ext <<EOF
2076 #line 2077 "configure"
2077 #include "confdefs.h"
2078 #include <$ac_hdr>
2079 EOF
2080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2081 { (eval echo configure:2082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2083 if test -z "$ac_err"; then
2084   rm -rf conftest*
2085   eval "ac_cv_header_$ac_safe=yes"
2086 else
2087   echo "$ac_err" >&5
2088   echo "configure: failed program was:" >&5
2089   cat conftest.$ac_ext >&5
2090   rm -rf conftest*
2091   eval "ac_cv_header_$ac_safe=no"
2092 fi
2093 rm -f conftest*
2094 fi
2095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2096   echo "$ac_t""yes" 1>&6
2097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2098   cat >> confdefs.h <<EOF
2099 #define $ac_tr_hdr 1
2100 EOF
2101  
2102 else
2103   echo "$ac_t""no" 1>&6
2104 fi
2105 done
2106
2107 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2108 do
2109 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2110 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2111 echo "configure:2112: checking for $ac_hdr" >&5
2112 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2113   echo $ac_n "(cached) $ac_c" 1>&6
2114 else
2115   cat > conftest.$ac_ext <<EOF
2116 #line 2117 "configure"
2117 #include "confdefs.h"
2118 #include <$ac_hdr>
2119 EOF
2120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2121 { (eval echo configure:2122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2123 if test -z "$ac_err"; then
2124   rm -rf conftest*
2125   eval "ac_cv_header_$ac_safe=yes"
2126 else
2127   echo "$ac_err" >&5
2128   echo "configure: failed program was:" >&5
2129   cat conftest.$ac_ext >&5
2130   rm -rf conftest*
2131   eval "ac_cv_header_$ac_safe=no"
2132 fi
2133 rm -f conftest*
2134 fi
2135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2136   echo "$ac_t""yes" 1>&6
2137     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2138   cat >> confdefs.h <<EOF
2139 #define $ac_tr_hdr 1
2140 EOF
2141  
2142 else
2143   echo "$ac_t""no" 1>&6
2144 fi
2145 done
2146
2147 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2148 do
2149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2151 echo "configure:2152: checking for $ac_hdr" >&5
2152 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2153   echo $ac_n "(cached) $ac_c" 1>&6
2154 else
2155   cat > conftest.$ac_ext <<EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2158 #include <$ac_hdr>
2159 EOF
2160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2161 { (eval echo configure:2162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2163 if test -z "$ac_err"; then
2164   rm -rf conftest*
2165   eval "ac_cv_header_$ac_safe=yes"
2166 else
2167   echo "$ac_err" >&5
2168   echo "configure: failed program was:" >&5
2169   cat conftest.$ac_ext >&5
2170   rm -rf conftest*
2171   eval "ac_cv_header_$ac_safe=no"
2172 fi
2173 rm -f conftest*
2174 fi
2175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2176   echo "$ac_t""yes" 1>&6
2177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2178   cat >> confdefs.h <<EOF
2179 #define $ac_tr_hdr 1
2180 EOF
2181  
2182 else
2183   echo "$ac_t""no" 1>&6
2184 fi
2185 done
2186
2187 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h
2188 do
2189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2191 echo "configure:2192: checking for $ac_hdr" >&5
2192 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2193   echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195   cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198 #include <$ac_hdr>
2199 EOF
2200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2201 { (eval echo configure:2202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2203 if test -z "$ac_err"; then
2204   rm -rf conftest*
2205   eval "ac_cv_header_$ac_safe=yes"
2206 else
2207   echo "$ac_err" >&5
2208   echo "configure: failed program was:" >&5
2209   cat conftest.$ac_ext >&5
2210   rm -rf conftest*
2211   eval "ac_cv_header_$ac_safe=no"
2212 fi
2213 rm -f conftest*
2214 fi
2215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2216   echo "$ac_t""yes" 1>&6
2217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2218   cat >> confdefs.h <<EOF
2219 #define $ac_tr_hdr 1
2220 EOF
2221  
2222 else
2223   echo "$ac_t""no" 1>&6
2224 fi
2225 done
2226
2227
2228 #
2229 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2230 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2231 #
2232 case "$host_os" in
2233     *hpux*)
2234                 cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 #include <shadow.h>
2238 int main() {
2239 struct spwd testme
2240 ; return 0; }
2241 EOF
2242 if { (eval echo configure:2243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2243   rm -rf conftest*
2244   ac_cv_header_shadow_h=yes
2245 else
2246   echo "configure: failed program was:" >&5
2247   cat conftest.$ac_ext >&5
2248   rm -rf conftest*
2249   ac_cv_header_shadow_h=no
2250 fi
2251 rm -f conftest*
2252                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2253                    cat >> confdefs.h <<\EOF
2254 #define HAVE_SHADOW_H 1
2255 EOF
2256
2257                 fi
2258         ;;
2259 esac
2260 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2261 do
2262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2264 echo "configure:2265: checking for $ac_hdr" >&5
2265 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2266   echo $ac_n "(cached) $ac_c" 1>&6
2267 else
2268   cat > conftest.$ac_ext <<EOF
2269 #line 2270 "configure"
2270 #include "confdefs.h"
2271 #include <$ac_hdr>
2272 EOF
2273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2274 { (eval echo configure:2275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2276 if test -z "$ac_err"; then
2277   rm -rf conftest*
2278   eval "ac_cv_header_$ac_safe=yes"
2279 else
2280   echo "$ac_err" >&5
2281   echo "configure: failed program was:" >&5
2282   cat conftest.$ac_ext >&5
2283   rm -rf conftest*
2284   eval "ac_cv_header_$ac_safe=no"
2285 fi
2286 rm -f conftest*
2287 fi
2288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2289   echo "$ac_t""yes" 1>&6
2290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2291   cat >> confdefs.h <<EOF
2292 #define $ac_tr_hdr 1
2293 EOF
2294  
2295 else
2296   echo "$ac_t""no" 1>&6
2297 fi
2298 done
2299
2300 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2301 do
2302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2304 echo "configure:2305: checking for $ac_hdr" >&5
2305 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2306   echo $ac_n "(cached) $ac_c" 1>&6
2307 else
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <$ac_hdr>
2312 EOF
2313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2314 { (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2316 if test -z "$ac_err"; then
2317   rm -rf conftest*
2318   eval "ac_cv_header_$ac_safe=yes"
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   eval "ac_cv_header_$ac_safe=no"
2325 fi
2326 rm -f conftest*
2327 fi
2328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2329   echo "$ac_t""yes" 1>&6
2330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2331   cat >> confdefs.h <<EOF
2332 #define $ac_tr_hdr 1
2333 EOF
2334  
2335 else
2336   echo "$ac_t""no" 1>&6
2337 fi
2338 done
2339
2340 for ac_hdr in stropts.h poll.h
2341 do
2342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2344 echo "configure:2345: checking for $ac_hdr" >&5
2345 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2346   echo $ac_n "(cached) $ac_c" 1>&6
2347 else
2348   cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 #include <$ac_hdr>
2352 EOF
2353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2354 { (eval echo configure:2355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2356 if test -z "$ac_err"; then
2357   rm -rf conftest*
2358   eval "ac_cv_header_$ac_safe=yes"
2359 else
2360   echo "$ac_err" >&5
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -rf conftest*
2364   eval "ac_cv_header_$ac_safe=no"
2365 fi
2366 rm -f conftest*
2367 fi
2368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2369   echo "$ac_t""yes" 1>&6
2370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2371   cat >> confdefs.h <<EOF
2372 #define $ac_tr_hdr 1
2373 EOF
2374  
2375 else
2376   echo "$ac_t""no" 1>&6
2377 fi
2378 done
2379
2380 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2381 do
2382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2384 echo "configure:2385: checking for $ac_hdr" >&5
2385 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2386   echo $ac_n "(cached) $ac_c" 1>&6
2387 else
2388   cat > conftest.$ac_ext <<EOF
2389 #line 2390 "configure"
2390 #include "confdefs.h"
2391 #include <$ac_hdr>
2392 EOF
2393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2394 { (eval echo configure:2395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2396 if test -z "$ac_err"; then
2397   rm -rf conftest*
2398   eval "ac_cv_header_$ac_safe=yes"
2399 else
2400   echo "$ac_err" >&5
2401   echo "configure: failed program was:" >&5
2402   cat conftest.$ac_ext >&5
2403   rm -rf conftest*
2404   eval "ac_cv_header_$ac_safe=no"
2405 fi
2406 rm -f conftest*
2407 fi
2408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2409   echo "$ac_t""yes" 1>&6
2410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2411   cat >> confdefs.h <<EOF
2412 #define $ac_tr_hdr 1
2413 EOF
2414  
2415 else
2416   echo "$ac_t""no" 1>&6
2417 fi
2418 done
2419
2420 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2421 do
2422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2424 echo "configure:2425: checking for $ac_hdr" >&5
2425 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2426   echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428   cat > conftest.$ac_ext <<EOF
2429 #line 2430 "configure"
2430 #include "confdefs.h"
2431 #include <$ac_hdr>
2432 EOF
2433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2434 { (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2436 if test -z "$ac_err"; then
2437   rm -rf conftest*
2438   eval "ac_cv_header_$ac_safe=yes"
2439 else
2440   echo "$ac_err" >&5
2441   echo "configure: failed program was:" >&5
2442   cat conftest.$ac_ext >&5
2443   rm -rf conftest*
2444   eval "ac_cv_header_$ac_safe=no"
2445 fi
2446 rm -f conftest*
2447 fi
2448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2449   echo "$ac_t""yes" 1>&6
2450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2451   cat >> confdefs.h <<EOF
2452 #define $ac_tr_hdr 1
2453 EOF
2454  
2455 else
2456   echo "$ac_t""no" 1>&6
2457 fi
2458 done
2459
2460
2461 # For experimental utmp support (lastlog on some BSD-like systems)
2462 for ac_hdr in utmp.h utmpx.h lastlog.h
2463 do
2464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2466 echo "configure:2467: checking for $ac_hdr" >&5
2467 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2468   echo $ac_n "(cached) $ac_c" 1>&6
2469 else
2470   cat > conftest.$ac_ext <<EOF
2471 #line 2472 "configure"
2472 #include "confdefs.h"
2473 #include <$ac_hdr>
2474 EOF
2475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2476 { (eval echo configure:2477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2478 if test -z "$ac_err"; then
2479   rm -rf conftest*
2480   eval "ac_cv_header_$ac_safe=yes"
2481 else
2482   echo "$ac_err" >&5
2483   echo "configure: failed program was:" >&5
2484   cat conftest.$ac_ext >&5
2485   rm -rf conftest*
2486   eval "ac_cv_header_$ac_safe=no"
2487 fi
2488 rm -f conftest*
2489 fi
2490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2491   echo "$ac_t""yes" 1>&6
2492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2493   cat >> confdefs.h <<EOF
2494 #define $ac_tr_hdr 1
2495 EOF
2496  
2497 else
2498   echo "$ac_t""no" 1>&6
2499 fi
2500 done
2501
2502  
2503 # For quotas on Veritas VxFS filesystems
2504 for ac_hdr in sys/fs/vx_quota.h
2505 do
2506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2508 echo "configure:2509: checking for $ac_hdr" >&5
2509 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2510   echo $ac_n "(cached) $ac_c" 1>&6
2511 else
2512   cat > conftest.$ac_ext <<EOF
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515 #include <$ac_hdr>
2516 EOF
2517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2518 { (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2520 if test -z "$ac_err"; then
2521   rm -rf conftest*
2522   eval "ac_cv_header_$ac_safe=yes"
2523 else
2524   echo "$ac_err" >&5
2525   echo "configure: failed program was:" >&5
2526   cat conftest.$ac_ext >&5
2527   rm -rf conftest*
2528   eval "ac_cv_header_$ac_safe=no"
2529 fi
2530 rm -f conftest*
2531 fi
2532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2533   echo "$ac_t""yes" 1>&6
2534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2535   cat >> confdefs.h <<EOF
2536 #define $ac_tr_hdr 1
2537 EOF
2538  
2539 else
2540   echo "$ac_t""no" 1>&6
2541 fi
2542 done
2543
2544
2545 # For quotas on Linux XFS filesystems
2546 for ac_hdr in linux/xqm.h
2547 do
2548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2550 echo "configure:2551: checking for $ac_hdr" >&5
2551 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2552   echo $ac_n "(cached) $ac_c" 1>&6
2553 else
2554   cat > conftest.$ac_ext <<EOF
2555 #line 2556 "configure"
2556 #include "confdefs.h"
2557 #include <$ac_hdr>
2558 EOF
2559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2560 { (eval echo configure:2561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2562 if test -z "$ac_err"; then
2563   rm -rf conftest*
2564   eval "ac_cv_header_$ac_safe=yes"
2565 else
2566   echo "$ac_err" >&5
2567   echo "configure: failed program was:" >&5
2568   cat conftest.$ac_ext >&5
2569   rm -rf conftest*
2570   eval "ac_cv_header_$ac_safe=no"
2571 fi
2572 rm -f conftest*
2573 fi
2574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2575   echo "$ac_t""yes" 1>&6
2576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2577   cat >> confdefs.h <<EOF
2578 #define $ac_tr_hdr 1
2579 EOF
2580  
2581 else
2582   echo "$ac_t""no" 1>&6
2583 fi
2584 done
2585
2586
2587 echo $ac_n "checking size of int""... $ac_c" 1>&6
2588 echo "configure:2589: checking size of int" >&5
2589 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2590   echo $ac_n "(cached) $ac_c" 1>&6
2591 else
2592   if test "$cross_compiling" = yes; then
2593   ac_cv_sizeof_int=cross
2594 else
2595   cat > conftest.$ac_ext <<EOF
2596 #line 2597 "configure"
2597 #include "confdefs.h"
2598 #include <stdio.h>
2599 main()
2600 {
2601   FILE *f=fopen("conftestval", "w");
2602   if (!f) exit(1);
2603   fprintf(f, "%d\n", sizeof(int));
2604   exit(0);
2605 }
2606 EOF
2607 if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2608 then
2609   ac_cv_sizeof_int=`cat conftestval`
2610 else
2611   echo "configure: failed program was:" >&5
2612   cat conftest.$ac_ext >&5
2613   rm -fr conftest*
2614   ac_cv_sizeof_int=0
2615 fi
2616 rm -fr conftest*
2617 fi
2618
2619 fi
2620 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2621 cat >> confdefs.h <<EOF
2622 #define SIZEOF_INT $ac_cv_sizeof_int
2623 EOF
2624
2625
2626 echo $ac_n "checking size of long""... $ac_c" 1>&6
2627 echo "configure:2628: checking size of long" >&5
2628 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   if test "$cross_compiling" = yes; then
2632   ac_cv_sizeof_long=cross
2633 else
2634   cat > conftest.$ac_ext <<EOF
2635 #line 2636 "configure"
2636 #include "confdefs.h"
2637 #include <stdio.h>
2638 main()
2639 {
2640   FILE *f=fopen("conftestval", "w");
2641   if (!f) exit(1);
2642   fprintf(f, "%d\n", sizeof(long));
2643   exit(0);
2644 }
2645 EOF
2646 if { (eval echo configure:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2647 then
2648   ac_cv_sizeof_long=`cat conftestval`
2649 else
2650   echo "configure: failed program was:" >&5
2651   cat conftest.$ac_ext >&5
2652   rm -fr conftest*
2653   ac_cv_sizeof_long=0
2654 fi
2655 rm -fr conftest*
2656 fi
2657
2658 fi
2659 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2660 cat >> confdefs.h <<EOF
2661 #define SIZEOF_LONG $ac_cv_sizeof_long
2662 EOF
2663
2664
2665 echo $ac_n "checking size of short""... $ac_c" 1>&6
2666 echo "configure:2667: checking size of short" >&5
2667 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2668   echo $ac_n "(cached) $ac_c" 1>&6
2669 else
2670   if test "$cross_compiling" = yes; then
2671   ac_cv_sizeof_short=cross
2672 else
2673   cat > conftest.$ac_ext <<EOF
2674 #line 2675 "configure"
2675 #include "confdefs.h"
2676 #include <stdio.h>
2677 main()
2678 {
2679   FILE *f=fopen("conftestval", "w");
2680   if (!f) exit(1);
2681   fprintf(f, "%d\n", sizeof(short));
2682   exit(0);
2683 }
2684 EOF
2685 if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2686 then
2687   ac_cv_sizeof_short=`cat conftestval`
2688 else
2689   echo "configure: failed program was:" >&5
2690   cat conftest.$ac_ext >&5
2691   rm -fr conftest*
2692   ac_cv_sizeof_short=0
2693 fi
2694 rm -fr conftest*
2695 fi
2696
2697 fi
2698 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2699 cat >> confdefs.h <<EOF
2700 #define SIZEOF_SHORT $ac_cv_sizeof_short
2701 EOF
2702
2703
2704
2705 echo $ac_n "checking for working const""... $ac_c" 1>&6
2706 echo "configure:2707: checking for working const" >&5
2707 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2708   echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710   cat > conftest.$ac_ext <<EOF
2711 #line 2712 "configure"
2712 #include "confdefs.h"
2713
2714 int main() {
2715
2716 /* Ultrix mips cc rejects this.  */
2717 typedef int charset[2]; const charset x;
2718 /* SunOS 4.1.1 cc rejects this.  */
2719 char const *const *ccp;
2720 char **p;
2721 /* NEC SVR4.0.2 mips cc rejects this.  */
2722 struct point {int x, y;};
2723 static struct point const zero = {0,0};
2724 /* AIX XL C 1.02.0.0 rejects this.
2725    It does not let you subtract one const X* pointer from another in an arm
2726    of an if-expression whose if-part is not a constant expression */
2727 const char *g = "string";
2728 ccp = &g + (g ? g-g : 0);
2729 /* HPUX 7.0 cc rejects these. */
2730 ++ccp;
2731 p = (char**) ccp;
2732 ccp = (char const *const *) p;
2733 { /* SCO 3.2v4 cc rejects this.  */
2734   char *t;
2735   char const *s = 0 ? (char *) 0 : (char const *) 0;
2736
2737   *t++ = 0;
2738 }
2739 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2740   int x[] = {25, 17};
2741   const int *foo = &x[0];
2742   ++foo;
2743 }
2744 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2745   typedef const int *iptr;
2746   iptr p = 0;
2747   ++p;
2748 }
2749 { /* AIX XL C 1.02.0.0 rejects this saying
2750      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2751   struct s { int j; const int *ap[3]; };
2752   struct s *b; b->j = 5;
2753 }
2754 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2755   const int foo = 10;
2756 }
2757
2758 ; return 0; }
2759 EOF
2760 if { (eval echo configure:2761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2761   rm -rf conftest*
2762   ac_cv_c_const=yes
2763 else
2764   echo "configure: failed program was:" >&5
2765   cat conftest.$ac_ext >&5
2766   rm -rf conftest*
2767   ac_cv_c_const=no
2768 fi
2769 rm -f conftest*
2770 fi
2771
2772 echo "$ac_t""$ac_cv_c_const" 1>&6
2773 if test $ac_cv_c_const = no; then
2774   cat >> confdefs.h <<\EOF
2775 #define const 
2776 EOF
2777
2778 fi
2779
2780 echo $ac_n "checking for inline""... $ac_c" 1>&6
2781 echo "configure:2782: checking for inline" >&5
2782 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2783   echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785   ac_cv_c_inline=no
2786 for ac_kw in inline __inline__ __inline; do
2787   cat > conftest.$ac_ext <<EOF
2788 #line 2789 "configure"
2789 #include "confdefs.h"
2790
2791 int main() {
2792 } $ac_kw foo() {
2793 ; return 0; }
2794 EOF
2795 if { (eval echo configure:2796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2796   rm -rf conftest*
2797   ac_cv_c_inline=$ac_kw; break
2798 else
2799   echo "configure: failed program was:" >&5
2800   cat conftest.$ac_ext >&5
2801 fi
2802 rm -f conftest*
2803 done
2804
2805 fi
2806
2807 echo "$ac_t""$ac_cv_c_inline" 1>&6
2808 case "$ac_cv_c_inline" in
2809   inline | yes) ;;
2810   no) cat >> confdefs.h <<\EOF
2811 #define inline 
2812 EOF
2813  ;;
2814   *)  cat >> confdefs.h <<EOF
2815 #define inline $ac_cv_c_inline
2816 EOF
2817  ;;
2818 esac
2819
2820 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2821 echo "configure:2822: checking whether byte ordering is bigendian" >&5
2822 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   ac_cv_c_bigendian=unknown
2826 # See if sys/param.h defines the BYTE_ORDER macro.
2827 cat > conftest.$ac_ext <<EOF
2828 #line 2829 "configure"
2829 #include "confdefs.h"
2830 #include <sys/types.h>
2831 #include <sys/param.h>
2832 int main() {
2833
2834 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2835  bogus endian macros
2836 #endif
2837 ; return 0; }
2838 EOF
2839 if { (eval echo configure:2840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2840   rm -rf conftest*
2841   # It does; now see whether it defined to BIG_ENDIAN or not.
2842 cat > conftest.$ac_ext <<EOF
2843 #line 2844 "configure"
2844 #include "confdefs.h"
2845 #include <sys/types.h>
2846 #include <sys/param.h>
2847 int main() {
2848
2849 #if BYTE_ORDER != BIG_ENDIAN
2850  not big endian
2851 #endif
2852 ; return 0; }
2853 EOF
2854 if { (eval echo configure:2855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2855   rm -rf conftest*
2856   ac_cv_c_bigendian=yes
2857 else
2858   echo "configure: failed program was:" >&5
2859   cat conftest.$ac_ext >&5
2860   rm -rf conftest*
2861   ac_cv_c_bigendian=no
2862 fi
2863 rm -f conftest*
2864 else
2865   echo "configure: failed program was:" >&5
2866   cat conftest.$ac_ext >&5
2867 fi
2868 rm -f conftest*
2869 if test $ac_cv_c_bigendian = unknown; then
2870 if test "$cross_compiling" = yes; then
2871     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2872 else
2873   cat > conftest.$ac_ext <<EOF
2874 #line 2875 "configure"
2875 #include "confdefs.h"
2876 main () {
2877   /* Are we little or big endian?  From Harbison&Steele.  */
2878   union
2879   {
2880     long l;
2881     char c[sizeof (long)];
2882   } u;
2883   u.l = 1;
2884   exit (u.c[sizeof (long) - 1] == 1);
2885 }
2886 EOF
2887 if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2888 then
2889   ac_cv_c_bigendian=no
2890 else
2891   echo "configure: failed program was:" >&5
2892   cat conftest.$ac_ext >&5
2893   rm -fr conftest*
2894   ac_cv_c_bigendian=yes
2895 fi
2896 rm -fr conftest*
2897 fi
2898
2899 fi
2900 fi
2901
2902 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2903 if test $ac_cv_c_bigendian = yes; then
2904   cat >> confdefs.h <<\EOF
2905 #define WORDS_BIGENDIAN 1
2906 EOF
2907
2908 fi
2909
2910 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2911 echo "configure:2912: checking whether char is unsigned" >&5
2912 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2913   echo $ac_n "(cached) $ac_c" 1>&6
2914 else
2915   if test "$GCC" = yes; then
2916   # GCC predefines this symbol on systems where it applies.
2917 cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920 #ifdef __CHAR_UNSIGNED__
2921   yes
2922 #endif
2923
2924 EOF
2925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2926   egrep "yes" >/dev/null 2>&1; then
2927   rm -rf conftest*
2928   ac_cv_c_char_unsigned=yes
2929 else
2930   rm -rf conftest*
2931   ac_cv_c_char_unsigned=no
2932 fi
2933 rm -f conftest*
2934
2935 else
2936 if test "$cross_compiling" = yes; then
2937     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2938 else
2939   cat > conftest.$ac_ext <<EOF
2940 #line 2941 "configure"
2941 #include "confdefs.h"
2942 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2943 #if !defined(__STDC__) || __STDC__ != 1
2944 #define volatile
2945 #endif
2946 main() {
2947   volatile char c = 255; exit(c < 0);
2948 }
2949 EOF
2950 if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2951 then
2952   ac_cv_c_char_unsigned=yes
2953 else
2954   echo "configure: failed program was:" >&5
2955   cat conftest.$ac_ext >&5
2956   rm -fr conftest*
2957   ac_cv_c_char_unsigned=no
2958 fi
2959 rm -fr conftest*
2960 fi
2961
2962 fi
2963 fi
2964
2965 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2966 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2967   cat >> confdefs.h <<\EOF
2968 #define __CHAR_UNSIGNED__ 1
2969 EOF
2970
2971 fi
2972
2973
2974 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2975 echo "configure:2976: checking return type of signal handlers" >&5
2976 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2977   echo $ac_n "(cached) $ac_c" 1>&6
2978 else
2979   cat > conftest.$ac_ext <<EOF
2980 #line 2981 "configure"
2981 #include "confdefs.h"
2982 #include <sys/types.h>
2983 #include <signal.h>
2984 #ifdef signal
2985 #undef signal
2986 #endif
2987 #ifdef __cplusplus
2988 extern "C" void (*signal (int, void (*)(int)))(int);
2989 #else
2990 void (*signal ()) ();
2991 #endif
2992
2993 int main() {
2994 int i;
2995 ; return 0; }
2996 EOF
2997 if { (eval echo configure:2998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2998   rm -rf conftest*
2999   ac_cv_type_signal=void
3000 else
3001   echo "configure: failed program was:" >&5
3002   cat conftest.$ac_ext >&5
3003   rm -rf conftest*
3004   ac_cv_type_signal=int
3005 fi
3006 rm -f conftest*
3007 fi
3008
3009 echo "$ac_t""$ac_cv_type_signal" 1>&6
3010 cat >> confdefs.h <<EOF
3011 #define RETSIGTYPE $ac_cv_type_signal
3012 EOF
3013
3014
3015 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3016 echo "configure:3017: checking for uid_t in sys/types.h" >&5
3017 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3018   echo $ac_n "(cached) $ac_c" 1>&6
3019 else
3020   cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3023 #include <sys/types.h>
3024 EOF
3025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3026   egrep "uid_t" >/dev/null 2>&1; then
3027   rm -rf conftest*
3028   ac_cv_type_uid_t=yes
3029 else
3030   rm -rf conftest*
3031   ac_cv_type_uid_t=no
3032 fi
3033 rm -f conftest*
3034
3035 fi
3036
3037 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3038 if test $ac_cv_type_uid_t = no; then
3039   cat >> confdefs.h <<\EOF
3040 #define uid_t int
3041 EOF
3042
3043   cat >> confdefs.h <<\EOF
3044 #define gid_t int
3045 EOF
3046
3047 fi
3048
3049 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3050 echo "configure:3051: checking for mode_t" >&5
3051 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   cat > conftest.$ac_ext <<EOF
3055 #line 3056 "configure"
3056 #include "confdefs.h"
3057 #include <sys/types.h>
3058 #if STDC_HEADERS
3059 #include <stdlib.h>
3060 #include <stddef.h>
3061 #endif
3062 EOF
3063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3064   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3065   rm -rf conftest*
3066   ac_cv_type_mode_t=yes
3067 else
3068   rm -rf conftest*
3069   ac_cv_type_mode_t=no
3070 fi
3071 rm -f conftest*
3072
3073 fi
3074 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3075 if test $ac_cv_type_mode_t = no; then
3076   cat >> confdefs.h <<\EOF
3077 #define mode_t int
3078 EOF
3079
3080 fi
3081
3082 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3083 echo "configure:3084: checking for off_t" >&5
3084 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3085   echo $ac_n "(cached) $ac_c" 1>&6
3086 else
3087   cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090 #include <sys/types.h>
3091 #if STDC_HEADERS
3092 #include <stdlib.h>
3093 #include <stddef.h>
3094 #endif
3095 EOF
3096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3097   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3098   rm -rf conftest*
3099   ac_cv_type_off_t=yes
3100 else
3101   rm -rf conftest*
3102   ac_cv_type_off_t=no
3103 fi
3104 rm -f conftest*
3105
3106 fi
3107 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3108 if test $ac_cv_type_off_t = no; then
3109   cat >> confdefs.h <<\EOF
3110 #define off_t long
3111 EOF
3112
3113 fi
3114
3115 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3116 echo "configure:3117: checking for size_t" >&5
3117 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   cat > conftest.$ac_ext <<EOF
3121 #line 3122 "configure"
3122 #include "confdefs.h"
3123 #include <sys/types.h>
3124 #if STDC_HEADERS
3125 #include <stdlib.h>
3126 #include <stddef.h>
3127 #endif
3128 EOF
3129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3130   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3131   rm -rf conftest*
3132   ac_cv_type_size_t=yes
3133 else
3134   rm -rf conftest*
3135   ac_cv_type_size_t=no
3136 fi
3137 rm -f conftest*
3138
3139 fi
3140 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3141 if test $ac_cv_type_size_t = no; then
3142   cat >> confdefs.h <<\EOF
3143 #define size_t unsigned
3144 EOF
3145
3146 fi
3147
3148 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3149 echo "configure:3150: checking for pid_t" >&5
3150 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3151   echo $ac_n "(cached) $ac_c" 1>&6
3152 else
3153   cat > conftest.$ac_ext <<EOF
3154 #line 3155 "configure"
3155 #include "confdefs.h"
3156 #include <sys/types.h>
3157 #if STDC_HEADERS
3158 #include <stdlib.h>
3159 #include <stddef.h>
3160 #endif
3161 EOF
3162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3163   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3164   rm -rf conftest*
3165   ac_cv_type_pid_t=yes
3166 else
3167   rm -rf conftest*
3168   ac_cv_type_pid_t=no
3169 fi
3170 rm -f conftest*
3171
3172 fi
3173 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3174 if test $ac_cv_type_pid_t = no; then
3175   cat >> confdefs.h <<\EOF
3176 #define pid_t int
3177 EOF
3178
3179 fi
3180
3181 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3182 echo "configure:3183: checking for st_rdev in struct stat" >&5
3183 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3184   echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186   cat > conftest.$ac_ext <<EOF
3187 #line 3188 "configure"
3188 #include "confdefs.h"
3189 #include <sys/types.h>
3190 #include <sys/stat.h>
3191 int main() {
3192 struct stat s; s.st_rdev;
3193 ; return 0; }
3194 EOF
3195 if { (eval echo configure:3196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3196   rm -rf conftest*
3197   ac_cv_struct_st_rdev=yes
3198 else
3199   echo "configure: failed program was:" >&5
3200   cat conftest.$ac_ext >&5
3201   rm -rf conftest*
3202   ac_cv_struct_st_rdev=no
3203 fi
3204 rm -f conftest*
3205 fi
3206
3207 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3208 if test $ac_cv_struct_st_rdev = yes; then
3209   cat >> confdefs.h <<\EOF
3210 #define HAVE_ST_RDEV 1
3211 EOF
3212
3213 fi
3214
3215 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3216 echo "configure:3217: checking for d_off in dirent" >&5
3217 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   cat > conftest.$ac_ext <<EOF
3221 #line 3222 "configure"
3222 #include "confdefs.h"
3223
3224 #include <unistd.h>
3225 #include <sys/types.h>
3226 #include <dirent.h>
3227 int main() {
3228 struct dirent d; d.d_off;
3229 ; return 0; }
3230 EOF
3231 if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3232   rm -rf conftest*
3233   ac_cv_dirent_d_off=yes
3234 else
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   rm -rf conftest*
3238   ac_cv_dirent_d_off=no
3239 fi
3240 rm -f conftest*
3241 fi
3242
3243 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3244 if test $ac_cv_dirent_d_off = yes; then
3245   cat >> confdefs.h <<\EOF
3246 #define HAVE_DIRENT_D_OFF 1
3247 EOF
3248
3249 fi
3250
3251 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3252 echo "configure:3253: checking for ino_t" >&5
3253 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3254   echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256   cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 #include <sys/types.h>
3260 #if STDC_HEADERS
3261 #include <stdlib.h>
3262 #include <stddef.h>
3263 #endif
3264 EOF
3265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3266   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3267   rm -rf conftest*
3268   ac_cv_type_ino_t=yes
3269 else
3270   rm -rf conftest*
3271   ac_cv_type_ino_t=no
3272 fi
3273 rm -f conftest*
3274
3275 fi
3276 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3277 if test $ac_cv_type_ino_t = no; then
3278   cat >> confdefs.h <<\EOF
3279 #define ino_t unsigned
3280 EOF
3281
3282 fi
3283
3284 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3285 echo "configure:3286: checking for loff_t" >&5
3286 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3287   echo $ac_n "(cached) $ac_c" 1>&6
3288 else
3289   cat > conftest.$ac_ext <<EOF
3290 #line 3291 "configure"
3291 #include "confdefs.h"
3292 #include <sys/types.h>
3293 #if STDC_HEADERS
3294 #include <stdlib.h>
3295 #include <stddef.h>
3296 #endif
3297 EOF
3298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3299   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3300   rm -rf conftest*
3301   ac_cv_type_loff_t=yes
3302 else
3303   rm -rf conftest*
3304   ac_cv_type_loff_t=no
3305 fi
3306 rm -f conftest*
3307
3308 fi
3309 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3310 if test $ac_cv_type_loff_t = no; then
3311   cat >> confdefs.h <<\EOF
3312 #define loff_t off_t
3313 EOF
3314
3315 fi
3316
3317 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3318 echo "configure:3319: checking for offset_t" >&5
3319 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3320   echo $ac_n "(cached) $ac_c" 1>&6
3321 else
3322   cat > conftest.$ac_ext <<EOF
3323 #line 3324 "configure"
3324 #include "confdefs.h"
3325 #include <sys/types.h>
3326 #if STDC_HEADERS
3327 #include <stdlib.h>
3328 #include <stddef.h>
3329 #endif
3330 EOF
3331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3332   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3333   rm -rf conftest*
3334   ac_cv_type_offset_t=yes
3335 else
3336   rm -rf conftest*
3337   ac_cv_type_offset_t=no
3338 fi
3339 rm -f conftest*
3340
3341 fi
3342 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3343 if test $ac_cv_type_offset_t = no; then
3344   cat >> confdefs.h <<\EOF
3345 #define offset_t loff_t
3346 EOF
3347
3348 fi
3349
3350 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3351 echo "configure:3352: checking for ssize_t" >&5
3352 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355   cat > conftest.$ac_ext <<EOF
3356 #line 3357 "configure"
3357 #include "confdefs.h"
3358 #include <sys/types.h>
3359 #if STDC_HEADERS
3360 #include <stdlib.h>
3361 #include <stddef.h>
3362 #endif
3363 EOF
3364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3365   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3366   rm -rf conftest*
3367   ac_cv_type_ssize_t=yes
3368 else
3369   rm -rf conftest*
3370   ac_cv_type_ssize_t=no
3371 fi
3372 rm -f conftest*
3373
3374 fi
3375 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3376 if test $ac_cv_type_ssize_t = no; then
3377   cat >> confdefs.h <<\EOF
3378 #define ssize_t int
3379 EOF
3380
3381 fi
3382
3383 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3384 echo "configure:3385: checking for wchar_t" >&5
3385 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   cat > conftest.$ac_ext <<EOF
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391 #include <sys/types.h>
3392 #if STDC_HEADERS
3393 #include <stdlib.h>
3394 #include <stddef.h>
3395 #endif
3396 EOF
3397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3398   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3399   rm -rf conftest*
3400   ac_cv_type_wchar_t=yes
3401 else
3402   rm -rf conftest*
3403   ac_cv_type_wchar_t=no
3404 fi
3405 rm -f conftest*
3406
3407 fi
3408 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3409 if test $ac_cv_type_wchar_t = no; then
3410   cat >> confdefs.h <<\EOF
3411 #define wchar_t unsigned short
3412 EOF
3413
3414 fi
3415
3416
3417 ############################################
3418 # for cups support we need libcups, and a handful of header files
3419
3420 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3421 echo "configure:3422: checking for httpConnect in -lcups" >&5
3422 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3423 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   ac_save_LIBS="$LIBS"
3427 LIBS="-lcups  $LIBS"
3428 cat > conftest.$ac_ext <<EOF
3429 #line 3430 "configure"
3430 #include "confdefs.h"
3431 /* Override any gcc2 internal prototype to avoid an error.  */
3432 /* We use char because int might match the return type of a gcc2
3433     builtin and then its argument prototype would still apply.  */
3434 char httpConnect();
3435
3436 int main() {
3437 httpConnect()
3438 ; return 0; }
3439 EOF
3440 if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3441   rm -rf conftest*
3442   eval "ac_cv_lib_$ac_lib_var=yes"
3443 else
3444   echo "configure: failed program was:" >&5
3445   cat conftest.$ac_ext >&5
3446   rm -rf conftest*
3447   eval "ac_cv_lib_$ac_lib_var=no"
3448 fi
3449 rm -f conftest*
3450 LIBS="$ac_save_LIBS"
3451
3452 fi
3453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3454   echo "$ac_t""yes" 1>&6
3455     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3456     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3457   cat >> confdefs.h <<EOF
3458 #define $ac_tr_lib 1
3459 EOF
3460
3461   LIBS="-lcups $LIBS"
3462
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466
3467
3468 # I wonder if there is a nicer way of doing this?
3469
3470 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3471         for ac_hdr in cups/cups.h cups/language.h
3472 do
3473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3475 echo "configure:3476: checking for $ac_hdr" >&5
3476 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3477   echo $ac_n "(cached) $ac_c" 1>&6
3478 else
3479   cat > conftest.$ac_ext <<EOF
3480 #line 3481 "configure"
3481 #include "confdefs.h"
3482 #include <$ac_hdr>
3483 EOF
3484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3485 { (eval echo configure:3486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3487 if test -z "$ac_err"; then
3488   rm -rf conftest*
3489   eval "ac_cv_header_$ac_safe=yes"
3490 else
3491   echo "$ac_err" >&5
3492   echo "configure: failed program was:" >&5
3493   cat conftest.$ac_ext >&5
3494   rm -rf conftest*
3495   eval "ac_cv_header_$ac_safe=no"
3496 fi
3497 rm -f conftest*
3498 fi
3499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3500   echo "$ac_t""yes" 1>&6
3501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3502   cat >> confdefs.h <<EOF
3503 #define $ac_tr_hdr 1
3504 EOF
3505  
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509 done
3510
3511         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3512                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3513                         cat >> confdefs.h <<\EOF
3514 #define HAVE_CUPS 1
3515 EOF
3516
3517                 fi
3518         fi
3519 fi
3520
3521 ############################################
3522 # we need libdl for PAM and the new VFS code
3523 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3524 echo "configure:3525: checking for dlopen in -ldl" >&5
3525 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3526 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   ac_save_LIBS="$LIBS"
3530 LIBS="-ldl  $LIBS"
3531 cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 /* Override any gcc2 internal prototype to avoid an error.  */
3535 /* We use char because int might match the return type of a gcc2
3536     builtin and then its argument prototype would still apply.  */
3537 char dlopen();
3538
3539 int main() {
3540 dlopen()
3541 ; return 0; }
3542 EOF
3543 if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3544   rm -rf conftest*
3545   eval "ac_cv_lib_$ac_lib_var=yes"
3546 else
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   eval "ac_cv_lib_$ac_lib_var=no"
3551 fi
3552 rm -f conftest*
3553 LIBS="$ac_save_LIBS"
3554
3555 fi
3556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3557   echo "$ac_t""yes" 1>&6
3558   LIBS="$LIBS -ldl";
3559         cat >> confdefs.h <<\EOF
3560 #define HAVE_LIBDL 1
3561 EOF
3562
3563 else
3564   echo "$ac_t""no" 1>&6
3565 fi
3566
3567
3568 ############################################
3569 # check if the compiler can do immediate structures
3570 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3571 echo "configure:3572: checking for immediate structures" >&5
3572 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3573   echo $ac_n "(cached) $ac_c" 1>&6
3574 else
3575   
3576     cat > conftest.$ac_ext <<EOF
3577 #line 3578 "configure"
3578 #include "confdefs.h"
3579
3580 #include <stdio.h>
3581 int main() {
3582
3583    #define X_FOOBAR(x) ((FOOBAR) { x })
3584    typedef struct {unsigned x;} FOOBAR;
3585    FOOBAR f = X_FOOBAR(1);   
3586
3587 ; return 0; }
3588 EOF
3589 if { (eval echo configure:3590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3590   rm -rf conftest*
3591   samba_cv_immediate_structures=yes
3592 else
3593   echo "configure: failed program was:" >&5
3594   cat conftest.$ac_ext >&5
3595   rm -rf conftest*
3596   samba_cv_immediate_structures=no
3597 fi
3598 rm -f conftest*
3599 fi
3600
3601 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3602 if test x"$samba_cv_immediate_structures" = x"yes"; then
3603    cat >> confdefs.h <<\EOF
3604 #define HAVE_IMMEDIATE_STRUCTURES 1
3605 EOF
3606
3607 fi
3608
3609 ############################################
3610 # check for unix domain sockets
3611 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3612 echo "configure:3613: checking for unix domain sockets" >&5
3613 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3614   echo $ac_n "(cached) $ac_c" 1>&6
3615 else
3616   
3617     cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620
3621 #include <sys/types.h>
3622 #include <stdlib.h>
3623 #include <stddef.h>
3624 #include <sys/socket.h>
3625 #include <sys/un.h>
3626 int main() {
3627
3628   struct sockaddr_un sunaddr; 
3629   sunaddr.sun_family = AF_UNIX;
3630
3631 ; return 0; }
3632 EOF
3633 if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3634   rm -rf conftest*
3635   samba_cv_unixsocket=yes
3636 else
3637   echo "configure: failed program was:" >&5
3638   cat conftest.$ac_ext >&5
3639   rm -rf conftest*
3640   samba_cv_unixsocket=no
3641 fi
3642 rm -f conftest*
3643 fi
3644
3645 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3646 if test x"$samba_cv_unixsocket" = x"yes"; then
3647    cat >> confdefs.h <<\EOF
3648 #define HAVE_UNIXSOCKET 1
3649 EOF
3650
3651 fi
3652
3653
3654 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3655 echo "configure:3656: checking for socklen_t type" >&5
3656 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3657   echo $ac_n "(cached) $ac_c" 1>&6
3658 else
3659   
3660     cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663
3664 #include <sys/types.h>
3665 #if STDC_HEADERS
3666 #include <stdlib.h>
3667 #include <stddef.h>
3668 #endif
3669 #include <sys/socket.h>
3670 int main() {
3671 socklen_t i = 0
3672 ; return 0; }
3673 EOF
3674 if { (eval echo configure:3675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3675   rm -rf conftest*
3676   samba_cv_socklen_t=yes
3677 else
3678   echo "configure: failed program was:" >&5
3679   cat conftest.$ac_ext >&5
3680   rm -rf conftest*
3681   samba_cv_socklen_t=no
3682 fi
3683 rm -f conftest*
3684 fi
3685
3686 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3687 if test x"$samba_cv_socklen_t" = x"yes"; then
3688    cat >> confdefs.h <<\EOF
3689 #define HAVE_SOCKLEN_T_TYPE 1
3690 EOF
3691
3692 fi
3693
3694 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3695 echo "configure:3696: checking for sig_atomic_t type" >&5
3696 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3697   echo $ac_n "(cached) $ac_c" 1>&6
3698 else
3699   
3700     cat > conftest.$ac_ext <<EOF
3701 #line 3702 "configure"
3702 #include "confdefs.h"
3703
3704 #include <sys/types.h>
3705 #if STDC_HEADERS
3706 #include <stdlib.h>
3707 #include <stddef.h>
3708 #endif
3709 #include <signal.h>
3710 int main() {
3711 sig_atomic_t i = 0
3712 ; return 0; }
3713 EOF
3714 if { (eval echo configure:3715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3715   rm -rf conftest*
3716   samba_cv_sig_atomic_t=yes
3717 else
3718   echo "configure: failed program was:" >&5
3719   cat conftest.$ac_ext >&5
3720   rm -rf conftest*
3721   samba_cv_sig_atomic_t=no
3722 fi
3723 rm -f conftest*
3724 fi
3725
3726 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3727 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3728    cat >> confdefs.h <<\EOF
3729 #define HAVE_SIG_ATOMIC_T_TYPE 1
3730 EOF
3731
3732 fi
3733
3734 # stupid headers have the functions but no declaration. grrrr.
3735
3736  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3737 echo "configure:3738: checking for errno declaration" >&5
3738 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   
3742     cat > conftest.$ac_ext <<EOF
3743 #line 3744 "configure"
3744 #include "confdefs.h"
3745 #include <errno.h>
3746 int main() {
3747 int i = (int)errno
3748 ; return 0; }
3749 EOF
3750 if { (eval echo configure:3751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3751   rm -rf conftest*
3752   ac_cv_have_errno_decl=yes
3753 else
3754   echo "configure: failed program was:" >&5
3755   cat conftest.$ac_ext >&5
3756   rm -rf conftest*
3757   ac_cv_have_errno_decl=no
3758 fi
3759 rm -f conftest*
3760 fi
3761
3762 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3763  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3764     cat >> confdefs.h <<\EOF
3765 #define HAVE_ERRNO_DECL 1
3766 EOF
3767
3768  fi
3769
3770
3771  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3772 echo "configure:3773: checking for setresuid declaration" >&5
3773 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3774   echo $ac_n "(cached) $ac_c" 1>&6
3775 else
3776   
3777     cat > conftest.$ac_ext <<EOF
3778 #line 3779 "configure"
3779 #include "confdefs.h"
3780 #include <unistd.h>
3781 int main() {
3782 int i = (int)setresuid
3783 ; return 0; }
3784 EOF
3785 if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3786   rm -rf conftest*
3787   ac_cv_have_setresuid_decl=yes
3788 else
3789   echo "configure: failed program was:" >&5
3790   cat conftest.$ac_ext >&5
3791   rm -rf conftest*
3792   ac_cv_have_setresuid_decl=no
3793 fi
3794 rm -f conftest*
3795 fi
3796
3797 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3798  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3799     cat >> confdefs.h <<\EOF
3800 #define HAVE_SETRESUID_DECL 1
3801 EOF
3802
3803  fi
3804
3805
3806  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3807 echo "configure:3808: checking for setresgid declaration" >&5
3808 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3809   echo $ac_n "(cached) $ac_c" 1>&6
3810 else
3811   
3812     cat > conftest.$ac_ext <<EOF
3813 #line 3814 "configure"
3814 #include "confdefs.h"
3815 #include <unistd.h>
3816 int main() {
3817 int i = (int)setresgid
3818 ; return 0; }
3819 EOF
3820 if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3821   rm -rf conftest*
3822   ac_cv_have_setresgid_decl=yes
3823 else
3824   echo "configure: failed program was:" >&5
3825   cat conftest.$ac_ext >&5
3826   rm -rf conftest*
3827   ac_cv_have_setresgid_decl=no
3828 fi
3829 rm -f conftest*
3830 fi
3831
3832 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3833  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3834     cat >> confdefs.h <<\EOF
3835 #define HAVE_SETRESGID_DECL 1
3836 EOF
3837
3838  fi
3839
3840
3841  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3842 echo "configure:3843: checking for asprintf declaration" >&5
3843 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3844   echo $ac_n "(cached) $ac_c" 1>&6
3845 else
3846   
3847     cat > conftest.$ac_ext <<EOF
3848 #line 3849 "configure"
3849 #include "confdefs.h"
3850 #include <stdio.h>
3851 int main() {
3852 int i = (int)asprintf
3853 ; return 0; }
3854 EOF
3855 if { (eval echo configure:3856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3856   rm -rf conftest*
3857   ac_cv_have_asprintf_decl=yes
3858 else
3859   echo "configure: failed program was:" >&5
3860   cat conftest.$ac_ext >&5
3861   rm -rf conftest*
3862   ac_cv_have_asprintf_decl=no
3863 fi
3864 rm -f conftest*
3865 fi
3866
3867 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3868  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3869     cat >> confdefs.h <<\EOF
3870 #define HAVE_ASPRINTF_DECL 1
3871 EOF
3872
3873  fi
3874
3875
3876  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3877 echo "configure:3878: checking for vasprintf declaration" >&5
3878 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3879   echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881   
3882     cat > conftest.$ac_ext <<EOF
3883 #line 3884 "configure"
3884 #include "confdefs.h"
3885 #include <stdio.h>
3886 int main() {
3887 int i = (int)vasprintf
3888 ; return 0; }
3889 EOF
3890 if { (eval echo configure:3891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3891   rm -rf conftest*
3892   ac_cv_have_vasprintf_decl=yes
3893 else
3894   echo "configure: failed program was:" >&5
3895   cat conftest.$ac_ext >&5
3896   rm -rf conftest*
3897   ac_cv_have_vasprintf_decl=no
3898 fi
3899 rm -f conftest*
3900 fi
3901
3902 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3903  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3904     cat >> confdefs.h <<\EOF
3905 #define HAVE_VASPRINTF_DECL 1
3906 EOF
3907
3908  fi
3909
3910
3911  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3912 echo "configure:3913: checking for vsnprintf declaration" >&5
3913 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3914   echo $ac_n "(cached) $ac_c" 1>&6
3915 else
3916   
3917     cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 #include <stdio.h>
3921 int main() {
3922 int i = (int)vsnprintf
3923 ; return 0; }
3924 EOF
3925 if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3926   rm -rf conftest*
3927   ac_cv_have_vsnprintf_decl=yes
3928 else
3929   echo "configure: failed program was:" >&5
3930   cat conftest.$ac_ext >&5
3931   rm -rf conftest*
3932   ac_cv_have_vsnprintf_decl=no
3933 fi
3934 rm -f conftest*
3935 fi
3936
3937 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3938  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3939     cat >> confdefs.h <<\EOF
3940 #define HAVE_VSNPRINTF_DECL 1
3941 EOF
3942
3943  fi
3944
3945
3946  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3947 echo "configure:3948: checking for snprintf declaration" >&5
3948 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   
3952     cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955 #include <stdio.h>
3956 int main() {
3957 int i = (int)snprintf
3958 ; return 0; }
3959 EOF
3960 if { (eval echo configure:3961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3961   rm -rf conftest*
3962   ac_cv_have_snprintf_decl=yes
3963 else
3964   echo "configure: failed program was:" >&5
3965   cat conftest.$ac_ext >&5
3966   rm -rf conftest*
3967   ac_cv_have_snprintf_decl=no
3968 fi
3969 rm -f conftest*
3970 fi
3971
3972 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3973  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3974     cat >> confdefs.h <<\EOF
3975 #define HAVE_SNPRINTF_DECL 1
3976 EOF
3977
3978  fi
3979
3980
3981 # and glibc has setresuid under linux but the function does
3982 # nothing until kernel 2.1.44! very dumb.
3983 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3984 echo "configure:3985: checking for real setresuid" >&5
3985 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3986   echo $ac_n "(cached) $ac_c" 1>&6
3987 else
3988   
3989     if test "$cross_compiling" = yes; then
3990   samba_cv_have_setresuid=cross
3991 else
3992   cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 #include <errno.h>
3996 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3997 EOF
3998 if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3999 then
4000   samba_cv_have_setresuid=yes
4001 else
4002   echo "configure: failed program was:" >&5
4003   cat conftest.$ac_ext >&5
4004   rm -fr conftest*
4005   samba_cv_have_setresuid=no
4006 fi
4007 rm -fr conftest*
4008 fi
4009
4010 fi
4011
4012 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4013 if test x"$samba_cv_have_setresuid" = x"yes"; then
4014     cat >> confdefs.h <<\EOF
4015 #define HAVE_SETRESUID 1
4016 EOF
4017
4018 fi
4019
4020 # Do the same check for setresguid...
4021 #
4022 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4023 echo "configure:4024: checking for real setresgid" >&5
4024 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4025   echo $ac_n "(cached) $ac_c" 1>&6
4026 else
4027   
4028     if test "$cross_compiling" = yes; then
4029   samba_cv_have_setresgid=cross
4030 else
4031   cat > conftest.$ac_ext <<EOF
4032 #line 4033 "configure"
4033 #include "confdefs.h"
4034 #include <unistd.h>
4035 #include <errno.h>
4036 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4037 EOF
4038 if { (eval echo configure:4039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4039 then
4040   samba_cv_have_setresgid=yes
4041 else
4042   echo "configure: failed program was:" >&5
4043   cat conftest.$ac_ext >&5
4044   rm -fr conftest*
4045   samba_cv_have_setresgid=no
4046 fi
4047 rm -fr conftest*
4048 fi
4049
4050 fi
4051
4052 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4053 if test x"$samba_cv_have_setresgid" = x"yes"; then
4054     cat >> confdefs.h <<\EOF
4055 #define HAVE_SETRESGID 1
4056 EOF
4057
4058 fi
4059
4060 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4061 echo "configure:4062: checking for 8-bit clean memcmp" >&5
4062 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4063   echo $ac_n "(cached) $ac_c" 1>&6
4064 else
4065   if test "$cross_compiling" = yes; then
4066   ac_cv_func_memcmp_clean=no
4067 else
4068   cat > conftest.$ac_ext <<EOF
4069 #line 4070 "configure"
4070 #include "confdefs.h"
4071
4072 main()
4073 {
4074   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4075   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4076 }
4077
4078 EOF
4079 if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4080 then
4081   ac_cv_func_memcmp_clean=yes
4082 else
4083   echo "configure: failed program was:" >&5
4084   cat conftest.$ac_ext >&5
4085   rm -fr conftest*
4086   ac_cv_func_memcmp_clean=no
4087 fi
4088 rm -fr conftest*
4089 fi
4090
4091 fi
4092
4093 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4094 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4095
4096
4097 ###############################################
4098 # test for where we get crypt() from
4099 for ac_func in crypt
4100 do
4101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4102 echo "configure:4103: checking for $ac_func" >&5
4103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4104   echo $ac_n "(cached) $ac_c" 1>&6
4105 else
4106   cat > conftest.$ac_ext <<EOF
4107 #line 4108 "configure"
4108 #include "confdefs.h"
4109 /* System header to define __stub macros and hopefully few prototypes,
4110     which can conflict with char $ac_func(); below.  */
4111 #include <assert.h>
4112 /* Override any gcc2 internal prototype to avoid an error.  */
4113 /* We use char because int might match the return type of a gcc2
4114     builtin and then its argument prototype would still apply.  */
4115 char $ac_func();
4116
4117 int main() {
4118
4119 /* The GNU C library defines this for functions which it implements
4120     to always fail with ENOSYS.  Some functions are actually named
4121     something starting with __ and the normal name is an alias.  */
4122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4123 choke me
4124 #else
4125 $ac_func();
4126 #endif
4127
4128 ; return 0; }
4129 EOF
4130 if { (eval echo configure:4131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4131   rm -rf conftest*
4132   eval "ac_cv_func_$ac_func=yes"
4133 else
4134   echo "configure: failed program was:" >&5
4135   cat conftest.$ac_ext >&5
4136   rm -rf conftest*
4137   eval "ac_cv_func_$ac_func=no"
4138 fi
4139 rm -f conftest*
4140 fi
4141
4142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4143   echo "$ac_t""yes" 1>&6
4144     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4145   cat >> confdefs.h <<EOF
4146 #define $ac_tr_func 1
4147 EOF
4148  
4149 else
4150   echo "$ac_t""no" 1>&6
4151 fi
4152 done
4153
4154 if test x"$ac_cv_func_crypt" = x"no"; then
4155     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4156 echo "configure:4157: checking for crypt in -lcrypt" >&5
4157 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4158 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4159   echo $ac_n "(cached) $ac_c" 1>&6
4160 else
4161   ac_save_LIBS="$LIBS"
4162 LIBS="-lcrypt  $LIBS"
4163 cat > conftest.$ac_ext <<EOF
4164 #line 4165 "configure"
4165 #include "confdefs.h"
4166 /* Override any gcc2 internal prototype to avoid an error.  */
4167 /* We use char because int might match the return type of a gcc2
4168     builtin and then its argument prototype would still apply.  */
4169 char crypt();
4170
4171 int main() {
4172 crypt()
4173 ; return 0; }
4174 EOF
4175 if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4176   rm -rf conftest*
4177   eval "ac_cv_lib_$ac_lib_var=yes"
4178 else
4179   echo "configure: failed program was:" >&5
4180   cat conftest.$ac_ext >&5
4181   rm -rf conftest*
4182   eval "ac_cv_lib_$ac_lib_var=no"
4183 fi
4184 rm -f conftest*
4185 LIBS="$ac_save_LIBS"
4186
4187 fi
4188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4189   echo "$ac_t""yes" 1>&6
4190   LIBS="$LIBS -lcrypt";
4191         cat >> confdefs.h <<\EOF
4192 #define HAVE_CRYPT 1
4193 EOF
4194
4195 else
4196   echo "$ac_t""no" 1>&6
4197 fi
4198
4199 fi
4200
4201
4202 ###############################################
4203 # Readline included by default unless explicitly asked not to
4204 test "${with_readline+set}" != "set" && with_readline=yes
4205
4206 # test for where we get readline() from
4207 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4208 echo "configure:4209: checking whether to use readline" >&5
4209 # Check whether --with-readline or --without-readline was given.
4210 if test "${with_readline+set}" = set; then
4211   withval="$with_readline"
4212     case "$with_readline" in
4213   yes)
4214     echo "$ac_t""yes" 1>&6
4215
4216     for ac_hdr in readline.h history.h readline/readline.h
4217 do
4218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4220 echo "configure:4221: checking for $ac_hdr" >&5
4221 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <$ac_hdr>
4228 EOF
4229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4230 { (eval echo configure:4231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4232 if test -z "$ac_err"; then
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=yes"
4235 else
4236   echo "$ac_err" >&5
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   eval "ac_cv_header_$ac_safe=no"
4241 fi
4242 rm -f conftest*
4243 fi
4244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4245   echo "$ac_t""yes" 1>&6
4246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4247   cat >> confdefs.h <<EOF
4248 #define $ac_tr_hdr 1
4249 EOF
4250  
4251 else
4252   echo "$ac_t""no" 1>&6
4253 fi
4254 done
4255
4256     for ac_hdr in readline/history.h
4257 do
4258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4260 echo "configure:4261: checking for $ac_hdr" >&5
4261 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4262   echo $ac_n "(cached) $ac_c" 1>&6
4263 else
4264   cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 #include <$ac_hdr>
4268 EOF
4269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4270 { (eval echo configure:4271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4272 if test -z "$ac_err"; then
4273   rm -rf conftest*
4274   eval "ac_cv_header_$ac_safe=yes"
4275 else
4276   echo "$ac_err" >&5
4277   echo "configure: failed program was:" >&5
4278   cat conftest.$ac_ext >&5
4279   rm -rf conftest*
4280   eval "ac_cv_header_$ac_safe=no"
4281 fi
4282 rm -f conftest*
4283 fi
4284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4285   echo "$ac_t""yes" 1>&6
4286     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4287   cat >> confdefs.h <<EOF
4288 #define $ac_tr_hdr 1
4289 EOF
4290  
4291 else
4292   echo "$ac_t""no" 1>&6
4293 fi
4294 done
4295
4296
4297     for ac_hdr in readline.h readline/readline.h
4298 do
4299 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4300 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4301 echo "configure:4302: checking for $ac_hdr" >&5
4302 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4303   echo $ac_n "(cached) $ac_c" 1>&6
4304 else
4305   cat > conftest.$ac_ext <<EOF
4306 #line 4307 "configure"
4307 #include "confdefs.h"
4308 #include <$ac_hdr>
4309 EOF
4310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4311 { (eval echo configure:4312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4313 if test -z "$ac_err"; then
4314   rm -rf conftest*
4315   eval "ac_cv_header_$ac_safe=yes"
4316 else
4317   echo "$ac_err" >&5
4318   echo "configure: failed program was:" >&5
4319   cat conftest.$ac_ext >&5
4320   rm -rf conftest*
4321   eval "ac_cv_header_$ac_safe=no"
4322 fi
4323 rm -f conftest*
4324 fi
4325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4326   echo "$ac_t""yes" 1>&6
4327     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4328   cat >> confdefs.h <<EOF
4329 #define $ac_tr_hdr 1
4330 EOF
4331  
4332       for termlib in ncurses curses termcap terminfo termlib; do
4333        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4334 echo "configure:4335: checking for tgetent in -l${termlib}" >&5
4335 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4337   echo $ac_n "(cached) $ac_c" 1>&6
4338 else
4339   ac_save_LIBS="$LIBS"
4340 LIBS="-l${termlib}  $LIBS"
4341 cat > conftest.$ac_ext <<EOF
4342 #line 4343 "configure"
4343 #include "confdefs.h"
4344 /* Override any gcc2 internal prototype to avoid an error.  */
4345 /* We use char because int might match the return type of a gcc2
4346     builtin and then its argument prototype would still apply.  */
4347 char tgetent();
4348
4349 int main() {
4350 tgetent()
4351 ; return 0; }
4352 EOF
4353 if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4354   rm -rf conftest*
4355   eval "ac_cv_lib_$ac_lib_var=yes"
4356 else
4357   echo "configure: failed program was:" >&5
4358   cat conftest.$ac_ext >&5
4359   rm -rf conftest*
4360   eval "ac_cv_lib_$ac_lib_var=no"
4361 fi
4362 rm -f conftest*
4363 LIBS="$ac_save_LIBS"
4364
4365 fi
4366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4367   echo "$ac_t""yes" 1>&6
4368   TERMLIBS="-l${termlib}"; break
4369 else
4370   echo "$ac_t""no" 1>&6
4371 fi
4372
4373       done
4374       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4375 echo "configure:4376: checking for rl_callback_handler_install in -lreadline" >&5
4376 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4377 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4378   echo $ac_n "(cached) $ac_c" 1>&6
4379 else
4380   ac_save_LIBS="$LIBS"
4381 LIBS="-lreadline $TERMLIBS $LIBS"
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 /* Override any gcc2 internal prototype to avoid an error.  */
4386 /* We use char because int might match the return type of a gcc2
4387     builtin and then its argument prototype would still apply.  */
4388 char rl_callback_handler_install();
4389
4390 int main() {
4391 rl_callback_handler_install()
4392 ; return 0; }
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4395   rm -rf conftest*
4396   eval "ac_cv_lib_$ac_lib_var=yes"
4397 else
4398   echo "configure: failed program was:" >&5
4399   cat conftest.$ac_ext >&5
4400   rm -rf conftest*
4401   eval "ac_cv_lib_$ac_lib_var=no"
4402 fi
4403 rm -f conftest*
4404 LIBS="$ac_save_LIBS"
4405
4406 fi
4407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4408   echo "$ac_t""yes" 1>&6
4409   TERMLIBS="-lreadline $TERMLIBS"
4410        cat >> confdefs.h <<\EOF
4411 #define HAVE_LIBREADLINE 1
4412 EOF
4413
4414        break
4415 else
4416   echo "$ac_t""no" 1>&6
4417 TERMLIBS=
4418 fi
4419
4420 else
4421   echo "$ac_t""no" 1>&6
4422 fi
4423 done
4424
4425     ;;
4426   no)
4427     echo "$ac_t""no" 1>&6
4428     ;;
4429   *)
4430     echo "$ac_t""yes" 1>&6
4431
4432     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4433     # alternate readline path
4434     _ldflags=${LDFLAGS}
4435     _cppflags=${CPPFLAGS}
4436
4437     # Add additional search path
4438     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4439     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4440
4441     for ac_hdr in readline.h history.h readline/readline.h
4442 do
4443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4445 echo "configure:4446: checking for $ac_hdr" >&5
4446 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   cat > conftest.$ac_ext <<EOF
4450 #line 4451 "configure"
4451 #include "confdefs.h"
4452 #include <$ac_hdr>
4453 EOF
4454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4455 { (eval echo configure:4456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4457 if test -z "$ac_err"; then
4458   rm -rf conftest*
4459   eval "ac_cv_header_$ac_safe=yes"
4460 else
4461   echo "$ac_err" >&5
4462   echo "configure: failed program was:" >&5
4463   cat conftest.$ac_ext >&5
4464   rm -rf conftest*
4465   eval "ac_cv_header_$ac_safe=no"
4466 fi
4467 rm -f conftest*
4468 fi
4469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4470   echo "$ac_t""yes" 1>&6
4471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4472   cat >> confdefs.h <<EOF
4473 #define $ac_tr_hdr 1
4474 EOF
4475  
4476 else
4477   echo "$ac_t""no" 1>&6
4478 fi
4479 done
4480
4481     for ac_hdr in readline/history.h
4482 do
4483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4485 echo "configure:4486: checking for $ac_hdr" >&5
4486 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4487   echo $ac_n "(cached) $ac_c" 1>&6
4488 else
4489   cat > conftest.$ac_ext <<EOF
4490 #line 4491 "configure"
4491 #include "confdefs.h"
4492 #include <$ac_hdr>
4493 EOF
4494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4495 { (eval echo configure:4496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4497 if test -z "$ac_err"; then
4498   rm -rf conftest*
4499   eval "ac_cv_header_$ac_safe=yes"
4500 else
4501   echo "$ac_err" >&5
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   eval "ac_cv_header_$ac_safe=no"
4506 fi
4507 rm -f conftest*
4508 fi
4509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4510   echo "$ac_t""yes" 1>&6
4511     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4512   cat >> confdefs.h <<EOF
4513 #define $ac_tr_hdr 1
4514 EOF
4515  
4516 else
4517   echo "$ac_t""no" 1>&6
4518 fi
4519 done
4520
4521
4522     for ac_hdr in readline.h readline/readline.h
4523 do
4524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_hdr" >&5
4527 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   cat > conftest.$ac_ext <<EOF
4531 #line 4532 "configure"
4532 #include "confdefs.h"
4533 #include <$ac_hdr>
4534 EOF
4535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4536 { (eval echo configure:4537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4538 if test -z "$ac_err"; then
4539   rm -rf conftest*
4540   eval "ac_cv_header_$ac_safe=yes"
4541 else
4542   echo "$ac_err" >&5
4543   echo "configure: failed program was:" >&5
4544   cat conftest.$ac_ext >&5
4545   rm -rf conftest*
4546   eval "ac_cv_header_$ac_safe=no"
4547 fi
4548 rm -f conftest*
4549 fi
4550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4551   echo "$ac_t""yes" 1>&6
4552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4553   cat >> confdefs.h <<EOF
4554 #define $ac_tr_hdr 1
4555 EOF
4556  
4557       for termlib in ncurses curses termcap terminfo termlib; do
4558        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4559 echo "configure:4560: checking for tgetent in -l${termlib}" >&5
4560 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4561 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   ac_save_LIBS="$LIBS"
4565 LIBS="-l${termlib}  $LIBS"
4566 cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 /* Override any gcc2 internal prototype to avoid an error.  */
4570 /* We use char because int might match the return type of a gcc2
4571     builtin and then its argument prototype would still apply.  */
4572 char tgetent();
4573
4574 int main() {
4575 tgetent()
4576 ; return 0; }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4579   rm -rf conftest*
4580   eval "ac_cv_lib_$ac_lib_var=yes"
4581 else
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -rf conftest*
4585   eval "ac_cv_lib_$ac_lib_var=no"
4586 fi
4587 rm -f conftest*
4588 LIBS="$ac_save_LIBS"
4589
4590 fi
4591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4592   echo "$ac_t""yes" 1>&6
4593   TERMLIBS="-l${termlib}"; break
4594 else
4595   echo "$ac_t""no" 1>&6
4596 fi
4597
4598       done
4599       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4600 echo "configure:4601: checking for rl_callback_handler_install in -lreadline" >&5
4601 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   ac_save_LIBS="$LIBS"
4606 LIBS="-lreadline $TERMLIBS $LIBS"
4607 cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610 /* Override any gcc2 internal prototype to avoid an error.  */
4611 /* We use char because int might match the return type of a gcc2
4612     builtin and then its argument prototype would still apply.  */
4613 char rl_callback_handler_install();
4614
4615 int main() {
4616 rl_callback_handler_install()
4617 ; return 0; }
4618 EOF
4619 if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4620   rm -rf conftest*
4621   eval "ac_cv_lib_$ac_lib_var=yes"
4622 else
4623   echo "configure: failed program was:" >&5
4624   cat conftest.$ac_ext >&5
4625   rm -rf conftest*
4626   eval "ac_cv_lib_$ac_lib_var=no"
4627 fi
4628 rm -f conftest*
4629 LIBS="$ac_save_LIBS"
4630
4631 fi
4632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4633   echo "$ac_t""yes" 1>&6
4634   TERMLDFLAGS="-L$with_readline/lib"
4635        TERMCPPFLAGS="-I$with_readline/include"
4636        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4637        TERMLIBS="-lreadline $TERMLIBS"
4638        cat >> confdefs.h <<\EOF
4639 #define HAVE_LIBREADLINE 1
4640 EOF
4641
4642        break
4643 else
4644   echo "$ac_t""no" 1>&6
4645 TERMLIBS= CPPFLAGS=$_cppflags
4646 fi
4647
4648 else
4649   echo "$ac_t""no" 1>&6
4650 fi
4651 done
4652
4653
4654     LDFLAGS=$_ldflags
4655     ;;
4656   esac
4657 else
4658   echo "$ac_t""no" 1>&6
4659
4660 fi
4661
4662
4663
4664
4665 # The readline API changed slightly from readline3 to readline4, so
4666 # code will generate warnings on one of them unless we have a few
4667 # special cases.
4668 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4669 echo "configure:4670: checking for rl_completion_matches in -lreadline" >&5
4670 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4671 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   ac_save_LIBS="$LIBS"
4675 LIBS="-lreadline $TERMLIBS $LIBS"
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 /* Override any gcc2 internal prototype to avoid an error.  */
4680 /* We use char because int might match the return type of a gcc2
4681     builtin and then its argument prototype would still apply.  */
4682 char rl_completion_matches();
4683
4684 int main() {
4685 rl_completion_matches()
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689   rm -rf conftest*
4690   eval "ac_cv_lib_$ac_lib_var=yes"
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -rf conftest*
4695   eval "ac_cv_lib_$ac_lib_var=no"
4696 fi
4697 rm -f conftest*
4698 LIBS="$ac_save_LIBS"
4699
4700 fi
4701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4702   echo "$ac_t""yes" 1>&6
4703   cat >> confdefs.h <<\EOF
4704 #define HAVE_NEW_LIBREADLINE 1
4705 EOF
4706
4707 else
4708   echo "$ac_t""no" 1>&6
4709 fi
4710
4711
4712 # The following test taken from the cvs sources
4713 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4714 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4715 # libsocket.so which has a bad implementation of gethostbyname (it
4716 # only looks in /etc/hosts), so we only look for -lsocket if we need
4717 # it.
4718 for ac_func in connect
4719 do
4720 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4721 echo "configure:4722: checking for $ac_func" >&5
4722 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4723   echo $ac_n "(cached) $ac_c" 1>&6
4724 else
4725   cat > conftest.$ac_ext <<EOF
4726 #line 4727 "configure"
4727 #include "confdefs.h"
4728 /* System header to define __stub macros and hopefully few prototypes,
4729     which can conflict with char $ac_func(); below.  */
4730 #include <assert.h>
4731 /* Override any gcc2 internal prototype to avoid an error.  */
4732 /* We use char because int might match the return type of a gcc2
4733     builtin and then its argument prototype would still apply.  */
4734 char $ac_func();
4735
4736 int main() {
4737
4738 /* The GNU C library defines this for functions which it implements
4739     to always fail with ENOSYS.  Some functions are actually named
4740     something starting with __ and the normal name is an alias.  */
4741 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4742 choke me
4743 #else
4744 $ac_func();
4745 #endif
4746
4747 ; return 0; }
4748 EOF
4749 if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4750   rm -rf conftest*
4751   eval "ac_cv_func_$ac_func=yes"
4752 else
4753   echo "configure: failed program was:" >&5
4754   cat conftest.$ac_ext >&5
4755   rm -rf conftest*
4756   eval "ac_cv_func_$ac_func=no"
4757 fi
4758 rm -f conftest*
4759 fi
4760
4761 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4762   echo "$ac_t""yes" 1>&6
4763     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4764   cat >> confdefs.h <<EOF
4765 #define $ac_tr_func 1
4766 EOF
4767  
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771 done
4772
4773 if test x"$ac_cv_func_connect" = x"no"; then
4774     case "$LIBS" in
4775     *-lnsl*) ;;
4776     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4777 echo "configure:4778: checking for printf in -lnsl_s" >&5
4778 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   ac_save_LIBS="$LIBS"
4783 LIBS="-lnsl_s  $LIBS"
4784 cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787 /* Override any gcc2 internal prototype to avoid an error.  */
4788 /* We use char because int might match the return type of a gcc2
4789     builtin and then its argument prototype would still apply.  */
4790 char printf();
4791
4792 int main() {
4793 printf()
4794 ; return 0; }
4795 EOF
4796 if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4797   rm -rf conftest*
4798   eval "ac_cv_lib_$ac_lib_var=yes"
4799 else
4800   echo "configure: failed program was:" >&5
4801   cat conftest.$ac_ext >&5
4802   rm -rf conftest*
4803   eval "ac_cv_lib_$ac_lib_var=no"
4804 fi
4805 rm -f conftest*
4806 LIBS="$ac_save_LIBS"
4807
4808 fi
4809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4810   echo "$ac_t""yes" 1>&6
4811     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4812     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4813   cat >> confdefs.h <<EOF
4814 #define $ac_tr_lib 1
4815 EOF
4816
4817   LIBS="-lnsl_s $LIBS"
4818
4819 else
4820   echo "$ac_t""no" 1>&6
4821 fi
4822  ;;
4823     esac
4824     case "$LIBS" in
4825     *-lnsl*) ;;
4826     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4827 echo "configure:4828: checking for printf in -lnsl" >&5
4828 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4829 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4830   echo $ac_n "(cached) $ac_c" 1>&6
4831 else
4832   ac_save_LIBS="$LIBS"
4833 LIBS="-lnsl  $LIBS"
4834 cat > conftest.$ac_ext <<EOF
4835 #line 4836 "configure"
4836 #include "confdefs.h"
4837 /* Override any gcc2 internal prototype to avoid an error.  */
4838 /* We use char because int might match the return type of a gcc2
4839     builtin and then its argument prototype would still apply.  */
4840 char printf();
4841
4842 int main() {
4843 printf()
4844 ; return 0; }
4845 EOF
4846 if { (eval echo configure:4847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4847   rm -rf conftest*
4848   eval "ac_cv_lib_$ac_lib_var=yes"
4849 else
4850   echo "configure: failed program was:" >&5
4851   cat conftest.$ac_ext >&5
4852   rm -rf conftest*
4853   eval "ac_cv_lib_$ac_lib_var=no"
4854 fi
4855 rm -f conftest*
4856 LIBS="$ac_save_LIBS"
4857
4858 fi
4859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4860   echo "$ac_t""yes" 1>&6
4861     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4862     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4863   cat >> confdefs.h <<EOF
4864 #define $ac_tr_lib 1
4865 EOF
4866
4867   LIBS="-lnsl $LIBS"
4868
4869 else
4870   echo "$ac_t""no" 1>&6
4871 fi
4872  ;;
4873     esac
4874     case "$LIBS" in
4875     *-lsocket*) ;;
4876     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4877 echo "configure:4878: checking for connect in -lsocket" >&5
4878 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4880   echo $ac_n "(cached) $ac_c" 1>&6
4881 else
4882   ac_save_LIBS="$LIBS"
4883 LIBS="-lsocket  $LIBS"
4884 cat > conftest.$ac_ext <<EOF
4885 #line 4886 "configure"
4886 #include "confdefs.h"
4887 /* Override any gcc2 internal prototype to avoid an error.  */
4888 /* We use char because int might match the return type of a gcc2
4889     builtin and then its argument prototype would still apply.  */
4890 char connect();
4891
4892 int main() {
4893 connect()
4894 ; return 0; }
4895 EOF
4896 if { (eval echo configure:4897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4897   rm -rf conftest*
4898   eval "ac_cv_lib_$ac_lib_var=yes"
4899 else
4900   echo "configure: failed program was:" >&5
4901   cat conftest.$ac_ext >&5
4902   rm -rf conftest*
4903   eval "ac_cv_lib_$ac_lib_var=no"
4904 fi
4905 rm -f conftest*
4906 LIBS="$ac_save_LIBS"
4907
4908 fi
4909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4910   echo "$ac_t""yes" 1>&6
4911     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4912     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4913   cat >> confdefs.h <<EOF
4914 #define $ac_tr_lib 1
4915 EOF
4916
4917   LIBS="-lsocket $LIBS"
4918
4919 else
4920   echo "$ac_t""no" 1>&6
4921 fi
4922  ;;
4923     esac
4924     case "$LIBS" in
4925     *-linet*) ;;
4926     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4927 echo "configure:4928: checking for connect in -linet" >&5
4928 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4929 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4930   echo $ac_n "(cached) $ac_c" 1>&6
4931 else
4932   ac_save_LIBS="$LIBS"
4933 LIBS="-linet  $LIBS"
4934 cat > conftest.$ac_ext <<EOF
4935 #line 4936 "configure"
4936 #include "confdefs.h"
4937 /* Override any gcc2 internal prototype to avoid an error.  */
4938 /* We use char because int might match the return type of a gcc2
4939     builtin and then its argument prototype would still apply.  */
4940 char connect();
4941
4942 int main() {
4943 connect()
4944 ; return 0; }
4945 EOF
4946 if { (eval echo configure:4947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=yes"
4949 else
4950   echo "configure: failed program was:" >&5
4951   cat conftest.$ac_ext >&5
4952   rm -rf conftest*
4953   eval "ac_cv_lib_$ac_lib_var=no"
4954 fi
4955 rm -f conftest*
4956 LIBS="$ac_save_LIBS"
4957
4958 fi
4959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4960   echo "$ac_t""yes" 1>&6
4961     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4962     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4963   cat >> confdefs.h <<EOF
4964 #define $ac_tr_lib 1
4965 EOF
4966
4967   LIBS="-linet $LIBS"
4968
4969 else
4970   echo "$ac_t""no" 1>&6
4971 fi
4972  ;;
4973     esac
4974             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4975        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4976         # ac_cv_func_connect=yes
4977         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4978         cat >> confdefs.h <<\EOF
4979 #define HAVE_CONNECT 1
4980 EOF
4981
4982     fi
4983 fi
4984
4985 ###############################################
4986 # test for where we get get_yp_default_domain() from
4987 for ac_func in yp_get_default_domain
4988 do
4989 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4990 echo "configure:4991: checking for $ac_func" >&5
4991 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4992   echo $ac_n "(cached) $ac_c" 1>&6
4993 else
4994   cat > conftest.$ac_ext <<EOF
4995 #line 4996 "configure"
4996 #include "confdefs.h"
4997 /* System header to define __stub macros and hopefully few prototypes,
4998     which can conflict with char $ac_func(); below.  */
4999 #include <assert.h>
5000 /* Override any gcc2 internal prototype to avoid an error.  */
5001 /* We use char because int might match the return type of a gcc2
5002     builtin and then its argument prototype would still apply.  */
5003 char $ac_func();
5004
5005 int main() {
5006
5007 /* The GNU C library defines this for functions which it implements
5008     to always fail with ENOSYS.  Some functions are actually named
5009     something starting with __ and the normal name is an alias.  */
5010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5011 choke me
5012 #else
5013 $ac_func();
5014 #endif
5015
5016 ; return 0; }
5017 EOF
5018 if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5019   rm -rf conftest*
5020   eval "ac_cv_func_$ac_func=yes"
5021 else
5022   echo "configure: failed program was:" >&5
5023   cat conftest.$ac_ext >&5
5024   rm -rf conftest*
5025   eval "ac_cv_func_$ac_func=no"
5026 fi
5027 rm -f conftest*
5028 fi
5029
5030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5031   echo "$ac_t""yes" 1>&6
5032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5033   cat >> confdefs.h <<EOF
5034 #define $ac_tr_func 1
5035 EOF
5036  
5037 else
5038   echo "$ac_t""no" 1>&6
5039 fi
5040 done
5041
5042 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5043         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5044 echo "configure:5045: checking for yp_get_default_domain in -lnsl" >&5
5045 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5046 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5047   echo $ac_n "(cached) $ac_c" 1>&6
5048 else
5049   ac_save_LIBS="$LIBS"
5050 LIBS="-lnsl  $LIBS"
5051 cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054 /* Override any gcc2 internal prototype to avoid an error.  */
5055 /* We use char because int might match the return type of a gcc2
5056     builtin and then its argument prototype would still apply.  */
5057 char yp_get_default_domain();
5058
5059 int main() {
5060 yp_get_default_domain()
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=no"
5071 fi
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5074
5075 fi
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078   LIBS="$LIBS -lnsl";
5079         cat >> confdefs.h <<\EOF
5080 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5081 EOF
5082
5083 else
5084   echo "$ac_t""no" 1>&6
5085 fi
5086  
5087 fi
5088
5089 # Check if we have execl, if not we need to compile smbrun.
5090 for ac_func in execl
5091 do
5092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5093 echo "configure:5094: checking for $ac_func" >&5
5094 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5095   echo $ac_n "(cached) $ac_c" 1>&6
5096 else
5097   cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 /* System header to define __stub macros and hopefully few prototypes,
5101     which can conflict with char $ac_func(); below.  */
5102 #include <assert.h>
5103 /* Override any gcc2 internal prototype to avoid an error.  */
5104 /* We use char because int might match the return type of a gcc2
5105     builtin and then its argument prototype would still apply.  */
5106 char $ac_func();
5107
5108 int main() {
5109
5110 /* The GNU C library defines this for functions which it implements
5111     to always fail with ENOSYS.  Some functions are actually named
5112     something starting with __ and the normal name is an alias.  */
5113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5114 choke me
5115 #else
5116 $ac_func();
5117 #endif
5118
5119 ; return 0; }
5120 EOF
5121 if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5122   rm -rf conftest*
5123   eval "ac_cv_func_$ac_func=yes"
5124 else
5125   echo "configure: failed program was:" >&5
5126   cat conftest.$ac_ext >&5
5127   rm -rf conftest*
5128   eval "ac_cv_func_$ac_func=no"
5129 fi
5130 rm -f conftest*
5131 fi
5132
5133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5134   echo "$ac_t""yes" 1>&6
5135     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5136   cat >> confdefs.h <<EOF
5137 #define $ac_tr_func 1
5138 EOF
5139  
5140 else
5141   echo "$ac_t""no" 1>&6
5142 fi
5143 done
5144
5145 if test x"$ac_cv_func_execl" = x"no"; then
5146     RUNPROG="bin/smbrun"
5147 else
5148     RUNPROG=""
5149 fi
5150
5151 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5152 do
5153 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5154 echo "configure:5155: checking for $ac_func" >&5
5155 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5156   echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158   cat > conftest.$ac_ext <<EOF
5159 #line 5160 "configure"
5160 #include "confdefs.h"
5161 /* System header to define __stub macros and hopefully few prototypes,
5162     which can conflict with char $ac_func(); below.  */
5163 #include <assert.h>
5164 /* Override any gcc2 internal prototype to avoid an error.  */
5165 /* We use char because int might match the return type of a gcc2
5166     builtin and then its argument prototype would still apply.  */
5167 char $ac_func();
5168
5169 int main() {
5170
5171 /* The GNU C library defines this for functions which it implements
5172     to always fail with ENOSYS.  Some functions are actually named
5173     something starting with __ and the normal name is an alias.  */
5174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5175 choke me
5176 #else
5177 $ac_func();
5178 #endif
5179
5180 ; return 0; }
5181 EOF
5182 if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5183   rm -rf conftest*
5184   eval "ac_cv_func_$ac_func=yes"
5185 else
5186   echo "configure: failed program was:" >&5
5187   cat conftest.$ac_ext >&5
5188   rm -rf conftest*
5189   eval "ac_cv_func_$ac_func=no"
5190 fi
5191 rm -f conftest*
5192 fi
5193
5194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5195   echo "$ac_t""yes" 1>&6
5196     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5197   cat >> confdefs.h <<EOF
5198 #define $ac_tr_func 1
5199 EOF
5200  
5201 else
5202   echo "$ac_t""no" 1>&6
5203 fi
5204 done
5205
5206 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5207 do
5208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5209 echo "configure:5210: checking for $ac_func" >&5
5210 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5211   echo $ac_n "(cached) $ac_c" 1>&6
5212 else
5213   cat > conftest.$ac_ext <<EOF
5214 #line 5215 "configure"
5215 #include "confdefs.h"
5216 /* System header to define __stub macros and hopefully few prototypes,
5217     which can conflict with char $ac_func(); below.  */
5218 #include <assert.h>
5219 /* Override any gcc2 internal prototype to avoid an error.  */
5220 /* We use char because int might match the return type of a gcc2
5221     builtin and then its argument prototype would still apply.  */
5222 char $ac_func();
5223
5224 int main() {
5225
5226 /* The GNU C library defines this for functions which it implements
5227     to always fail with ENOSYS.  Some functions are actually named
5228     something starting with __ and the normal name is an alias.  */
5229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5230 choke me
5231 #else
5232 $ac_func();
5233 #endif
5234
5235 ; return 0; }
5236 EOF
5237 if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5238   rm -rf conftest*
5239   eval "ac_cv_func_$ac_func=yes"
5240 else
5241   echo "configure: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   rm -rf conftest*
5244   eval "ac_cv_func_$ac_func=no"
5245 fi
5246 rm -f conftest*
5247 fi
5248
5249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5250   echo "$ac_t""yes" 1>&6
5251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5252   cat >> confdefs.h <<EOF
5253 #define $ac_tr_func 1
5254 EOF
5255  
5256 else
5257   echo "$ac_t""no" 1>&6
5258 fi
5259 done
5260
5261 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5262 do
5263 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5264 echo "configure:5265: checking for $ac_func" >&5
5265 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5266   echo $ac_n "(cached) $ac_c" 1>&6
5267 else
5268   cat > conftest.$ac_ext <<EOF
5269 #line 5270 "configure"
5270 #include "confdefs.h"
5271 /* System header to define __stub macros and hopefully few prototypes,
5272     which can conflict with char $ac_func(); below.  */
5273 #include <assert.h>
5274 /* Override any gcc2 internal prototype to avoid an error.  */
5275 /* We use char because int might match the return type of a gcc2
5276     builtin and then its argument prototype would still apply.  */
5277 char $ac_func();
5278
5279 int main() {
5280
5281 /* The GNU C library defines this for functions which it implements
5282     to always fail with ENOSYS.  Some functions are actually named
5283     something starting with __ and the normal name is an alias.  */
5284 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5285 choke me
5286 #else
5287 $ac_func();
5288 #endif
5289
5290 ; return 0; }
5291 EOF
5292 if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5293   rm -rf conftest*
5294   eval "ac_cv_func_$ac_func=yes"
5295 else
5296   echo "configure: failed program was:" >&5
5297   cat conftest.$ac_ext >&5
5298   rm -rf conftest*
5299   eval "ac_cv_func_$ac_func=no"
5300 fi
5301 rm -f conftest*
5302 fi
5303
5304 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5305   echo "$ac_t""yes" 1>&6
5306     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5307   cat >> confdefs.h <<EOF
5308 #define $ac_tr_func 1
5309 EOF
5310  
5311 else
5312   echo "$ac_t""no" 1>&6
5313 fi
5314 done
5315
5316 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5317 do
5318 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5319 echo "configure:5320: checking for $ac_func" >&5
5320 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5321   echo $ac_n "(cached) $ac_c" 1>&6
5322 else
5323   cat > conftest.$ac_ext <<EOF
5324 #line 5325 "configure"
5325 #include "confdefs.h"
5326 /* System header to define __stub macros and hopefully few prototypes,
5327     which can conflict with char $ac_func(); below.  */
5328 #include <assert.h>
5329 /* Override any gcc2 internal prototype to avoid an error.  */
5330 /* We use char because int might match the return type of a gcc2
5331     builtin and then its argument prototype would still apply.  */
5332 char $ac_func();
5333
5334 int main() {
5335
5336 /* The GNU C library defines this for functions which it implements
5337     to always fail with ENOSYS.  Some functions are actually named
5338     something starting with __ and the normal name is an alias.  */
5339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5340 choke me
5341 #else
5342 $ac_func();
5343 #endif
5344
5345 ; return 0; }
5346 EOF
5347 if { (eval echo configure:5348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5348   rm -rf conftest*
5349   eval "ac_cv_func_$ac_func=yes"
5350 else
5351   echo "configure: failed program was:" >&5
5352   cat conftest.$ac_ext >&5
5353   rm -rf conftest*
5354   eval "ac_cv_func_$ac_func=no"
5355 fi
5356 rm -f conftest*
5357 fi
5358
5359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5360   echo "$ac_t""yes" 1>&6
5361     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5362   cat >> confdefs.h <<EOF
5363 #define $ac_tr_func 1
5364 EOF
5365  
5366 else
5367   echo "$ac_t""no" 1>&6
5368 fi
5369 done
5370
5371 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5372 do
5373 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5374 echo "configure:5375: checking for $ac_func" >&5
5375 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5376   echo $ac_n "(cached) $ac_c" 1>&6
5377 else
5378   cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381 /* System header to define __stub macros and hopefully few prototypes,
5382     which can conflict with char $ac_func(); below.  */
5383 #include <assert.h>
5384 /* Override any gcc2 internal prototype to avoid an error.  */
5385 /* We use char because int might match the return type of a gcc2
5386     builtin and then its argument prototype would still apply.  */
5387 char $ac_func();
5388
5389 int main() {
5390
5391 /* The GNU C library defines this for functions which it implements
5392     to always fail with ENOSYS.  Some functions are actually named
5393     something starting with __ and the normal name is an alias.  */
5394 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5395 choke me
5396 #else
5397 $ac_func();
5398 #endif
5399
5400 ; return 0; }
5401 EOF
5402 if { (eval echo configure:5403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5403   rm -rf conftest*
5404   eval "ac_cv_func_$ac_func=yes"
5405 else
5406   echo "configure: failed program was:" >&5
5407   cat conftest.$ac_ext >&5
5408   rm -rf conftest*
5409   eval "ac_cv_func_$ac_func=no"
5410 fi
5411 rm -f conftest*
5412 fi
5413
5414 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5415   echo "$ac_t""yes" 1>&6
5416     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5417   cat >> confdefs.h <<EOF
5418 #define $ac_tr_func 1
5419 EOF
5420  
5421 else
5422   echo "$ac_t""no" 1>&6
5423 fi
5424 done
5425
5426 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5427 do
5428 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5429 echo "configure:5430: checking for $ac_func" >&5
5430 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5431   echo $ac_n "(cached) $ac_c" 1>&6
5432 else
5433   cat > conftest.$ac_ext <<EOF
5434 #line 5435 "configure"
5435 #include "confdefs.h"
5436 /* System header to define __stub macros and hopefully few prototypes,
5437     which can conflict with char $ac_func(); below.  */
5438 #include <assert.h>
5439 /* Override any gcc2 internal prototype to avoid an error.  */
5440 /* We use char because int might match the return type of a gcc2
5441     builtin and then its argument prototype would still apply.  */
5442 char $ac_func();
5443
5444 int main() {
5445
5446 /* The GNU C library defines this for functions which it implements
5447     to always fail with ENOSYS.  Some functions are actually named
5448     something starting with __ and the normal name is an alias.  */
5449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5450 choke me
5451 #else
5452 $ac_func();
5453 #endif
5454
5455 ; return 0; }
5456 EOF
5457 if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5458   rm -rf conftest*
5459   eval "ac_cv_func_$ac_func=yes"
5460 else
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463   rm -rf conftest*
5464   eval "ac_cv_func_$ac_func=no"
5465 fi
5466 rm -f conftest*
5467 fi
5468
5469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5470   echo "$ac_t""yes" 1>&6
5471     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5472   cat >> confdefs.h <<EOF
5473 #define $ac_tr_func 1
5474 EOF
5475  
5476 else
5477   echo "$ac_t""no" 1>&6
5478 fi
5479 done
5480
5481 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5482 do
5483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5484 echo "configure:5485: checking for $ac_func" >&5
5485 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5486   echo $ac_n "(cached) $ac_c" 1>&6
5487 else
5488   cat > conftest.$ac_ext <<EOF
5489 #line 5490 "configure"
5490 #include "confdefs.h"
5491 /* System header to define __stub macros and hopefully few prototypes,
5492     which can conflict with char $ac_func(); below.  */
5493 #include <assert.h>
5494 /* Override any gcc2 internal prototype to avoid an error.  */
5495 /* We use char because int might match the return type of a gcc2
5496     builtin and then its argument prototype would still apply.  */
5497 char $ac_func();
5498
5499 int main() {
5500
5501 /* The GNU C library defines this for functions which it implements
5502     to always fail with ENOSYS.  Some functions are actually named
5503     something starting with __ and the normal name is an alias.  */
5504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5505 choke me
5506 #else
5507 $ac_func();
5508 #endif
5509
5510 ; return 0; }
5511 EOF
5512 if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5513   rm -rf conftest*
5514   eval "ac_cv_func_$ac_func=yes"
5515 else
5516   echo "configure: failed program was:" >&5
5517   cat conftest.$ac_ext >&5
5518   rm -rf conftest*
5519   eval "ac_cv_func_$ac_func=no"
5520 fi
5521 rm -f conftest*
5522 fi
5523
5524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5525   echo "$ac_t""yes" 1>&6
5526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5527   cat >> confdefs.h <<EOF
5528 #define $ac_tr_func 1
5529 EOF
5530  
5531 else
5532   echo "$ac_t""no" 1>&6
5533 fi
5534 done
5535
5536 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5537 do
5538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5539 echo "configure:5540: checking for $ac_func" >&5
5540 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5541   echo $ac_n "(cached) $ac_c" 1>&6
5542 else
5543   cat > conftest.$ac_ext <<EOF
5544 #line 5545 "configure"
5545 #include "confdefs.h"
5546 /* System header to define __stub macros and hopefully few prototypes,
5547     which can conflict with char $ac_func(); below.  */
5548 #include <assert.h>
5549 /* Override any gcc2 internal prototype to avoid an error.  */
5550 /* We use char because int might match the return type of a gcc2
5551     builtin and then its argument prototype would still apply.  */
5552 char $ac_func();
5553
5554 int main() {
5555
5556 /* The GNU C library defines this for functions which it implements
5557     to always fail with ENOSYS.  Some functions are actually named
5558     something starting with __ and the normal name is an alias.  */
5559 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5560 choke me
5561 #else
5562 $ac_func();
5563 #endif
5564
5565 ; return 0; }
5566 EOF
5567 if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5568   rm -rf conftest*
5569   eval "ac_cv_func_$ac_func=yes"
5570 else
5571   echo "configure: failed program was:" >&5
5572   cat conftest.$ac_ext >&5
5573   rm -rf conftest*
5574   eval "ac_cv_func_$ac_func=no"
5575 fi
5576 rm -f conftest*
5577 fi
5578
5579 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5580   echo "$ac_t""yes" 1>&6
5581     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5582   cat >> confdefs.h <<EOF
5583 #define $ac_tr_func 1
5584 EOF
5585  
5586 else
5587   echo "$ac_t""no" 1>&6
5588 fi
5589 done
5590
5591 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5592 do
5593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5594 echo "configure:5595: checking for $ac_func" >&5
5595 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5596   echo $ac_n "(cached) $ac_c" 1>&6
5597 else
5598   cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 /* System header to define __stub macros and hopefully few prototypes,
5602     which can conflict with char $ac_func(); below.  */
5603 #include <assert.h>
5604 /* Override any gcc2 internal prototype to avoid an error.  */
5605 /* We use char because int might match the return type of a gcc2
5606     builtin and then its argument prototype would still apply.  */
5607 char $ac_func();
5608
5609 int main() {
5610
5611 /* The GNU C library defines this for functions which it implements
5612     to always fail with ENOSYS.  Some functions are actually named
5613     something starting with __ and the normal name is an alias.  */
5614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5615 choke me
5616 #else
5617 $ac_func();
5618 #endif
5619
5620 ; return 0; }
5621 EOF
5622 if { (eval echo configure:5623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5623   rm -rf conftest*
5624   eval "ac_cv_func_$ac_func=yes"
5625 else
5626   echo "configure: failed program was:" >&5
5627   cat conftest.$ac_ext >&5
5628   rm -rf conftest*
5629   eval "ac_cv_func_$ac_func=no"
5630 fi
5631 rm -f conftest*
5632 fi
5633
5634 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5635   echo "$ac_t""yes" 1>&6
5636     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5637   cat >> confdefs.h <<EOF
5638 #define $ac_tr_func 1
5639 EOF
5640  
5641 else
5642   echo "$ac_t""no" 1>&6
5643 fi
5644 done
5645
5646 for ac_func in syslog vsyslog
5647 do
5648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5649 echo "configure:5650: checking for $ac_func" >&5
5650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5651   echo $ac_n "(cached) $ac_c" 1>&6
5652 else
5653   cat > conftest.$ac_ext <<EOF
5654 #line 5655 "configure"
5655 #include "confdefs.h"
5656 /* System header to define __stub macros and hopefully few prototypes,
5657     which can conflict with char $ac_func(); below.  */
5658 #include <assert.h>
5659 /* Override any gcc2 internal prototype to avoid an error.  */
5660 /* We use char because int might match the return type of a gcc2
5661     builtin and then its argument prototype would still apply.  */
5662 char $ac_func();
5663
5664 int main() {
5665
5666 /* The GNU C library defines this for functions which it implements
5667     to always fail with ENOSYS.  Some functions are actually named
5668     something starting with __ and the normal name is an alias.  */
5669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5670 choke me
5671 #else
5672 $ac_func();
5673 #endif
5674
5675 ; return 0; }
5676 EOF
5677 if { (eval echo configure:5678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5678   rm -rf conftest*
5679   eval "ac_cv_func_$ac_func=yes"
5680 else
5681   echo "configure: failed program was:" >&5
5682   cat conftest.$ac_ext >&5
5683   rm -rf conftest*
5684   eval "ac_cv_func_$ac_func=no"
5685 fi
5686 rm -f conftest*
5687 fi
5688
5689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5690   echo "$ac_t""yes" 1>&6
5691     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5692   cat >> confdefs.h <<EOF
5693 #define $ac_tr_func 1
5694 EOF
5695  
5696 else
5697   echo "$ac_t""no" 1>&6
5698 fi
5699 done
5700
5701 # setbuffer is needed for smbtorture
5702 for ac_func in setbuffer
5703 do
5704 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5705 echo "configure:5706: checking for $ac_func" >&5
5706 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5707   echo $ac_n "(cached) $ac_c" 1>&6
5708 else
5709   cat > conftest.$ac_ext <<EOF
5710 #line 5711 "configure"
5711 #include "confdefs.h"
5712 /* System header to define __stub macros and hopefully few prototypes,
5713     which can conflict with char $ac_func(); below.  */
5714 #include <assert.h>
5715 /* Override any gcc2 internal prototype to avoid an error.  */
5716 /* We use char because int might match the return type of a gcc2
5717     builtin and then its argument prototype would still apply.  */
5718 char $ac_func();
5719
5720 int main() {
5721
5722 /* The GNU C library defines this for functions which it implements
5723     to always fail with ENOSYS.  Some functions are actually named
5724     something starting with __ and the normal name is an alias.  */
5725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5726 choke me
5727 #else
5728 $ac_func();
5729 #endif
5730
5731 ; return 0; }
5732 EOF
5733 if { (eval echo configure:5734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5734   rm -rf conftest*
5735   eval "ac_cv_func_$ac_func=yes"
5736 else
5737   echo "configure: failed program was:" >&5
5738   cat conftest.$ac_ext >&5
5739   rm -rf conftest*
5740   eval "ac_cv_func_$ac_func=no"
5741 fi
5742 rm -f conftest*
5743 fi
5744
5745 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5746   echo "$ac_t""yes" 1>&6
5747     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5748   cat >> confdefs.h <<EOF
5749 #define $ac_tr_func 1
5750 EOF
5751  
5752 else
5753   echo "$ac_t""no" 1>&6
5754 fi
5755 done
5756
5757
5758 # syscall() is needed for smbwrapper.
5759 for ac_func in syscall
5760 do
5761 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5762 echo "configure:5763: checking for $ac_func" >&5
5763 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5764   echo $ac_n "(cached) $ac_c" 1>&6
5765 else
5766   cat > conftest.$ac_ext <<EOF
5767 #line 5768 "configure"
5768 #include "confdefs.h"
5769 /* System header to define __stub macros and hopefully few prototypes,
5770     which can conflict with char $ac_func(); below.  */
5771 #include <assert.h>
5772 /* Override any gcc2 internal prototype to avoid an error.  */
5773 /* We use char because int might match the return type of a gcc2
5774     builtin and then its argument prototype would still apply.  */
5775 char $ac_func();
5776
5777 int main() {
5778
5779 /* The GNU C library defines this for functions which it implements
5780     to always fail with ENOSYS.  Some functions are actually named
5781     something starting with __ and the normal name is an alias.  */
5782 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5783 choke me
5784 #else
5785 $ac_func();
5786 #endif
5787
5788 ; return 0; }
5789 EOF
5790 if { (eval echo configure:5791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5791   rm -rf conftest*
5792   eval "ac_cv_func_$ac_func=yes"
5793 else
5794   echo "configure: failed program was:" >&5
5795   cat conftest.$ac_ext >&5
5796   rm -rf conftest*
5797   eval "ac_cv_func_$ac_func=no"
5798 fi
5799 rm -f conftest*
5800 fi
5801
5802 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5803   echo "$ac_t""yes" 1>&6
5804     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5805   cat >> confdefs.h <<EOF
5806 #define $ac_tr_func 1
5807 EOF
5808  
5809 else
5810   echo "$ac_t""no" 1>&6
5811 fi
5812 done
5813
5814
5815 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5816 do
5817 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5818 echo "configure:5819: checking for $ac_func" >&5
5819 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5820   echo $ac_n "(cached) $ac_c" 1>&6
5821 else
5822   cat > conftest.$ac_ext <<EOF
5823 #line 5824 "configure"
5824 #include "confdefs.h"
5825 /* System header to define __stub macros and hopefully few prototypes,
5826     which can conflict with char $ac_func(); below.  */
5827 #include <assert.h>
5828 /* Override any gcc2 internal prototype to avoid an error.  */
5829 /* We use char because int might match the return type of a gcc2
5830     builtin and then its argument prototype would still apply.  */
5831 char $ac_func();
5832
5833 int main() {
5834
5835 /* The GNU C library defines this for functions which it implements
5836     to always fail with ENOSYS.  Some functions are actually named
5837     something starting with __ and the normal name is an alias.  */
5838 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5839 choke me
5840 #else
5841 $ac_func();
5842 #endif
5843
5844 ; return 0; }
5845 EOF
5846 if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5847   rm -rf conftest*
5848   eval "ac_cv_func_$ac_func=yes"
5849 else
5850   echo "configure: failed program was:" >&5
5851   cat conftest.$ac_ext >&5
5852   rm -rf conftest*
5853   eval "ac_cv_func_$ac_func=no"
5854 fi
5855 rm -f conftest*
5856 fi
5857
5858 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5859   echo "$ac_t""yes" 1>&6
5860     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5861   cat >> confdefs.h <<EOF
5862 #define $ac_tr_func 1
5863 EOF
5864  
5865 else
5866   echo "$ac_t""no" 1>&6
5867 fi
5868 done
5869
5870 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5871 do
5872 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5873 echo "configure:5874: checking for $ac_func" >&5
5874 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5875   echo $ac_n "(cached) $ac_c" 1>&6
5876 else
5877   cat > conftest.$ac_ext <<EOF
5878 #line 5879 "configure"
5879 #include "confdefs.h"
5880 /* System header to define __stub macros and hopefully few prototypes,
5881     which can conflict with char $ac_func(); below.  */
5882 #include <assert.h>
5883 /* Override any gcc2 internal prototype to avoid an error.  */
5884 /* We use char because int might match the return type of a gcc2
5885     builtin and then its argument prototype would still apply.  */
5886 char $ac_func();
5887
5888 int main() {
5889
5890 /* The GNU C library defines this for functions which it implements
5891     to always fail with ENOSYS.  Some functions are actually named
5892     something starting with __ and the normal name is an alias.  */
5893 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5894 choke me
5895 #else
5896 $ac_func();
5897 #endif
5898
5899 ; return 0; }
5900 EOF
5901 if { (eval echo configure:5902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5902   rm -rf conftest*
5903   eval "ac_cv_func_$ac_func=yes"
5904 else
5905   echo "configure: failed program was:" >&5
5906   cat conftest.$ac_ext >&5
5907   rm -rf conftest*
5908   eval "ac_cv_func_$ac_func=no"
5909 fi
5910 rm -f conftest*
5911 fi
5912
5913 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5914   echo "$ac_t""yes" 1>&6
5915     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5916   cat >> confdefs.h <<EOF
5917 #define $ac_tr_func 1
5918 EOF
5919  
5920 else
5921   echo "$ac_t""no" 1>&6
5922 fi
5923 done
5924
5925 for ac_func in __getcwd _getcwd
5926 do
5927 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5928 echo "configure:5929: checking for $ac_func" >&5
5929 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5930   echo $ac_n "(cached) $ac_c" 1>&6
5931 else
5932   cat > conftest.$ac_ext <<EOF
5933 #line 5934 "configure"
5934 #include "confdefs.h"
5935 /* System header to define __stub macros and hopefully few prototypes,
5936     which can conflict with char $ac_func(); below.  */
5937 #include <assert.h>
5938 /* Override any gcc2 internal prototype to avoid an error.  */
5939 /* We use char because int might match the return type of a gcc2
5940     builtin and then its argument prototype would still apply.  */
5941 char $ac_func();
5942
5943 int main() {
5944
5945 /* The GNU C library defines this for functions which it implements
5946     to always fail with ENOSYS.  Some functions are actually named
5947     something starting with __ and the normal name is an alias.  */
5948 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5949 choke me
5950 #else
5951 $ac_func();
5952 #endif
5953
5954 ; return 0; }
5955 EOF
5956 if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5957   rm -rf conftest*
5958   eval "ac_cv_func_$ac_func=yes"
5959 else
5960   echo "configure: failed program was:" >&5
5961   cat conftest.$ac_ext >&5
5962   rm -rf conftest*
5963   eval "ac_cv_func_$ac_func=no"
5964 fi
5965 rm -f conftest*
5966 fi
5967
5968 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5969   echo "$ac_t""yes" 1>&6
5970     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5971   cat >> confdefs.h <<EOF
5972 #define $ac_tr_func 1
5973 EOF
5974  
5975 else
5976   echo "$ac_t""no" 1>&6
5977 fi
5978 done
5979
5980 for ac_func in __xstat __fxstat __lxstat
5981 do
5982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5983 echo "configure:5984: checking for $ac_func" >&5
5984 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5985   echo $ac_n "(cached) $ac_c" 1>&6
5986 else
5987   cat > conftest.$ac_ext <<EOF
5988 #line 5989 "configure"
5989 #include "confdefs.h"
5990 /* System header to define __stub macros and hopefully few prototypes,
5991     which can conflict with char $ac_func(); below.  */
5992 #include <assert.h>
5993 /* Override any gcc2 internal prototype to avoid an error.  */
5994 /* We use char because int might match the return type of a gcc2
5995     builtin and then its argument prototype would still apply.  */
5996 char $ac_func();
5997
5998 int main() {
5999
6000 /* The GNU C library defines this for functions which it implements
6001     to always fail with ENOSYS.  Some functions are actually named
6002     something starting with __ and the normal name is an alias.  */
6003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6004 choke me
6005 #else
6006 $ac_func();
6007 #endif
6008
6009 ; return 0; }
6010 EOF
6011 if { (eval echo configure:6012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6012   rm -rf conftest*
6013   eval "ac_cv_func_$ac_func=yes"
6014 else
6015   echo "configure: failed program was:" >&5
6016   cat conftest.$ac_ext >&5
6017   rm -rf conftest*
6018   eval "ac_cv_func_$ac_func=no"
6019 fi
6020 rm -f conftest*
6021 fi
6022
6023 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6024   echo "$ac_t""yes" 1>&6
6025     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6026   cat >> confdefs.h <<EOF
6027 #define $ac_tr_func 1
6028 EOF
6029  
6030 else
6031   echo "$ac_t""no" 1>&6
6032 fi
6033 done
6034
6035 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6036 do
6037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6038 echo "configure:6039: checking for $ac_func" >&5
6039 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6040   echo $ac_n "(cached) $ac_c" 1>&6
6041 else
6042   cat > conftest.$ac_ext <<EOF
6043 #line 6044 "configure"
6044 #include "confdefs.h"
6045 /* System header to define __stub macros and hopefully few prototypes,
6046     which can conflict with char $ac_func(); below.  */
6047 #include <assert.h>
6048 /* Override any gcc2 internal prototype to avoid an error.  */
6049 /* We use char because int might match the return type of a gcc2
6050     builtin and then its argument prototype would still apply.  */
6051 char $ac_func();
6052
6053 int main() {
6054
6055 /* The GNU C library defines this for functions which it implements
6056     to always fail with ENOSYS.  Some functions are actually named
6057     something starting with __ and the normal name is an alias.  */
6058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6059 choke me
6060 #else
6061 $ac_func();
6062 #endif
6063
6064 ; return 0; }
6065 EOF
6066 if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6067   rm -rf conftest*
6068   eval "ac_cv_func_$ac_func=yes"
6069 else
6070   echo "configure: failed program was:" >&5
6071   cat conftest.$ac_ext >&5
6072   rm -rf conftest*
6073   eval "ac_cv_func_$ac_func=no"
6074 fi
6075 rm -f conftest*
6076 fi
6077
6078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6079   echo "$ac_t""yes" 1>&6
6080     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6081   cat >> confdefs.h <<EOF
6082 #define $ac_tr_func 1
6083 EOF
6084  
6085 else
6086   echo "$ac_t""no" 1>&6
6087 fi
6088 done
6089
6090 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6091 do
6092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6093 echo "configure:6094: checking for $ac_func" >&5
6094 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6095   echo $ac_n "(cached) $ac_c" 1>&6
6096 else
6097   cat > conftest.$ac_ext <<EOF
6098 #line 6099 "configure"
6099 #include "confdefs.h"
6100 /* System header to define __stub macros and hopefully few prototypes,
6101     which can conflict with char $ac_func(); below.  */
6102 #include <assert.h>
6103 /* Override any gcc2 internal prototype to avoid an error.  */
6104 /* We use char because int might match the return type of a gcc2
6105     builtin and then its argument prototype would still apply.  */
6106 char $ac_func();
6107
6108 int main() {
6109
6110 /* The GNU C library defines this for functions which it implements
6111     to always fail with ENOSYS.  Some functions are actually named
6112     something starting with __ and the normal name is an alias.  */
6113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6114 choke me
6115 #else
6116 $ac_func();
6117 #endif
6118
6119 ; return 0; }
6120 EOF
6121 if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6122   rm -rf conftest*
6123   eval "ac_cv_func_$ac_func=yes"
6124 else
6125   echo "configure: failed program was:" >&5
6126   cat conftest.$ac_ext >&5
6127   rm -rf conftest*
6128   eval "ac_cv_func_$ac_func=no"
6129 fi
6130 rm -f conftest*
6131 fi
6132
6133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6134   echo "$ac_t""yes" 1>&6
6135     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6136   cat >> confdefs.h <<EOF
6137 #define $ac_tr_func 1
6138 EOF
6139  
6140 else
6141   echo "$ac_t""no" 1>&6
6142 fi
6143 done
6144
6145 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6146 do
6147 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6148 echo "configure:6149: checking for $ac_func" >&5
6149 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6150   echo $ac_n "(cached) $ac_c" 1>&6
6151 else
6152   cat > conftest.$ac_ext <<EOF
6153 #line 6154 "configure"
6154 #include "confdefs.h"
6155 /* System header to define __stub macros and hopefully few prototypes,
6156     which can conflict with char $ac_func(); below.  */
6157 #include <assert.h>
6158 /* Override any gcc2 internal prototype to avoid an error.  */
6159 /* We use char because int might match the return type of a gcc2
6160     builtin and then its argument prototype would still apply.  */
6161 char $ac_func();
6162
6163 int main() {
6164
6165 /* The GNU C library defines this for functions which it implements
6166     to always fail with ENOSYS.  Some functions are actually named
6167     something starting with __ and the normal name is an alias.  */
6168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6169 choke me
6170 #else
6171 $ac_func();
6172 #endif
6173
6174 ; return 0; }
6175 EOF
6176 if { (eval echo configure:6177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6177   rm -rf conftest*
6178   eval "ac_cv_func_$ac_func=yes"
6179 else
6180   echo "configure: failed program was:" >&5
6181   cat conftest.$ac_ext >&5
6182   rm -rf conftest*
6183   eval "ac_cv_func_$ac_func=no"
6184 fi
6185 rm -f conftest*
6186 fi
6187
6188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6189   echo "$ac_t""yes" 1>&6
6190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6191   cat >> confdefs.h <<EOF
6192 #define $ac_tr_func 1
6193 EOF
6194  
6195 else
6196   echo "$ac_t""no" 1>&6
6197 fi
6198 done
6199
6200 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6201 do
6202 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6203 echo "configure:6204: checking for $ac_func" >&5
6204 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6205   echo $ac_n "(cached) $ac_c" 1>&6
6206 else
6207   cat > conftest.$ac_ext <<EOF
6208 #line 6209 "configure"
6209 #include "confdefs.h"
6210 /* System header to define __stub macros and hopefully few prototypes,
6211     which can conflict with char $ac_func(); below.  */
6212 #include <assert.h>
6213 /* Override any gcc2 internal prototype to avoid an error.  */
6214 /* We use char because int might match the return type of a gcc2
6215     builtin and then its argument prototype would still apply.  */
6216 char $ac_func();
6217
6218 int main() {
6219
6220 /* The GNU C library defines this for functions which it implements
6221     to always fail with ENOSYS.  Some functions are actually named
6222     something starting with __ and the normal name is an alias.  */
6223 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6224 choke me
6225 #else
6226 $ac_func();
6227 #endif
6228
6229 ; return 0; }
6230 EOF
6231 if { (eval echo configure:6232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6232   rm -rf conftest*
6233   eval "ac_cv_func_$ac_func=yes"
6234 else
6235   echo "configure: failed program was:" >&5
6236   cat conftest.$ac_ext >&5
6237   rm -rf conftest*
6238   eval "ac_cv_func_$ac_func=no"
6239 fi
6240 rm -f conftest*
6241 fi
6242
6243 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6244   echo "$ac_t""yes" 1>&6
6245     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6246   cat >> confdefs.h <<EOF
6247 #define $ac_tr_func 1
6248 EOF
6249  
6250 else
6251   echo "$ac_t""no" 1>&6
6252 fi
6253 done
6254
6255 for ac_func in _write __write _fork __fork
6256 do
6257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6258 echo "configure:6259: checking for $ac_func" >&5
6259 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6260   echo $ac_n "(cached) $ac_c" 1>&6
6261 else
6262   cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265 /* System header to define __stub macros and hopefully few prototypes,
6266     which can conflict with char $ac_func(); below.  */
6267 #include <assert.h>
6268 /* Override any gcc2 internal prototype to avoid an error.  */
6269 /* We use char because int might match the return type of a gcc2
6270     builtin and then its argument prototype would still apply.  */
6271 char $ac_func();
6272
6273 int main() {
6274
6275 /* The GNU C library defines this for functions which it implements
6276     to always fail with ENOSYS.  Some functions are actually named
6277     something starting with __ and the normal name is an alias.  */
6278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6279 choke me
6280 #else
6281 $ac_func();
6282 #endif
6283
6284 ; return 0; }
6285 EOF
6286 if { (eval echo configure:6287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6287   rm -rf conftest*
6288   eval "ac_cv_func_$ac_func=yes"
6289 else
6290   echo "configure: failed program was:" >&5
6291   cat conftest.$ac_ext >&5
6292   rm -rf conftest*
6293   eval "ac_cv_func_$ac_func=no"
6294 fi
6295 rm -f conftest*
6296 fi
6297
6298 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6299   echo "$ac_t""yes" 1>&6
6300     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6301   cat >> confdefs.h <<EOF
6302 #define $ac_tr_func 1
6303 EOF
6304  
6305 else
6306   echo "$ac_t""no" 1>&6
6307 fi
6308 done
6309
6310 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6311 do
6312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6313 echo "configure:6314: checking for $ac_func" >&5
6314 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6315   echo $ac_n "(cached) $ac_c" 1>&6
6316 else
6317   cat > conftest.$ac_ext <<EOF
6318 #line 6319 "configure"
6319 #include "confdefs.h"
6320 /* System header to define __stub macros and hopefully few prototypes,
6321     which can conflict with char $ac_func(); below.  */
6322 #include <assert.h>
6323 /* Override any gcc2 internal prototype to avoid an error.  */
6324 /* We use char because int might match the return type of a gcc2
6325     builtin and then its argument prototype would still apply.  */
6326 char $ac_func();
6327
6328 int main() {
6329
6330 /* The GNU C library defines this for functions which it implements
6331     to always fail with ENOSYS.  Some functions are actually named
6332     something starting with __ and the normal name is an alias.  */
6333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6334 choke me
6335 #else
6336 $ac_func();
6337 #endif
6338
6339 ; return 0; }
6340 EOF
6341 if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6342   rm -rf conftest*
6343   eval "ac_cv_func_$ac_func=yes"
6344 else
6345   echo "configure: failed program was:" >&5
6346   cat conftest.$ac_ext >&5
6347   rm -rf conftest*
6348   eval "ac_cv_func_$ac_func=no"
6349 fi
6350 rm -f conftest*
6351 fi
6352
6353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6354   echo "$ac_t""yes" 1>&6
6355     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6356   cat >> confdefs.h <<EOF
6357 #define $ac_tr_func 1
6358 EOF
6359  
6360 else
6361   echo "$ac_t""no" 1>&6
6362 fi
6363 done
6364
6365 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6366 do
6367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6368 echo "configure:6369: checking for $ac_func" >&5
6369 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6370   echo $ac_n "(cached) $ac_c" 1>&6
6371 else
6372   cat > conftest.$ac_ext <<EOF
6373 #line 6374 "configure"
6374 #include "confdefs.h"
6375 /* System header to define __stub macros and hopefully few prototypes,
6376     which can conflict with char $ac_func(); below.  */
6377 #include <assert.h>
6378 /* Override any gcc2 internal prototype to avoid an error.  */
6379 /* We use char because int might match the return type of a gcc2
6380     builtin and then its argument prototype would still apply.  */
6381 char $ac_func();
6382
6383 int main() {
6384
6385 /* The GNU C library defines this for functions which it implements
6386     to always fail with ENOSYS.  Some functions are actually named
6387     something starting with __ and the normal name is an alias.  */
6388 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6389 choke me
6390 #else
6391 $ac_func();
6392 #endif
6393
6394 ; return 0; }
6395 EOF
6396 if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6397   rm -rf conftest*
6398   eval "ac_cv_func_$ac_func=yes"
6399 else
6400   echo "configure: failed program was:" >&5
6401   cat conftest.$ac_ext >&5
6402   rm -rf conftest*
6403   eval "ac_cv_func_$ac_func=no"
6404 fi
6405 rm -f conftest*
6406 fi
6407
6408 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6409   echo "$ac_t""yes" 1>&6
6410     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6411   cat >> confdefs.h <<EOF
6412 #define $ac_tr_func 1
6413 EOF
6414  
6415 else
6416   echo "$ac_t""no" 1>&6
6417 fi
6418 done
6419
6420 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6421 do
6422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6423 echo "configure:6424: checking for $ac_func" >&5
6424 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6425   echo $ac_n "(cached) $ac_c" 1>&6
6426 else
6427   cat > conftest.$ac_ext <<EOF
6428 #line 6429 "configure"
6429 #include "confdefs.h"
6430 /* System header to define __stub macros and hopefully few prototypes,
6431     which can conflict with char $ac_func(); below.  */
6432 #include <assert.h>
6433 /* Override any gcc2 internal prototype to avoid an error.  */
6434 /* We use char because int might match the return type of a gcc2
6435     builtin and then its argument prototype would still apply.  */
6436 char $ac_func();
6437
6438 int main() {
6439
6440 /* The GNU C library defines this for functions which it implements
6441     to always fail with ENOSYS.  Some functions are actually named
6442     something starting with __ and the normal name is an alias.  */
6443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6444 choke me
6445 #else
6446 $ac_func();
6447 #endif
6448
6449 ; return 0; }
6450 EOF
6451 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6452   rm -rf conftest*
6453   eval "ac_cv_func_$ac_func=yes"
6454 else
6455   echo "configure: failed program was:" >&5
6456   cat conftest.$ac_ext >&5
6457   rm -rf conftest*
6458   eval "ac_cv_func_$ac_func=no"
6459 fi
6460 rm -f conftest*
6461 fi
6462
6463 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6464   echo "$ac_t""yes" 1>&6
6465     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6466   cat >> confdefs.h <<EOF
6467 #define $ac_tr_func 1
6468 EOF
6469  
6470 else
6471   echo "$ac_t""no" 1>&6
6472 fi
6473 done
6474
6475 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6476 do
6477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6478 echo "configure:6479: checking for $ac_func" >&5
6479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6480   echo $ac_n "(cached) $ac_c" 1>&6
6481 else
6482   cat > conftest.$ac_ext <<EOF
6483 #line 6484 "configure"
6484 #include "confdefs.h"
6485 /* System header to define __stub macros and hopefully few prototypes,
6486     which can conflict with char $ac_func(); below.  */
6487 #include <assert.h>
6488 /* Override any gcc2 internal prototype to avoid an error.  */
6489 /* We use char because int might match the return type of a gcc2
6490     builtin and then its argument prototype would still apply.  */
6491 char $ac_func();
6492
6493 int main() {
6494
6495 /* The GNU C library defines this for functions which it implements
6496     to always fail with ENOSYS.  Some functions are actually named
6497     something starting with __ and the normal name is an alias.  */
6498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6499 choke me
6500 #else
6501 $ac_func();
6502 #endif
6503
6504 ; return 0; }
6505 EOF
6506 if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6507   rm -rf conftest*
6508   eval "ac_cv_func_$ac_func=yes"
6509 else
6510   echo "configure: failed program was:" >&5
6511   cat conftest.$ac_ext >&5
6512   rm -rf conftest*
6513   eval "ac_cv_func_$ac_func=no"
6514 fi
6515 rm -f conftest*
6516 fi
6517
6518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6519   echo "$ac_t""yes" 1>&6
6520     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6521   cat >> confdefs.h <<EOF
6522 #define $ac_tr_func 1
6523 EOF
6524  
6525 else
6526   echo "$ac_t""no" 1>&6
6527 fi
6528 done
6529
6530 for ac_func in open64 _open64 __open64 creat64
6531 do
6532 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6533 echo "configure:6534: checking for $ac_func" >&5
6534 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6535   echo $ac_n "(cached) $ac_c" 1>&6
6536 else
6537   cat > conftest.$ac_ext <<EOF
6538 #line 6539 "configure"
6539 #include "confdefs.h"
6540 /* System header to define __stub macros and hopefully few prototypes,
6541     which can conflict with char $ac_func(); below.  */
6542 #include <assert.h>
6543 /* Override any gcc2 internal prototype to avoid an error.  */
6544 /* We use char because int might match the return type of a gcc2
6545     builtin and then its argument prototype would still apply.  */
6546 char $ac_func();
6547
6548 int main() {
6549
6550 /* The GNU C library defines this for functions which it implements
6551     to always fail with ENOSYS.  Some functions are actually named
6552     something starting with __ and the normal name is an alias.  */
6553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6554 choke me
6555 #else
6556 $ac_func();
6557 #endif
6558
6559 ; return 0; }
6560 EOF
6561 if { (eval echo configure:6562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6562   rm -rf conftest*
6563   eval "ac_cv_func_$ac_func=yes"
6564 else
6565   echo "configure: failed program was:" >&5
6566   cat conftest.$ac_ext >&5
6567   rm -rf conftest*
6568   eval "ac_cv_func_$ac_func=no"
6569 fi
6570 rm -f conftest*
6571 fi
6572
6573 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6574   echo "$ac_t""yes" 1>&6
6575     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6576   cat >> confdefs.h <<EOF
6577 #define $ac_tr_func 1
6578 EOF
6579  
6580 else
6581   echo "$ac_t""no" 1>&6
6582 fi
6583 done
6584
6585
6586 #
6587 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6588 #
6589
6590 if test x$ac_cv_func_stat64 = xno ; then
6591   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6592 echo "configure:6593: checking for stat64 in <sys/stat.h>" >&5
6593   cat > conftest.$ac_ext <<EOF
6594 #line 6595 "configure"
6595 #include "confdefs.h"
6596
6597 #if defined(HAVE_UNISTD_H)
6598 #include <unistd.h>
6599 #endif
6600 #include <sys/stat.h>
6601
6602 int main() {
6603 struct stat64 st64; exit(stat64(".",&st64));
6604 ; return 0; }
6605 EOF
6606 if { (eval echo configure:6607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6607   rm -rf conftest*
6608   ac_cv_func_stat64=yes
6609 else
6610   echo "configure: failed program was:" >&5
6611   cat conftest.$ac_ext >&5
6612 fi
6613 rm -f conftest*
6614   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6615   if test x$ac_cv_func_stat64 = xyes ; then
6616     cat >> confdefs.h <<\EOF
6617 #define HAVE_STAT64 1
6618 EOF
6619
6620   fi
6621 fi
6622
6623 if test x$ac_cv_func_lstat64 = xno ; then
6624   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6625 echo "configure:6626: checking for lstat64 in <sys/stat.h>" >&5
6626   cat > conftest.$ac_ext <<EOF
6627 #line 6628 "configure"
6628 #include "confdefs.h"
6629
6630 #if defined(HAVE_UNISTD_H)
6631 #include <unistd.h>
6632 #endif
6633 #include <sys/stat.h>
6634
6635 int main() {
6636 struct stat64 st64; exit(lstat64(".",&st64));
6637 ; return 0; }
6638 EOF
6639 if { (eval echo configure:6640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6640   rm -rf conftest*
6641   ac_cv_func_lstat64=yes
6642 else
6643   echo "configure: failed program was:" >&5
6644   cat conftest.$ac_ext >&5
6645 fi
6646 rm -f conftest*
6647   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6648   if test x$ac_cv_func_lstat64 = xyes ; then
6649     cat >> confdefs.h <<\EOF
6650 #define HAVE_LSTAT64 1
6651 EOF
6652
6653   fi
6654 fi
6655
6656 if test x$ac_cv_func_fstat64 = xno ; then
6657   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6658 echo "configure:6659: checking for fstat64 in <sys/stat.h>" >&5
6659   cat > conftest.$ac_ext <<EOF
6660 #line 6661 "configure"
6661 #include "confdefs.h"
6662
6663 #if defined(HAVE_UNISTD_H)
6664 #include <unistd.h>
6665 #endif
6666 #include <sys/stat.h>
6667
6668 int main() {
6669 struct stat64 st64; exit(fstat64(0,&st64));
6670 ; return 0; }
6671 EOF
6672 if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6673   rm -rf conftest*
6674   ac_cv_func_fstat64=yes
6675 else
6676   echo "configure: failed program was:" >&5
6677   cat conftest.$ac_ext >&5
6678 fi
6679 rm -f conftest*
6680   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6681   if test x$ac_cv_func_fstat64 = xyes ; then
6682     cat >> confdefs.h <<\EOF
6683 #define HAVE_FSTAT64 1
6684 EOF
6685
6686   fi
6687 fi
6688
6689 #####################################
6690 # we might need the resolv library on some systems
6691 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6692 echo "configure:6693: checking for dn_expand in -lresolv" >&5
6693 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6694 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6695   echo $ac_n "(cached) $ac_c" 1>&6
6696 else
6697   ac_save_LIBS="$LIBS"
6698 LIBS="-lresolv  $LIBS"
6699 cat > conftest.$ac_ext <<EOF
6700 #line 6701 "configure"
6701 #include "confdefs.h"
6702 /* Override any gcc2 internal prototype to avoid an error.  */
6703 /* We use char because int might match the return type of a gcc2
6704     builtin and then its argument prototype would still apply.  */
6705 char dn_expand();
6706
6707 int main() {
6708 dn_expand()
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6712   rm -rf conftest*
6713   eval "ac_cv_lib_$ac_lib_var=yes"
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_lib_$ac_lib_var=no"
6719 fi
6720 rm -f conftest*
6721 LIBS="$ac_save_LIBS"
6722
6723 fi
6724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6725   echo "$ac_t""yes" 1>&6
6726     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6727     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6728   cat >> confdefs.h <<EOF
6729 #define $ac_tr_lib 1
6730 EOF
6731
6732   LIBS="-lresolv $LIBS"
6733
6734 else
6735   echo "$ac_t""no" 1>&6
6736 fi
6737
6738
6739 #
6740 # Check for the functions putprpwnam, set_auth_parameters,
6741 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6742 # Needed for OSF1 and HPUX.
6743 #
6744
6745 case "$LIBS" in
6746   *-lsecurity*) for ac_func in putprpwnam
6747 do
6748 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6749 echo "configure:6750: checking for $ac_func" >&5
6750 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6751   echo $ac_n "(cached) $ac_c" 1>&6
6752 else
6753   cat > conftest.$ac_ext <<EOF
6754 #line 6755 "configure"
6755 #include "confdefs.h"
6756 /* System header to define __stub macros and hopefully few prototypes,
6757     which can conflict with char $ac_func(); below.  */
6758 #include <assert.h>
6759 /* Override any gcc2 internal prototype to avoid an error.  */
6760 /* We use char because int might match the return type of a gcc2
6761     builtin and then its argument prototype would still apply.  */
6762 char $ac_func();
6763
6764 int main() {
6765
6766 /* The GNU C library defines this for functions which it implements
6767     to always fail with ENOSYS.  Some functions are actually named
6768     something starting with __ and the normal name is an alias.  */
6769 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6770 choke me
6771 #else
6772 $ac_func();
6773 #endif
6774
6775 ; return 0; }
6776 EOF
6777 if { (eval echo configure:6778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6778   rm -rf conftest*
6779   eval "ac_cv_func_$ac_func=yes"
6780 else
6781   echo "configure: failed program was:" >&5
6782   cat conftest.$ac_ext >&5
6783   rm -rf conftest*
6784   eval "ac_cv_func_$ac_func=no"
6785 fi
6786 rm -f conftest*
6787 fi
6788
6789 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6790   echo "$ac_t""yes" 1>&6
6791     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6792   cat >> confdefs.h <<EOF
6793 #define $ac_tr_func 1
6794 EOF
6795  
6796 else
6797   echo "$ac_t""no" 1>&6
6798 fi
6799 done
6800  ;;
6801   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6802 echo "configure:6803: checking for putprpwnam in -lsecurity" >&5
6803 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6804 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6805   echo $ac_n "(cached) $ac_c" 1>&6
6806 else
6807   ac_save_LIBS="$LIBS"
6808 LIBS="-lsecurity  $LIBS"
6809 cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 /* Override any gcc2 internal prototype to avoid an error.  */
6813 /* We use char because int might match the return type of a gcc2
6814     builtin and then its argument prototype would still apply.  */
6815 char putprpwnam();
6816
6817 int main() {
6818 putprpwnam()
6819 ; return 0; }
6820 EOF
6821 if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6822   rm -rf conftest*
6823   eval "ac_cv_lib_$ac_lib_var=yes"
6824 else
6825   echo "configure: failed program was:" >&5
6826   cat conftest.$ac_ext >&5
6827   rm -rf conftest*
6828   eval "ac_cv_lib_$ac_lib_var=no"
6829 fi
6830 rm -f conftest*
6831 LIBS="$ac_save_LIBS"
6832
6833 fi
6834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6835   echo "$ac_t""yes" 1>&6
6836     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6837     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6838   cat >> confdefs.h <<EOF
6839 #define $ac_tr_lib 1
6840 EOF
6841
6842   LIBS="-lsecurity $LIBS"
6843
6844 else
6845   echo "$ac_t""no" 1>&6
6846 fi
6847  
6848      for ac_func in putprpwnam
6849 do
6850 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6851 echo "configure:6852: checking for $ac_func" >&5
6852 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6853   echo $ac_n "(cached) $ac_c" 1>&6
6854 else
6855   cat > conftest.$ac_ext <<EOF
6856 #line 6857 "configure"
6857 #include "confdefs.h"
6858 /* System header to define __stub macros and hopefully few prototypes,
6859     which can conflict with char $ac_func(); below.  */
6860 #include <assert.h>
6861 /* Override any gcc2 internal prototype to avoid an error.  */
6862 /* We use char because int might match the return type of a gcc2
6863     builtin and then its argument prototype would still apply.  */
6864 char $ac_func();
6865
6866 int main() {
6867
6868 /* The GNU C library defines this for functions which it implements
6869     to always fail with ENOSYS.  Some functions are actually named
6870     something starting with __ and the normal name is an alias.  */
6871 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6872 choke me
6873 #else
6874 $ac_func();
6875 #endif
6876
6877 ; return 0; }
6878 EOF
6879 if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6880   rm -rf conftest*
6881   eval "ac_cv_func_$ac_func=yes"
6882 else
6883   echo "configure: failed program was:" >&5
6884   cat conftest.$ac_ext >&5
6885   rm -rf conftest*
6886   eval "ac_cv_func_$ac_func=no"
6887 fi
6888 rm -f conftest*
6889 fi
6890
6891 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6892   echo "$ac_t""yes" 1>&6
6893     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6894   cat >> confdefs.h <<EOF
6895 #define $ac_tr_func 1
6896 EOF
6897  
6898 else
6899   echo "$ac_t""no" 1>&6
6900 fi
6901 done
6902
6903   ;;
6904   esac
6905
6906 case "$LIBS" in
6907   *-lsec*) for ac_func in putprpwnam
6908 do
6909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6910 echo "configure:6911: checking for $ac_func" >&5
6911 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6912   echo $ac_n "(cached) $ac_c" 1>&6
6913 else
6914   cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917 /* System header to define __stub macros and hopefully few prototypes,
6918     which can conflict with char $ac_func(); below.  */
6919 #include <assert.h>
6920 /* Override any gcc2 internal prototype to avoid an error.  */
6921 /* We use char because int might match the return type of a gcc2
6922     builtin and then its argument prototype would still apply.  */
6923 char $ac_func();
6924
6925 int main() {
6926
6927 /* The GNU C library defines this for functions which it implements
6928     to always fail with ENOSYS.  Some functions are actually named
6929     something starting with __ and the normal name is an alias.  */
6930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6931 choke me
6932 #else
6933 $ac_func();
6934 #endif
6935
6936 ; return 0; }
6937 EOF
6938 if { (eval echo configure:6939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6939   rm -rf conftest*
6940   eval "ac_cv_func_$ac_func=yes"
6941 else
6942   echo "configure: failed program was:" >&5
6943   cat conftest.$ac_ext >&5
6944   rm -rf conftest*
6945   eval "ac_cv_func_$ac_func=no"
6946 fi
6947 rm -f conftest*
6948 fi
6949
6950 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6951   echo "$ac_t""yes" 1>&6
6952     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6953   cat >> confdefs.h <<EOF
6954 #define $ac_tr_func 1
6955 EOF
6956  
6957 else
6958   echo "$ac_t""no" 1>&6
6959 fi
6960 done
6961  ;;
6962   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6963 echo "configure:6964: checking for putprpwnam in -lsec" >&5
6964 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6965 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6966   echo $ac_n "(cached) $ac_c" 1>&6
6967 else
6968   ac_save_LIBS="$LIBS"
6969 LIBS="-lsec  $LIBS"
6970 cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973 /* Override any gcc2 internal prototype to avoid an error.  */
6974 /* We use char because int might match the return type of a gcc2
6975     builtin and then its argument prototype would still apply.  */
6976 char putprpwnam();
6977
6978 int main() {
6979 putprpwnam()
6980 ; return 0; }
6981 EOF
6982 if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6983   rm -rf conftest*
6984   eval "ac_cv_lib_$ac_lib_var=yes"
6985 else
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988   rm -rf conftest*
6989   eval "ac_cv_lib_$ac_lib_var=no"
6990 fi
6991 rm -f conftest*
6992 LIBS="$ac_save_LIBS"
6993
6994 fi
6995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6996   echo "$ac_t""yes" 1>&6
6997     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6998     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6999   cat >> confdefs.h <<EOF
7000 #define $ac_tr_lib 1
7001 EOF
7002
7003   LIBS="-lsec $LIBS"
7004
7005 else
7006   echo "$ac_t""no" 1>&6
7007 fi
7008  
7009      for ac_func in putprpwnam
7010 do
7011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7012 echo "configure:7013: checking for $ac_func" >&5
7013 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7014   echo $ac_n "(cached) $ac_c" 1>&6
7015 else
7016   cat > conftest.$ac_ext <<EOF
7017 #line 7018 "configure"
7018 #include "confdefs.h"
7019 /* System header to define __stub macros and hopefully few prototypes,
7020     which can conflict with char $ac_func(); below.  */
7021 #include <assert.h>
7022 /* Override any gcc2 internal prototype to avoid an error.  */
7023 /* We use char because int might match the return type of a gcc2
7024     builtin and then its argument prototype would still apply.  */
7025 char $ac_func();
7026
7027 int main() {
7028
7029 /* The GNU C library defines this for functions which it implements
7030     to always fail with ENOSYS.  Some functions are actually named
7031     something starting with __ and the normal name is an alias.  */
7032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7033 choke me
7034 #else
7035 $ac_func();
7036 #endif
7037
7038 ; return 0; }
7039 EOF
7040 if { (eval echo configure:7041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7041   rm -rf conftest*
7042   eval "ac_cv_func_$ac_func=yes"
7043 else
7044   echo "configure: failed program was:" >&5
7045   cat conftest.$ac_ext >&5
7046   rm -rf conftest*
7047   eval "ac_cv_func_$ac_func=no"
7048 fi
7049 rm -f conftest*
7050 fi
7051
7052 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7053   echo "$ac_t""yes" 1>&6
7054     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7055   cat >> confdefs.h <<EOF
7056 #define $ac_tr_func 1
7057 EOF
7058  
7059 else
7060   echo "$ac_t""no" 1>&6
7061 fi
7062 done
7063
7064   ;;
7065   esac
7066
7067
7068 case "$LIBS" in
7069   *-lsecurity*) for ac_func in set_auth_parameters
7070 do
7071 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7072 echo "configure:7073: checking for $ac_func" >&5
7073 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7074   echo $ac_n "(cached) $ac_c" 1>&6
7075 else
7076   cat > conftest.$ac_ext <<EOF
7077 #line 7078 "configure"
7078 #include "confdefs.h"
7079 /* System header to define __stub macros and hopefully few prototypes,
7080     which can conflict with char $ac_func(); below.  */
7081 #include <assert.h>
7082 /* Override any gcc2 internal prototype to avoid an error.  */
7083 /* We use char because int might match the return type of a gcc2
7084     builtin and then its argument prototype would still apply.  */
7085 char $ac_func();
7086
7087 int main() {
7088
7089 /* The GNU C library defines this for functions which it implements
7090     to always fail with ENOSYS.  Some functions are actually named
7091     something starting with __ and the normal name is an alias.  */
7092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7093 choke me
7094 #else
7095 $ac_func();
7096 #endif
7097
7098 ; return 0; }
7099 EOF
7100 if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7101   rm -rf conftest*
7102   eval "ac_cv_func_$ac_func=yes"
7103 else
7104   echo "configure: failed program was:" >&5
7105   cat conftest.$ac_ext >&5
7106   rm -rf conftest*
7107   eval "ac_cv_func_$ac_func=no"
7108 fi
7109 rm -f conftest*
7110 fi
7111
7112 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7113   echo "$ac_t""yes" 1>&6
7114     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7115   cat >> confdefs.h <<EOF
7116 #define $ac_tr_func 1
7117 EOF
7118  
7119 else
7120   echo "$ac_t""no" 1>&6
7121 fi
7122 done
7123  ;;
7124   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7125 echo "configure:7126: checking for set_auth_parameters in -lsecurity" >&5
7126 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7127 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7128   echo $ac_n "(cached) $ac_c" 1>&6
7129 else
7130   ac_save_LIBS="$LIBS"
7131 LIBS="-lsecurity  $LIBS"
7132 cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135 /* Override any gcc2 internal prototype to avoid an error.  */
7136 /* We use char because int might match the return type of a gcc2
7137     builtin and then its argument prototype would still apply.  */
7138 char set_auth_parameters();
7139
7140 int main() {
7141 set_auth_parameters()
7142 ; return 0; }
7143 EOF
7144 if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7145   rm -rf conftest*
7146   eval "ac_cv_lib_$ac_lib_var=yes"
7147 else
7148   echo "configure: failed program was:" >&5
7149   cat conftest.$ac_ext >&5
7150   rm -rf conftest*
7151   eval "ac_cv_lib_$ac_lib_var=no"
7152 fi
7153 rm -f conftest*
7154 LIBS="$ac_save_LIBS"
7155
7156 fi
7157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7158   echo "$ac_t""yes" 1>&6
7159     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7160     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7161   cat >> confdefs.h <<EOF
7162 #define $ac_tr_lib 1
7163 EOF
7164
7165   LIBS="-lsecurity $LIBS"
7166
7167 else
7168   echo "$ac_t""no" 1>&6
7169 fi
7170  
7171      for ac_func in set_auth_parameters
7172 do
7173 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7174 echo "configure:7175: checking for $ac_func" >&5
7175 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7176   echo $ac_n "(cached) $ac_c" 1>&6
7177 else
7178   cat > conftest.$ac_ext <<EOF
7179 #line 7180 "configure"
7180 #include "confdefs.h"
7181 /* System header to define __stub macros and hopefully few prototypes,
7182     which can conflict with char $ac_func(); below.  */
7183 #include <assert.h>
7184 /* Override any gcc2 internal prototype to avoid an error.  */
7185 /* We use char because int might match the return type of a gcc2
7186     builtin and then its argument prototype would still apply.  */
7187 char $ac_func();
7188
7189 int main() {
7190
7191 /* The GNU C library defines this for functions which it implements
7192     to always fail with ENOSYS.  Some functions are actually named
7193     something starting with __ and the normal name is an alias.  */
7194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7195 choke me
7196 #else
7197 $ac_func();
7198 #endif
7199
7200 ; return 0; }
7201 EOF
7202 if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7203   rm -rf conftest*
7204   eval "ac_cv_func_$ac_func=yes"
7205 else
7206   echo "configure: failed program was:" >&5
7207   cat conftest.$ac_ext >&5
7208   rm -rf conftest*
7209   eval "ac_cv_func_$ac_func=no"
7210 fi
7211 rm -f conftest*
7212 fi
7213
7214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7215   echo "$ac_t""yes" 1>&6
7216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7217   cat >> confdefs.h <<EOF
7218 #define $ac_tr_func 1
7219 EOF
7220  
7221 else
7222   echo "$ac_t""no" 1>&6
7223 fi
7224 done
7225
7226   ;;
7227   esac
7228
7229 case "$LIBS" in
7230   *-lsec*) for ac_func in set_auth_parameters
7231 do
7232 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7233 echo "configure:7234: checking for $ac_func" >&5
7234 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7235   echo $ac_n "(cached) $ac_c" 1>&6
7236 else
7237   cat > conftest.$ac_ext <<EOF
7238 #line 7239 "configure"
7239 #include "confdefs.h"
7240 /* System header to define __stub macros and hopefully few prototypes,
7241     which can conflict with char $ac_func(); below.  */
7242 #include <assert.h>
7243 /* Override any gcc2 internal prototype to avoid an error.  */
7244 /* We use char because int might match the return type of a gcc2
7245     builtin and then its argument prototype would still apply.  */
7246 char $ac_func();
7247
7248 int main() {
7249
7250 /* The GNU C library defines this for functions which it implements
7251     to always fail with ENOSYS.  Some functions are actually named
7252     something starting with __ and the normal name is an alias.  */
7253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7254 choke me
7255 #else
7256 $ac_func();
7257 #endif
7258
7259 ; return 0; }
7260 EOF
7261 if { (eval echo configure:7262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7262   rm -rf conftest*
7263   eval "ac_cv_func_$ac_func=yes"
7264 else
7265   echo "configure: failed program was:" >&5
7266   cat conftest.$ac_ext >&5
7267   rm -rf conftest*
7268   eval "ac_cv_func_$ac_func=no"
7269 fi
7270 rm -f conftest*
7271 fi
7272
7273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7274   echo "$ac_t""yes" 1>&6
7275     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7276   cat >> confdefs.h <<EOF
7277 #define $ac_tr_func 1
7278 EOF
7279  
7280 else
7281   echo "$ac_t""no" 1>&6
7282 fi
7283 done
7284  ;;
7285   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7286 echo "configure:7287: checking for set_auth_parameters in -lsec" >&5
7287 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7288 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7289   echo $ac_n "(cached) $ac_c" 1>&6
7290 else
7291   ac_save_LIBS="$LIBS"
7292 LIBS="-lsec  $LIBS"
7293 cat > conftest.$ac_ext <<EOF
7294 #line 7295 "configure"
7295 #include "confdefs.h"
7296 /* Override any gcc2 internal prototype to avoid an error.  */
7297 /* We use char because int might match the return type of a gcc2
7298     builtin and then its argument prototype would still apply.  */
7299 char set_auth_parameters();
7300
7301 int main() {
7302 set_auth_parameters()
7303 ; return 0; }
7304 EOF
7305 if { (eval echo configure:7306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7306   rm -rf conftest*
7307   eval "ac_cv_lib_$ac_lib_var=yes"
7308 else
7309   echo "configure: failed program was:" >&5
7310   cat conftest.$ac_ext >&5
7311   rm -rf conftest*
7312   eval "ac_cv_lib_$ac_lib_var=no"
7313 fi
7314 rm -f conftest*
7315 LIBS="$ac_save_LIBS"
7316
7317 fi
7318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7319   echo "$ac_t""yes" 1>&6
7320     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7321     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7322   cat >> confdefs.h <<EOF
7323 #define $ac_tr_lib 1
7324 EOF
7325
7326   LIBS="-lsec $LIBS"
7327
7328 else
7329   echo "$ac_t""no" 1>&6
7330 fi
7331  
7332      for ac_func in set_auth_parameters
7333 do
7334 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7335 echo "configure:7336: checking for $ac_func" >&5
7336 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7337   echo $ac_n "(cached) $ac_c" 1>&6
7338 else
7339   cat > conftest.$ac_ext <<EOF
7340 #line 7341 "configure"
7341 #include "confdefs.h"
7342 /* System header to define __stub macros and hopefully few prototypes,
7343     which can conflict with char $ac_func(); below.  */
7344 #include <assert.h>
7345 /* Override any gcc2 internal prototype to avoid an error.  */
7346 /* We use char because int might match the return type of a gcc2
7347     builtin and then its argument prototype would still apply.  */
7348 char $ac_func();
7349
7350 int main() {
7351
7352 /* The GNU C library defines this for functions which it implements
7353     to always fail with ENOSYS.  Some functions are actually named
7354     something starting with __ and the normal name is an alias.  */
7355 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7356 choke me
7357 #else
7358 $ac_func();
7359 #endif
7360
7361 ; return 0; }
7362 EOF
7363 if { (eval echo configure:7364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7364   rm -rf conftest*
7365   eval "ac_cv_func_$ac_func=yes"
7366 else
7367   echo "configure: failed program was:" >&5
7368   cat conftest.$ac_ext >&5
7369   rm -rf conftest*
7370   eval "ac_cv_func_$ac_func=no"
7371 fi
7372 rm -f conftest*
7373 fi
7374
7375 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7376   echo "$ac_t""yes" 1>&6
7377     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7378   cat >> confdefs.h <<EOF
7379 #define $ac_tr_func 1
7380 EOF
7381  
7382 else
7383   echo "$ac_t""no" 1>&6
7384 fi
7385 done
7386
7387   ;;
7388   esac
7389
7390
7391 # UnixWare 7.x has its getspnam in -lgen
7392 case "$LIBS" in
7393   *-lgen*) for ac_func in getspnam
7394 do
7395 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7396 echo "configure:7397: checking for $ac_func" >&5
7397 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7398   echo $ac_n "(cached) $ac_c" 1>&6
7399 else
7400   cat > conftest.$ac_ext <<EOF
7401 #line 7402 "configure"
7402 #include "confdefs.h"
7403 /* System header to define __stub macros and hopefully few prototypes,
7404     which can conflict with char $ac_func(); below.  */
7405 #include <assert.h>
7406 /* Override any gcc2 internal prototype to avoid an error.  */
7407 /* We use char because int might match the return type of a gcc2
7408     builtin and then its argument prototype would still apply.  */
7409 char $ac_func();
7410
7411 int main() {
7412
7413 /* The GNU C library defines this for functions which it implements
7414     to always fail with ENOSYS.  Some functions are actually named
7415     something starting with __ and the normal name is an alias.  */
7416 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7417 choke me
7418 #else
7419 $ac_func();
7420 #endif
7421
7422 ; return 0; }
7423 EOF
7424 if { (eval echo configure:7425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7425   rm -rf conftest*
7426   eval "ac_cv_func_$ac_func=yes"
7427 else
7428   echo "configure: failed program was:" >&5
7429   cat conftest.$ac_ext >&5
7430   rm -rf conftest*
7431   eval "ac_cv_func_$ac_func=no"
7432 fi
7433 rm -f conftest*
7434 fi
7435
7436 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7437   echo "$ac_t""yes" 1>&6
7438     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7439   cat >> confdefs.h <<EOF
7440 #define $ac_tr_func 1
7441 EOF
7442  
7443 else
7444   echo "$ac_t""no" 1>&6
7445 fi
7446 done
7447  ;;
7448   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7449 echo "configure:7450: checking for getspnam in -lgen" >&5
7450 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7451 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7452   echo $ac_n "(cached) $ac_c" 1>&6
7453 else
7454   ac_save_LIBS="$LIBS"
7455 LIBS="-lgen  $LIBS"
7456 cat > conftest.$ac_ext <<EOF
7457 #line 7458 "configure"
7458 #include "confdefs.h"
7459 /* Override any gcc2 internal prototype to avoid an error.  */
7460 /* We use char because int might match the return type of a gcc2
7461     builtin and then its argument prototype would still apply.  */
7462 char getspnam();
7463
7464 int main() {
7465 getspnam()
7466 ; return 0; }
7467 EOF
7468 if { (eval echo configure:7469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7469   rm -rf conftest*
7470   eval "ac_cv_lib_$ac_lib_var=yes"
7471 else
7472   echo "configure: failed program was:" >&5
7473   cat conftest.$ac_ext >&5
7474   rm -rf conftest*
7475   eval "ac_cv_lib_$ac_lib_var=no"
7476 fi
7477 rm -f conftest*
7478 LIBS="$ac_save_LIBS"
7479
7480 fi
7481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7482   echo "$ac_t""yes" 1>&6
7483     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7484     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7485   cat >> confdefs.h <<EOF
7486 #define $ac_tr_lib 1
7487 EOF
7488
7489   LIBS="-lgen $LIBS"
7490
7491 else
7492   echo "$ac_t""no" 1>&6
7493 fi
7494  
7495      for ac_func in getspnam
7496 do
7497 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7498 echo "configure:7499: checking for $ac_func" >&5
7499 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7500   echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502   cat > conftest.$ac_ext <<EOF
7503 #line 7504 "configure"
7504 #include "confdefs.h"
7505 /* System header to define __stub macros and hopefully few prototypes,
7506     which can conflict with char $ac_func(); below.  */
7507 #include <assert.h>
7508 /* Override any gcc2 internal prototype to avoid an error.  */
7509 /* We use char because int might match the return type of a gcc2
7510     builtin and then its argument prototype would still apply.  */
7511 char $ac_func();
7512
7513 int main() {
7514
7515 /* The GNU C library defines this for functions which it implements
7516     to always fail with ENOSYS.  Some functions are actually named
7517     something starting with __ and the normal name is an alias.  */
7518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7519 choke me
7520 #else
7521 $ac_func();
7522 #endif
7523
7524 ; return 0; }
7525 EOF
7526 if { (eval echo configure:7527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7527   rm -rf conftest*
7528   eval "ac_cv_func_$ac_func=yes"
7529 else
7530   echo "configure: failed program was:" >&5
7531   cat conftest.$ac_ext >&5
7532   rm -rf conftest*
7533   eval "ac_cv_func_$ac_func=no"
7534 fi
7535 rm -f conftest*
7536 fi
7537
7538 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7539   echo "$ac_t""yes" 1>&6
7540     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7541   cat >> confdefs.h <<EOF
7542 #define $ac_tr_func 1
7543 EOF
7544  
7545 else
7546   echo "$ac_t""no" 1>&6
7547 fi
7548 done
7549
7550   ;;
7551   esac
7552
7553
7554 case "$LIBS" in
7555   *-lsecurity*) for ac_func in getspnam
7556 do
7557 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7558 echo "configure:7559: checking for $ac_func" >&5
7559 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7560   echo $ac_n "(cached) $ac_c" 1>&6
7561 else
7562   cat > conftest.$ac_ext <<EOF
7563 #line 7564 "configure"
7564 #include "confdefs.h"
7565 /* System header to define __stub macros and hopefully few prototypes,
7566     which can conflict with char $ac_func(); below.  */
7567 #include <assert.h>
7568 /* Override any gcc2 internal prototype to avoid an error.  */
7569 /* We use char because int might match the return type of a gcc2
7570     builtin and then its argument prototype would still apply.  */
7571 char $ac_func();
7572
7573 int main() {
7574
7575 /* The GNU C library defines this for functions which it implements
7576     to always fail with ENOSYS.  Some functions are actually named
7577     something starting with __ and the normal name is an alias.  */
7578 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7579 choke me
7580 #else
7581 $ac_func();
7582 #endif
7583
7584 ; return 0; }
7585 EOF
7586 if { (eval echo configure:7587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7587   rm -rf conftest*
7588   eval "ac_cv_func_$ac_func=yes"
7589 else
7590   echo "configure: failed program was:" >&5
7591   cat conftest.$ac_ext >&5
7592   rm -rf conftest*
7593   eval "ac_cv_func_$ac_func=no"
7594 fi
7595 rm -f conftest*
7596 fi
7597
7598 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7599   echo "$ac_t""yes" 1>&6
7600     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7601   cat >> confdefs.h <<EOF
7602 #define $ac_tr_func 1
7603 EOF
7604  
7605 else
7606   echo "$ac_t""no" 1>&6
7607 fi
7608 done
7609  ;;
7610   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7611 echo "configure:7612: checking for getspnam in -lsecurity" >&5
7612 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7614   echo $ac_n "(cached) $ac_c" 1>&6
7615 else
7616   ac_save_LIBS="$LIBS"
7617 LIBS="-lsecurity  $LIBS"
7618 cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 /* Override any gcc2 internal prototype to avoid an error.  */
7622 /* We use char because int might match the return type of a gcc2
7623     builtin and then its argument prototype would still apply.  */
7624 char getspnam();
7625
7626 int main() {
7627 getspnam()
7628 ; return 0; }
7629 EOF
7630 if { (eval echo configure:7631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7631   rm -rf conftest*
7632   eval "ac_cv_lib_$ac_lib_var=yes"
7633 else
7634   echo "configure: failed program was:" >&5
7635   cat conftest.$ac_ext >&5
7636   rm -rf conftest*
7637   eval "ac_cv_lib_$ac_lib_var=no"
7638 fi
7639 rm -f conftest*
7640 LIBS="$ac_save_LIBS"
7641
7642 fi
7643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7644   echo "$ac_t""yes" 1>&6
7645     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7646     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7647   cat >> confdefs.h <<EOF
7648 #define $ac_tr_lib 1
7649 EOF
7650
7651   LIBS="-lsecurity $LIBS"
7652
7653 else
7654   echo "$ac_t""no" 1>&6
7655 fi
7656  
7657      for ac_func in getspnam
7658 do
7659 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7660 echo "configure:7661: checking for $ac_func" >&5
7661 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7662   echo $ac_n "(cached) $ac_c" 1>&6
7663 else
7664   cat > conftest.$ac_ext <<EOF
7665 #line 7666 "configure"
7666 #include "confdefs.h"
7667 /* System header to define __stub macros and hopefully few prototypes,
7668     which can conflict with char $ac_func(); below.  */
7669 #include <assert.h>
7670 /* Override any gcc2 internal prototype to avoid an error.  */
7671 /* We use char because int might match the return type of a gcc2
7672     builtin and then its argument prototype would still apply.  */
7673 char $ac_func();
7674
7675 int main() {
7676
7677 /* The GNU C library defines this for functions which it implements
7678     to always fail with ENOSYS.  Some functions are actually named
7679     something starting with __ and the normal name is an alias.  */
7680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7681 choke me
7682 #else
7683 $ac_func();
7684 #endif
7685
7686 ; return 0; }
7687 EOF
7688 if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7689   rm -rf conftest*
7690   eval "ac_cv_func_$ac_func=yes"
7691 else
7692   echo "configure: failed program was:" >&5
7693   cat conftest.$ac_ext >&5
7694   rm -rf conftest*
7695   eval "ac_cv_func_$ac_func=no"
7696 fi
7697 rm -f conftest*
7698 fi
7699
7700 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7701   echo "$ac_t""yes" 1>&6
7702     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7703   cat >> confdefs.h <<EOF
7704 #define $ac_tr_func 1
7705 EOF
7706  
7707 else
7708   echo "$ac_t""no" 1>&6
7709 fi
7710 done
7711
7712   ;;
7713   esac
7714
7715 case "$LIBS" in
7716   *-lsec*) for ac_func in getspnam
7717 do
7718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7719 echo "configure:7720: checking for $ac_func" >&5
7720 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7721   echo $ac_n "(cached) $ac_c" 1>&6
7722 else
7723   cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 /* System header to define __stub macros and hopefully few prototypes,
7727     which can conflict with char $ac_func(); below.  */
7728 #include <assert.h>
7729 /* Override any gcc2 internal prototype to avoid an error.  */
7730 /* We use char because int might match the return type of a gcc2
7731     builtin and then its argument prototype would still apply.  */
7732 char $ac_func();
7733
7734 int main() {
7735
7736 /* The GNU C library defines this for functions which it implements
7737     to always fail with ENOSYS.  Some functions are actually named
7738     something starting with __ and the normal name is an alias.  */
7739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7740 choke me
7741 #else
7742 $ac_func();
7743 #endif
7744
7745 ; return 0; }
7746 EOF
7747 if { (eval echo configure:7748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7748   rm -rf conftest*
7749   eval "ac_cv_func_$ac_func=yes"
7750 else
7751   echo "configure: failed program was:" >&5
7752   cat conftest.$ac_ext >&5
7753   rm -rf conftest*
7754   eval "ac_cv_func_$ac_func=no"
7755 fi
7756 rm -f conftest*
7757 fi
7758
7759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7760   echo "$ac_t""yes" 1>&6
7761     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7762   cat >> confdefs.h <<EOF
7763 #define $ac_tr_func 1
7764 EOF
7765  
7766 else
7767   echo "$ac_t""no" 1>&6
7768 fi
7769 done
7770  ;;
7771   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7772 echo "configure:7773: checking for getspnam in -lsec" >&5
7773 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7774 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7775   echo $ac_n "(cached) $ac_c" 1>&6
7776 else
7777   ac_save_LIBS="$LIBS"
7778 LIBS="-lsec  $LIBS"
7779 cat > conftest.$ac_ext <<EOF
7780 #line 7781 "configure"
7781 #include "confdefs.h"
7782 /* Override any gcc2 internal prototype to avoid an error.  */
7783 /* We use char because int might match the return type of a gcc2
7784     builtin and then its argument prototype would still apply.  */
7785 char getspnam();
7786
7787 int main() {
7788 getspnam()
7789 ; return 0; }
7790 EOF
7791 if { (eval echo configure:7792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7792   rm -rf conftest*
7793   eval "ac_cv_lib_$ac_lib_var=yes"
7794 else
7795   echo "configure: failed program was:" >&5
7796   cat conftest.$ac_ext >&5
7797   rm -rf conftest*
7798   eval "ac_cv_lib_$ac_lib_var=no"
7799 fi
7800 rm -f conftest*
7801 LIBS="$ac_save_LIBS"
7802
7803 fi
7804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7805   echo "$ac_t""yes" 1>&6
7806     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7807     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7808   cat >> confdefs.h <<EOF
7809 #define $ac_tr_lib 1
7810 EOF
7811
7812   LIBS="-lsec $LIBS"
7813
7814 else
7815   echo "$ac_t""no" 1>&6
7816 fi
7817  
7818      for ac_func in getspnam
7819 do
7820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7821 echo "configure:7822: checking for $ac_func" >&5
7822 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7823   echo $ac_n "(cached) $ac_c" 1>&6
7824 else
7825   cat > conftest.$ac_ext <<EOF
7826 #line 7827 "configure"
7827 #include "confdefs.h"
7828 /* System header to define __stub macros and hopefully few prototypes,
7829     which can conflict with char $ac_func(); below.  */
7830 #include <assert.h>
7831 /* Override any gcc2 internal prototype to avoid an error.  */
7832 /* We use char because int might match the return type of a gcc2
7833     builtin and then its argument prototype would still apply.  */
7834 char $ac_func();
7835
7836 int main() {
7837
7838 /* The GNU C library defines this for functions which it implements
7839     to always fail with ENOSYS.  Some functions are actually named
7840     something starting with __ and the normal name is an alias.  */
7841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7842 choke me
7843 #else
7844 $ac_func();
7845 #endif
7846
7847 ; return 0; }
7848 EOF
7849 if { (eval echo configure:7850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7850   rm -rf conftest*
7851   eval "ac_cv_func_$ac_func=yes"
7852 else
7853   echo "configure: failed program was:" >&5
7854   cat conftest.$ac_ext >&5
7855   rm -rf conftest*
7856   eval "ac_cv_func_$ac_func=no"
7857 fi
7858 rm -f conftest*
7859 fi
7860
7861 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7862   echo "$ac_t""yes" 1>&6
7863     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7864   cat >> confdefs.h <<EOF
7865 #define $ac_tr_func 1
7866 EOF
7867  
7868 else
7869   echo "$ac_t""no" 1>&6
7870 fi
7871 done
7872
7873   ;;
7874   esac
7875
7876
7877 case "$LIBS" in
7878   *-lsecurity*) for ac_func in bigcrypt
7879 do
7880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7881 echo "configure:7882: checking for $ac_func" >&5
7882 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7883   echo $ac_n "(cached) $ac_c" 1>&6
7884 else
7885   cat > conftest.$ac_ext <<EOF
7886 #line 7887 "configure"
7887 #include "confdefs.h"
7888 /* System header to define __stub macros and hopefully few prototypes,
7889     which can conflict with char $ac_func(); below.  */
7890 #include <assert.h>
7891 /* Override any gcc2 internal prototype to avoid an error.  */
7892 /* We use char because int might match the return type of a gcc2
7893     builtin and then its argument prototype would still apply.  */
7894 char $ac_func();
7895
7896 int main() {
7897
7898 /* The GNU C library defines this for functions which it implements
7899     to always fail with ENOSYS.  Some functions are actually named
7900     something starting with __ and the normal name is an alias.  */
7901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7902 choke me
7903 #else
7904 $ac_func();
7905 #endif
7906
7907 ; return 0; }
7908 EOF
7909 if { (eval echo configure:7910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7910   rm -rf conftest*
7911   eval "ac_cv_func_$ac_func=yes"
7912 else
7913   echo "configure: failed program was:" >&5
7914   cat conftest.$ac_ext >&5
7915   rm -rf conftest*
7916   eval "ac_cv_func_$ac_func=no"
7917 fi
7918 rm -f conftest*
7919 fi
7920
7921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7922   echo "$ac_t""yes" 1>&6
7923     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7924   cat >> confdefs.h <<EOF
7925 #define $ac_tr_func 1
7926 EOF
7927  
7928 else
7929   echo "$ac_t""no" 1>&6
7930 fi
7931 done
7932  ;;
7933   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7934 echo "configure:7935: checking for bigcrypt in -lsecurity" >&5
7935 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7936 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7937   echo $ac_n "(cached) $ac_c" 1>&6
7938 else
7939   ac_save_LIBS="$LIBS"
7940 LIBS="-lsecurity  $LIBS"
7941 cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 /* Override any gcc2 internal prototype to avoid an error.  */
7945 /* We use char because int might match the return type of a gcc2
7946     builtin and then its argument prototype would still apply.  */
7947 char bigcrypt();
7948
7949 int main() {
7950 bigcrypt()
7951 ; return 0; }
7952 EOF
7953 if { (eval echo configure:7954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7954   rm -rf conftest*
7955   eval "ac_cv_lib_$ac_lib_var=yes"
7956 else
7957   echo "configure: failed program was:" >&5
7958   cat conftest.$ac_ext >&5
7959   rm -rf conftest*
7960   eval "ac_cv_lib_$ac_lib_var=no"
7961 fi
7962 rm -f conftest*
7963 LIBS="$ac_save_LIBS"
7964
7965 fi
7966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7967   echo "$ac_t""yes" 1>&6
7968     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7969     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7970   cat >> confdefs.h <<EOF
7971 #define $ac_tr_lib 1
7972 EOF
7973
7974   LIBS="-lsecurity $LIBS"
7975
7976 else
7977   echo "$ac_t""no" 1>&6
7978 fi
7979  
7980      for ac_func in bigcrypt
7981 do
7982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7983 echo "configure:7984: checking for $ac_func" >&5
7984 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7985   echo $ac_n "(cached) $ac_c" 1>&6
7986 else
7987   cat > conftest.$ac_ext <<EOF
7988 #line 7989 "configure"
7989 #include "confdefs.h"
7990 /* System header to define __stub macros and hopefully few prototypes,
7991     which can conflict with char $ac_func(); below.  */
7992 #include <assert.h>
7993 /* Override any gcc2 internal prototype to avoid an error.  */
7994 /* We use char because int might match the return type of a gcc2
7995     builtin and then its argument prototype would still apply.  */
7996 char $ac_func();
7997
7998 int main() {
7999
8000 /* The GNU C library defines this for functions which it implements
8001     to always fail with ENOSYS.  Some functions are actually named
8002     something starting with __ and the normal name is an alias.  */
8003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8004 choke me
8005 #else
8006 $ac_func();
8007 #endif
8008
8009 ; return 0; }
8010 EOF
8011 if { (eval echo configure:8012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8012   rm -rf conftest*
8013   eval "ac_cv_func_$ac_func=yes"
8014 else
8015   echo "configure: failed program was:" >&5
8016   cat conftest.$ac_ext >&5
8017   rm -rf conftest*
8018   eval "ac_cv_func_$ac_func=no"
8019 fi
8020 rm -f conftest*
8021 fi
8022
8023 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8024   echo "$ac_t""yes" 1>&6
8025     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8026   cat >> confdefs.h <<EOF
8027 #define $ac_tr_func 1
8028 EOF
8029  
8030 else
8031   echo "$ac_t""no" 1>&6
8032 fi
8033 done
8034
8035   ;;
8036   esac
8037
8038 case "$LIBS" in
8039   *-lsec*) for ac_func in bigcrypt
8040 do
8041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8042 echo "configure:8043: checking for $ac_func" >&5
8043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8044   echo $ac_n "(cached) $ac_c" 1>&6
8045 else
8046   cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049 /* System header to define __stub macros and hopefully few prototypes,
8050     which can conflict with char $ac_func(); below.  */
8051 #include <assert.h>
8052 /* Override any gcc2 internal prototype to avoid an error.  */
8053 /* We use char because int might match the return type of a gcc2
8054     builtin and then its argument prototype would still apply.  */
8055 char $ac_func();
8056
8057 int main() {
8058
8059 /* The GNU C library defines this for functions which it implements
8060     to always fail with ENOSYS.  Some functions are actually named
8061     something starting with __ and the normal name is an alias.  */
8062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8063 choke me
8064 #else
8065 $ac_func();
8066 #endif
8067
8068 ; return 0; }
8069 EOF
8070 if { (eval echo configure:8071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8071   rm -rf conftest*
8072   eval "ac_cv_func_$ac_func=yes"
8073 else
8074   echo "configure: failed program was:" >&5
8075   cat conftest.$ac_ext >&5
8076   rm -rf conftest*
8077   eval "ac_cv_func_$ac_func=no"
8078 fi
8079 rm -f conftest*
8080 fi
8081
8082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8083   echo "$ac_t""yes" 1>&6
8084     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8085   cat >> confdefs.h <<EOF
8086 #define $ac_tr_func 1
8087 EOF
8088  
8089 else
8090   echo "$ac_t""no" 1>&6
8091 fi
8092 done
8093  ;;
8094   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8095 echo "configure:8096: checking for bigcrypt in -lsec" >&5
8096 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8097 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8098   echo $ac_n "(cached) $ac_c" 1>&6
8099 else
8100   ac_save_LIBS="$LIBS"
8101 LIBS="-lsec  $LIBS"
8102 cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105 /* Override any gcc2 internal prototype to avoid an error.  */
8106 /* We use char because int might match the return type of a gcc2
8107     builtin and then its argument prototype would still apply.  */
8108 char bigcrypt();
8109
8110 int main() {
8111 bigcrypt()
8112 ; return 0; }
8113 EOF
8114 if { (eval echo configure:8115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8115   rm -rf conftest*
8116   eval "ac_cv_lib_$ac_lib_var=yes"
8117 else
8118   echo "configure: failed program was:" >&5
8119   cat conftest.$ac_ext >&5
8120   rm -rf conftest*
8121   eval "ac_cv_lib_$ac_lib_var=no"
8122 fi
8123 rm -f conftest*
8124 LIBS="$ac_save_LIBS"
8125
8126 fi
8127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8128   echo "$ac_t""yes" 1>&6
8129     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8130     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8131   cat >> confdefs.h <<EOF
8132 #define $ac_tr_lib 1
8133 EOF
8134
8135   LIBS="-lsec $LIBS"
8136
8137 else
8138   echo "$ac_t""no" 1>&6
8139 fi
8140  
8141      for ac_func in bigcrypt
8142 do
8143 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8144 echo "configure:8145: checking for $ac_func" >&5
8145 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8146   echo $ac_n "(cached) $ac_c" 1>&6
8147 else
8148   cat > conftest.$ac_ext <<EOF
8149 #line 8150 "configure"
8150 #include "confdefs.h"
8151 /* System header to define __stub macros and hopefully few prototypes,
8152     which can conflict with char $ac_func(); below.  */
8153 #include <assert.h>
8154 /* Override any gcc2 internal prototype to avoid an error.  */
8155 /* We use char because int might match the return type of a gcc2
8156     builtin and then its argument prototype would still apply.  */
8157 char $ac_func();
8158
8159 int main() {
8160
8161 /* The GNU C library defines this for functions which it implements
8162     to always fail with ENOSYS.  Some functions are actually named
8163     something starting with __ and the normal name is an alias.  */
8164 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8165 choke me
8166 #else
8167 $ac_func();
8168 #endif
8169
8170 ; return 0; }
8171 EOF
8172 if { (eval echo configure:8173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8173   rm -rf conftest*
8174   eval "ac_cv_func_$ac_func=yes"
8175 else
8176   echo "configure: failed program was:" >&5
8177   cat conftest.$ac_ext >&5
8178   rm -rf conftest*
8179   eval "ac_cv_func_$ac_func=no"
8180 fi
8181 rm -f conftest*
8182 fi
8183
8184 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8185   echo "$ac_t""yes" 1>&6
8186     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8187   cat >> confdefs.h <<EOF
8188 #define $ac_tr_func 1
8189 EOF
8190  
8191 else
8192   echo "$ac_t""no" 1>&6
8193 fi
8194 done
8195
8196   ;;
8197   esac
8198
8199
8200 case "$LIBS" in
8201   *-lsecurity*) for ac_func in getprpwnam
8202 do
8203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8204 echo "configure:8205: checking for $ac_func" >&5
8205 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8206   echo $ac_n "(cached) $ac_c" 1>&6
8207 else
8208   cat > conftest.$ac_ext <<EOF
8209 #line 8210 "configure"
8210 #include "confdefs.h"
8211 /* System header to define __stub macros and hopefully few prototypes,
8212     which can conflict with char $ac_func(); below.  */
8213 #include <assert.h>
8214 /* Override any gcc2 internal prototype to avoid an error.  */
8215 /* We use char because int might match the return type of a gcc2
8216     builtin and then its argument prototype would still apply.  */
8217 char $ac_func();
8218
8219 int main() {
8220
8221 /* The GNU C library defines this for functions which it implements
8222     to always fail with ENOSYS.  Some functions are actually named
8223     something starting with __ and the normal name is an alias.  */
8224 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8225 choke me
8226 #else
8227 $ac_func();
8228 #endif
8229
8230 ; return 0; }
8231 EOF
8232 if { (eval echo configure:8233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8233   rm -rf conftest*
8234   eval "ac_cv_func_$ac_func=yes"
8235 else
8236   echo "configure: failed program was:" >&5
8237   cat conftest.$ac_ext >&5
8238   rm -rf conftest*
8239   eval "ac_cv_func_$ac_func=no"
8240 fi
8241 rm -f conftest*
8242 fi
8243
8244 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8245   echo "$ac_t""yes" 1>&6
8246     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8247   cat >> confdefs.h <<EOF
8248 #define $ac_tr_func 1
8249 EOF
8250  
8251 else
8252   echo "$ac_t""no" 1>&6
8253 fi
8254 done
8255  ;;
8256   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8257 echo "configure:8258: checking for getprpwnam in -lsecurity" >&5
8258 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8259 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8260   echo $ac_n "(cached) $ac_c" 1>&6
8261 else
8262   ac_save_LIBS="$LIBS"
8263 LIBS="-lsecurity  $LIBS"
8264 cat > conftest.$ac_ext <<EOF
8265 #line 8266 "configure"
8266 #include "confdefs.h"
8267 /* Override any gcc2 internal prototype to avoid an error.  */
8268 /* We use char because int might match the return type of a gcc2
8269     builtin and then its argument prototype would still apply.  */
8270 char getprpwnam();
8271
8272 int main() {
8273 getprpwnam()
8274 ; return 0; }
8275 EOF
8276 if { (eval echo configure:8277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8277   rm -rf conftest*
8278   eval "ac_cv_lib_$ac_lib_var=yes"
8279 else
8280   echo "configure: failed program was:" >&5
8281   cat conftest.$ac_ext >&5
8282   rm -rf conftest*
8283   eval "ac_cv_lib_$ac_lib_var=no"
8284 fi
8285 rm -f conftest*
8286 LIBS="$ac_save_LIBS"
8287
8288 fi
8289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8290   echo "$ac_t""yes" 1>&6
8291     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8292     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8293   cat >> confdefs.h <<EOF
8294 #define $ac_tr_lib 1
8295 EOF
8296
8297   LIBS="-lsecurity $LIBS"
8298
8299 else
8300   echo "$ac_t""no" 1>&6
8301 fi
8302  
8303      for ac_func in getprpwnam
8304 do
8305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8306 echo "configure:8307: checking for $ac_func" >&5
8307 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8308   echo $ac_n "(cached) $ac_c" 1>&6
8309 else
8310   cat > conftest.$ac_ext <<EOF
8311 #line 8312 "configure"
8312 #include "confdefs.h"
8313 /* System header to define __stub macros and hopefully few prototypes,
8314     which can conflict with char $ac_func(); below.  */
8315 #include <assert.h>
8316 /* Override any gcc2 internal prototype to avoid an error.  */
8317 /* We use char because int might match the return type of a gcc2
8318     builtin and then its argument prototype would still apply.  */
8319 char $ac_func();
8320
8321 int main() {
8322
8323 /* The GNU C library defines this for functions which it implements
8324     to always fail with ENOSYS.  Some functions are actually named
8325     something starting with __ and the normal name is an alias.  */
8326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8327 choke me
8328 #else
8329 $ac_func();
8330 #endif
8331
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8335   rm -rf conftest*
8336   eval "ac_cv_func_$ac_func=yes"
8337 else
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   eval "ac_cv_func_$ac_func=no"
8342 fi
8343 rm -f conftest*
8344 fi
8345
8346 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8347   echo "$ac_t""yes" 1>&6
8348     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8349   cat >> confdefs.h <<EOF
8350 #define $ac_tr_func 1
8351 EOF
8352  
8353 else
8354   echo "$ac_t""no" 1>&6
8355 fi
8356 done
8357
8358   ;;
8359   esac
8360
8361 case "$LIBS" in
8362   *-lsec*) for ac_func in getprpwnam
8363 do
8364 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8365 echo "configure:8366: checking for $ac_func" >&5
8366 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8367   echo $ac_n "(cached) $ac_c" 1>&6
8368 else
8369   cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 /* System header to define __stub macros and hopefully few prototypes,
8373     which can conflict with char $ac_func(); below.  */
8374 #include <assert.h>
8375 /* Override any gcc2 internal prototype to avoid an error.  */
8376 /* We use char because int might match the return type of a gcc2
8377     builtin and then its argument prototype would still apply.  */
8378 char $ac_func();
8379
8380 int main() {
8381
8382 /* The GNU C library defines this for functions which it implements
8383     to always fail with ENOSYS.  Some functions are actually named
8384     something starting with __ and the normal name is an alias.  */
8385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8386 choke me
8387 #else
8388 $ac_func();
8389 #endif
8390
8391 ; return 0; }
8392 EOF
8393 if { (eval echo configure:8394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8394   rm -rf conftest*
8395   eval "ac_cv_func_$ac_func=yes"
8396 else
8397   echo "configure: failed program was:" >&5
8398   cat conftest.$ac_ext >&5
8399   rm -rf conftest*
8400   eval "ac_cv_func_$ac_func=no"
8401 fi
8402 rm -f conftest*
8403 fi
8404
8405 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8406   echo "$ac_t""yes" 1>&6
8407     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8408   cat >> confdefs.h <<EOF
8409 #define $ac_tr_func 1
8410 EOF
8411  
8412 else
8413   echo "$ac_t""no" 1>&6
8414 fi
8415 done
8416  ;;
8417   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8418 echo "configure:8419: checking for getprpwnam in -lsec" >&5
8419 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8421   echo $ac_n "(cached) $ac_c" 1>&6
8422 else
8423   ac_save_LIBS="$LIBS"
8424 LIBS="-lsec  $LIBS"
8425 cat > conftest.$ac_ext <<EOF
8426 #line 8427 "configure"
8427 #include "confdefs.h"
8428 /* Override any gcc2 internal prototype to avoid an error.  */
8429 /* We use char because int might match the return type of a gcc2
8430     builtin and then its argument prototype would still apply.  */
8431 char getprpwnam();
8432
8433 int main() {
8434 getprpwnam()
8435 ; return 0; }
8436 EOF
8437 if { (eval echo configure:8438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8438   rm -rf conftest*
8439   eval "ac_cv_lib_$ac_lib_var=yes"
8440 else
8441   echo "configure: failed program was:" >&5
8442   cat conftest.$ac_ext >&5
8443   rm -rf conftest*
8444   eval "ac_cv_lib_$ac_lib_var=no"
8445 fi
8446 rm -f conftest*
8447 LIBS="$ac_save_LIBS"
8448
8449 fi
8450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8451   echo "$ac_t""yes" 1>&6
8452     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8453     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8454   cat >> confdefs.h <<EOF
8455 #define $ac_tr_lib 1
8456 EOF
8457
8458   LIBS="-lsec $LIBS"
8459
8460 else
8461   echo "$ac_t""no" 1>&6
8462 fi
8463  
8464      for ac_func in getprpwnam
8465 do
8466 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8467 echo "configure:8468: checking for $ac_func" >&5
8468 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8469   echo $ac_n "(cached) $ac_c" 1>&6
8470 else
8471   cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 /* System header to define __stub macros and hopefully few prototypes,
8475     which can conflict with char $ac_func(); below.  */
8476 #include <assert.h>
8477 /* Override any gcc2 internal prototype to avoid an error.  */
8478 /* We use char because int might match the return type of a gcc2
8479     builtin and then its argument prototype would still apply.  */
8480 char $ac_func();
8481
8482 int main() {
8483
8484 /* The GNU C library defines this for functions which it implements
8485     to always fail with ENOSYS.  Some functions are actually named
8486     something starting with __ and the normal name is an alias.  */
8487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8488 choke me
8489 #else
8490 $ac_func();
8491 #endif
8492
8493 ; return 0; }
8494 EOF
8495 if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8496   rm -rf conftest*
8497   eval "ac_cv_func_$ac_func=yes"
8498 else
8499   echo "configure: failed program was:" >&5
8500   cat conftest.$ac_ext >&5
8501   rm -rf conftest*
8502   eval "ac_cv_func_$ac_func=no"
8503 fi
8504 rm -f conftest*
8505 fi
8506
8507 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8508   echo "$ac_t""yes" 1>&6
8509     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8510   cat >> confdefs.h <<EOF
8511 #define $ac_tr_func 1
8512 EOF
8513  
8514 else
8515   echo "$ac_t""no" 1>&6
8516 fi
8517 done
8518
8519   ;;
8520   esac
8521
8522
8523 # this bit needs to be modified for each OS that is suported by
8524 # smbwrapper. You need to specify how to created a shared library and
8525 # how to compile C code to produce PIC object files
8526
8527 # these are the defaults, good for lots of systems
8528 HOST_OS="$host_os"
8529 LDSHFLAGS="-shared"
8530 SHLD="\${CC}"
8531 PICFLAG=""
8532 PICSUFFIX="po"
8533 POBAD_CC="#"
8534 SHLIBEXT="so"
8535 # Assume non-shared by default and override below
8536 BLDSHARED="false"
8537 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8538 echo "configure:8539: checking ability to build shared libraries" >&5
8539
8540 # and these are for particular systems
8541 case "$host_os" in
8542                 *linux*)   cat >> confdefs.h <<\EOF
8543 #define LINUX 1
8544 EOF
8545
8546                         BLDSHARED="true"
8547                         LDSHFLAGS="-shared" 
8548                         PICFLAG="-fPIC"
8549                 ;;
8550                 *solaris*) cat >> confdefs.h <<\EOF
8551 #define SUNOS5 1
8552 EOF
8553
8554                         BLDSHARED="true"
8555                         LDSHFLAGS="-h \$@ -G"
8556                         if test "${ac_cv_prog_CC}" = "gcc"; then
8557                                 PICFLAG="-fPIC"
8558                         else
8559                                 PICFLAG="-KPIC"
8560                                 POBAD_CC=""
8561                                 PICSUFFIX="po.o"
8562                         fi
8563                 ;;
8564                 *sunos*) cat >> confdefs.h <<\EOF
8565 #define SUNOS4 1
8566 EOF
8567
8568                         BLDSHARED="true"
8569                         LDSHFLAGS="-Wl,-h,\$@ -G"
8570                         PICFLAG="-KPIC"   # Is this correct for SunOS
8571                 ;;
8572                 *bsd*)  BLDSHARED="true"
8573                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8574                         PICFLAG="-fPIC"
8575                 ;;
8576                 *irix*) cat >> confdefs.h <<\EOF
8577 #define IRIX 1
8578 EOF
8579
8580                         case "$host_os" in
8581                         *irix6*) cat >> confdefs.h <<\EOF
8582 #define IRIX6 1
8583 EOF
8584
8585                         ;;
8586                         esac
8587                         ATTEMPT_WRAP32_BUILD=yes
8588                         BLDSHARED="true"
8589                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8590                         if test "${ac_cv_prog_CC}" = "gcc"; then
8591                                 PICFLAG="-fPIC"
8592                         else 
8593                                 PICFLAG="-KPIC"
8594                         fi
8595                 ;;
8596                 *aix*) cat >> confdefs.h <<\EOF
8597 #define AIX 1
8598 EOF
8599
8600                         BLDSHARED="true"
8601                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8602                         PICFLAG="-O2 -qmaxmem=6000"
8603                 ;;
8604                 *hpux*) cat >> confdefs.h <<\EOF
8605 #define HPUX 1
8606 EOF
8607
8608                         SHLIBEXT="sl"
8609                         # Use special PIC flags for the native HP-UX compiler.
8610                         if test $ac_cv_prog_cc_Ae = yes; then
8611                                 #BLDSHARED="true"
8612                                 LDSHFLAGS="-b -z +h \$@"
8613                                 PICFLAG="+z"
8614                         fi
8615                 ;;
8616                 *qnx*) cat >> confdefs.h <<\EOF
8617 #define QNX 1
8618 EOF
8619 ;;
8620                 *osf*) cat >> confdefs.h <<\EOF
8621 #define OSF1 1
8622 EOF
8623
8624                         BLDSHARED="true"
8625                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8626                         PICFLAG="-fPIC"
8627                 ;;
8628                 *sco*) cat >> confdefs.h <<\EOF
8629 #define SCO 1
8630 EOF
8631 ;;
8632                 *unixware*) cat >> confdefs.h <<\EOF
8633 #define UNIXWARE 1
8634 EOF
8635
8636                         BLDSHARED="true"
8637                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8638                         PICFLAG="-KPIC"
8639                 ;;
8640                 *next2*) cat >> confdefs.h <<\EOF
8641 #define NEXT2 1
8642 EOF
8643 ;;
8644                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8645 set dummy groff; ac_word=$2
8646 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8647 echo "configure:8648: checking for $ac_word" >&5
8648 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8649   echo $ac_n "(cached) $ac_c" 1>&6
8650 else
8651   if test -n "$ROFF"; then
8652   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8653 else
8654   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8655   ac_dummy="$PATH"
8656   for ac_dir in $ac_dummy; do
8657     test -z "$ac_dir" && ac_dir=.
8658     if test -f $ac_dir/$ac_word; then
8659       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8660       break
8661     fi
8662   done
8663   IFS="$ac_save_ifs"
8664 fi
8665 fi
8666 ROFF="$ac_cv_prog_ROFF"
8667 if test -n "$ROFF"; then
8668   echo "$ac_t""$ROFF" 1>&6
8669 else
8670   echo "$ac_t""no" 1>&6
8671 fi
8672 ;;
8673                 *sysv4*)
8674                         case "$host" in
8675                                 *-univel-*)     if  test "$GCC" != yes ; then
8676                                                                         cat >> confdefs.h <<\EOF
8677 #define HAVE_MEMSET 1
8678 EOF
8679
8680                                                                 fi
8681                                                                 LDSHFLAGS="-G"
8682                                 ;;
8683                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8684 #define RELIANTUNIX 1
8685 EOF
8686 ;;
8687                         esac
8688                         ;;
8689                 *sysv5*)
8690                         if  test "$GCC" != yes ; then
8691                                 cat >> confdefs.h <<\EOF
8692 #define HAVE_MEMSET 1
8693 EOF
8694
8695                         fi
8696                         LDSHFLAGS="-G"
8697                         ;;
8698 esac
8699 echo "$ac_t""$BLDSHARED" 1>&6
8700 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8701 echo "configure:8702: checking linker flags for shared libraries" >&5
8702 echo "$ac_t""$LDSHFLAGS" 1>&6
8703 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8704 echo "configure:8705: checking compiler flags for position-independent code" >&5
8705 echo "$ac_t""$PICFLAGS" 1>&6
8706
8707 #######################################################
8708 # test whether building a shared library actually works
8709 if test $BLDSHARED = true; then
8710 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
8711 echo "configure:8712: checking whether building shared libraries actually works" >&5
8712 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
8713   echo $ac_n "(cached) $ac_c" 1>&6
8714 else
8715   
8716    ac_cv_shlib_works=no
8717    # try building a trivial shared library
8718    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
8719      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
8720      ac_cv_shlib_works=yes
8721    rm -f shlib.so shlib.po
8722
8723 fi
8724
8725 echo "$ac_t""$ac_cv_shlib_works" 1>&6
8726 if test $ac_cv_shlib_works = no; then
8727    BLDSHARED=false
8728 fi
8729 fi
8730
8731
8732 # this updates our target list if we can build shared libs
8733 if test $BLDSHARED = true; then
8734    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8735 else
8736    LIBSMBCLIENT_SHARED=
8737 fi
8738
8739 ################
8740
8741 echo $ac_n "checking for long long""... $ac_c" 1>&6
8742 echo "configure:8743: checking for long long" >&5
8743 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8744   echo $ac_n "(cached) $ac_c" 1>&6
8745 else
8746   
8747 if test "$cross_compiling" = yes; then
8748   samba_cv_have_longlong=cross
8749 else
8750   cat > conftest.$ac_ext <<EOF
8751 #line 8752 "configure"
8752 #include "confdefs.h"
8753 #include <stdio.h>
8754 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8755 EOF
8756 if { (eval echo configure:8757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8757 then
8758   samba_cv_have_longlong=yes
8759 else
8760   echo "configure: failed program was:" >&5
8761   cat conftest.$ac_ext >&5
8762   rm -fr conftest*
8763   samba_cv_have_longlong=no
8764 fi
8765 rm -fr conftest*
8766 fi
8767
8768 fi
8769
8770 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8771 if test x"$samba_cv_have_longlong" = x"yes"; then
8772     cat >> confdefs.h <<\EOF
8773 #define HAVE_LONGLONG 1
8774 EOF
8775
8776 fi
8777
8778 #
8779 # Check if the compiler supports the LL prefix on long long integers.
8780 # AIX needs this.
8781
8782 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8783 echo "configure:8784: checking for LL suffix on long long integers" >&5
8784 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8785   echo $ac_n "(cached) $ac_c" 1>&6
8786 else
8787   
8788     cat > conftest.$ac_ext <<EOF
8789 #line 8790 "configure"
8790 #include "confdefs.h"
8791 #include <stdio.h>
8792 int main() {
8793 long long i = 0x8000000000LL
8794 ; return 0; }
8795 EOF
8796 if { (eval echo configure:8797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8797   rm -rf conftest*
8798   samba_cv_compiler_supports_ll=yes
8799 else
8800   echo "configure: failed program was:" >&5
8801   cat conftest.$ac_ext >&5
8802   rm -rf conftest*
8803   samba_cv_compiler_supports_ll=no
8804 fi
8805 rm -f conftest*
8806 fi
8807
8808 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8809 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8810    cat >> confdefs.h <<\EOF
8811 #define COMPILER_SUPPORTS_LL 1
8812 EOF
8813
8814 fi
8815
8816   
8817 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8818 echo "configure:8819: checking for 64 bit off_t" >&5
8819 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8820   echo $ac_n "(cached) $ac_c" 1>&6
8821 else
8822   
8823 if test "$cross_compiling" = yes; then
8824   samba_cv_SIZEOF_OFF_T=cross
8825 else
8826   cat > conftest.$ac_ext <<EOF
8827 #line 8828 "configure"
8828 #include "confdefs.h"
8829 #include <stdio.h>
8830 #include <sys/stat.h>
8831 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8832 EOF
8833 if { (eval echo configure:8834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8834 then
8835   samba_cv_SIZEOF_OFF_T=yes
8836 else
8837   echo "configure: failed program was:" >&5
8838   cat conftest.$ac_ext >&5
8839   rm -fr conftest*
8840   samba_cv_SIZEOF_OFF_T=no
8841 fi
8842 rm -fr conftest*
8843 fi
8844
8845 fi
8846
8847 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8848 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8849     cat >> confdefs.h <<\EOF
8850 #define SIZEOF_OFF_T 8
8851 EOF
8852
8853 fi
8854
8855 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8856 echo "configure:8857: checking for off64_t" >&5
8857 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8858   echo $ac_n "(cached) $ac_c" 1>&6
8859 else
8860   
8861 if test "$cross_compiling" = yes; then
8862   samba_cv_HAVE_OFF64_T=cross
8863 else
8864   cat > conftest.$ac_ext <<EOF
8865 #line 8866 "configure"
8866 #include "confdefs.h"
8867
8868 #if defined(HAVE_UNISTD_H)
8869 #include <unistd.h>
8870 #endif
8871 #include <stdio.h>
8872 #include <sys/stat.h>
8873 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8874 EOF
8875 if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8876 then
8877   samba_cv_HAVE_OFF64_T=yes
8878 else
8879   echo "configure: failed program was:" >&5
8880   cat conftest.$ac_ext >&5
8881   rm -fr conftest*
8882   samba_cv_HAVE_OFF64_T=no
8883 fi
8884 rm -fr conftest*
8885 fi
8886
8887 fi
8888
8889 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8890 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8891     cat >> confdefs.h <<\EOF
8892 #define HAVE_OFF64_T 1
8893 EOF
8894
8895 fi
8896
8897 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8898 echo "configure:8899: checking for 64 bit ino_t" >&5
8899 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8900   echo $ac_n "(cached) $ac_c" 1>&6
8901 else
8902   
8903 if test "$cross_compiling" = yes; then
8904   samba_cv_SIZEOF_INO_T=cross
8905 else
8906   cat > conftest.$ac_ext <<EOF
8907 #line 8908 "configure"
8908 #include "confdefs.h"
8909 #include <stdio.h>
8910 #include <sys/stat.h>
8911 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8912 EOF
8913 if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8914 then
8915   samba_cv_SIZEOF_INO_T=yes
8916 else
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -fr conftest*
8920   samba_cv_SIZEOF_INO_T=no
8921 fi
8922 rm -fr conftest*
8923 fi
8924
8925 fi
8926
8927 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8928 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8929     cat >> confdefs.h <<\EOF
8930 #define SIZEOF_INO_T 8
8931 EOF
8932
8933 fi
8934
8935 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8936 echo "configure:8937: checking for ino64_t" >&5
8937 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8938   echo $ac_n "(cached) $ac_c" 1>&6
8939 else
8940   
8941 if test "$cross_compiling" = yes; then
8942   samba_cv_HAVE_INO64_T=cross
8943 else
8944   cat > conftest.$ac_ext <<EOF
8945 #line 8946 "configure"
8946 #include "confdefs.h"
8947
8948 #if defined(HAVE_UNISTD_H)
8949 #include <unistd.h>
8950 #endif
8951 #include <stdio.h>
8952 #include <sys/stat.h>
8953 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8954 EOF
8955 if { (eval echo configure:8956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8956 then
8957   samba_cv_HAVE_INO64_T=yes
8958 else
8959   echo "configure: failed program was:" >&5
8960   cat conftest.$ac_ext >&5
8961   rm -fr conftest*
8962   samba_cv_HAVE_INO64_T=no
8963 fi
8964 rm -fr conftest*
8965 fi
8966
8967 fi
8968
8969 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8970 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8971     cat >> confdefs.h <<\EOF
8972 #define HAVE_INO64_T 1
8973 EOF
8974
8975 fi
8976
8977 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8978 echo "configure:8979: checking for struct dirent64" >&5
8979 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8980   echo $ac_n "(cached) $ac_c" 1>&6
8981 else
8982   
8983 cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8986
8987 #if defined(HAVE_UNISTD_H)
8988 #include <unistd.h>
8989 #endif
8990 #include <sys/types.h>
8991 #include <dirent.h>
8992 int main() {
8993 struct dirent64 de;
8994 ; return 0; }
8995 EOF
8996 if { (eval echo configure:8997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8997   rm -rf conftest*
8998   samba_cv_HAVE_STRUCT_DIRENT64=yes
8999 else
9000   echo "configure: failed program was:" >&5
9001   cat conftest.$ac_ext >&5
9002   rm -rf conftest*
9003   samba_cv_HAVE_STRUCT_DIRENT64=no
9004 fi
9005 rm -f conftest*
9006 fi
9007
9008 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9009 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9010     cat >> confdefs.h <<\EOF
9011 #define HAVE_STRUCT_DIRENT64 1
9012 EOF
9013
9014 fi
9015
9016 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9017 echo "configure:9018: checking for unsigned char" >&5
9018 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9019   echo $ac_n "(cached) $ac_c" 1>&6
9020 else
9021   
9022 if test "$cross_compiling" = yes; then
9023   samba_cv_HAVE_UNSIGNED_CHAR=cross
9024 else
9025   cat > conftest.$ac_ext <<EOF
9026 #line 9027 "configure"
9027 #include "confdefs.h"
9028 #include <stdio.h>
9029 main() { char c; c=250; exit((c > 0)?0:1); }
9030 EOF
9031 if { (eval echo configure:9032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9032 then
9033   samba_cv_HAVE_UNSIGNED_CHAR=yes
9034 else
9035   echo "configure: failed program was:" >&5
9036   cat conftest.$ac_ext >&5
9037   rm -fr conftest*
9038   samba_cv_HAVE_UNSIGNED_CHAR=no
9039 fi
9040 rm -fr conftest*
9041 fi
9042
9043 fi
9044
9045 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9046 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9047     cat >> confdefs.h <<\EOF
9048 #define HAVE_UNSIGNED_CHAR 1
9049 EOF
9050
9051 fi
9052
9053 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9054 echo "configure:9055: checking for sin_len in sock" >&5
9055 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9056   echo $ac_n "(cached) $ac_c" 1>&6
9057 else
9058   
9059 cat > conftest.$ac_ext <<EOF
9060 #line 9061 "configure"
9061 #include "confdefs.h"
9062 #include <sys/types.h>
9063 #include <sys/socket.h>
9064 #include <netinet/in.h>
9065 int main() {
9066 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9067 ; return 0; }
9068 EOF
9069 if { (eval echo configure:9070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9070   rm -rf conftest*
9071   samba_cv_HAVE_SOCK_SIN_LEN=yes
9072 else
9073   echo "configure: failed program was:" >&5
9074   cat conftest.$ac_ext >&5
9075   rm -rf conftest*
9076   samba_cv_HAVE_SOCK_SIN_LEN=no
9077 fi
9078 rm -f conftest*
9079 fi
9080
9081 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9082 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9083     cat >> confdefs.h <<\EOF
9084 #define HAVE_SOCK_SIN_LEN 1
9085 EOF
9086
9087 fi
9088
9089 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9090 echo "configure:9091: checking whether seekdir returns void" >&5
9091 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9092   echo $ac_n "(cached) $ac_c" 1>&6
9093 else
9094   
9095 cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098 #include <sys/types.h>
9099 #include <dirent.h>
9100 void seekdir(DIR *d, long loc) { return; }
9101 int main() {
9102 return 0;
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_SEEKDIR_RETURNS_VOID=yes
9108 else
9109   echo "configure: failed program was:" >&5
9110   cat conftest.$ac_ext >&5
9111   rm -rf conftest*
9112   samba_cv_SEEKDIR_RETURNS_VOID=no
9113 fi
9114 rm -f conftest*
9115 fi
9116
9117 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9118 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9119     cat >> confdefs.h <<\EOF
9120 #define SEEKDIR_RETURNS_VOID 1
9121 EOF
9122
9123 fi
9124
9125 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9126 echo "configure:9127: checking for __FILE__ macro" >&5
9127 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_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", __FILE__);
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_FILE_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_FILE_MACRO=no
9147 fi
9148 rm -f conftest*
9149 fi
9150
9151 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9152 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9153     cat >> confdefs.h <<\EOF
9154 #define HAVE_FILE_MACRO 1
9155 EOF
9156
9157 fi
9158
9159 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9160 echo "configure:9161: checking for __FUNCTION__ macro" >&5
9161 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9162   echo $ac_n "(cached) $ac_c" 1>&6
9163 else
9164   
9165 cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 #include <stdio.h>
9169 int main() {
9170 printf("%s\n", __FUNCTION__);
9171 ; return 0; }
9172 EOF
9173 if { (eval echo configure:9174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9174   rm -rf conftest*
9175   samba_cv_HAVE_FUNCTION_MACRO=yes
9176 else
9177   echo "configure: failed program was:" >&5
9178   cat conftest.$ac_ext >&5
9179   rm -rf conftest*
9180   samba_cv_HAVE_FUNCTION_MACRO=no
9181 fi
9182 rm -f conftest*
9183 fi
9184
9185 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9186 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9187     cat >> confdefs.h <<\EOF
9188 #define HAVE_FUNCTION_MACRO 1
9189 EOF
9190
9191 fi
9192
9193 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9194 echo "configure:9195: checking if gettimeofday takes tz argument" >&5
9195 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9196   echo $ac_n "(cached) $ac_c" 1>&6
9197 else
9198   
9199 if test "$cross_compiling" = yes; then
9200   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9201 else
9202   cat > conftest.$ac_ext <<EOF
9203 #line 9204 "configure"
9204 #include "confdefs.h"
9205
9206 #include <sys/time.h>
9207 #include <unistd.h>
9208 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9209 EOF
9210 if { (eval echo configure:9211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9211 then
9212   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9213 else
9214   echo "configure: failed program was:" >&5
9215   cat conftest.$ac_ext >&5
9216   rm -fr conftest*
9217   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9218 fi
9219 rm -fr conftest*
9220 fi
9221
9222 fi
9223
9224 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9225 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9226     cat >> confdefs.h <<\EOF
9227 #define HAVE_GETTIMEOFDAY_TZ 1
9228 EOF
9229
9230 fi
9231
9232 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9233 echo "configure:9234: checking for C99 vsnprintf" >&5
9234 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9235   echo $ac_n "(cached) $ac_c" 1>&6
9236 else
9237   
9238 if test "$cross_compiling" = yes; then
9239   samba_cv_HAVE_C99_VSNPRINTF=cross
9240 else
9241   cat > conftest.$ac_ext <<EOF
9242 #line 9243 "configure"
9243 #include "confdefs.h"
9244
9245 #include <sys/types.h>
9246 #include <stdarg.h>
9247 void foo(const char *format, ...) { 
9248        va_list ap;
9249        int len;
9250        char buf[5];
9251
9252        va_start(ap, format);
9253        len = vsnprintf(0, 0, format, ap);
9254        va_end(ap);
9255        if (len != 5) exit(1);
9256
9257        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9258
9259        exit(0);
9260 }
9261 main() { foo("hello"); }
9262
9263 EOF
9264 if { (eval echo configure:9265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9265 then
9266   samba_cv_HAVE_C99_VSNPRINTF=yes
9267 else
9268   echo "configure: failed program was:" >&5
9269   cat conftest.$ac_ext >&5
9270   rm -fr conftest*
9271   samba_cv_HAVE_C99_VSNPRINTF=no
9272 fi
9273 rm -fr conftest*
9274 fi
9275
9276 fi
9277
9278 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9279 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9280     cat >> confdefs.h <<\EOF
9281 #define HAVE_C99_VSNPRINTF 1
9282 EOF
9283
9284 fi
9285
9286 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9287 echo "configure:9288: checking for broken readdir" >&5
9288 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9289   echo $ac_n "(cached) $ac_c" 1>&6
9290 else
9291   
9292 if test "$cross_compiling" = yes; then
9293   samba_cv_HAVE_BROKEN_READDIR=cross
9294 else
9295   cat > conftest.$ac_ext <<EOF
9296 #line 9297 "configure"
9297 #include "confdefs.h"
9298 #include <sys/types.h>
9299 #include <dirent.h>
9300 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9301 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9302 di->d_name[0] == 0) exit(0); exit(1);} 
9303 EOF
9304 if { (eval echo configure:9305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9305 then
9306   samba_cv_HAVE_BROKEN_READDIR=yes
9307 else
9308   echo "configure: failed program was:" >&5
9309   cat conftest.$ac_ext >&5
9310   rm -fr conftest*
9311   samba_cv_HAVE_BROKEN_READDIR=no
9312 fi
9313 rm -fr conftest*
9314 fi
9315
9316 fi
9317
9318 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9319 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9320     cat >> confdefs.h <<\EOF
9321 #define HAVE_BROKEN_READDIR 1
9322 EOF
9323
9324 fi
9325
9326 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9327 echo "configure:9328: checking for utimbuf" >&5
9328 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9329   echo $ac_n "(cached) $ac_c" 1>&6
9330 else
9331   
9332 cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335 #include <sys/types.h>
9336 #include <utime.h>
9337 int main() {
9338 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9339 ; return 0; }
9340 EOF
9341 if { (eval echo configure:9342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9342   rm -rf conftest*
9343   samba_cv_HAVE_UTIMBUF=yes
9344 else
9345   echo "configure: failed program was:" >&5
9346   cat conftest.$ac_ext >&5
9347   rm -rf conftest*
9348   samba_cv_HAVE_UTIMBUF=no
9349 fi
9350 rm -f conftest*
9351 fi
9352
9353 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9354 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9355     cat >> confdefs.h <<\EOF
9356 #define HAVE_UTIMBUF 1
9357 EOF
9358
9359 fi
9360
9361
9362 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9363 do
9364 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9365 echo "configure:9366: checking for $ac_func" >&5
9366 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9367   echo $ac_n "(cached) $ac_c" 1>&6
9368 else
9369   cat > conftest.$ac_ext <<EOF
9370 #line 9371 "configure"
9371 #include "confdefs.h"
9372 /* System header to define __stub macros and hopefully few prototypes,
9373     which can conflict with char $ac_func(); below.  */
9374 #include <assert.h>
9375 /* Override any gcc2 internal prototype to avoid an error.  */
9376 /* We use char because int might match the return type of a gcc2
9377     builtin and then its argument prototype would still apply.  */
9378 char $ac_func();
9379
9380 int main() {
9381
9382 /* The GNU C library defines this for functions which it implements
9383     to always fail with ENOSYS.  Some functions are actually named
9384     something starting with __ and the normal name is an alias.  */
9385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9386 choke me
9387 #else
9388 $ac_func();
9389 #endif
9390
9391 ; return 0; }
9392 EOF
9393 if { (eval echo configure:9394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9394   rm -rf conftest*
9395   eval "ac_cv_func_$ac_func=yes"
9396 else
9397   echo "configure: failed program was:" >&5
9398   cat conftest.$ac_ext >&5
9399   rm -rf conftest*
9400   eval "ac_cv_func_$ac_func=no"
9401 fi
9402 rm -f conftest*
9403 fi
9404
9405 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9406   echo "$ac_t""yes" 1>&6
9407     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9408   cat >> confdefs.h <<EOF
9409 #define $ac_tr_func 1
9410 EOF
9411  
9412 else
9413   echo "$ac_t""no" 1>&6
9414 fi
9415 done
9416
9417
9418 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9419 echo "configure:9420: checking for ut_name in utmp" >&5
9420 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9421   echo $ac_n "(cached) $ac_c" 1>&6
9422 else
9423   
9424 cat > conftest.$ac_ext <<EOF
9425 #line 9426 "configure"
9426 #include "confdefs.h"
9427 #include <sys/types.h>
9428 #include <utmp.h>
9429 int main() {
9430 struct utmp ut;  ut.ut_name[0] = 'a';
9431 ; return 0; }
9432 EOF
9433 if { (eval echo configure:9434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9434   rm -rf conftest*
9435   samba_cv_HAVE_UT_UT_NAME=yes
9436 else
9437   echo "configure: failed program was:" >&5
9438   cat conftest.$ac_ext >&5
9439   rm -rf conftest*
9440   samba_cv_HAVE_UT_UT_NAME=no
9441 fi
9442 rm -f conftest*
9443 fi
9444
9445 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9446 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9447     cat >> confdefs.h <<\EOF
9448 #define HAVE_UT_UT_NAME 1
9449 EOF
9450
9451 fi 
9452
9453 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9454 echo "configure:9455: checking for ut_user in utmp" >&5
9455 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9456   echo $ac_n "(cached) $ac_c" 1>&6
9457 else
9458   
9459 cat > conftest.$ac_ext <<EOF
9460 #line 9461 "configure"
9461 #include "confdefs.h"
9462 #include <sys/types.h>
9463 #include <utmp.h>
9464 int main() {
9465 struct utmp ut;  ut.ut_user[0] = 'a';
9466 ; return 0; }
9467 EOF
9468 if { (eval echo configure:9469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9469   rm -rf conftest*
9470   samba_cv_HAVE_UT_UT_USER=yes
9471 else
9472   echo "configure: failed program was:" >&5
9473   cat conftest.$ac_ext >&5
9474   rm -rf conftest*
9475   samba_cv_HAVE_UT_UT_USER=no
9476 fi
9477 rm -f conftest*
9478 fi
9479
9480 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9481 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9482     cat >> confdefs.h <<\EOF
9483 #define HAVE_UT_UT_USER 1
9484 EOF
9485
9486 fi 
9487
9488 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9489 echo "configure:9490: checking for ut_id in utmp" >&5
9490 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9491   echo $ac_n "(cached) $ac_c" 1>&6
9492 else
9493   
9494 cat > conftest.$ac_ext <<EOF
9495 #line 9496 "configure"
9496 #include "confdefs.h"
9497 #include <sys/types.h>
9498 #include <utmp.h>
9499 int main() {
9500 struct utmp ut;  ut.ut_id[0] = 'a';
9501 ; return 0; }
9502 EOF
9503 if { (eval echo configure:9504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9504   rm -rf conftest*
9505   samba_cv_HAVE_UT_UT_ID=yes
9506 else
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -rf conftest*
9510   samba_cv_HAVE_UT_UT_ID=no
9511 fi
9512 rm -f conftest*
9513 fi
9514
9515 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9516 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9517     cat >> confdefs.h <<\EOF
9518 #define HAVE_UT_UT_ID 1
9519 EOF
9520
9521 fi 
9522
9523 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9524 echo "configure:9525: checking for ut_host in utmp" >&5
9525 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9526   echo $ac_n "(cached) $ac_c" 1>&6
9527 else
9528   
9529 cat > conftest.$ac_ext <<EOF
9530 #line 9531 "configure"
9531 #include "confdefs.h"
9532 #include <sys/types.h>
9533 #include <utmp.h>
9534 int main() {
9535 struct utmp ut;  ut.ut_host[0] = 'a';
9536 ; return 0; }
9537 EOF
9538 if { (eval echo configure:9539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9539   rm -rf conftest*
9540   samba_cv_HAVE_UT_UT_HOST=yes
9541 else
9542   echo "configure: failed program was:" >&5
9543   cat conftest.$ac_ext >&5
9544   rm -rf conftest*
9545   samba_cv_HAVE_UT_UT_HOST=no
9546 fi
9547 rm -f conftest*
9548 fi
9549
9550 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9551 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9552     cat >> confdefs.h <<\EOF
9553 #define HAVE_UT_UT_HOST 1
9554 EOF
9555
9556 fi 
9557
9558 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9559 echo "configure:9560: checking for ut_time in utmp" >&5
9560 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9561   echo $ac_n "(cached) $ac_c" 1>&6
9562 else
9563   
9564 cat > conftest.$ac_ext <<EOF
9565 #line 9566 "configure"
9566 #include "confdefs.h"
9567 #include <sys/types.h>
9568 #include <utmp.h>
9569 int main() {
9570 struct utmp ut;  time_t t; ut.ut_time = t;
9571 ; return 0; }
9572 EOF
9573 if { (eval echo configure:9574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9574   rm -rf conftest*
9575   samba_cv_HAVE_UT_UT_TIME=yes
9576 else
9577   echo "configure: failed program was:" >&5
9578   cat conftest.$ac_ext >&5
9579   rm -rf conftest*
9580   samba_cv_HAVE_UT_UT_TIME=no
9581 fi
9582 rm -f conftest*
9583 fi
9584
9585 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9586 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9587     cat >> confdefs.h <<\EOF
9588 #define HAVE_UT_UT_TIME 1
9589 EOF
9590
9591 fi 
9592
9593 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9594 echo "configure:9595: checking for ut_tv in utmp" >&5
9595 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9596   echo $ac_n "(cached) $ac_c" 1>&6
9597 else
9598   
9599 cat > conftest.$ac_ext <<EOF
9600 #line 9601 "configure"
9601 #include "confdefs.h"
9602 #include <sys/types.h>
9603 #include <utmp.h>
9604 int main() {
9605 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9606 ; return 0; }
9607 EOF
9608 if { (eval echo configure:9609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9609   rm -rf conftest*
9610   samba_cv_HAVE_UT_UT_TV=yes
9611 else
9612   echo "configure: failed program was:" >&5
9613   cat conftest.$ac_ext >&5
9614   rm -rf conftest*
9615   samba_cv_HAVE_UT_UT_TV=no
9616 fi
9617 rm -f conftest*
9618 fi
9619
9620 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9621 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9622     cat >> confdefs.h <<\EOF
9623 #define HAVE_UT_UT_TV 1
9624 EOF
9625
9626 fi 
9627
9628 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9629 echo "configure:9630: checking for ut_type in utmp" >&5
9630 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9631   echo $ac_n "(cached) $ac_c" 1>&6
9632 else
9633   
9634 cat > conftest.$ac_ext <<EOF
9635 #line 9636 "configure"
9636 #include "confdefs.h"
9637 #include <sys/types.h>
9638 #include <utmp.h>
9639 int main() {
9640 struct utmp ut;  ut.ut_type = 0;
9641 ; return 0; }
9642 EOF
9643 if { (eval echo configure:9644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9644   rm -rf conftest*
9645   samba_cv_HAVE_UT_UT_TYPE=yes
9646 else
9647   echo "configure: failed program was:" >&5
9648   cat conftest.$ac_ext >&5
9649   rm -rf conftest*
9650   samba_cv_HAVE_UT_UT_TYPE=no
9651 fi
9652 rm -f conftest*
9653 fi
9654
9655 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9656 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9657     cat >> confdefs.h <<\EOF
9658 #define HAVE_UT_UT_TYPE 1
9659 EOF
9660
9661 fi 
9662
9663 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9664 echo "configure:9665: checking for ut_pid in utmp" >&5
9665 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9666   echo $ac_n "(cached) $ac_c" 1>&6
9667 else
9668   
9669 cat > conftest.$ac_ext <<EOF
9670 #line 9671 "configure"
9671 #include "confdefs.h"
9672 #include <sys/types.h>
9673 #include <utmp.h>
9674 int main() {
9675 struct utmp ut;  ut.ut_pid = 0;
9676 ; return 0; }
9677 EOF
9678 if { (eval echo configure:9679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9679   rm -rf conftest*
9680   samba_cv_HAVE_UT_UT_PID=yes
9681 else
9682   echo "configure: failed program was:" >&5
9683   cat conftest.$ac_ext >&5
9684   rm -rf conftest*
9685   samba_cv_HAVE_UT_UT_PID=no
9686 fi
9687 rm -f conftest*
9688 fi
9689
9690 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9691 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9692     cat >> confdefs.h <<\EOF
9693 #define HAVE_UT_UT_PID 1
9694 EOF
9695
9696 fi 
9697
9698 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9699 echo "configure:9700: checking for ut_exit in utmp" >&5
9700 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9701   echo $ac_n "(cached) $ac_c" 1>&6
9702 else
9703   
9704 cat > conftest.$ac_ext <<EOF
9705 #line 9706 "configure"
9706 #include "confdefs.h"
9707 #include <sys/types.h>
9708 #include <utmp.h>
9709 int main() {
9710 struct utmp ut;  ut.ut_exit.e_exit = 0;
9711 ; return 0; }
9712 EOF
9713 if { (eval echo configure:9714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9714   rm -rf conftest*
9715   samba_cv_HAVE_UT_UT_EXIT=yes
9716 else
9717   echo "configure: failed program was:" >&5
9718   cat conftest.$ac_ext >&5
9719   rm -rf conftest*
9720   samba_cv_HAVE_UT_UT_EXIT=no
9721 fi
9722 rm -f conftest*
9723 fi
9724
9725 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9726 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9727     cat >> confdefs.h <<\EOF
9728 #define HAVE_UT_UT_EXIT 1
9729 EOF
9730
9731 fi 
9732
9733 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9734 echo "configure:9735: checking for ut_addr in utmp" >&5
9735 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9736   echo $ac_n "(cached) $ac_c" 1>&6
9737 else
9738   
9739 cat > conftest.$ac_ext <<EOF
9740 #line 9741 "configure"
9741 #include "confdefs.h"
9742 #include <sys/types.h>
9743 #include <utmp.h>
9744 int main() {
9745 struct utmp ut;  ut.ut_addr = 0;
9746 ; return 0; }
9747 EOF
9748 if { (eval echo configure:9749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9749   rm -rf conftest*
9750   samba_cv_HAVE_UT_UT_ADDR=yes
9751 else
9752   echo "configure: failed program was:" >&5
9753   cat conftest.$ac_ext >&5
9754   rm -rf conftest*
9755   samba_cv_HAVE_UT_UT_ADDR=no
9756 fi
9757 rm -f conftest*
9758 fi
9759
9760 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9761 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9762     cat >> confdefs.h <<\EOF
9763 #define HAVE_UT_UT_ADDR 1
9764 EOF
9765
9766 fi 
9767
9768 if test x$ac_cv_func_pututline = xyes ; then
9769   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9770 echo "configure:9771: checking whether pututline returns pointer" >&5
9771 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9772   echo $ac_n "(cached) $ac_c" 1>&6
9773 else
9774   
9775   cat > conftest.$ac_ext <<EOF
9776 #line 9777 "configure"
9777 #include "confdefs.h"
9778 #include <sys/types.h>
9779 #include <utmp.h>
9780 int main() {
9781 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9782 ; return 0; }
9783 EOF
9784 if { (eval echo configure:9785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9785   rm -rf conftest*
9786   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9787 else
9788   echo "configure: failed program was:" >&5
9789   cat conftest.$ac_ext >&5
9790   rm -rf conftest*
9791   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9792 fi
9793 rm -f conftest*
9794 fi
9795
9796 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9797   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9798       cat >> confdefs.h <<\EOF
9799 #define PUTUTLINE_RETURNS_UTMP 1
9800 EOF
9801
9802   fi
9803 fi
9804
9805 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9806 echo "configure:9807: checking for ut_syslen in utmpx" >&5
9807 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9808   echo $ac_n "(cached) $ac_c" 1>&6
9809 else
9810   
9811 cat > conftest.$ac_ext <<EOF
9812 #line 9813 "configure"
9813 #include "confdefs.h"
9814 #include <sys/types.h>
9815 #include <utmpx.h>
9816 int main() {
9817 struct utmpx ux;  ux.ut_syslen = 0;
9818 ; return 0; }
9819 EOF
9820 if { (eval echo configure:9821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9821   rm -rf conftest*
9822   samba_cv_HAVE_UX_UT_SYSLEN=yes
9823 else
9824   echo "configure: failed program was:" >&5
9825   cat conftest.$ac_ext >&5
9826   rm -rf conftest*
9827   samba_cv_HAVE_UX_UT_SYSLEN=no
9828 fi
9829 rm -f conftest*
9830 fi
9831
9832 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9833 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9834     cat >> confdefs.h <<\EOF
9835 #define HAVE_UX_UT_SYSLEN 1
9836 EOF
9837
9838 fi 
9839
9840
9841 #################################################
9842 # check for libiconv support
9843 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9844 echo "configure:9845: checking whether to use libiconv" >&5
9845 # Check whether --with-libiconv or --without-libiconv was given.
9846 if test "${with_libiconv+set}" = set; then
9847   withval="$with_libiconv"
9848    case "$withval" in
9849   no)
9850     echo "$ac_t""no" 1>&6
9851     ;;
9852   *)
9853     echo "$ac_t""yes" 1>&6
9854     CFLAGS="$CFLAGS -I$withval/include"
9855     LDFLAGS="$LDFLAGS -L$withval/lib"
9856     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9857 echo "configure:9858: checking for iconv_open in -liconv" >&5
9858 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9859 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9860   echo $ac_n "(cached) $ac_c" 1>&6
9861 else
9862   ac_save_LIBS="$LIBS"
9863 LIBS="-liconv  $LIBS"
9864 cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867 /* Override any gcc2 internal prototype to avoid an error.  */
9868 /* We use char because int might match the return type of a gcc2
9869     builtin and then its argument prototype would still apply.  */
9870 char iconv_open();
9871
9872 int main() {
9873 iconv_open()
9874 ; return 0; }
9875 EOF
9876 if { (eval echo configure:9877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9877   rm -rf conftest*
9878   eval "ac_cv_lib_$ac_lib_var=yes"
9879 else
9880   echo "configure: failed program was:" >&5
9881   cat conftest.$ac_ext >&5
9882   rm -rf conftest*
9883   eval "ac_cv_lib_$ac_lib_var=no"
9884 fi
9885 rm -f conftest*
9886 LIBS="$ac_save_LIBS"
9887
9888 fi
9889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9890   echo "$ac_t""yes" 1>&6
9891     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9892     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9893   cat >> confdefs.h <<EOF
9894 #define $ac_tr_lib 1
9895 EOF
9896
9897   LIBS="-liconv $LIBS"
9898
9899 else
9900   echo "$ac_t""no" 1>&6
9901 fi
9902
9903     cat >> confdefs.h <<EOF
9904 #define WITH_LIBICONV "${withval}"
9905 EOF
9906
9907     ;;
9908   esac 
9909 else
9910   echo "$ac_t""no" 1>&6
9911
9912 fi
9913
9914
9915
9916 ############
9917 # check for iconv in libc
9918 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9919 echo "configure:9920: checking for working iconv" >&5
9920 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9921   echo $ac_n "(cached) $ac_c" 1>&6
9922 else
9923   
9924 if test "$cross_compiling" = yes; then
9925   samba_cv_HAVE_NATIVE_ICONV=cross
9926 else
9927   cat > conftest.$ac_ext <<EOF
9928 #line 9929 "configure"
9929 #include "confdefs.h"
9930
9931 #include <iconv.h>
9932 main() {
9933        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9934        if (cd == 0 || cd == (iconv_t)-1) return -1;
9935        return 0;
9936 }
9937
9938 EOF
9939 if { (eval echo configure:9940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9940 then
9941   samba_cv_HAVE_NATIVE_ICONV=yes
9942 else
9943   echo "configure: failed program was:" >&5
9944   cat conftest.$ac_ext >&5
9945   rm -fr conftest*
9946   samba_cv_HAVE_NATIVE_ICONV=no
9947 fi
9948 rm -fr conftest*
9949 fi
9950
9951 fi
9952
9953 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9954 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9955     cat >> confdefs.h <<\EOF
9956 #define HAVE_NATIVE_ICONV 1
9957 EOF
9958
9959 fi
9960
9961
9962 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9963 echo "configure:9964: checking for Linux kernel oplocks" >&5
9964 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9965   echo $ac_n "(cached) $ac_c" 1>&6
9966 else
9967   
9968 if test "$cross_compiling" = yes; then
9969   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9970 else
9971   cat > conftest.$ac_ext <<EOF
9972 #line 9973 "configure"
9973 #include "confdefs.h"
9974
9975 #include <sys/types.h>
9976 #include <fcntl.h>
9977 #ifndef F_GETLEASE
9978 #define F_GETLEASE      1025
9979 #endif
9980 main() {
9981        int fd = open("/dev/null", O_RDONLY);
9982        return fcntl(fd, F_GETLEASE, 0) == -1;
9983 }
9984
9985 EOF
9986 if { (eval echo configure:9987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9987 then
9988   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9989 else
9990   echo "configure: failed program was:" >&5
9991   cat conftest.$ac_ext >&5
9992   rm -fr conftest*
9993   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9994 fi
9995 rm -fr conftest*
9996 fi
9997
9998 fi
9999
10000 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10001 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10002     cat >> confdefs.h <<\EOF
10003 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10004 EOF
10005
10006 fi
10007
10008 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10009 echo "configure:10010: checking for kernel change notify support" >&5
10010 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10011   echo $ac_n "(cached) $ac_c" 1>&6
10012 else
10013   
10014 if test "$cross_compiling" = yes; then
10015   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10016 else
10017   cat > conftest.$ac_ext <<EOF
10018 #line 10019 "configure"
10019 #include "confdefs.h"
10020
10021 #include <sys/types.h>
10022 #include <fcntl.h>
10023 #include <signal.h>
10024 #ifndef F_NOTIFY
10025 #define F_NOTIFY 1026
10026 #endif
10027 main() {
10028         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10029 }
10030
10031 EOF
10032 if { (eval echo configure:10033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10033 then
10034   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10035 else
10036   echo "configure: failed program was:" >&5
10037   cat conftest.$ac_ext >&5
10038   rm -fr conftest*
10039   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10040 fi
10041 rm -fr conftest*
10042 fi
10043
10044 fi
10045
10046 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10047 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10048     cat >> confdefs.h <<\EOF
10049 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10050 EOF
10051
10052 fi
10053
10054 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10055 echo "configure:10056: checking for kernel share modes" >&5
10056 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   
10060 if test "$cross_compiling" = yes; then
10061   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10062 else
10063   cat > conftest.$ac_ext <<EOF
10064 #line 10065 "configure"
10065 #include "confdefs.h"
10066
10067 #include <sys/types.h>
10068 #include <fcntl.h>
10069 #include <signal.h>
10070 #include <sys/file.h>
10071 #ifndef LOCK_MAND
10072 #define LOCK_MAND       32
10073 #define LOCK_READ       64
10074 #endif
10075 main() {
10076         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10077 }
10078
10079 EOF
10080 if { (eval echo configure:10081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10081 then
10082   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10083 else
10084   echo "configure: failed program was:" >&5
10085   cat conftest.$ac_ext >&5
10086   rm -fr conftest*
10087   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10088 fi
10089 rm -fr conftest*
10090 fi
10091
10092 fi
10093
10094 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10095 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10096     cat >> confdefs.h <<\EOF
10097 #define HAVE_KERNEL_SHARE_MODES 1
10098 EOF
10099
10100 fi
10101
10102
10103
10104
10105 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10106 echo "configure:10107: checking for IRIX kernel oplock type definitions" >&5
10107 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10108   echo $ac_n "(cached) $ac_c" 1>&6
10109 else
10110   
10111 cat > conftest.$ac_ext <<EOF
10112 #line 10113 "configure"
10113 #include "confdefs.h"
10114 #include <sys/types.h>
10115 #include <fcntl.h>
10116 int main() {
10117 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10118 ; return 0; }
10119 EOF
10120 if { (eval echo configure:10121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10121   rm -rf conftest*
10122   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10123 else
10124   echo "configure: failed program was:" >&5
10125   cat conftest.$ac_ext >&5
10126   rm -rf conftest*
10127   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10128 fi
10129 rm -f conftest*
10130 fi
10131
10132 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10133 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10134     cat >> confdefs.h <<\EOF
10135 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10136 EOF
10137
10138 fi
10139
10140 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10141 echo "configure:10142: checking for irix specific capabilities" >&5
10142 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10143   echo $ac_n "(cached) $ac_c" 1>&6
10144 else
10145   
10146 if test "$cross_compiling" = yes; then
10147   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10148 else
10149   cat > conftest.$ac_ext <<EOF
10150 #line 10151 "configure"
10151 #include "confdefs.h"
10152 #include <sys/types.h>
10153 #include <sys/capability.h>
10154 main() {
10155  cap_t cap;
10156  if ((cap = cap_get_proc()) == NULL)
10157    exit(1);
10158  cap->cap_effective |= CAP_NETWORK_MGT;
10159  cap->cap_inheritable |= CAP_NETWORK_MGT;
10160  cap_set_proc(cap);
10161  exit(0);
10162 }
10163
10164 EOF
10165 if { (eval echo configure:10166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10166 then
10167   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10168 else
10169   echo "configure: failed program was:" >&5
10170   cat conftest.$ac_ext >&5
10171   rm -fr conftest*
10172   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10173 fi
10174 rm -fr conftest*
10175 fi
10176
10177 fi
10178
10179 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10180 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10181     cat >> confdefs.h <<\EOF
10182 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10183 EOF
10184
10185 fi
10186
10187 #
10188 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10189 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10190 #
10191
10192 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10193 echo "configure:10194: checking for int16 typedef included by rpc/rpc.h" >&5
10194 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10195   echo $ac_n "(cached) $ac_c" 1>&6
10196 else
10197   
10198 cat > conftest.$ac_ext <<EOF
10199 #line 10200 "configure"
10200 #include "confdefs.h"
10201 #include <sys/types.h>
10202 #if defined(HAVE_RPC_RPC_H)
10203 #include <rpc/rpc.h>
10204 #endif
10205 int main() {
10206 int16 testvar;
10207 ; return 0; }
10208 EOF
10209 if { (eval echo configure:10210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10210   rm -rf conftest*
10211   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10212 else
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -rf conftest*
10216   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10217 fi
10218 rm -f conftest*
10219 fi
10220
10221 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10222 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10223     cat >> confdefs.h <<\EOF
10224 #define HAVE_INT16_FROM_RPC_RPC_H 1
10225 EOF
10226
10227 fi
10228
10229 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10230 echo "configure:10231: checking for uint16 typedef included by rpc/rpc.h" >&5
10231 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10232   echo $ac_n "(cached) $ac_c" 1>&6
10233 else
10234   
10235 cat > conftest.$ac_ext <<EOF
10236 #line 10237 "configure"
10237 #include "confdefs.h"
10238 #include <sys/types.h>
10239 #if defined(HAVE_RPC_RPC_H)
10240 #include <rpc/rpc.h>
10241 #endif
10242 int main() {
10243 uint16 testvar;
10244 ; return 0; }
10245 EOF
10246 if { (eval echo configure:10247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10247   rm -rf conftest*
10248   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10249 else
10250   echo "configure: failed program was:" >&5
10251   cat conftest.$ac_ext >&5
10252   rm -rf conftest*
10253   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10254 fi
10255 rm -f conftest*
10256 fi
10257
10258 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10259 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10260     cat >> confdefs.h <<\EOF
10261 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10262 EOF
10263
10264 fi
10265
10266 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10267 echo "configure:10268: checking for int32 typedef included by rpc/rpc.h" >&5
10268 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10269   echo $ac_n "(cached) $ac_c" 1>&6
10270 else
10271   
10272 cat > conftest.$ac_ext <<EOF
10273 #line 10274 "configure"
10274 #include "confdefs.h"
10275 #include <sys/types.h>
10276 #if defined(HAVE_RPC_RPC_H)
10277 #include <rpc/rpc.h>
10278 #endif
10279 int main() {
10280 int32 testvar;
10281 ; return 0; }
10282 EOF
10283 if { (eval echo configure:10284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10284   rm -rf conftest*
10285   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10286 else
10287   echo "configure: failed program was:" >&5
10288   cat conftest.$ac_ext >&5
10289   rm -rf conftest*
10290   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10291 fi
10292 rm -f conftest*
10293 fi
10294
10295 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10296 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10297     cat >> confdefs.h <<\EOF
10298 #define HAVE_INT32_FROM_RPC_RPC_H 1
10299 EOF
10300
10301 fi
10302
10303 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10304 echo "configure:10305: checking for uint32 typedef included by rpc/rpc.h" >&5
10305 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10306   echo $ac_n "(cached) $ac_c" 1>&6
10307 else
10308   
10309 cat > conftest.$ac_ext <<EOF
10310 #line 10311 "configure"
10311 #include "confdefs.h"
10312 #include <sys/types.h>
10313 #if defined(HAVE_RPC_RPC_H)
10314 #include <rpc/rpc.h>
10315 #endif
10316 int main() {
10317 uint32 testvar;
10318 ; return 0; }
10319 EOF
10320 if { (eval echo configure:10321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10321   rm -rf conftest*
10322   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10323 else
10324   echo "configure: failed program was:" >&5
10325   cat conftest.$ac_ext >&5
10326   rm -rf conftest*
10327   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10328 fi
10329 rm -f conftest*
10330 fi
10331
10332 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10333 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10334     cat >> confdefs.h <<\EOF
10335 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10336 EOF
10337
10338 fi
10339
10340
10341 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10342 echo "configure:10343: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10343 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10344   echo $ac_n "(cached) $ac_c" 1>&6
10345 else
10346   
10347 cat > conftest.$ac_ext <<EOF
10348 #line 10349 "configure"
10349 #include "confdefs.h"
10350 #include <sys/types.h>
10351 #ifdef HAVE_SYS_SECURITY_H
10352 #include <sys/security.h>
10353 #include <prot.h>
10354 #endif  /* HAVE_SYS_SECURITY_H */
10355 #if defined(HAVE_RPC_RPC_H)
10356 #include <rpc/rpc.h>
10357 #endif
10358 int main() {
10359 int testvar;
10360 ; return 0; }
10361 EOF
10362 if { (eval echo configure:10363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10363   rm -rf conftest*
10364   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10365 else
10366   echo "configure: failed program was:" >&5
10367   cat conftest.$ac_ext >&5
10368   rm -rf conftest*
10369   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10370 fi
10371 rm -f conftest*
10372 fi
10373
10374 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10375 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10376     cat >> confdefs.h <<\EOF
10377 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10378 EOF
10379
10380 fi
10381
10382 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10383 echo "configure:10384: checking for test routines" >&5
10384 if test "$cross_compiling" = yes; then
10385   echo "configure: warning: cannot run when cross-compiling" 1>&2
10386 else
10387   cat > conftest.$ac_ext <<EOF
10388 #line 10389 "configure"
10389 #include "confdefs.h"
10390 #include "${srcdir-.}/tests/trivial.c"
10391 EOF
10392 if { (eval echo configure:10393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10393 then
10394   echo "$ac_t""yes" 1>&6
10395 else
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -fr conftest*
10399   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10400 fi
10401 rm -fr conftest*
10402 fi
10403
10404
10405 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10406 echo "configure:10407: checking for ftruncate extend" >&5
10407 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10408   echo $ac_n "(cached) $ac_c" 1>&6
10409 else
10410   
10411 if test "$cross_compiling" = yes; then
10412   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10413 else
10414   cat > conftest.$ac_ext <<EOF
10415 #line 10416 "configure"
10416 #include "confdefs.h"
10417 #include "${srcdir-.}/tests/ftruncate.c"
10418 EOF
10419 if { (eval echo configure:10420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10420 then
10421   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10422 else
10423   echo "configure: failed program was:" >&5
10424   cat conftest.$ac_ext >&5
10425   rm -fr conftest*
10426   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10427 fi
10428 rm -fr conftest*
10429 fi
10430
10431 fi
10432
10433 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10434 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10435     cat >> confdefs.h <<\EOF
10436 #define HAVE_FTRUNCATE_EXTEND 1
10437 EOF
10438
10439 fi
10440
10441 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10442 echo "configure:10443: checking for AF_LOCAL socket support" >&5
10443 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10444   echo $ac_n "(cached) $ac_c" 1>&6
10445 else
10446   
10447 if test "$cross_compiling" = yes; then
10448   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10449 else
10450   cat > conftest.$ac_ext <<EOF
10451 #line 10452 "configure"
10452 #include "confdefs.h"
10453 #include "${srcdir-.}/tests/unixsock.c"
10454 EOF
10455 if { (eval echo configure:10456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10456 then
10457   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10458 else
10459   echo "configure: failed program was:" >&5
10460   cat conftest.$ac_ext >&5
10461   rm -fr conftest*
10462   samba_cv_HAVE_WORKING_AF_LOCAL=no
10463 fi
10464 rm -fr conftest*
10465 fi
10466
10467 fi
10468
10469 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10470 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10471 then
10472     cat >> confdefs.h <<\EOF
10473 #define HAVE_WORKING_AF_LOCAL 1
10474 EOF
10475
10476 fi
10477
10478 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10479 echo "configure:10480: checking for broken getgroups" >&5
10480 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10481   echo $ac_n "(cached) $ac_c" 1>&6
10482 else
10483   
10484 if test "$cross_compiling" = yes; then
10485   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10486 else
10487   cat > conftest.$ac_ext <<EOF
10488 #line 10489 "configure"
10489 #include "confdefs.h"
10490 #include "${srcdir-.}/tests/getgroups.c"
10491 EOF
10492 if { (eval echo configure:10493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10493 then
10494   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10495 else
10496   echo "configure: failed program was:" >&5
10497   cat conftest.$ac_ext >&5
10498   rm -fr conftest*
10499   samba_cv_HAVE_BROKEN_GETGROUPS=no
10500 fi
10501 rm -fr conftest*
10502 fi
10503
10504 fi
10505
10506 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10507 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10508     cat >> confdefs.h <<\EOF
10509 #define HAVE_BROKEN_GETGROUPS 1
10510 EOF
10511
10512 fi
10513
10514 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10515 echo "configure:10516: checking whether getpass should be replaced" >&5
10516 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10517   echo $ac_n "(cached) $ac_c" 1>&6
10518 else
10519   
10520 SAVE_CPPFLAGS="$CPPFLAGS"
10521 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10522 cat > conftest.$ac_ext <<EOF
10523 #line 10524 "configure"
10524 #include "confdefs.h"
10525
10526 #define REPLACE_GETPASS 1
10527 #define NO_CONFIG_H 1
10528 #define main dont_declare_main
10529 #include "${srcdir-.}/lib/getsmbpass.c"
10530 #undef main
10531
10532 int main() {
10533
10534 ; return 0; }
10535 EOF
10536 if { (eval echo configure:10537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10537   rm -rf conftest*
10538   samba_cv_REPLACE_GETPASS=yes
10539 else
10540   echo "configure: failed program was:" >&5
10541   cat conftest.$ac_ext >&5
10542   rm -rf conftest*
10543   samba_cv_REPLACE_GETPASS=no
10544 fi
10545 rm -f conftest*
10546 CPPFLAGS="$SAVE_CPPFLAGS"
10547
10548 fi
10549
10550 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10551 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10552         cat >> confdefs.h <<\EOF
10553 #define REPLACE_GETPASS 1
10554 EOF
10555
10556 fi
10557
10558 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10559 echo "configure:10560: checking for broken inet_ntoa" >&5
10560 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10561   echo $ac_n "(cached) $ac_c" 1>&6
10562 else
10563   
10564 if test "$cross_compiling" = yes; then
10565   samba_cv_REPLACE_INET_NTOA=cross
10566 else
10567   cat > conftest.$ac_ext <<EOF
10568 #line 10569 "configure"
10569 #include "confdefs.h"
10570
10571 #include <stdio.h>
10572 #include <sys/types.h>
10573 #include <netinet/in.h>
10574 #ifdef HAVE_ARPA_INET_H
10575 #include <arpa/inet.h>
10576 #endif
10577 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10578 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10579     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10580 exit(1);}
10581 EOF
10582 if { (eval echo configure:10583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10583 then
10584   samba_cv_REPLACE_INET_NTOA=yes
10585 else
10586   echo "configure: failed program was:" >&5
10587   cat conftest.$ac_ext >&5
10588   rm -fr conftest*
10589   samba_cv_REPLACE_INET_NTOA=no
10590 fi
10591 rm -fr conftest*
10592 fi
10593
10594 fi
10595
10596 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10597 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10598     cat >> confdefs.h <<\EOF
10599 #define REPLACE_INET_NTOA 1
10600 EOF
10601
10602 fi
10603
10604 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10605 echo "configure:10606: checking for secure mkstemp" >&5
10606 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10607   echo $ac_n "(cached) $ac_c" 1>&6
10608 else
10609   
10610 if test "$cross_compiling" = yes; then
10611   samba_cv_HAVE_SECURE_MKSTEMP=cross
10612 else
10613   cat > conftest.$ac_ext <<EOF
10614 #line 10615 "configure"
10615 #include "confdefs.h"
10616 #include <stdlib.h>
10617 #include <sys/types.h>
10618 #include <sys/stat.h>
10619 #include <unistd.h>
10620 main() { 
10621   struct stat st;
10622   char tpl[20]="/tmp/test.XXXXXX"; 
10623   int fd = mkstemp(tpl); 
10624   if (fd == -1) exit(1);
10625   unlink(tpl);
10626   if (fstat(fd, &st) != 0) exit(1);
10627   if ((st.st_mode & 0777) != 0600) exit(1);
10628   exit(0);
10629 }
10630 EOF
10631 if { (eval echo configure:10632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10632 then
10633   samba_cv_HAVE_SECURE_MKSTEMP=yes
10634 else
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -fr conftest*
10638   samba_cv_HAVE_SECURE_MKSTEMP=no
10639 fi
10640 rm -fr conftest*
10641 fi
10642
10643 fi
10644
10645 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10646 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10647     cat >> confdefs.h <<\EOF
10648 #define HAVE_SECURE_MKSTEMP 1
10649 EOF
10650
10651 fi
10652
10653 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10654 echo "configure:10655: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10655 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10656   echo $ac_n "(cached) $ac_c" 1>&6
10657 else
10658   
10659 if test "$cross_compiling" = yes; then
10660   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10661 else
10662   cat > conftest.$ac_ext <<EOF
10663 #line 10664 "configure"
10664 #include "confdefs.h"
10665 #include <unistd.h>
10666 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10667 EOF
10668 if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10669 then
10670   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10671 else
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -fr conftest*
10675   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10676 fi
10677 rm -fr conftest*
10678 fi
10679
10680 fi
10681
10682 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10683 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10684     cat >> confdefs.h <<\EOF
10685 #define SYSCONF_SC_NGROUPS_MAX 1
10686 EOF
10687
10688 fi
10689
10690 echo $ac_n "checking for root""... $ac_c" 1>&6
10691 echo "configure:10692: checking for root" >&5
10692 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10693   echo $ac_n "(cached) $ac_c" 1>&6
10694 else
10695   
10696 if test "$cross_compiling" = yes; then
10697   samba_cv_HAVE_ROOT=cross
10698 else
10699   cat > conftest.$ac_ext <<EOF
10700 #line 10701 "configure"
10701 #include "confdefs.h"
10702 main() { exit(getuid() != 0); }
10703 EOF
10704 if { (eval echo configure:10705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10705 then
10706   samba_cv_HAVE_ROOT=yes
10707 else
10708   echo "configure: failed program was:" >&5
10709   cat conftest.$ac_ext >&5
10710   rm -fr conftest*
10711   samba_cv_HAVE_ROOT=no
10712 fi
10713 rm -fr conftest*
10714 fi
10715
10716 fi
10717
10718 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10719 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10720     cat >> confdefs.h <<\EOF
10721 #define HAVE_ROOT 1
10722 EOF
10723
10724 else
10725     echo "configure: warning: running as non-root will disable some tests" 1>&2
10726 fi
10727
10728 ##################
10729 # look for a method of finding the list of network interfaces
10730 iface=no;
10731 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10732 echo "configure:10733: checking for iface AIX" >&5
10733 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10734   echo $ac_n "(cached) $ac_c" 1>&6
10735 else
10736   
10737 if test "$cross_compiling" = yes; then
10738   samba_cv_HAVE_IFACE_AIX=cross
10739 else
10740   cat > conftest.$ac_ext <<EOF
10741 #line 10742 "configure"
10742 #include "confdefs.h"
10743
10744 #define HAVE_IFACE_AIX 1
10745 #define AUTOCONF_TEST 1
10746 #include "confdefs.h"
10747 #include "${srcdir-.}/lib/interfaces.c"
10748 EOF
10749 if { (eval echo configure:10750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10750 then
10751   samba_cv_HAVE_IFACE_AIX=yes
10752 else
10753   echo "configure: failed program was:" >&5
10754   cat conftest.$ac_ext >&5
10755   rm -fr conftest*
10756   samba_cv_HAVE_IFACE_AIX=no
10757 fi
10758 rm -fr conftest*
10759 fi
10760
10761 fi
10762
10763 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10764 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10765     iface=yes;cat >> confdefs.h <<\EOF
10766 #define HAVE_IFACE_AIX 1
10767 EOF
10768
10769 fi
10770
10771 if test $iface = no; then
10772 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10773 echo "configure:10774: checking for iface ifconf" >&5
10774 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10775   echo $ac_n "(cached) $ac_c" 1>&6
10776 else
10777   
10778 if test "$cross_compiling" = yes; then
10779   samba_cv_HAVE_IFACE_IFCONF=cross
10780 else
10781   cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784
10785 #define HAVE_IFACE_IFCONF 1
10786 #define AUTOCONF_TEST 1
10787 #include "confdefs.h"
10788 #include "${srcdir-.}/lib/interfaces.c"
10789 EOF
10790 if { (eval echo configure:10791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10791 then
10792   samba_cv_HAVE_IFACE_IFCONF=yes
10793 else
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -fr conftest*
10797   samba_cv_HAVE_IFACE_IFCONF=no
10798 fi
10799 rm -fr conftest*
10800 fi
10801
10802 fi
10803
10804 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10805 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10806     iface=yes;cat >> confdefs.h <<\EOF
10807 #define HAVE_IFACE_IFCONF 1
10808 EOF
10809
10810 fi
10811 fi
10812
10813 if test $iface = no; then
10814 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10815 echo "configure:10816: checking for iface ifreq" >&5
10816 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10817   echo $ac_n "(cached) $ac_c" 1>&6
10818 else
10819   
10820 if test "$cross_compiling" = yes; then
10821   samba_cv_HAVE_IFACE_IFREQ=cross
10822 else
10823   cat > conftest.$ac_ext <<EOF
10824 #line 10825 "configure"
10825 #include "confdefs.h"
10826
10827 #define HAVE_IFACE_IFREQ 1
10828 #define AUTOCONF_TEST 1
10829 #include "confdefs.h"
10830 #include "${srcdir-.}/lib/interfaces.c"
10831 EOF
10832 if { (eval echo configure:10833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10833 then
10834   samba_cv_HAVE_IFACE_IFREQ=yes
10835 else
10836   echo "configure: failed program was:" >&5
10837   cat conftest.$ac_ext >&5
10838   rm -fr conftest*
10839   samba_cv_HAVE_IFACE_IFREQ=no
10840 fi
10841 rm -fr conftest*
10842 fi
10843
10844 fi
10845
10846 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10847 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10848     iface=yes;cat >> confdefs.h <<\EOF
10849 #define HAVE_IFACE_IFREQ 1
10850 EOF
10851
10852 fi
10853 fi
10854
10855
10856 ################################################
10857 # look for a method of setting the effective uid
10858 seteuid=no;
10859 if test $seteuid = no; then
10860 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10861 echo "configure:10862: checking for setresuid" >&5
10862 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10863   echo $ac_n "(cached) $ac_c" 1>&6
10864 else
10865   
10866 if test "$cross_compiling" = yes; then
10867   samba_cv_USE_SETRESUID=cross
10868 else
10869   cat > conftest.$ac_ext <<EOF
10870 #line 10871 "configure"
10871 #include "confdefs.h"
10872
10873 #define AUTOCONF_TEST 1
10874 #define USE_SETRESUID 1
10875 #include "confdefs.h"
10876 #include "${srcdir-.}/lib/util_sec.c"
10877 EOF
10878 if { (eval echo configure:10879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10879 then
10880   samba_cv_USE_SETRESUID=yes
10881 else
10882   echo "configure: failed program was:" >&5
10883   cat conftest.$ac_ext >&5
10884   rm -fr conftest*
10885   samba_cv_USE_SETRESUID=no
10886 fi
10887 rm -fr conftest*
10888 fi
10889
10890 fi
10891
10892 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10893 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10894     seteuid=yes;cat >> confdefs.h <<\EOF
10895 #define USE_SETRESUID 1
10896 EOF
10897
10898 fi
10899 fi
10900
10901
10902 if test $seteuid = no; then
10903 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10904 echo "configure:10905: checking for setreuid" >&5
10905 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10906   echo $ac_n "(cached) $ac_c" 1>&6
10907 else
10908   
10909 if test "$cross_compiling" = yes; then
10910   samba_cv_USE_SETREUID=cross
10911 else
10912   cat > conftest.$ac_ext <<EOF
10913 #line 10914 "configure"
10914 #include "confdefs.h"
10915
10916 #define AUTOCONF_TEST 1
10917 #define USE_SETREUID 1
10918 #include "confdefs.h"
10919 #include "${srcdir-.}/lib/util_sec.c"
10920 EOF
10921 if { (eval echo configure:10922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10922 then
10923   samba_cv_USE_SETREUID=yes
10924 else
10925   echo "configure: failed program was:" >&5
10926   cat conftest.$ac_ext >&5
10927   rm -fr conftest*
10928   samba_cv_USE_SETREUID=no
10929 fi
10930 rm -fr conftest*
10931 fi
10932
10933 fi
10934
10935 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10936 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10937     seteuid=yes;cat >> confdefs.h <<\EOF
10938 #define USE_SETREUID 1
10939 EOF
10940
10941 fi
10942 fi
10943
10944 if test $seteuid = no; then
10945 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10946 echo "configure:10947: checking for seteuid" >&5
10947 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10948   echo $ac_n "(cached) $ac_c" 1>&6
10949 else
10950   
10951 if test "$cross_compiling" = yes; then
10952   samba_cv_USE_SETEUID=cross
10953 else
10954   cat > conftest.$ac_ext <<EOF
10955 #line 10956 "configure"
10956 #include "confdefs.h"
10957
10958 #define AUTOCONF_TEST 1
10959 #define USE_SETEUID 1
10960 #include "confdefs.h"
10961 #include "${srcdir-.}/lib/util_sec.c"
10962 EOF
10963 if { (eval echo configure:10964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10964 then
10965   samba_cv_USE_SETEUID=yes
10966 else
10967   echo "configure: failed program was:" >&5
10968   cat conftest.$ac_ext >&5
10969   rm -fr conftest*
10970   samba_cv_USE_SETEUID=no
10971 fi
10972 rm -fr conftest*
10973 fi
10974
10975 fi
10976
10977 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10978 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10979     seteuid=yes;cat >> confdefs.h <<\EOF
10980 #define USE_SETEUID 1
10981 EOF
10982
10983 fi
10984 fi
10985
10986 if test $seteuid = no; then
10987 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10988 echo "configure:10989: checking for setuidx" >&5
10989 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10990   echo $ac_n "(cached) $ac_c" 1>&6
10991 else
10992   
10993 if test "$cross_compiling" = yes; then
10994   samba_cv_USE_SETUIDX=cross
10995 else
10996   cat > conftest.$ac_ext <<EOF
10997 #line 10998 "configure"
10998 #include "confdefs.h"
10999
11000 #define AUTOCONF_TEST 1
11001 #define USE_SETUIDX 1
11002 #include "confdefs.h"
11003 #include "${srcdir-.}/lib/util_sec.c"
11004 EOF
11005 if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11006 then
11007   samba_cv_USE_SETUIDX=yes
11008 else
11009   echo "configure: failed program was:" >&5
11010   cat conftest.$ac_ext >&5
11011   rm -fr conftest*
11012   samba_cv_USE_SETUIDX=no
11013 fi
11014 rm -fr conftest*
11015 fi
11016
11017 fi
11018
11019 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11020 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11021     seteuid=yes;cat >> confdefs.h <<\EOF
11022 #define USE_SETUIDX 1
11023 EOF
11024
11025 fi
11026 fi
11027
11028
11029 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11030 echo "configure:11031: checking for working mmap" >&5
11031 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11032   echo $ac_n "(cached) $ac_c" 1>&6
11033 else
11034   
11035 if test "$cross_compiling" = yes; then
11036   samba_cv_HAVE_MMAP=cross
11037 else
11038   cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 #include "${srcdir-.}/tests/shared_mmap.c"
11042 EOF
11043 if { (eval echo configure:11044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11044 then
11045   samba_cv_HAVE_MMAP=yes
11046 else
11047   echo "configure: failed program was:" >&5
11048   cat conftest.$ac_ext >&5
11049   rm -fr conftest*
11050   samba_cv_HAVE_MMAP=no
11051 fi
11052 rm -fr conftest*
11053 fi
11054
11055 fi
11056
11057 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11058 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11059     cat >> confdefs.h <<\EOF
11060 #define HAVE_MMAP 1
11061 EOF
11062
11063 fi
11064
11065 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11066 echo "configure:11067: checking for ftruncate needs root" >&5
11067 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   
11071 if test "$cross_compiling" = yes; then
11072   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11073 else
11074   cat > conftest.$ac_ext <<EOF
11075 #line 11076 "configure"
11076 #include "confdefs.h"
11077 #include "${srcdir-.}/tests/ftruncroot.c"
11078 EOF
11079 if { (eval echo configure:11080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11080 then
11081   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11082 else
11083   echo "configure: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   rm -fr conftest*
11086   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11087 fi
11088 rm -fr conftest*
11089 fi
11090
11091 fi
11092
11093 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11094 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11095     cat >> confdefs.h <<\EOF
11096 #define FTRUNCATE_NEEDS_ROOT 1
11097 EOF
11098
11099 fi
11100
11101 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11102 echo "configure:11103: checking for fcntl locking" >&5
11103 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11104   echo $ac_n "(cached) $ac_c" 1>&6
11105 else
11106   
11107 if test "$cross_compiling" = yes; then
11108   samba_cv_HAVE_FCNTL_LOCK=cross
11109 else
11110   cat > conftest.$ac_ext <<EOF
11111 #line 11112 "configure"
11112 #include "confdefs.h"
11113 #include "${srcdir-.}/tests/fcntl_lock.c"
11114 EOF
11115 if { (eval echo configure:11116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11116 then
11117   samba_cv_HAVE_FCNTL_LOCK=yes
11118 else
11119   echo "configure: failed program was:" >&5
11120   cat conftest.$ac_ext >&5
11121   rm -fr conftest*
11122   samba_cv_HAVE_FCNTL_LOCK=no
11123 fi
11124 rm -fr conftest*
11125 fi
11126
11127 fi
11128
11129 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11130 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11131     cat >> confdefs.h <<\EOF
11132 #define HAVE_FCNTL_LOCK 1
11133 EOF
11134
11135 fi
11136
11137 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11138 echo "configure:11139: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11139 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11140   echo $ac_n "(cached) $ac_c" 1>&6
11141 else
11142   
11143 if test "$cross_compiling" = yes; then
11144   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11145 else
11146   cat > conftest.$ac_ext <<EOF
11147 #line 11148 "configure"
11148 #include "confdefs.h"
11149 #include "${srcdir-.}/tests/fcntl_lock64.c"
11150 EOF
11151 if { (eval echo configure:11152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11152 then
11153   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11154 else
11155   echo "configure: failed program was:" >&5
11156   cat conftest.$ac_ext >&5
11157   rm -fr conftest*
11158   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11159 fi
11160 rm -fr conftest*
11161 fi
11162
11163 fi
11164
11165 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11166 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11167     cat >> confdefs.h <<\EOF
11168 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11169 EOF
11170
11171
11172 else
11173
11174
11175   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11176 echo "configure:11177: checking for 64 bit fcntl locking" >&5
11177 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11178   echo $ac_n "(cached) $ac_c" 1>&6
11179 else
11180   
11181   if test "$cross_compiling" = yes; then
11182   samba_cv_HAVE_STRUCT_FLOCK64=cross
11183 else
11184   cat > conftest.$ac_ext <<EOF
11185 #line 11186 "configure"
11186 #include "confdefs.h"
11187
11188 #if defined(HAVE_UNISTD_H)
11189 #include <unistd.h>
11190 #endif
11191 #include <stdio.h>
11192 #include <stdlib.h>
11193
11194 #ifdef HAVE_FCNTL_H
11195 #include <fcntl.h>
11196 #endif
11197
11198 #ifdef HAVE_SYS_FCNTL_H
11199 #include <sys/fcntl.h>
11200 #endif
11201 main() { struct flock64 fl64;
11202 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11203 exit(0);
11204 #else
11205 exit(1);
11206 #endif
11207 }
11208 EOF
11209 if { (eval echo configure:11210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11210 then
11211   samba_cv_HAVE_STRUCT_FLOCK64=yes
11212 else
11213   echo "configure: failed program was:" >&5
11214   cat conftest.$ac_ext >&5
11215   rm -fr conftest*
11216   samba_cv_HAVE_STRUCT_FLOCK64=no
11217 fi
11218 rm -fr conftest*
11219 fi
11220
11221 fi
11222
11223 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11224
11225   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11226       cat >> confdefs.h <<\EOF
11227 #define HAVE_STRUCT_FLOCK64 1
11228 EOF
11229
11230   fi
11231 fi
11232
11233
11234 case "$host_os" in
11235 *linux*)
11236 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11237 echo "configure:11238: checking for broken RedHat 7.2 system header files" >&5
11238 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11239   echo $ac_n "(cached) $ac_c" 1>&6
11240 else
11241   
11242 cat > conftest.$ac_ext <<EOF
11243 #line 11244 "configure"
11244 #include "confdefs.h"
11245
11246 #ifdef HAVE_SYS_VFS_H
11247 #include <sys/vfs.h>
11248 #endif
11249 #ifdef HAVE_SYS_CAPABILITY_H
11250 #include <sys/capability.h>
11251 #endif
11252
11253 int main() {
11254 int i;
11255 ; return 0; }
11256 EOF
11257 if { (eval echo configure:11258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11258   rm -rf conftest*
11259   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11260 else
11261   echo "configure: failed program was:" >&5
11262   cat conftest.$ac_ext >&5
11263   rm -rf conftest*
11264   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11265 fi
11266 rm -f conftest*
11267 fi
11268
11269 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11270 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11271    cat >> confdefs.h <<\EOF
11272 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11273 EOF
11274
11275 fi
11276 ;;
11277 esac
11278
11279 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11280 echo "configure:11281: checking for broken nisplus include files" >&5
11281 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11282   echo $ac_n "(cached) $ac_c" 1>&6
11283 else
11284   
11285 cat > conftest.$ac_ext <<EOF
11286 #line 11287 "configure"
11287 #include "confdefs.h"
11288 #include <sys/acl.h>
11289 #if defined(HAVE_RPCSVC_NIS_H)
11290 #include <rpcsvc/nis.h>
11291 #endif
11292 int main() {
11293 int i;
11294 ; return 0; }
11295 EOF
11296 if { (eval echo configure:11297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11297   rm -rf conftest*
11298   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11299 else
11300   echo "configure: failed program was:" >&5
11301   cat conftest.$ac_ext >&5
11302   rm -rf conftest*
11303   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11304 fi
11305 rm -f conftest*
11306 fi
11307
11308 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11309 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11310     cat >> confdefs.h <<\EOF
11311 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11312 EOF
11313
11314 fi
11315
11316
11317 #################################################
11318 # check for smbwrapper support
11319 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11320 echo "configure:11321: checking whether to use smbwrapper" >&5
11321 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11322 if test "${with_smbwrapper+set}" = set; then
11323   withval="$with_smbwrapper"
11324    case "$withval" in
11325   yes)
11326     echo "$ac_t""yes" 1>&6
11327     cat >> confdefs.h <<\EOF
11328 #define WITH_SMBWRAPPER 1
11329 EOF
11330
11331         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11332
11333         if test x$ATTEMPT_WRAP32_BUILD = x; then
11334                 WRAP32=""
11335         else
11336                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11337         fi
11338
11339 # Conditions under which smbwrapper should not be built.
11340
11341         if test x$PICFLAG = x; then
11342            echo No support for PIC code - disabling smbwrapper and smbsh
11343            WRAP=""
11344            WRAP32=""
11345         elif test x$ac_cv_func_syscall = xno; then
11346            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11347            WRAP=""
11348            WRAP32=""
11349         fi
11350     ;;
11351   *)
11352     echo "$ac_t""no" 1>&6
11353     ;;
11354   esac 
11355 else
11356   echo "$ac_t""no" 1>&6
11357
11358 fi
11359
11360
11361 #################################################
11362 # check for AFS clear-text auth support
11363 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11364 echo "configure:11365: checking whether to use AFS clear-text auth" >&5
11365 # Check whether --with-afs or --without-afs was given.
11366 if test "${with_afs+set}" = set; then
11367   withval="$with_afs"
11368    case "$withval" in
11369   yes)
11370     echo "$ac_t""yes" 1>&6
11371     cat >> confdefs.h <<\EOF
11372 #define WITH_AFS 1
11373 EOF
11374
11375     ;;
11376   *)
11377     echo "$ac_t""no" 1>&6
11378     ;;
11379   esac 
11380 else
11381   echo "$ac_t""no" 1>&6
11382
11383 fi
11384
11385
11386
11387 #################################################
11388 # check for the DFS clear-text auth system
11389 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11390 echo "configure:11391: checking whether to use DFS clear-text auth" >&5
11391 # Check whether --with-dfs or --without-dfs was given.
11392 if test "${with_dfs+set}" = set; then
11393   withval="$with_dfs"
11394    case "$withval" in
11395   yes)
11396     echo "$ac_t""yes" 1>&6
11397     cat >> confdefs.h <<\EOF
11398 #define WITH_DFS 1
11399 EOF
11400
11401     ;;
11402   *)
11403     echo "$ac_t""no" 1>&6
11404     ;;
11405   esac 
11406 else
11407   echo "$ac_t""no" 1>&6
11408
11409 fi
11410
11411
11412
11413 #################################################
11414 # see if this box has the RedHat location for kerberos
11415 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11416 echo "configure:11417: checking for /usr/kerberos" >&5
11417 if test -d /usr/kerberos; then
11418     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11419     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11420     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11421     echo "$ac_t""yes" 1>&6
11422 else
11423     echo "$ac_t""no" 1>&6
11424 fi
11425
11426 #################################################
11427 # check for location of Kerberos 5 install
11428 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11429 echo "configure:11430: checking for kerberos 5 install path" >&5
11430 # Check whether --with-krb5 or --without-krb5 was given.
11431 if test "${with_krb5+set}" = set; then
11432   withval="$with_krb5"
11433    case "$withval" in
11434   no)
11435     echo "$ac_t""no" 1>&6
11436     ;;
11437   *)
11438     echo "$ac_t""yes" 1>&6
11439     LIBS="$LIBS -lkrb5"
11440     CFLAGS="$CFLAGS -I$withval/include"
11441     CPPFLAGS="$CPPFLAGS -I$withval/include"
11442     LDFLAGS="$LDFLAGS -L$withval/lib"
11443     ;;
11444   esac 
11445 else
11446   echo "$ac_t""no" 1>&6
11447
11448 fi
11449
11450
11451 # now check for krb5.h. Some systems have the libraries without the headers!
11452 # note that this check is done here to allow for different kerberos
11453 # include paths
11454 for ac_hdr in krb5.h
11455 do
11456 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11457 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11458 echo "configure:11459: checking for $ac_hdr" >&5
11459 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11460   echo $ac_n "(cached) $ac_c" 1>&6
11461 else
11462   cat > conftest.$ac_ext <<EOF
11463 #line 11464 "configure"
11464 #include "confdefs.h"
11465 #include <$ac_hdr>
11466 EOF
11467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11468 { (eval echo configure:11469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11470 if test -z "$ac_err"; then
11471   rm -rf conftest*
11472   eval "ac_cv_header_$ac_safe=yes"
11473 else
11474   echo "$ac_err" >&5
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -rf conftest*
11478   eval "ac_cv_header_$ac_safe=no"
11479 fi
11480 rm -f conftest*
11481 fi
11482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11483   echo "$ac_t""yes" 1>&6
11484     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11485   cat >> confdefs.h <<EOF
11486 #define $ac_tr_hdr 1
11487 EOF
11488  
11489 else
11490   echo "$ac_t""no" 1>&6
11491 fi
11492 done
11493
11494
11495 # now check for gssapi headers.  This is also done here to allow for
11496 # different kerberos include paths
11497 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11498 do
11499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11501 echo "configure:11502: checking for $ac_hdr" >&5
11502 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11503   echo $ac_n "(cached) $ac_c" 1>&6
11504 else
11505   cat > conftest.$ac_ext <<EOF
11506 #line 11507 "configure"
11507 #include "confdefs.h"
11508 #include <$ac_hdr>
11509 EOF
11510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11511 { (eval echo configure:11512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11513 if test -z "$ac_err"; then
11514   rm -rf conftest*
11515   eval "ac_cv_header_$ac_safe=yes"
11516 else
11517   echo "$ac_err" >&5
11518   echo "configure: failed program was:" >&5
11519   cat conftest.$ac_ext >&5
11520   rm -rf conftest*
11521   eval "ac_cv_header_$ac_safe=no"
11522 fi
11523 rm -f conftest*
11524 fi
11525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11526   echo "$ac_t""yes" 1>&6
11527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11528   cat >> confdefs.h <<EOF
11529 #define $ac_tr_hdr 1
11530 EOF
11531  
11532 else
11533   echo "$ac_t""no" 1>&6
11534 fi
11535 done
11536
11537
11538 ##################################################################
11539 # we might need the k5crypto and com_err libraries on some systems
11540 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11541 echo "configure:11542: checking for _et_list in -lcom_err" >&5
11542 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11543 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11544   echo $ac_n "(cached) $ac_c" 1>&6
11545 else
11546   ac_save_LIBS="$LIBS"
11547 LIBS="-lcom_err  $LIBS"
11548 cat > conftest.$ac_ext <<EOF
11549 #line 11550 "configure"
11550 #include "confdefs.h"
11551 /* Override any gcc2 internal prototype to avoid an error.  */
11552 /* We use char because int might match the return type of a gcc2
11553     builtin and then its argument prototype would still apply.  */
11554 char _et_list();
11555
11556 int main() {
11557 _et_list()
11558 ; return 0; }
11559 EOF
11560 if { (eval echo configure:11561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11561   rm -rf conftest*
11562   eval "ac_cv_lib_$ac_lib_var=yes"
11563 else
11564   echo "configure: failed program was:" >&5
11565   cat conftest.$ac_ext >&5
11566   rm -rf conftest*
11567   eval "ac_cv_lib_$ac_lib_var=no"
11568 fi
11569 rm -f conftest*
11570 LIBS="$ac_save_LIBS"
11571
11572 fi
11573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11574   echo "$ac_t""yes" 1>&6
11575   LIBS="$LIBS -lcom_err"
11576 else
11577   echo "$ac_t""no" 1>&6
11578 fi
11579
11580 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11581 echo "configure:11582: checking for krb5_encrypt_data in -lk5crypto" >&5
11582 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11583 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11584   echo $ac_n "(cached) $ac_c" 1>&6
11585 else
11586   ac_save_LIBS="$LIBS"
11587 LIBS="-lk5crypto  $LIBS"
11588 cat > conftest.$ac_ext <<EOF
11589 #line 11590 "configure"
11590 #include "confdefs.h"
11591 /* Override any gcc2 internal prototype to avoid an error.  */
11592 /* We use char because int might match the return type of a gcc2
11593     builtin and then its argument prototype would still apply.  */
11594 char krb5_encrypt_data();
11595
11596 int main() {
11597 krb5_encrypt_data()
11598 ; return 0; }
11599 EOF
11600 if { (eval echo configure:11601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11601   rm -rf conftest*
11602   eval "ac_cv_lib_$ac_lib_var=yes"
11603 else
11604   echo "configure: failed program was:" >&5
11605   cat conftest.$ac_ext >&5
11606   rm -rf conftest*
11607   eval "ac_cv_lib_$ac_lib_var=no"
11608 fi
11609 rm -f conftest*
11610 LIBS="$ac_save_LIBS"
11611
11612 fi
11613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11614   echo "$ac_t""yes" 1>&6
11615   LIBS="$LIBS -lk5crypto"
11616 else
11617   echo "$ac_t""no" 1>&6
11618 fi
11619
11620 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11621 echo "configure:11622: checking for gss_display_status in -lgssapi_krb5" >&5
11622 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11624   echo $ac_n "(cached) $ac_c" 1>&6
11625 else
11626   ac_save_LIBS="$LIBS"
11627 LIBS="-lgssapi_krb5  $LIBS"
11628 cat > conftest.$ac_ext <<EOF
11629 #line 11630 "configure"
11630 #include "confdefs.h"
11631 /* Override any gcc2 internal prototype to avoid an error.  */
11632 /* We use char because int might match the return type of a gcc2
11633     builtin and then its argument prototype would still apply.  */
11634 char gss_display_status();
11635
11636 int main() {
11637 gss_display_status()
11638 ; return 0; }
11639 EOF
11640 if { (eval echo configure:11641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11641   rm -rf conftest*
11642   eval "ac_cv_lib_$ac_lib_var=yes"
11643 else
11644   echo "configure: failed program was:" >&5
11645   cat conftest.$ac_ext >&5
11646   rm -rf conftest*
11647   eval "ac_cv_lib_$ac_lib_var=no"
11648 fi
11649 rm -f conftest*
11650 LIBS="$ac_save_LIBS"
11651
11652 fi
11653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11654   echo "$ac_t""yes" 1>&6
11655   LIBS="$LIBS -lgssapi_krb5"
11656 else
11657   echo "$ac_t""no" 1>&6
11658 fi
11659
11660
11661
11662 ########################################################
11663 # now see if we can find the krb5 libs in standard paths
11664 # or as specified above
11665 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11666 echo "configure:11667: checking for krb5_mk_req_extended in -lkrb5" >&5
11667 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11668 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11669   echo $ac_n "(cached) $ac_c" 1>&6
11670 else
11671   ac_save_LIBS="$LIBS"
11672 LIBS="-lkrb5  $LIBS"
11673 cat > conftest.$ac_ext <<EOF
11674 #line 11675 "configure"
11675 #include "confdefs.h"
11676 /* Override any gcc2 internal prototype to avoid an error.  */
11677 /* We use char because int might match the return type of a gcc2
11678     builtin and then its argument prototype would still apply.  */
11679 char krb5_mk_req_extended();
11680
11681 int main() {
11682 krb5_mk_req_extended()
11683 ; return 0; }
11684 EOF
11685 if { (eval echo configure:11686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11686   rm -rf conftest*
11687   eval "ac_cv_lib_$ac_lib_var=yes"
11688 else
11689   echo "configure: failed program was:" >&5
11690   cat conftest.$ac_ext >&5
11691   rm -rf conftest*
11692   eval "ac_cv_lib_$ac_lib_var=no"
11693 fi
11694 rm -f conftest*
11695 LIBS="$ac_save_LIBS"
11696
11697 fi
11698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11699   echo "$ac_t""yes" 1>&6
11700   LIBS="$LIBS -lkrb5";
11701         cat >> confdefs.h <<\EOF
11702 #define HAVE_KRB5 1
11703 EOF
11704
11705 else
11706   echo "$ac_t""no" 1>&6
11707 fi
11708
11709
11710 ########################################################
11711 # now see if we can find the gssapi libs in standard paths
11712 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11713 echo "configure:11714: checking for gss_display_status in -lgssapi_krb5" >&5
11714 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11715 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11716   echo $ac_n "(cached) $ac_c" 1>&6
11717 else
11718   ac_save_LIBS="$LIBS"
11719 LIBS="-lgssapi_krb5  $LIBS"
11720 cat > conftest.$ac_ext <<EOF
11721 #line 11722 "configure"
11722 #include "confdefs.h"
11723 /* Override any gcc2 internal prototype to avoid an error.  */
11724 /* We use char because int might match the return type of a gcc2
11725     builtin and then its argument prototype would still apply.  */
11726 char gss_display_status();
11727
11728 int main() {
11729 gss_display_status()
11730 ; return 0; }
11731 EOF
11732 if { (eval echo configure:11733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11733   rm -rf conftest*
11734   eval "ac_cv_lib_$ac_lib_var=yes"
11735 else
11736   echo "configure: failed program was:" >&5
11737   cat conftest.$ac_ext >&5
11738   rm -rf conftest*
11739   eval "ac_cv_lib_$ac_lib_var=no"
11740 fi
11741 rm -f conftest*
11742 LIBS="$ac_save_LIBS"
11743
11744 fi
11745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11746   echo "$ac_t""yes" 1>&6
11747   cat >> confdefs.h <<\EOF
11748 #define HAVE_GSSAPI 1
11749 EOF
11750
11751 else
11752   echo "$ac_t""no" 1>&6
11753 fi
11754
11755
11756
11757 ##################################################################
11758 # we might need the lber lib on some systems. To avoid link errors
11759 # this test must be before the libldap test
11760 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11761 echo "configure:11762: checking for ber_scanf in -llber" >&5
11762 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11763 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11764   echo $ac_n "(cached) $ac_c" 1>&6
11765 else
11766   ac_save_LIBS="$LIBS"
11767 LIBS="-llber  $LIBS"
11768 cat > conftest.$ac_ext <<EOF
11769 #line 11770 "configure"
11770 #include "confdefs.h"
11771 /* Override any gcc2 internal prototype to avoid an error.  */
11772 /* We use char because int might match the return type of a gcc2
11773     builtin and then its argument prototype would still apply.  */
11774 char ber_scanf();
11775
11776 int main() {
11777 ber_scanf()
11778 ; return 0; }
11779 EOF
11780 if { (eval echo configure:11781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11781   rm -rf conftest*
11782   eval "ac_cv_lib_$ac_lib_var=yes"
11783 else
11784   echo "configure: failed program was:" >&5
11785   cat conftest.$ac_ext >&5
11786   rm -rf conftest*
11787   eval "ac_cv_lib_$ac_lib_var=no"
11788 fi
11789 rm -f conftest*
11790 LIBS="$ac_save_LIBS"
11791
11792 fi
11793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11794   echo "$ac_t""yes" 1>&6
11795   LIBS="$LIBS -llber"
11796 else
11797   echo "$ac_t""no" 1>&6
11798 fi
11799
11800
11801 ########################################################
11802 # now see if we can find the ldap libs in standard paths
11803 if test x$have_ldap != xyes; then
11804 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
11805 echo "configure:11806: checking for ldap_domain2hostlist in -lldap" >&5
11806 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
11807 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11808   echo $ac_n "(cached) $ac_c" 1>&6
11809 else
11810   ac_save_LIBS="$LIBS"
11811 LIBS="-lldap  $LIBS"
11812 cat > conftest.$ac_ext <<EOF
11813 #line 11814 "configure"
11814 #include "confdefs.h"
11815 /* Override any gcc2 internal prototype to avoid an error.  */
11816 /* We use char because int might match the return type of a gcc2
11817     builtin and then its argument prototype would still apply.  */
11818 char ldap_domain2hostlist();
11819
11820 int main() {
11821 ldap_domain2hostlist()
11822 ; return 0; }
11823 EOF
11824 if { (eval echo configure:11825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11825   rm -rf conftest*
11826   eval "ac_cv_lib_$ac_lib_var=yes"
11827 else
11828   echo "configure: failed program was:" >&5
11829   cat conftest.$ac_ext >&5
11830   rm -rf conftest*
11831   eval "ac_cv_lib_$ac_lib_var=no"
11832 fi
11833 rm -f conftest*
11834 LIBS="$ac_save_LIBS"
11835
11836 fi
11837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11838   echo "$ac_t""yes" 1>&6
11839   LIBS="$LIBS -lldap";
11840         cat >> confdefs.h <<\EOF
11841 #define HAVE_LDAP 1
11842 EOF
11843
11844 else
11845   echo "$ac_t""no" 1>&6
11846 fi
11847
11848 fi
11849
11850 #################################################
11851 # check for automount support
11852 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11853 echo "configure:11854: checking whether to use AUTOMOUNT" >&5
11854 # Check whether --with-automount or --without-automount was given.
11855 if test "${with_automount+set}" = set; then
11856   withval="$with_automount"
11857    case "$withval" in
11858   yes)
11859     echo "$ac_t""yes" 1>&6
11860     cat >> confdefs.h <<\EOF
11861 #define WITH_AUTOMOUNT 1
11862 EOF
11863
11864     ;;
11865   *)
11866     echo "$ac_t""no" 1>&6
11867     ;;
11868   esac 
11869 else
11870   echo "$ac_t""no" 1>&6
11871
11872 fi
11873
11874
11875 #################################################
11876 # check for smbmount support
11877 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11878 echo "configure:11879: checking whether to use SMBMOUNT" >&5
11879 # Check whether --with-smbmount or --without-smbmount was given.
11880 if test "${with_smbmount+set}" = set; then
11881   withval="$with_smbmount"
11882    case "$withval" in
11883   yes)
11884         case "$host_os" in
11885         *linux*)
11886                 echo "$ac_t""yes" 1>&6
11887                 cat >> confdefs.h <<\EOF
11888 #define WITH_SMBMOUNT 1
11889 EOF
11890
11891                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11892                 ;;
11893         *)
11894                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11895                 ;;
11896         esac
11897     ;;
11898   *)
11899     echo "$ac_t""no" 1>&6
11900     MPROGS=
11901     ;;
11902   esac 
11903 else
11904   echo "$ac_t""no" 1>&6
11905   MPROGS=
11906
11907 fi
11908
11909
11910
11911 #################################################
11912 # check for a PAM clear-text auth, accounts, password and session support
11913 with_pam_for_crypt=no
11914 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
11915 echo "configure:11916: checking whether to use PAM" >&5
11916 # Check whether --with-pam or --without-pam was given.
11917 if test "${with_pam+set}" = set; then
11918   withval="$with_pam"
11919    case "$withval" in
11920   yes)
11921     echo "$ac_t""yes" 1>&6
11922     cat >> confdefs.h <<\EOF
11923 #define WITH_PAM 1
11924 EOF
11925
11926     LIBS="$LIBS -lpam"
11927     with_pam_for_crypt=yes
11928     ;;
11929   *)
11930     echo "$ac_t""no" 1>&6
11931     ;;
11932   esac 
11933 else
11934   echo "$ac_t""no" 1>&6
11935
11936 fi
11937
11938
11939 # we can't build a pam module if we don't have pam.
11940 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11941 echo "configure:11942: checking for pam_get_data in -lpam" >&5
11942 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11943 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11944   echo $ac_n "(cached) $ac_c" 1>&6
11945 else
11946   ac_save_LIBS="$LIBS"
11947 LIBS="-lpam  $LIBS"
11948 cat > conftest.$ac_ext <<EOF
11949 #line 11950 "configure"
11950 #include "confdefs.h"
11951 /* Override any gcc2 internal prototype to avoid an error.  */
11952 /* We use char because int might match the return type of a gcc2
11953     builtin and then its argument prototype would still apply.  */
11954 char pam_get_data();
11955
11956 int main() {
11957 pam_get_data()
11958 ; return 0; }
11959 EOF
11960 if { (eval echo configure:11961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11961   rm -rf conftest*
11962   eval "ac_cv_lib_$ac_lib_var=yes"
11963 else
11964   echo "configure: failed program was:" >&5
11965   cat conftest.$ac_ext >&5
11966   rm -rf conftest*
11967   eval "ac_cv_lib_$ac_lib_var=no"
11968 fi
11969 rm -f conftest*
11970 LIBS="$ac_save_LIBS"
11971
11972 fi
11973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11974   echo "$ac_t""yes" 1>&6
11975   cat >> confdefs.h <<\EOF
11976 #define HAVE_LIBPAM 1
11977 EOF
11978
11979 else
11980   echo "$ac_t""no" 1>&6
11981 fi
11982
11983
11984 #################################################
11985 # check for pam_smbpass support
11986 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11987 echo "configure:11988: checking whether to use pam_smbpass" >&5
11988 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11989 if test "${with_pam_smbpass+set}" = set; then
11990   withval="$with_pam_smbpass"
11991    case "$withval" in
11992   yes)
11993     echo "$ac_t""yes" 1>&6
11994
11995 # Conditions under which pam_smbpass should not be built.
11996
11997        if test x$PICFLAG = x; then
11998           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11999           PAM_MOD=""
12000        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12001           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12002           PAM_MOD=""
12003        else
12004           PAM_MOD="bin/pam_smbpass.so"
12005        fi
12006     ;;
12007   *)
12008     echo "$ac_t""no" 1>&6
12009     ;;
12010   esac 
12011 else
12012   echo "$ac_t""no" 1>&6
12013
12014 fi
12015
12016
12017
12018 ###############################################
12019 # test for where we get crypt() from, but only
12020 # if not using PAM
12021 if test $with_pam_for_crypt = no; then
12022 for ac_func in crypt
12023 do
12024 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12025 echo "configure:12026: checking for $ac_func" >&5
12026 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12027   echo $ac_n "(cached) $ac_c" 1>&6
12028 else
12029   cat > conftest.$ac_ext <<EOF
12030 #line 12031 "configure"
12031 #include "confdefs.h"
12032 /* System header to define __stub macros and hopefully few prototypes,
12033     which can conflict with char $ac_func(); below.  */
12034 #include <assert.h>
12035 /* Override any gcc2 internal prototype to avoid an error.  */
12036 /* We use char because int might match the return type of a gcc2
12037     builtin and then its argument prototype would still apply.  */
12038 char $ac_func();
12039
12040 int main() {
12041
12042 /* The GNU C library defines this for functions which it implements
12043     to always fail with ENOSYS.  Some functions are actually named
12044     something starting with __ and the normal name is an alias.  */
12045 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12046 choke me
12047 #else
12048 $ac_func();
12049 #endif
12050
12051 ; return 0; }
12052 EOF
12053 if { (eval echo configure:12054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12054   rm -rf conftest*
12055   eval "ac_cv_func_$ac_func=yes"
12056 else
12057   echo "configure: failed program was:" >&5
12058   cat conftest.$ac_ext >&5
12059   rm -rf conftest*
12060   eval "ac_cv_func_$ac_func=no"
12061 fi
12062 rm -f conftest*
12063 fi
12064
12065 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12066   echo "$ac_t""yes" 1>&6
12067     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12068   cat >> confdefs.h <<EOF
12069 #define $ac_tr_func 1
12070 EOF
12071  
12072 else
12073   echo "$ac_t""no" 1>&6
12074 fi
12075 done
12076
12077 if test x"$ac_cv_func_crypt" = x"no"; then
12078     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12079 echo "configure:12080: checking for crypt in -lcrypt" >&5
12080 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12081 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12082   echo $ac_n "(cached) $ac_c" 1>&6
12083 else
12084   ac_save_LIBS="$LIBS"
12085 LIBS="-lcrypt  $LIBS"
12086 cat > conftest.$ac_ext <<EOF
12087 #line 12088 "configure"
12088 #include "confdefs.h"
12089 /* Override any gcc2 internal prototype to avoid an error.  */
12090 /* We use char because int might match the return type of a gcc2
12091     builtin and then its argument prototype would still apply.  */
12092 char crypt();
12093
12094 int main() {
12095 crypt()
12096 ; return 0; }
12097 EOF
12098 if { (eval echo configure:12099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12099   rm -rf conftest*
12100   eval "ac_cv_lib_$ac_lib_var=yes"
12101 else
12102   echo "configure: failed program was:" >&5
12103   cat conftest.$ac_ext >&5
12104   rm -rf conftest*
12105   eval "ac_cv_lib_$ac_lib_var=no"
12106 fi
12107 rm -f conftest*
12108 LIBS="$ac_save_LIBS"
12109
12110 fi
12111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12112   echo "$ac_t""yes" 1>&6
12113   LIBS="$LIBS -lcrypt";
12114         cat >> confdefs.h <<\EOF
12115 #define HAVE_CRYPT 1
12116 EOF
12117
12118 else
12119   echo "$ac_t""no" 1>&6
12120 fi
12121
12122 fi
12123 fi
12124
12125 ##
12126 ## moved after the check for -lcrypt in order to
12127 ## ensure that the necessary libraries are included
12128 ## check checking for truncated salt.  Wrapped by the
12129 ## $with_pam_for_crypt variable as above   --jerry
12130 ##
12131 if test $with_pam_for_crypt = no; then
12132 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12133 echo "configure:12134: checking for a crypt that needs truncated salt" >&5
12134 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12135   echo $ac_n "(cached) $ac_c" 1>&6
12136 else
12137   
12138 if test "$cross_compiling" = yes; then
12139   samba_cv_HAVE_TRUNCATED_SALT=cross
12140 else
12141   cat > conftest.$ac_ext <<EOF
12142 #line 12143 "configure"
12143 #include "confdefs.h"
12144 #include "${srcdir-.}/tests/crypttest.c"
12145 EOF
12146 if { (eval echo configure:12147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12147 then
12148   samba_cv_HAVE_TRUNCATED_SALT=no
12149 else
12150   echo "configure: failed program was:" >&5
12151   cat conftest.$ac_ext >&5
12152   rm -fr conftest*
12153   samba_cv_HAVE_TRUNCATED_SALT=yes
12154 fi
12155 rm -fr conftest*
12156 fi
12157
12158 fi
12159
12160 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12161 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12162         cat >> confdefs.h <<\EOF
12163 #define HAVE_TRUNCATED_SALT 1
12164 EOF
12165
12166 fi
12167 fi
12168
12169
12170
12171 ########################################################################################
12172 ##
12173 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12174 ##
12175 ########################################################################################
12176
12177 ## set the with_smbpasswd_sam as the default
12178 with_smbpasswd_sam=yes
12179
12180
12181 #################################################
12182 # check for a TDB password database
12183 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12184 echo "configure:12185: checking whether to use TDB SAM database" >&5
12185 # Check whether --with-tdbsam or --without-tdbsam was given.
12186 if test "${with_tdbsam+set}" = set; then
12187   withval="$with_tdbsam"
12188    case "$withval" in
12189   yes)
12190     echo "$ac_t""yes" 1>&6
12191     cat >> confdefs.h <<\EOF
12192 #define WITH_TDB_SAM 1
12193 EOF
12194
12195     with_smbpasswd_sam=no
12196     ;;
12197   *)
12198     echo "$ac_t""no" 1>&6
12199     ;;
12200   esac 
12201 else
12202   echo "$ac_t""no" 1>&6
12203
12204 fi
12205
12206
12207 #################################################
12208 # check for a LDAP password database
12209 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12210 echo "configure:12211: checking whether to use LDAP SAM database" >&5
12211 # Check whether --with-ldapsam or --without-ldapsam was given.
12212 if test "${with_ldapsam+set}" = set; then
12213   withval="$with_ldapsam"
12214    case "$withval" in
12215   yes)
12216     echo "$ac_t""yes" 1>&6
12217     cat >> confdefs.h <<\EOF
12218 #define WITH_LDAP_SAM 1
12219 EOF
12220
12221     LIBS="-lldap -llber $LIBS"
12222     with_smbpasswd_sam=no
12223     ;;
12224   *)
12225     echo "$ac_t""no" 1>&6
12226     ;;
12227   esac 
12228 else
12229   echo "$ac_t""no" 1>&6
12230
12231 fi
12232
12233
12234 #################################################
12235 # check for a NISPLUS password database
12236 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12237 echo "configure:12238: checking whether to use NISPLUS SAM database" >&5
12238 # Check whether --with-nisplussam or --without-nisplussam was given.
12239 if test "${with_nisplussam+set}" = set; then
12240   withval="$with_nisplussam"
12241    case "$withval" in
12242   yes)
12243     echo "$ac_t""yes" 1>&6
12244     cat >> confdefs.h <<\EOF
12245 #define WITH_NISPLUS_SAM 1
12246 EOF
12247
12248     with_smbpasswd_sam=no
12249     ;;
12250   *)
12251     echo "$ac_t""no" 1>&6
12252     ;;
12253   esac 
12254 else
12255   echo "$ac_t""no" 1>&6
12256
12257 fi
12258
12259
12260 ################################################
12261 # This test should come last because the
12262 # smbpasswd SAM is only used if another format
12263 # has not been defined
12264 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
12265 echo "configure:12266: checking whether to use traditional smbpasswd file" >&5
12266 if test $with_smbpasswd_sam = yes; then
12267         echo "$ac_t""yes" 1>&6
12268         cat >> confdefs.h <<\EOF
12269 #define WITH_SMBPASSWD_SAM 1
12270 EOF
12271
12272 else
12273         echo "$ac_t""no" 1>&6
12274 fi
12275
12276 ########################################################################################
12277 ##
12278 ## END OF TESTS FOR SAM BACKENDS.  
12279 ##
12280 ########################################################################################
12281
12282 #################################################
12283 # check for a NISPLUS_HOME support 
12284 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12285 echo "configure:12286: checking whether to use NISPLUS_HOME" >&5
12286 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12287 if test "${with_nisplus_home+set}" = set; then
12288   withval="$with_nisplus_home"
12289    case "$withval" in
12290   yes)
12291     echo "$ac_t""yes" 1>&6
12292     cat >> confdefs.h <<\EOF
12293 #define WITH_NISPLUS_HOME 1
12294 EOF
12295
12296     ;;
12297   *)
12298     echo "$ac_t""no" 1>&6
12299     ;;
12300   esac 
12301 else
12302   echo "$ac_t""no" 1>&6
12303
12304 fi
12305
12306
12307 #################################################
12308 # check for the secure socket layer
12309 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12310 echo "configure:12311: checking whether to use SSL" >&5
12311 # Check whether --with-ssl or --without-ssl was given.
12312 if test "${with_ssl+set}" = set; then
12313   withval="$with_ssl"
12314    case "$withval" in
12315   yes)
12316     echo "$ac_t""yes" 1>&6
12317     cat >> confdefs.h <<\EOF
12318 #define WITH_SSL 1
12319 EOF
12320
12321     withval="/usr/local/ssl"     # default
12322
12323     if test "${with_sslinc+set}" = set; then
12324
12325         withval="$with_sslinc"
12326         case "$withval" in
12327         yes|no)
12328           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12329           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12330         ;;
12331         * )
12332           CFLAGS="-I${withval} $CFLAGS"
12333         ;;
12334         esac
12335
12336     else
12337
12338         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12339
12340     fi
12341
12342     if test "${with_ssllib+set}" = set; then
12343
12344         withval="$with_ssllib"
12345         case "$withval" in
12346         yes|no)
12347           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12348           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12349         ;;
12350         * )
12351           LDFLAGS="-L${withval}/lib $LDFLAGS"
12352         ;;
12353         esac
12354
12355     else
12356
12357         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12358
12359     fi
12360
12361     LIBS="-lssl -lcrypto $LIBS"
12362
12363 #    if test ! -d ${withval}; then
12364 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12365 #      exit 1
12366 #    fi 
12367
12368     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12369
12370     ;;
12371   *)
12372     echo "$ac_t""no" 1>&6
12373     ;;
12374   esac 
12375 else
12376   echo "$ac_t""no" 1>&6
12377
12378 fi
12379
12380
12381 #################################################
12382 # check for syslog logging
12383 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12384 echo "configure:12385: checking whether to use syslog logging" >&5
12385 # Check whether --with-syslog or --without-syslog was given.
12386 if test "${with_syslog+set}" = set; then
12387   withval="$with_syslog"
12388    case "$withval" in
12389   yes)
12390     echo "$ac_t""yes" 1>&6
12391     cat >> confdefs.h <<\EOF
12392 #define WITH_SYSLOG 1
12393 EOF
12394
12395     ;;
12396   *)
12397     echo "$ac_t""no" 1>&6
12398     ;;
12399   esac 
12400 else
12401   echo "$ac_t""no" 1>&6
12402
12403 fi
12404
12405
12406 #################################################
12407 # check for a shared memory profiling support
12408 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12409 echo "configure:12410: checking whether to use profiling" >&5
12410 # Check whether --with-profiling-data or --without-profiling-data was given.
12411 if test "${with_profiling_data+set}" = set; then
12412   withval="$with_profiling_data"
12413    case "$withval" in
12414   yes)
12415     echo "$ac_t""yes" 1>&6
12416     cat >> confdefs.h <<\EOF
12417 #define WITH_PROFILE 1
12418 EOF
12419
12420     ;;
12421   *)
12422     echo "$ac_t""no" 1>&6
12423     ;;
12424   esac 
12425 else
12426   echo "$ac_t""no" 1>&6
12427
12428 fi
12429
12430
12431
12432 #################################################
12433 # check for experimental disk-quotas support
12434 QUOTAOBJS=smbd/noquotas.o
12435
12436 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12437 echo "configure:12438: checking whether to support disk-quotas" >&5
12438 # Check whether --with-quotas or --without-quotas was given.
12439 if test "${with_quotas+set}" = set; then
12440   withval="$with_quotas"
12441    case "$withval" in
12442   yes)
12443     echo "$ac_t""yes" 1>&6
12444     case "$host_os" in
12445       *linux*)
12446         # Check for kernel 2.4.x quota braindamage...
12447         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12448 echo "configure:12449: checking for linux 2.4.x quota braindamage.." >&5
12449 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12450   echo $ac_n "(cached) $ac_c" 1>&6
12451 else
12452   
12453         cat > conftest.$ac_ext <<EOF
12454 #line 12455 "configure"
12455 #include "confdefs.h"
12456 #include <stdio.h>
12457 #include <sys/types.h>
12458 #include <asm/types.h>
12459 #include <linux/quota.h>
12460 #include <mntent.h>
12461 #include <linux/unistd.h>
12462 int main() {
12463 struct mem_dqblk D;
12464 ; return 0; }
12465 EOF
12466 if { (eval echo configure:12467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12467   rm -rf conftest*
12468   samba_cv_linux_2_4_quota_braindamage=yes
12469 else
12470   echo "configure: failed program was:" >&5
12471   cat conftest.$ac_ext >&5
12472   rm -rf conftest*
12473   samba_cv_linux_2_4_quota_braindamage=no
12474 fi
12475 rm -f conftest*
12476 fi
12477
12478 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12479 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12480         cat >> confdefs.h <<\EOF
12481 #define LINUX_QUOTAS_2 1
12482 EOF
12483
12484 else
12485         cat >> confdefs.h <<\EOF
12486 #define LINUX_QUOTAS_1 1
12487 EOF
12488
12489 fi
12490         ;;
12491       *)
12492         ;;
12493     esac
12494     QUOTAOBJS=smbd/quotas.o
12495     cat >> confdefs.h <<\EOF
12496 #define WITH_QUOTAS 1
12497 EOF
12498
12499     ;;
12500   *)
12501     echo "$ac_t""no" 1>&6
12502     ;;
12503   esac 
12504 else
12505   echo "$ac_t""no" 1>&6
12506
12507 fi
12508
12509
12510
12511 #################################################
12512 # check for experimental utmp accounting
12513
12514 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12515 echo "configure:12516: checking whether to support utmp accounting" >&5
12516 # Check whether --with-utmp or --without-utmp was given.
12517 if test "${with_utmp+set}" = set; then
12518   withval="$with_utmp"
12519    case "$withval" in
12520   yes)
12521     echo "$ac_t""yes" 1>&6
12522     cat >> confdefs.h <<\EOF
12523 #define WITH_UTMP 1
12524 EOF
12525
12526     ;;
12527   *)
12528     echo "$ac_t""no" 1>&6
12529     ;;
12530   esac 
12531 else
12532   echo "$ac_t""no" 1>&6
12533
12534 fi
12535
12536
12537 #################################################
12538 # set private directory location
12539 # Check whether --with-privatedir or --without-privatedir was given.
12540 if test "${with_privatedir+set}" = set; then
12541   withval="$with_privatedir"
12542    case "$withval" in
12543   yes|no)
12544   #
12545   # Just in case anybody calls it without argument
12546   #
12547     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12548     privatedir='${prefix}/private'
12549   ;;
12550   * )
12551     privatedir="$withval"
12552     ;;
12553   esac
12554   
12555 else
12556   privatedir='${prefix}/private'
12557    
12558
12559 fi
12560
12561
12562 #################################################
12563 # set lock directory location
12564 # Check whether --with-lockdir or --without-lockdir was given.
12565 if test "${with_lockdir+set}" = set; then
12566   withval="$with_lockdir"
12567    case "$withval" in
12568   yes|no)
12569   #
12570   # Just in case anybody calls it without argument
12571   #
12572     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12573     lockdir='$(VARDIR)/locks'
12574   ;;
12575   * )
12576     lockdir="$withval"
12577     ;;
12578   esac
12579   
12580 else
12581   lockdir='$(VARDIR)/locks'
12582    
12583
12584 fi
12585
12586
12587 #################################################
12588 # set SWAT directory location
12589 # Check whether --with-swatdir or --without-swatdir was given.
12590 if test "${with_swatdir+set}" = set; then
12591   withval="$with_swatdir"
12592    case "$withval" in
12593   yes|no)
12594   #
12595   # Just in case anybody does it
12596   #
12597     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12598     swatdir='${prefix}/swat'
12599   ;;
12600   * )
12601     swatdir="$withval"
12602     ;;
12603   esac
12604   
12605 else
12606   swatdir='${prefix}/swat'
12607    
12608
12609 fi
12610
12611
12612 #################################################
12613 # choose native language(s) of man pages
12614 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12615 echo "configure:12616: checking chosen man pages' language(s)" >&5
12616 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12617 if test "${with_manpages_langs+set}" = set; then
12618   withval="$with_manpages_langs"
12619    case "$withval" in
12620   yes|no)
12621     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12622     manlangs="en"
12623   ;;
12624   *)
12625     manlangs="$withval"
12626   ;;
12627   esac
12628
12629   echo "$ac_t""$manlangs" 1>&6
12630   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12631   
12632 else
12633   manlangs="en"
12634   echo "$ac_t""$manlangs" 1>&6
12635   
12636
12637 fi
12638
12639
12640 #################################################
12641 # these tests are taken from the GNU fileutils package
12642 echo "checking how to get filesystem space usage" 1>&6
12643 echo "configure:12644: checking how to get filesystem space usage" >&5
12644 space=no
12645
12646 # Test for statvfs64.
12647 if test $space = no; then
12648   # SVR4
12649   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12650 echo "configure:12651: checking statvfs64 function (SVR4)" >&5
12651 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12652   echo $ac_n "(cached) $ac_c" 1>&6
12653 else
12654   if test "$cross_compiling" = yes; then
12655   fu_cv_sys_stat_statvfs64=cross
12656 else
12657   cat > conftest.$ac_ext <<EOF
12658 #line 12659 "configure"
12659 #include "confdefs.h"
12660
12661 #if defined(HAVE_UNISTD_H)
12662 #include <unistd.h>
12663 #endif
12664 #include <sys/types.h>
12665 #include <sys/statvfs.h>
12666   main ()
12667   {
12668     struct statvfs64 fsd;
12669     exit (statvfs64 (".", &fsd));
12670   }
12671 EOF
12672 if { (eval echo configure:12673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12673 then
12674   fu_cv_sys_stat_statvfs64=yes
12675 else
12676   echo "configure: failed program was:" >&5
12677   cat conftest.$ac_ext >&5
12678   rm -fr conftest*
12679   fu_cv_sys_stat_statvfs64=no
12680 fi
12681 rm -fr conftest*
12682 fi
12683
12684 fi
12685
12686 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12687   if test $fu_cv_sys_stat_statvfs64 = yes; then
12688     space=yes
12689     cat >> confdefs.h <<\EOF
12690 #define STAT_STATVFS64 1
12691 EOF
12692
12693   fi
12694 fi
12695
12696 # Perform only the link test since it seems there are no variants of the
12697 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12698 # because that got a false positive on SCO OSR5.  Adding the declaration
12699 # of a `struct statvfs' causes this test to fail (as it should) on such
12700 # systems.  That system is reported to work fine with STAT_STATFS4 which
12701 # is what it gets when this test fails.
12702 if test $space = no; then
12703   # SVR4
12704   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12705 echo "configure:12706: checking statvfs function (SVR4)" >&5
12706 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12707   echo $ac_n "(cached) $ac_c" 1>&6
12708 else
12709   cat > conftest.$ac_ext <<EOF
12710 #line 12711 "configure"
12711 #include "confdefs.h"
12712 #include <sys/types.h>
12713 #include <sys/statvfs.h>
12714 int main() {
12715 struct statvfs fsd; statvfs (0, &fsd);
12716 ; return 0; }
12717 EOF
12718 if { (eval echo configure:12719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12719   rm -rf conftest*
12720   fu_cv_sys_stat_statvfs=yes
12721 else
12722   echo "configure: failed program was:" >&5
12723   cat conftest.$ac_ext >&5
12724   rm -rf conftest*
12725   fu_cv_sys_stat_statvfs=no
12726 fi
12727 rm -f conftest*
12728 fi
12729
12730 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12731   if test $fu_cv_sys_stat_statvfs = yes; then
12732     space=yes
12733     cat >> confdefs.h <<\EOF
12734 #define STAT_STATVFS 1
12735 EOF
12736
12737   fi
12738 fi
12739
12740 if test $space = no; then
12741   # DEC Alpha running OSF/1
12742   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12743 echo "configure:12744: checking for 3-argument statfs function (DEC OSF/1)" >&5
12744   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12745   echo $ac_n "(cached) $ac_c" 1>&6
12746 else
12747   if test "$cross_compiling" = yes; then
12748   fu_cv_sys_stat_statfs3_osf1=no
12749 else
12750   cat > conftest.$ac_ext <<EOF
12751 #line 12752 "configure"
12752 #include "confdefs.h"
12753
12754 #include <sys/param.h>
12755 #include <sys/types.h>
12756 #include <sys/mount.h>
12757   main ()
12758   {
12759     struct statfs fsd;
12760     fsd.f_fsize = 0;
12761     exit (statfs (".", &fsd, sizeof (struct statfs)));
12762   }
12763 EOF
12764 if { (eval echo configure:12765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12765 then
12766   fu_cv_sys_stat_statfs3_osf1=yes
12767 else
12768   echo "configure: failed program was:" >&5
12769   cat conftest.$ac_ext >&5
12770   rm -fr conftest*
12771   fu_cv_sys_stat_statfs3_osf1=no
12772 fi
12773 rm -fr conftest*
12774 fi
12775
12776 fi
12777
12778   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12779   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12780     space=yes
12781     cat >> confdefs.h <<\EOF
12782 #define STAT_STATFS3_OSF1 1
12783 EOF
12784
12785   fi
12786 fi
12787
12788 if test $space = no; then
12789 # AIX
12790   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12791 echo "configure:12792: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12792   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12793   echo $ac_n "(cached) $ac_c" 1>&6
12794 else
12795   if test "$cross_compiling" = yes; then
12796   fu_cv_sys_stat_statfs2_bsize=no
12797 else
12798   cat > conftest.$ac_ext <<EOF
12799 #line 12800 "configure"
12800 #include "confdefs.h"
12801
12802 #ifdef HAVE_SYS_PARAM_H
12803 #include <sys/param.h>
12804 #endif
12805 #ifdef HAVE_SYS_MOUNT_H
12806 #include <sys/mount.h>
12807 #endif
12808 #ifdef HAVE_SYS_VFS_H
12809 #include <sys/vfs.h>
12810 #endif
12811   main ()
12812   {
12813   struct statfs fsd;
12814   fsd.f_bsize = 0;
12815   exit (statfs (".", &fsd));
12816   }
12817 EOF
12818 if { (eval echo configure:12819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12819 then
12820   fu_cv_sys_stat_statfs2_bsize=yes
12821 else
12822   echo "configure: failed program was:" >&5
12823   cat conftest.$ac_ext >&5
12824   rm -fr conftest*
12825   fu_cv_sys_stat_statfs2_bsize=no
12826 fi
12827 rm -fr conftest*
12828 fi
12829
12830 fi
12831
12832   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12833   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12834     space=yes
12835     cat >> confdefs.h <<\EOF
12836 #define STAT_STATFS2_BSIZE 1
12837 EOF
12838
12839   fi
12840 fi
12841
12842 if test $space = no; then
12843 # SVR3
12844   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12845 echo "configure:12846: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12846   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12847   echo $ac_n "(cached) $ac_c" 1>&6
12848 else
12849   if test "$cross_compiling" = yes; then
12850   fu_cv_sys_stat_statfs4=no
12851 else
12852   cat > conftest.$ac_ext <<EOF
12853 #line 12854 "configure"
12854 #include "confdefs.h"
12855 #include <sys/types.h>
12856 #include <sys/statfs.h>
12857   main ()
12858   {
12859   struct statfs fsd;
12860   exit (statfs (".", &fsd, sizeof fsd, 0));
12861   }
12862 EOF
12863 if { (eval echo configure:12864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12864 then
12865   fu_cv_sys_stat_statfs4=yes
12866 else
12867   echo "configure: failed program was:" >&5
12868   cat conftest.$ac_ext >&5
12869   rm -fr conftest*
12870   fu_cv_sys_stat_statfs4=no
12871 fi
12872 rm -fr conftest*
12873 fi
12874
12875 fi
12876
12877   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12878   if test $fu_cv_sys_stat_statfs4 = yes; then
12879     space=yes
12880     cat >> confdefs.h <<\EOF
12881 #define STAT_STATFS4 1
12882 EOF
12883
12884   fi
12885 fi
12886
12887 if test $space = no; then
12888 # 4.4BSD and NetBSD
12889   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12890 echo "configure:12891: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12891   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12892   echo $ac_n "(cached) $ac_c" 1>&6
12893 else
12894   if test "$cross_compiling" = yes; then
12895   fu_cv_sys_stat_statfs2_fsize=no
12896 else
12897   cat > conftest.$ac_ext <<EOF
12898 #line 12899 "configure"
12899 #include "confdefs.h"
12900 #include <sys/types.h>
12901 #ifdef HAVE_SYS_PARAM_H
12902 #include <sys/param.h>
12903 #endif
12904 #ifdef HAVE_SYS_MOUNT_H
12905 #include <sys/mount.h>
12906 #endif
12907   main ()
12908   {
12909   struct statfs fsd;
12910   fsd.f_fsize = 0;
12911   exit (statfs (".", &fsd));
12912   }
12913 EOF
12914 if { (eval echo configure:12915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12915 then
12916   fu_cv_sys_stat_statfs2_fsize=yes
12917 else
12918   echo "configure: failed program was:" >&5
12919   cat conftest.$ac_ext >&5
12920   rm -fr conftest*
12921   fu_cv_sys_stat_statfs2_fsize=no
12922 fi
12923 rm -fr conftest*
12924 fi
12925
12926 fi
12927
12928   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12929   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12930     space=yes
12931     cat >> confdefs.h <<\EOF
12932 #define STAT_STATFS2_FSIZE 1
12933 EOF
12934
12935   fi
12936 fi
12937
12938 if test $space = no; then
12939   # Ultrix
12940   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12941 echo "configure:12942: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12942   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12943   echo $ac_n "(cached) $ac_c" 1>&6
12944 else
12945   if test "$cross_compiling" = yes; then
12946   fu_cv_sys_stat_fs_data=no
12947 else
12948   cat > conftest.$ac_ext <<EOF
12949 #line 12950 "configure"
12950 #include "confdefs.h"
12951 #include <sys/types.h>
12952 #ifdef HAVE_SYS_PARAM_H
12953 #include <sys/param.h>
12954 #endif
12955 #ifdef HAVE_SYS_MOUNT_H
12956 #include <sys/mount.h>
12957 #endif
12958 #ifdef HAVE_SYS_FS_TYPES_H
12959 #include <sys/fs_types.h>
12960 #endif
12961   main ()
12962   {
12963   struct fs_data fsd;
12964   /* Ultrix's statfs returns 1 for success,
12965      0 for not mounted, -1 for failure.  */
12966   exit (statfs (".", &fsd) != 1);
12967   }
12968 EOF
12969 if { (eval echo configure:12970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12970 then
12971   fu_cv_sys_stat_fs_data=yes
12972 else
12973   echo "configure: failed program was:" >&5
12974   cat conftest.$ac_ext >&5
12975   rm -fr conftest*
12976   fu_cv_sys_stat_fs_data=no
12977 fi
12978 rm -fr conftest*
12979 fi
12980
12981 fi
12982
12983   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12984   if test $fu_cv_sys_stat_fs_data = yes; then
12985     space=yes
12986     cat >> confdefs.h <<\EOF
12987 #define STAT_STATFS2_FS_DATA 1
12988 EOF
12989
12990   fi
12991 fi
12992
12993 #
12994 # As a gating factor for large file support, in order to
12995 # use <4GB files we must have the following minimal support
12996 # available.
12997 # long long, and a 64 bit off_t or off64_t.
12998 # If we don't have all of these then disable large
12999 # file support.
13000 #
13001 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13002 echo "configure:13003: checking if large file support can be enabled" >&5
13003 cat > conftest.$ac_ext <<EOF
13004 #line 13005 "configure"
13005 #include "confdefs.h"
13006
13007 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13008 #include <sys/types.h>
13009 #else
13010 __COMPILE_ERROR_
13011 #endif
13012
13013 int main() {
13014 int i
13015 ; return 0; }
13016 EOF
13017 if { (eval echo configure:13018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13018   rm -rf conftest*
13019   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13020 else
13021   echo "configure: failed program was:" >&5
13022   cat conftest.$ac_ext >&5
13023   rm -rf conftest*
13024   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13025 fi
13026 rm -f conftest*
13027 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13028     cat >> confdefs.h <<\EOF
13029 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13030 EOF
13031
13032 fi
13033 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13034
13035 # Check whether --with-spinlocks or --without-spinlocks was given.
13036 if test "${with_spinlocks+set}" = set; then
13037   withval="$with_spinlocks"
13038   :
13039 fi
13040
13041 if test "x$with_spinlocks" = "xyes"; then
13042     cat >> confdefs.h <<\EOF
13043 #define USE_SPINLOCKS 1
13044 EOF
13045
13046
13047     case "$host_cpu" in
13048         sparc)
13049             cat >> confdefs.h <<\EOF
13050 #define SPARC_SPINLOCKS 1
13051 EOF
13052
13053             ;;
13054
13055         i386|i486|i586|i686)
13056             cat >> confdefs.h <<\EOF
13057 #define INTEL_SPINLOCKS 1
13058 EOF
13059
13060             ;;
13061
13062         mips)
13063             cat >> confdefs.h <<\EOF
13064 #define MIPS_SPINLOCKS 1
13065 EOF
13066
13067             ;;
13068
13069         powerpc)
13070             cat >> confdefs.h <<\EOF
13071 #define POWERPC_SPINLOCKS 1
13072 EOF
13073
13074             ;;
13075     esac
13076 fi
13077
13078 #################################################
13079 # check for ACL support
13080
13081 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13082 echo "configure:13083: checking whether to support ACLs" >&5
13083 # Check whether --with-acl-support or --without-acl-support was given.
13084 if test "${with_acl_support+set}" = set; then
13085   withval="$with_acl_support"
13086    case "$withval" in
13087   yes)
13088
13089         case "$host_os" in
13090         *sysv5*)
13091                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13092                 cat >> confdefs.h <<\EOF
13093 #define HAVE_UNIXWARE_ACLS 1
13094 EOF
13095
13096                 ;;
13097         *solaris*)
13098                 echo "$ac_t""Using solaris ACLs" 1>&6
13099                 cat >> confdefs.h <<\EOF
13100 #define HAVE_SOLARIS_ACLS 1
13101 EOF
13102
13103                 ;;
13104         *hpux*)
13105                 echo "$ac_t""Using HPUX ACLs" 1>&6
13106                 cat >> confdefs.h <<\EOF
13107 #define HAVE_HPUX_ACLS 1
13108 EOF
13109
13110                 ;;
13111         *irix*)
13112                 echo "$ac_t""Using IRIX ACLs" 1>&6
13113                 cat >> confdefs.h <<\EOF
13114 #define HAVE_IRIX_ACLS 1
13115 EOF
13116
13117                 ;;
13118         *aix*)
13119                 echo "$ac_t""Using AIX ACLs" 1>&6
13120                 cat >> confdefs.h <<\EOF
13121 #define HAVE_AIX_ACLS 1
13122 EOF
13123
13124                 ;;
13125         *osf*)
13126                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13127                 cat >> confdefs.h <<\EOF
13128 #define HAVE_TRU64_ACLS 1
13129 EOF
13130
13131                 LIBS="$LIBS -lpacl"
13132                 ;;
13133         *)
13134                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13135 echo "configure:13136: checking for acl_get_file in -lacl" >&5
13136 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13138   echo $ac_n "(cached) $ac_c" 1>&6
13139 else
13140   ac_save_LIBS="$LIBS"
13141 LIBS="-lacl  $LIBS"
13142 cat > conftest.$ac_ext <<EOF
13143 #line 13144 "configure"
13144 #include "confdefs.h"
13145 /* Override any gcc2 internal prototype to avoid an error.  */
13146 /* We use char because int might match the return type of a gcc2
13147     builtin and then its argument prototype would still apply.  */
13148 char acl_get_file();
13149
13150 int main() {
13151 acl_get_file()
13152 ; return 0; }
13153 EOF
13154 if { (eval echo configure:13155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13155   rm -rf conftest*
13156   eval "ac_cv_lib_$ac_lib_var=yes"
13157 else
13158   echo "configure: failed program was:" >&5
13159   cat conftest.$ac_ext >&5
13160   rm -rf conftest*
13161   eval "ac_cv_lib_$ac_lib_var=no"
13162 fi
13163 rm -f conftest*
13164 LIBS="$ac_save_LIBS"
13165
13166 fi
13167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13168   echo "$ac_t""yes" 1>&6
13169     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13171   cat >> confdefs.h <<EOF
13172 #define $ac_tr_lib 1
13173 EOF
13174
13175   LIBS="-lacl $LIBS"
13176
13177 else
13178   echo "$ac_t""no" 1>&6
13179 fi
13180
13181                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13182 echo "configure:13183: checking for ACL support" >&5
13183 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+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_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
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_POSIX_ACLS=yes
13199 else
13200   echo "configure: failed program was:" >&5
13201   cat conftest.$ac_ext >&5
13202   rm -rf conftest*
13203   samba_cv_HAVE_POSIX_ACLS=no
13204 fi
13205 rm -f conftest*
13206 fi
13207
13208 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13209                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13210                                 echo "$ac_t""Using posix ACLs" 1>&6
13211                                 cat >> confdefs.h <<\EOF
13212 #define HAVE_POSIX_ACLS 1
13213 EOF
13214
13215                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13216 echo "configure:13217: checking for acl_get_perm_np" >&5
13217 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13218   echo $ac_n "(cached) $ac_c" 1>&6
13219 else
13220   
13221                                 cat > conftest.$ac_ext <<EOF
13222 #line 13223 "configure"
13223 #include "confdefs.h"
13224 #include <sys/types.h>
13225 #include <sys/acl.h>
13226 int main() {
13227  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13228 ; return 0; }
13229 EOF
13230 if { (eval echo configure:13231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13231   rm -rf conftest*
13232   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13233 else
13234   echo "configure: failed program was:" >&5
13235   cat conftest.$ac_ext >&5
13236   rm -rf conftest*
13237   samba_cv_HAVE_ACL_GET_PERM_NP=no
13238 fi
13239 rm -f conftest*
13240 fi
13241
13242 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13243                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13244                                         cat >> confdefs.h <<\EOF
13245 #define HAVE_ACL_GET_PERM_NP 1
13246 EOF
13247
13248                                 fi
13249                         fi
13250             ;;
13251         esac
13252         ;;
13253   *)
13254     echo "$ac_t""no" 1>&6
13255     cat >> confdefs.h <<\EOF
13256 #define HAVE_NO_ACLS 1
13257 EOF
13258
13259     ;;
13260   esac 
13261 else
13262   cat >> confdefs.h <<\EOF
13263 #define HAVE_NO_ACLS 1
13264 EOF
13265
13266   echo "$ac_t""no" 1>&6
13267
13268 fi
13269
13270
13271 #################################################
13272 # Check whether winbind is supported on this platform.  If so we need to
13273 # build and install client programs (WINBIND_TARGETS), sbin programs
13274 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13275
13276 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13277 echo "configure:13278: checking whether to build winbind" >&5
13278
13279 # Initially, the value of $host_os decides whether winbind is supported
13280
13281 case "$host_os" in 
13282         *linux*|*solaris*|*irix*)
13283                 HAVE_WINBIND=yes
13284                 ;;
13285         *)
13286                 HAVE_WINBIND=no
13287                 winbind_no_reason=", unsupported on $host_os"
13288                 ;;
13289 esac
13290
13291 # Check the setting of --with-winbindd
13292
13293 # Check whether --with-winbind or --without-winbind was given.
13294 if test "${with_winbind+set}" = set; then
13295   withval="$with_winbind"
13296    
13297   case "$withval" in
13298         yes)
13299                 HAVE_WINBIND=yes
13300                 ;;
13301         no)
13302                 HAVE_WINBIND=no
13303                 winbind_reason=""
13304                 ;;
13305   esac 
13306 fi
13307
13308
13309 # We need unix domain sockets for winbind
13310
13311 if test x"$HAVE_WINBIND" = x"yes"; then
13312         if test x"$samba_cv_unixsocket" = x"no"; then
13313                 winbind_no_reason=", no unix domain socket support on $host_os"
13314                 HAVE_WINBIND=no
13315         fi
13316 fi
13317
13318 # Display test results
13319
13320
13321 WINBIND_TARGETS=""
13322 WINBIND_STARGETS=""
13323 WINBIND_LTARGETS=""
13324 WINBIND_PAM_PROGS=""
13325
13326 if test x"$HAVE_WINBIND" = x"yes"; then
13327         echo "$ac_t""yes" 1>&6
13328
13329         WINBIND_TARGETS="bin/wbinfo"
13330         WINBIND_STARGETS="bin/winbindd"
13331         if test x"$BLDSHARED" = x"true"; then
13332                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13333                 if test x"$with_pam" = x"yes"; then
13334                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13335                 fi
13336         fi
13337 else
13338         echo "$ac_t""no$winbind_no_reason" 1>&6
13339 fi
13340
13341 # Substitution time!
13342
13343
13344
13345
13346
13347
13348 #################################################
13349 # Check to see if we should use the included popt 
13350
13351 # Check whether --with-included-popt or --without-included-popt was given.
13352 if test "${with_included_popt+set}" = set; then
13353   withval="$with_included_popt"
13354    
13355   case "$withval" in
13356         yes)
13357                 INCLUDED_POPT=yes
13358                 ;;
13359         no)
13360                 INCLUDED_POPT=no
13361                 ;;
13362   esac 
13363 fi
13364
13365 if test x"$INCLUDED_POPT" != x"yes"; then
13366     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13367 echo "configure:13368: checking for poptGetContext in -lpopt" >&5
13368 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13369 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13370   echo $ac_n "(cached) $ac_c" 1>&6
13371 else
13372   ac_save_LIBS="$LIBS"
13373 LIBS="-lpopt  $LIBS"
13374 cat > conftest.$ac_ext <<EOF
13375 #line 13376 "configure"
13376 #include "confdefs.h"
13377 /* Override any gcc2 internal prototype to avoid an error.  */
13378 /* We use char because int might match the return type of a gcc2
13379     builtin and then its argument prototype would still apply.  */
13380 char poptGetContext();
13381
13382 int main() {
13383 poptGetContext()
13384 ; return 0; }
13385 EOF
13386 if { (eval echo configure:13387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13387   rm -rf conftest*
13388   eval "ac_cv_lib_$ac_lib_var=yes"
13389 else
13390   echo "configure: failed program was:" >&5
13391   cat conftest.$ac_ext >&5
13392   rm -rf conftest*
13393   eval "ac_cv_lib_$ac_lib_var=no"
13394 fi
13395 rm -f conftest*
13396 LIBS="$ac_save_LIBS"
13397
13398 fi
13399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13400   echo "$ac_t""yes" 1>&6
13401   INCLUDED_POPT=no
13402 else
13403   echo "$ac_t""no" 1>&6
13404 INCLUDED_POPT=yes
13405 fi
13406
13407 fi
13408
13409 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13410 echo "configure:13411: checking whether to use included popt" >&5
13411 if test x"$INCLUDED_POPT" = x"yes"; then
13412     echo "$ac_t""$srcdir/popt" 1>&6
13413     BUILD_POPT='$(POPT_OBJS)'
13414     FLAGS1="-I$srcdir/popt"
13415 else
13416     echo "$ac_t""no" 1>&6
13417     LIBS="$LIBS -lpopt"
13418 fi
13419
13420
13421
13422 #################################################
13423 # final configure stuff
13424
13425 echo "checking configure summary"
13426 if test "$cross_compiling" = yes; then
13427   :
13428 else
13429   cat > conftest.$ac_ext <<EOF
13430 #line 13431 "configure"
13431 #include "confdefs.h"
13432 #include "${srcdir-.}/tests/summary.c"
13433 EOF
13434 if { (eval echo configure:13435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13435 then
13436   echo "configure OK";
13437 else
13438   echo "configure: failed program was:" >&5
13439   cat conftest.$ac_ext >&5
13440   rm -fr conftest*
13441   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13442 fi
13443 rm -fr conftest*
13444 fi
13445
13446
13447 builddir=`pwd`
13448
13449
13450 trap '' 1 2 15
13451 cat > confcache <<\EOF
13452 # This file is a shell script that caches the results of configure
13453 # tests run on this system so they can be shared between configure
13454 # scripts and configure runs.  It is not useful on other systems.
13455 # If it contains results you don't want to keep, you may remove or edit it.
13456 #
13457 # By default, configure uses ./config.cache as the cache file,
13458 # creating it if it does not exist already.  You can give configure
13459 # the --cache-file=FILE option to use a different cache file; that is
13460 # what configure does when it calls configure scripts in
13461 # subdirectories, so they share the cache.
13462 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13463 # config.status only pays attention to the cache file if you give it the
13464 # --recheck option to rerun configure.
13465 #
13466 EOF
13467 # The following way of writing the cache mishandles newlines in values,
13468 # but we know of no workaround that is simple, portable, and efficient.
13469 # So, don't put newlines in cache variables' values.
13470 # Ultrix sh set writes to stderr and can't be redirected directly,
13471 # and sets the high bit in the cache file unless we assign to the vars.
13472 (set) 2>&1 |
13473   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13474   *ac_space=\ *)
13475     # `set' does not quote correctly, so add quotes (double-quote substitution
13476     # turns \\\\ into \\, and sed turns \\ into \).
13477     sed -n \
13478       -e "s/'/'\\\\''/g" \
13479       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13480     ;;
13481   *)
13482     # `set' quotes correctly as required by POSIX, so do not add quotes.
13483     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13484     ;;
13485   esac >> confcache
13486 if cmp -s $cache_file confcache; then
13487   :
13488 else
13489   if test -w $cache_file; then
13490     echo "updating cache $cache_file"
13491     cat confcache > $cache_file
13492   else
13493     echo "not updating unwritable cache $cache_file"
13494   fi
13495 fi
13496 rm -f confcache
13497
13498 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13499
13500 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13501 # Let make expand exec_prefix.
13502 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13503
13504 # Any assignment to VPATH causes Sun make to only execute
13505 # the first set of double-colon rules, so remove it if not needed.
13506 # If there is a colon in the path, we need to keep it.
13507 if test "x$srcdir" = x.; then
13508   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13509 fi
13510
13511 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13512
13513 DEFS=-DHAVE_CONFIG_H
13514
13515 # Without the "./", some shells look in PATH for config.status.
13516 : ${CONFIG_STATUS=./config.status}
13517
13518 echo creating $CONFIG_STATUS
13519 rm -f $CONFIG_STATUS
13520 cat > $CONFIG_STATUS <<EOF
13521 #! /bin/sh
13522 # Generated automatically by configure.
13523 # Run this file to recreate the current configuration.
13524 # This directory was configured as follows,
13525 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13526 #
13527 # $0 $ac_configure_args
13528 #
13529 # Compiler output produced by configure, useful for debugging
13530 # configure, is in ./config.log if it exists.
13531
13532 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13533 for ac_option
13534 do
13535   case "\$ac_option" in
13536   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13537     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13538     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13539   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13540     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13541     exit 0 ;;
13542   -help | --help | --hel | --he | --h)
13543     echo "\$ac_cs_usage"; exit 0 ;;
13544   *) echo "\$ac_cs_usage"; exit 1 ;;
13545   esac
13546 done
13547
13548 ac_given_srcdir=$srcdir
13549 ac_given_INSTALL="$INSTALL"
13550
13551 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13552 EOF
13553 cat >> $CONFIG_STATUS <<EOF
13554
13555 # Protect against being on the right side of a sed subst in config.status.
13556 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13557  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13558 $ac_vpsub
13559 $extrasub
13560 s%@SHELL@%$SHELL%g
13561 s%@CFLAGS@%$CFLAGS%g
13562 s%@CPPFLAGS@%$CPPFLAGS%g
13563 s%@CXXFLAGS@%$CXXFLAGS%g
13564 s%@FFLAGS@%$FFLAGS%g
13565 s%@DEFS@%$DEFS%g
13566 s%@LDFLAGS@%$LDFLAGS%g
13567 s%@LIBS@%$LIBS%g
13568 s%@exec_prefix@%$exec_prefix%g
13569 s%@prefix@%$prefix%g
13570 s%@program_transform_name@%$program_transform_name%g
13571 s%@bindir@%$bindir%g
13572 s%@sbindir@%$sbindir%g
13573 s%@libexecdir@%$libexecdir%g
13574 s%@datadir@%$datadir%g
13575 s%@sysconfdir@%$sysconfdir%g
13576 s%@sharedstatedir@%$sharedstatedir%g
13577 s%@localstatedir@%$localstatedir%g
13578 s%@libdir@%$libdir%g
13579 s%@includedir@%$includedir%g
13580 s%@oldincludedir@%$oldincludedir%g
13581 s%@infodir@%$infodir%g
13582 s%@mandir@%$mandir%g
13583 s%@RUNPROG@%$RUNPROG%g
13584 s%@MPROGS@%$MPROGS%g
13585 s%@LDSHFLAGS@%$LDSHFLAGS%g
13586 s%@SHLD@%$SHLD%g
13587 s%@HOST_OS@%$HOST_OS%g
13588 s%@PAM_MOD@%$PAM_MOD%g
13589 s%@WRAP@%$WRAP%g
13590 s%@WRAP32@%$WRAP32%g
13591 s%@PICFLAG@%$PICFLAG%g
13592 s%@PICSUFFIX@%$PICSUFFIX%g
13593 s%@POBAD_CC@%$POBAD_CC%g
13594 s%@SHLIBEXT@%$SHLIBEXT%g
13595 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13596 s%@CC@%$CC%g
13597 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13598 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13599 s%@INSTALL_DATA@%$INSTALL_DATA%g
13600 s%@AWK@%$AWK%g
13601 s%@BROKEN_CC@%$BROKEN_CC%g
13602 s%@host@%$host%g
13603 s%@host_alias@%$host_alias%g
13604 s%@host_cpu@%$host_cpu%g
13605 s%@host_vendor@%$host_vendor%g
13606 s%@host_os@%$host_os%g
13607 s%@target@%$target%g
13608 s%@target_alias@%$target_alias%g
13609 s%@target_cpu@%$target_cpu%g
13610 s%@target_vendor@%$target_vendor%g
13611 s%@target_os@%$target_os%g
13612 s%@build@%$build%g
13613 s%@build_alias@%$build_alias%g
13614 s%@build_cpu@%$build_cpu%g
13615 s%@build_vendor@%$build_vendor%g
13616 s%@build_os@%$build_os%g
13617 s%@CPP@%$CPP%g
13618 s%@LIBOBJS@%$LIBOBJS%g
13619 s%@TERMLIBS@%$TERMLIBS%g
13620 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13621 s%@ROFF@%$ROFF%g
13622 s%@QUOTAOBJS@%$QUOTAOBJS%g
13623 s%@privatedir@%$privatedir%g
13624 s%@lockdir@%$lockdir%g
13625 s%@swatdir@%$swatdir%g
13626 s%@manlangs@%$manlangs%g
13627 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13628 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13629 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13630 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13631 s%@BUILD_POPT@%$BUILD_POPT%g
13632 s%@FLAGS1@%$FLAGS1%g
13633 s%@builddir@%$builddir%g
13634
13635 CEOF
13636 EOF
13637
13638 cat >> $CONFIG_STATUS <<\EOF
13639
13640 # Split the substitutions into bite-sized pieces for seds with
13641 # small command number limits, like on Digital OSF/1 and HP-UX.
13642 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13643 ac_file=1 # Number of current file.
13644 ac_beg=1 # First line for current file.
13645 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13646 ac_more_lines=:
13647 ac_sed_cmds=""
13648 while $ac_more_lines; do
13649   if test $ac_beg -gt 1; then
13650     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13651   else
13652     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13653   fi
13654   if test ! -s conftest.s$ac_file; then
13655     ac_more_lines=false
13656     rm -f conftest.s$ac_file
13657   else
13658     if test -z "$ac_sed_cmds"; then
13659       ac_sed_cmds="sed -f conftest.s$ac_file"
13660     else
13661       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13662     fi
13663     ac_file=`expr $ac_file + 1`
13664     ac_beg=$ac_end
13665     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13666   fi
13667 done
13668 if test -z "$ac_sed_cmds"; then
13669   ac_sed_cmds=cat
13670 fi
13671 EOF
13672
13673 cat >> $CONFIG_STATUS <<EOF
13674
13675 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13676 EOF
13677 cat >> $CONFIG_STATUS <<\EOF
13678 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13679   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13680   case "$ac_file" in
13681   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13682        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13683   *) ac_file_in="${ac_file}.in" ;;
13684   esac
13685
13686   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13687
13688   # Remove last slash and all that follows it.  Not all systems have dirname.
13689   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13690   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13691     # The file is in a subdirectory.
13692     test ! -d "$ac_dir" && mkdir "$ac_dir"
13693     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13694     # A "../" for each directory in $ac_dir_suffix.
13695     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13696   else
13697     ac_dir_suffix= ac_dots=
13698   fi
13699
13700   case "$ac_given_srcdir" in
13701   .)  srcdir=.
13702       if test -z "$ac_dots"; then top_srcdir=.
13703       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13704   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13705   *) # Relative path.
13706     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13707     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13708   esac
13709
13710   case "$ac_given_INSTALL" in
13711   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13712   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13713   esac
13714
13715   echo creating "$ac_file"
13716   rm -f "$ac_file"
13717   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13718   case "$ac_file" in
13719   *Makefile*) ac_comsub="1i\\
13720 # $configure_input" ;;
13721   *) ac_comsub= ;;
13722   esac
13723
13724   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13725   sed -e "$ac_comsub
13726 s%@configure_input@%$configure_input%g
13727 s%@srcdir@%$srcdir%g
13728 s%@top_srcdir@%$top_srcdir%g
13729 s%@INSTALL@%$INSTALL%g
13730 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13731 fi; done
13732 rm -f conftest.s*
13733
13734 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13735 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13736 #
13737 # ac_d sets the value in "#define NAME VALUE" lines.
13738 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13739 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13740 ac_dC='\3'
13741 ac_dD='%g'
13742 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13743 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13744 ac_uB='\([      ]\)%\1#\2define\3'
13745 ac_uC=' '
13746 ac_uD='\4%g'
13747 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13748 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13749 ac_eB='$%\1#\2define\3'
13750 ac_eC=' '
13751 ac_eD='%g'
13752
13753 if test "${CONFIG_HEADERS+set}" != set; then
13754 EOF
13755 cat >> $CONFIG_STATUS <<EOF
13756   CONFIG_HEADERS="include/config.h"
13757 EOF
13758 cat >> $CONFIG_STATUS <<\EOF
13759 fi
13760 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13761   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13762   case "$ac_file" in
13763   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13764        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13765   *) ac_file_in="${ac_file}.in" ;;
13766   esac
13767
13768   echo creating $ac_file
13769
13770   rm -f conftest.frag conftest.in conftest.out
13771   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13772   cat $ac_file_inputs > conftest.in
13773
13774 EOF
13775
13776 # Transform confdefs.h into a sed script conftest.vals that substitutes
13777 # the proper values into config.h.in to produce config.h.  And first:
13778 # Protect against being on the right side of a sed subst in config.status.
13779 # Protect against being in an unquoted here document in config.status.
13780 rm -f conftest.vals
13781 cat > conftest.hdr <<\EOF
13782 s/[\\&%]/\\&/g
13783 s%[\\$`]%\\&%g
13784 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13785 s%ac_d%ac_u%gp
13786 s%ac_u%ac_e%gp
13787 EOF
13788 sed -n -f conftest.hdr confdefs.h > conftest.vals
13789 rm -f conftest.hdr
13790
13791 # This sed command replaces #undef with comments.  This is necessary, for
13792 # example, in the case of _POSIX_SOURCE, which is predefined and required
13793 # on some systems where configure will not decide to define it.
13794 cat >> conftest.vals <<\EOF
13795 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13796 EOF
13797
13798 # Break up conftest.vals because some shells have a limit on
13799 # the size of here documents, and old seds have small limits too.
13800
13801 rm -f conftest.tail
13802 while :
13803 do
13804   ac_lines=`grep -c . conftest.vals`
13805   # grep -c gives empty output for an empty file on some AIX systems.
13806   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13807   # Write a limited-size here document to conftest.frag.
13808   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13809   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13810   echo 'CEOF
13811   sed -f conftest.frag conftest.in > conftest.out
13812   rm -f conftest.in
13813   mv conftest.out conftest.in
13814 ' >> $CONFIG_STATUS
13815   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13816   rm -f conftest.vals
13817   mv conftest.tail conftest.vals
13818 done
13819 rm -f conftest.vals
13820
13821 cat >> $CONFIG_STATUS <<\EOF
13822   rm -f conftest.frag conftest.h
13823   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13824   cat conftest.in >> conftest.h
13825   rm -f conftest.in
13826   if cmp -s $ac_file conftest.h 2>/dev/null; then
13827     echo "$ac_file is unchanged"
13828     rm -f conftest.h
13829   else
13830     # Remove last slash and all that follows it.  Not all systems have dirname.
13831       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13832       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13833       # The file is in a subdirectory.
13834       test ! -d "$ac_dir" && mkdir "$ac_dir"
13835     fi
13836     rm -f $ac_file
13837     mv conftest.h $ac_file
13838   fi
13839 fi; done
13840
13841 EOF
13842 cat >> $CONFIG_STATUS <<EOF
13843
13844 EOF
13845 cat >> $CONFIG_STATUS <<\EOF
13846
13847 exit 0
13848 EOF
13849 chmod +x $CONFIG_STATUS
13850 rm -fr confdefs* $ac_clean_files
13851 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13852
13853
13854 #################################################
13855 # Print very concise instructions on building/use
13856 if test "x$enable_dmalloc" = xyes
13857 then
13858         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
13859         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
13860 fi