Rerun autoconf.
[samba.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-krb5developer      turn on developer warnings and debugging, except -Wstrict-prototypes [default=no]"
21 ac_help="$ac_help
22   --enable-dmalloc          enable heap debugging [default=no]"
23 ac_help="$ac_help
24   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
25 ac_help="$ac_help
26   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
27 ac_help="$ac_help
28   --with-smbwrapper       Include SMB wrapper support (default=no) "
29 ac_help="$ac_help
30   --with-afs              Include AFS clear-text auth support (default=no) "
31 ac_help="$ac_help
32   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
33 ac_help="$ac_help
34   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
35 ac_help="$ac_help
36   --with-automount        Include AUTOMOUNT support (default=no)"
37 ac_help="$ac_help
38   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
39 ac_help="$ac_help
40   --with-pam              Include PAM support (default=no)"
41 ac_help="$ac_help
42   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
43 ac_help="$ac_help
44   --with-tdbsam           Include experimental TDB SAM support (default=no)"
45 ac_help="$ac_help
46   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
47 ac_help="$ac_help
48   --with-nisplussam       Include NISPLUS SAM support (default=no)"
49 ac_help="$ac_help
50   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
51 ac_help="$ac_help
52   --with-ssl              Include SSL support (default=no)
53   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
54   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
55 ac_help="$ac_help
56   --with-syslog           Include experimental SYSLOG support (default=no)"
57 ac_help="$ac_help
58   --with-profiling-data   Include gathering source code profile information (default=no)"
59 ac_help="$ac_help
60   --with-quotas           Include experimental disk-quota support (default=no)"
61 ac_help="$ac_help
62   --with-utmp             Include experimental utmp accounting (default=no)"
63 ac_help="$ac_help
64   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
65 ac_help="$ac_help
66   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
67 ac_help="$ac_help
68   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
69 ac_help="$ac_help
70   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
71 ac_help="$ac_help
72   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
73 ac_help="$ac_help
74   --with-acl-support      Include ACL support (default=no)"
75 ac_help="$ac_help
76   --with-winbind          Build winbind (default, if supported by OS)"
77 ac_help="$ac_help
78   --with-included-popt    use bundled popt library, not from system"
79
80 # Initialize some variables set by options.
81 # The variables have the same names as the options, with
82 # dashes changed to underlines.
83 build=NONE
84 cache_file=./config.cache
85 exec_prefix=NONE
86 host=NONE
87 no_create=
88 nonopt=NONE
89 no_recursion=
90 prefix=NONE
91 program_prefix=NONE
92 program_suffix=NONE
93 program_transform_name=s,x,x,
94 silent=
95 site=
96 srcdir=
97 target=NONE
98 verbose=
99 x_includes=NONE
100 x_libraries=NONE
101 bindir='${exec_prefix}/bin'
102 sbindir='${exec_prefix}/sbin'
103 libexecdir='${exec_prefix}/libexec'
104 datadir='${prefix}/share'
105 sysconfdir='${prefix}/etc'
106 sharedstatedir='${prefix}/com'
107 localstatedir='${prefix}/var'
108 libdir='${exec_prefix}/lib'
109 includedir='${prefix}/include'
110 oldincludedir='/usr/include'
111 infodir='${prefix}/info'
112 mandir='${prefix}/man'
113
114 # Initialize some other variables.
115 subdirs=
116 MFLAGS= MAKEFLAGS=
117 SHELL=${CONFIG_SHELL-/bin/sh}
118 # Maximum number of lines to put in a shell here document.
119 ac_max_here_lines=12
120
121 ac_prev=
122 for ac_option
123 do
124
125   # If the previous option needs an argument, assign it.
126   if test -n "$ac_prev"; then
127     eval "$ac_prev=\$ac_option"
128     ac_prev=
129     continue
130   fi
131
132   case "$ac_option" in
133   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
134   *) ac_optarg= ;;
135   esac
136
137   # Accept the important Cygnus configure options, so we can diagnose typos.
138
139   case "$ac_option" in
140
141   -bindir | --bindir | --bindi | --bind | --bin | --bi)
142     ac_prev=bindir ;;
143   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
144     bindir="$ac_optarg" ;;
145
146   -build | --build | --buil | --bui | --bu)
147     ac_prev=build ;;
148   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
149     build="$ac_optarg" ;;
150
151   -cache-file | --cache-file | --cache-fil | --cache-fi \
152   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
153     ac_prev=cache_file ;;
154   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
155   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
156     cache_file="$ac_optarg" ;;
157
158   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
159     ac_prev=datadir ;;
160   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
161   | --da=*)
162     datadir="$ac_optarg" ;;
163
164   -disable-* | --disable-*)
165     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
166     # Reject names that are not valid shell variable names.
167     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
168       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
169     fi
170     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
171     eval "enable_${ac_feature}=no" ;;
172
173   -enable-* | --enable-*)
174     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
175     # Reject names that are not valid shell variable names.
176     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
177       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
178     fi
179     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
180     case "$ac_option" in
181       *=*) ;;
182       *) ac_optarg=yes ;;
183     esac
184     eval "enable_${ac_feature}='$ac_optarg'" ;;
185
186   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
187   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
188   | --exec | --exe | --ex)
189     ac_prev=exec_prefix ;;
190   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
191   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
192   | --exec=* | --exe=* | --ex=*)
193     exec_prefix="$ac_optarg" ;;
194
195   -gas | --gas | --ga | --g)
196     # Obsolete; use --with-gas.
197     with_gas=yes ;;
198
199   -help | --help | --hel | --he)
200     # Omit some internal or obsolete options to make the list less imposing.
201     # This message is too long to be a string in the A/UX 3.1 sh.
202     cat << EOF
203 Usage: configure [options] [host]
204 Options: [defaults in brackets after descriptions]
205 Configuration:
206   --cache-file=FILE       cache test results in FILE
207   --help                  print this message
208   --no-create             do not create output files
209   --quiet, --silent       do not print \`checking...' messages
210   --version               print the version of autoconf that created configure
211 Directory and file names:
212   --prefix=PREFIX         install architecture-independent files in PREFIX
213                           [$ac_default_prefix]
214   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
215                           [same as prefix]
216   --bindir=DIR            user executables in DIR [EPREFIX/bin]
217   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
218   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
219   --datadir=DIR           read-only architecture-independent data in DIR
220                           [PREFIX/share]
221   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
222   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
223                           [PREFIX/com]
224   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
225   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
226   --includedir=DIR        C header files in DIR [PREFIX/include]
227   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
228   --infodir=DIR           info documentation in DIR [PREFIX/info]
229   --mandir=DIR            man documentation in DIR [PREFIX/man]
230   --srcdir=DIR            find the sources in DIR [configure dir or ..]
231   --program-prefix=PREFIX prepend PREFIX to installed program names
232   --program-suffix=SUFFIX append SUFFIX to installed program names
233   --program-transform-name=PROGRAM
234                           run sed PROGRAM on installed program names
235 EOF
236     cat << EOF
237 Host type:
238   --build=BUILD           configure for building on BUILD [BUILD=HOST]
239   --host=HOST             configure for HOST [guessed]
240   --target=TARGET         configure for TARGET [TARGET=HOST]
241 Features and packages:
242   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
243   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
244   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
245   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
246   --x-includes=DIR        X include files are in DIR
247   --x-libraries=DIR       X library files are in DIR
248 EOF
249     if test -n "$ac_help"; then
250       echo "--enable and --with options recognized:$ac_help"
251     fi
252     exit 0 ;;
253
254   -host | --host | --hos | --ho)
255     ac_prev=host ;;
256   -host=* | --host=* | --hos=* | --ho=*)
257     host="$ac_optarg" ;;
258
259   -includedir | --includedir | --includedi | --included | --include \
260   | --includ | --inclu | --incl | --inc)
261     ac_prev=includedir ;;
262   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
263   | --includ=* | --inclu=* | --incl=* | --inc=*)
264     includedir="$ac_optarg" ;;
265
266   -infodir | --infodir | --infodi | --infod | --info | --inf)
267     ac_prev=infodir ;;
268   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
269     infodir="$ac_optarg" ;;
270
271   -libdir | --libdir | --libdi | --libd)
272     ac_prev=libdir ;;
273   -libdir=* | --libdir=* | --libdi=* | --libd=*)
274     libdir="$ac_optarg" ;;
275
276   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
277   | --libexe | --libex | --libe)
278     ac_prev=libexecdir ;;
279   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
280   | --libexe=* | --libex=* | --libe=*)
281     libexecdir="$ac_optarg" ;;
282
283   -localstatedir | --localstatedir | --localstatedi | --localstated \
284   | --localstate | --localstat | --localsta | --localst \
285   | --locals | --local | --loca | --loc | --lo)
286     ac_prev=localstatedir ;;
287   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
288   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
289   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
290     localstatedir="$ac_optarg" ;;
291
292   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
293     ac_prev=mandir ;;
294   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
295     mandir="$ac_optarg" ;;
296
297   -nfp | --nfp | --nf)
298     # Obsolete; use --without-fp.
299     with_fp=no ;;
300
301   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
302   | --no-cr | --no-c)
303     no_create=yes ;;
304
305   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
306   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
307     no_recursion=yes ;;
308
309   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
310   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
311   | --oldin | --oldi | --old | --ol | --o)
312     ac_prev=oldincludedir ;;
313   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
314   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
315   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
316     oldincludedir="$ac_optarg" ;;
317
318   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
319     ac_prev=prefix ;;
320   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
321     prefix="$ac_optarg" ;;
322
323   -program-prefix | --program-prefix | --program-prefi | --program-pref \
324   | --program-pre | --program-pr | --program-p)
325     ac_prev=program_prefix ;;
326   -program-prefix=* | --program-prefix=* | --program-prefi=* \
327   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
328     program_prefix="$ac_optarg" ;;
329
330   -program-suffix | --program-suffix | --program-suffi | --program-suff \
331   | --program-suf | --program-su | --program-s)
332     ac_prev=program_suffix ;;
333   -program-suffix=* | --program-suffix=* | --program-suffi=* \
334   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
335     program_suffix="$ac_optarg" ;;
336
337   -program-transform-name | --program-transform-name \
338   | --program-transform-nam | --program-transform-na \
339   | --program-transform-n | --program-transform- \
340   | --program-transform | --program-transfor \
341   | --program-transfo | --program-transf \
342   | --program-trans | --program-tran \
343   | --progr-tra | --program-tr | --program-t)
344     ac_prev=program_transform_name ;;
345   -program-transform-name=* | --program-transform-name=* \
346   | --program-transform-nam=* | --program-transform-na=* \
347   | --program-transform-n=* | --program-transform-=* \
348   | --program-transform=* | --program-transfor=* \
349   | --program-transfo=* | --program-transf=* \
350   | --program-trans=* | --program-tran=* \
351   | --progr-tra=* | --program-tr=* | --program-t=*)
352     program_transform_name="$ac_optarg" ;;
353
354   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
355   | -silent | --silent | --silen | --sile | --sil)
356     silent=yes ;;
357
358   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
359     ac_prev=sbindir ;;
360   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
361   | --sbi=* | --sb=*)
362     sbindir="$ac_optarg" ;;
363
364   -sharedstatedir | --sharedstatedir | --sharedstatedi \
365   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
366   | --sharedst | --shareds | --shared | --share | --shar \
367   | --sha | --sh)
368     ac_prev=sharedstatedir ;;
369   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
370   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
371   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
372   | --sha=* | --sh=*)
373     sharedstatedir="$ac_optarg" ;;
374
375   -site | --site | --sit)
376     ac_prev=site ;;
377   -site=* | --site=* | --sit=*)
378     site="$ac_optarg" ;;
379
380   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
381     ac_prev=srcdir ;;
382   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
383     srcdir="$ac_optarg" ;;
384
385   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
386   | --syscon | --sysco | --sysc | --sys | --sy)
387     ac_prev=sysconfdir ;;
388   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
389   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
390     sysconfdir="$ac_optarg" ;;
391
392   -target | --target | --targe | --targ | --tar | --ta | --t)
393     ac_prev=target ;;
394   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
395     target="$ac_optarg" ;;
396
397   -v | -verbose | --verbose | --verbos | --verbo | --verb)
398     verbose=yes ;;
399
400   -version | --version | --versio | --versi | --vers)
401     echo "configure generated by autoconf version 2.13"
402     exit 0 ;;
403
404   -with-* | --with-*)
405     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
406     # Reject names that are not valid shell variable names.
407     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
408       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
409     fi
410     ac_package=`echo $ac_package| sed 's/-/_/g'`
411     case "$ac_option" in
412       *=*) ;;
413       *) ac_optarg=yes ;;
414     esac
415     eval "with_${ac_package}='$ac_optarg'" ;;
416
417   -without-* | --without-*)
418     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
419     # Reject names that are not valid shell variable names.
420     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
421       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
422     fi
423     ac_package=`echo $ac_package| sed 's/-/_/g'`
424     eval "with_${ac_package}=no" ;;
425
426   --x)
427     # Obsolete; use --with-x.
428     with_x=yes ;;
429
430   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
431   | --x-incl | --x-inc | --x-in | --x-i)
432     ac_prev=x_includes ;;
433   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
434   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
435     x_includes="$ac_optarg" ;;
436
437   -x-libraries | --x-libraries | --x-librarie | --x-librari \
438   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
439     ac_prev=x_libraries ;;
440   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
441   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
442     x_libraries="$ac_optarg" ;;
443
444   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
445     ;;
446
447   *)
448     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
449       echo "configure: warning: $ac_option: invalid host type" 1>&2
450     fi
451     if test "x$nonopt" != xNONE; then
452       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
453     fi
454     nonopt="$ac_option"
455     ;;
456
457   esac
458 done
459
460 if test -n "$ac_prev"; then
461   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
462 fi
463
464 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
465
466 # File descriptor usage:
467 # 0 standard input
468 # 1 file creation
469 # 2 errors and warnings
470 # 3 some systems may open it to /dev/tty
471 # 4 used on the Kubota Titan
472 # 6 checking for... messages and results
473 # 5 compiler messages saved in config.log
474 if test "$silent" = yes; then
475   exec 6>/dev/null
476 else
477   exec 6>&1
478 fi
479 exec 5>./config.log
480
481 echo "\
482 This file contains any messages produced by compilers while
483 running configure, to aid debugging if configure makes a mistake.
484 " 1>&5
485
486 # Strip out --no-create and --no-recursion so they do not pile up.
487 # Also quote any args containing shell metacharacters.
488 ac_configure_args=
489 for ac_arg
490 do
491   case "$ac_arg" in
492   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
493   | --no-cr | --no-c) ;;
494   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
495   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
496   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
497   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
498   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
499   esac
500 done
501
502 # NLS nuisances.
503 # Only set these to C if already set.  These must not be set unconditionally
504 # because not all systems understand e.g. LANG=C (notably SCO).
505 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
506 # Non-C LC_CTYPE values break the ctype check.
507 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
508 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
509 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
510 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
511
512 # confdefs.h avoids OS command line length limits that DEFS can exceed.
513 rm -rf conftest* confdefs.h
514 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
515 echo > confdefs.h
516
517 # A filename unique to this package, relative to the directory that
518 # configure is in, which we can look for to find out if srcdir is correct.
519 ac_unique_file=include/includes.h
520
521 # Find the source files, if location was not specified.
522 if test -z "$srcdir"; then
523   ac_srcdir_defaulted=yes
524   # Try the directory containing this script, then its parent.
525   ac_prog=$0
526   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
527   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
528   srcdir=$ac_confdir
529   if test ! -r $srcdir/$ac_unique_file; then
530     srcdir=..
531   fi
532 else
533   ac_srcdir_defaulted=no
534 fi
535 if test ! -r $srcdir/$ac_unique_file; then
536   if test "$ac_srcdir_defaulted" = yes; then
537     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
538   else
539     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
540   fi
541 fi
542 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
543
544 # Prefer explicitly selected file to automatically selected ones.
545 if test -z "$CONFIG_SITE"; then
546   if test "x$prefix" != xNONE; then
547     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
548   else
549     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
550   fi
551 fi
552 for ac_site_file in $CONFIG_SITE; do
553   if test -r "$ac_site_file"; then
554     echo "loading site script $ac_site_file"
555     . "$ac_site_file"
556   fi
557 done
558
559 if test -r "$cache_file"; then
560   echo "loading cache $cache_file"
561   . $cache_file
562 else
563   echo "creating cache $cache_file"
564   > $cache_file
565 fi
566
567 ac_ext=c
568 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
569 ac_cpp='$CPP $CPPFLAGS'
570 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
571 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
572 cross_compiling=$ac_cv_prog_cc_cross
573
574 ac_exeext=
575 ac_objext=o
576 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
577   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
578   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
579     ac_n= ac_c='
580 ' ac_t='        '
581   else
582     ac_n=-n ac_c= ac_t=
583   fi
584 else
585   ac_n= ac_c='\c' ac_t=
586 fi
587
588
589
590 # we want to be compatible with older versions of Samba
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608 # compile with optimisation and without debugging by default
609 CFLAGS="-O ${CFLAGS}"
610
611 # Check whether --enable-debug or --disable-debug was given.
612 if test "${enable_debug+set}" = set; then
613   enableval="$enable_debug"
614   if eval "test x$enable_debug = xyes"; then
615         CFLAGS="${CFLAGS} -g"
616     fi
617 fi
618
619
620 # Check whether --enable-developer or --disable-developer was given.
621 if test "${enable_developer+set}" = set; then
622   enableval="$enable_developer"
623   if eval "test x$enable_developer = xyes"; then
624         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
625     fi
626 fi
627
628
629 # Check whether --enable-krb5developer or --disable-krb5developer was given.
630 if test "${enable_krb5developer+set}" = set; then
631   enableval="$enable_krb5developer"
632   if eval "test x$enable_krb5developer = xyes"; then
633         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
634     fi
635 fi
636
637
638 # Check whether --enable-dmalloc or --disable-dmalloc was given.
639 if test "${enable_dmalloc+set}" = set; then
640   enableval="$enable_dmalloc"
641   :
642 fi
643
644
645 if test "x$enable_dmalloc" = xyes
646 then
647         cat >> confdefs.h <<\EOF
648 #define ENABLE_DMALLOC 1
649 EOF
650
651         cat >> confdefs.h <<\EOF
652 #define DMALLOC_FUNC_CHECK 1
653 EOF
654
655         LIBS="$LIBS -ldmalloc"  
656 fi
657
658 # Extract the first word of "gcc", so it can be a program name with args.
659 set dummy gcc; ac_word=$2
660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
661 echo "configure:662: checking for $ac_word" >&5
662 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
663   echo $ac_n "(cached) $ac_c" 1>&6
664 else
665   if test -n "$CC"; then
666   ac_cv_prog_CC="$CC" # Let the user override the test.
667 else
668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
669   ac_dummy="$PATH"
670   for ac_dir in $ac_dummy; do
671     test -z "$ac_dir" && ac_dir=.
672     if test -f $ac_dir/$ac_word; then
673       ac_cv_prog_CC="gcc"
674       break
675     fi
676   done
677   IFS="$ac_save_ifs"
678 fi
679 fi
680 CC="$ac_cv_prog_CC"
681 if test -n "$CC"; then
682   echo "$ac_t""$CC" 1>&6
683 else
684   echo "$ac_t""no" 1>&6
685 fi
686
687 if test -z "$CC"; then
688   # Extract the first word of "cc", so it can be a program name with args.
689 set dummy cc; ac_word=$2
690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
691 echo "configure:692: checking for $ac_word" >&5
692 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
693   echo $ac_n "(cached) $ac_c" 1>&6
694 else
695   if test -n "$CC"; then
696   ac_cv_prog_CC="$CC" # Let the user override the test.
697 else
698   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
699   ac_prog_rejected=no
700   ac_dummy="$PATH"
701   for ac_dir in $ac_dummy; do
702     test -z "$ac_dir" && ac_dir=.
703     if test -f $ac_dir/$ac_word; then
704       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
705         ac_prog_rejected=yes
706         continue
707       fi
708       ac_cv_prog_CC="cc"
709       break
710     fi
711   done
712   IFS="$ac_save_ifs"
713 if test $ac_prog_rejected = yes; then
714   # We found a bogon in the path, so make sure we never use it.
715   set dummy $ac_cv_prog_CC
716   shift
717   if test $# -gt 0; then
718     # We chose a different compiler from the bogus one.
719     # However, it has the same basename, so the bogon will be chosen
720     # first if we set CC to just the basename; use the full file name.
721     shift
722     set dummy "$ac_dir/$ac_word" "$@"
723     shift
724     ac_cv_prog_CC="$@"
725   fi
726 fi
727 fi
728 fi
729 CC="$ac_cv_prog_CC"
730 if test -n "$CC"; then
731   echo "$ac_t""$CC" 1>&6
732 else
733   echo "$ac_t""no" 1>&6
734 fi
735
736   if test -z "$CC"; then
737     case "`uname -s`" in
738     *win32* | *WIN32*)
739       # Extract the first word of "cl", so it can be a program name with args.
740 set dummy cl; ac_word=$2
741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
742 echo "configure:743: checking for $ac_word" >&5
743 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
744   echo $ac_n "(cached) $ac_c" 1>&6
745 else
746   if test -n "$CC"; then
747   ac_cv_prog_CC="$CC" # Let the user override the test.
748 else
749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
750   ac_dummy="$PATH"
751   for ac_dir in $ac_dummy; do
752     test -z "$ac_dir" && ac_dir=.
753     if test -f $ac_dir/$ac_word; then
754       ac_cv_prog_CC="cl"
755       break
756     fi
757   done
758   IFS="$ac_save_ifs"
759 fi
760 fi
761 CC="$ac_cv_prog_CC"
762 if test -n "$CC"; then
763   echo "$ac_t""$CC" 1>&6
764 else
765   echo "$ac_t""no" 1>&6
766 fi
767  ;;
768     esac
769   fi
770   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
771 fi
772
773 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
774 echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
775
776 ac_ext=c
777 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
778 ac_cpp='$CPP $CPPFLAGS'
779 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
780 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
781 cross_compiling=$ac_cv_prog_cc_cross
782
783 cat > conftest.$ac_ext << EOF
784
785 #line 786 "configure"
786 #include "confdefs.h"
787
788 main(){return(0);}
789 EOF
790 if { (eval echo configure:791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
791   ac_cv_prog_cc_works=yes
792   # If we can't run a trivial program, we are probably using a cross compiler.
793   if (./conftest; exit) 2>/dev/null; then
794     ac_cv_prog_cc_cross=no
795   else
796     ac_cv_prog_cc_cross=yes
797   fi
798 else
799   echo "configure: failed program was:" >&5
800   cat conftest.$ac_ext >&5
801   ac_cv_prog_cc_works=no
802 fi
803 rm -fr conftest*
804 ac_ext=c
805 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
806 ac_cpp='$CPP $CPPFLAGS'
807 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
808 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
809 cross_compiling=$ac_cv_prog_cc_cross
810
811 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
812 if test $ac_cv_prog_cc_works = no; then
813   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
814 fi
815 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
816 echo "configure:817: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
817 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
818 cross_compiling=$ac_cv_prog_cc_cross
819
820 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
821 echo "configure:822: checking whether we are using GNU C" >&5
822 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
823   echo $ac_n "(cached) $ac_c" 1>&6
824 else
825   cat > conftest.c <<EOF
826 #ifdef __GNUC__
827   yes;
828 #endif
829 EOF
830 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
831   ac_cv_prog_gcc=yes
832 else
833   ac_cv_prog_gcc=no
834 fi
835 fi
836
837 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
838
839 if test $ac_cv_prog_gcc = yes; then
840   GCC=yes
841 else
842   GCC=
843 fi
844
845 ac_test_CFLAGS="${CFLAGS+set}"
846 ac_save_CFLAGS="$CFLAGS"
847 CFLAGS=
848 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
849 echo "configure:850: checking whether ${CC-cc} accepts -g" >&5
850 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
851   echo $ac_n "(cached) $ac_c" 1>&6
852 else
853   echo 'void f(){}' > conftest.c
854 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
855   ac_cv_prog_cc_g=yes
856 else
857   ac_cv_prog_cc_g=no
858 fi
859 rm -f conftest*
860
861 fi
862
863 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
864 if test "$ac_test_CFLAGS" = set; then
865   CFLAGS="$ac_save_CFLAGS"
866 elif test $ac_cv_prog_cc_g = yes; then
867   if test "$GCC" = yes; then
868     CFLAGS="-g -O2"
869   else
870     CFLAGS="-g"
871   fi
872 else
873   if test "$GCC" = yes; then
874     CFLAGS="-O2"
875   else
876     CFLAGS=
877   fi
878 fi
879
880 ac_aux_dir=
881 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
882   if test -f $ac_dir/install-sh; then
883     ac_aux_dir=$ac_dir
884     ac_install_sh="$ac_aux_dir/install-sh -c"
885     break
886   elif test -f $ac_dir/install.sh; then
887     ac_aux_dir=$ac_dir
888     ac_install_sh="$ac_aux_dir/install.sh -c"
889     break
890   fi
891 done
892 if test -z "$ac_aux_dir"; then
893   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
894 fi
895 ac_config_guess=$ac_aux_dir/config.guess
896 ac_config_sub=$ac_aux_dir/config.sub
897 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
898
899 # Find a good install program.  We prefer a C program (faster),
900 # so one script is as good as another.  But avoid the broken or
901 # incompatible versions:
902 # SysV /etc/install, /usr/sbin/install
903 # SunOS /usr/etc/install
904 # IRIX /sbin/install
905 # AIX /bin/install
906 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
907 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
908 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
909 # ./install, which can be erroneously created by make from ./install.sh.
910 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
911 echo "configure:912: checking for a BSD compatible install" >&5
912 if test -z "$INSTALL"; then
913 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
914   echo $ac_n "(cached) $ac_c" 1>&6
915 else
916     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
917   for ac_dir in $PATH; do
918     # Account for people who put trailing slashes in PATH elements.
919     case "$ac_dir/" in
920     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
921     *)
922       # OSF1 and SCO ODT 3.0 have their own names for install.
923       # Don't use installbsd from OSF since it installs stuff as root
924       # by default.
925       for ac_prog in ginstall scoinst install; do
926         if test -f $ac_dir/$ac_prog; then
927           if test $ac_prog = install &&
928             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
929             # AIX install.  It has an incompatible calling convention.
930             :
931           else
932             ac_cv_path_install="$ac_dir/$ac_prog -c"
933             break 2
934           fi
935         fi
936       done
937       ;;
938     esac
939   done
940   IFS="$ac_save_IFS"
941
942 fi
943   if test "${ac_cv_path_install+set}" = set; then
944     INSTALL="$ac_cv_path_install"
945   else
946     # As a last resort, use the slow shell script.  We don't cache a
947     # path for INSTALL within a source directory, because that will
948     # break other packages using the cache if that directory is
949     # removed, or if the path is relative.
950     INSTALL="$ac_install_sh"
951   fi
952 fi
953 echo "$ac_t""$INSTALL" 1>&6
954
955 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
956 # It thinks the first close brace ends the variable substitution.
957 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
958
959 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
960
961 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
962
963 for ac_prog in gawk mawk nawk awk
964 do
965 # Extract the first word of "$ac_prog", so it can be a program name with args.
966 set dummy $ac_prog; ac_word=$2
967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
968 echo "configure:969: checking for $ac_word" >&5
969 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
970   echo $ac_n "(cached) $ac_c" 1>&6
971 else
972   if test -n "$AWK"; then
973   ac_cv_prog_AWK="$AWK" # Let the user override the test.
974 else
975   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
976   ac_dummy="$PATH"
977   for ac_dir in $ac_dummy; do
978     test -z "$ac_dir" && ac_dir=.
979     if test -f $ac_dir/$ac_word; then
980       ac_cv_prog_AWK="$ac_prog"
981       break
982     fi
983   done
984   IFS="$ac_save_ifs"
985 fi
986 fi
987 AWK="$ac_cv_prog_AWK"
988 if test -n "$AWK"; then
989   echo "$ac_t""$AWK" 1>&6
990 else
991   echo "$ac_t""no" 1>&6
992 fi
993
994 test -n "$AWK" && break
995 done
996
997
998 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
999 echo "configure:1000: checking for POSIXized ISC" >&5
1000 if test -d /etc/conf/kconfig.d &&
1001   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1002 then
1003   echo "$ac_t""yes" 1>&6
1004   ISC=yes # If later tests want to check for ISC.
1005   cat >> confdefs.h <<\EOF
1006 #define _POSIX_SOURCE 1
1007 EOF
1008
1009   if test "$GCC" = yes; then
1010     CC="$CC -posix"
1011   else
1012     CC="$CC -Xp"
1013   fi
1014 else
1015   echo "$ac_t""no" 1>&6
1016   ISC=
1017 fi
1018
1019
1020 if test "x$CC" != xcc; then
1021   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1022 echo "configure:1023: checking whether $CC and cc understand -c and -o together" >&5
1023 else
1024   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1025 echo "configure:1026: checking whether cc understands -c and -o together" >&5
1026 fi
1027 set dummy $CC; ac_cc="`echo $2 |
1028                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1029 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1030   echo $ac_n "(cached) $ac_c" 1>&6
1031 else
1032   echo 'foo(){}' > conftest.c
1033 # Make sure it works both with $CC and with simple cc.
1034 # We do the test twice because some compilers refuse to overwrite an
1035 # existing .o file with -o, though they will create one.
1036 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1037 if { (eval echo configure:1038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1038    test -f conftest.o && { (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1039 then
1040   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1041   if test "x$CC" != xcc; then
1042     # Test first that cc exists at all.
1043     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1044       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1045       if { (eval echo configure:1046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1046          test -f conftest.o && { (eval echo configure:1047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1047       then
1048         # cc works too.
1049         :
1050       else
1051         # cc exists but doesn't like -o.
1052         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1053       fi
1054     fi
1055   fi
1056 else
1057   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1058 fi
1059 rm -f conftest*
1060
1061 fi
1062 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1063   echo "$ac_t""yes" 1>&6
1064 else
1065   echo "$ac_t""no" 1>&6
1066   cat >> confdefs.h <<\EOF
1067 #define NO_MINUS_C_MINUS_O 1
1068 EOF
1069
1070 fi
1071
1072 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1073       BROKEN_CC=
1074 else
1075       BROKEN_CC=#
1076 fi
1077
1078
1079 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1080 echo "configure:1081: checking that the C compiler understands volatile" >&5
1081 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1082   echo $ac_n "(cached) $ac_c" 1>&6
1083 else
1084   
1085     cat > conftest.$ac_ext <<EOF
1086 #line 1087 "configure"
1087 #include "confdefs.h"
1088 #include <sys/types.h>
1089 int main() {
1090 volatile int i = 0
1091 ; return 0; }
1092 EOF
1093 if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1094   rm -rf conftest*
1095   samba_cv_volatile=yes
1096 else
1097   echo "configure: failed program was:" >&5
1098   cat conftest.$ac_ext >&5
1099   rm -rf conftest*
1100   samba_cv_volatile=no
1101 fi
1102 rm -f conftest*
1103 fi
1104
1105 echo "$ac_t""$samba_cv_volatile" 1>&6
1106 if test x"$samba_cv_volatile" = x"yes"; then
1107    cat >> confdefs.h <<\EOF
1108 #define HAVE_VOLATILE 1
1109 EOF
1110
1111 fi
1112
1113
1114
1115 # Do some error checking and defaulting for the host and target type.
1116 # The inputs are:
1117 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1118 #
1119 # The rules are:
1120 # 1. You are not allowed to specify --host, --target, and nonopt at the
1121 #    same time.
1122 # 2. Host defaults to nonopt.
1123 # 3. If nonopt is not specified, then host defaults to the current host,
1124 #    as determined by config.guess.
1125 # 4. Target and build default to nonopt.
1126 # 5. If nonopt is not specified, then target and build default to host.
1127
1128 # The aliases save the names the user supplied, while $host etc.
1129 # will get canonicalized.
1130 case $host---$target---$nonopt in
1131 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1132 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1133 esac
1134
1135
1136 # Make sure we can run config.sub.
1137 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1138 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1139 fi
1140
1141 echo $ac_n "checking host system type""... $ac_c" 1>&6
1142 echo "configure:1143: checking host system type" >&5
1143
1144 host_alias=$host
1145 case "$host_alias" in
1146 NONE)
1147   case $nonopt in
1148   NONE)
1149     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1150     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1151     fi ;;
1152   *) host_alias=$nonopt ;;
1153   esac ;;
1154 esac
1155
1156 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1157 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1158 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1159 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1160 echo "$ac_t""$host" 1>&6
1161
1162 echo $ac_n "checking target system type""... $ac_c" 1>&6
1163 echo "configure:1164: checking target system type" >&5
1164
1165 target_alias=$target
1166 case "$target_alias" in
1167 NONE)
1168   case $nonopt in
1169   NONE) target_alias=$host_alias ;;
1170   *) target_alias=$nonopt ;;
1171   esac ;;
1172 esac
1173
1174 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1175 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1176 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1177 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1178 echo "$ac_t""$target" 1>&6
1179
1180 echo $ac_n "checking build system type""... $ac_c" 1>&6
1181 echo "configure:1182: checking build system type" >&5
1182
1183 build_alias=$build
1184 case "$build_alias" in
1185 NONE)
1186   case $nonopt in
1187   NONE) build_alias=$host_alias ;;
1188   *) build_alias=$nonopt ;;
1189   esac ;;
1190 esac
1191
1192 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1193 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1194 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1195 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1196 echo "$ac_t""$build" 1>&6
1197
1198 test "$host_alias" != "$target_alias" &&
1199   test "$program_prefix$program_suffix$program_transform_name" = \
1200     NONENONEs,x,x, &&
1201   program_prefix=${target_alias}-
1202
1203
1204   case "$host_os" in
1205         *irix6*) cat >> confdefs.h <<\EOF
1206 #include <standards.h>
1207 EOF
1208
1209         ;;
1210 esac
1211
1212
1213     
1214     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1215 echo "configure:1216: checking config.cache system type" >&5
1216     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1217          test x"$ac_cv_host_system_type" != x"$host"; } ||
1218        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1219          test x"$ac_cv_build_system_type" != x"$build"; } ||
1220        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1221          test x"$ac_cv_target_system_type" != x"$target"; }; then
1222         echo "$ac_t""different" 1>&6
1223         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1224     else
1225         echo "$ac_t""same" 1>&6
1226     fi
1227     ac_cv_host_system_type="$host"
1228     ac_cv_build_system_type="$build"
1229     ac_cv_target_system_type="$target"
1230
1231
1232 DYNEXP=
1233
1234 #
1235 # Config CPPFLAG settings for strange OS's that must be set
1236 # before other tests.
1237 #
1238 case "$host_os" in
1239 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1240     *hpux*)
1241     
1242       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1243 echo "configure:1244: checking whether ${CC-cc} accepts -Ae" >&5
1244 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1245   echo $ac_n "(cached) $ac_c" 1>&6
1246 else
1247   echo 'void f(){}' > conftest.c
1248 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1249   ac_cv_prog_cc_Ae=yes
1250 else
1251   ac_cv_prog_cc_Ae=no
1252 fi
1253 rm -f conftest*
1254
1255 fi
1256
1257 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1258       # mmap on HPUX is completely broken...
1259       cat >> confdefs.h <<\EOF
1260 #define MMAP_BLACKLIST 1
1261 EOF
1262
1263       if test $ac_cv_prog_cc_Ae = yes; then
1264         CPPFLAGS="$CPPFLAGS -Ae"
1265       fi
1266 #
1267 # Defines needed for HPUX support.
1268 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1269 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1270 #
1271       case `uname -r` in
1272                         *9*|*10*)
1273                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1274                                 cat >> confdefs.h <<\EOF
1275 #define USE_BOTH_CRYPT_CALLS 1
1276 EOF
1277
1278                                 ;;
1279                         *11*)
1280                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1281                                 cat >> confdefs.h <<\EOF
1282 #define USE_BOTH_CRYPT_CALLS 1
1283 EOF
1284
1285                                 ;;
1286       esac
1287       DYNEXP="-Wl,-E"
1288       ;;
1289
1290 #
1291 # CRAY Unicos has broken const handling
1292        *unicos*)
1293           echo "$ac_t""disabling const" 1>&6
1294           CPPFLAGS="$CPPFLAGS -Dconst="
1295           ;;
1296         
1297 #
1298 # AIX4.x doesn't even admit to having large
1299 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1300 #
1301     *aix4*)
1302           echo "$ac_t""enabling large file support" 1>&6
1303       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1304       ;;    
1305 #
1306 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1307 # to the existance of large files..
1308 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1309 # recommendations on large file support, however it makes the
1310 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1311 # recommendation makes the compile fail on gcc2.7. JRA.
1312 #
1313         *solaris*)
1314                 case `uname -r` in
1315                         5.0*|5.1*|5.2*|5.3*|5.5*)
1316                                 echo "$ac_t""no large file support" 1>&6
1317                                 ;;
1318                         5.*)
1319                         echo "$ac_t""enabling large file support" 1>&6
1320                         if test "$ac_cv_prog_gcc" = yes; then
1321                                 ${CC-cc} -v >conftest.c 2>&1
1322                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1323                                 rm -fr conftest.c
1324                                 case "$ac_cv_gcc_compiler_version_number" in
1325                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1326                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1327                                                 ;;
1328                                         *)
1329                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1330                                                 ;;
1331                                 esac
1332                         else
1333                 DYNEXP="-dc -dp"
1334                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1335                         fi
1336                         ;;
1337                 esac
1338                 ;;
1339 #
1340 # Tests needed for SINIX large file support.
1341 #
1342     *sysv4*)
1343       if test $host = mips-sni-sysv4 ; then
1344         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1345 echo "configure:1346: checking for LFS support" >&5
1346         old_CPPFLAGS="$CPPFLAGS"
1347         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1348         if test "$cross_compiling" = yes; then
1349   SINIX_LFS_SUPPORT=cross
1350 else
1351   cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354
1355 #include <unistd.h>
1356 main () {
1357 #if _LFS64_LARGEFILE == 1
1358 exit(0);
1359 #else
1360 exit(1);
1361 #endif
1362 }
1363 EOF
1364 if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1365 then
1366   SINIX_LFS_SUPPORT=yes
1367 else
1368   echo "configure: failed program was:" >&5
1369   cat conftest.$ac_ext >&5
1370   rm -fr conftest*
1371   SINIX_LFS_SUPPORT=no
1372 fi
1373 rm -fr conftest*
1374 fi
1375
1376         CPPFLAGS="$old_CPPFLAGS"
1377         if test x$SINIX_LFS_SUPPORT = xyes ; then
1378           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1379           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1380           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1381           LIBS="`getconf LFS64_LIBS` $LIBS"
1382         fi
1383       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1384       fi
1385     ;;
1386
1387 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1388 #
1389     *linux*)
1390         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1391 echo "configure:1392: checking for LFS support" >&5
1392         old_CPPFLAGS="$CPPFLAGS"
1393         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1394        if test "$cross_compiling" = yes; then
1395   LINUX_LFS_SUPPORT=cross
1396 else
1397   cat > conftest.$ac_ext <<EOF
1398 #line 1399 "configure"
1399 #include "confdefs.h"
1400
1401 #include <unistd.h>
1402 #include <sys/utsname.h>
1403 main() {
1404 #if _LFS64_LARGEFILE == 1
1405        struct utsname uts;
1406        char *release;
1407        int major, minor;
1408
1409        /* Ensure this is glibc 2.2 or higher */
1410 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1411        int libc_major = __GLIBC__;
1412        int libc_minor = __GLIBC_MINOR__;
1413
1414        if (libc_major < 2)
1415               exit(1);
1416        if (libc_minor < 2)
1417               exit(1);
1418 #endif
1419
1420        /* Ensure this is kernel 2.4 or higher */
1421
1422        uname(&uts);
1423        release = uts.release;
1424        major = atoi(strsep(&release, "."));
1425        minor = atoi(strsep(&release, "."));
1426
1427        if (major > 2 || (major == 2 && minor > 3))
1428                exit(0);
1429        exit(1);
1430 #else
1431        exit(1);
1432 #endif
1433 }
1434
1435 EOF
1436 if { (eval echo configure:1437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1437 then
1438   LINUX_LFS_SUPPORT=yes
1439 else
1440   echo "configure: failed program was:" >&5
1441   cat conftest.$ac_ext >&5
1442   rm -fr conftest*
1443   LINUX_LFS_SUPPORT=no
1444 fi
1445 rm -fr conftest*
1446 fi
1447
1448         CPPFLAGS="$old_CPPFLAGS"
1449         if test x$LINUX_LFS_SUPPORT = xyes ; then
1450           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1451         fi
1452        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1453                 ;;
1454
1455     *hurd*)
1456         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1457 echo "configure:1458: checking for LFS support" >&5
1458         old_CPPFLAGS="$CPPFLAGS"
1459         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1460         if test "$cross_compiling" = yes; then
1461   GLIBC_LFS_SUPPORT=cross
1462 else
1463   cat > conftest.$ac_ext <<EOF
1464 #line 1465 "configure"
1465 #include "confdefs.h"
1466
1467 #include <unistd.h>
1468 main () {
1469 #if _LFS64_LARGEFILE == 1
1470 exit(0);
1471 #else
1472 exit(1);
1473 #endif
1474 }
1475 EOF
1476 if { (eval echo configure:1477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1477 then
1478   GLIBC_LFS_SUPPORT=yes
1479 else
1480   echo "configure: failed program was:" >&5
1481   cat conftest.$ac_ext >&5
1482   rm -fr conftest*
1483   GLIBC_LFS_SUPPORT=no
1484 fi
1485 rm -fr conftest*
1486 fi
1487
1488         CPPFLAGS="$old_CPPFLAGS"
1489         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1490           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1491         fi
1492       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1493     ;;
1494
1495 esac
1496
1497 echo $ac_n "checking for inline""... $ac_c" 1>&6
1498 echo "configure:1499: checking for inline" >&5
1499 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1500   echo $ac_n "(cached) $ac_c" 1>&6
1501 else
1502   ac_cv_c_inline=no
1503 for ac_kw in inline __inline__ __inline; do
1504   cat > conftest.$ac_ext <<EOF
1505 #line 1506 "configure"
1506 #include "confdefs.h"
1507
1508 int main() {
1509 } $ac_kw foo() {
1510 ; return 0; }
1511 EOF
1512 if { (eval echo configure:1513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1513   rm -rf conftest*
1514   ac_cv_c_inline=$ac_kw; break
1515 else
1516   echo "configure: failed program was:" >&5
1517   cat conftest.$ac_ext >&5
1518 fi
1519 rm -f conftest*
1520 done
1521
1522 fi
1523
1524 echo "$ac_t""$ac_cv_c_inline" 1>&6
1525 case "$ac_cv_c_inline" in
1526   inline | yes) ;;
1527   no) cat >> confdefs.h <<\EOF
1528 #define inline 
1529 EOF
1530  ;;
1531   *)  cat >> confdefs.h <<EOF
1532 #define inline $ac_cv_c_inline
1533 EOF
1534  ;;
1535 esac
1536
1537 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1538 echo "configure:1539: checking how to run the C preprocessor" >&5
1539 # On Suns, sometimes $CPP names a directory.
1540 if test -n "$CPP" && test -d "$CPP"; then
1541   CPP=
1542 fi
1543 if test -z "$CPP"; then
1544 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1545   echo $ac_n "(cached) $ac_c" 1>&6
1546 else
1547     # This must be in double quotes, not single quotes, because CPP may get
1548   # substituted into the Makefile and "${CC-cc}" will confuse make.
1549   CPP="${CC-cc} -E"
1550   # On the NeXT, cc -E runs the code through the compiler's parser,
1551   # not just through cpp.
1552   cat > conftest.$ac_ext <<EOF
1553 #line 1554 "configure"
1554 #include "confdefs.h"
1555 #include <assert.h>
1556 Syntax Error
1557 EOF
1558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1559 { (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1561 if test -z "$ac_err"; then
1562   :
1563 else
1564   echo "$ac_err" >&5
1565   echo "configure: failed program was:" >&5
1566   cat conftest.$ac_ext >&5
1567   rm -rf conftest*
1568   CPP="${CC-cc} -E -traditional-cpp"
1569   cat > conftest.$ac_ext <<EOF
1570 #line 1571 "configure"
1571 #include "confdefs.h"
1572 #include <assert.h>
1573 Syntax Error
1574 EOF
1575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1576 { (eval echo configure:1577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1578 if test -z "$ac_err"; then
1579   :
1580 else
1581   echo "$ac_err" >&5
1582   echo "configure: failed program was:" >&5
1583   cat conftest.$ac_ext >&5
1584   rm -rf conftest*
1585   CPP="${CC-cc} -nologo -E"
1586   cat > conftest.$ac_ext <<EOF
1587 #line 1588 "configure"
1588 #include "confdefs.h"
1589 #include <assert.h>
1590 Syntax Error
1591 EOF
1592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1593 { (eval echo configure:1594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1595 if test -z "$ac_err"; then
1596   :
1597 else
1598   echo "$ac_err" >&5
1599   echo "configure: failed program was:" >&5
1600   cat conftest.$ac_ext >&5
1601   rm -rf conftest*
1602   CPP=/lib/cpp
1603 fi
1604 rm -f conftest*
1605 fi
1606 rm -f conftest*
1607 fi
1608 rm -f conftest*
1609   ac_cv_prog_CPP="$CPP"
1610 fi
1611   CPP="$ac_cv_prog_CPP"
1612 else
1613   ac_cv_prog_CPP="$CPP"
1614 fi
1615 echo "$ac_t""$CPP" 1>&6
1616
1617 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1618 echo "configure:1619: checking for ANSI C header files" >&5
1619 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1620   echo $ac_n "(cached) $ac_c" 1>&6
1621 else
1622   cat > conftest.$ac_ext <<EOF
1623 #line 1624 "configure"
1624 #include "confdefs.h"
1625 #include <stdlib.h>
1626 #include <stdarg.h>
1627 #include <string.h>
1628 #include <float.h>
1629 EOF
1630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1631 { (eval echo configure:1632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1633 if test -z "$ac_err"; then
1634   rm -rf conftest*
1635   ac_cv_header_stdc=yes
1636 else
1637   echo "$ac_err" >&5
1638   echo "configure: failed program was:" >&5
1639   cat conftest.$ac_ext >&5
1640   rm -rf conftest*
1641   ac_cv_header_stdc=no
1642 fi
1643 rm -f conftest*
1644
1645 if test $ac_cv_header_stdc = yes; then
1646   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1647 cat > conftest.$ac_ext <<EOF
1648 #line 1649 "configure"
1649 #include "confdefs.h"
1650 #include <string.h>
1651 EOF
1652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1653   egrep "memchr" >/dev/null 2>&1; then
1654   :
1655 else
1656   rm -rf conftest*
1657   ac_cv_header_stdc=no
1658 fi
1659 rm -f conftest*
1660
1661 fi
1662
1663 if test $ac_cv_header_stdc = yes; then
1664   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1665 cat > conftest.$ac_ext <<EOF
1666 #line 1667 "configure"
1667 #include "confdefs.h"
1668 #include <stdlib.h>
1669 EOF
1670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1671   egrep "free" >/dev/null 2>&1; then
1672   :
1673 else
1674   rm -rf conftest*
1675   ac_cv_header_stdc=no
1676 fi
1677 rm -f conftest*
1678
1679 fi
1680
1681 if test $ac_cv_header_stdc = yes; then
1682   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1683 if test "$cross_compiling" = yes; then
1684   :
1685 else
1686   cat > conftest.$ac_ext <<EOF
1687 #line 1688 "configure"
1688 #include "confdefs.h"
1689 #include <ctype.h>
1690 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1691 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1692 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1693 int main () { int i; for (i = 0; i < 256; i++)
1694 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1695 exit (0); }
1696
1697 EOF
1698 if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1699 then
1700   :
1701 else
1702   echo "configure: failed program was:" >&5
1703   cat conftest.$ac_ext >&5
1704   rm -fr conftest*
1705   ac_cv_header_stdc=no
1706 fi
1707 rm -fr conftest*
1708 fi
1709
1710 fi
1711 fi
1712
1713 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1714 if test $ac_cv_header_stdc = yes; then
1715   cat >> confdefs.h <<\EOF
1716 #define STDC_HEADERS 1
1717 EOF
1718
1719 fi
1720
1721 ac_header_dirent=no
1722 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1723 do
1724 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1725 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1726 echo "configure:1727: checking for $ac_hdr that defines DIR" >&5
1727 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1728   echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730   cat > conftest.$ac_ext <<EOF
1731 #line 1732 "configure"
1732 #include "confdefs.h"
1733 #include <sys/types.h>
1734 #include <$ac_hdr>
1735 int main() {
1736 DIR *dirp = 0;
1737 ; return 0; }
1738 EOF
1739 if { (eval echo configure:1740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1740   rm -rf conftest*
1741   eval "ac_cv_header_dirent_$ac_safe=yes"
1742 else
1743   echo "configure: failed program was:" >&5
1744   cat conftest.$ac_ext >&5
1745   rm -rf conftest*
1746   eval "ac_cv_header_dirent_$ac_safe=no"
1747 fi
1748 rm -f conftest*
1749 fi
1750 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1751   echo "$ac_t""yes" 1>&6
1752     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1753   cat >> confdefs.h <<EOF
1754 #define $ac_tr_hdr 1
1755 EOF
1756  ac_header_dirent=$ac_hdr; break
1757 else
1758   echo "$ac_t""no" 1>&6
1759 fi
1760 done
1761 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1762 if test $ac_header_dirent = dirent.h; then
1763 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1764 echo "configure:1765: checking for opendir in -ldir" >&5
1765 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1767   echo $ac_n "(cached) $ac_c" 1>&6
1768 else
1769   ac_save_LIBS="$LIBS"
1770 LIBS="-ldir  $LIBS"
1771 cat > conftest.$ac_ext <<EOF
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774 /* Override any gcc2 internal prototype to avoid an error.  */
1775 /* We use char because int might match the return type of a gcc2
1776     builtin and then its argument prototype would still apply.  */
1777 char opendir();
1778
1779 int main() {
1780 opendir()
1781 ; return 0; }
1782 EOF
1783 if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1784   rm -rf conftest*
1785   eval "ac_cv_lib_$ac_lib_var=yes"
1786 else
1787   echo "configure: failed program was:" >&5
1788   cat conftest.$ac_ext >&5
1789   rm -rf conftest*
1790   eval "ac_cv_lib_$ac_lib_var=no"
1791 fi
1792 rm -f conftest*
1793 LIBS="$ac_save_LIBS"
1794
1795 fi
1796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1797   echo "$ac_t""yes" 1>&6
1798   LIBS="$LIBS -ldir"
1799 else
1800   echo "$ac_t""no" 1>&6
1801 fi
1802
1803 else
1804 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1805 echo "configure:1806: checking for opendir in -lx" >&5
1806 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1807 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1808   echo $ac_n "(cached) $ac_c" 1>&6
1809 else
1810   ac_save_LIBS="$LIBS"
1811 LIBS="-lx  $LIBS"
1812 cat > conftest.$ac_ext <<EOF
1813 #line 1814 "configure"
1814 #include "confdefs.h"
1815 /* Override any gcc2 internal prototype to avoid an error.  */
1816 /* We use char because int might match the return type of a gcc2
1817     builtin and then its argument prototype would still apply.  */
1818 char opendir();
1819
1820 int main() {
1821 opendir()
1822 ; return 0; }
1823 EOF
1824 if { (eval echo configure:1825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1825   rm -rf conftest*
1826   eval "ac_cv_lib_$ac_lib_var=yes"
1827 else
1828   echo "configure: failed program was:" >&5
1829   cat conftest.$ac_ext >&5
1830   rm -rf conftest*
1831   eval "ac_cv_lib_$ac_lib_var=no"
1832 fi
1833 rm -f conftest*
1834 LIBS="$ac_save_LIBS"
1835
1836 fi
1837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1838   echo "$ac_t""yes" 1>&6
1839   LIBS="$LIBS -lx"
1840 else
1841   echo "$ac_t""no" 1>&6
1842 fi
1843
1844 fi
1845
1846 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1847 echo "configure:1848: checking whether time.h and sys/time.h may both be included" >&5
1848 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1849   echo $ac_n "(cached) $ac_c" 1>&6
1850 else
1851   cat > conftest.$ac_ext <<EOF
1852 #line 1853 "configure"
1853 #include "confdefs.h"
1854 #include <sys/types.h>
1855 #include <sys/time.h>
1856 #include <time.h>
1857 int main() {
1858 struct tm *tp;
1859 ; return 0; }
1860 EOF
1861 if { (eval echo configure:1862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1862   rm -rf conftest*
1863   ac_cv_header_time=yes
1864 else
1865   echo "configure: failed program was:" >&5
1866   cat conftest.$ac_ext >&5
1867   rm -rf conftest*
1868   ac_cv_header_time=no
1869 fi
1870 rm -f conftest*
1871 fi
1872
1873 echo "$ac_t""$ac_cv_header_time" 1>&6
1874 if test $ac_cv_header_time = yes; then
1875   cat >> confdefs.h <<\EOF
1876 #define TIME_WITH_SYS_TIME 1
1877 EOF
1878
1879 fi
1880
1881 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1882 echo "configure:1883: checking for sys/wait.h that is POSIX.1 compatible" >&5
1883 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1884   echo $ac_n "(cached) $ac_c" 1>&6
1885 else
1886   cat > conftest.$ac_ext <<EOF
1887 #line 1888 "configure"
1888 #include "confdefs.h"
1889 #include <sys/types.h>
1890 #include <sys/wait.h>
1891 #ifndef WEXITSTATUS
1892 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1893 #endif
1894 #ifndef WIFEXITED
1895 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1896 #endif
1897 int main() {
1898 int s;
1899 wait (&s);
1900 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1901 ; return 0; }
1902 EOF
1903 if { (eval echo configure:1904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1904   rm -rf conftest*
1905   ac_cv_header_sys_wait_h=yes
1906 else
1907   echo "configure: failed program was:" >&5
1908   cat conftest.$ac_ext >&5
1909   rm -rf conftest*
1910   ac_cv_header_sys_wait_h=no
1911 fi
1912 rm -f conftest*
1913 fi
1914
1915 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1916 if test $ac_cv_header_sys_wait_h = yes; then
1917   cat >> confdefs.h <<\EOF
1918 #define HAVE_SYS_WAIT_H 1
1919 EOF
1920
1921 fi
1922
1923 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1924 do
1925 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1926 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1927 echo "configure:1928: checking for $ac_hdr" >&5
1928 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1929   echo $ac_n "(cached) $ac_c" 1>&6
1930 else
1931   cat > conftest.$ac_ext <<EOF
1932 #line 1933 "configure"
1933 #include "confdefs.h"
1934 #include <$ac_hdr>
1935 EOF
1936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1937 { (eval echo configure:1938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1939 if test -z "$ac_err"; then
1940   rm -rf conftest*
1941   eval "ac_cv_header_$ac_safe=yes"
1942 else
1943   echo "$ac_err" >&5
1944   echo "configure: failed program was:" >&5
1945   cat conftest.$ac_ext >&5
1946   rm -rf conftest*
1947   eval "ac_cv_header_$ac_safe=no"
1948 fi
1949 rm -f conftest*
1950 fi
1951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1952   echo "$ac_t""yes" 1>&6
1953     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1954   cat >> confdefs.h <<EOF
1955 #define $ac_tr_hdr 1
1956 EOF
1957  
1958 else
1959   echo "$ac_t""no" 1>&6
1960 fi
1961 done
1962
1963 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1964 do
1965 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1966 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1967 echo "configure:1968: checking for $ac_hdr" >&5
1968 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1969   echo $ac_n "(cached) $ac_c" 1>&6
1970 else
1971   cat > conftest.$ac_ext <<EOF
1972 #line 1973 "configure"
1973 #include "confdefs.h"
1974 #include <$ac_hdr>
1975 EOF
1976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1977 { (eval echo configure:1978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1979 if test -z "$ac_err"; then
1980   rm -rf conftest*
1981   eval "ac_cv_header_$ac_safe=yes"
1982 else
1983   echo "$ac_err" >&5
1984   echo "configure: failed program was:" >&5
1985   cat conftest.$ac_ext >&5
1986   rm -rf conftest*
1987   eval "ac_cv_header_$ac_safe=no"
1988 fi
1989 rm -f conftest*
1990 fi
1991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1992   echo "$ac_t""yes" 1>&6
1993     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1994   cat >> confdefs.h <<EOF
1995 #define $ac_tr_hdr 1
1996 EOF
1997  
1998 else
1999   echo "$ac_t""no" 1>&6
2000 fi
2001 done
2002
2003 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2004 do
2005 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2006 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2007 echo "configure:2008: checking for $ac_hdr" >&5
2008 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2009   echo $ac_n "(cached) $ac_c" 1>&6
2010 else
2011   cat > conftest.$ac_ext <<EOF
2012 #line 2013 "configure"
2013 #include "confdefs.h"
2014 #include <$ac_hdr>
2015 EOF
2016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2017 { (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2019 if test -z "$ac_err"; then
2020   rm -rf conftest*
2021   eval "ac_cv_header_$ac_safe=yes"
2022 else
2023   echo "$ac_err" >&5
2024   echo "configure: failed program was:" >&5
2025   cat conftest.$ac_ext >&5
2026   rm -rf conftest*
2027   eval "ac_cv_header_$ac_safe=no"
2028 fi
2029 rm -f conftest*
2030 fi
2031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2032   echo "$ac_t""yes" 1>&6
2033     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2034   cat >> confdefs.h <<EOF
2035 #define $ac_tr_hdr 1
2036 EOF
2037  
2038 else
2039   echo "$ac_t""no" 1>&6
2040 fi
2041 done
2042
2043 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2044 do
2045 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2046 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2047 echo "configure:2048: checking for $ac_hdr" >&5
2048 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2049   echo $ac_n "(cached) $ac_c" 1>&6
2050 else
2051   cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054 #include <$ac_hdr>
2055 EOF
2056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2057 { (eval echo configure:2058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2059 if test -z "$ac_err"; then
2060   rm -rf conftest*
2061   eval "ac_cv_header_$ac_safe=yes"
2062 else
2063   echo "$ac_err" >&5
2064   echo "configure: failed program was:" >&5
2065   cat conftest.$ac_ext >&5
2066   rm -rf conftest*
2067   eval "ac_cv_header_$ac_safe=no"
2068 fi
2069 rm -f conftest*
2070 fi
2071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2072   echo "$ac_t""yes" 1>&6
2073     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2074   cat >> confdefs.h <<EOF
2075 #define $ac_tr_hdr 1
2076 EOF
2077  
2078 else
2079   echo "$ac_t""no" 1>&6
2080 fi
2081 done
2082
2083 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
2084 do
2085 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2086 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2087 echo "configure:2088: checking for $ac_hdr" >&5
2088 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2089   echo $ac_n "(cached) $ac_c" 1>&6
2090 else
2091   cat > conftest.$ac_ext <<EOF
2092 #line 2093 "configure"
2093 #include "confdefs.h"
2094 #include <$ac_hdr>
2095 EOF
2096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2097 { (eval echo configure:2098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2099 if test -z "$ac_err"; then
2100   rm -rf conftest*
2101   eval "ac_cv_header_$ac_safe=yes"
2102 else
2103   echo "$ac_err" >&5
2104   echo "configure: failed program was:" >&5
2105   cat conftest.$ac_ext >&5
2106   rm -rf conftest*
2107   eval "ac_cv_header_$ac_safe=no"
2108 fi
2109 rm -f conftest*
2110 fi
2111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2112   echo "$ac_t""yes" 1>&6
2113     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2114   cat >> confdefs.h <<EOF
2115 #define $ac_tr_hdr 1
2116 EOF
2117  
2118 else
2119   echo "$ac_t""no" 1>&6
2120 fi
2121 done
2122
2123 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2124 do
2125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2127 echo "configure:2128: checking for $ac_hdr" >&5
2128 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2129   echo $ac_n "(cached) $ac_c" 1>&6
2130 else
2131   cat > conftest.$ac_ext <<EOF
2132 #line 2133 "configure"
2133 #include "confdefs.h"
2134 #include <$ac_hdr>
2135 EOF
2136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2137 { (eval echo configure:2138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2139 if test -z "$ac_err"; then
2140   rm -rf conftest*
2141   eval "ac_cv_header_$ac_safe=yes"
2142 else
2143   echo "$ac_err" >&5
2144   echo "configure: failed program was:" >&5
2145   cat conftest.$ac_ext >&5
2146   rm -rf conftest*
2147   eval "ac_cv_header_$ac_safe=no"
2148 fi
2149 rm -f conftest*
2150 fi
2151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2152   echo "$ac_t""yes" 1>&6
2153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2154   cat >> confdefs.h <<EOF
2155 #define $ac_tr_hdr 1
2156 EOF
2157  
2158 else
2159   echo "$ac_t""no" 1>&6
2160 fi
2161 done
2162
2163 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2164 do
2165 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2166 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2167 echo "configure:2168: checking for $ac_hdr" >&5
2168 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2169   echo $ac_n "(cached) $ac_c" 1>&6
2170 else
2171   cat > conftest.$ac_ext <<EOF
2172 #line 2173 "configure"
2173 #include "confdefs.h"
2174 #include <$ac_hdr>
2175 EOF
2176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2177 { (eval echo configure:2178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2179 if test -z "$ac_err"; then
2180   rm -rf conftest*
2181   eval "ac_cv_header_$ac_safe=yes"
2182 else
2183   echo "$ac_err" >&5
2184   echo "configure: failed program was:" >&5
2185   cat conftest.$ac_ext >&5
2186   rm -rf conftest*
2187   eval "ac_cv_header_$ac_safe=no"
2188 fi
2189 rm -f conftest*
2190 fi
2191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2192   echo "$ac_t""yes" 1>&6
2193     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2194   cat >> confdefs.h <<EOF
2195 #define $ac_tr_hdr 1
2196 EOF
2197  
2198 else
2199   echo "$ac_t""no" 1>&6
2200 fi
2201 done
2202
2203 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h
2204 do
2205 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2206 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2207 echo "configure:2208: checking for $ac_hdr" >&5
2208 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2209   echo $ac_n "(cached) $ac_c" 1>&6
2210 else
2211   cat > conftest.$ac_ext <<EOF
2212 #line 2213 "configure"
2213 #include "confdefs.h"
2214 #include <$ac_hdr>
2215 EOF
2216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2217 { (eval echo configure:2218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2219 if test -z "$ac_err"; then
2220   rm -rf conftest*
2221   eval "ac_cv_header_$ac_safe=yes"
2222 else
2223   echo "$ac_err" >&5
2224   echo "configure: failed program was:" >&5
2225   cat conftest.$ac_ext >&5
2226   rm -rf conftest*
2227   eval "ac_cv_header_$ac_safe=no"
2228 fi
2229 rm -f conftest*
2230 fi
2231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2232   echo "$ac_t""yes" 1>&6
2233     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2234   cat >> confdefs.h <<EOF
2235 #define $ac_tr_hdr 1
2236 EOF
2237  
2238 else
2239   echo "$ac_t""no" 1>&6
2240 fi
2241 done
2242
2243
2244 #
2245 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2246 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2247 #
2248 case "$host_os" in
2249     *hpux*)
2250                 cat > conftest.$ac_ext <<EOF
2251 #line 2252 "configure"
2252 #include "confdefs.h"
2253 #include <shadow.h>
2254 int main() {
2255 struct spwd testme
2256 ; return 0; }
2257 EOF
2258 if { (eval echo configure:2259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2259   rm -rf conftest*
2260   ac_cv_header_shadow_h=yes
2261 else
2262   echo "configure: failed program was:" >&5
2263   cat conftest.$ac_ext >&5
2264   rm -rf conftest*
2265   ac_cv_header_shadow_h=no
2266 fi
2267 rm -f conftest*
2268                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2269                    cat >> confdefs.h <<\EOF
2270 #define HAVE_SHADOW_H 1
2271 EOF
2272
2273                 fi
2274         ;;
2275 esac
2276 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2277 do
2278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2280 echo "configure:2281: checking for $ac_hdr" >&5
2281 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2282   echo $ac_n "(cached) $ac_c" 1>&6
2283 else
2284   cat > conftest.$ac_ext <<EOF
2285 #line 2286 "configure"
2286 #include "confdefs.h"
2287 #include <$ac_hdr>
2288 EOF
2289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2290 { (eval echo configure:2291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2292 if test -z "$ac_err"; then
2293   rm -rf conftest*
2294   eval "ac_cv_header_$ac_safe=yes"
2295 else
2296   echo "$ac_err" >&5
2297   echo "configure: failed program was:" >&5
2298   cat conftest.$ac_ext >&5
2299   rm -rf conftest*
2300   eval "ac_cv_header_$ac_safe=no"
2301 fi
2302 rm -f conftest*
2303 fi
2304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2305   echo "$ac_t""yes" 1>&6
2306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2307   cat >> confdefs.h <<EOF
2308 #define $ac_tr_hdr 1
2309 EOF
2310  
2311 else
2312   echo "$ac_t""no" 1>&6
2313 fi
2314 done
2315
2316 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2317 do
2318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2320 echo "configure:2321: checking for $ac_hdr" >&5
2321 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2322   echo $ac_n "(cached) $ac_c" 1>&6
2323 else
2324   cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327 #include <$ac_hdr>
2328 EOF
2329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2330 { (eval echo configure:2331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2332 if test -z "$ac_err"; then
2333   rm -rf conftest*
2334   eval "ac_cv_header_$ac_safe=yes"
2335 else
2336   echo "$ac_err" >&5
2337   echo "configure: failed program was:" >&5
2338   cat conftest.$ac_ext >&5
2339   rm -rf conftest*
2340   eval "ac_cv_header_$ac_safe=no"
2341 fi
2342 rm -f conftest*
2343 fi
2344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2345   echo "$ac_t""yes" 1>&6
2346     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2347   cat >> confdefs.h <<EOF
2348 #define $ac_tr_hdr 1
2349 EOF
2350  
2351 else
2352   echo "$ac_t""no" 1>&6
2353 fi
2354 done
2355
2356 for ac_hdr in stropts.h poll.h
2357 do
2358 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2359 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2360 echo "configure:2361: checking for $ac_hdr" >&5
2361 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2362   echo $ac_n "(cached) $ac_c" 1>&6
2363 else
2364   cat > conftest.$ac_ext <<EOF
2365 #line 2366 "configure"
2366 #include "confdefs.h"
2367 #include <$ac_hdr>
2368 EOF
2369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2370 { (eval echo configure:2371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2372 if test -z "$ac_err"; then
2373   rm -rf conftest*
2374   eval "ac_cv_header_$ac_safe=yes"
2375 else
2376   echo "$ac_err" >&5
2377   echo "configure: failed program was:" >&5
2378   cat conftest.$ac_ext >&5
2379   rm -rf conftest*
2380   eval "ac_cv_header_$ac_safe=no"
2381 fi
2382 rm -f conftest*
2383 fi
2384 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2385   echo "$ac_t""yes" 1>&6
2386     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2387   cat >> confdefs.h <<EOF
2388 #define $ac_tr_hdr 1
2389 EOF
2390  
2391 else
2392   echo "$ac_t""no" 1>&6
2393 fi
2394 done
2395
2396 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2397 do
2398 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2399 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2400 echo "configure:2401: checking for $ac_hdr" >&5
2401 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2402   echo $ac_n "(cached) $ac_c" 1>&6
2403 else
2404   cat > conftest.$ac_ext <<EOF
2405 #line 2406 "configure"
2406 #include "confdefs.h"
2407 #include <$ac_hdr>
2408 EOF
2409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2410 { (eval echo configure:2411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2412 if test -z "$ac_err"; then
2413   rm -rf conftest*
2414   eval "ac_cv_header_$ac_safe=yes"
2415 else
2416   echo "$ac_err" >&5
2417   echo "configure: failed program was:" >&5
2418   cat conftest.$ac_ext >&5
2419   rm -rf conftest*
2420   eval "ac_cv_header_$ac_safe=no"
2421 fi
2422 rm -f conftest*
2423 fi
2424 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2425   echo "$ac_t""yes" 1>&6
2426     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2427   cat >> confdefs.h <<EOF
2428 #define $ac_tr_hdr 1
2429 EOF
2430  
2431 else
2432   echo "$ac_t""no" 1>&6
2433 fi
2434 done
2435
2436 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2437 do
2438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2440 echo "configure:2441: checking for $ac_hdr" >&5
2441 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2442   echo $ac_n "(cached) $ac_c" 1>&6
2443 else
2444   cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 #include <$ac_hdr>
2448 EOF
2449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2450 { (eval echo configure:2451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2452 if test -z "$ac_err"; then
2453   rm -rf conftest*
2454   eval "ac_cv_header_$ac_safe=yes"
2455 else
2456   echo "$ac_err" >&5
2457   echo "configure: failed program was:" >&5
2458   cat conftest.$ac_ext >&5
2459   rm -rf conftest*
2460   eval "ac_cv_header_$ac_safe=no"
2461 fi
2462 rm -f conftest*
2463 fi
2464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2465   echo "$ac_t""yes" 1>&6
2466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2467   cat >> confdefs.h <<EOF
2468 #define $ac_tr_hdr 1
2469 EOF
2470  
2471 else
2472   echo "$ac_t""no" 1>&6
2473 fi
2474 done
2475
2476
2477 # For experimental utmp support (lastlog on some BSD-like systems)
2478 for ac_hdr in utmp.h utmpx.h lastlog.h
2479 do
2480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2482 echo "configure:2483: checking for $ac_hdr" >&5
2483 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2484   echo $ac_n "(cached) $ac_c" 1>&6
2485 else
2486   cat > conftest.$ac_ext <<EOF
2487 #line 2488 "configure"
2488 #include "confdefs.h"
2489 #include <$ac_hdr>
2490 EOF
2491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2492 { (eval echo configure:2493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2494 if test -z "$ac_err"; then
2495   rm -rf conftest*
2496   eval "ac_cv_header_$ac_safe=yes"
2497 else
2498   echo "$ac_err" >&5
2499   echo "configure: failed program was:" >&5
2500   cat conftest.$ac_ext >&5
2501   rm -rf conftest*
2502   eval "ac_cv_header_$ac_safe=no"
2503 fi
2504 rm -f conftest*
2505 fi
2506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2507   echo "$ac_t""yes" 1>&6
2508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2509   cat >> confdefs.h <<EOF
2510 #define $ac_tr_hdr 1
2511 EOF
2512  
2513 else
2514   echo "$ac_t""no" 1>&6
2515 fi
2516 done
2517
2518  
2519 # For quotas on Veritas VxFS filesystems
2520 for ac_hdr in sys/fs/vx_quota.h
2521 do
2522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2524 echo "configure:2525: checking for $ac_hdr" >&5
2525 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2526   echo $ac_n "(cached) $ac_c" 1>&6
2527 else
2528   cat > conftest.$ac_ext <<EOF
2529 #line 2530 "configure"
2530 #include "confdefs.h"
2531 #include <$ac_hdr>
2532 EOF
2533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2534 { (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2536 if test -z "$ac_err"; then
2537   rm -rf conftest*
2538   eval "ac_cv_header_$ac_safe=yes"
2539 else
2540   echo "$ac_err" >&5
2541   echo "configure: failed program was:" >&5
2542   cat conftest.$ac_ext >&5
2543   rm -rf conftest*
2544   eval "ac_cv_header_$ac_safe=no"
2545 fi
2546 rm -f conftest*
2547 fi
2548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2549   echo "$ac_t""yes" 1>&6
2550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2551   cat >> confdefs.h <<EOF
2552 #define $ac_tr_hdr 1
2553 EOF
2554  
2555 else
2556   echo "$ac_t""no" 1>&6
2557 fi
2558 done
2559
2560
2561 # For quotas on Linux XFS filesystems
2562 for ac_hdr in linux/xqm.h
2563 do
2564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2566 echo "configure:2567: checking for $ac_hdr" >&5
2567 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2568   echo $ac_n "(cached) $ac_c" 1>&6
2569 else
2570   cat > conftest.$ac_ext <<EOF
2571 #line 2572 "configure"
2572 #include "confdefs.h"
2573 #include <$ac_hdr>
2574 EOF
2575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2576 { (eval echo configure:2577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2578 if test -z "$ac_err"; then
2579   rm -rf conftest*
2580   eval "ac_cv_header_$ac_safe=yes"
2581 else
2582   echo "$ac_err" >&5
2583   echo "configure: failed program was:" >&5
2584   cat conftest.$ac_ext >&5
2585   rm -rf conftest*
2586   eval "ac_cv_header_$ac_safe=no"
2587 fi
2588 rm -f conftest*
2589 fi
2590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2591   echo "$ac_t""yes" 1>&6
2592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2593   cat >> confdefs.h <<EOF
2594 #define $ac_tr_hdr 1
2595 EOF
2596  
2597 else
2598   echo "$ac_t""no" 1>&6
2599 fi
2600 done
2601
2602
2603 echo $ac_n "checking size of int""... $ac_c" 1>&6
2604 echo "configure:2605: checking size of int" >&5
2605 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2606   echo $ac_n "(cached) $ac_c" 1>&6
2607 else
2608   if test "$cross_compiling" = yes; then
2609   ac_cv_sizeof_int=cross
2610 else
2611   cat > conftest.$ac_ext <<EOF
2612 #line 2613 "configure"
2613 #include "confdefs.h"
2614 #include <stdio.h>
2615 main()
2616 {
2617   FILE *f=fopen("conftestval", "w");
2618   if (!f) exit(1);
2619   fprintf(f, "%d\n", sizeof(int));
2620   exit(0);
2621 }
2622 EOF
2623 if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2624 then
2625   ac_cv_sizeof_int=`cat conftestval`
2626 else
2627   echo "configure: failed program was:" >&5
2628   cat conftest.$ac_ext >&5
2629   rm -fr conftest*
2630   ac_cv_sizeof_int=0
2631 fi
2632 rm -fr conftest*
2633 fi
2634
2635 fi
2636 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2637 cat >> confdefs.h <<EOF
2638 #define SIZEOF_INT $ac_cv_sizeof_int
2639 EOF
2640
2641
2642 echo $ac_n "checking size of long""... $ac_c" 1>&6
2643 echo "configure:2644: checking size of long" >&5
2644 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2645   echo $ac_n "(cached) $ac_c" 1>&6
2646 else
2647   if test "$cross_compiling" = yes; then
2648   ac_cv_sizeof_long=cross
2649 else
2650   cat > conftest.$ac_ext <<EOF
2651 #line 2652 "configure"
2652 #include "confdefs.h"
2653 #include <stdio.h>
2654 main()
2655 {
2656   FILE *f=fopen("conftestval", "w");
2657   if (!f) exit(1);
2658   fprintf(f, "%d\n", sizeof(long));
2659   exit(0);
2660 }
2661 EOF
2662 if { (eval echo configure:2663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2663 then
2664   ac_cv_sizeof_long=`cat conftestval`
2665 else
2666   echo "configure: failed program was:" >&5
2667   cat conftest.$ac_ext >&5
2668   rm -fr conftest*
2669   ac_cv_sizeof_long=0
2670 fi
2671 rm -fr conftest*
2672 fi
2673
2674 fi
2675 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2676 cat >> confdefs.h <<EOF
2677 #define SIZEOF_LONG $ac_cv_sizeof_long
2678 EOF
2679
2680
2681 echo $ac_n "checking size of short""... $ac_c" 1>&6
2682 echo "configure:2683: checking size of short" >&5
2683 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2684   echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686   if test "$cross_compiling" = yes; then
2687   ac_cv_sizeof_short=cross
2688 else
2689   cat > conftest.$ac_ext <<EOF
2690 #line 2691 "configure"
2691 #include "confdefs.h"
2692 #include <stdio.h>
2693 main()
2694 {
2695   FILE *f=fopen("conftestval", "w");
2696   if (!f) exit(1);
2697   fprintf(f, "%d\n", sizeof(short));
2698   exit(0);
2699 }
2700 EOF
2701 if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2702 then
2703   ac_cv_sizeof_short=`cat conftestval`
2704 else
2705   echo "configure: failed program was:" >&5
2706   cat conftest.$ac_ext >&5
2707   rm -fr conftest*
2708   ac_cv_sizeof_short=0
2709 fi
2710 rm -fr conftest*
2711 fi
2712
2713 fi
2714 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2715 cat >> confdefs.h <<EOF
2716 #define SIZEOF_SHORT $ac_cv_sizeof_short
2717 EOF
2718
2719
2720
2721 echo $ac_n "checking for working const""... $ac_c" 1>&6
2722 echo "configure:2723: checking for working const" >&5
2723 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2724   echo $ac_n "(cached) $ac_c" 1>&6
2725 else
2726   cat > conftest.$ac_ext <<EOF
2727 #line 2728 "configure"
2728 #include "confdefs.h"
2729
2730 int main() {
2731
2732 /* Ultrix mips cc rejects this.  */
2733 typedef int charset[2]; const charset x;
2734 /* SunOS 4.1.1 cc rejects this.  */
2735 char const *const *ccp;
2736 char **p;
2737 /* NEC SVR4.0.2 mips cc rejects this.  */
2738 struct point {int x, y;};
2739 static struct point const zero = {0,0};
2740 /* AIX XL C 1.02.0.0 rejects this.
2741    It does not let you subtract one const X* pointer from another in an arm
2742    of an if-expression whose if-part is not a constant expression */
2743 const char *g = "string";
2744 ccp = &g + (g ? g-g : 0);
2745 /* HPUX 7.0 cc rejects these. */
2746 ++ccp;
2747 p = (char**) ccp;
2748 ccp = (char const *const *) p;
2749 { /* SCO 3.2v4 cc rejects this.  */
2750   char *t;
2751   char const *s = 0 ? (char *) 0 : (char const *) 0;
2752
2753   *t++ = 0;
2754 }
2755 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2756   int x[] = {25, 17};
2757   const int *foo = &x[0];
2758   ++foo;
2759 }
2760 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2761   typedef const int *iptr;
2762   iptr p = 0;
2763   ++p;
2764 }
2765 { /* AIX XL C 1.02.0.0 rejects this saying
2766      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2767   struct s { int j; const int *ap[3]; };
2768   struct s *b; b->j = 5;
2769 }
2770 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2771   const int foo = 10;
2772 }
2773
2774 ; return 0; }
2775 EOF
2776 if { (eval echo configure:2777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2777   rm -rf conftest*
2778   ac_cv_c_const=yes
2779 else
2780   echo "configure: failed program was:" >&5
2781   cat conftest.$ac_ext >&5
2782   rm -rf conftest*
2783   ac_cv_c_const=no
2784 fi
2785 rm -f conftest*
2786 fi
2787
2788 echo "$ac_t""$ac_cv_c_const" 1>&6
2789 if test $ac_cv_c_const = no; then
2790   cat >> confdefs.h <<\EOF
2791 #define const 
2792 EOF
2793
2794 fi
2795
2796 echo $ac_n "checking for inline""... $ac_c" 1>&6
2797 echo "configure:2798: checking for inline" >&5
2798 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2799   echo $ac_n "(cached) $ac_c" 1>&6
2800 else
2801   ac_cv_c_inline=no
2802 for ac_kw in inline __inline__ __inline; do
2803   cat > conftest.$ac_ext <<EOF
2804 #line 2805 "configure"
2805 #include "confdefs.h"
2806
2807 int main() {
2808 } $ac_kw foo() {
2809 ; return 0; }
2810 EOF
2811 if { (eval echo configure:2812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2812   rm -rf conftest*
2813   ac_cv_c_inline=$ac_kw; break
2814 else
2815   echo "configure: failed program was:" >&5
2816   cat conftest.$ac_ext >&5
2817 fi
2818 rm -f conftest*
2819 done
2820
2821 fi
2822
2823 echo "$ac_t""$ac_cv_c_inline" 1>&6
2824 case "$ac_cv_c_inline" in
2825   inline | yes) ;;
2826   no) cat >> confdefs.h <<\EOF
2827 #define inline 
2828 EOF
2829  ;;
2830   *)  cat >> confdefs.h <<EOF
2831 #define inline $ac_cv_c_inline
2832 EOF
2833  ;;
2834 esac
2835
2836 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2837 echo "configure:2838: checking whether byte ordering is bigendian" >&5
2838 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2839   echo $ac_n "(cached) $ac_c" 1>&6
2840 else
2841   ac_cv_c_bigendian=unknown
2842 # See if sys/param.h defines the BYTE_ORDER macro.
2843 cat > conftest.$ac_ext <<EOF
2844 #line 2845 "configure"
2845 #include "confdefs.h"
2846 #include <sys/types.h>
2847 #include <sys/param.h>
2848 int main() {
2849
2850 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2851  bogus endian macros
2852 #endif
2853 ; return 0; }
2854 EOF
2855 if { (eval echo configure:2856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2856   rm -rf conftest*
2857   # It does; now see whether it defined to BIG_ENDIAN or not.
2858 cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 #include <sys/types.h>
2862 #include <sys/param.h>
2863 int main() {
2864
2865 #if BYTE_ORDER != BIG_ENDIAN
2866  not big endian
2867 #endif
2868 ; return 0; }
2869 EOF
2870 if { (eval echo configure:2871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2871   rm -rf conftest*
2872   ac_cv_c_bigendian=yes
2873 else
2874   echo "configure: failed program was:" >&5
2875   cat conftest.$ac_ext >&5
2876   rm -rf conftest*
2877   ac_cv_c_bigendian=no
2878 fi
2879 rm -f conftest*
2880 else
2881   echo "configure: failed program was:" >&5
2882   cat conftest.$ac_ext >&5
2883 fi
2884 rm -f conftest*
2885 if test $ac_cv_c_bigendian = unknown; then
2886 if test "$cross_compiling" = yes; then
2887     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2888 else
2889   cat > conftest.$ac_ext <<EOF
2890 #line 2891 "configure"
2891 #include "confdefs.h"
2892 main () {
2893   /* Are we little or big endian?  From Harbison&Steele.  */
2894   union
2895   {
2896     long l;
2897     char c[sizeof (long)];
2898   } u;
2899   u.l = 1;
2900   exit (u.c[sizeof (long) - 1] == 1);
2901 }
2902 EOF
2903 if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2904 then
2905   ac_cv_c_bigendian=no
2906 else
2907   echo "configure: failed program was:" >&5
2908   cat conftest.$ac_ext >&5
2909   rm -fr conftest*
2910   ac_cv_c_bigendian=yes
2911 fi
2912 rm -fr conftest*
2913 fi
2914
2915 fi
2916 fi
2917
2918 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2919 if test $ac_cv_c_bigendian = yes; then
2920   cat >> confdefs.h <<\EOF
2921 #define WORDS_BIGENDIAN 1
2922 EOF
2923
2924 fi
2925
2926 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2927 echo "configure:2928: checking whether char is unsigned" >&5
2928 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2929   echo $ac_n "(cached) $ac_c" 1>&6
2930 else
2931   if test "$GCC" = yes; then
2932   # GCC predefines this symbol on systems where it applies.
2933 cat > conftest.$ac_ext <<EOF
2934 #line 2935 "configure"
2935 #include "confdefs.h"
2936 #ifdef __CHAR_UNSIGNED__
2937   yes
2938 #endif
2939
2940 EOF
2941 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2942   egrep "yes" >/dev/null 2>&1; then
2943   rm -rf conftest*
2944   ac_cv_c_char_unsigned=yes
2945 else
2946   rm -rf conftest*
2947   ac_cv_c_char_unsigned=no
2948 fi
2949 rm -f conftest*
2950
2951 else
2952 if test "$cross_compiling" = yes; then
2953     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2954 else
2955   cat > conftest.$ac_ext <<EOF
2956 #line 2957 "configure"
2957 #include "confdefs.h"
2958 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2959 #if !defined(__STDC__) || __STDC__ != 1
2960 #define volatile
2961 #endif
2962 main() {
2963   volatile char c = 255; exit(c < 0);
2964 }
2965 EOF
2966 if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2967 then
2968   ac_cv_c_char_unsigned=yes
2969 else
2970   echo "configure: failed program was:" >&5
2971   cat conftest.$ac_ext >&5
2972   rm -fr conftest*
2973   ac_cv_c_char_unsigned=no
2974 fi
2975 rm -fr conftest*
2976 fi
2977
2978 fi
2979 fi
2980
2981 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2982 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2983   cat >> confdefs.h <<\EOF
2984 #define __CHAR_UNSIGNED__ 1
2985 EOF
2986
2987 fi
2988
2989
2990 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2991 echo "configure:2992: checking return type of signal handlers" >&5
2992 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2993   echo $ac_n "(cached) $ac_c" 1>&6
2994 else
2995   cat > conftest.$ac_ext <<EOF
2996 #line 2997 "configure"
2997 #include "confdefs.h"
2998 #include <sys/types.h>
2999 #include <signal.h>
3000 #ifdef signal
3001 #undef signal
3002 #endif
3003 #ifdef __cplusplus
3004 extern "C" void (*signal (int, void (*)(int)))(int);
3005 #else
3006 void (*signal ()) ();
3007 #endif
3008
3009 int main() {
3010 int i;
3011 ; return 0; }
3012 EOF
3013 if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3014   rm -rf conftest*
3015   ac_cv_type_signal=void
3016 else
3017   echo "configure: failed program was:" >&5
3018   cat conftest.$ac_ext >&5
3019   rm -rf conftest*
3020   ac_cv_type_signal=int
3021 fi
3022 rm -f conftest*
3023 fi
3024
3025 echo "$ac_t""$ac_cv_type_signal" 1>&6
3026 cat >> confdefs.h <<EOF
3027 #define RETSIGTYPE $ac_cv_type_signal
3028 EOF
3029
3030
3031 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3032 echo "configure:3033: checking for uid_t in sys/types.h" >&5
3033 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   cat > conftest.$ac_ext <<EOF
3037 #line 3038 "configure"
3038 #include "confdefs.h"
3039 #include <sys/types.h>
3040 EOF
3041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3042   egrep "uid_t" >/dev/null 2>&1; then
3043   rm -rf conftest*
3044   ac_cv_type_uid_t=yes
3045 else
3046   rm -rf conftest*
3047   ac_cv_type_uid_t=no
3048 fi
3049 rm -f conftest*
3050
3051 fi
3052
3053 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3054 if test $ac_cv_type_uid_t = no; then
3055   cat >> confdefs.h <<\EOF
3056 #define uid_t int
3057 EOF
3058
3059   cat >> confdefs.h <<\EOF
3060 #define gid_t int
3061 EOF
3062
3063 fi
3064
3065 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3066 echo "configure:3067: checking for mode_t" >&5
3067 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   cat > conftest.$ac_ext <<EOF
3071 #line 3072 "configure"
3072 #include "confdefs.h"
3073 #include <sys/types.h>
3074 #if STDC_HEADERS
3075 #include <stdlib.h>
3076 #include <stddef.h>
3077 #endif
3078 EOF
3079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3080   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3081   rm -rf conftest*
3082   ac_cv_type_mode_t=yes
3083 else
3084   rm -rf conftest*
3085   ac_cv_type_mode_t=no
3086 fi
3087 rm -f conftest*
3088
3089 fi
3090 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3091 if test $ac_cv_type_mode_t = no; then
3092   cat >> confdefs.h <<\EOF
3093 #define mode_t int
3094 EOF
3095
3096 fi
3097
3098 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3099 echo "configure:3100: checking for off_t" >&5
3100 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3101   echo $ac_n "(cached) $ac_c" 1>&6
3102 else
3103   cat > conftest.$ac_ext <<EOF
3104 #line 3105 "configure"
3105 #include "confdefs.h"
3106 #include <sys/types.h>
3107 #if STDC_HEADERS
3108 #include <stdlib.h>
3109 #include <stddef.h>
3110 #endif
3111 EOF
3112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3113   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3114   rm -rf conftest*
3115   ac_cv_type_off_t=yes
3116 else
3117   rm -rf conftest*
3118   ac_cv_type_off_t=no
3119 fi
3120 rm -f conftest*
3121
3122 fi
3123 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3124 if test $ac_cv_type_off_t = no; then
3125   cat >> confdefs.h <<\EOF
3126 #define off_t long
3127 EOF
3128
3129 fi
3130
3131 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3132 echo "configure:3133: checking for size_t" >&5
3133 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139 #include <sys/types.h>
3140 #if STDC_HEADERS
3141 #include <stdlib.h>
3142 #include <stddef.h>
3143 #endif
3144 EOF
3145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3146   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3147   rm -rf conftest*
3148   ac_cv_type_size_t=yes
3149 else
3150   rm -rf conftest*
3151   ac_cv_type_size_t=no
3152 fi
3153 rm -f conftest*
3154
3155 fi
3156 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3157 if test $ac_cv_type_size_t = no; then
3158   cat >> confdefs.h <<\EOF
3159 #define size_t unsigned
3160 EOF
3161
3162 fi
3163
3164 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3165 echo "configure:3166: checking for pid_t" >&5
3166 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3167   echo $ac_n "(cached) $ac_c" 1>&6
3168 else
3169   cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 #include <sys/types.h>
3173 #if STDC_HEADERS
3174 #include <stdlib.h>
3175 #include <stddef.h>
3176 #endif
3177 EOF
3178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3179   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3180   rm -rf conftest*
3181   ac_cv_type_pid_t=yes
3182 else
3183   rm -rf conftest*
3184   ac_cv_type_pid_t=no
3185 fi
3186 rm -f conftest*
3187
3188 fi
3189 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3190 if test $ac_cv_type_pid_t = no; then
3191   cat >> confdefs.h <<\EOF
3192 #define pid_t int
3193 EOF
3194
3195 fi
3196
3197 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3198 echo "configure:3199: checking for st_rdev in struct stat" >&5
3199 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3200   echo $ac_n "(cached) $ac_c" 1>&6
3201 else
3202   cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 #include <sys/types.h>
3206 #include <sys/stat.h>
3207 int main() {
3208 struct stat s; s.st_rdev;
3209 ; return 0; }
3210 EOF
3211 if { (eval echo configure:3212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3212   rm -rf conftest*
3213   ac_cv_struct_st_rdev=yes
3214 else
3215   echo "configure: failed program was:" >&5
3216   cat conftest.$ac_ext >&5
3217   rm -rf conftest*
3218   ac_cv_struct_st_rdev=no
3219 fi
3220 rm -f conftest*
3221 fi
3222
3223 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3224 if test $ac_cv_struct_st_rdev = yes; then
3225   cat >> confdefs.h <<\EOF
3226 #define HAVE_ST_RDEV 1
3227 EOF
3228
3229 fi
3230
3231 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3232 echo "configure:3233: checking for d_off in dirent" >&5
3233 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3234   echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236   cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239
3240 #include <unistd.h>
3241 #include <sys/types.h>
3242 #include <dirent.h>
3243 int main() {
3244 struct dirent d; d.d_off;
3245 ; return 0; }
3246 EOF
3247 if { (eval echo configure:3248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3248   rm -rf conftest*
3249   ac_cv_dirent_d_off=yes
3250 else
3251   echo "configure: failed program was:" >&5
3252   cat conftest.$ac_ext >&5
3253   rm -rf conftest*
3254   ac_cv_dirent_d_off=no
3255 fi
3256 rm -f conftest*
3257 fi
3258
3259 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3260 if test $ac_cv_dirent_d_off = yes; then
3261   cat >> confdefs.h <<\EOF
3262 #define HAVE_DIRENT_D_OFF 1
3263 EOF
3264
3265 fi
3266
3267 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3268 echo "configure:3269: checking for ino_t" >&5
3269 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3270   echo $ac_n "(cached) $ac_c" 1>&6
3271 else
3272   cat > conftest.$ac_ext <<EOF
3273 #line 3274 "configure"
3274 #include "confdefs.h"
3275 #include <sys/types.h>
3276 #if STDC_HEADERS
3277 #include <stdlib.h>
3278 #include <stddef.h>
3279 #endif
3280 EOF
3281 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3282   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3283   rm -rf conftest*
3284   ac_cv_type_ino_t=yes
3285 else
3286   rm -rf conftest*
3287   ac_cv_type_ino_t=no
3288 fi
3289 rm -f conftest*
3290
3291 fi
3292 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3293 if test $ac_cv_type_ino_t = no; then
3294   cat >> confdefs.h <<\EOF
3295 #define ino_t unsigned
3296 EOF
3297
3298 fi
3299
3300 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3301 echo "configure:3302: checking for loff_t" >&5
3302 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   cat > conftest.$ac_ext <<EOF
3306 #line 3307 "configure"
3307 #include "confdefs.h"
3308 #include <sys/types.h>
3309 #if STDC_HEADERS
3310 #include <stdlib.h>
3311 #include <stddef.h>
3312 #endif
3313 EOF
3314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3315   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3316   rm -rf conftest*
3317   ac_cv_type_loff_t=yes
3318 else
3319   rm -rf conftest*
3320   ac_cv_type_loff_t=no
3321 fi
3322 rm -f conftest*
3323
3324 fi
3325 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3326 if test $ac_cv_type_loff_t = no; then
3327   cat >> confdefs.h <<\EOF
3328 #define loff_t off_t
3329 EOF
3330
3331 fi
3332
3333 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3334 echo "configure:3335: checking for offset_t" >&5
3335 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3336   echo $ac_n "(cached) $ac_c" 1>&6
3337 else
3338   cat > conftest.$ac_ext <<EOF
3339 #line 3340 "configure"
3340 #include "confdefs.h"
3341 #include <sys/types.h>
3342 #if STDC_HEADERS
3343 #include <stdlib.h>
3344 #include <stddef.h>
3345 #endif
3346 EOF
3347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3348   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3349   rm -rf conftest*
3350   ac_cv_type_offset_t=yes
3351 else
3352   rm -rf conftest*
3353   ac_cv_type_offset_t=no
3354 fi
3355 rm -f conftest*
3356
3357 fi
3358 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3359 if test $ac_cv_type_offset_t = no; then
3360   cat >> confdefs.h <<\EOF
3361 #define offset_t loff_t
3362 EOF
3363
3364 fi
3365
3366 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3367 echo "configure:3368: checking for ssize_t" >&5
3368 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3369   echo $ac_n "(cached) $ac_c" 1>&6
3370 else
3371   cat > conftest.$ac_ext <<EOF
3372 #line 3373 "configure"
3373 #include "confdefs.h"
3374 #include <sys/types.h>
3375 #if STDC_HEADERS
3376 #include <stdlib.h>
3377 #include <stddef.h>
3378 #endif
3379 EOF
3380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3381   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3382   rm -rf conftest*
3383   ac_cv_type_ssize_t=yes
3384 else
3385   rm -rf conftest*
3386   ac_cv_type_ssize_t=no
3387 fi
3388 rm -f conftest*
3389
3390 fi
3391 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3392 if test $ac_cv_type_ssize_t = no; then
3393   cat >> confdefs.h <<\EOF
3394 #define ssize_t int
3395 EOF
3396
3397 fi
3398
3399 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3400 echo "configure:3401: checking for wchar_t" >&5
3401 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407 #include <sys/types.h>
3408 #if STDC_HEADERS
3409 #include <stdlib.h>
3410 #include <stddef.h>
3411 #endif
3412 EOF
3413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3414   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3415   rm -rf conftest*
3416   ac_cv_type_wchar_t=yes
3417 else
3418   rm -rf conftest*
3419   ac_cv_type_wchar_t=no
3420 fi
3421 rm -f conftest*
3422
3423 fi
3424 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3425 if test $ac_cv_type_wchar_t = no; then
3426   cat >> confdefs.h <<\EOF
3427 #define wchar_t unsigned short
3428 EOF
3429
3430 fi
3431
3432
3433 ############################################
3434 # for cups support we need libcups, and a handful of header files
3435
3436 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3437 echo "configure:3438: checking for httpConnect in -lcups" >&5
3438 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3440   echo $ac_n "(cached) $ac_c" 1>&6
3441 else
3442   ac_save_LIBS="$LIBS"
3443 LIBS="-lcups  $LIBS"
3444 cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 /* Override any gcc2 internal prototype to avoid an error.  */
3448 /* We use char because int might match the return type of a gcc2
3449     builtin and then its argument prototype would still apply.  */
3450 char httpConnect();
3451
3452 int main() {
3453 httpConnect()
3454 ; return 0; }
3455 EOF
3456 if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3457   rm -rf conftest*
3458   eval "ac_cv_lib_$ac_lib_var=yes"
3459 else
3460   echo "configure: failed program was:" >&5
3461   cat conftest.$ac_ext >&5
3462   rm -rf conftest*
3463   eval "ac_cv_lib_$ac_lib_var=no"
3464 fi
3465 rm -f conftest*
3466 LIBS="$ac_save_LIBS"
3467
3468 fi
3469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3470   echo "$ac_t""yes" 1>&6
3471     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3472     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3473   cat >> confdefs.h <<EOF
3474 #define $ac_tr_lib 1
3475 EOF
3476
3477   LIBS="-lcups $LIBS"
3478
3479 else
3480   echo "$ac_t""no" 1>&6
3481 fi
3482
3483
3484 # I wonder if there is a nicer way of doing this?
3485
3486 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3487         for ac_hdr in cups/cups.h cups/language.h
3488 do
3489 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3490 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3491 echo "configure:3492: checking for $ac_hdr" >&5
3492 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3493   echo $ac_n "(cached) $ac_c" 1>&6
3494 else
3495   cat > conftest.$ac_ext <<EOF
3496 #line 3497 "configure"
3497 #include "confdefs.h"
3498 #include <$ac_hdr>
3499 EOF
3500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3501 { (eval echo configure:3502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3503 if test -z "$ac_err"; then
3504   rm -rf conftest*
3505   eval "ac_cv_header_$ac_safe=yes"
3506 else
3507   echo "$ac_err" >&5
3508   echo "configure: failed program was:" >&5
3509   cat conftest.$ac_ext >&5
3510   rm -rf conftest*
3511   eval "ac_cv_header_$ac_safe=no"
3512 fi
3513 rm -f conftest*
3514 fi
3515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3516   echo "$ac_t""yes" 1>&6
3517     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3518   cat >> confdefs.h <<EOF
3519 #define $ac_tr_hdr 1
3520 EOF
3521  
3522 else
3523   echo "$ac_t""no" 1>&6
3524 fi
3525 done
3526
3527         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3528                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3529                         cat >> confdefs.h <<\EOF
3530 #define HAVE_CUPS 1
3531 EOF
3532
3533                 fi
3534         fi
3535 fi
3536
3537 ############################################
3538 # we need libdl for PAM, the password database plugins and the new VFS code
3539 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3540 echo "configure:3541: checking for dlopen in -ldl" >&5
3541 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3542 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3543   echo $ac_n "(cached) $ac_c" 1>&6
3544 else
3545   ac_save_LIBS="$LIBS"
3546 LIBS="-ldl  $LIBS"
3547 cat > conftest.$ac_ext <<EOF
3548 #line 3549 "configure"
3549 #include "confdefs.h"
3550 /* Override any gcc2 internal prototype to avoid an error.  */
3551 /* We use char because int might match the return type of a gcc2
3552     builtin and then its argument prototype would still apply.  */
3553 char dlopen();
3554
3555 int main() {
3556 dlopen()
3557 ; return 0; }
3558 EOF
3559 if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3560   rm -rf conftest*
3561   eval "ac_cv_lib_$ac_lib_var=yes"
3562 else
3563   echo "configure: failed program was:" >&5
3564   cat conftest.$ac_ext >&5
3565   rm -rf conftest*
3566   eval "ac_cv_lib_$ac_lib_var=no"
3567 fi
3568 rm -f conftest*
3569 LIBS="$ac_save_LIBS"
3570
3571 fi
3572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3573   echo "$ac_t""yes" 1>&6
3574   LIBS="$LIBS -ldl";
3575         cat >> confdefs.h <<\EOF
3576 #define HAVE_LIBDL 1
3577 EOF
3578
3579 else
3580   echo "$ac_t""no" 1>&6
3581 fi
3582
3583
3584 ############################################
3585 # check if the compiler can do immediate structures
3586 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3587 echo "configure:3588: checking for immediate structures" >&5
3588 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3589   echo $ac_n "(cached) $ac_c" 1>&6
3590 else
3591   
3592     cat > conftest.$ac_ext <<EOF
3593 #line 3594 "configure"
3594 #include "confdefs.h"
3595
3596 #include <stdio.h>
3597 int main() {
3598
3599    typedef struct {unsigned x;} FOOBAR;
3600    #define X_FOOBAR(x) ((FOOBAR) { x })
3601    #define FOO_ONE X_FOOBAR(1)
3602    FOOBAR f = FOO_ONE;   
3603    static struct {
3604         FOOBAR y; 
3605         } f2[] = {
3606                 {FOO_ONE}
3607         };   
3608
3609 ; return 0; }
3610 EOF
3611 if { (eval echo configure:3612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3612   rm -rf conftest*
3613   samba_cv_immediate_structures=yes
3614 else
3615   echo "configure: failed program was:" >&5
3616   cat conftest.$ac_ext >&5
3617   rm -rf conftest*
3618   samba_cv_immediate_structures=no
3619 fi
3620 rm -f conftest*
3621 fi
3622
3623 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3624 if test x"$samba_cv_immediate_structures" = x"yes"; then
3625    cat >> confdefs.h <<\EOF
3626 #define HAVE_IMMEDIATE_STRUCTURES 1
3627 EOF
3628
3629 fi
3630
3631 ############################################
3632 # check for unix domain sockets
3633 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3634 echo "configure:3635: checking for unix domain sockets" >&5
3635 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3636   echo $ac_n "(cached) $ac_c" 1>&6
3637 else
3638   
3639     cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642
3643 #include <sys/types.h>
3644 #include <stdlib.h>
3645 #include <stddef.h>
3646 #include <sys/socket.h>
3647 #include <sys/un.h>
3648 int main() {
3649
3650   struct sockaddr_un sunaddr; 
3651   sunaddr.sun_family = AF_UNIX;
3652
3653 ; return 0; }
3654 EOF
3655 if { (eval echo configure:3656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3656   rm -rf conftest*
3657   samba_cv_unixsocket=yes
3658 else
3659   echo "configure: failed program was:" >&5
3660   cat conftest.$ac_ext >&5
3661   rm -rf conftest*
3662   samba_cv_unixsocket=no
3663 fi
3664 rm -f conftest*
3665 fi
3666
3667 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3668 if test x"$samba_cv_unixsocket" = x"yes"; then
3669    cat >> confdefs.h <<\EOF
3670 #define HAVE_UNIXSOCKET 1
3671 EOF
3672
3673 fi
3674
3675
3676 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3677 echo "configure:3678: checking for socklen_t type" >&5
3678 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3679   echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681   
3682     cat > conftest.$ac_ext <<EOF
3683 #line 3684 "configure"
3684 #include "confdefs.h"
3685
3686 #include <sys/types.h>
3687 #if STDC_HEADERS
3688 #include <stdlib.h>
3689 #include <stddef.h>
3690 #endif
3691 #include <sys/socket.h>
3692 int main() {
3693 socklen_t i = 0
3694 ; return 0; }
3695 EOF
3696 if { (eval echo configure:3697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3697   rm -rf conftest*
3698   samba_cv_socklen_t=yes
3699 else
3700   echo "configure: failed program was:" >&5
3701   cat conftest.$ac_ext >&5
3702   rm -rf conftest*
3703   samba_cv_socklen_t=no
3704 fi
3705 rm -f conftest*
3706 fi
3707
3708 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3709 if test x"$samba_cv_socklen_t" = x"yes"; then
3710    cat >> confdefs.h <<\EOF
3711 #define HAVE_SOCKLEN_T_TYPE 1
3712 EOF
3713
3714 fi
3715
3716 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3717 echo "configure:3718: checking for sig_atomic_t type" >&5
3718 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3719   echo $ac_n "(cached) $ac_c" 1>&6
3720 else
3721   
3722     cat > conftest.$ac_ext <<EOF
3723 #line 3724 "configure"
3724 #include "confdefs.h"
3725
3726 #include <sys/types.h>
3727 #if STDC_HEADERS
3728 #include <stdlib.h>
3729 #include <stddef.h>
3730 #endif
3731 #include <signal.h>
3732 int main() {
3733 sig_atomic_t i = 0
3734 ; return 0; }
3735 EOF
3736 if { (eval echo configure:3737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3737   rm -rf conftest*
3738   samba_cv_sig_atomic_t=yes
3739 else
3740   echo "configure: failed program was:" >&5
3741   cat conftest.$ac_ext >&5
3742   rm -rf conftest*
3743   samba_cv_sig_atomic_t=no
3744 fi
3745 rm -f conftest*
3746 fi
3747
3748 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3749 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3750    cat >> confdefs.h <<\EOF
3751 #define HAVE_SIG_ATOMIC_T_TYPE 1
3752 EOF
3753
3754 fi
3755
3756 # stupid headers have the functions but no declaration. grrrr.
3757
3758  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3759 echo "configure:3760: checking for errno declaration" >&5
3760 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3761   echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763   
3764     cat > conftest.$ac_ext <<EOF
3765 #line 3766 "configure"
3766 #include "confdefs.h"
3767 #include <errno.h>
3768 int main() {
3769 int i = (int)errno
3770 ; return 0; }
3771 EOF
3772 if { (eval echo configure:3773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3773   rm -rf conftest*
3774   ac_cv_have_errno_decl=yes
3775 else
3776   echo "configure: failed program was:" >&5
3777   cat conftest.$ac_ext >&5
3778   rm -rf conftest*
3779   ac_cv_have_errno_decl=no
3780 fi
3781 rm -f conftest*
3782 fi
3783
3784 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3785  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3786     cat >> confdefs.h <<\EOF
3787 #define HAVE_ERRNO_DECL 1
3788 EOF
3789
3790  fi
3791
3792
3793  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3794 echo "configure:3795: checking for setresuid declaration" >&5
3795 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   
3799     cat > conftest.$ac_ext <<EOF
3800 #line 3801 "configure"
3801 #include "confdefs.h"
3802 #include <unistd.h>
3803 int main() {
3804 int i = (int)setresuid
3805 ; return 0; }
3806 EOF
3807 if { (eval echo configure:3808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3808   rm -rf conftest*
3809   ac_cv_have_setresuid_decl=yes
3810 else
3811   echo "configure: failed program was:" >&5
3812   cat conftest.$ac_ext >&5
3813   rm -rf conftest*
3814   ac_cv_have_setresuid_decl=no
3815 fi
3816 rm -f conftest*
3817 fi
3818
3819 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3820  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3821     cat >> confdefs.h <<\EOF
3822 #define HAVE_SETRESUID_DECL 1
3823 EOF
3824
3825  fi
3826
3827
3828  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3829 echo "configure:3830: checking for setresgid declaration" >&5
3830 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3831   echo $ac_n "(cached) $ac_c" 1>&6
3832 else
3833   
3834     cat > conftest.$ac_ext <<EOF
3835 #line 3836 "configure"
3836 #include "confdefs.h"
3837 #include <unistd.h>
3838 int main() {
3839 int i = (int)setresgid
3840 ; return 0; }
3841 EOF
3842 if { (eval echo configure:3843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3843   rm -rf conftest*
3844   ac_cv_have_setresgid_decl=yes
3845 else
3846   echo "configure: failed program was:" >&5
3847   cat conftest.$ac_ext >&5
3848   rm -rf conftest*
3849   ac_cv_have_setresgid_decl=no
3850 fi
3851 rm -f conftest*
3852 fi
3853
3854 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3855  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3856     cat >> confdefs.h <<\EOF
3857 #define HAVE_SETRESGID_DECL 1
3858 EOF
3859
3860  fi
3861
3862
3863  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3864 echo "configure:3865: checking for asprintf declaration" >&5
3865 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3866   echo $ac_n "(cached) $ac_c" 1>&6
3867 else
3868   
3869     cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872 #include <stdio.h>
3873 int main() {
3874 int i = (int)asprintf
3875 ; return 0; }
3876 EOF
3877 if { (eval echo configure:3878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3878   rm -rf conftest*
3879   ac_cv_have_asprintf_decl=yes
3880 else
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   ac_cv_have_asprintf_decl=no
3885 fi
3886 rm -f conftest*
3887 fi
3888
3889 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3890  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3891     cat >> confdefs.h <<\EOF
3892 #define HAVE_ASPRINTF_DECL 1
3893 EOF
3894
3895  fi
3896
3897
3898  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3899 echo "configure:3900: checking for vasprintf declaration" >&5
3900 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3901   echo $ac_n "(cached) $ac_c" 1>&6
3902 else
3903   
3904     cat > conftest.$ac_ext <<EOF
3905 #line 3906 "configure"
3906 #include "confdefs.h"
3907 #include <stdio.h>
3908 int main() {
3909 int i = (int)vasprintf
3910 ; return 0; }
3911 EOF
3912 if { (eval echo configure:3913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3913   rm -rf conftest*
3914   ac_cv_have_vasprintf_decl=yes
3915 else
3916   echo "configure: failed program was:" >&5
3917   cat conftest.$ac_ext >&5
3918   rm -rf conftest*
3919   ac_cv_have_vasprintf_decl=no
3920 fi
3921 rm -f conftest*
3922 fi
3923
3924 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3925  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3926     cat >> confdefs.h <<\EOF
3927 #define HAVE_VASPRINTF_DECL 1
3928 EOF
3929
3930  fi
3931
3932
3933  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3934 echo "configure:3935: checking for vsnprintf declaration" >&5
3935 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3936   echo $ac_n "(cached) $ac_c" 1>&6
3937 else
3938   
3939     cat > conftest.$ac_ext <<EOF
3940 #line 3941 "configure"
3941 #include "confdefs.h"
3942 #include <stdio.h>
3943 int main() {
3944 int i = (int)vsnprintf
3945 ; return 0; }
3946 EOF
3947 if { (eval echo configure:3948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3948   rm -rf conftest*
3949   ac_cv_have_vsnprintf_decl=yes
3950 else
3951   echo "configure: failed program was:" >&5
3952   cat conftest.$ac_ext >&5
3953   rm -rf conftest*
3954   ac_cv_have_vsnprintf_decl=no
3955 fi
3956 rm -f conftest*
3957 fi
3958
3959 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3960  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3961     cat >> confdefs.h <<\EOF
3962 #define HAVE_VSNPRINTF_DECL 1
3963 EOF
3964
3965  fi
3966
3967
3968  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3969 echo "configure:3970: checking for snprintf declaration" >&5
3970 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3971   echo $ac_n "(cached) $ac_c" 1>&6
3972 else
3973   
3974     cat > conftest.$ac_ext <<EOF
3975 #line 3976 "configure"
3976 #include "confdefs.h"
3977 #include <stdio.h>
3978 int main() {
3979 int i = (int)snprintf
3980 ; return 0; }
3981 EOF
3982 if { (eval echo configure:3983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3983   rm -rf conftest*
3984   ac_cv_have_snprintf_decl=yes
3985 else
3986   echo "configure: failed program was:" >&5
3987   cat conftest.$ac_ext >&5
3988   rm -rf conftest*
3989   ac_cv_have_snprintf_decl=no
3990 fi
3991 rm -f conftest*
3992 fi
3993
3994 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3995  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3996     cat >> confdefs.h <<\EOF
3997 #define HAVE_SNPRINTF_DECL 1
3998 EOF
3999
4000  fi
4001
4002
4003 # and glibc has setresuid under linux but the function does
4004 # nothing until kernel 2.1.44! very dumb.
4005 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4006 echo "configure:4007: checking for real setresuid" >&5
4007 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4008   echo $ac_n "(cached) $ac_c" 1>&6
4009 else
4010   
4011     if test "$cross_compiling" = yes; then
4012   samba_cv_have_setresuid=cross
4013 else
4014   cat > conftest.$ac_ext <<EOF
4015 #line 4016 "configure"
4016 #include "confdefs.h"
4017 #include <errno.h>
4018 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4019 EOF
4020 if { (eval echo configure:4021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4021 then
4022   samba_cv_have_setresuid=yes
4023 else
4024   echo "configure: failed program was:" >&5
4025   cat conftest.$ac_ext >&5
4026   rm -fr conftest*
4027   samba_cv_have_setresuid=no
4028 fi
4029 rm -fr conftest*
4030 fi
4031
4032 fi
4033
4034 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4035 if test x"$samba_cv_have_setresuid" = x"yes"; then
4036     cat >> confdefs.h <<\EOF
4037 #define HAVE_SETRESUID 1
4038 EOF
4039
4040 fi
4041
4042 # Do the same check for setresguid...
4043 #
4044 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4045 echo "configure:4046: checking for real setresgid" >&5
4046 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4047   echo $ac_n "(cached) $ac_c" 1>&6
4048 else
4049   
4050     if test "$cross_compiling" = yes; then
4051   samba_cv_have_setresgid=cross
4052 else
4053   cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 #include <unistd.h>
4057 #include <errno.h>
4058 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4059 EOF
4060 if { (eval echo configure:4061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4061 then
4062   samba_cv_have_setresgid=yes
4063 else
4064   echo "configure: failed program was:" >&5
4065   cat conftest.$ac_ext >&5
4066   rm -fr conftest*
4067   samba_cv_have_setresgid=no
4068 fi
4069 rm -fr conftest*
4070 fi
4071
4072 fi
4073
4074 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4075 if test x"$samba_cv_have_setresgid" = x"yes"; then
4076     cat >> confdefs.h <<\EOF
4077 #define HAVE_SETRESGID 1
4078 EOF
4079
4080 fi
4081
4082 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4083 echo "configure:4084: checking for 8-bit clean memcmp" >&5
4084 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4085   echo $ac_n "(cached) $ac_c" 1>&6
4086 else
4087   if test "$cross_compiling" = yes; then
4088   ac_cv_func_memcmp_clean=no
4089 else
4090   cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093
4094 main()
4095 {
4096   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4097   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4098 }
4099
4100 EOF
4101 if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4102 then
4103   ac_cv_func_memcmp_clean=yes
4104 else
4105   echo "configure: failed program was:" >&5
4106   cat conftest.$ac_ext >&5
4107   rm -fr conftest*
4108   ac_cv_func_memcmp_clean=no
4109 fi
4110 rm -fr conftest*
4111 fi
4112
4113 fi
4114
4115 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4116 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4117
4118
4119 ###############################################
4120 # test for where we get crypt() from
4121 for ac_func in crypt
4122 do
4123 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4124 echo "configure:4125: checking for $ac_func" >&5
4125 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4126   echo $ac_n "(cached) $ac_c" 1>&6
4127 else
4128   cat > conftest.$ac_ext <<EOF
4129 #line 4130 "configure"
4130 #include "confdefs.h"
4131 /* System header to define __stub macros and hopefully few prototypes,
4132     which can conflict with char $ac_func(); below.  */
4133 #include <assert.h>
4134 /* Override any gcc2 internal prototype to avoid an error.  */
4135 /* We use char because int might match the return type of a gcc2
4136     builtin and then its argument prototype would still apply.  */
4137 char $ac_func();
4138
4139 int main() {
4140
4141 /* The GNU C library defines this for functions which it implements
4142     to always fail with ENOSYS.  Some functions are actually named
4143     something starting with __ and the normal name is an alias.  */
4144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4145 choke me
4146 #else
4147 $ac_func();
4148 #endif
4149
4150 ; return 0; }
4151 EOF
4152 if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4153   rm -rf conftest*
4154   eval "ac_cv_func_$ac_func=yes"
4155 else
4156   echo "configure: failed program was:" >&5
4157   cat conftest.$ac_ext >&5
4158   rm -rf conftest*
4159   eval "ac_cv_func_$ac_func=no"
4160 fi
4161 rm -f conftest*
4162 fi
4163
4164 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4165   echo "$ac_t""yes" 1>&6
4166     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4167   cat >> confdefs.h <<EOF
4168 #define $ac_tr_func 1
4169 EOF
4170  
4171 else
4172   echo "$ac_t""no" 1>&6
4173 fi
4174 done
4175
4176 if test x"$ac_cv_func_crypt" = x"no"; then
4177     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4178 echo "configure:4179: checking for crypt in -lcrypt" >&5
4179 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4181   echo $ac_n "(cached) $ac_c" 1>&6
4182 else
4183   ac_save_LIBS="$LIBS"
4184 LIBS="-lcrypt  $LIBS"
4185 cat > conftest.$ac_ext <<EOF
4186 #line 4187 "configure"
4187 #include "confdefs.h"
4188 /* Override any gcc2 internal prototype to avoid an error.  */
4189 /* We use char because int might match the return type of a gcc2
4190     builtin and then its argument prototype would still apply.  */
4191 char crypt();
4192
4193 int main() {
4194 crypt()
4195 ; return 0; }
4196 EOF
4197 if { (eval echo configure:4198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4198   rm -rf conftest*
4199   eval "ac_cv_lib_$ac_lib_var=yes"
4200 else
4201   echo "configure: failed program was:" >&5
4202   cat conftest.$ac_ext >&5
4203   rm -rf conftest*
4204   eval "ac_cv_lib_$ac_lib_var=no"
4205 fi
4206 rm -f conftest*
4207 LIBS="$ac_save_LIBS"
4208
4209 fi
4210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4211   echo "$ac_t""yes" 1>&6
4212   LIBS="$LIBS -lcrypt";
4213         cat >> confdefs.h <<\EOF
4214 #define HAVE_CRYPT 1
4215 EOF
4216
4217 else
4218   echo "$ac_t""no" 1>&6
4219 fi
4220
4221 fi
4222
4223
4224 ###############################################
4225 # Readline included by default unless explicitly asked not to
4226 test "${with_readline+set}" != "set" && with_readline=yes
4227
4228 # test for where we get readline() from
4229 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4230 echo "configure:4231: checking whether to use readline" >&5
4231 # Check whether --with-readline or --without-readline was given.
4232 if test "${with_readline+set}" = set; then
4233   withval="$with_readline"
4234     case "$with_readline" in
4235   yes)
4236     echo "$ac_t""yes" 1>&6
4237
4238     for ac_hdr in readline.h history.h readline/readline.h
4239 do
4240 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4242 echo "configure:4243: checking for $ac_hdr" >&5
4243 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4244   echo $ac_n "(cached) $ac_c" 1>&6
4245 else
4246   cat > conftest.$ac_ext <<EOF
4247 #line 4248 "configure"
4248 #include "confdefs.h"
4249 #include <$ac_hdr>
4250 EOF
4251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4252 { (eval echo configure:4253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4254 if test -z "$ac_err"; then
4255   rm -rf conftest*
4256   eval "ac_cv_header_$ac_safe=yes"
4257 else
4258   echo "$ac_err" >&5
4259   echo "configure: failed program was:" >&5
4260   cat conftest.$ac_ext >&5
4261   rm -rf conftest*
4262   eval "ac_cv_header_$ac_safe=no"
4263 fi
4264 rm -f conftest*
4265 fi
4266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4267   echo "$ac_t""yes" 1>&6
4268     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4269   cat >> confdefs.h <<EOF
4270 #define $ac_tr_hdr 1
4271 EOF
4272  
4273 else
4274   echo "$ac_t""no" 1>&6
4275 fi
4276 done
4277
4278     for ac_hdr in readline/history.h
4279 do
4280 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4281 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4282 echo "configure:4283: checking for $ac_hdr" >&5
4283 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4284   echo $ac_n "(cached) $ac_c" 1>&6
4285 else
4286   cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <$ac_hdr>
4290 EOF
4291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4292 { (eval echo configure:4293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4294 if test -z "$ac_err"; then
4295   rm -rf conftest*
4296   eval "ac_cv_header_$ac_safe=yes"
4297 else
4298   echo "$ac_err" >&5
4299   echo "configure: failed program was:" >&5
4300   cat conftest.$ac_ext >&5
4301   rm -rf conftest*
4302   eval "ac_cv_header_$ac_safe=no"
4303 fi
4304 rm -f conftest*
4305 fi
4306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4307   echo "$ac_t""yes" 1>&6
4308     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4309   cat >> confdefs.h <<EOF
4310 #define $ac_tr_hdr 1
4311 EOF
4312  
4313 else
4314   echo "$ac_t""no" 1>&6
4315 fi
4316 done
4317
4318
4319     for ac_hdr in readline.h readline/readline.h
4320 do
4321 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4322 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4323 echo "configure:4324: checking for $ac_hdr" >&5
4324 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4325   echo $ac_n "(cached) $ac_c" 1>&6
4326 else
4327   cat > conftest.$ac_ext <<EOF
4328 #line 4329 "configure"
4329 #include "confdefs.h"
4330 #include <$ac_hdr>
4331 EOF
4332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4333 { (eval echo configure:4334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4335 if test -z "$ac_err"; then
4336   rm -rf conftest*
4337   eval "ac_cv_header_$ac_safe=yes"
4338 else
4339   echo "$ac_err" >&5
4340   echo "configure: failed program was:" >&5
4341   cat conftest.$ac_ext >&5
4342   rm -rf conftest*
4343   eval "ac_cv_header_$ac_safe=no"
4344 fi
4345 rm -f conftest*
4346 fi
4347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4348   echo "$ac_t""yes" 1>&6
4349     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4350   cat >> confdefs.h <<EOF
4351 #define $ac_tr_hdr 1
4352 EOF
4353  
4354       for termlib in ncurses curses termcap terminfo termlib; do
4355        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4356 echo "configure:4357: checking for tgetent in -l${termlib}" >&5
4357 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4358 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4359   echo $ac_n "(cached) $ac_c" 1>&6
4360 else
4361   ac_save_LIBS="$LIBS"
4362 LIBS="-l${termlib}  $LIBS"
4363 cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366 /* Override any gcc2 internal prototype to avoid an error.  */
4367 /* We use char because int might match the return type of a gcc2
4368     builtin and then its argument prototype would still apply.  */
4369 char tgetent();
4370
4371 int main() {
4372 tgetent()
4373 ; return 0; }
4374 EOF
4375 if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4376   rm -rf conftest*
4377   eval "ac_cv_lib_$ac_lib_var=yes"
4378 else
4379   echo "configure: failed program was:" >&5
4380   cat conftest.$ac_ext >&5
4381   rm -rf conftest*
4382   eval "ac_cv_lib_$ac_lib_var=no"
4383 fi
4384 rm -f conftest*
4385 LIBS="$ac_save_LIBS"
4386
4387 fi
4388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4389   echo "$ac_t""yes" 1>&6
4390   TERMLIBS="-l${termlib}"; break
4391 else
4392   echo "$ac_t""no" 1>&6
4393 fi
4394
4395       done
4396       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4397 echo "configure:4398: checking for rl_callback_handler_install in -lreadline" >&5
4398 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4399 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4400   echo $ac_n "(cached) $ac_c" 1>&6
4401 else
4402   ac_save_LIBS="$LIBS"
4403 LIBS="-lreadline $TERMLIBS $LIBS"
4404 cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407 /* Override any gcc2 internal prototype to avoid an error.  */
4408 /* We use char because int might match the return type of a gcc2
4409     builtin and then its argument prototype would still apply.  */
4410 char rl_callback_handler_install();
4411
4412 int main() {
4413 rl_callback_handler_install()
4414 ; return 0; }
4415 EOF
4416 if { (eval echo configure:4417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4417   rm -rf conftest*
4418   eval "ac_cv_lib_$ac_lib_var=yes"
4419 else
4420   echo "configure: failed program was:" >&5
4421   cat conftest.$ac_ext >&5
4422   rm -rf conftest*
4423   eval "ac_cv_lib_$ac_lib_var=no"
4424 fi
4425 rm -f conftest*
4426 LIBS="$ac_save_LIBS"
4427
4428 fi
4429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4430   echo "$ac_t""yes" 1>&6
4431   TERMLIBS="-lreadline $TERMLIBS"
4432        cat >> confdefs.h <<\EOF
4433 #define HAVE_LIBREADLINE 1
4434 EOF
4435
4436        break
4437 else
4438   echo "$ac_t""no" 1>&6
4439 TERMLIBS=
4440 fi
4441
4442 else
4443   echo "$ac_t""no" 1>&6
4444 fi
4445 done
4446
4447     ;;
4448   no)
4449     echo "$ac_t""no" 1>&6
4450     ;;
4451   *)
4452     echo "$ac_t""yes" 1>&6
4453
4454     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4455     # alternate readline path
4456     _ldflags=${LDFLAGS}
4457     _cppflags=${CPPFLAGS}
4458
4459     # Add additional search path
4460     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4461     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4462
4463     for ac_hdr in readline.h history.h readline/readline.h
4464 do
4465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4467 echo "configure:4468: checking for $ac_hdr" >&5
4468 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4469   echo $ac_n "(cached) $ac_c" 1>&6
4470 else
4471   cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4474 #include <$ac_hdr>
4475 EOF
4476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4477 { (eval echo configure:4478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4479 if test -z "$ac_err"; then
4480   rm -rf conftest*
4481   eval "ac_cv_header_$ac_safe=yes"
4482 else
4483   echo "$ac_err" >&5
4484   echo "configure: failed program was:" >&5
4485   cat conftest.$ac_ext >&5
4486   rm -rf conftest*
4487   eval "ac_cv_header_$ac_safe=no"
4488 fi
4489 rm -f conftest*
4490 fi
4491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4492   echo "$ac_t""yes" 1>&6
4493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4494   cat >> confdefs.h <<EOF
4495 #define $ac_tr_hdr 1
4496 EOF
4497  
4498 else
4499   echo "$ac_t""no" 1>&6
4500 fi
4501 done
4502
4503     for ac_hdr in readline/history.h
4504 do
4505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4507 echo "configure:4508: checking for $ac_hdr" >&5
4508 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4509   echo $ac_n "(cached) $ac_c" 1>&6
4510 else
4511   cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 #include <$ac_hdr>
4515 EOF
4516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4517 { (eval echo configure:4518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4519 if test -z "$ac_err"; then
4520   rm -rf conftest*
4521   eval "ac_cv_header_$ac_safe=yes"
4522 else
4523   echo "$ac_err" >&5
4524   echo "configure: failed program was:" >&5
4525   cat conftest.$ac_ext >&5
4526   rm -rf conftest*
4527   eval "ac_cv_header_$ac_safe=no"
4528 fi
4529 rm -f conftest*
4530 fi
4531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4532   echo "$ac_t""yes" 1>&6
4533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4534   cat >> confdefs.h <<EOF
4535 #define $ac_tr_hdr 1
4536 EOF
4537  
4538 else
4539   echo "$ac_t""no" 1>&6
4540 fi
4541 done
4542
4543
4544     for ac_hdr in readline.h readline/readline.h
4545 do
4546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4547 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4548 echo "configure:4549: checking for $ac_hdr" >&5
4549 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4550   echo $ac_n "(cached) $ac_c" 1>&6
4551 else
4552   cat > conftest.$ac_ext <<EOF
4553 #line 4554 "configure"
4554 #include "confdefs.h"
4555 #include <$ac_hdr>
4556 EOF
4557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4558 { (eval echo configure:4559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4560 if test -z "$ac_err"; then
4561   rm -rf conftest*
4562   eval "ac_cv_header_$ac_safe=yes"
4563 else
4564   echo "$ac_err" >&5
4565   echo "configure: failed program was:" >&5
4566   cat conftest.$ac_ext >&5
4567   rm -rf conftest*
4568   eval "ac_cv_header_$ac_safe=no"
4569 fi
4570 rm -f conftest*
4571 fi
4572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4573   echo "$ac_t""yes" 1>&6
4574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4575   cat >> confdefs.h <<EOF
4576 #define $ac_tr_hdr 1
4577 EOF
4578  
4579       for termlib in ncurses curses termcap terminfo termlib; do
4580        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4581 echo "configure:4582: checking for tgetent in -l${termlib}" >&5
4582 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4583 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4584   echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586   ac_save_LIBS="$LIBS"
4587 LIBS="-l${termlib}  $LIBS"
4588 cat > conftest.$ac_ext <<EOF
4589 #line 4590 "configure"
4590 #include "confdefs.h"
4591 /* Override any gcc2 internal prototype to avoid an error.  */
4592 /* We use char because int might match the return type of a gcc2
4593     builtin and then its argument prototype would still apply.  */
4594 char tgetent();
4595
4596 int main() {
4597 tgetent()
4598 ; return 0; }
4599 EOF
4600 if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4601   rm -rf conftest*
4602   eval "ac_cv_lib_$ac_lib_var=yes"
4603 else
4604   echo "configure: failed program was:" >&5
4605   cat conftest.$ac_ext >&5
4606   rm -rf conftest*
4607   eval "ac_cv_lib_$ac_lib_var=no"
4608 fi
4609 rm -f conftest*
4610 LIBS="$ac_save_LIBS"
4611
4612 fi
4613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4614   echo "$ac_t""yes" 1>&6
4615   TERMLIBS="-l${termlib}"; break
4616 else
4617   echo "$ac_t""no" 1>&6
4618 fi
4619
4620       done
4621       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4622 echo "configure:4623: checking for rl_callback_handler_install in -lreadline" >&5
4623 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4624 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   ac_save_LIBS="$LIBS"
4628 LIBS="-lreadline $TERMLIBS $LIBS"
4629 cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 /* Override any gcc2 internal prototype to avoid an error.  */
4633 /* We use char because int might match the return type of a gcc2
4634     builtin and then its argument prototype would still apply.  */
4635 char rl_callback_handler_install();
4636
4637 int main() {
4638 rl_callback_handler_install()
4639 ; return 0; }
4640 EOF
4641 if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4642   rm -rf conftest*
4643   eval "ac_cv_lib_$ac_lib_var=yes"
4644 else
4645   echo "configure: failed program was:" >&5
4646   cat conftest.$ac_ext >&5
4647   rm -rf conftest*
4648   eval "ac_cv_lib_$ac_lib_var=no"
4649 fi
4650 rm -f conftest*
4651 LIBS="$ac_save_LIBS"
4652
4653 fi
4654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4655   echo "$ac_t""yes" 1>&6
4656   TERMLDFLAGS="-L$with_readline/lib"
4657        TERMCPPFLAGS="-I$with_readline/include"
4658        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4659        TERMLIBS="-lreadline $TERMLIBS"
4660        cat >> confdefs.h <<\EOF
4661 #define HAVE_LIBREADLINE 1
4662 EOF
4663
4664        break
4665 else
4666   echo "$ac_t""no" 1>&6
4667 TERMLIBS= CPPFLAGS=$_cppflags
4668 fi
4669
4670 else
4671   echo "$ac_t""no" 1>&6
4672 fi
4673 done
4674
4675
4676     LDFLAGS=$_ldflags
4677     ;;
4678   esac
4679 else
4680   echo "$ac_t""no" 1>&6
4681
4682 fi
4683
4684
4685
4686
4687 # The readline API changed slightly from readline3 to readline4, so
4688 # code will generate warnings on one of them unless we have a few
4689 # special cases.
4690 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4691 echo "configure:4692: checking for rl_completion_matches in -lreadline" >&5
4692 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4693 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4694   echo $ac_n "(cached) $ac_c" 1>&6
4695 else
4696   ac_save_LIBS="$LIBS"
4697 LIBS="-lreadline $TERMLIBS $LIBS"
4698 cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 /* Override any gcc2 internal prototype to avoid an error.  */
4702 /* We use char because int might match the return type of a gcc2
4703     builtin and then its argument prototype would still apply.  */
4704 char rl_completion_matches();
4705
4706 int main() {
4707 rl_completion_matches()
4708 ; return 0; }
4709 EOF
4710 if { (eval echo configure:4711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4711   rm -rf conftest*
4712   eval "ac_cv_lib_$ac_lib_var=yes"
4713 else
4714   echo "configure: failed program was:" >&5
4715   cat conftest.$ac_ext >&5
4716   rm -rf conftest*
4717   eval "ac_cv_lib_$ac_lib_var=no"
4718 fi
4719 rm -f conftest*
4720 LIBS="$ac_save_LIBS"
4721
4722 fi
4723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4724   echo "$ac_t""yes" 1>&6
4725   cat >> confdefs.h <<\EOF
4726 #define HAVE_NEW_LIBREADLINE 1
4727 EOF
4728
4729 else
4730   echo "$ac_t""no" 1>&6
4731 fi
4732
4733
4734 # The following test taken from the cvs sources
4735 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4736 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4737 # libsocket.so which has a bad implementation of gethostbyname (it
4738 # only looks in /etc/hosts), so we only look for -lsocket if we need
4739 # it.
4740 for ac_func in connect
4741 do
4742 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4743 echo "configure:4744: checking for $ac_func" >&5
4744 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4745   echo $ac_n "(cached) $ac_c" 1>&6
4746 else
4747   cat > conftest.$ac_ext <<EOF
4748 #line 4749 "configure"
4749 #include "confdefs.h"
4750 /* System header to define __stub macros and hopefully few prototypes,
4751     which can conflict with char $ac_func(); below.  */
4752 #include <assert.h>
4753 /* Override any gcc2 internal prototype to avoid an error.  */
4754 /* We use char because int might match the return type of a gcc2
4755     builtin and then its argument prototype would still apply.  */
4756 char $ac_func();
4757
4758 int main() {
4759
4760 /* The GNU C library defines this for functions which it implements
4761     to always fail with ENOSYS.  Some functions are actually named
4762     something starting with __ and the normal name is an alias.  */
4763 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4764 choke me
4765 #else
4766 $ac_func();
4767 #endif
4768
4769 ; return 0; }
4770 EOF
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4772   rm -rf conftest*
4773   eval "ac_cv_func_$ac_func=yes"
4774 else
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   eval "ac_cv_func_$ac_func=no"
4779 fi
4780 rm -f conftest*
4781 fi
4782
4783 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4786   cat >> confdefs.h <<EOF
4787 #define $ac_tr_func 1
4788 EOF
4789  
4790 else
4791   echo "$ac_t""no" 1>&6
4792 fi
4793 done
4794
4795 if test x"$ac_cv_func_connect" = x"no"; then
4796     case "$LIBS" in
4797     *-lnsl*) ;;
4798     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4799 echo "configure:4800: checking for printf in -lnsl_s" >&5
4800 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4801 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4802   echo $ac_n "(cached) $ac_c" 1>&6
4803 else
4804   ac_save_LIBS="$LIBS"
4805 LIBS="-lnsl_s  $LIBS"
4806 cat > conftest.$ac_ext <<EOF
4807 #line 4808 "configure"
4808 #include "confdefs.h"
4809 /* Override any gcc2 internal prototype to avoid an error.  */
4810 /* We use char because int might match the return type of a gcc2
4811     builtin and then its argument prototype would still apply.  */
4812 char printf();
4813
4814 int main() {
4815 printf()
4816 ; return 0; }
4817 EOF
4818 if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4819   rm -rf conftest*
4820   eval "ac_cv_lib_$ac_lib_var=yes"
4821 else
4822   echo "configure: failed program was:" >&5
4823   cat conftest.$ac_ext >&5
4824   rm -rf conftest*
4825   eval "ac_cv_lib_$ac_lib_var=no"
4826 fi
4827 rm -f conftest*
4828 LIBS="$ac_save_LIBS"
4829
4830 fi
4831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4832   echo "$ac_t""yes" 1>&6
4833     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4834     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4835   cat >> confdefs.h <<EOF
4836 #define $ac_tr_lib 1
4837 EOF
4838
4839   LIBS="-lnsl_s $LIBS"
4840
4841 else
4842   echo "$ac_t""no" 1>&6
4843 fi
4844  ;;
4845     esac
4846     case "$LIBS" in
4847     *-lnsl*) ;;
4848     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4849 echo "configure:4850: checking for printf in -lnsl" >&5
4850 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4851 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4852   echo $ac_n "(cached) $ac_c" 1>&6
4853 else
4854   ac_save_LIBS="$LIBS"
4855 LIBS="-lnsl  $LIBS"
4856 cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859 /* Override any gcc2 internal prototype to avoid an error.  */
4860 /* We use char because int might match the return type of a gcc2
4861     builtin and then its argument prototype would still apply.  */
4862 char printf();
4863
4864 int main() {
4865 printf()
4866 ; return 0; }
4867 EOF
4868 if { (eval echo configure:4869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4869   rm -rf conftest*
4870   eval "ac_cv_lib_$ac_lib_var=yes"
4871 else
4872   echo "configure: failed program was:" >&5
4873   cat conftest.$ac_ext >&5
4874   rm -rf conftest*
4875   eval "ac_cv_lib_$ac_lib_var=no"
4876 fi
4877 rm -f conftest*
4878 LIBS="$ac_save_LIBS"
4879
4880 fi
4881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4882   echo "$ac_t""yes" 1>&6
4883     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4884     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4885   cat >> confdefs.h <<EOF
4886 #define $ac_tr_lib 1
4887 EOF
4888
4889   LIBS="-lnsl $LIBS"
4890
4891 else
4892   echo "$ac_t""no" 1>&6
4893 fi
4894  ;;
4895     esac
4896     case "$LIBS" in
4897     *-lsocket*) ;;
4898     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4899 echo "configure:4900: checking for connect in -lsocket" >&5
4900 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4901 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4902   echo $ac_n "(cached) $ac_c" 1>&6
4903 else
4904   ac_save_LIBS="$LIBS"
4905 LIBS="-lsocket  $LIBS"
4906 cat > conftest.$ac_ext <<EOF
4907 #line 4908 "configure"
4908 #include "confdefs.h"
4909 /* Override any gcc2 internal prototype to avoid an error.  */
4910 /* We use char because int might match the return type of a gcc2
4911     builtin and then its argument prototype would still apply.  */
4912 char connect();
4913
4914 int main() {
4915 connect()
4916 ; return 0; }
4917 EOF
4918 if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4919   rm -rf conftest*
4920   eval "ac_cv_lib_$ac_lib_var=yes"
4921 else
4922   echo "configure: failed program was:" >&5
4923   cat conftest.$ac_ext >&5
4924   rm -rf conftest*
4925   eval "ac_cv_lib_$ac_lib_var=no"
4926 fi
4927 rm -f conftest*
4928 LIBS="$ac_save_LIBS"
4929
4930 fi
4931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4932   echo "$ac_t""yes" 1>&6
4933     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4934     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4935   cat >> confdefs.h <<EOF
4936 #define $ac_tr_lib 1
4937 EOF
4938
4939   LIBS="-lsocket $LIBS"
4940
4941 else
4942   echo "$ac_t""no" 1>&6
4943 fi
4944  ;;
4945     esac
4946     case "$LIBS" in
4947     *-linet*) ;;
4948     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4949 echo "configure:4950: checking for connect in -linet" >&5
4950 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4951 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4952   echo $ac_n "(cached) $ac_c" 1>&6
4953 else
4954   ac_save_LIBS="$LIBS"
4955 LIBS="-linet  $LIBS"
4956 cat > conftest.$ac_ext <<EOF
4957 #line 4958 "configure"
4958 #include "confdefs.h"
4959 /* Override any gcc2 internal prototype to avoid an error.  */
4960 /* We use char because int might match the return type of a gcc2
4961     builtin and then its argument prototype would still apply.  */
4962 char connect();
4963
4964 int main() {
4965 connect()
4966 ; return 0; }
4967 EOF
4968 if { (eval echo configure:4969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4969   rm -rf conftest*
4970   eval "ac_cv_lib_$ac_lib_var=yes"
4971 else
4972   echo "configure: failed program was:" >&5
4973   cat conftest.$ac_ext >&5
4974   rm -rf conftest*
4975   eval "ac_cv_lib_$ac_lib_var=no"
4976 fi
4977 rm -f conftest*
4978 LIBS="$ac_save_LIBS"
4979
4980 fi
4981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4982   echo "$ac_t""yes" 1>&6
4983     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4984     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4985   cat >> confdefs.h <<EOF
4986 #define $ac_tr_lib 1
4987 EOF
4988
4989   LIBS="-linet $LIBS"
4990
4991 else
4992   echo "$ac_t""no" 1>&6
4993 fi
4994  ;;
4995     esac
4996             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4997        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4998         # ac_cv_func_connect=yes
4999         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5000         cat >> confdefs.h <<\EOF
5001 #define HAVE_CONNECT 1
5002 EOF
5003
5004     fi
5005 fi
5006
5007 ###############################################
5008 # test for where we get get_yp_default_domain() from
5009 for ac_func in yp_get_default_domain
5010 do
5011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5012 echo "configure:5013: checking for $ac_func" >&5
5013 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5014   echo $ac_n "(cached) $ac_c" 1>&6
5015 else
5016   cat > conftest.$ac_ext <<EOF
5017 #line 5018 "configure"
5018 #include "confdefs.h"
5019 /* System header to define __stub macros and hopefully few prototypes,
5020     which can conflict with char $ac_func(); below.  */
5021 #include <assert.h>
5022 /* Override any gcc2 internal prototype to avoid an error.  */
5023 /* We use char because int might match the return type of a gcc2
5024     builtin and then its argument prototype would still apply.  */
5025 char $ac_func();
5026
5027 int main() {
5028
5029 /* The GNU C library defines this for functions which it implements
5030     to always fail with ENOSYS.  Some functions are actually named
5031     something starting with __ and the normal name is an alias.  */
5032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5033 choke me
5034 #else
5035 $ac_func();
5036 #endif
5037
5038 ; return 0; }
5039 EOF
5040 if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5041   rm -rf conftest*
5042   eval "ac_cv_func_$ac_func=yes"
5043 else
5044   echo "configure: failed program was:" >&5
5045   cat conftest.$ac_ext >&5
5046   rm -rf conftest*
5047   eval "ac_cv_func_$ac_func=no"
5048 fi
5049 rm -f conftest*
5050 fi
5051
5052 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5053   echo "$ac_t""yes" 1>&6
5054     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5055   cat >> confdefs.h <<EOF
5056 #define $ac_tr_func 1
5057 EOF
5058  
5059 else
5060   echo "$ac_t""no" 1>&6
5061 fi
5062 done
5063
5064 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5065         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5066 echo "configure:5067: checking for yp_get_default_domain in -lnsl" >&5
5067 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071   ac_save_LIBS="$LIBS"
5072 LIBS="-lnsl  $LIBS"
5073 cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076 /* Override any gcc2 internal prototype to avoid an error.  */
5077 /* We use char because int might match the return type of a gcc2
5078     builtin and then its argument prototype would still apply.  */
5079 char yp_get_default_domain();
5080
5081 int main() {
5082 yp_get_default_domain()
5083 ; return 0; }
5084 EOF
5085 if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5086   rm -rf conftest*
5087   eval "ac_cv_lib_$ac_lib_var=yes"
5088 else
5089   echo "configure: failed program was:" >&5
5090   cat conftest.$ac_ext >&5
5091   rm -rf conftest*
5092   eval "ac_cv_lib_$ac_lib_var=no"
5093 fi
5094 rm -f conftest*
5095 LIBS="$ac_save_LIBS"
5096
5097 fi
5098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5099   echo "$ac_t""yes" 1>&6
5100   LIBS="$LIBS -lnsl";
5101         cat >> confdefs.h <<\EOF
5102 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5103 EOF
5104
5105 else
5106   echo "$ac_t""no" 1>&6
5107 fi
5108  
5109 fi
5110
5111 # Check if we have execl, if not we need to compile smbrun.
5112 for ac_func in execl
5113 do
5114 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5115 echo "configure:5116: checking for $ac_func" >&5
5116 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5117   echo $ac_n "(cached) $ac_c" 1>&6
5118 else
5119   cat > conftest.$ac_ext <<EOF
5120 #line 5121 "configure"
5121 #include "confdefs.h"
5122 /* System header to define __stub macros and hopefully few prototypes,
5123     which can conflict with char $ac_func(); below.  */
5124 #include <assert.h>
5125 /* Override any gcc2 internal prototype to avoid an error.  */
5126 /* We use char because int might match the return type of a gcc2
5127     builtin and then its argument prototype would still apply.  */
5128 char $ac_func();
5129
5130 int main() {
5131
5132 /* The GNU C library defines this for functions which it implements
5133     to always fail with ENOSYS.  Some functions are actually named
5134     something starting with __ and the normal name is an alias.  */
5135 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5136 choke me
5137 #else
5138 $ac_func();
5139 #endif
5140
5141 ; return 0; }
5142 EOF
5143 if { (eval echo configure:5144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5144   rm -rf conftest*
5145   eval "ac_cv_func_$ac_func=yes"
5146 else
5147   echo "configure: failed program was:" >&5
5148   cat conftest.$ac_ext >&5
5149   rm -rf conftest*
5150   eval "ac_cv_func_$ac_func=no"
5151 fi
5152 rm -f conftest*
5153 fi
5154
5155 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5156   echo "$ac_t""yes" 1>&6
5157     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5158   cat >> confdefs.h <<EOF
5159 #define $ac_tr_func 1
5160 EOF
5161  
5162 else
5163   echo "$ac_t""no" 1>&6
5164 fi
5165 done
5166
5167 if test x"$ac_cv_func_execl" = x"no"; then
5168     RUNPROG="bin/smbrun"
5169 else
5170     RUNPROG=""
5171 fi
5172
5173 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5174 do
5175 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5176 echo "configure:5177: checking for $ac_func" >&5
5177 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5178   echo $ac_n "(cached) $ac_c" 1>&6
5179 else
5180   cat > conftest.$ac_ext <<EOF
5181 #line 5182 "configure"
5182 #include "confdefs.h"
5183 /* System header to define __stub macros and hopefully few prototypes,
5184     which can conflict with char $ac_func(); below.  */
5185 #include <assert.h>
5186 /* Override any gcc2 internal prototype to avoid an error.  */
5187 /* We use char because int might match the return type of a gcc2
5188     builtin and then its argument prototype would still apply.  */
5189 char $ac_func();
5190
5191 int main() {
5192
5193 /* The GNU C library defines this for functions which it implements
5194     to always fail with ENOSYS.  Some functions are actually named
5195     something starting with __ and the normal name is an alias.  */
5196 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5197 choke me
5198 #else
5199 $ac_func();
5200 #endif
5201
5202 ; return 0; }
5203 EOF
5204 if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5205   rm -rf conftest*
5206   eval "ac_cv_func_$ac_func=yes"
5207 else
5208   echo "configure: failed program was:" >&5
5209   cat conftest.$ac_ext >&5
5210   rm -rf conftest*
5211   eval "ac_cv_func_$ac_func=no"
5212 fi
5213 rm -f conftest*
5214 fi
5215
5216 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5217   echo "$ac_t""yes" 1>&6
5218     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5219   cat >> confdefs.h <<EOF
5220 #define $ac_tr_func 1
5221 EOF
5222  
5223 else
5224   echo "$ac_t""no" 1>&6
5225 fi
5226 done
5227
5228 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5229 do
5230 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5231 echo "configure:5232: checking for $ac_func" >&5
5232 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5233   echo $ac_n "(cached) $ac_c" 1>&6
5234 else
5235   cat > conftest.$ac_ext <<EOF
5236 #line 5237 "configure"
5237 #include "confdefs.h"
5238 /* System header to define __stub macros and hopefully few prototypes,
5239     which can conflict with char $ac_func(); below.  */
5240 #include <assert.h>
5241 /* Override any gcc2 internal prototype to avoid an error.  */
5242 /* We use char because int might match the return type of a gcc2
5243     builtin and then its argument prototype would still apply.  */
5244 char $ac_func();
5245
5246 int main() {
5247
5248 /* The GNU C library defines this for functions which it implements
5249     to always fail with ENOSYS.  Some functions are actually named
5250     something starting with __ and the normal name is an alias.  */
5251 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5252 choke me
5253 #else
5254 $ac_func();
5255 #endif
5256
5257 ; return 0; }
5258 EOF
5259 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5260   rm -rf conftest*
5261   eval "ac_cv_func_$ac_func=yes"
5262 else
5263   echo "configure: failed program was:" >&5
5264   cat conftest.$ac_ext >&5
5265   rm -rf conftest*
5266   eval "ac_cv_func_$ac_func=no"
5267 fi
5268 rm -f conftest*
5269 fi
5270
5271 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5272   echo "$ac_t""yes" 1>&6
5273     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5274   cat >> confdefs.h <<EOF
5275 #define $ac_tr_func 1
5276 EOF
5277  
5278 else
5279   echo "$ac_t""no" 1>&6
5280 fi
5281 done
5282
5283 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5284 do
5285 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5286 echo "configure:5287: checking for $ac_func" >&5
5287 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290   cat > conftest.$ac_ext <<EOF
5291 #line 5292 "configure"
5292 #include "confdefs.h"
5293 /* System header to define __stub macros and hopefully few prototypes,
5294     which can conflict with char $ac_func(); below.  */
5295 #include <assert.h>
5296 /* Override any gcc2 internal prototype to avoid an error.  */
5297 /* We use char because int might match the return type of a gcc2
5298     builtin and then its argument prototype would still apply.  */
5299 char $ac_func();
5300
5301 int main() {
5302
5303 /* The GNU C library defines this for functions which it implements
5304     to always fail with ENOSYS.  Some functions are actually named
5305     something starting with __ and the normal name is an alias.  */
5306 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5307 choke me
5308 #else
5309 $ac_func();
5310 #endif
5311
5312 ; return 0; }
5313 EOF
5314 if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5315   rm -rf conftest*
5316   eval "ac_cv_func_$ac_func=yes"
5317 else
5318   echo "configure: failed program was:" >&5
5319   cat conftest.$ac_ext >&5
5320   rm -rf conftest*
5321   eval "ac_cv_func_$ac_func=no"
5322 fi
5323 rm -f conftest*
5324 fi
5325
5326 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5327   echo "$ac_t""yes" 1>&6
5328     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5329   cat >> confdefs.h <<EOF
5330 #define $ac_tr_func 1
5331 EOF
5332  
5333 else
5334   echo "$ac_t""no" 1>&6
5335 fi
5336 done
5337
5338 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5339 do
5340 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5341 echo "configure:5342: checking for $ac_func" >&5
5342 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 /* System header to define __stub macros and hopefully few prototypes,
5349     which can conflict with char $ac_func(); below.  */
5350 #include <assert.h>
5351 /* Override any gcc2 internal prototype to avoid an error.  */
5352 /* We use char because int might match the return type of a gcc2
5353     builtin and then its argument prototype would still apply.  */
5354 char $ac_func();
5355
5356 int main() {
5357
5358 /* The GNU C library defines this for functions which it implements
5359     to always fail with ENOSYS.  Some functions are actually named
5360     something starting with __ and the normal name is an alias.  */
5361 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5362 choke me
5363 #else
5364 $ac_func();
5365 #endif
5366
5367 ; return 0; }
5368 EOF
5369 if { (eval echo configure:5370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5370   rm -rf conftest*
5371   eval "ac_cv_func_$ac_func=yes"
5372 else
5373   echo "configure: failed program was:" >&5
5374   cat conftest.$ac_ext >&5
5375   rm -rf conftest*
5376   eval "ac_cv_func_$ac_func=no"
5377 fi
5378 rm -f conftest*
5379 fi
5380
5381 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5382   echo "$ac_t""yes" 1>&6
5383     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5384   cat >> confdefs.h <<EOF
5385 #define $ac_tr_func 1
5386 EOF
5387  
5388 else
5389   echo "$ac_t""no" 1>&6
5390 fi
5391 done
5392
5393 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5394 do
5395 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5396 echo "configure:5397: checking for $ac_func" >&5
5397 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5398   echo $ac_n "(cached) $ac_c" 1>&6
5399 else
5400   cat > conftest.$ac_ext <<EOF
5401 #line 5402 "configure"
5402 #include "confdefs.h"
5403 /* System header to define __stub macros and hopefully few prototypes,
5404     which can conflict with char $ac_func(); below.  */
5405 #include <assert.h>
5406 /* Override any gcc2 internal prototype to avoid an error.  */
5407 /* We use char because int might match the return type of a gcc2
5408     builtin and then its argument prototype would still apply.  */
5409 char $ac_func();
5410
5411 int main() {
5412
5413 /* The GNU C library defines this for functions which it implements
5414     to always fail with ENOSYS.  Some functions are actually named
5415     something starting with __ and the normal name is an alias.  */
5416 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5417 choke me
5418 #else
5419 $ac_func();
5420 #endif
5421
5422 ; return 0; }
5423 EOF
5424 if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5425   rm -rf conftest*
5426   eval "ac_cv_func_$ac_func=yes"
5427 else
5428   echo "configure: failed program was:" >&5
5429   cat conftest.$ac_ext >&5
5430   rm -rf conftest*
5431   eval "ac_cv_func_$ac_func=no"
5432 fi
5433 rm -f conftest*
5434 fi
5435
5436 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5437   echo "$ac_t""yes" 1>&6
5438     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5439   cat >> confdefs.h <<EOF
5440 #define $ac_tr_func 1
5441 EOF
5442  
5443 else
5444   echo "$ac_t""no" 1>&6
5445 fi
5446 done
5447
5448 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5449 do
5450 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5451 echo "configure:5452: checking for $ac_func" >&5
5452 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5453   echo $ac_n "(cached) $ac_c" 1>&6
5454 else
5455   cat > conftest.$ac_ext <<EOF
5456 #line 5457 "configure"
5457 #include "confdefs.h"
5458 /* System header to define __stub macros and hopefully few prototypes,
5459     which can conflict with char $ac_func(); below.  */
5460 #include <assert.h>
5461 /* Override any gcc2 internal prototype to avoid an error.  */
5462 /* We use char because int might match the return type of a gcc2
5463     builtin and then its argument prototype would still apply.  */
5464 char $ac_func();
5465
5466 int main() {
5467
5468 /* The GNU C library defines this for functions which it implements
5469     to always fail with ENOSYS.  Some functions are actually named
5470     something starting with __ and the normal name is an alias.  */
5471 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5472 choke me
5473 #else
5474 $ac_func();
5475 #endif
5476
5477 ; return 0; }
5478 EOF
5479 if { (eval echo configure:5480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5480   rm -rf conftest*
5481   eval "ac_cv_func_$ac_func=yes"
5482 else
5483   echo "configure: failed program was:" >&5
5484   cat conftest.$ac_ext >&5
5485   rm -rf conftest*
5486   eval "ac_cv_func_$ac_func=no"
5487 fi
5488 rm -f conftest*
5489 fi
5490
5491 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5492   echo "$ac_t""yes" 1>&6
5493     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5494   cat >> confdefs.h <<EOF
5495 #define $ac_tr_func 1
5496 EOF
5497  
5498 else
5499   echo "$ac_t""no" 1>&6
5500 fi
5501 done
5502
5503 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5504 do
5505 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5506 echo "configure:5507: checking for $ac_func" >&5
5507 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5508   echo $ac_n "(cached) $ac_c" 1>&6
5509 else
5510   cat > conftest.$ac_ext <<EOF
5511 #line 5512 "configure"
5512 #include "confdefs.h"
5513 /* System header to define __stub macros and hopefully few prototypes,
5514     which can conflict with char $ac_func(); below.  */
5515 #include <assert.h>
5516 /* Override any gcc2 internal prototype to avoid an error.  */
5517 /* We use char because int might match the return type of a gcc2
5518     builtin and then its argument prototype would still apply.  */
5519 char $ac_func();
5520
5521 int main() {
5522
5523 /* The GNU C library defines this for functions which it implements
5524     to always fail with ENOSYS.  Some functions are actually named
5525     something starting with __ and the normal name is an alias.  */
5526 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5527 choke me
5528 #else
5529 $ac_func();
5530 #endif
5531
5532 ; return 0; }
5533 EOF
5534 if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5535   rm -rf conftest*
5536   eval "ac_cv_func_$ac_func=yes"
5537 else
5538   echo "configure: failed program was:" >&5
5539   cat conftest.$ac_ext >&5
5540   rm -rf conftest*
5541   eval "ac_cv_func_$ac_func=no"
5542 fi
5543 rm -f conftest*
5544 fi
5545
5546 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5547   echo "$ac_t""yes" 1>&6
5548     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5549   cat >> confdefs.h <<EOF
5550 #define $ac_tr_func 1
5551 EOF
5552  
5553 else
5554   echo "$ac_t""no" 1>&6
5555 fi
5556 done
5557
5558 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5559 do
5560 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5561 echo "configure:5562: checking for $ac_func" >&5
5562 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5563   echo $ac_n "(cached) $ac_c" 1>&6
5564 else
5565   cat > conftest.$ac_ext <<EOF
5566 #line 5567 "configure"
5567 #include "confdefs.h"
5568 /* System header to define __stub macros and hopefully few prototypes,
5569     which can conflict with char $ac_func(); below.  */
5570 #include <assert.h>
5571 /* Override any gcc2 internal prototype to avoid an error.  */
5572 /* We use char because int might match the return type of a gcc2
5573     builtin and then its argument prototype would still apply.  */
5574 char $ac_func();
5575
5576 int main() {
5577
5578 /* The GNU C library defines this for functions which it implements
5579     to always fail with ENOSYS.  Some functions are actually named
5580     something starting with __ and the normal name is an alias.  */
5581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5582 choke me
5583 #else
5584 $ac_func();
5585 #endif
5586
5587 ; return 0; }
5588 EOF
5589 if { (eval echo configure:5590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5590   rm -rf conftest*
5591   eval "ac_cv_func_$ac_func=yes"
5592 else
5593   echo "configure: failed program was:" >&5
5594   cat conftest.$ac_ext >&5
5595   rm -rf conftest*
5596   eval "ac_cv_func_$ac_func=no"
5597 fi
5598 rm -f conftest*
5599 fi
5600
5601 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5602   echo "$ac_t""yes" 1>&6
5603     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5604   cat >> confdefs.h <<EOF
5605 #define $ac_tr_func 1
5606 EOF
5607  
5608 else
5609   echo "$ac_t""no" 1>&6
5610 fi
5611 done
5612
5613 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5614 do
5615 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5616 echo "configure:5617: checking for $ac_func" >&5
5617 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5618   echo $ac_n "(cached) $ac_c" 1>&6
5619 else
5620   cat > conftest.$ac_ext <<EOF
5621 #line 5622 "configure"
5622 #include "confdefs.h"
5623 /* System header to define __stub macros and hopefully few prototypes,
5624     which can conflict with char $ac_func(); below.  */
5625 #include <assert.h>
5626 /* Override any gcc2 internal prototype to avoid an error.  */
5627 /* We use char because int might match the return type of a gcc2
5628     builtin and then its argument prototype would still apply.  */
5629 char $ac_func();
5630
5631 int main() {
5632
5633 /* The GNU C library defines this for functions which it implements
5634     to always fail with ENOSYS.  Some functions are actually named
5635     something starting with __ and the normal name is an alias.  */
5636 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5637 choke me
5638 #else
5639 $ac_func();
5640 #endif
5641
5642 ; return 0; }
5643 EOF
5644 if { (eval echo configure:5645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5645   rm -rf conftest*
5646   eval "ac_cv_func_$ac_func=yes"
5647 else
5648   echo "configure: failed program was:" >&5
5649   cat conftest.$ac_ext >&5
5650   rm -rf conftest*
5651   eval "ac_cv_func_$ac_func=no"
5652 fi
5653 rm -f conftest*
5654 fi
5655
5656 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5657   echo "$ac_t""yes" 1>&6
5658     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5659   cat >> confdefs.h <<EOF
5660 #define $ac_tr_func 1
5661 EOF
5662  
5663 else
5664   echo "$ac_t""no" 1>&6
5665 fi
5666 done
5667
5668 for ac_func in syslog vsyslog
5669 do
5670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5671 echo "configure:5672: checking for $ac_func" >&5
5672 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5673   echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675   cat > conftest.$ac_ext <<EOF
5676 #line 5677 "configure"
5677 #include "confdefs.h"
5678 /* System header to define __stub macros and hopefully few prototypes,
5679     which can conflict with char $ac_func(); below.  */
5680 #include <assert.h>
5681 /* Override any gcc2 internal prototype to avoid an error.  */
5682 /* We use char because int might match the return type of a gcc2
5683     builtin and then its argument prototype would still apply.  */
5684 char $ac_func();
5685
5686 int main() {
5687
5688 /* The GNU C library defines this for functions which it implements
5689     to always fail with ENOSYS.  Some functions are actually named
5690     something starting with __ and the normal name is an alias.  */
5691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5692 choke me
5693 #else
5694 $ac_func();
5695 #endif
5696
5697 ; return 0; }
5698 EOF
5699 if { (eval echo configure:5700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5700   rm -rf conftest*
5701   eval "ac_cv_func_$ac_func=yes"
5702 else
5703   echo "configure: failed program was:" >&5
5704   cat conftest.$ac_ext >&5
5705   rm -rf conftest*
5706   eval "ac_cv_func_$ac_func=no"
5707 fi
5708 rm -f conftest*
5709 fi
5710
5711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5712   echo "$ac_t""yes" 1>&6
5713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5714   cat >> confdefs.h <<EOF
5715 #define $ac_tr_func 1
5716 EOF
5717  
5718 else
5719   echo "$ac_t""no" 1>&6
5720 fi
5721 done
5722
5723 # setbuffer is needed for smbtorture
5724 for ac_func in setbuffer
5725 do
5726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5727 echo "configure:5728: checking for $ac_func" >&5
5728 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5729   echo $ac_n "(cached) $ac_c" 1>&6
5730 else
5731   cat > conftest.$ac_ext <<EOF
5732 #line 5733 "configure"
5733 #include "confdefs.h"
5734 /* System header to define __stub macros and hopefully few prototypes,
5735     which can conflict with char $ac_func(); below.  */
5736 #include <assert.h>
5737 /* Override any gcc2 internal prototype to avoid an error.  */
5738 /* We use char because int might match the return type of a gcc2
5739     builtin and then its argument prototype would still apply.  */
5740 char $ac_func();
5741
5742 int main() {
5743
5744 /* The GNU C library defines this for functions which it implements
5745     to always fail with ENOSYS.  Some functions are actually named
5746     something starting with __ and the normal name is an alias.  */
5747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5748 choke me
5749 #else
5750 $ac_func();
5751 #endif
5752
5753 ; return 0; }
5754 EOF
5755 if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5756   rm -rf conftest*
5757   eval "ac_cv_func_$ac_func=yes"
5758 else
5759   echo "configure: failed program was:" >&5
5760   cat conftest.$ac_ext >&5
5761   rm -rf conftest*
5762   eval "ac_cv_func_$ac_func=no"
5763 fi
5764 rm -f conftest*
5765 fi
5766
5767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5768   echo "$ac_t""yes" 1>&6
5769     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5770   cat >> confdefs.h <<EOF
5771 #define $ac_tr_func 1
5772 EOF
5773  
5774 else
5775   echo "$ac_t""no" 1>&6
5776 fi
5777 done
5778
5779
5780 # syscall() is needed for smbwrapper.
5781 for ac_func in syscall
5782 do
5783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5784 echo "configure:5785: checking for $ac_func" >&5
5785 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5786   echo $ac_n "(cached) $ac_c" 1>&6
5787 else
5788   cat > conftest.$ac_ext <<EOF
5789 #line 5790 "configure"
5790 #include "confdefs.h"
5791 /* System header to define __stub macros and hopefully few prototypes,
5792     which can conflict with char $ac_func(); below.  */
5793 #include <assert.h>
5794 /* Override any gcc2 internal prototype to avoid an error.  */
5795 /* We use char because int might match the return type of a gcc2
5796     builtin and then its argument prototype would still apply.  */
5797 char $ac_func();
5798
5799 int main() {
5800
5801 /* The GNU C library defines this for functions which it implements
5802     to always fail with ENOSYS.  Some functions are actually named
5803     something starting with __ and the normal name is an alias.  */
5804 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5805 choke me
5806 #else
5807 $ac_func();
5808 #endif
5809
5810 ; return 0; }
5811 EOF
5812 if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5813   rm -rf conftest*
5814   eval "ac_cv_func_$ac_func=yes"
5815 else
5816   echo "configure: failed program was:" >&5
5817   cat conftest.$ac_ext >&5
5818   rm -rf conftest*
5819   eval "ac_cv_func_$ac_func=no"
5820 fi
5821 rm -f conftest*
5822 fi
5823
5824 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5825   echo "$ac_t""yes" 1>&6
5826     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5827   cat >> confdefs.h <<EOF
5828 #define $ac_tr_func 1
5829 EOF
5830  
5831 else
5832   echo "$ac_t""no" 1>&6
5833 fi
5834 done
5835
5836
5837 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5838 do
5839 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5840 echo "configure:5841: checking for $ac_func" >&5
5841 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5842   echo $ac_n "(cached) $ac_c" 1>&6
5843 else
5844   cat > conftest.$ac_ext <<EOF
5845 #line 5846 "configure"
5846 #include "confdefs.h"
5847 /* System header to define __stub macros and hopefully few prototypes,
5848     which can conflict with char $ac_func(); below.  */
5849 #include <assert.h>
5850 /* Override any gcc2 internal prototype to avoid an error.  */
5851 /* We use char because int might match the return type of a gcc2
5852     builtin and then its argument prototype would still apply.  */
5853 char $ac_func();
5854
5855 int main() {
5856
5857 /* The GNU C library defines this for functions which it implements
5858     to always fail with ENOSYS.  Some functions are actually named
5859     something starting with __ and the normal name is an alias.  */
5860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5861 choke me
5862 #else
5863 $ac_func();
5864 #endif
5865
5866 ; return 0; }
5867 EOF
5868 if { (eval echo configure:5869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5869   rm -rf conftest*
5870   eval "ac_cv_func_$ac_func=yes"
5871 else
5872   echo "configure: failed program was:" >&5
5873   cat conftest.$ac_ext >&5
5874   rm -rf conftest*
5875   eval "ac_cv_func_$ac_func=no"
5876 fi
5877 rm -f conftest*
5878 fi
5879
5880 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5881   echo "$ac_t""yes" 1>&6
5882     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5883   cat >> confdefs.h <<EOF
5884 #define $ac_tr_func 1
5885 EOF
5886  
5887 else
5888   echo "$ac_t""no" 1>&6
5889 fi
5890 done
5891
5892 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5893 do
5894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5895 echo "configure:5896: checking for $ac_func" >&5
5896 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5897   echo $ac_n "(cached) $ac_c" 1>&6
5898 else
5899   cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902 /* System header to define __stub macros and hopefully few prototypes,
5903     which can conflict with char $ac_func(); below.  */
5904 #include <assert.h>
5905 /* Override any gcc2 internal prototype to avoid an error.  */
5906 /* We use char because int might match the return type of a gcc2
5907     builtin and then its argument prototype would still apply.  */
5908 char $ac_func();
5909
5910 int main() {
5911
5912 /* The GNU C library defines this for functions which it implements
5913     to always fail with ENOSYS.  Some functions are actually named
5914     something starting with __ and the normal name is an alias.  */
5915 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5916 choke me
5917 #else
5918 $ac_func();
5919 #endif
5920
5921 ; return 0; }
5922 EOF
5923 if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5924   rm -rf conftest*
5925   eval "ac_cv_func_$ac_func=yes"
5926 else
5927   echo "configure: failed program was:" >&5
5928   cat conftest.$ac_ext >&5
5929   rm -rf conftest*
5930   eval "ac_cv_func_$ac_func=no"
5931 fi
5932 rm -f conftest*
5933 fi
5934
5935 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5936   echo "$ac_t""yes" 1>&6
5937     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5938   cat >> confdefs.h <<EOF
5939 #define $ac_tr_func 1
5940 EOF
5941  
5942 else
5943   echo "$ac_t""no" 1>&6
5944 fi
5945 done
5946
5947 for ac_func in __getcwd _getcwd
5948 do
5949 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5950 echo "configure:5951: checking for $ac_func" >&5
5951 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5952   echo $ac_n "(cached) $ac_c" 1>&6
5953 else
5954   cat > conftest.$ac_ext <<EOF
5955 #line 5956 "configure"
5956 #include "confdefs.h"
5957 /* System header to define __stub macros and hopefully few prototypes,
5958     which can conflict with char $ac_func(); below.  */
5959 #include <assert.h>
5960 /* Override any gcc2 internal prototype to avoid an error.  */
5961 /* We use char because int might match the return type of a gcc2
5962     builtin and then its argument prototype would still apply.  */
5963 char $ac_func();
5964
5965 int main() {
5966
5967 /* The GNU C library defines this for functions which it implements
5968     to always fail with ENOSYS.  Some functions are actually named
5969     something starting with __ and the normal name is an alias.  */
5970 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5971 choke me
5972 #else
5973 $ac_func();
5974 #endif
5975
5976 ; return 0; }
5977 EOF
5978 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5979   rm -rf conftest*
5980   eval "ac_cv_func_$ac_func=yes"
5981 else
5982   echo "configure: failed program was:" >&5
5983   cat conftest.$ac_ext >&5
5984   rm -rf conftest*
5985   eval "ac_cv_func_$ac_func=no"
5986 fi
5987 rm -f conftest*
5988 fi
5989
5990 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5991   echo "$ac_t""yes" 1>&6
5992     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5993   cat >> confdefs.h <<EOF
5994 #define $ac_tr_func 1
5995 EOF
5996  
5997 else
5998   echo "$ac_t""no" 1>&6
5999 fi
6000 done
6001
6002 for ac_func in __xstat __fxstat __lxstat
6003 do
6004 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6005 echo "configure:6006: checking for $ac_func" >&5
6006 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6007   echo $ac_n "(cached) $ac_c" 1>&6
6008 else
6009   cat > conftest.$ac_ext <<EOF
6010 #line 6011 "configure"
6011 #include "confdefs.h"
6012 /* System header to define __stub macros and hopefully few prototypes,
6013     which can conflict with char $ac_func(); below.  */
6014 #include <assert.h>
6015 /* Override any gcc2 internal prototype to avoid an error.  */
6016 /* We use char because int might match the return type of a gcc2
6017     builtin and then its argument prototype would still apply.  */
6018 char $ac_func();
6019
6020 int main() {
6021
6022 /* The GNU C library defines this for functions which it implements
6023     to always fail with ENOSYS.  Some functions are actually named
6024     something starting with __ and the normal name is an alias.  */
6025 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6026 choke me
6027 #else
6028 $ac_func();
6029 #endif
6030
6031 ; return 0; }
6032 EOF
6033 if { (eval echo configure:6034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6034   rm -rf conftest*
6035   eval "ac_cv_func_$ac_func=yes"
6036 else
6037   echo "configure: failed program was:" >&5
6038   cat conftest.$ac_ext >&5
6039   rm -rf conftest*
6040   eval "ac_cv_func_$ac_func=no"
6041 fi
6042 rm -f conftest*
6043 fi
6044
6045 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6046   echo "$ac_t""yes" 1>&6
6047     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6048   cat >> confdefs.h <<EOF
6049 #define $ac_tr_func 1
6050 EOF
6051  
6052 else
6053   echo "$ac_t""no" 1>&6
6054 fi
6055 done
6056
6057 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6058 do
6059 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6060 echo "configure:6061: checking for $ac_func" >&5
6061 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6062   echo $ac_n "(cached) $ac_c" 1>&6
6063 else
6064   cat > conftest.$ac_ext <<EOF
6065 #line 6066 "configure"
6066 #include "confdefs.h"
6067 /* System header to define __stub macros and hopefully few prototypes,
6068     which can conflict with char $ac_func(); below.  */
6069 #include <assert.h>
6070 /* Override any gcc2 internal prototype to avoid an error.  */
6071 /* We use char because int might match the return type of a gcc2
6072     builtin and then its argument prototype would still apply.  */
6073 char $ac_func();
6074
6075 int main() {
6076
6077 /* The GNU C library defines this for functions which it implements
6078     to always fail with ENOSYS.  Some functions are actually named
6079     something starting with __ and the normal name is an alias.  */
6080 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6081 choke me
6082 #else
6083 $ac_func();
6084 #endif
6085
6086 ; return 0; }
6087 EOF
6088 if { (eval echo configure:6089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6089   rm -rf conftest*
6090   eval "ac_cv_func_$ac_func=yes"
6091 else
6092   echo "configure: failed program was:" >&5
6093   cat conftest.$ac_ext >&5
6094   rm -rf conftest*
6095   eval "ac_cv_func_$ac_func=no"
6096 fi
6097 rm -f conftest*
6098 fi
6099
6100 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6101   echo "$ac_t""yes" 1>&6
6102     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6103   cat >> confdefs.h <<EOF
6104 #define $ac_tr_func 1
6105 EOF
6106  
6107 else
6108   echo "$ac_t""no" 1>&6
6109 fi
6110 done
6111
6112 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6113 do
6114 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6115 echo "configure:6116: checking for $ac_func" >&5
6116 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6117   echo $ac_n "(cached) $ac_c" 1>&6
6118 else
6119   cat > conftest.$ac_ext <<EOF
6120 #line 6121 "configure"
6121 #include "confdefs.h"
6122 /* System header to define __stub macros and hopefully few prototypes,
6123     which can conflict with char $ac_func(); below.  */
6124 #include <assert.h>
6125 /* Override any gcc2 internal prototype to avoid an error.  */
6126 /* We use char because int might match the return type of a gcc2
6127     builtin and then its argument prototype would still apply.  */
6128 char $ac_func();
6129
6130 int main() {
6131
6132 /* The GNU C library defines this for functions which it implements
6133     to always fail with ENOSYS.  Some functions are actually named
6134     something starting with __ and the normal name is an alias.  */
6135 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6136 choke me
6137 #else
6138 $ac_func();
6139 #endif
6140
6141 ; return 0; }
6142 EOF
6143 if { (eval echo configure:6144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6144   rm -rf conftest*
6145   eval "ac_cv_func_$ac_func=yes"
6146 else
6147   echo "configure: failed program was:" >&5
6148   cat conftest.$ac_ext >&5
6149   rm -rf conftest*
6150   eval "ac_cv_func_$ac_func=no"
6151 fi
6152 rm -f conftest*
6153 fi
6154
6155 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6156   echo "$ac_t""yes" 1>&6
6157     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6158   cat >> confdefs.h <<EOF
6159 #define $ac_tr_func 1
6160 EOF
6161  
6162 else
6163   echo "$ac_t""no" 1>&6
6164 fi
6165 done
6166
6167 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6168 do
6169 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6170 echo "configure:6171: checking for $ac_func" >&5
6171 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6172   echo $ac_n "(cached) $ac_c" 1>&6
6173 else
6174   cat > conftest.$ac_ext <<EOF
6175 #line 6176 "configure"
6176 #include "confdefs.h"
6177 /* System header to define __stub macros and hopefully few prototypes,
6178     which can conflict with char $ac_func(); below.  */
6179 #include <assert.h>
6180 /* Override any gcc2 internal prototype to avoid an error.  */
6181 /* We use char because int might match the return type of a gcc2
6182     builtin and then its argument prototype would still apply.  */
6183 char $ac_func();
6184
6185 int main() {
6186
6187 /* The GNU C library defines this for functions which it implements
6188     to always fail with ENOSYS.  Some functions are actually named
6189     something starting with __ and the normal name is an alias.  */
6190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6191 choke me
6192 #else
6193 $ac_func();
6194 #endif
6195
6196 ; return 0; }
6197 EOF
6198 if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6199   rm -rf conftest*
6200   eval "ac_cv_func_$ac_func=yes"
6201 else
6202   echo "configure: failed program was:" >&5
6203   cat conftest.$ac_ext >&5
6204   rm -rf conftest*
6205   eval "ac_cv_func_$ac_func=no"
6206 fi
6207 rm -f conftest*
6208 fi
6209
6210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6211   echo "$ac_t""yes" 1>&6
6212     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6213   cat >> confdefs.h <<EOF
6214 #define $ac_tr_func 1
6215 EOF
6216  
6217 else
6218   echo "$ac_t""no" 1>&6
6219 fi
6220 done
6221
6222 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6223 do
6224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6225 echo "configure:6226: checking for $ac_func" >&5
6226 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6227   echo $ac_n "(cached) $ac_c" 1>&6
6228 else
6229   cat > conftest.$ac_ext <<EOF
6230 #line 6231 "configure"
6231 #include "confdefs.h"
6232 /* System header to define __stub macros and hopefully few prototypes,
6233     which can conflict with char $ac_func(); below.  */
6234 #include <assert.h>
6235 /* Override any gcc2 internal prototype to avoid an error.  */
6236 /* We use char because int might match the return type of a gcc2
6237     builtin and then its argument prototype would still apply.  */
6238 char $ac_func();
6239
6240 int main() {
6241
6242 /* The GNU C library defines this for functions which it implements
6243     to always fail with ENOSYS.  Some functions are actually named
6244     something starting with __ and the normal name is an alias.  */
6245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6246 choke me
6247 #else
6248 $ac_func();
6249 #endif
6250
6251 ; return 0; }
6252 EOF
6253 if { (eval echo configure:6254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6254   rm -rf conftest*
6255   eval "ac_cv_func_$ac_func=yes"
6256 else
6257   echo "configure: failed program was:" >&5
6258   cat conftest.$ac_ext >&5
6259   rm -rf conftest*
6260   eval "ac_cv_func_$ac_func=no"
6261 fi
6262 rm -f conftest*
6263 fi
6264
6265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6266   echo "$ac_t""yes" 1>&6
6267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6268   cat >> confdefs.h <<EOF
6269 #define $ac_tr_func 1
6270 EOF
6271  
6272 else
6273   echo "$ac_t""no" 1>&6
6274 fi
6275 done
6276
6277 for ac_func in _write __write _fork __fork
6278 do
6279 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6280 echo "configure:6281: checking for $ac_func" >&5
6281 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6282   echo $ac_n "(cached) $ac_c" 1>&6
6283 else
6284   cat > conftest.$ac_ext <<EOF
6285 #line 6286 "configure"
6286 #include "confdefs.h"
6287 /* System header to define __stub macros and hopefully few prototypes,
6288     which can conflict with char $ac_func(); below.  */
6289 #include <assert.h>
6290 /* Override any gcc2 internal prototype to avoid an error.  */
6291 /* We use char because int might match the return type of a gcc2
6292     builtin and then its argument prototype would still apply.  */
6293 char $ac_func();
6294
6295 int main() {
6296
6297 /* The GNU C library defines this for functions which it implements
6298     to always fail with ENOSYS.  Some functions are actually named
6299     something starting with __ and the normal name is an alias.  */
6300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6301 choke me
6302 #else
6303 $ac_func();
6304 #endif
6305
6306 ; return 0; }
6307 EOF
6308 if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6309   rm -rf conftest*
6310   eval "ac_cv_func_$ac_func=yes"
6311 else
6312   echo "configure: failed program was:" >&5
6313   cat conftest.$ac_ext >&5
6314   rm -rf conftest*
6315   eval "ac_cv_func_$ac_func=no"
6316 fi
6317 rm -f conftest*
6318 fi
6319
6320 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6321   echo "$ac_t""yes" 1>&6
6322     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6323   cat >> confdefs.h <<EOF
6324 #define $ac_tr_func 1
6325 EOF
6326  
6327 else
6328   echo "$ac_t""no" 1>&6
6329 fi
6330 done
6331
6332 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6333 do
6334 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6335 echo "configure:6336: checking for $ac_func" >&5
6336 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6337   echo $ac_n "(cached) $ac_c" 1>&6
6338 else
6339   cat > conftest.$ac_ext <<EOF
6340 #line 6341 "configure"
6341 #include "confdefs.h"
6342 /* System header to define __stub macros and hopefully few prototypes,
6343     which can conflict with char $ac_func(); below.  */
6344 #include <assert.h>
6345 /* Override any gcc2 internal prototype to avoid an error.  */
6346 /* We use char because int might match the return type of a gcc2
6347     builtin and then its argument prototype would still apply.  */
6348 char $ac_func();
6349
6350 int main() {
6351
6352 /* The GNU C library defines this for functions which it implements
6353     to always fail with ENOSYS.  Some functions are actually named
6354     something starting with __ and the normal name is an alias.  */
6355 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6356 choke me
6357 #else
6358 $ac_func();
6359 #endif
6360
6361 ; return 0; }
6362 EOF
6363 if { (eval echo configure:6364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6364   rm -rf conftest*
6365   eval "ac_cv_func_$ac_func=yes"
6366 else
6367   echo "configure: failed program was:" >&5
6368   cat conftest.$ac_ext >&5
6369   rm -rf conftest*
6370   eval "ac_cv_func_$ac_func=no"
6371 fi
6372 rm -f conftest*
6373 fi
6374
6375 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6376   echo "$ac_t""yes" 1>&6
6377     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6378   cat >> confdefs.h <<EOF
6379 #define $ac_tr_func 1
6380 EOF
6381  
6382 else
6383   echo "$ac_t""no" 1>&6
6384 fi
6385 done
6386
6387 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6388 do
6389 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6390 echo "configure:6391: checking for $ac_func" >&5
6391 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6392   echo $ac_n "(cached) $ac_c" 1>&6
6393 else
6394   cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397 /* System header to define __stub macros and hopefully few prototypes,
6398     which can conflict with char $ac_func(); below.  */
6399 #include <assert.h>
6400 /* Override any gcc2 internal prototype to avoid an error.  */
6401 /* We use char because int might match the return type of a gcc2
6402     builtin and then its argument prototype would still apply.  */
6403 char $ac_func();
6404
6405 int main() {
6406
6407 /* The GNU C library defines this for functions which it implements
6408     to always fail with ENOSYS.  Some functions are actually named
6409     something starting with __ and the normal name is an alias.  */
6410 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6411 choke me
6412 #else
6413 $ac_func();
6414 #endif
6415
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6419   rm -rf conftest*
6420   eval "ac_cv_func_$ac_func=yes"
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   eval "ac_cv_func_$ac_func=no"
6426 fi
6427 rm -f conftest*
6428 fi
6429
6430 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6431   echo "$ac_t""yes" 1>&6
6432     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6433   cat >> confdefs.h <<EOF
6434 #define $ac_tr_func 1
6435 EOF
6436  
6437 else
6438   echo "$ac_t""no" 1>&6
6439 fi
6440 done
6441
6442 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6443 do
6444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6445 echo "configure:6446: checking for $ac_func" >&5
6446 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6447   echo $ac_n "(cached) $ac_c" 1>&6
6448 else
6449   cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 /* System header to define __stub macros and hopefully few prototypes,
6453     which can conflict with char $ac_func(); below.  */
6454 #include <assert.h>
6455 /* Override any gcc2 internal prototype to avoid an error.  */
6456 /* We use char because int might match the return type of a gcc2
6457     builtin and then its argument prototype would still apply.  */
6458 char $ac_func();
6459
6460 int main() {
6461
6462 /* The GNU C library defines this for functions which it implements
6463     to always fail with ENOSYS.  Some functions are actually named
6464     something starting with __ and the normal name is an alias.  */
6465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6466 choke me
6467 #else
6468 $ac_func();
6469 #endif
6470
6471 ; return 0; }
6472 EOF
6473 if { (eval echo configure:6474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6474   rm -rf conftest*
6475   eval "ac_cv_func_$ac_func=yes"
6476 else
6477   echo "configure: failed program was:" >&5
6478   cat conftest.$ac_ext >&5
6479   rm -rf conftest*
6480   eval "ac_cv_func_$ac_func=no"
6481 fi
6482 rm -f conftest*
6483 fi
6484
6485 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6486   echo "$ac_t""yes" 1>&6
6487     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6488   cat >> confdefs.h <<EOF
6489 #define $ac_tr_func 1
6490 EOF
6491  
6492 else
6493   echo "$ac_t""no" 1>&6
6494 fi
6495 done
6496
6497 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6498 do
6499 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6500 echo "configure:6501: checking for $ac_func" >&5
6501 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6502   echo $ac_n "(cached) $ac_c" 1>&6
6503 else
6504   cat > conftest.$ac_ext <<EOF
6505 #line 6506 "configure"
6506 #include "confdefs.h"
6507 /* System header to define __stub macros and hopefully few prototypes,
6508     which can conflict with char $ac_func(); below.  */
6509 #include <assert.h>
6510 /* Override any gcc2 internal prototype to avoid an error.  */
6511 /* We use char because int might match the return type of a gcc2
6512     builtin and then its argument prototype would still apply.  */
6513 char $ac_func();
6514
6515 int main() {
6516
6517 /* The GNU C library defines this for functions which it implements
6518     to always fail with ENOSYS.  Some functions are actually named
6519     something starting with __ and the normal name is an alias.  */
6520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6521 choke me
6522 #else
6523 $ac_func();
6524 #endif
6525
6526 ; return 0; }
6527 EOF
6528 if { (eval echo configure:6529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6529   rm -rf conftest*
6530   eval "ac_cv_func_$ac_func=yes"
6531 else
6532   echo "configure: failed program was:" >&5
6533   cat conftest.$ac_ext >&5
6534   rm -rf conftest*
6535   eval "ac_cv_func_$ac_func=no"
6536 fi
6537 rm -f conftest*
6538 fi
6539
6540 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6541   echo "$ac_t""yes" 1>&6
6542     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6543   cat >> confdefs.h <<EOF
6544 #define $ac_tr_func 1
6545 EOF
6546  
6547 else
6548   echo "$ac_t""no" 1>&6
6549 fi
6550 done
6551
6552 for ac_func in open64 _open64 __open64 creat64
6553 do
6554 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6555 echo "configure:6556: checking for $ac_func" >&5
6556 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6557   echo $ac_n "(cached) $ac_c" 1>&6
6558 else
6559   cat > conftest.$ac_ext <<EOF
6560 #line 6561 "configure"
6561 #include "confdefs.h"
6562 /* System header to define __stub macros and hopefully few prototypes,
6563     which can conflict with char $ac_func(); below.  */
6564 #include <assert.h>
6565 /* Override any gcc2 internal prototype to avoid an error.  */
6566 /* We use char because int might match the return type of a gcc2
6567     builtin and then its argument prototype would still apply.  */
6568 char $ac_func();
6569
6570 int main() {
6571
6572 /* The GNU C library defines this for functions which it implements
6573     to always fail with ENOSYS.  Some functions are actually named
6574     something starting with __ and the normal name is an alias.  */
6575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6576 choke me
6577 #else
6578 $ac_func();
6579 #endif
6580
6581 ; return 0; }
6582 EOF
6583 if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6584   rm -rf conftest*
6585   eval "ac_cv_func_$ac_func=yes"
6586 else
6587   echo "configure: failed program was:" >&5
6588   cat conftest.$ac_ext >&5
6589   rm -rf conftest*
6590   eval "ac_cv_func_$ac_func=no"
6591 fi
6592 rm -f conftest*
6593 fi
6594
6595 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6596   echo "$ac_t""yes" 1>&6
6597     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6598   cat >> confdefs.h <<EOF
6599 #define $ac_tr_func 1
6600 EOF
6601  
6602 else
6603   echo "$ac_t""no" 1>&6
6604 fi
6605 done
6606
6607
6608 #
6609 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6610 #
6611
6612 if test x$ac_cv_func_stat64 = xno ; then
6613   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6614 echo "configure:6615: checking for stat64 in <sys/stat.h>" >&5
6615   cat > conftest.$ac_ext <<EOF
6616 #line 6617 "configure"
6617 #include "confdefs.h"
6618
6619 #if defined(HAVE_UNISTD_H)
6620 #include <unistd.h>
6621 #endif
6622 #include <sys/stat.h>
6623
6624 int main() {
6625 struct stat64 st64; exit(stat64(".",&st64));
6626 ; return 0; }
6627 EOF
6628 if { (eval echo configure:6629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6629   rm -rf conftest*
6630   ac_cv_func_stat64=yes
6631 else
6632   echo "configure: failed program was:" >&5
6633   cat conftest.$ac_ext >&5
6634 fi
6635 rm -f conftest*
6636   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6637   if test x$ac_cv_func_stat64 = xyes ; then
6638     cat >> confdefs.h <<\EOF
6639 #define HAVE_STAT64 1
6640 EOF
6641
6642   fi
6643 fi
6644
6645 if test x$ac_cv_func_lstat64 = xno ; then
6646   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6647 echo "configure:6648: checking for lstat64 in <sys/stat.h>" >&5
6648   cat > conftest.$ac_ext <<EOF
6649 #line 6650 "configure"
6650 #include "confdefs.h"
6651
6652 #if defined(HAVE_UNISTD_H)
6653 #include <unistd.h>
6654 #endif
6655 #include <sys/stat.h>
6656
6657 int main() {
6658 struct stat64 st64; exit(lstat64(".",&st64));
6659 ; return 0; }
6660 EOF
6661 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6662   rm -rf conftest*
6663   ac_cv_func_lstat64=yes
6664 else
6665   echo "configure: failed program was:" >&5
6666   cat conftest.$ac_ext >&5
6667 fi
6668 rm -f conftest*
6669   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6670   if test x$ac_cv_func_lstat64 = xyes ; then
6671     cat >> confdefs.h <<\EOF
6672 #define HAVE_LSTAT64 1
6673 EOF
6674
6675   fi
6676 fi
6677
6678 if test x$ac_cv_func_fstat64 = xno ; then
6679   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6680 echo "configure:6681: checking for fstat64 in <sys/stat.h>" >&5
6681   cat > conftest.$ac_ext <<EOF
6682 #line 6683 "configure"
6683 #include "confdefs.h"
6684
6685 #if defined(HAVE_UNISTD_H)
6686 #include <unistd.h>
6687 #endif
6688 #include <sys/stat.h>
6689
6690 int main() {
6691 struct stat64 st64; exit(fstat64(0,&st64));
6692 ; return 0; }
6693 EOF
6694 if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6695   rm -rf conftest*
6696   ac_cv_func_fstat64=yes
6697 else
6698   echo "configure: failed program was:" >&5
6699   cat conftest.$ac_ext >&5
6700 fi
6701 rm -f conftest*
6702   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6703   if test x$ac_cv_func_fstat64 = xyes ; then
6704     cat >> confdefs.h <<\EOF
6705 #define HAVE_FSTAT64 1
6706 EOF
6707
6708   fi
6709 fi
6710
6711 #####################################
6712 # we might need the resolv library on some systems
6713 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6714 echo "configure:6715: checking for dn_expand in -lresolv" >&5
6715 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6716 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6717   echo $ac_n "(cached) $ac_c" 1>&6
6718 else
6719   ac_save_LIBS="$LIBS"
6720 LIBS="-lresolv  $LIBS"
6721 cat > conftest.$ac_ext <<EOF
6722 #line 6723 "configure"
6723 #include "confdefs.h"
6724 /* Override any gcc2 internal prototype to avoid an error.  */
6725 /* We use char because int might match the return type of a gcc2
6726     builtin and then its argument prototype would still apply.  */
6727 char dn_expand();
6728
6729 int main() {
6730 dn_expand()
6731 ; return 0; }
6732 EOF
6733 if { (eval echo configure:6734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6734   rm -rf conftest*
6735   eval "ac_cv_lib_$ac_lib_var=yes"
6736 else
6737   echo "configure: failed program was:" >&5
6738   cat conftest.$ac_ext >&5
6739   rm -rf conftest*
6740   eval "ac_cv_lib_$ac_lib_var=no"
6741 fi
6742 rm -f conftest*
6743 LIBS="$ac_save_LIBS"
6744
6745 fi
6746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6747   echo "$ac_t""yes" 1>&6
6748     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6749     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6750   cat >> confdefs.h <<EOF
6751 #define $ac_tr_lib 1
6752 EOF
6753
6754   LIBS="-lresolv $LIBS"
6755
6756 else
6757   echo "$ac_t""no" 1>&6
6758 fi
6759
6760
6761 #
6762 # Check for the functions putprpwnam, set_auth_parameters,
6763 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6764 # Needed for OSF1 and HPUX.
6765 #
6766
6767 case "$LIBS" in
6768   *-lsecurity*) for ac_func in putprpwnam
6769 do
6770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6771 echo "configure:6772: checking for $ac_func" >&5
6772 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6773   echo $ac_n "(cached) $ac_c" 1>&6
6774 else
6775   cat > conftest.$ac_ext <<EOF
6776 #line 6777 "configure"
6777 #include "confdefs.h"
6778 /* System header to define __stub macros and hopefully few prototypes,
6779     which can conflict with char $ac_func(); below.  */
6780 #include <assert.h>
6781 /* Override any gcc2 internal prototype to avoid an error.  */
6782 /* We use char because int might match the return type of a gcc2
6783     builtin and then its argument prototype would still apply.  */
6784 char $ac_func();
6785
6786 int main() {
6787
6788 /* The GNU C library defines this for functions which it implements
6789     to always fail with ENOSYS.  Some functions are actually named
6790     something starting with __ and the normal name is an alias.  */
6791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6792 choke me
6793 #else
6794 $ac_func();
6795 #endif
6796
6797 ; return 0; }
6798 EOF
6799 if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6800   rm -rf conftest*
6801   eval "ac_cv_func_$ac_func=yes"
6802 else
6803   echo "configure: failed program was:" >&5
6804   cat conftest.$ac_ext >&5
6805   rm -rf conftest*
6806   eval "ac_cv_func_$ac_func=no"
6807 fi
6808 rm -f conftest*
6809 fi
6810
6811 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6812   echo "$ac_t""yes" 1>&6
6813     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6814   cat >> confdefs.h <<EOF
6815 #define $ac_tr_func 1
6816 EOF
6817  
6818 else
6819   echo "$ac_t""no" 1>&6
6820 fi
6821 done
6822  ;;
6823   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6824 echo "configure:6825: checking for putprpwnam in -lsecurity" >&5
6825 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6826 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   ac_save_LIBS="$LIBS"
6830 LIBS="-lsecurity  $LIBS"
6831 cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 /* We use char because int might match the return type of a gcc2
6836     builtin and then its argument prototype would still apply.  */
6837 char putprpwnam();
6838
6839 int main() {
6840 putprpwnam()
6841 ; return 0; }
6842 EOF
6843 if { (eval echo configure:6844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6844   rm -rf conftest*
6845   eval "ac_cv_lib_$ac_lib_var=yes"
6846 else
6847   echo "configure: failed program was:" >&5
6848   cat conftest.$ac_ext >&5
6849   rm -rf conftest*
6850   eval "ac_cv_lib_$ac_lib_var=no"
6851 fi
6852 rm -f conftest*
6853 LIBS="$ac_save_LIBS"
6854
6855 fi
6856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6857   echo "$ac_t""yes" 1>&6
6858     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6859     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6860   cat >> confdefs.h <<EOF
6861 #define $ac_tr_lib 1
6862 EOF
6863
6864   LIBS="-lsecurity $LIBS"
6865
6866 else
6867   echo "$ac_t""no" 1>&6
6868 fi
6869  
6870      for ac_func in putprpwnam
6871 do
6872 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6873 echo "configure:6874: checking for $ac_func" >&5
6874 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6875   echo $ac_n "(cached) $ac_c" 1>&6
6876 else
6877   cat > conftest.$ac_ext <<EOF
6878 #line 6879 "configure"
6879 #include "confdefs.h"
6880 /* System header to define __stub macros and hopefully few prototypes,
6881     which can conflict with char $ac_func(); below.  */
6882 #include <assert.h>
6883 /* Override any gcc2 internal prototype to avoid an error.  */
6884 /* We use char because int might match the return type of a gcc2
6885     builtin and then its argument prototype would still apply.  */
6886 char $ac_func();
6887
6888 int main() {
6889
6890 /* The GNU C library defines this for functions which it implements
6891     to always fail with ENOSYS.  Some functions are actually named
6892     something starting with __ and the normal name is an alias.  */
6893 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6894 choke me
6895 #else
6896 $ac_func();
6897 #endif
6898
6899 ; return 0; }
6900 EOF
6901 if { (eval echo configure:6902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6902   rm -rf conftest*
6903   eval "ac_cv_func_$ac_func=yes"
6904 else
6905   echo "configure: failed program was:" >&5
6906   cat conftest.$ac_ext >&5
6907   rm -rf conftest*
6908   eval "ac_cv_func_$ac_func=no"
6909 fi
6910 rm -f conftest*
6911 fi
6912
6913 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6914   echo "$ac_t""yes" 1>&6
6915     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6916   cat >> confdefs.h <<EOF
6917 #define $ac_tr_func 1
6918 EOF
6919  
6920 else
6921   echo "$ac_t""no" 1>&6
6922 fi
6923 done
6924
6925   ;;
6926   esac
6927
6928 case "$LIBS" in
6929   *-lsec*) for ac_func in putprpwnam
6930 do
6931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6932 echo "configure:6933: checking for $ac_func" >&5
6933 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6934   echo $ac_n "(cached) $ac_c" 1>&6
6935 else
6936   cat > conftest.$ac_ext <<EOF
6937 #line 6938 "configure"
6938 #include "confdefs.h"
6939 /* System header to define __stub macros and hopefully few prototypes,
6940     which can conflict with char $ac_func(); below.  */
6941 #include <assert.h>
6942 /* Override any gcc2 internal prototype to avoid an error.  */
6943 /* We use char because int might match the return type of a gcc2
6944     builtin and then its argument prototype would still apply.  */
6945 char $ac_func();
6946
6947 int main() {
6948
6949 /* The GNU C library defines this for functions which it implements
6950     to always fail with ENOSYS.  Some functions are actually named
6951     something starting with __ and the normal name is an alias.  */
6952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6953 choke me
6954 #else
6955 $ac_func();
6956 #endif
6957
6958 ; return 0; }
6959 EOF
6960 if { (eval echo configure:6961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6961   rm -rf conftest*
6962   eval "ac_cv_func_$ac_func=yes"
6963 else
6964   echo "configure: failed program was:" >&5
6965   cat conftest.$ac_ext >&5
6966   rm -rf conftest*
6967   eval "ac_cv_func_$ac_func=no"
6968 fi
6969 rm -f conftest*
6970 fi
6971
6972 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6973   echo "$ac_t""yes" 1>&6
6974     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6975   cat >> confdefs.h <<EOF
6976 #define $ac_tr_func 1
6977 EOF
6978  
6979 else
6980   echo "$ac_t""no" 1>&6
6981 fi
6982 done
6983  ;;
6984   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6985 echo "configure:6986: checking for putprpwnam in -lsec" >&5
6986 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6987 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6988   echo $ac_n "(cached) $ac_c" 1>&6
6989 else
6990   ac_save_LIBS="$LIBS"
6991 LIBS="-lsec  $LIBS"
6992 cat > conftest.$ac_ext <<EOF
6993 #line 6994 "configure"
6994 #include "confdefs.h"
6995 /* Override any gcc2 internal prototype to avoid an error.  */
6996 /* We use char because int might match the return type of a gcc2
6997     builtin and then its argument prototype would still apply.  */
6998 char putprpwnam();
6999
7000 int main() {
7001 putprpwnam()
7002 ; return 0; }
7003 EOF
7004 if { (eval echo configure:7005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7005   rm -rf conftest*
7006   eval "ac_cv_lib_$ac_lib_var=yes"
7007 else
7008   echo "configure: failed program was:" >&5
7009   cat conftest.$ac_ext >&5
7010   rm -rf conftest*
7011   eval "ac_cv_lib_$ac_lib_var=no"
7012 fi
7013 rm -f conftest*
7014 LIBS="$ac_save_LIBS"
7015
7016 fi
7017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7018   echo "$ac_t""yes" 1>&6
7019     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7020     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7021   cat >> confdefs.h <<EOF
7022 #define $ac_tr_lib 1
7023 EOF
7024
7025   LIBS="-lsec $LIBS"
7026
7027 else
7028   echo "$ac_t""no" 1>&6
7029 fi
7030  
7031      for ac_func in putprpwnam
7032 do
7033 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7034 echo "configure:7035: checking for $ac_func" >&5
7035 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7036   echo $ac_n "(cached) $ac_c" 1>&6
7037 else
7038   cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041 /* System header to define __stub macros and hopefully few prototypes,
7042     which can conflict with char $ac_func(); below.  */
7043 #include <assert.h>
7044 /* Override any gcc2 internal prototype to avoid an error.  */
7045 /* We use char because int might match the return type of a gcc2
7046     builtin and then its argument prototype would still apply.  */
7047 char $ac_func();
7048
7049 int main() {
7050
7051 /* The GNU C library defines this for functions which it implements
7052     to always fail with ENOSYS.  Some functions are actually named
7053     something starting with __ and the normal name is an alias.  */
7054 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7055 choke me
7056 #else
7057 $ac_func();
7058 #endif
7059
7060 ; return 0; }
7061 EOF
7062 if { (eval echo configure:7063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7063   rm -rf conftest*
7064   eval "ac_cv_func_$ac_func=yes"
7065 else
7066   echo "configure: failed program was:" >&5
7067   cat conftest.$ac_ext >&5
7068   rm -rf conftest*
7069   eval "ac_cv_func_$ac_func=no"
7070 fi
7071 rm -f conftest*
7072 fi
7073
7074 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7075   echo "$ac_t""yes" 1>&6
7076     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7077   cat >> confdefs.h <<EOF
7078 #define $ac_tr_func 1
7079 EOF
7080  
7081 else
7082   echo "$ac_t""no" 1>&6
7083 fi
7084 done
7085
7086   ;;
7087   esac
7088
7089
7090 case "$LIBS" in
7091   *-lsecurity*) for ac_func in set_auth_parameters
7092 do
7093 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7094 echo "configure:7095: checking for $ac_func" >&5
7095 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7096   echo $ac_n "(cached) $ac_c" 1>&6
7097 else
7098   cat > conftest.$ac_ext <<EOF
7099 #line 7100 "configure"
7100 #include "confdefs.h"
7101 /* System header to define __stub macros and hopefully few prototypes,
7102     which can conflict with char $ac_func(); below.  */
7103 #include <assert.h>
7104 /* Override any gcc2 internal prototype to avoid an error.  */
7105 /* We use char because int might match the return type of a gcc2
7106     builtin and then its argument prototype would still apply.  */
7107 char $ac_func();
7108
7109 int main() {
7110
7111 /* The GNU C library defines this for functions which it implements
7112     to always fail with ENOSYS.  Some functions are actually named
7113     something starting with __ and the normal name is an alias.  */
7114 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7115 choke me
7116 #else
7117 $ac_func();
7118 #endif
7119
7120 ; return 0; }
7121 EOF
7122 if { (eval echo configure:7123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7123   rm -rf conftest*
7124   eval "ac_cv_func_$ac_func=yes"
7125 else
7126   echo "configure: failed program was:" >&5
7127   cat conftest.$ac_ext >&5
7128   rm -rf conftest*
7129   eval "ac_cv_func_$ac_func=no"
7130 fi
7131 rm -f conftest*
7132 fi
7133
7134 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7135   echo "$ac_t""yes" 1>&6
7136     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7137   cat >> confdefs.h <<EOF
7138 #define $ac_tr_func 1
7139 EOF
7140  
7141 else
7142   echo "$ac_t""no" 1>&6
7143 fi
7144 done
7145  ;;
7146   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7147 echo "configure:7148: checking for set_auth_parameters in -lsecurity" >&5
7148 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7149 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7150   echo $ac_n "(cached) $ac_c" 1>&6
7151 else
7152   ac_save_LIBS="$LIBS"
7153 LIBS="-lsecurity  $LIBS"
7154 cat > conftest.$ac_ext <<EOF
7155 #line 7156 "configure"
7156 #include "confdefs.h"
7157 /* Override any gcc2 internal prototype to avoid an error.  */
7158 /* We use char because int might match the return type of a gcc2
7159     builtin and then its argument prototype would still apply.  */
7160 char set_auth_parameters();
7161
7162 int main() {
7163 set_auth_parameters()
7164 ; return 0; }
7165 EOF
7166 if { (eval echo configure:7167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7167   rm -rf conftest*
7168   eval "ac_cv_lib_$ac_lib_var=yes"
7169 else
7170   echo "configure: failed program was:" >&5
7171   cat conftest.$ac_ext >&5
7172   rm -rf conftest*
7173   eval "ac_cv_lib_$ac_lib_var=no"
7174 fi
7175 rm -f conftest*
7176 LIBS="$ac_save_LIBS"
7177
7178 fi
7179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7180   echo "$ac_t""yes" 1>&6
7181     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7182     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7183   cat >> confdefs.h <<EOF
7184 #define $ac_tr_lib 1
7185 EOF
7186
7187   LIBS="-lsecurity $LIBS"
7188
7189 else
7190   echo "$ac_t""no" 1>&6
7191 fi
7192  
7193      for ac_func in set_auth_parameters
7194 do
7195 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7196 echo "configure:7197: checking for $ac_func" >&5
7197 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7198   echo $ac_n "(cached) $ac_c" 1>&6
7199 else
7200   cat > conftest.$ac_ext <<EOF
7201 #line 7202 "configure"
7202 #include "confdefs.h"
7203 /* System header to define __stub macros and hopefully few prototypes,
7204     which can conflict with char $ac_func(); below.  */
7205 #include <assert.h>
7206 /* Override any gcc2 internal prototype to avoid an error.  */
7207 /* We use char because int might match the return type of a gcc2
7208     builtin and then its argument prototype would still apply.  */
7209 char $ac_func();
7210
7211 int main() {
7212
7213 /* The GNU C library defines this for functions which it implements
7214     to always fail with ENOSYS.  Some functions are actually named
7215     something starting with __ and the normal name is an alias.  */
7216 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7217 choke me
7218 #else
7219 $ac_func();
7220 #endif
7221
7222 ; return 0; }
7223 EOF
7224 if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7225   rm -rf conftest*
7226   eval "ac_cv_func_$ac_func=yes"
7227 else
7228   echo "configure: failed program was:" >&5
7229   cat conftest.$ac_ext >&5
7230   rm -rf conftest*
7231   eval "ac_cv_func_$ac_func=no"
7232 fi
7233 rm -f conftest*
7234 fi
7235
7236 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7237   echo "$ac_t""yes" 1>&6
7238     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7239   cat >> confdefs.h <<EOF
7240 #define $ac_tr_func 1
7241 EOF
7242  
7243 else
7244   echo "$ac_t""no" 1>&6
7245 fi
7246 done
7247
7248   ;;
7249   esac
7250
7251 case "$LIBS" in
7252   *-lsec*) for ac_func in set_auth_parameters
7253 do
7254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7255 echo "configure:7256: checking for $ac_func" >&5
7256 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7257   echo $ac_n "(cached) $ac_c" 1>&6
7258 else
7259   cat > conftest.$ac_ext <<EOF
7260 #line 7261 "configure"
7261 #include "confdefs.h"
7262 /* System header to define __stub macros and hopefully few prototypes,
7263     which can conflict with char $ac_func(); below.  */
7264 #include <assert.h>
7265 /* Override any gcc2 internal prototype to avoid an error.  */
7266 /* We use char because int might match the return type of a gcc2
7267     builtin and then its argument prototype would still apply.  */
7268 char $ac_func();
7269
7270 int main() {
7271
7272 /* The GNU C library defines this for functions which it implements
7273     to always fail with ENOSYS.  Some functions are actually named
7274     something starting with __ and the normal name is an alias.  */
7275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7276 choke me
7277 #else
7278 $ac_func();
7279 #endif
7280
7281 ; return 0; }
7282 EOF
7283 if { (eval echo configure:7284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7284   rm -rf conftest*
7285   eval "ac_cv_func_$ac_func=yes"
7286 else
7287   echo "configure: failed program was:" >&5
7288   cat conftest.$ac_ext >&5
7289   rm -rf conftest*
7290   eval "ac_cv_func_$ac_func=no"
7291 fi
7292 rm -f conftest*
7293 fi
7294
7295 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7296   echo "$ac_t""yes" 1>&6
7297     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7298   cat >> confdefs.h <<EOF
7299 #define $ac_tr_func 1
7300 EOF
7301  
7302 else
7303   echo "$ac_t""no" 1>&6
7304 fi
7305 done
7306  ;;
7307   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7308 echo "configure:7309: checking for set_auth_parameters in -lsec" >&5
7309 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7310 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7311   echo $ac_n "(cached) $ac_c" 1>&6
7312 else
7313   ac_save_LIBS="$LIBS"
7314 LIBS="-lsec  $LIBS"
7315 cat > conftest.$ac_ext <<EOF
7316 #line 7317 "configure"
7317 #include "confdefs.h"
7318 /* Override any gcc2 internal prototype to avoid an error.  */
7319 /* We use char because int might match the return type of a gcc2
7320     builtin and then its argument prototype would still apply.  */
7321 char set_auth_parameters();
7322
7323 int main() {
7324 set_auth_parameters()
7325 ; return 0; }
7326 EOF
7327 if { (eval echo configure:7328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7328   rm -rf conftest*
7329   eval "ac_cv_lib_$ac_lib_var=yes"
7330 else
7331   echo "configure: failed program was:" >&5
7332   cat conftest.$ac_ext >&5
7333   rm -rf conftest*
7334   eval "ac_cv_lib_$ac_lib_var=no"
7335 fi
7336 rm -f conftest*
7337 LIBS="$ac_save_LIBS"
7338
7339 fi
7340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7341   echo "$ac_t""yes" 1>&6
7342     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7343     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7344   cat >> confdefs.h <<EOF
7345 #define $ac_tr_lib 1
7346 EOF
7347
7348   LIBS="-lsec $LIBS"
7349
7350 else
7351   echo "$ac_t""no" 1>&6
7352 fi
7353  
7354      for ac_func in set_auth_parameters
7355 do
7356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7357 echo "configure:7358: checking for $ac_func" >&5
7358 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7359   echo $ac_n "(cached) $ac_c" 1>&6
7360 else
7361   cat > conftest.$ac_ext <<EOF
7362 #line 7363 "configure"
7363 #include "confdefs.h"
7364 /* System header to define __stub macros and hopefully few prototypes,
7365     which can conflict with char $ac_func(); below.  */
7366 #include <assert.h>
7367 /* Override any gcc2 internal prototype to avoid an error.  */
7368 /* We use char because int might match the return type of a gcc2
7369     builtin and then its argument prototype would still apply.  */
7370 char $ac_func();
7371
7372 int main() {
7373
7374 /* The GNU C library defines this for functions which it implements
7375     to always fail with ENOSYS.  Some functions are actually named
7376     something starting with __ and the normal name is an alias.  */
7377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7378 choke me
7379 #else
7380 $ac_func();
7381 #endif
7382
7383 ; return 0; }
7384 EOF
7385 if { (eval echo configure:7386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7386   rm -rf conftest*
7387   eval "ac_cv_func_$ac_func=yes"
7388 else
7389   echo "configure: failed program was:" >&5
7390   cat conftest.$ac_ext >&5
7391   rm -rf conftest*
7392   eval "ac_cv_func_$ac_func=no"
7393 fi
7394 rm -f conftest*
7395 fi
7396
7397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7398   echo "$ac_t""yes" 1>&6
7399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7400   cat >> confdefs.h <<EOF
7401 #define $ac_tr_func 1
7402 EOF
7403  
7404 else
7405   echo "$ac_t""no" 1>&6
7406 fi
7407 done
7408
7409   ;;
7410   esac
7411
7412
7413 # UnixWare 7.x has its getspnam in -lgen
7414 case "$LIBS" in
7415   *-lgen*) for ac_func in getspnam
7416 do
7417 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7418 echo "configure:7419: checking for $ac_func" >&5
7419 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7420   echo $ac_n "(cached) $ac_c" 1>&6
7421 else
7422   cat > conftest.$ac_ext <<EOF
7423 #line 7424 "configure"
7424 #include "confdefs.h"
7425 /* System header to define __stub macros and hopefully few prototypes,
7426     which can conflict with char $ac_func(); below.  */
7427 #include <assert.h>
7428 /* Override any gcc2 internal prototype to avoid an error.  */
7429 /* We use char because int might match the return type of a gcc2
7430     builtin and then its argument prototype would still apply.  */
7431 char $ac_func();
7432
7433 int main() {
7434
7435 /* The GNU C library defines this for functions which it implements
7436     to always fail with ENOSYS.  Some functions are actually named
7437     something starting with __ and the normal name is an alias.  */
7438 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7439 choke me
7440 #else
7441 $ac_func();
7442 #endif
7443
7444 ; return 0; }
7445 EOF
7446 if { (eval echo configure:7447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7447   rm -rf conftest*
7448   eval "ac_cv_func_$ac_func=yes"
7449 else
7450   echo "configure: failed program was:" >&5
7451   cat conftest.$ac_ext >&5
7452   rm -rf conftest*
7453   eval "ac_cv_func_$ac_func=no"
7454 fi
7455 rm -f conftest*
7456 fi
7457
7458 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7459   echo "$ac_t""yes" 1>&6
7460     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7461   cat >> confdefs.h <<EOF
7462 #define $ac_tr_func 1
7463 EOF
7464  
7465 else
7466   echo "$ac_t""no" 1>&6
7467 fi
7468 done
7469  ;;
7470   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7471 echo "configure:7472: checking for getspnam in -lgen" >&5
7472 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7474   echo $ac_n "(cached) $ac_c" 1>&6
7475 else
7476   ac_save_LIBS="$LIBS"
7477 LIBS="-lgen  $LIBS"
7478 cat > conftest.$ac_ext <<EOF
7479 #line 7480 "configure"
7480 #include "confdefs.h"
7481 /* Override any gcc2 internal prototype to avoid an error.  */
7482 /* We use char because int might match the return type of a gcc2
7483     builtin and then its argument prototype would still apply.  */
7484 char getspnam();
7485
7486 int main() {
7487 getspnam()
7488 ; return 0; }
7489 EOF
7490 if { (eval echo configure:7491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7491   rm -rf conftest*
7492   eval "ac_cv_lib_$ac_lib_var=yes"
7493 else
7494   echo "configure: failed program was:" >&5
7495   cat conftest.$ac_ext >&5
7496   rm -rf conftest*
7497   eval "ac_cv_lib_$ac_lib_var=no"
7498 fi
7499 rm -f conftest*
7500 LIBS="$ac_save_LIBS"
7501
7502 fi
7503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7504   echo "$ac_t""yes" 1>&6
7505     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7506     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7507   cat >> confdefs.h <<EOF
7508 #define $ac_tr_lib 1
7509 EOF
7510
7511   LIBS="-lgen $LIBS"
7512
7513 else
7514   echo "$ac_t""no" 1>&6
7515 fi
7516  
7517      for ac_func in getspnam
7518 do
7519 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7520 echo "configure:7521: checking for $ac_func" >&5
7521 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7522   echo $ac_n "(cached) $ac_c" 1>&6
7523 else
7524   cat > conftest.$ac_ext <<EOF
7525 #line 7526 "configure"
7526 #include "confdefs.h"
7527 /* System header to define __stub macros and hopefully few prototypes,
7528     which can conflict with char $ac_func(); below.  */
7529 #include <assert.h>
7530 /* Override any gcc2 internal prototype to avoid an error.  */
7531 /* We use char because int might match the return type of a gcc2
7532     builtin and then its argument prototype would still apply.  */
7533 char $ac_func();
7534
7535 int main() {
7536
7537 /* The GNU C library defines this for functions which it implements
7538     to always fail with ENOSYS.  Some functions are actually named
7539     something starting with __ and the normal name is an alias.  */
7540 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7541 choke me
7542 #else
7543 $ac_func();
7544 #endif
7545
7546 ; return 0; }
7547 EOF
7548 if { (eval echo configure:7549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7549   rm -rf conftest*
7550   eval "ac_cv_func_$ac_func=yes"
7551 else
7552   echo "configure: failed program was:" >&5
7553   cat conftest.$ac_ext >&5
7554   rm -rf conftest*
7555   eval "ac_cv_func_$ac_func=no"
7556 fi
7557 rm -f conftest*
7558 fi
7559
7560 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7561   echo "$ac_t""yes" 1>&6
7562     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7563   cat >> confdefs.h <<EOF
7564 #define $ac_tr_func 1
7565 EOF
7566  
7567 else
7568   echo "$ac_t""no" 1>&6
7569 fi
7570 done
7571
7572   ;;
7573   esac
7574
7575
7576 case "$LIBS" in
7577   *-lsecurity*) for ac_func in getspnam
7578 do
7579 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7580 echo "configure:7581: checking for $ac_func" >&5
7581 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7582   echo $ac_n "(cached) $ac_c" 1>&6
7583 else
7584   cat > conftest.$ac_ext <<EOF
7585 #line 7586 "configure"
7586 #include "confdefs.h"
7587 /* System header to define __stub macros and hopefully few prototypes,
7588     which can conflict with char $ac_func(); below.  */
7589 #include <assert.h>
7590 /* Override any gcc2 internal prototype to avoid an error.  */
7591 /* We use char because int might match the return type of a gcc2
7592     builtin and then its argument prototype would still apply.  */
7593 char $ac_func();
7594
7595 int main() {
7596
7597 /* The GNU C library defines this for functions which it implements
7598     to always fail with ENOSYS.  Some functions are actually named
7599     something starting with __ and the normal name is an alias.  */
7600 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7601 choke me
7602 #else
7603 $ac_func();
7604 #endif
7605
7606 ; return 0; }
7607 EOF
7608 if { (eval echo configure:7609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7609   rm -rf conftest*
7610   eval "ac_cv_func_$ac_func=yes"
7611 else
7612   echo "configure: failed program was:" >&5
7613   cat conftest.$ac_ext >&5
7614   rm -rf conftest*
7615   eval "ac_cv_func_$ac_func=no"
7616 fi
7617 rm -f conftest*
7618 fi
7619
7620 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7621   echo "$ac_t""yes" 1>&6
7622     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7623   cat >> confdefs.h <<EOF
7624 #define $ac_tr_func 1
7625 EOF
7626  
7627 else
7628   echo "$ac_t""no" 1>&6
7629 fi
7630 done
7631  ;;
7632   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7633 echo "configure:7634: checking for getspnam in -lsecurity" >&5
7634 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7635 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7636   echo $ac_n "(cached) $ac_c" 1>&6
7637 else
7638   ac_save_LIBS="$LIBS"
7639 LIBS="-lsecurity  $LIBS"
7640 cat > conftest.$ac_ext <<EOF
7641 #line 7642 "configure"
7642 #include "confdefs.h"
7643 /* Override any gcc2 internal prototype to avoid an error.  */
7644 /* We use char because int might match the return type of a gcc2
7645     builtin and then its argument prototype would still apply.  */
7646 char getspnam();
7647
7648 int main() {
7649 getspnam()
7650 ; return 0; }
7651 EOF
7652 if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7653   rm -rf conftest*
7654   eval "ac_cv_lib_$ac_lib_var=yes"
7655 else
7656   echo "configure: failed program was:" >&5
7657   cat conftest.$ac_ext >&5
7658   rm -rf conftest*
7659   eval "ac_cv_lib_$ac_lib_var=no"
7660 fi
7661 rm -f conftest*
7662 LIBS="$ac_save_LIBS"
7663
7664 fi
7665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7666   echo "$ac_t""yes" 1>&6
7667     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7668     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7669   cat >> confdefs.h <<EOF
7670 #define $ac_tr_lib 1
7671 EOF
7672
7673   LIBS="-lsecurity $LIBS"
7674
7675 else
7676   echo "$ac_t""no" 1>&6
7677 fi
7678  
7679      for ac_func in getspnam
7680 do
7681 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7682 echo "configure:7683: checking for $ac_func" >&5
7683 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7684   echo $ac_n "(cached) $ac_c" 1>&6
7685 else
7686   cat > conftest.$ac_ext <<EOF
7687 #line 7688 "configure"
7688 #include "confdefs.h"
7689 /* System header to define __stub macros and hopefully few prototypes,
7690     which can conflict with char $ac_func(); below.  */
7691 #include <assert.h>
7692 /* Override any gcc2 internal prototype to avoid an error.  */
7693 /* We use char because int might match the return type of a gcc2
7694     builtin and then its argument prototype would still apply.  */
7695 char $ac_func();
7696
7697 int main() {
7698
7699 /* The GNU C library defines this for functions which it implements
7700     to always fail with ENOSYS.  Some functions are actually named
7701     something starting with __ and the normal name is an alias.  */
7702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7703 choke me
7704 #else
7705 $ac_func();
7706 #endif
7707
7708 ; return 0; }
7709 EOF
7710 if { (eval echo configure:7711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7711   rm -rf conftest*
7712   eval "ac_cv_func_$ac_func=yes"
7713 else
7714   echo "configure: failed program was:" >&5
7715   cat conftest.$ac_ext >&5
7716   rm -rf conftest*
7717   eval "ac_cv_func_$ac_func=no"
7718 fi
7719 rm -f conftest*
7720 fi
7721
7722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7723   echo "$ac_t""yes" 1>&6
7724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7725   cat >> confdefs.h <<EOF
7726 #define $ac_tr_func 1
7727 EOF
7728  
7729 else
7730   echo "$ac_t""no" 1>&6
7731 fi
7732 done
7733
7734   ;;
7735   esac
7736
7737 case "$LIBS" in
7738   *-lsec*) for ac_func in getspnam
7739 do
7740 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7741 echo "configure:7742: checking for $ac_func" >&5
7742 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7743   echo $ac_n "(cached) $ac_c" 1>&6
7744 else
7745   cat > conftest.$ac_ext <<EOF
7746 #line 7747 "configure"
7747 #include "confdefs.h"
7748 /* System header to define __stub macros and hopefully few prototypes,
7749     which can conflict with char $ac_func(); below.  */
7750 #include <assert.h>
7751 /* Override any gcc2 internal prototype to avoid an error.  */
7752 /* We use char because int might match the return type of a gcc2
7753     builtin and then its argument prototype would still apply.  */
7754 char $ac_func();
7755
7756 int main() {
7757
7758 /* The GNU C library defines this for functions which it implements
7759     to always fail with ENOSYS.  Some functions are actually named
7760     something starting with __ and the normal name is an alias.  */
7761 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7762 choke me
7763 #else
7764 $ac_func();
7765 #endif
7766
7767 ; return 0; }
7768 EOF
7769 if { (eval echo configure:7770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7770   rm -rf conftest*
7771   eval "ac_cv_func_$ac_func=yes"
7772 else
7773   echo "configure: failed program was:" >&5
7774   cat conftest.$ac_ext >&5
7775   rm -rf conftest*
7776   eval "ac_cv_func_$ac_func=no"
7777 fi
7778 rm -f conftest*
7779 fi
7780
7781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7782   echo "$ac_t""yes" 1>&6
7783     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7784   cat >> confdefs.h <<EOF
7785 #define $ac_tr_func 1
7786 EOF
7787  
7788 else
7789   echo "$ac_t""no" 1>&6
7790 fi
7791 done
7792  ;;
7793   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7794 echo "configure:7795: checking for getspnam in -lsec" >&5
7795 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7796 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7797   echo $ac_n "(cached) $ac_c" 1>&6
7798 else
7799   ac_save_LIBS="$LIBS"
7800 LIBS="-lsec  $LIBS"
7801 cat > conftest.$ac_ext <<EOF
7802 #line 7803 "configure"
7803 #include "confdefs.h"
7804 /* Override any gcc2 internal prototype to avoid an error.  */
7805 /* We use char because int might match the return type of a gcc2
7806     builtin and then its argument prototype would still apply.  */
7807 char getspnam();
7808
7809 int main() {
7810 getspnam()
7811 ; return 0; }
7812 EOF
7813 if { (eval echo configure:7814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7814   rm -rf conftest*
7815   eval "ac_cv_lib_$ac_lib_var=yes"
7816 else
7817   echo "configure: failed program was:" >&5
7818   cat conftest.$ac_ext >&5
7819   rm -rf conftest*
7820   eval "ac_cv_lib_$ac_lib_var=no"
7821 fi
7822 rm -f conftest*
7823 LIBS="$ac_save_LIBS"
7824
7825 fi
7826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7827   echo "$ac_t""yes" 1>&6
7828     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7829     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7830   cat >> confdefs.h <<EOF
7831 #define $ac_tr_lib 1
7832 EOF
7833
7834   LIBS="-lsec $LIBS"
7835
7836 else
7837   echo "$ac_t""no" 1>&6
7838 fi
7839  
7840      for ac_func in getspnam
7841 do
7842 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7843 echo "configure:7844: checking for $ac_func" >&5
7844 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7845   echo $ac_n "(cached) $ac_c" 1>&6
7846 else
7847   cat > conftest.$ac_ext <<EOF
7848 #line 7849 "configure"
7849 #include "confdefs.h"
7850 /* System header to define __stub macros and hopefully few prototypes,
7851     which can conflict with char $ac_func(); below.  */
7852 #include <assert.h>
7853 /* Override any gcc2 internal prototype to avoid an error.  */
7854 /* We use char because int might match the return type of a gcc2
7855     builtin and then its argument prototype would still apply.  */
7856 char $ac_func();
7857
7858 int main() {
7859
7860 /* The GNU C library defines this for functions which it implements
7861     to always fail with ENOSYS.  Some functions are actually named
7862     something starting with __ and the normal name is an alias.  */
7863 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7864 choke me
7865 #else
7866 $ac_func();
7867 #endif
7868
7869 ; return 0; }
7870 EOF
7871 if { (eval echo configure:7872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7872   rm -rf conftest*
7873   eval "ac_cv_func_$ac_func=yes"
7874 else
7875   echo "configure: failed program was:" >&5
7876   cat conftest.$ac_ext >&5
7877   rm -rf conftest*
7878   eval "ac_cv_func_$ac_func=no"
7879 fi
7880 rm -f conftest*
7881 fi
7882
7883 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7884   echo "$ac_t""yes" 1>&6
7885     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7886   cat >> confdefs.h <<EOF
7887 #define $ac_tr_func 1
7888 EOF
7889  
7890 else
7891   echo "$ac_t""no" 1>&6
7892 fi
7893 done
7894
7895   ;;
7896   esac
7897
7898
7899 case "$LIBS" in
7900   *-lsecurity*) for ac_func in bigcrypt
7901 do
7902 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7903 echo "configure:7904: checking for $ac_func" >&5
7904 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7905   echo $ac_n "(cached) $ac_c" 1>&6
7906 else
7907   cat > conftest.$ac_ext <<EOF
7908 #line 7909 "configure"
7909 #include "confdefs.h"
7910 /* System header to define __stub macros and hopefully few prototypes,
7911     which can conflict with char $ac_func(); below.  */
7912 #include <assert.h>
7913 /* Override any gcc2 internal prototype to avoid an error.  */
7914 /* We use char because int might match the return type of a gcc2
7915     builtin and then its argument prototype would still apply.  */
7916 char $ac_func();
7917
7918 int main() {
7919
7920 /* The GNU C library defines this for functions which it implements
7921     to always fail with ENOSYS.  Some functions are actually named
7922     something starting with __ and the normal name is an alias.  */
7923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7924 choke me
7925 #else
7926 $ac_func();
7927 #endif
7928
7929 ; return 0; }
7930 EOF
7931 if { (eval echo configure:7932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7932   rm -rf conftest*
7933   eval "ac_cv_func_$ac_func=yes"
7934 else
7935   echo "configure: failed program was:" >&5
7936   cat conftest.$ac_ext >&5
7937   rm -rf conftest*
7938   eval "ac_cv_func_$ac_func=no"
7939 fi
7940 rm -f conftest*
7941 fi
7942
7943 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7944   echo "$ac_t""yes" 1>&6
7945     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7946   cat >> confdefs.h <<EOF
7947 #define $ac_tr_func 1
7948 EOF
7949  
7950 else
7951   echo "$ac_t""no" 1>&6
7952 fi
7953 done
7954  ;;
7955   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7956 echo "configure:7957: checking for bigcrypt in -lsecurity" >&5
7957 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7958 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7959   echo $ac_n "(cached) $ac_c" 1>&6
7960 else
7961   ac_save_LIBS="$LIBS"
7962 LIBS="-lsecurity  $LIBS"
7963 cat > conftest.$ac_ext <<EOF
7964 #line 7965 "configure"
7965 #include "confdefs.h"
7966 /* Override any gcc2 internal prototype to avoid an error.  */
7967 /* We use char because int might match the return type of a gcc2
7968     builtin and then its argument prototype would still apply.  */
7969 char bigcrypt();
7970
7971 int main() {
7972 bigcrypt()
7973 ; return 0; }
7974 EOF
7975 if { (eval echo configure:7976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7976   rm -rf conftest*
7977   eval "ac_cv_lib_$ac_lib_var=yes"
7978 else
7979   echo "configure: failed program was:" >&5
7980   cat conftest.$ac_ext >&5
7981   rm -rf conftest*
7982   eval "ac_cv_lib_$ac_lib_var=no"
7983 fi
7984 rm -f conftest*
7985 LIBS="$ac_save_LIBS"
7986
7987 fi
7988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7989   echo "$ac_t""yes" 1>&6
7990     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7991     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7992   cat >> confdefs.h <<EOF
7993 #define $ac_tr_lib 1
7994 EOF
7995
7996   LIBS="-lsecurity $LIBS"
7997
7998 else
7999   echo "$ac_t""no" 1>&6
8000 fi
8001  
8002      for ac_func in bigcrypt
8003 do
8004 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8005 echo "configure:8006: checking for $ac_func" >&5
8006 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8007   echo $ac_n "(cached) $ac_c" 1>&6
8008 else
8009   cat > conftest.$ac_ext <<EOF
8010 #line 8011 "configure"
8011 #include "confdefs.h"
8012 /* System header to define __stub macros and hopefully few prototypes,
8013     which can conflict with char $ac_func(); below.  */
8014 #include <assert.h>
8015 /* Override any gcc2 internal prototype to avoid an error.  */
8016 /* We use char because int might match the return type of a gcc2
8017     builtin and then its argument prototype would still apply.  */
8018 char $ac_func();
8019
8020 int main() {
8021
8022 /* The GNU C library defines this for functions which it implements
8023     to always fail with ENOSYS.  Some functions are actually named
8024     something starting with __ and the normal name is an alias.  */
8025 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8026 choke me
8027 #else
8028 $ac_func();
8029 #endif
8030
8031 ; return 0; }
8032 EOF
8033 if { (eval echo configure:8034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8034   rm -rf conftest*
8035   eval "ac_cv_func_$ac_func=yes"
8036 else
8037   echo "configure: failed program was:" >&5
8038   cat conftest.$ac_ext >&5
8039   rm -rf conftest*
8040   eval "ac_cv_func_$ac_func=no"
8041 fi
8042 rm -f conftest*
8043 fi
8044
8045 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8046   echo "$ac_t""yes" 1>&6
8047     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8048   cat >> confdefs.h <<EOF
8049 #define $ac_tr_func 1
8050 EOF
8051  
8052 else
8053   echo "$ac_t""no" 1>&6
8054 fi
8055 done
8056
8057   ;;
8058   esac
8059
8060 case "$LIBS" in
8061   *-lsec*) for ac_func in bigcrypt
8062 do
8063 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8064 echo "configure:8065: checking for $ac_func" >&5
8065 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8066   echo $ac_n "(cached) $ac_c" 1>&6
8067 else
8068   cat > conftest.$ac_ext <<EOF
8069 #line 8070 "configure"
8070 #include "confdefs.h"
8071 /* System header to define __stub macros and hopefully few prototypes,
8072     which can conflict with char $ac_func(); below.  */
8073 #include <assert.h>
8074 /* Override any gcc2 internal prototype to avoid an error.  */
8075 /* We use char because int might match the return type of a gcc2
8076     builtin and then its argument prototype would still apply.  */
8077 char $ac_func();
8078
8079 int main() {
8080
8081 /* The GNU C library defines this for functions which it implements
8082     to always fail with ENOSYS.  Some functions are actually named
8083     something starting with __ and the normal name is an alias.  */
8084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8085 choke me
8086 #else
8087 $ac_func();
8088 #endif
8089
8090 ; return 0; }
8091 EOF
8092 if { (eval echo configure:8093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8093   rm -rf conftest*
8094   eval "ac_cv_func_$ac_func=yes"
8095 else
8096   echo "configure: failed program was:" >&5
8097   cat conftest.$ac_ext >&5
8098   rm -rf conftest*
8099   eval "ac_cv_func_$ac_func=no"
8100 fi
8101 rm -f conftest*
8102 fi
8103
8104 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8105   echo "$ac_t""yes" 1>&6
8106     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8107   cat >> confdefs.h <<EOF
8108 #define $ac_tr_func 1
8109 EOF
8110  
8111 else
8112   echo "$ac_t""no" 1>&6
8113 fi
8114 done
8115  ;;
8116   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8117 echo "configure:8118: checking for bigcrypt in -lsec" >&5
8118 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8119 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8120   echo $ac_n "(cached) $ac_c" 1>&6
8121 else
8122   ac_save_LIBS="$LIBS"
8123 LIBS="-lsec  $LIBS"
8124 cat > conftest.$ac_ext <<EOF
8125 #line 8126 "configure"
8126 #include "confdefs.h"
8127 /* Override any gcc2 internal prototype to avoid an error.  */
8128 /* We use char because int might match the return type of a gcc2
8129     builtin and then its argument prototype would still apply.  */
8130 char bigcrypt();
8131
8132 int main() {
8133 bigcrypt()
8134 ; return 0; }
8135 EOF
8136 if { (eval echo configure:8137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8137   rm -rf conftest*
8138   eval "ac_cv_lib_$ac_lib_var=yes"
8139 else
8140   echo "configure: failed program was:" >&5
8141   cat conftest.$ac_ext >&5
8142   rm -rf conftest*
8143   eval "ac_cv_lib_$ac_lib_var=no"
8144 fi
8145 rm -f conftest*
8146 LIBS="$ac_save_LIBS"
8147
8148 fi
8149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8150   echo "$ac_t""yes" 1>&6
8151     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8152     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8153   cat >> confdefs.h <<EOF
8154 #define $ac_tr_lib 1
8155 EOF
8156
8157   LIBS="-lsec $LIBS"
8158
8159 else
8160   echo "$ac_t""no" 1>&6
8161 fi
8162  
8163      for ac_func in bigcrypt
8164 do
8165 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8166 echo "configure:8167: checking for $ac_func" >&5
8167 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8168   echo $ac_n "(cached) $ac_c" 1>&6
8169 else
8170   cat > conftest.$ac_ext <<EOF
8171 #line 8172 "configure"
8172 #include "confdefs.h"
8173 /* System header to define __stub macros and hopefully few prototypes,
8174     which can conflict with char $ac_func(); below.  */
8175 #include <assert.h>
8176 /* Override any gcc2 internal prototype to avoid an error.  */
8177 /* We use char because int might match the return type of a gcc2
8178     builtin and then its argument prototype would still apply.  */
8179 char $ac_func();
8180
8181 int main() {
8182
8183 /* The GNU C library defines this for functions which it implements
8184     to always fail with ENOSYS.  Some functions are actually named
8185     something starting with __ and the normal name is an alias.  */
8186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8187 choke me
8188 #else
8189 $ac_func();
8190 #endif
8191
8192 ; return 0; }
8193 EOF
8194 if { (eval echo configure:8195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8195   rm -rf conftest*
8196   eval "ac_cv_func_$ac_func=yes"
8197 else
8198   echo "configure: failed program was:" >&5
8199   cat conftest.$ac_ext >&5
8200   rm -rf conftest*
8201   eval "ac_cv_func_$ac_func=no"
8202 fi
8203 rm -f conftest*
8204 fi
8205
8206 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8207   echo "$ac_t""yes" 1>&6
8208     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8209   cat >> confdefs.h <<EOF
8210 #define $ac_tr_func 1
8211 EOF
8212  
8213 else
8214   echo "$ac_t""no" 1>&6
8215 fi
8216 done
8217
8218   ;;
8219   esac
8220
8221
8222 case "$LIBS" in
8223   *-lsecurity*) for ac_func in getprpwnam
8224 do
8225 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8226 echo "configure:8227: checking for $ac_func" >&5
8227 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8228   echo $ac_n "(cached) $ac_c" 1>&6
8229 else
8230   cat > conftest.$ac_ext <<EOF
8231 #line 8232 "configure"
8232 #include "confdefs.h"
8233 /* System header to define __stub macros and hopefully few prototypes,
8234     which can conflict with char $ac_func(); below.  */
8235 #include <assert.h>
8236 /* Override any gcc2 internal prototype to avoid an error.  */
8237 /* We use char because int might match the return type of a gcc2
8238     builtin and then its argument prototype would still apply.  */
8239 char $ac_func();
8240
8241 int main() {
8242
8243 /* The GNU C library defines this for functions which it implements
8244     to always fail with ENOSYS.  Some functions are actually named
8245     something starting with __ and the normal name is an alias.  */
8246 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8247 choke me
8248 #else
8249 $ac_func();
8250 #endif
8251
8252 ; return 0; }
8253 EOF
8254 if { (eval echo configure:8255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8255   rm -rf conftest*
8256   eval "ac_cv_func_$ac_func=yes"
8257 else
8258   echo "configure: failed program was:" >&5
8259   cat conftest.$ac_ext >&5
8260   rm -rf conftest*
8261   eval "ac_cv_func_$ac_func=no"
8262 fi
8263 rm -f conftest*
8264 fi
8265
8266 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8267   echo "$ac_t""yes" 1>&6
8268     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8269   cat >> confdefs.h <<EOF
8270 #define $ac_tr_func 1
8271 EOF
8272  
8273 else
8274   echo "$ac_t""no" 1>&6
8275 fi
8276 done
8277  ;;
8278   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8279 echo "configure:8280: checking for getprpwnam in -lsecurity" >&5
8280 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8281 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   ac_save_LIBS="$LIBS"
8285 LIBS="-lsecurity  $LIBS"
8286 cat > conftest.$ac_ext <<EOF
8287 #line 8288 "configure"
8288 #include "confdefs.h"
8289 /* Override any gcc2 internal prototype to avoid an error.  */
8290 /* We use char because int might match the return type of a gcc2
8291     builtin and then its argument prototype would still apply.  */
8292 char getprpwnam();
8293
8294 int main() {
8295 getprpwnam()
8296 ; return 0; }
8297 EOF
8298 if { (eval echo configure:8299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8299   rm -rf conftest*
8300   eval "ac_cv_lib_$ac_lib_var=yes"
8301 else
8302   echo "configure: failed program was:" >&5
8303   cat conftest.$ac_ext >&5
8304   rm -rf conftest*
8305   eval "ac_cv_lib_$ac_lib_var=no"
8306 fi
8307 rm -f conftest*
8308 LIBS="$ac_save_LIBS"
8309
8310 fi
8311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8312   echo "$ac_t""yes" 1>&6
8313     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8314     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8315   cat >> confdefs.h <<EOF
8316 #define $ac_tr_lib 1
8317 EOF
8318
8319   LIBS="-lsecurity $LIBS"
8320
8321 else
8322   echo "$ac_t""no" 1>&6
8323 fi
8324  
8325      for ac_func in getprpwnam
8326 do
8327 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8328 echo "configure:8329: checking for $ac_func" >&5
8329 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8330   echo $ac_n "(cached) $ac_c" 1>&6
8331 else
8332   cat > conftest.$ac_ext <<EOF
8333 #line 8334 "configure"
8334 #include "confdefs.h"
8335 /* System header to define __stub macros and hopefully few prototypes,
8336     which can conflict with char $ac_func(); below.  */
8337 #include <assert.h>
8338 /* Override any gcc2 internal prototype to avoid an error.  */
8339 /* We use char because int might match the return type of a gcc2
8340     builtin and then its argument prototype would still apply.  */
8341 char $ac_func();
8342
8343 int main() {
8344
8345 /* The GNU C library defines this for functions which it implements
8346     to always fail with ENOSYS.  Some functions are actually named
8347     something starting with __ and the normal name is an alias.  */
8348 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8349 choke me
8350 #else
8351 $ac_func();
8352 #endif
8353
8354 ; return 0; }
8355 EOF
8356 if { (eval echo configure:8357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8357   rm -rf conftest*
8358   eval "ac_cv_func_$ac_func=yes"
8359 else
8360   echo "configure: failed program was:" >&5
8361   cat conftest.$ac_ext >&5
8362   rm -rf conftest*
8363   eval "ac_cv_func_$ac_func=no"
8364 fi
8365 rm -f conftest*
8366 fi
8367
8368 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8369   echo "$ac_t""yes" 1>&6
8370     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8371   cat >> confdefs.h <<EOF
8372 #define $ac_tr_func 1
8373 EOF
8374  
8375 else
8376   echo "$ac_t""no" 1>&6
8377 fi
8378 done
8379
8380   ;;
8381   esac
8382
8383 case "$LIBS" in
8384   *-lsec*) for ac_func in getprpwnam
8385 do
8386 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8387 echo "configure:8388: checking for $ac_func" >&5
8388 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8389   echo $ac_n "(cached) $ac_c" 1>&6
8390 else
8391   cat > conftest.$ac_ext <<EOF
8392 #line 8393 "configure"
8393 #include "confdefs.h"
8394 /* System header to define __stub macros and hopefully few prototypes,
8395     which can conflict with char $ac_func(); below.  */
8396 #include <assert.h>
8397 /* Override any gcc2 internal prototype to avoid an error.  */
8398 /* We use char because int might match the return type of a gcc2
8399     builtin and then its argument prototype would still apply.  */
8400 char $ac_func();
8401
8402 int main() {
8403
8404 /* The GNU C library defines this for functions which it implements
8405     to always fail with ENOSYS.  Some functions are actually named
8406     something starting with __ and the normal name is an alias.  */
8407 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8408 choke me
8409 #else
8410 $ac_func();
8411 #endif
8412
8413 ; return 0; }
8414 EOF
8415 if { (eval echo configure:8416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8416   rm -rf conftest*
8417   eval "ac_cv_func_$ac_func=yes"
8418 else
8419   echo "configure: failed program was:" >&5
8420   cat conftest.$ac_ext >&5
8421   rm -rf conftest*
8422   eval "ac_cv_func_$ac_func=no"
8423 fi
8424 rm -f conftest*
8425 fi
8426
8427 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8428   echo "$ac_t""yes" 1>&6
8429     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8430   cat >> confdefs.h <<EOF
8431 #define $ac_tr_func 1
8432 EOF
8433  
8434 else
8435   echo "$ac_t""no" 1>&6
8436 fi
8437 done
8438  ;;
8439   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8440 echo "configure:8441: checking for getprpwnam in -lsec" >&5
8441 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8442 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8443   echo $ac_n "(cached) $ac_c" 1>&6
8444 else
8445   ac_save_LIBS="$LIBS"
8446 LIBS="-lsec  $LIBS"
8447 cat > conftest.$ac_ext <<EOF
8448 #line 8449 "configure"
8449 #include "confdefs.h"
8450 /* Override any gcc2 internal prototype to avoid an error.  */
8451 /* We use char because int might match the return type of a gcc2
8452     builtin and then its argument prototype would still apply.  */
8453 char getprpwnam();
8454
8455 int main() {
8456 getprpwnam()
8457 ; return 0; }
8458 EOF
8459 if { (eval echo configure:8460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8460   rm -rf conftest*
8461   eval "ac_cv_lib_$ac_lib_var=yes"
8462 else
8463   echo "configure: failed program was:" >&5
8464   cat conftest.$ac_ext >&5
8465   rm -rf conftest*
8466   eval "ac_cv_lib_$ac_lib_var=no"
8467 fi
8468 rm -f conftest*
8469 LIBS="$ac_save_LIBS"
8470
8471 fi
8472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8473   echo "$ac_t""yes" 1>&6
8474     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8475     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8476   cat >> confdefs.h <<EOF
8477 #define $ac_tr_lib 1
8478 EOF
8479
8480   LIBS="-lsec $LIBS"
8481
8482 else
8483   echo "$ac_t""no" 1>&6
8484 fi
8485  
8486      for ac_func in getprpwnam
8487 do
8488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8489 echo "configure:8490: checking for $ac_func" >&5
8490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8491   echo $ac_n "(cached) $ac_c" 1>&6
8492 else
8493   cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 /* System header to define __stub macros and hopefully few prototypes,
8497     which can conflict with char $ac_func(); below.  */
8498 #include <assert.h>
8499 /* Override any gcc2 internal prototype to avoid an error.  */
8500 /* We use char because int might match the return type of a gcc2
8501     builtin and then its argument prototype would still apply.  */
8502 char $ac_func();
8503
8504 int main() {
8505
8506 /* The GNU C library defines this for functions which it implements
8507     to always fail with ENOSYS.  Some functions are actually named
8508     something starting with __ and the normal name is an alias.  */
8509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8510 choke me
8511 #else
8512 $ac_func();
8513 #endif
8514
8515 ; return 0; }
8516 EOF
8517 if { (eval echo configure:8518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8518   rm -rf conftest*
8519   eval "ac_cv_func_$ac_func=yes"
8520 else
8521   echo "configure: failed program was:" >&5
8522   cat conftest.$ac_ext >&5
8523   rm -rf conftest*
8524   eval "ac_cv_func_$ac_func=no"
8525 fi
8526 rm -f conftest*
8527 fi
8528
8529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8530   echo "$ac_t""yes" 1>&6
8531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8532   cat >> confdefs.h <<EOF
8533 #define $ac_tr_func 1
8534 EOF
8535  
8536 else
8537   echo "$ac_t""no" 1>&6
8538 fi
8539 done
8540
8541   ;;
8542   esac
8543
8544
8545 # this bit needs to be modified for each OS that is suported by
8546 # smbwrapper. You need to specify how to created a shared library and
8547 # how to compile C code to produce PIC object files
8548
8549 # these are the defaults, good for lots of systems
8550 HOST_OS="$host_os"
8551 LDSHFLAGS="-shared"
8552 SHLD="\${CC}"
8553 PICFLAG=""
8554 PICSUFFIX="po"
8555 POBAD_CC="#"
8556 SHLIBEXT="so"
8557 # Assume non-shared by default and override below
8558 BLDSHARED="false"
8559 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8560 echo "configure:8561: checking ability to build shared libraries" >&5
8561
8562 # and these are for particular systems
8563 case "$host_os" in
8564                 *linux*)   cat >> confdefs.h <<\EOF
8565 #define LINUX 1
8566 EOF
8567
8568                         BLDSHARED="true"
8569                         LDSHFLAGS="-shared" 
8570                         DYNEXP="-Wl,--export-dynamic"
8571                         PICFLAG="-fPIC"
8572                         cat >> confdefs.h <<\EOF
8573 #define STAT_ST_BLOCKSIZE 512
8574 EOF
8575
8576                 ;;
8577                 *solaris*) 
8578                         cat >> confdefs.h <<\EOF
8579 #define SUNOS5 1
8580 EOF
8581
8582                         BLDSHARED="true"
8583                         LDSHFLAGS="-h \$@ -G"
8584                         if test "${ac_cv_prog_CC}" = "gcc"; then
8585                                 PICFLAG="-fPIC"
8586                         else
8587                                 PICFLAG="-KPIC"
8588                                 POBAD_CC=""
8589                                 PICSUFFIX="po.o"
8590                         fi
8591                         cat >> confdefs.h <<\EOF
8592 #define STAT_ST_BLOCKSIZE 512
8593 EOF
8594
8595                 ;;
8596                 *sunos*) cat >> confdefs.h <<\EOF
8597 #define SUNOS4 1
8598 EOF
8599
8600                         BLDSHARED="true"
8601                         LDSHFLAGS="-Wl,-h,\$@ -G"
8602                         PICFLAG="-KPIC"   # Is this correct for SunOS
8603                 ;;
8604                 *bsd*)  BLDSHARED="true"
8605                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8606                         PICFLAG="-fPIC"
8607                         cat >> confdefs.h <<\EOF
8608 #define STAT_ST_BLOCKSIZE 512
8609 EOF
8610
8611                 ;;
8612                 *irix*) cat >> confdefs.h <<\EOF
8613 #define IRIX 1
8614 EOF
8615
8616                         case "$host_os" in
8617                         *irix6*) cat >> confdefs.h <<\EOF
8618 #define IRIX6 1
8619 EOF
8620
8621                         ;;
8622                         esac
8623                         ATTEMPT_WRAP32_BUILD=yes
8624                         BLDSHARED="true"
8625                         LDSHFLAGS="-soname \$@ -shared"
8626                         SHLD="\${LD}"
8627                         if test "${ac_cv_prog_CC}" = "gcc"; then
8628                                 PICFLAG="-fPIC"
8629                         else 
8630                                 PICFLAG="-KPIC"
8631                         fi
8632                         cat >> confdefs.h <<\EOF
8633 #define STAT_ST_BLOCKSIZE 512
8634 EOF
8635
8636                 ;;
8637                 *aix*) cat >> confdefs.h <<\EOF
8638 #define AIX 1
8639 EOF
8640
8641                         BLDSHARED="true"
8642                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8643                         PICFLAG="-O2 -qmaxmem=6000"
8644                         cat >> confdefs.h <<\EOF
8645 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8646 EOF
8647
8648                 ;;
8649                 *hpux*) cat >> confdefs.h <<\EOF
8650 #define HPUX 1
8651 EOF
8652
8653                         SHLIBEXT="sl"
8654                         # Use special PIC flags for the native HP-UX compiler.
8655                         if test $ac_cv_prog_cc_Ae = yes; then
8656                                 SHLD="/usr/bin/ld"
8657                                 BLDSHARED="true"
8658                                 LDSHFLAGS="-B symbolic -b -z +h \$@"
8659                                 PICFLAG="+z"
8660                         fi
8661                         DYNEXP="-Wl,-E"
8662                         cat >> confdefs.h <<\EOF
8663 #define STAT_ST_BLOCKSIZE 8192
8664 EOF
8665
8666                 ;;
8667                 *qnx*) cat >> confdefs.h <<\EOF
8668 #define QNX 1
8669 EOF
8670 ;;
8671                 *osf*) cat >> confdefs.h <<\EOF
8672 #define OSF1 1
8673 EOF
8674
8675                         BLDSHARED="true"
8676                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8677                         PICFLAG="-fPIC"
8678                 ;;
8679                 *sco*) 
8680                         cat >> confdefs.h <<\EOF
8681 #define SCO 1
8682 EOF
8683
8684                 ;;
8685                 *unixware*) cat >> confdefs.h <<\EOF
8686 #define UNIXWARE 1
8687 EOF
8688
8689                         BLDSHARED="true"
8690                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8691                         PICFLAG="-KPIC"
8692                 ;;
8693                 *next2*) cat >> confdefs.h <<\EOF
8694 #define NEXT2 1
8695 EOF
8696 ;;
8697                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8698 set dummy groff; ac_word=$2
8699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8700 echo "configure:8701: checking for $ac_word" >&5
8701 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8702   echo $ac_n "(cached) $ac_c" 1>&6
8703 else
8704   if test -n "$ROFF"; then
8705   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8706 else
8707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8708   ac_dummy="$PATH"
8709   for ac_dir in $ac_dummy; do
8710     test -z "$ac_dir" && ac_dir=.
8711     if test -f $ac_dir/$ac_word; then
8712       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8713       break
8714     fi
8715   done
8716   IFS="$ac_save_ifs"
8717 fi
8718 fi
8719 ROFF="$ac_cv_prog_ROFF"
8720 if test -n "$ROFF"; then
8721   echo "$ac_t""$ROFF" 1>&6
8722 else
8723   echo "$ac_t""no" 1>&6
8724 fi
8725 ;;
8726                 *sysv4*)
8727                         case "$host" in
8728                                 *-univel-*)
8729                                         if  test "$GCC" != yes ; then
8730                                                 cat >> confdefs.h <<\EOF
8731 #define HAVE_MEMSET 1
8732 EOF
8733
8734                                         fi
8735                                         LDSHFLAGS="-G"
8736                                         DYNEXP="-Bexport"
8737                                 ;;
8738                                 *mips-sni-sysv4*)
8739                                         cat >> confdefs.h <<\EOF
8740 #define RELIANTUNIX 1
8741 EOF
8742
8743                                 ;;
8744                         esac
8745                 ;;
8746
8747                 *sysv5*)
8748                         if  test "$GCC" != yes ; then
8749                                 cat >> confdefs.h <<\EOF
8750 #define HAVE_MEMSET 1
8751 EOF
8752
8753                         fi
8754                         LDSHFLAGS="-G"
8755                 ;;
8756 esac
8757
8758 echo "$ac_t""$BLDSHARED" 1>&6
8759 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8760 echo "configure:8761: checking linker flags for shared libraries" >&5
8761 echo "$ac_t""$LDSHFLAGS" 1>&6
8762 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8763 echo "configure:8764: checking compiler flags for position-independent code" >&5
8764 echo "$ac_t""$PICFLAGS" 1>&6
8765
8766 #######################################################
8767 # test whether building a shared library actually works
8768 if test $BLDSHARED = true; then
8769 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
8770 echo "configure:8771: checking whether building shared libraries actually works" >&5
8771 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
8772   echo $ac_n "(cached) $ac_c" 1>&6
8773 else
8774   
8775    ac_cv_shlib_works=no
8776    # try building a trivial shared library
8777    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
8778      $SHLD $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
8779      ac_cv_shlib_works=yes
8780    rm -f shlib.so shlib.po
8781
8782 fi
8783
8784 echo "$ac_t""$ac_cv_shlib_works" 1>&6
8785 if test $ac_cv_shlib_works = no; then
8786    BLDSHARED=false
8787 fi
8788 fi
8789
8790
8791 # this updates our target list if we can build shared libs
8792 if test $BLDSHARED = true; then
8793    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8794 else
8795    LIBSMBCLIENT_SHARED=
8796 fi
8797
8798 ################
8799
8800 echo $ac_n "checking for long long""... $ac_c" 1>&6
8801 echo "configure:8802: checking for long long" >&5
8802 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8803   echo $ac_n "(cached) $ac_c" 1>&6
8804 else
8805   
8806 if test "$cross_compiling" = yes; then
8807   samba_cv_have_longlong=cross
8808 else
8809   cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 #include <stdio.h>
8813 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8814 EOF
8815 if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8816 then
8817   samba_cv_have_longlong=yes
8818 else
8819   echo "configure: failed program was:" >&5
8820   cat conftest.$ac_ext >&5
8821   rm -fr conftest*
8822   samba_cv_have_longlong=no
8823 fi
8824 rm -fr conftest*
8825 fi
8826
8827 fi
8828
8829 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8830 if test x"$samba_cv_have_longlong" = x"yes"; then
8831     cat >> confdefs.h <<\EOF
8832 #define HAVE_LONGLONG 1
8833 EOF
8834
8835 fi
8836
8837 #
8838 # Check if the compiler supports the LL prefix on long long integers.
8839 # AIX needs this.
8840
8841 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8842 echo "configure:8843: checking for LL suffix on long long integers" >&5
8843 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8844   echo $ac_n "(cached) $ac_c" 1>&6
8845 else
8846   
8847     cat > conftest.$ac_ext <<EOF
8848 #line 8849 "configure"
8849 #include "confdefs.h"
8850 #include <stdio.h>
8851 int main() {
8852 long long i = 0x8000000000LL
8853 ; return 0; }
8854 EOF
8855 if { (eval echo configure:8856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8856   rm -rf conftest*
8857   samba_cv_compiler_supports_ll=yes
8858 else
8859   echo "configure: failed program was:" >&5
8860   cat conftest.$ac_ext >&5
8861   rm -rf conftest*
8862   samba_cv_compiler_supports_ll=no
8863 fi
8864 rm -f conftest*
8865 fi
8866
8867 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8868 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8869    cat >> confdefs.h <<\EOF
8870 #define COMPILER_SUPPORTS_LL 1
8871 EOF
8872
8873 fi
8874
8875   
8876 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8877 echo "configure:8878: checking for 64 bit off_t" >&5
8878 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8879   echo $ac_n "(cached) $ac_c" 1>&6
8880 else
8881   
8882 if test "$cross_compiling" = yes; then
8883   samba_cv_SIZEOF_OFF_T=cross
8884 else
8885   cat > conftest.$ac_ext <<EOF
8886 #line 8887 "configure"
8887 #include "confdefs.h"
8888 #include <stdio.h>
8889 #include <sys/stat.h>
8890 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8891 EOF
8892 if { (eval echo configure:8893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8893 then
8894   samba_cv_SIZEOF_OFF_T=yes
8895 else
8896   echo "configure: failed program was:" >&5
8897   cat conftest.$ac_ext >&5
8898   rm -fr conftest*
8899   samba_cv_SIZEOF_OFF_T=no
8900 fi
8901 rm -fr conftest*
8902 fi
8903
8904 fi
8905
8906 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8907 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8908     cat >> confdefs.h <<\EOF
8909 #define SIZEOF_OFF_T 8
8910 EOF
8911
8912 fi
8913
8914 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8915 echo "configure:8916: checking for off64_t" >&5
8916 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8917   echo $ac_n "(cached) $ac_c" 1>&6
8918 else
8919   
8920 if test "$cross_compiling" = yes; then
8921   samba_cv_HAVE_OFF64_T=cross
8922 else
8923   cat > conftest.$ac_ext <<EOF
8924 #line 8925 "configure"
8925 #include "confdefs.h"
8926
8927 #if defined(HAVE_UNISTD_H)
8928 #include <unistd.h>
8929 #endif
8930 #include <stdio.h>
8931 #include <sys/stat.h>
8932 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8933 EOF
8934 if { (eval echo configure:8935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8935 then
8936   samba_cv_HAVE_OFF64_T=yes
8937 else
8938   echo "configure: failed program was:" >&5
8939   cat conftest.$ac_ext >&5
8940   rm -fr conftest*
8941   samba_cv_HAVE_OFF64_T=no
8942 fi
8943 rm -fr conftest*
8944 fi
8945
8946 fi
8947
8948 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8949 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8950     cat >> confdefs.h <<\EOF
8951 #define HAVE_OFF64_T 1
8952 EOF
8953
8954 fi
8955
8956 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8957 echo "configure:8958: checking for 64 bit ino_t" >&5
8958 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8959   echo $ac_n "(cached) $ac_c" 1>&6
8960 else
8961   
8962 if test "$cross_compiling" = yes; then
8963   samba_cv_SIZEOF_INO_T=cross
8964 else
8965   cat > conftest.$ac_ext <<EOF
8966 #line 8967 "configure"
8967 #include "confdefs.h"
8968 #include <stdio.h>
8969 #include <sys/stat.h>
8970 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8971 EOF
8972 if { (eval echo configure:8973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8973 then
8974   samba_cv_SIZEOF_INO_T=yes
8975 else
8976   echo "configure: failed program was:" >&5
8977   cat conftest.$ac_ext >&5
8978   rm -fr conftest*
8979   samba_cv_SIZEOF_INO_T=no
8980 fi
8981 rm -fr conftest*
8982 fi
8983
8984 fi
8985
8986 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8987 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8988     cat >> confdefs.h <<\EOF
8989 #define SIZEOF_INO_T 8
8990 EOF
8991
8992 fi
8993
8994 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8995 echo "configure:8996: checking for ino64_t" >&5
8996 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8997   echo $ac_n "(cached) $ac_c" 1>&6
8998 else
8999   
9000 if test "$cross_compiling" = yes; then
9001   samba_cv_HAVE_INO64_T=cross
9002 else
9003   cat > conftest.$ac_ext <<EOF
9004 #line 9005 "configure"
9005 #include "confdefs.h"
9006
9007 #if defined(HAVE_UNISTD_H)
9008 #include <unistd.h>
9009 #endif
9010 #include <stdio.h>
9011 #include <sys/stat.h>
9012 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9013 EOF
9014 if { (eval echo configure:9015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9015 then
9016   samba_cv_HAVE_INO64_T=yes
9017 else
9018   echo "configure: failed program was:" >&5
9019   cat conftest.$ac_ext >&5
9020   rm -fr conftest*
9021   samba_cv_HAVE_INO64_T=no
9022 fi
9023 rm -fr conftest*
9024 fi
9025
9026 fi
9027
9028 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9029 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9030     cat >> confdefs.h <<\EOF
9031 #define HAVE_INO64_T 1
9032 EOF
9033
9034 fi
9035
9036 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9037 echo "configure:9038: checking for dev64_t" >&5
9038 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9039   echo $ac_n "(cached) $ac_c" 1>&6
9040 else
9041   
9042 if test "$cross_compiling" = yes; then
9043   samba_cv_HAVE_DEV64_T=cross
9044 else
9045   cat > conftest.$ac_ext <<EOF
9046 #line 9047 "configure"
9047 #include "confdefs.h"
9048
9049 #if defined(HAVE_UNISTD_H)
9050 #include <unistd.h>
9051 #endif
9052 #include <stdio.h>
9053 #include <sys/stat.h>
9054 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9055 EOF
9056 if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9057 then
9058   samba_cv_HAVE_DEV64_T=yes
9059 else
9060   echo "configure: failed program was:" >&5
9061   cat conftest.$ac_ext >&5
9062   rm -fr conftest*
9063   samba_cv_HAVE_DEV64_T=no
9064 fi
9065 rm -fr conftest*
9066 fi
9067
9068 fi
9069
9070 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9071 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9072     cat >> confdefs.h <<\EOF
9073 #define HAVE_DEV64_T 1
9074 EOF
9075
9076 fi
9077
9078 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9079 echo "configure:9080: checking for struct dirent64" >&5
9080 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9081   echo $ac_n "(cached) $ac_c" 1>&6
9082 else
9083   
9084 cat > conftest.$ac_ext <<EOF
9085 #line 9086 "configure"
9086 #include "confdefs.h"
9087
9088 #if defined(HAVE_UNISTD_H)
9089 #include <unistd.h>
9090 #endif
9091 #include <sys/types.h>
9092 #include <dirent.h>
9093 int main() {
9094 struct dirent64 de;
9095 ; return 0; }
9096 EOF
9097 if { (eval echo configure:9098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9098   rm -rf conftest*
9099   samba_cv_HAVE_STRUCT_DIRENT64=yes
9100 else
9101   echo "configure: failed program was:" >&5
9102   cat conftest.$ac_ext >&5
9103   rm -rf conftest*
9104   samba_cv_HAVE_STRUCT_DIRENT64=no
9105 fi
9106 rm -f conftest*
9107 fi
9108
9109 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9110 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9111     cat >> confdefs.h <<\EOF
9112 #define HAVE_STRUCT_DIRENT64 1
9113 EOF
9114
9115 fi
9116
9117 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9118 echo "configure:9119: checking for major macro" >&5
9119 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9120   echo $ac_n "(cached) $ac_c" 1>&6
9121 else
9122   
9123 if test "$cross_compiling" = yes; then
9124   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9125 else
9126   cat > conftest.$ac_ext <<EOF
9127 #line 9128 "configure"
9128 #include "confdefs.h"
9129
9130 #if defined(HAVE_UNISTD_H)
9131 #include <unistd.h>
9132 #endif
9133 #include <sys/types.h>
9134 main() { dev_t dev; int i = major(dev); return 0; }
9135 EOF
9136 if { (eval echo configure:9137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9137 then
9138   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9139 else
9140   echo "configure: failed program was:" >&5
9141   cat conftest.$ac_ext >&5
9142   rm -fr conftest*
9143   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9144 fi
9145 rm -fr conftest*
9146 fi
9147
9148 fi
9149
9150 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9151 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9152     cat >> confdefs.h <<\EOF
9153 #define HAVE_DEVICE_MAJOR_FN 1
9154 EOF
9155
9156 fi
9157
9158 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9159 echo "configure:9160: checking for minor macro" >&5
9160 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9161   echo $ac_n "(cached) $ac_c" 1>&6
9162 else
9163   
9164 if test "$cross_compiling" = yes; then
9165   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9166 else
9167   cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170
9171 #if defined(HAVE_UNISTD_H)
9172 #include <unistd.h>
9173 #endif
9174 #include <sys/types.h>
9175 main() { dev_t dev; int i = minor(dev); return 0; }
9176 EOF
9177 if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9178 then
9179   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9180 else
9181   echo "configure: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   rm -fr conftest*
9184   samba_cv_HAVE_DEVICE_MINOR_FN=no
9185 fi
9186 rm -fr conftest*
9187 fi
9188
9189 fi
9190
9191 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9192 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9193     cat >> confdefs.h <<\EOF
9194 #define HAVE_DEVICE_MINOR_FN 1
9195 EOF
9196
9197 fi
9198
9199 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9200 echo "configure:9201: checking for unsigned char" >&5
9201 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9202   echo $ac_n "(cached) $ac_c" 1>&6
9203 else
9204   
9205 if test "$cross_compiling" = yes; then
9206   samba_cv_HAVE_UNSIGNED_CHAR=cross
9207 else
9208   cat > conftest.$ac_ext <<EOF
9209 #line 9210 "configure"
9210 #include "confdefs.h"
9211 #include <stdio.h>
9212 main() { char c; c=250; exit((c > 0)?0:1); }
9213 EOF
9214 if { (eval echo configure:9215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9215 then
9216   samba_cv_HAVE_UNSIGNED_CHAR=yes
9217 else
9218   echo "configure: failed program was:" >&5
9219   cat conftest.$ac_ext >&5
9220   rm -fr conftest*
9221   samba_cv_HAVE_UNSIGNED_CHAR=no
9222 fi
9223 rm -fr conftest*
9224 fi
9225
9226 fi
9227
9228 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9229 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9230     cat >> confdefs.h <<\EOF
9231 #define HAVE_UNSIGNED_CHAR 1
9232 EOF
9233
9234 fi
9235
9236 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9237 echo "configure:9238: checking for sin_len in sock" >&5
9238 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9239   echo $ac_n "(cached) $ac_c" 1>&6
9240 else
9241   
9242 cat > conftest.$ac_ext <<EOF
9243 #line 9244 "configure"
9244 #include "confdefs.h"
9245 #include <sys/types.h>
9246 #include <sys/socket.h>
9247 #include <netinet/in.h>
9248 int main() {
9249 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9250 ; return 0; }
9251 EOF
9252 if { (eval echo configure:9253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9253   rm -rf conftest*
9254   samba_cv_HAVE_SOCK_SIN_LEN=yes
9255 else
9256   echo "configure: failed program was:" >&5
9257   cat conftest.$ac_ext >&5
9258   rm -rf conftest*
9259   samba_cv_HAVE_SOCK_SIN_LEN=no
9260 fi
9261 rm -f conftest*
9262 fi
9263
9264 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9265 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9266     cat >> confdefs.h <<\EOF
9267 #define HAVE_SOCK_SIN_LEN 1
9268 EOF
9269
9270 fi
9271
9272 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9273 echo "configure:9274: checking whether seekdir returns void" >&5
9274 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9275   echo $ac_n "(cached) $ac_c" 1>&6
9276 else
9277   
9278 cat > conftest.$ac_ext <<EOF
9279 #line 9280 "configure"
9280 #include "confdefs.h"
9281 #include <sys/types.h>
9282 #include <dirent.h>
9283 void seekdir(DIR *d, long loc) { return; }
9284 int main() {
9285 return 0;
9286 ; return 0; }
9287 EOF
9288 if { (eval echo configure:9289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9289   rm -rf conftest*
9290   samba_cv_SEEKDIR_RETURNS_VOID=yes
9291 else
9292   echo "configure: failed program was:" >&5
9293   cat conftest.$ac_ext >&5
9294   rm -rf conftest*
9295   samba_cv_SEEKDIR_RETURNS_VOID=no
9296 fi
9297 rm -f conftest*
9298 fi
9299
9300 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9301 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9302     cat >> confdefs.h <<\EOF
9303 #define SEEKDIR_RETURNS_VOID 1
9304 EOF
9305
9306 fi
9307
9308 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9309 echo "configure:9310: checking for __FILE__ macro" >&5
9310 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9311   echo $ac_n "(cached) $ac_c" 1>&6
9312 else
9313   
9314 cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317 #include <stdio.h>
9318 int main() {
9319 printf("%s\n", __FILE__);
9320 ; return 0; }
9321 EOF
9322 if { (eval echo configure:9323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9323   rm -rf conftest*
9324   samba_cv_HAVE_FILE_MACRO=yes
9325 else
9326   echo "configure: failed program was:" >&5
9327   cat conftest.$ac_ext >&5
9328   rm -rf conftest*
9329   samba_cv_HAVE_FILE_MACRO=no
9330 fi
9331 rm -f conftest*
9332 fi
9333
9334 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9335 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9336     cat >> confdefs.h <<\EOF
9337 #define HAVE_FILE_MACRO 1
9338 EOF
9339
9340 fi
9341
9342 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9343 echo "configure:9344: checking for __FUNCTION__ macro" >&5
9344 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9345   echo $ac_n "(cached) $ac_c" 1>&6
9346 else
9347   
9348 cat > conftest.$ac_ext <<EOF
9349 #line 9350 "configure"
9350 #include "confdefs.h"
9351 #include <stdio.h>
9352 int main() {
9353 printf("%s\n", __FUNCTION__);
9354 ; return 0; }
9355 EOF
9356 if { (eval echo configure:9357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9357   rm -rf conftest*
9358   samba_cv_HAVE_FUNCTION_MACRO=yes
9359 else
9360   echo "configure: failed program was:" >&5
9361   cat conftest.$ac_ext >&5
9362   rm -rf conftest*
9363   samba_cv_HAVE_FUNCTION_MACRO=no
9364 fi
9365 rm -f conftest*
9366 fi
9367
9368 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9369 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9370     cat >> confdefs.h <<\EOF
9371 #define HAVE_FUNCTION_MACRO 1
9372 EOF
9373
9374 fi
9375
9376 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9377 echo "configure:9378: checking if gettimeofday takes tz argument" >&5
9378 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9379   echo $ac_n "(cached) $ac_c" 1>&6
9380 else
9381   
9382 if test "$cross_compiling" = yes; then
9383   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9384 else
9385   cat > conftest.$ac_ext <<EOF
9386 #line 9387 "configure"
9387 #include "confdefs.h"
9388
9389 #include <sys/time.h>
9390 #include <unistd.h>
9391 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9392 EOF
9393 if { (eval echo configure:9394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9394 then
9395   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9396 else
9397   echo "configure: failed program was:" >&5
9398   cat conftest.$ac_ext >&5
9399   rm -fr conftest*
9400   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9401 fi
9402 rm -fr conftest*
9403 fi
9404
9405 fi
9406
9407 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9408 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9409     cat >> confdefs.h <<\EOF
9410 #define HAVE_GETTIMEOFDAY_TZ 1
9411 EOF
9412
9413 fi
9414
9415 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9416 echo "configure:9417: checking for C99 vsnprintf" >&5
9417 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9418   echo $ac_n "(cached) $ac_c" 1>&6
9419 else
9420   
9421 if test "$cross_compiling" = yes; then
9422   samba_cv_HAVE_C99_VSNPRINTF=cross
9423 else
9424   cat > conftest.$ac_ext <<EOF
9425 #line 9426 "configure"
9426 #include "confdefs.h"
9427
9428 #include <sys/types.h>
9429 #include <stdarg.h>
9430 void foo(const char *format, ...) { 
9431        va_list ap;
9432        int len;
9433        char buf[5];
9434
9435        va_start(ap, format);
9436        len = vsnprintf(buf, 0, format, ap);
9437        va_end(ap);
9438        if (len != 5) exit(1);
9439
9440        va_start(ap, format);
9441        len = vsnprintf(0, 0, format, ap);
9442        va_end(ap);
9443        if (len != 5) exit(1);
9444
9445        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9446
9447        exit(0);
9448 }
9449 main() { foo("hello"); }
9450
9451 EOF
9452 if { (eval echo configure:9453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9453 then
9454   samba_cv_HAVE_C99_VSNPRINTF=yes
9455 else
9456   echo "configure: failed program was:" >&5
9457   cat conftest.$ac_ext >&5
9458   rm -fr conftest*
9459   samba_cv_HAVE_C99_VSNPRINTF=no
9460 fi
9461 rm -fr conftest*
9462 fi
9463
9464 fi
9465
9466 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9467 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9468     cat >> confdefs.h <<\EOF
9469 #define HAVE_C99_VSNPRINTF 1
9470 EOF
9471
9472 fi
9473
9474 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9475 echo "configure:9476: checking for broken readdir" >&5
9476 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9477   echo $ac_n "(cached) $ac_c" 1>&6
9478 else
9479   
9480 if test "$cross_compiling" = yes; then
9481   samba_cv_HAVE_BROKEN_READDIR=cross
9482 else
9483   cat > conftest.$ac_ext <<EOF
9484 #line 9485 "configure"
9485 #include "confdefs.h"
9486 #include <sys/types.h>
9487 #include <dirent.h>
9488 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9489 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9490 di->d_name[0] == 0) exit(0); exit(1);} 
9491 EOF
9492 if { (eval echo configure:9493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9493 then
9494   samba_cv_HAVE_BROKEN_READDIR=yes
9495 else
9496   echo "configure: failed program was:" >&5
9497   cat conftest.$ac_ext >&5
9498   rm -fr conftest*
9499   samba_cv_HAVE_BROKEN_READDIR=no
9500 fi
9501 rm -fr conftest*
9502 fi
9503
9504 fi
9505
9506 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9507 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9508     cat >> confdefs.h <<\EOF
9509 #define HAVE_BROKEN_READDIR 1
9510 EOF
9511
9512 fi
9513
9514 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9515 echo "configure:9516: checking for utimbuf" >&5
9516 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9517   echo $ac_n "(cached) $ac_c" 1>&6
9518 else
9519   
9520 cat > conftest.$ac_ext <<EOF
9521 #line 9522 "configure"
9522 #include "confdefs.h"
9523 #include <sys/types.h>
9524 #include <utime.h>
9525 int main() {
9526 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9527 ; return 0; }
9528 EOF
9529 if { (eval echo configure:9530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9530   rm -rf conftest*
9531   samba_cv_HAVE_UTIMBUF=yes
9532 else
9533   echo "configure: failed program was:" >&5
9534   cat conftest.$ac_ext >&5
9535   rm -rf conftest*
9536   samba_cv_HAVE_UTIMBUF=no
9537 fi
9538 rm -f conftest*
9539 fi
9540
9541 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9542 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9543     cat >> confdefs.h <<\EOF
9544 #define HAVE_UTIMBUF 1
9545 EOF
9546
9547 fi
9548
9549
9550 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9551 do
9552 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9553 echo "configure:9554: checking for $ac_func" >&5
9554 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9555   echo $ac_n "(cached) $ac_c" 1>&6
9556 else
9557   cat > conftest.$ac_ext <<EOF
9558 #line 9559 "configure"
9559 #include "confdefs.h"
9560 /* System header to define __stub macros and hopefully few prototypes,
9561     which can conflict with char $ac_func(); below.  */
9562 #include <assert.h>
9563 /* Override any gcc2 internal prototype to avoid an error.  */
9564 /* We use char because int might match the return type of a gcc2
9565     builtin and then its argument prototype would still apply.  */
9566 char $ac_func();
9567
9568 int main() {
9569
9570 /* The GNU C library defines this for functions which it implements
9571     to always fail with ENOSYS.  Some functions are actually named
9572     something starting with __ and the normal name is an alias.  */
9573 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9574 choke me
9575 #else
9576 $ac_func();
9577 #endif
9578
9579 ; return 0; }
9580 EOF
9581 if { (eval echo configure:9582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9582   rm -rf conftest*
9583   eval "ac_cv_func_$ac_func=yes"
9584 else
9585   echo "configure: failed program was:" >&5
9586   cat conftest.$ac_ext >&5
9587   rm -rf conftest*
9588   eval "ac_cv_func_$ac_func=no"
9589 fi
9590 rm -f conftest*
9591 fi
9592
9593 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9594   echo "$ac_t""yes" 1>&6
9595     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9596   cat >> confdefs.h <<EOF
9597 #define $ac_tr_func 1
9598 EOF
9599  
9600 else
9601   echo "$ac_t""no" 1>&6
9602 fi
9603 done
9604
9605
9606 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9607 echo "configure:9608: checking for ut_name in utmp" >&5
9608 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9609   echo $ac_n "(cached) $ac_c" 1>&6
9610 else
9611   
9612 cat > conftest.$ac_ext <<EOF
9613 #line 9614 "configure"
9614 #include "confdefs.h"
9615 #include <sys/types.h>
9616 #include <utmp.h>
9617 int main() {
9618 struct utmp ut;  ut.ut_name[0] = 'a';
9619 ; return 0; }
9620 EOF
9621 if { (eval echo configure:9622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9622   rm -rf conftest*
9623   samba_cv_HAVE_UT_UT_NAME=yes
9624 else
9625   echo "configure: failed program was:" >&5
9626   cat conftest.$ac_ext >&5
9627   rm -rf conftest*
9628   samba_cv_HAVE_UT_UT_NAME=no
9629 fi
9630 rm -f conftest*
9631 fi
9632
9633 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9634 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9635     cat >> confdefs.h <<\EOF
9636 #define HAVE_UT_UT_NAME 1
9637 EOF
9638
9639 fi 
9640
9641 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9642 echo "configure:9643: checking for ut_user in utmp" >&5
9643 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9644   echo $ac_n "(cached) $ac_c" 1>&6
9645 else
9646   
9647 cat > conftest.$ac_ext <<EOF
9648 #line 9649 "configure"
9649 #include "confdefs.h"
9650 #include <sys/types.h>
9651 #include <utmp.h>
9652 int main() {
9653 struct utmp ut;  ut.ut_user[0] = 'a';
9654 ; return 0; }
9655 EOF
9656 if { (eval echo configure:9657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9657   rm -rf conftest*
9658   samba_cv_HAVE_UT_UT_USER=yes
9659 else
9660   echo "configure: failed program was:" >&5
9661   cat conftest.$ac_ext >&5
9662   rm -rf conftest*
9663   samba_cv_HAVE_UT_UT_USER=no
9664 fi
9665 rm -f conftest*
9666 fi
9667
9668 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9669 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9670     cat >> confdefs.h <<\EOF
9671 #define HAVE_UT_UT_USER 1
9672 EOF
9673
9674 fi 
9675
9676 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9677 echo "configure:9678: checking for ut_id in utmp" >&5
9678 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9679   echo $ac_n "(cached) $ac_c" 1>&6
9680 else
9681   
9682 cat > conftest.$ac_ext <<EOF
9683 #line 9684 "configure"
9684 #include "confdefs.h"
9685 #include <sys/types.h>
9686 #include <utmp.h>
9687 int main() {
9688 struct utmp ut;  ut.ut_id[0] = 'a';
9689 ; return 0; }
9690 EOF
9691 if { (eval echo configure:9692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9692   rm -rf conftest*
9693   samba_cv_HAVE_UT_UT_ID=yes
9694 else
9695   echo "configure: failed program was:" >&5
9696   cat conftest.$ac_ext >&5
9697   rm -rf conftest*
9698   samba_cv_HAVE_UT_UT_ID=no
9699 fi
9700 rm -f conftest*
9701 fi
9702
9703 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9704 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9705     cat >> confdefs.h <<\EOF
9706 #define HAVE_UT_UT_ID 1
9707 EOF
9708
9709 fi 
9710
9711 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9712 echo "configure:9713: checking for ut_host in utmp" >&5
9713 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9714   echo $ac_n "(cached) $ac_c" 1>&6
9715 else
9716   
9717 cat > conftest.$ac_ext <<EOF
9718 #line 9719 "configure"
9719 #include "confdefs.h"
9720 #include <sys/types.h>
9721 #include <utmp.h>
9722 int main() {
9723 struct utmp ut;  ut.ut_host[0] = 'a';
9724 ; return 0; }
9725 EOF
9726 if { (eval echo configure:9727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9727   rm -rf conftest*
9728   samba_cv_HAVE_UT_UT_HOST=yes
9729 else
9730   echo "configure: failed program was:" >&5
9731   cat conftest.$ac_ext >&5
9732   rm -rf conftest*
9733   samba_cv_HAVE_UT_UT_HOST=no
9734 fi
9735 rm -f conftest*
9736 fi
9737
9738 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9739 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9740     cat >> confdefs.h <<\EOF
9741 #define HAVE_UT_UT_HOST 1
9742 EOF
9743
9744 fi 
9745
9746 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9747 echo "configure:9748: checking for ut_time in utmp" >&5
9748 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9749   echo $ac_n "(cached) $ac_c" 1>&6
9750 else
9751   
9752 cat > conftest.$ac_ext <<EOF
9753 #line 9754 "configure"
9754 #include "confdefs.h"
9755 #include <sys/types.h>
9756 #include <utmp.h>
9757 int main() {
9758 struct utmp ut;  time_t t; ut.ut_time = t;
9759 ; return 0; }
9760 EOF
9761 if { (eval echo configure:9762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9762   rm -rf conftest*
9763   samba_cv_HAVE_UT_UT_TIME=yes
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767   rm -rf conftest*
9768   samba_cv_HAVE_UT_UT_TIME=no
9769 fi
9770 rm -f conftest*
9771 fi
9772
9773 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9774 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9775     cat >> confdefs.h <<\EOF
9776 #define HAVE_UT_UT_TIME 1
9777 EOF
9778
9779 fi 
9780
9781 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9782 echo "configure:9783: checking for ut_tv in utmp" >&5
9783 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9784   echo $ac_n "(cached) $ac_c" 1>&6
9785 else
9786   
9787 cat > conftest.$ac_ext <<EOF
9788 #line 9789 "configure"
9789 #include "confdefs.h"
9790 #include <sys/types.h>
9791 #include <utmp.h>
9792 int main() {
9793 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9794 ; return 0; }
9795 EOF
9796 if { (eval echo configure:9797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9797   rm -rf conftest*
9798   samba_cv_HAVE_UT_UT_TV=yes
9799 else
9800   echo "configure: failed program was:" >&5
9801   cat conftest.$ac_ext >&5
9802   rm -rf conftest*
9803   samba_cv_HAVE_UT_UT_TV=no
9804 fi
9805 rm -f conftest*
9806 fi
9807
9808 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9809 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9810     cat >> confdefs.h <<\EOF
9811 #define HAVE_UT_UT_TV 1
9812 EOF
9813
9814 fi 
9815
9816 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9817 echo "configure:9818: checking for ut_type in utmp" >&5
9818 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9819   echo $ac_n "(cached) $ac_c" 1>&6
9820 else
9821   
9822 cat > conftest.$ac_ext <<EOF
9823 #line 9824 "configure"
9824 #include "confdefs.h"
9825 #include <sys/types.h>
9826 #include <utmp.h>
9827 int main() {
9828 struct utmp ut;  ut.ut_type = 0;
9829 ; return 0; }
9830 EOF
9831 if { (eval echo configure:9832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9832   rm -rf conftest*
9833   samba_cv_HAVE_UT_UT_TYPE=yes
9834 else
9835   echo "configure: failed program was:" >&5
9836   cat conftest.$ac_ext >&5
9837   rm -rf conftest*
9838   samba_cv_HAVE_UT_UT_TYPE=no
9839 fi
9840 rm -f conftest*
9841 fi
9842
9843 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9844 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9845     cat >> confdefs.h <<\EOF
9846 #define HAVE_UT_UT_TYPE 1
9847 EOF
9848
9849 fi 
9850
9851 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9852 echo "configure:9853: checking for ut_pid in utmp" >&5
9853 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9854   echo $ac_n "(cached) $ac_c" 1>&6
9855 else
9856   
9857 cat > conftest.$ac_ext <<EOF
9858 #line 9859 "configure"
9859 #include "confdefs.h"
9860 #include <sys/types.h>
9861 #include <utmp.h>
9862 int main() {
9863 struct utmp ut;  ut.ut_pid = 0;
9864 ; return 0; }
9865 EOF
9866 if { (eval echo configure:9867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9867   rm -rf conftest*
9868   samba_cv_HAVE_UT_UT_PID=yes
9869 else
9870   echo "configure: failed program was:" >&5
9871   cat conftest.$ac_ext >&5
9872   rm -rf conftest*
9873   samba_cv_HAVE_UT_UT_PID=no
9874 fi
9875 rm -f conftest*
9876 fi
9877
9878 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9879 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9880     cat >> confdefs.h <<\EOF
9881 #define HAVE_UT_UT_PID 1
9882 EOF
9883
9884 fi 
9885
9886 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9887 echo "configure:9888: checking for ut_exit in utmp" >&5
9888 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9889   echo $ac_n "(cached) $ac_c" 1>&6
9890 else
9891   
9892 cat > conftest.$ac_ext <<EOF
9893 #line 9894 "configure"
9894 #include "confdefs.h"
9895 #include <sys/types.h>
9896 #include <utmp.h>
9897 int main() {
9898 struct utmp ut;  ut.ut_exit.e_exit = 0;
9899 ; return 0; }
9900 EOF
9901 if { (eval echo configure:9902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9902   rm -rf conftest*
9903   samba_cv_HAVE_UT_UT_EXIT=yes
9904 else
9905   echo "configure: failed program was:" >&5
9906   cat conftest.$ac_ext >&5
9907   rm -rf conftest*
9908   samba_cv_HAVE_UT_UT_EXIT=no
9909 fi
9910 rm -f conftest*
9911 fi
9912
9913 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9914 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9915     cat >> confdefs.h <<\EOF
9916 #define HAVE_UT_UT_EXIT 1
9917 EOF
9918
9919 fi 
9920
9921 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9922 echo "configure:9923: checking for ut_addr in utmp" >&5
9923 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9924   echo $ac_n "(cached) $ac_c" 1>&6
9925 else
9926   
9927 cat > conftest.$ac_ext <<EOF
9928 #line 9929 "configure"
9929 #include "confdefs.h"
9930 #include <sys/types.h>
9931 #include <utmp.h>
9932 int main() {
9933 struct utmp ut;  ut.ut_addr = 0;
9934 ; return 0; }
9935 EOF
9936 if { (eval echo configure:9937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9937   rm -rf conftest*
9938   samba_cv_HAVE_UT_UT_ADDR=yes
9939 else
9940   echo "configure: failed program was:" >&5
9941   cat conftest.$ac_ext >&5
9942   rm -rf conftest*
9943   samba_cv_HAVE_UT_UT_ADDR=no
9944 fi
9945 rm -f conftest*
9946 fi
9947
9948 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9949 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9950     cat >> confdefs.h <<\EOF
9951 #define HAVE_UT_UT_ADDR 1
9952 EOF
9953
9954 fi 
9955
9956 if test x$ac_cv_func_pututline = xyes ; then
9957   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9958 echo "configure:9959: checking whether pututline returns pointer" >&5
9959 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9960   echo $ac_n "(cached) $ac_c" 1>&6
9961 else
9962   
9963   cat > conftest.$ac_ext <<EOF
9964 #line 9965 "configure"
9965 #include "confdefs.h"
9966 #include <sys/types.h>
9967 #include <utmp.h>
9968 int main() {
9969 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9970 ; return 0; }
9971 EOF
9972 if { (eval echo configure:9973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9973   rm -rf conftest*
9974   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9975 else
9976   echo "configure: failed program was:" >&5
9977   cat conftest.$ac_ext >&5
9978   rm -rf conftest*
9979   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9980 fi
9981 rm -f conftest*
9982 fi
9983
9984 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9985   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9986       cat >> confdefs.h <<\EOF
9987 #define PUTUTLINE_RETURNS_UTMP 1
9988 EOF
9989
9990   fi
9991 fi
9992
9993 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9994 echo "configure:9995: checking for ut_syslen in utmpx" >&5
9995 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9996   echo $ac_n "(cached) $ac_c" 1>&6
9997 else
9998   
9999 cat > conftest.$ac_ext <<EOF
10000 #line 10001 "configure"
10001 #include "confdefs.h"
10002 #include <sys/types.h>
10003 #include <utmpx.h>
10004 int main() {
10005 struct utmpx ux;  ux.ut_syslen = 0;
10006 ; return 0; }
10007 EOF
10008 if { (eval echo configure:10009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10009   rm -rf conftest*
10010   samba_cv_HAVE_UX_UT_SYSLEN=yes
10011 else
10012   echo "configure: failed program was:" >&5
10013   cat conftest.$ac_ext >&5
10014   rm -rf conftest*
10015   samba_cv_HAVE_UX_UT_SYSLEN=no
10016 fi
10017 rm -f conftest*
10018 fi
10019
10020 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10021 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10022     cat >> confdefs.h <<\EOF
10023 #define HAVE_UX_UT_SYSLEN 1
10024 EOF
10025
10026 fi 
10027
10028
10029 #################################################
10030 # check for libiconv support
10031 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10032 echo "configure:10033: checking whether to use libiconv" >&5
10033 # Check whether --with-libiconv or --without-libiconv was given.
10034 if test "${with_libiconv+set}" = set; then
10035   withval="$with_libiconv"
10036    case "$withval" in
10037   no)
10038     echo "$ac_t""no" 1>&6
10039     ;;
10040   *)
10041     echo "$ac_t""yes" 1>&6
10042     CFLAGS="$CFLAGS -I$withval/include"
10043     LDFLAGS="$LDFLAGS -L$withval/lib"
10044     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10045 echo "configure:10046: checking for iconv_open in -liconv" >&5
10046 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10048   echo $ac_n "(cached) $ac_c" 1>&6
10049 else
10050   ac_save_LIBS="$LIBS"
10051 LIBS="-liconv  $LIBS"
10052 cat > conftest.$ac_ext <<EOF
10053 #line 10054 "configure"
10054 #include "confdefs.h"
10055 /* Override any gcc2 internal prototype to avoid an error.  */
10056 /* We use char because int might match the return type of a gcc2
10057     builtin and then its argument prototype would still apply.  */
10058 char iconv_open();
10059
10060 int main() {
10061 iconv_open()
10062 ; return 0; }
10063 EOF
10064 if { (eval echo configure:10065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10065   rm -rf conftest*
10066   eval "ac_cv_lib_$ac_lib_var=yes"
10067 else
10068   echo "configure: failed program was:" >&5
10069   cat conftest.$ac_ext >&5
10070   rm -rf conftest*
10071   eval "ac_cv_lib_$ac_lib_var=no"
10072 fi
10073 rm -f conftest*
10074 LIBS="$ac_save_LIBS"
10075
10076 fi
10077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10078   echo "$ac_t""yes" 1>&6
10079     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10080     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10081   cat >> confdefs.h <<EOF
10082 #define $ac_tr_lib 1
10083 EOF
10084
10085   LIBS="-liconv $LIBS"
10086
10087 else
10088   echo "$ac_t""no" 1>&6
10089 fi
10090
10091     cat >> confdefs.h <<EOF
10092 #define WITH_LIBICONV "${withval}"
10093 EOF
10094
10095     ;;
10096   esac 
10097 else
10098   echo "$ac_t""no" 1>&6
10099
10100 fi
10101
10102
10103
10104 ############
10105 # check for iconv in libc
10106 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10107 echo "configure:10108: checking for working iconv" >&5
10108 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10109   echo $ac_n "(cached) $ac_c" 1>&6
10110 else
10111   
10112 if test "$cross_compiling" = yes; then
10113   samba_cv_HAVE_NATIVE_ICONV=cross
10114 else
10115   cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118
10119 #include <iconv.h>
10120 main() {
10121        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10122        if (cd == 0 || cd == (iconv_t)-1) return -1;
10123        return 0;
10124 }
10125
10126 EOF
10127 if { (eval echo configure:10128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10128 then
10129   samba_cv_HAVE_NATIVE_ICONV=yes
10130 else
10131   echo "configure: failed program was:" >&5
10132   cat conftest.$ac_ext >&5
10133   rm -fr conftest*
10134   samba_cv_HAVE_NATIVE_ICONV=no
10135 fi
10136 rm -fr conftest*
10137 fi
10138
10139 fi
10140
10141 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10142 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10143     cat >> confdefs.h <<\EOF
10144 #define HAVE_NATIVE_ICONV 1
10145 EOF
10146
10147 fi
10148
10149
10150 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10151 echo "configure:10152: checking for Linux kernel oplocks" >&5
10152 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10153   echo $ac_n "(cached) $ac_c" 1>&6
10154 else
10155   
10156 if test "$cross_compiling" = yes; then
10157   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10158 else
10159   cat > conftest.$ac_ext <<EOF
10160 #line 10161 "configure"
10161 #include "confdefs.h"
10162
10163 #include <sys/types.h>
10164 #include <fcntl.h>
10165 #ifndef F_GETLEASE
10166 #define F_GETLEASE      1025
10167 #endif
10168 main() {
10169        int fd = open("/dev/null", O_RDONLY);
10170        return fcntl(fd, F_GETLEASE, 0) == -1;
10171 }
10172
10173 EOF
10174 if { (eval echo configure:10175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10175 then
10176   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10177 else
10178   echo "configure: failed program was:" >&5
10179   cat conftest.$ac_ext >&5
10180   rm -fr conftest*
10181   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10182 fi
10183 rm -fr conftest*
10184 fi
10185
10186 fi
10187
10188 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10189 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10190     cat >> confdefs.h <<\EOF
10191 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10192 EOF
10193
10194 fi
10195
10196 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10197 echo "configure:10198: checking for kernel change notify support" >&5
10198 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10199   echo $ac_n "(cached) $ac_c" 1>&6
10200 else
10201   
10202 if test "$cross_compiling" = yes; then
10203   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10204 else
10205   cat > conftest.$ac_ext <<EOF
10206 #line 10207 "configure"
10207 #include "confdefs.h"
10208
10209 #include <sys/types.h>
10210 #include <fcntl.h>
10211 #include <signal.h>
10212 #ifndef F_NOTIFY
10213 #define F_NOTIFY 1026
10214 #endif
10215 main() {
10216         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10217 }
10218
10219 EOF
10220 if { (eval echo configure:10221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10221 then
10222   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10223 else
10224   echo "configure: failed program was:" >&5
10225   cat conftest.$ac_ext >&5
10226   rm -fr conftest*
10227   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10228 fi
10229 rm -fr conftest*
10230 fi
10231
10232 fi
10233
10234 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10235 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10236     cat >> confdefs.h <<\EOF
10237 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10238 EOF
10239
10240 fi
10241
10242 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10243 echo "configure:10244: checking for kernel share modes" >&5
10244 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10245   echo $ac_n "(cached) $ac_c" 1>&6
10246 else
10247   
10248 if test "$cross_compiling" = yes; then
10249   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10250 else
10251   cat > conftest.$ac_ext <<EOF
10252 #line 10253 "configure"
10253 #include "confdefs.h"
10254
10255 #include <sys/types.h>
10256 #include <fcntl.h>
10257 #include <signal.h>
10258 #include <sys/file.h>
10259 #ifndef LOCK_MAND
10260 #define LOCK_MAND       32
10261 #define LOCK_READ       64
10262 #endif
10263 main() {
10264         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10265 }
10266
10267 EOF
10268 if { (eval echo configure:10269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10269 then
10270   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10271 else
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -fr conftest*
10275   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10276 fi
10277 rm -fr conftest*
10278 fi
10279
10280 fi
10281
10282 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10283 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10284     cat >> confdefs.h <<\EOF
10285 #define HAVE_KERNEL_SHARE_MODES 1
10286 EOF
10287
10288 fi
10289
10290
10291
10292
10293 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10294 echo "configure:10295: checking for IRIX kernel oplock type definitions" >&5
10295 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10296   echo $ac_n "(cached) $ac_c" 1>&6
10297 else
10298   
10299 cat > conftest.$ac_ext <<EOF
10300 #line 10301 "configure"
10301 #include "confdefs.h"
10302 #include <sys/types.h>
10303 #include <fcntl.h>
10304 int main() {
10305 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10306 ; return 0; }
10307 EOF
10308 if { (eval echo configure:10309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10309   rm -rf conftest*
10310   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10311 else
10312   echo "configure: failed program was:" >&5
10313   cat conftest.$ac_ext >&5
10314   rm -rf conftest*
10315   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10316 fi
10317 rm -f conftest*
10318 fi
10319
10320 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10321 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10322     cat >> confdefs.h <<\EOF
10323 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10324 EOF
10325
10326 fi
10327
10328 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10329 echo "configure:10330: checking for irix specific capabilities" >&5
10330 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10331   echo $ac_n "(cached) $ac_c" 1>&6
10332 else
10333   
10334 if test "$cross_compiling" = yes; then
10335   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10336 else
10337   cat > conftest.$ac_ext <<EOF
10338 #line 10339 "configure"
10339 #include "confdefs.h"
10340 #include <sys/types.h>
10341 #include <sys/capability.h>
10342 main() {
10343  cap_t cap;
10344  if ((cap = cap_get_proc()) == NULL)
10345    exit(1);
10346  cap->cap_effective |= CAP_NETWORK_MGT;
10347  cap->cap_inheritable |= CAP_NETWORK_MGT;
10348  cap_set_proc(cap);
10349  exit(0);
10350 }
10351
10352 EOF
10353 if { (eval echo configure:10354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10354 then
10355   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10356 else
10357   echo "configure: failed program was:" >&5
10358   cat conftest.$ac_ext >&5
10359   rm -fr conftest*
10360   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10361 fi
10362 rm -fr conftest*
10363 fi
10364
10365 fi
10366
10367 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10368 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10369     cat >> confdefs.h <<\EOF
10370 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10371 EOF
10372
10373 fi
10374
10375 #
10376 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10377 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10378 #
10379
10380 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10381 echo "configure:10382: checking for int16 typedef included by rpc/rpc.h" >&5
10382 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10383   echo $ac_n "(cached) $ac_c" 1>&6
10384 else
10385   
10386 cat > conftest.$ac_ext <<EOF
10387 #line 10388 "configure"
10388 #include "confdefs.h"
10389 #include <sys/types.h>
10390 #if defined(HAVE_RPC_RPC_H)
10391 #include <rpc/rpc.h>
10392 #endif
10393 int main() {
10394 int16 testvar;
10395 ; return 0; }
10396 EOF
10397 if { (eval echo configure:10398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10398   rm -rf conftest*
10399   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10400 else
10401   echo "configure: failed program was:" >&5
10402   cat conftest.$ac_ext >&5
10403   rm -rf conftest*
10404   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10405 fi
10406 rm -f conftest*
10407 fi
10408
10409 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10410 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10411     cat >> confdefs.h <<\EOF
10412 #define HAVE_INT16_FROM_RPC_RPC_H 1
10413 EOF
10414
10415 fi
10416
10417 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10418 echo "configure:10419: checking for uint16 typedef included by rpc/rpc.h" >&5
10419 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10420   echo $ac_n "(cached) $ac_c" 1>&6
10421 else
10422   
10423 cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426 #include <sys/types.h>
10427 #if defined(HAVE_RPC_RPC_H)
10428 #include <rpc/rpc.h>
10429 #endif
10430 int main() {
10431 uint16 testvar;
10432 ; return 0; }
10433 EOF
10434 if { (eval echo configure:10435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10435   rm -rf conftest*
10436   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10437 else
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10442 fi
10443 rm -f conftest*
10444 fi
10445
10446 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10447 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10448     cat >> confdefs.h <<\EOF
10449 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10450 EOF
10451
10452 fi
10453
10454 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10455 echo "configure:10456: checking for int32 typedef included by rpc/rpc.h" >&5
10456 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10457   echo $ac_n "(cached) $ac_c" 1>&6
10458 else
10459   
10460 cat > conftest.$ac_ext <<EOF
10461 #line 10462 "configure"
10462 #include "confdefs.h"
10463 #include <sys/types.h>
10464 #if defined(HAVE_RPC_RPC_H)
10465 #include <rpc/rpc.h>
10466 #endif
10467 int main() {
10468 int32 testvar;
10469 ; return 0; }
10470 EOF
10471 if { (eval echo configure:10472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10472   rm -rf conftest*
10473   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10474 else
10475   echo "configure: failed program was:" >&5
10476   cat conftest.$ac_ext >&5
10477   rm -rf conftest*
10478   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10479 fi
10480 rm -f conftest*
10481 fi
10482
10483 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10484 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10485     cat >> confdefs.h <<\EOF
10486 #define HAVE_INT32_FROM_RPC_RPC_H 1
10487 EOF
10488
10489 fi
10490
10491 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10492 echo "configure:10493: checking for uint32 typedef included by rpc/rpc.h" >&5
10493 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10494   echo $ac_n "(cached) $ac_c" 1>&6
10495 else
10496   
10497 cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500 #include <sys/types.h>
10501 #if defined(HAVE_RPC_RPC_H)
10502 #include <rpc/rpc.h>
10503 #endif
10504 int main() {
10505 uint32 testvar;
10506 ; return 0; }
10507 EOF
10508 if { (eval echo configure:10509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10509   rm -rf conftest*
10510   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10511 else
10512   echo "configure: failed program was:" >&5
10513   cat conftest.$ac_ext >&5
10514   rm -rf conftest*
10515   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10516 fi
10517 rm -f conftest*
10518 fi
10519
10520 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10521 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10522     cat >> confdefs.h <<\EOF
10523 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10524 EOF
10525
10526 fi
10527
10528
10529 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10530 echo "configure:10531: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10531 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10532   echo $ac_n "(cached) $ac_c" 1>&6
10533 else
10534   
10535 cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538 #include <sys/types.h>
10539 #ifdef HAVE_SYS_SECURITY_H
10540 #include <sys/security.h>
10541 #include <prot.h>
10542 #endif  /* HAVE_SYS_SECURITY_H */
10543 #if defined(HAVE_RPC_RPC_H)
10544 #include <rpc/rpc.h>
10545 #endif
10546 int main() {
10547 int testvar;
10548 ; return 0; }
10549 EOF
10550 if { (eval echo configure:10551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10551   rm -rf conftest*
10552   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10553 else
10554   echo "configure: failed program was:" >&5
10555   cat conftest.$ac_ext >&5
10556   rm -rf conftest*
10557   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10558 fi
10559 rm -f conftest*
10560 fi
10561
10562 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10563 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10564     cat >> confdefs.h <<\EOF
10565 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10566 EOF
10567
10568 fi
10569
10570 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10571 echo "configure:10572: checking for test routines" >&5
10572 if test "$cross_compiling" = yes; then
10573   echo "configure: warning: cannot run when cross-compiling" 1>&2
10574 else
10575   cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578 #include "${srcdir-.}/tests/trivial.c"
10579 EOF
10580 if { (eval echo configure:10581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10581 then
10582   echo "$ac_t""yes" 1>&6
10583 else
10584   echo "configure: failed program was:" >&5
10585   cat conftest.$ac_ext >&5
10586   rm -fr conftest*
10587   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10588 fi
10589 rm -fr conftest*
10590 fi
10591
10592
10593 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10594 echo "configure:10595: checking for ftruncate extend" >&5
10595 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10596   echo $ac_n "(cached) $ac_c" 1>&6
10597 else
10598   
10599 if test "$cross_compiling" = yes; then
10600   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10601 else
10602   cat > conftest.$ac_ext <<EOF
10603 #line 10604 "configure"
10604 #include "confdefs.h"
10605 #include "${srcdir-.}/tests/ftruncate.c"
10606 EOF
10607 if { (eval echo configure:10608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10608 then
10609   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10610 else
10611   echo "configure: failed program was:" >&5
10612   cat conftest.$ac_ext >&5
10613   rm -fr conftest*
10614   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10615 fi
10616 rm -fr conftest*
10617 fi
10618
10619 fi
10620
10621 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10622 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10623     cat >> confdefs.h <<\EOF
10624 #define HAVE_FTRUNCATE_EXTEND 1
10625 EOF
10626
10627 fi
10628
10629 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10630 echo "configure:10631: checking for AF_LOCAL socket support" >&5
10631 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10632   echo $ac_n "(cached) $ac_c" 1>&6
10633 else
10634   
10635 if test "$cross_compiling" = yes; then
10636   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10637 else
10638   cat > conftest.$ac_ext <<EOF
10639 #line 10640 "configure"
10640 #include "confdefs.h"
10641 #include "${srcdir-.}/tests/unixsock.c"
10642 EOF
10643 if { (eval echo configure:10644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10644 then
10645   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10646 else
10647   echo "configure: failed program was:" >&5
10648   cat conftest.$ac_ext >&5
10649   rm -fr conftest*
10650   samba_cv_HAVE_WORKING_AF_LOCAL=no
10651 fi
10652 rm -fr conftest*
10653 fi
10654
10655 fi
10656
10657 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10658 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10659 then
10660     cat >> confdefs.h <<\EOF
10661 #define HAVE_WORKING_AF_LOCAL 1
10662 EOF
10663
10664 fi
10665
10666 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10667 echo "configure:10668: checking for broken getgroups" >&5
10668 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10669   echo $ac_n "(cached) $ac_c" 1>&6
10670 else
10671   
10672 if test "$cross_compiling" = yes; then
10673   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10674 else
10675   cat > conftest.$ac_ext <<EOF
10676 #line 10677 "configure"
10677 #include "confdefs.h"
10678 #include "${srcdir-.}/tests/getgroups.c"
10679 EOF
10680 if { (eval echo configure:10681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10681 then
10682   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10683 else
10684   echo "configure: failed program was:" >&5
10685   cat conftest.$ac_ext >&5
10686   rm -fr conftest*
10687   samba_cv_HAVE_BROKEN_GETGROUPS=no
10688 fi
10689 rm -fr conftest*
10690 fi
10691
10692 fi
10693
10694 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10695 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10696     cat >> confdefs.h <<\EOF
10697 #define HAVE_BROKEN_GETGROUPS 1
10698 EOF
10699
10700 fi
10701
10702 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10703 echo "configure:10704: checking whether getpass should be replaced" >&5
10704 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10705   echo $ac_n "(cached) $ac_c" 1>&6
10706 else
10707   
10708 SAVE_CPPFLAGS="$CPPFLAGS"
10709 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10710 cat > conftest.$ac_ext <<EOF
10711 #line 10712 "configure"
10712 #include "confdefs.h"
10713
10714 #define REPLACE_GETPASS 1
10715 #define NO_CONFIG_H 1
10716 #define main dont_declare_main
10717 #include "${srcdir-.}/lib/getsmbpass.c"
10718 #undef main
10719
10720 int main() {
10721
10722 ; return 0; }
10723 EOF
10724 if { (eval echo configure:10725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10725   rm -rf conftest*
10726   samba_cv_REPLACE_GETPASS=yes
10727 else
10728   echo "configure: failed program was:" >&5
10729   cat conftest.$ac_ext >&5
10730   rm -rf conftest*
10731   samba_cv_REPLACE_GETPASS=no
10732 fi
10733 rm -f conftest*
10734 CPPFLAGS="$SAVE_CPPFLAGS"
10735
10736 fi
10737
10738 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10739 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10740         cat >> confdefs.h <<\EOF
10741 #define REPLACE_GETPASS 1
10742 EOF
10743
10744 fi
10745
10746 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10747 echo "configure:10748: checking for broken inet_ntoa" >&5
10748 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10749   echo $ac_n "(cached) $ac_c" 1>&6
10750 else
10751   
10752 if test "$cross_compiling" = yes; then
10753   samba_cv_REPLACE_INET_NTOA=cross
10754 else
10755   cat > conftest.$ac_ext <<EOF
10756 #line 10757 "configure"
10757 #include "confdefs.h"
10758
10759 #include <stdio.h>
10760 #include <sys/types.h>
10761 #include <netinet/in.h>
10762 #ifdef HAVE_ARPA_INET_H
10763 #include <arpa/inet.h>
10764 #endif
10765 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10766 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10767     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10768 exit(1);}
10769 EOF
10770 if { (eval echo configure:10771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10771 then
10772   samba_cv_REPLACE_INET_NTOA=yes
10773 else
10774   echo "configure: failed program was:" >&5
10775   cat conftest.$ac_ext >&5
10776   rm -fr conftest*
10777   samba_cv_REPLACE_INET_NTOA=no
10778 fi
10779 rm -fr conftest*
10780 fi
10781
10782 fi
10783
10784 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10785 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10786     cat >> confdefs.h <<\EOF
10787 #define REPLACE_INET_NTOA 1
10788 EOF
10789
10790 fi
10791
10792 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10793 echo "configure:10794: checking for secure mkstemp" >&5
10794 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10795   echo $ac_n "(cached) $ac_c" 1>&6
10796 else
10797   
10798 if test "$cross_compiling" = yes; then
10799   samba_cv_HAVE_SECURE_MKSTEMP=cross
10800 else
10801   cat > conftest.$ac_ext <<EOF
10802 #line 10803 "configure"
10803 #include "confdefs.h"
10804 #include <stdlib.h>
10805 #include <sys/types.h>
10806 #include <sys/stat.h>
10807 #include <unistd.h>
10808 main() { 
10809   struct stat st;
10810   char tpl[20]="/tmp/test.XXXXXX"; 
10811   int fd = mkstemp(tpl); 
10812   if (fd == -1) exit(1);
10813   unlink(tpl);
10814   if (fstat(fd, &st) != 0) exit(1);
10815   if ((st.st_mode & 0777) != 0600) exit(1);
10816   exit(0);
10817 }
10818 EOF
10819 if { (eval echo configure:10820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10820 then
10821   samba_cv_HAVE_SECURE_MKSTEMP=yes
10822 else
10823   echo "configure: failed program was:" >&5
10824   cat conftest.$ac_ext >&5
10825   rm -fr conftest*
10826   samba_cv_HAVE_SECURE_MKSTEMP=no
10827 fi
10828 rm -fr conftest*
10829 fi
10830
10831 fi
10832
10833 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10834 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10835     cat >> confdefs.h <<\EOF
10836 #define HAVE_SECURE_MKSTEMP 1
10837 EOF
10838
10839 fi
10840
10841 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10842 echo "configure:10843: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10843 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10844   echo $ac_n "(cached) $ac_c" 1>&6
10845 else
10846   
10847 if test "$cross_compiling" = yes; then
10848   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10849 else
10850   cat > conftest.$ac_ext <<EOF
10851 #line 10852 "configure"
10852 #include "confdefs.h"
10853 #include <unistd.h>
10854 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10855 EOF
10856 if { (eval echo configure:10857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10857 then
10858   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10859 else
10860   echo "configure: failed program was:" >&5
10861   cat conftest.$ac_ext >&5
10862   rm -fr conftest*
10863   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10864 fi
10865 rm -fr conftest*
10866 fi
10867
10868 fi
10869
10870 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10871 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10872     cat >> confdefs.h <<\EOF
10873 #define SYSCONF_SC_NGROUPS_MAX 1
10874 EOF
10875
10876 fi
10877
10878 echo $ac_n "checking for root""... $ac_c" 1>&6
10879 echo "configure:10880: checking for root" >&5
10880 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10881   echo $ac_n "(cached) $ac_c" 1>&6
10882 else
10883   
10884 if test "$cross_compiling" = yes; then
10885   samba_cv_HAVE_ROOT=cross
10886 else
10887   cat > conftest.$ac_ext <<EOF
10888 #line 10889 "configure"
10889 #include "confdefs.h"
10890 main() { exit(getuid() != 0); }
10891 EOF
10892 if { (eval echo configure:10893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10893 then
10894   samba_cv_HAVE_ROOT=yes
10895 else
10896   echo "configure: failed program was:" >&5
10897   cat conftest.$ac_ext >&5
10898   rm -fr conftest*
10899   samba_cv_HAVE_ROOT=no
10900 fi
10901 rm -fr conftest*
10902 fi
10903
10904 fi
10905
10906 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10907 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10908     cat >> confdefs.h <<\EOF
10909 #define HAVE_ROOT 1
10910 EOF
10911
10912 else
10913     echo "configure: warning: running as non-root will disable some tests" 1>&2
10914 fi
10915
10916 ##################
10917 # look for a method of finding the list of network interfaces
10918 iface=no;
10919 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10920 echo "configure:10921: checking for iface AIX" >&5
10921 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10922   echo $ac_n "(cached) $ac_c" 1>&6
10923 else
10924   
10925 if test "$cross_compiling" = yes; then
10926   samba_cv_HAVE_IFACE_AIX=cross
10927 else
10928   cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931
10932 #define HAVE_IFACE_AIX 1
10933 #define AUTOCONF_TEST 1
10934 #include "confdefs.h"
10935 #include "${srcdir-.}/lib/interfaces.c"
10936 EOF
10937 if { (eval echo configure:10938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10938 then
10939   samba_cv_HAVE_IFACE_AIX=yes
10940 else
10941   echo "configure: failed program was:" >&5
10942   cat conftest.$ac_ext >&5
10943   rm -fr conftest*
10944   samba_cv_HAVE_IFACE_AIX=no
10945 fi
10946 rm -fr conftest*
10947 fi
10948
10949 fi
10950
10951 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10952 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10953     iface=yes;cat >> confdefs.h <<\EOF
10954 #define HAVE_IFACE_AIX 1
10955 EOF
10956
10957 fi
10958
10959 if test $iface = no; then
10960 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10961 echo "configure:10962: checking for iface ifconf" >&5
10962 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10963   echo $ac_n "(cached) $ac_c" 1>&6
10964 else
10965   
10966 if test "$cross_compiling" = yes; then
10967   samba_cv_HAVE_IFACE_IFCONF=cross
10968 else
10969   cat > conftest.$ac_ext <<EOF
10970 #line 10971 "configure"
10971 #include "confdefs.h"
10972
10973 #define HAVE_IFACE_IFCONF 1
10974 #define AUTOCONF_TEST 1
10975 #include "confdefs.h"
10976 #include "${srcdir-.}/lib/interfaces.c"
10977 EOF
10978 if { (eval echo configure:10979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10979 then
10980   samba_cv_HAVE_IFACE_IFCONF=yes
10981 else
10982   echo "configure: failed program was:" >&5
10983   cat conftest.$ac_ext >&5
10984   rm -fr conftest*
10985   samba_cv_HAVE_IFACE_IFCONF=no
10986 fi
10987 rm -fr conftest*
10988 fi
10989
10990 fi
10991
10992 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10993 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10994     iface=yes;cat >> confdefs.h <<\EOF
10995 #define HAVE_IFACE_IFCONF 1
10996 EOF
10997
10998 fi
10999 fi
11000
11001 if test $iface = no; then
11002 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11003 echo "configure:11004: checking for iface ifreq" >&5
11004 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11005   echo $ac_n "(cached) $ac_c" 1>&6
11006 else
11007   
11008 if test "$cross_compiling" = yes; then
11009   samba_cv_HAVE_IFACE_IFREQ=cross
11010 else
11011   cat > conftest.$ac_ext <<EOF
11012 #line 11013 "configure"
11013 #include "confdefs.h"
11014
11015 #define HAVE_IFACE_IFREQ 1
11016 #define AUTOCONF_TEST 1
11017 #include "confdefs.h"
11018 #include "${srcdir-.}/lib/interfaces.c"
11019 EOF
11020 if { (eval echo configure:11021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11021 then
11022   samba_cv_HAVE_IFACE_IFREQ=yes
11023 else
11024   echo "configure: failed program was:" >&5
11025   cat conftest.$ac_ext >&5
11026   rm -fr conftest*
11027   samba_cv_HAVE_IFACE_IFREQ=no
11028 fi
11029 rm -fr conftest*
11030 fi
11031
11032 fi
11033
11034 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11035 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11036     iface=yes;cat >> confdefs.h <<\EOF
11037 #define HAVE_IFACE_IFREQ 1
11038 EOF
11039
11040 fi
11041 fi
11042
11043
11044 ################################################
11045 # look for a method of setting the effective uid
11046 seteuid=no;
11047 if test $seteuid = no; then
11048 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11049 echo "configure:11050: checking for setresuid" >&5
11050 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11051   echo $ac_n "(cached) $ac_c" 1>&6
11052 else
11053   
11054 if test "$cross_compiling" = yes; then
11055   samba_cv_USE_SETRESUID=cross
11056 else
11057   cat > conftest.$ac_ext <<EOF
11058 #line 11059 "configure"
11059 #include "confdefs.h"
11060
11061 #define AUTOCONF_TEST 1
11062 #define USE_SETRESUID 1
11063 #include "confdefs.h"
11064 #include "${srcdir-.}/lib/util_sec.c"
11065 EOF
11066 if { (eval echo configure:11067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11067 then
11068   samba_cv_USE_SETRESUID=yes
11069 else
11070   echo "configure: failed program was:" >&5
11071   cat conftest.$ac_ext >&5
11072   rm -fr conftest*
11073   samba_cv_USE_SETRESUID=no
11074 fi
11075 rm -fr conftest*
11076 fi
11077
11078 fi
11079
11080 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11081 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11082     seteuid=yes;cat >> confdefs.h <<\EOF
11083 #define USE_SETRESUID 1
11084 EOF
11085
11086 fi
11087 fi
11088
11089
11090 if test $seteuid = no; then
11091 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11092 echo "configure:11093: checking for setreuid" >&5
11093 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11094   echo $ac_n "(cached) $ac_c" 1>&6
11095 else
11096   
11097 if test "$cross_compiling" = yes; then
11098   samba_cv_USE_SETREUID=cross
11099 else
11100   cat > conftest.$ac_ext <<EOF
11101 #line 11102 "configure"
11102 #include "confdefs.h"
11103
11104 #define AUTOCONF_TEST 1
11105 #define USE_SETREUID 1
11106 #include "confdefs.h"
11107 #include "${srcdir-.}/lib/util_sec.c"
11108 EOF
11109 if { (eval echo configure:11110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11110 then
11111   samba_cv_USE_SETREUID=yes
11112 else
11113   echo "configure: failed program was:" >&5
11114   cat conftest.$ac_ext >&5
11115   rm -fr conftest*
11116   samba_cv_USE_SETREUID=no
11117 fi
11118 rm -fr conftest*
11119 fi
11120
11121 fi
11122
11123 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11124 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11125     seteuid=yes;cat >> confdefs.h <<\EOF
11126 #define USE_SETREUID 1
11127 EOF
11128
11129 fi
11130 fi
11131
11132 if test $seteuid = no; then
11133 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11134 echo "configure:11135: checking for seteuid" >&5
11135 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11136   echo $ac_n "(cached) $ac_c" 1>&6
11137 else
11138   
11139 if test "$cross_compiling" = yes; then
11140   samba_cv_USE_SETEUID=cross
11141 else
11142   cat > conftest.$ac_ext <<EOF
11143 #line 11144 "configure"
11144 #include "confdefs.h"
11145
11146 #define AUTOCONF_TEST 1
11147 #define USE_SETEUID 1
11148 #include "confdefs.h"
11149 #include "${srcdir-.}/lib/util_sec.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_USE_SETEUID=yes
11154 else
11155   echo "configure: failed program was:" >&5
11156   cat conftest.$ac_ext >&5
11157   rm -fr conftest*
11158   samba_cv_USE_SETEUID=no
11159 fi
11160 rm -fr conftest*
11161 fi
11162
11163 fi
11164
11165 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11166 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11167     seteuid=yes;cat >> confdefs.h <<\EOF
11168 #define USE_SETEUID 1
11169 EOF
11170
11171 fi
11172 fi
11173
11174 if test $seteuid = no; then
11175 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11176 echo "configure:11177: checking for setuidx" >&5
11177 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+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_USE_SETUIDX=cross
11183 else
11184   cat > conftest.$ac_ext <<EOF
11185 #line 11186 "configure"
11186 #include "confdefs.h"
11187
11188 #define AUTOCONF_TEST 1
11189 #define USE_SETUIDX 1
11190 #include "confdefs.h"
11191 #include "${srcdir-.}/lib/util_sec.c"
11192 EOF
11193 if { (eval echo configure:11194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11194 then
11195   samba_cv_USE_SETUIDX=yes
11196 else
11197   echo "configure: failed program was:" >&5
11198   cat conftest.$ac_ext >&5
11199   rm -fr conftest*
11200   samba_cv_USE_SETUIDX=no
11201 fi
11202 rm -fr conftest*
11203 fi
11204
11205 fi
11206
11207 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11208 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11209     seteuid=yes;cat >> confdefs.h <<\EOF
11210 #define USE_SETUIDX 1
11211 EOF
11212
11213 fi
11214 fi
11215
11216
11217 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11218 echo "configure:11219: checking for working mmap" >&5
11219 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11220   echo $ac_n "(cached) $ac_c" 1>&6
11221 else
11222   
11223 if test "$cross_compiling" = yes; then
11224   samba_cv_HAVE_MMAP=cross
11225 else
11226   cat > conftest.$ac_ext <<EOF
11227 #line 11228 "configure"
11228 #include "confdefs.h"
11229 #include "${srcdir-.}/tests/shared_mmap.c"
11230 EOF
11231 if { (eval echo configure:11232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11232 then
11233   samba_cv_HAVE_MMAP=yes
11234 else
11235   echo "configure: failed program was:" >&5
11236   cat conftest.$ac_ext >&5
11237   rm -fr conftest*
11238   samba_cv_HAVE_MMAP=no
11239 fi
11240 rm -fr conftest*
11241 fi
11242
11243 fi
11244
11245 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11246 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11247     cat >> confdefs.h <<\EOF
11248 #define HAVE_MMAP 1
11249 EOF
11250
11251 fi
11252
11253 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11254 echo "configure:11255: checking for ftruncate needs root" >&5
11255 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11256   echo $ac_n "(cached) $ac_c" 1>&6
11257 else
11258   
11259 if test "$cross_compiling" = yes; then
11260   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11261 else
11262   cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265 #include "${srcdir-.}/tests/ftruncroot.c"
11266 EOF
11267 if { (eval echo configure:11268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11268 then
11269   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11270 else
11271   echo "configure: failed program was:" >&5
11272   cat conftest.$ac_ext >&5
11273   rm -fr conftest*
11274   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11275 fi
11276 rm -fr conftest*
11277 fi
11278
11279 fi
11280
11281 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11282 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11283     cat >> confdefs.h <<\EOF
11284 #define FTRUNCATE_NEEDS_ROOT 1
11285 EOF
11286
11287 fi
11288
11289 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11290 echo "configure:11291: checking for fcntl locking" >&5
11291 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11292   echo $ac_n "(cached) $ac_c" 1>&6
11293 else
11294   
11295 if test "$cross_compiling" = yes; then
11296   samba_cv_HAVE_FCNTL_LOCK=cross
11297 else
11298   cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11301 #include "${srcdir-.}/tests/fcntl_lock.c"
11302 EOF
11303 if { (eval echo configure:11304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11304 then
11305   samba_cv_HAVE_FCNTL_LOCK=yes
11306 else
11307   echo "configure: failed program was:" >&5
11308   cat conftest.$ac_ext >&5
11309   rm -fr conftest*
11310   samba_cv_HAVE_FCNTL_LOCK=no
11311 fi
11312 rm -fr conftest*
11313 fi
11314
11315 fi
11316
11317 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11318 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11319     cat >> confdefs.h <<\EOF
11320 #define HAVE_FCNTL_LOCK 1
11321 EOF
11322
11323 fi
11324
11325 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11326 echo "configure:11327: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11327 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11328   echo $ac_n "(cached) $ac_c" 1>&6
11329 else
11330   
11331 if test "$cross_compiling" = yes; then
11332   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11333 else
11334   cat > conftest.$ac_ext <<EOF
11335 #line 11336 "configure"
11336 #include "confdefs.h"
11337 #include "${srcdir-.}/tests/fcntl_lock64.c"
11338 EOF
11339 if { (eval echo configure:11340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11340 then
11341   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11342 else
11343   echo "configure: failed program was:" >&5
11344   cat conftest.$ac_ext >&5
11345   rm -fr conftest*
11346   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11347 fi
11348 rm -fr conftest*
11349 fi
11350
11351 fi
11352
11353 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11354 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11355     cat >> confdefs.h <<\EOF
11356 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11357 EOF
11358
11359
11360 else
11361
11362
11363   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11364 echo "configure:11365: checking for 64 bit fcntl locking" >&5
11365 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11366   echo $ac_n "(cached) $ac_c" 1>&6
11367 else
11368   
11369   if test "$cross_compiling" = yes; then
11370   samba_cv_HAVE_STRUCT_FLOCK64=cross
11371 else
11372   cat > conftest.$ac_ext <<EOF
11373 #line 11374 "configure"
11374 #include "confdefs.h"
11375
11376 #if defined(HAVE_UNISTD_H)
11377 #include <unistd.h>
11378 #endif
11379 #include <stdio.h>
11380 #include <stdlib.h>
11381
11382 #ifdef HAVE_FCNTL_H
11383 #include <fcntl.h>
11384 #endif
11385
11386 #ifdef HAVE_SYS_FCNTL_H
11387 #include <sys/fcntl.h>
11388 #endif
11389 main() { struct flock64 fl64;
11390 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11391 exit(0);
11392 #else
11393 exit(1);
11394 #endif
11395 }
11396 EOF
11397 if { (eval echo configure:11398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11398 then
11399   samba_cv_HAVE_STRUCT_FLOCK64=yes
11400 else
11401   echo "configure: failed program was:" >&5
11402   cat conftest.$ac_ext >&5
11403   rm -fr conftest*
11404   samba_cv_HAVE_STRUCT_FLOCK64=no
11405 fi
11406 rm -fr conftest*
11407 fi
11408
11409 fi
11410
11411 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11412
11413   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11414       cat >> confdefs.h <<\EOF
11415 #define HAVE_STRUCT_FLOCK64 1
11416 EOF
11417
11418   fi
11419 fi
11420
11421 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11422 echo "configure:11423: checking for st_blocks in struct stat" >&5
11423 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11424   echo $ac_n "(cached) $ac_c" 1>&6
11425 else
11426   
11427 cat > conftest.$ac_ext <<EOF
11428 #line 11429 "configure"
11429 #include "confdefs.h"
11430 #include <sys/types.h>
11431 #include <sys/stat.h>
11432 #include <unistd.h>
11433 int main() {
11434 struct stat st;  st.st_blocks = 0;
11435 ; return 0; }
11436 EOF
11437 if { (eval echo configure:11438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11438   rm -rf conftest*
11439   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11440 else
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   samba_cv_HAVE_STAT_ST_BLOCKS=no
11445 fi
11446 rm -f conftest*
11447 fi
11448
11449 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11450 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11451     cat >> confdefs.h <<\EOF
11452 #define HAVE_STAT_ST_BLOCKS 1
11453 EOF
11454
11455 fi 
11456
11457 case "$host_os" in
11458 *linux*)
11459 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11460 echo "configure:11461: checking for broken RedHat 7.2 system header files" >&5
11461 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11462   echo $ac_n "(cached) $ac_c" 1>&6
11463 else
11464   
11465 cat > conftest.$ac_ext <<EOF
11466 #line 11467 "configure"
11467 #include "confdefs.h"
11468
11469 #ifdef HAVE_SYS_VFS_H
11470 #include <sys/vfs.h>
11471 #endif
11472 #ifdef HAVE_SYS_CAPABILITY_H
11473 #include <sys/capability.h>
11474 #endif
11475
11476 int main() {
11477 int i;
11478 ; return 0; }
11479 EOF
11480 if { (eval echo configure:11481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11481   rm -rf conftest*
11482   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11483 else
11484   echo "configure: failed program was:" >&5
11485   cat conftest.$ac_ext >&5
11486   rm -rf conftest*
11487   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11488 fi
11489 rm -f conftest*
11490 fi
11491
11492 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11493 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11494    cat >> confdefs.h <<\EOF
11495 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11496 EOF
11497
11498 fi
11499 ;;
11500 esac
11501
11502 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11503 echo "configure:11504: checking for broken nisplus include files" >&5
11504 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11505   echo $ac_n "(cached) $ac_c" 1>&6
11506 else
11507   
11508 cat > conftest.$ac_ext <<EOF
11509 #line 11510 "configure"
11510 #include "confdefs.h"
11511 #include <sys/acl.h>
11512 #if defined(HAVE_RPCSVC_NIS_H)
11513 #include <rpcsvc/nis.h>
11514 #endif
11515 int main() {
11516 int i;
11517 ; return 0; }
11518 EOF
11519 if { (eval echo configure:11520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11520   rm -rf conftest*
11521   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11522 else
11523   echo "configure: failed program was:" >&5
11524   cat conftest.$ac_ext >&5
11525   rm -rf conftest*
11526   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11527 fi
11528 rm -f conftest*
11529 fi
11530
11531 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11532 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11533     cat >> confdefs.h <<\EOF
11534 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11535 EOF
11536
11537 fi
11538
11539
11540 #################################################
11541 # check for smbwrapper support
11542 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11543 echo "configure:11544: checking whether to use smbwrapper" >&5
11544 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11545 if test "${with_smbwrapper+set}" = set; then
11546   withval="$with_smbwrapper"
11547    case "$withval" in
11548   yes)
11549     echo "$ac_t""yes" 1>&6
11550     cat >> confdefs.h <<\EOF
11551 #define WITH_SMBWRAPPER 1
11552 EOF
11553
11554         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11555
11556         if test x$ATTEMPT_WRAP32_BUILD = x; then
11557                 WRAP32=""
11558         else
11559                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11560         fi
11561
11562 # Conditions under which smbwrapper should not be built.
11563
11564         if test x$PICFLAG = x; then
11565            echo No support for PIC code - disabling smbwrapper and smbsh
11566            WRAP=""
11567            WRAP32=""
11568         elif test x$ac_cv_func_syscall = xno; then
11569            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11570            WRAP=""
11571            WRAP32=""
11572         fi
11573     ;;
11574   *)
11575     echo "$ac_t""no" 1>&6
11576     ;;
11577   esac 
11578 else
11579   echo "$ac_t""no" 1>&6
11580
11581 fi
11582
11583
11584 #################################################
11585 # check for AFS clear-text auth support
11586 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11587 echo "configure:11588: checking whether to use AFS clear-text auth" >&5
11588 # Check whether --with-afs or --without-afs was given.
11589 if test "${with_afs+set}" = set; then
11590   withval="$with_afs"
11591    case "$withval" in
11592   yes)
11593     echo "$ac_t""yes" 1>&6
11594     cat >> confdefs.h <<\EOF
11595 #define WITH_AFS 1
11596 EOF
11597
11598     ;;
11599   *)
11600     echo "$ac_t""no" 1>&6
11601     ;;
11602   esac 
11603 else
11604   echo "$ac_t""no" 1>&6
11605
11606 fi
11607
11608
11609
11610 #################################################
11611 # check for the DFS clear-text auth system
11612 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11613 echo "configure:11614: checking whether to use DFS clear-text auth" >&5
11614 # Check whether --with-dfs or --without-dfs was given.
11615 if test "${with_dfs+set}" = set; then
11616   withval="$with_dfs"
11617    case "$withval" in
11618   yes)
11619     echo "$ac_t""yes" 1>&6
11620     cat >> confdefs.h <<\EOF
11621 #define WITH_DFS 1
11622 EOF
11623
11624     ;;
11625   *)
11626     echo "$ac_t""no" 1>&6
11627     ;;
11628   esac 
11629 else
11630   echo "$ac_t""no" 1>&6
11631
11632 fi
11633
11634
11635
11636 #################################################
11637 # see if this box has the RedHat location for kerberos
11638 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11639 echo "configure:11640: checking for /usr/kerberos" >&5
11640 if test -d /usr/kerberos; then
11641     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11642     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11643     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11644     echo "$ac_t""yes" 1>&6
11645 else
11646     echo "$ac_t""no" 1>&6
11647 fi
11648
11649 #################################################
11650 # check for location of Kerberos 5 install
11651 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11652 echo "configure:11653: checking for kerberos 5 install path" >&5
11653 # Check whether --with-krb5 or --without-krb5 was given.
11654 if test "${with_krb5+set}" = set; then
11655   withval="$with_krb5"
11656    case "$withval" in
11657   no)
11658     echo "$ac_t""no" 1>&6
11659     ;;
11660   *)
11661     echo "$ac_t""yes" 1>&6
11662     LIBS="$LIBS -lkrb5"
11663     CFLAGS="$CFLAGS -I$withval/include"
11664     CPPFLAGS="$CPPFLAGS -I$withval/include"
11665     LDFLAGS="$LDFLAGS -L$withval/lib"
11666     ;;
11667   esac 
11668 else
11669   echo "$ac_t""no" 1>&6
11670
11671 fi
11672
11673
11674 # now check for krb5.h. Some systems have the libraries without the headers!
11675 # note that this check is done here to allow for different kerberos
11676 # include paths
11677 for ac_hdr in krb5.h
11678 do
11679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11680 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11681 echo "configure:11682: checking for $ac_hdr" >&5
11682 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11683   echo $ac_n "(cached) $ac_c" 1>&6
11684 else
11685   cat > conftest.$ac_ext <<EOF
11686 #line 11687 "configure"
11687 #include "confdefs.h"
11688 #include <$ac_hdr>
11689 EOF
11690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11691 { (eval echo configure:11692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11693 if test -z "$ac_err"; then
11694   rm -rf conftest*
11695   eval "ac_cv_header_$ac_safe=yes"
11696 else
11697   echo "$ac_err" >&5
11698   echo "configure: failed program was:" >&5
11699   cat conftest.$ac_ext >&5
11700   rm -rf conftest*
11701   eval "ac_cv_header_$ac_safe=no"
11702 fi
11703 rm -f conftest*
11704 fi
11705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11706   echo "$ac_t""yes" 1>&6
11707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11708   cat >> confdefs.h <<EOF
11709 #define $ac_tr_hdr 1
11710 EOF
11711  
11712 else
11713   echo "$ac_t""no" 1>&6
11714 fi
11715 done
11716
11717
11718 # now check for gssapi headers.  This is also done here to allow for
11719 # different kerberos include paths
11720 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11721 do
11722 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11723 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11724 echo "configure:11725: checking for $ac_hdr" >&5
11725 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11726   echo $ac_n "(cached) $ac_c" 1>&6
11727 else
11728   cat > conftest.$ac_ext <<EOF
11729 #line 11730 "configure"
11730 #include "confdefs.h"
11731 #include <$ac_hdr>
11732 EOF
11733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11734 { (eval echo configure:11735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11736 if test -z "$ac_err"; then
11737   rm -rf conftest*
11738   eval "ac_cv_header_$ac_safe=yes"
11739 else
11740   echo "$ac_err" >&5
11741   echo "configure: failed program was:" >&5
11742   cat conftest.$ac_ext >&5
11743   rm -rf conftest*
11744   eval "ac_cv_header_$ac_safe=no"
11745 fi
11746 rm -f conftest*
11747 fi
11748 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11749   echo "$ac_t""yes" 1>&6
11750     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11751   cat >> confdefs.h <<EOF
11752 #define $ac_tr_hdr 1
11753 EOF
11754  
11755 else
11756   echo "$ac_t""no" 1>&6
11757 fi
11758 done
11759
11760
11761 ##################################################################
11762 # we might need the k5crypto and com_err libraries on some systems
11763 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11764 echo "configure:11765: checking for _et_list in -lcom_err" >&5
11765 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11767   echo $ac_n "(cached) $ac_c" 1>&6
11768 else
11769   ac_save_LIBS="$LIBS"
11770 LIBS="-lcom_err  $LIBS"
11771 cat > conftest.$ac_ext <<EOF
11772 #line 11773 "configure"
11773 #include "confdefs.h"
11774 /* Override any gcc2 internal prototype to avoid an error.  */
11775 /* We use char because int might match the return type of a gcc2
11776     builtin and then its argument prototype would still apply.  */
11777 char _et_list();
11778
11779 int main() {
11780 _et_list()
11781 ; return 0; }
11782 EOF
11783 if { (eval echo configure:11784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11784   rm -rf conftest*
11785   eval "ac_cv_lib_$ac_lib_var=yes"
11786 else
11787   echo "configure: failed program was:" >&5
11788   cat conftest.$ac_ext >&5
11789   rm -rf conftest*
11790   eval "ac_cv_lib_$ac_lib_var=no"
11791 fi
11792 rm -f conftest*
11793 LIBS="$ac_save_LIBS"
11794
11795 fi
11796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11797   echo "$ac_t""yes" 1>&6
11798   LIBS="$LIBS -lcom_err"
11799 else
11800   echo "$ac_t""no" 1>&6
11801 fi
11802
11803 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11804 echo "configure:11805: checking for krb5_encrypt_data in -lk5crypto" >&5
11805 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11806 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11807   echo $ac_n "(cached) $ac_c" 1>&6
11808 else
11809   ac_save_LIBS="$LIBS"
11810 LIBS="-lk5crypto  $LIBS"
11811 cat > conftest.$ac_ext <<EOF
11812 #line 11813 "configure"
11813 #include "confdefs.h"
11814 /* Override any gcc2 internal prototype to avoid an error.  */
11815 /* We use char because int might match the return type of a gcc2
11816     builtin and then its argument prototype would still apply.  */
11817 char krb5_encrypt_data();
11818
11819 int main() {
11820 krb5_encrypt_data()
11821 ; return 0; }
11822 EOF
11823 if { (eval echo configure:11824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11824   rm -rf conftest*
11825   eval "ac_cv_lib_$ac_lib_var=yes"
11826 else
11827   echo "configure: failed program was:" >&5
11828   cat conftest.$ac_ext >&5
11829   rm -rf conftest*
11830   eval "ac_cv_lib_$ac_lib_var=no"
11831 fi
11832 rm -f conftest*
11833 LIBS="$ac_save_LIBS"
11834
11835 fi
11836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11837   echo "$ac_t""yes" 1>&6
11838   LIBS="$LIBS -lk5crypto"
11839 else
11840   echo "$ac_t""no" 1>&6
11841 fi
11842
11843
11844 ########################################################
11845 # now see if we can find the krb5 libs in standard paths
11846 # or as specified above
11847 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11848 echo "configure:11849: checking for krb5_mk_req_extended in -lkrb5" >&5
11849 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11851   echo $ac_n "(cached) $ac_c" 1>&6
11852 else
11853   ac_save_LIBS="$LIBS"
11854 LIBS="-lkrb5  $LIBS"
11855 cat > conftest.$ac_ext <<EOF
11856 #line 11857 "configure"
11857 #include "confdefs.h"
11858 /* Override any gcc2 internal prototype to avoid an error.  */
11859 /* We use char because int might match the return type of a gcc2
11860     builtin and then its argument prototype would still apply.  */
11861 char krb5_mk_req_extended();
11862
11863 int main() {
11864 krb5_mk_req_extended()
11865 ; return 0; }
11866 EOF
11867 if { (eval echo configure:11868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11868   rm -rf conftest*
11869   eval "ac_cv_lib_$ac_lib_var=yes"
11870 else
11871   echo "configure: failed program was:" >&5
11872   cat conftest.$ac_ext >&5
11873   rm -rf conftest*
11874   eval "ac_cv_lib_$ac_lib_var=no"
11875 fi
11876 rm -f conftest*
11877 LIBS="$ac_save_LIBS"
11878
11879 fi
11880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11881   echo "$ac_t""yes" 1>&6
11882   LIBS="$LIBS -lkrb5";
11883         cat >> confdefs.h <<\EOF
11884 #define HAVE_KRB5 1
11885 EOF
11886
11887 else
11888   echo "$ac_t""no" 1>&6
11889 fi
11890
11891
11892 ########################################################
11893 # now see if we can find the gssapi libs in standard paths
11894 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11895 echo "configure:11896: checking for gss_display_status in -lgssapi_krb5" >&5
11896 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11897 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11898   echo $ac_n "(cached) $ac_c" 1>&6
11899 else
11900   ac_save_LIBS="$LIBS"
11901 LIBS="-lgssapi_krb5  $LIBS"
11902 cat > conftest.$ac_ext <<EOF
11903 #line 11904 "configure"
11904 #include "confdefs.h"
11905 /* Override any gcc2 internal prototype to avoid an error.  */
11906 /* We use char because int might match the return type of a gcc2
11907     builtin and then its argument prototype would still apply.  */
11908 char gss_display_status();
11909
11910 int main() {
11911 gss_display_status()
11912 ; return 0; }
11913 EOF
11914 if { (eval echo configure:11915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11915   rm -rf conftest*
11916   eval "ac_cv_lib_$ac_lib_var=yes"
11917 else
11918   echo "configure: failed program was:" >&5
11919   cat conftest.$ac_ext >&5
11920   rm -rf conftest*
11921   eval "ac_cv_lib_$ac_lib_var=no"
11922 fi
11923 rm -f conftest*
11924 LIBS="$ac_save_LIBS"
11925
11926 fi
11927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11928   echo "$ac_t""yes" 1>&6
11929   LIBS="$LIBS -lgssapi_krb5";
11930         cat >> confdefs.h <<\EOF
11931 #define HAVE_GSSAPI 1
11932 EOF
11933
11934 else
11935   echo "$ac_t""no" 1>&6
11936 fi
11937
11938
11939 ##################################################################
11940 # we might need the lber lib on some systems. To avoid link errors
11941 # this test must be before the libldap test
11942 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11943 echo "configure:11944: checking for ber_scanf in -llber" >&5
11944 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11946   echo $ac_n "(cached) $ac_c" 1>&6
11947 else
11948   ac_save_LIBS="$LIBS"
11949 LIBS="-llber  $LIBS"
11950 cat > conftest.$ac_ext <<EOF
11951 #line 11952 "configure"
11952 #include "confdefs.h"
11953 /* Override any gcc2 internal prototype to avoid an error.  */
11954 /* We use char because int might match the return type of a gcc2
11955     builtin and then its argument prototype would still apply.  */
11956 char ber_scanf();
11957
11958 int main() {
11959 ber_scanf()
11960 ; return 0; }
11961 EOF
11962 if { (eval echo configure:11963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11963   rm -rf conftest*
11964   eval "ac_cv_lib_$ac_lib_var=yes"
11965 else
11966   echo "configure: failed program was:" >&5
11967   cat conftest.$ac_ext >&5
11968   rm -rf conftest*
11969   eval "ac_cv_lib_$ac_lib_var=no"
11970 fi
11971 rm -f conftest*
11972 LIBS="$ac_save_LIBS"
11973
11974 fi
11975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11976   echo "$ac_t""yes" 1>&6
11977   LIBS="$LIBS -llber"
11978 else
11979   echo "$ac_t""no" 1>&6
11980 fi
11981
11982
11983 ########################################################
11984 # now see if we can find the ldap libs in standard paths
11985 if test x$have_ldap != xyes; then
11986 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
11987 echo "configure:11988: checking for ldap_domain2hostlist in -lldap" >&5
11988 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
11989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11990   echo $ac_n "(cached) $ac_c" 1>&6
11991 else
11992   ac_save_LIBS="$LIBS"
11993 LIBS="-lldap  $LIBS"
11994 cat > conftest.$ac_ext <<EOF
11995 #line 11996 "configure"
11996 #include "confdefs.h"
11997 /* Override any gcc2 internal prototype to avoid an error.  */
11998 /* We use char because int might match the return type of a gcc2
11999     builtin and then its argument prototype would still apply.  */
12000 char ldap_domain2hostlist();
12001
12002 int main() {
12003 ldap_domain2hostlist()
12004 ; return 0; }
12005 EOF
12006 if { (eval echo configure:12007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12007   rm -rf conftest*
12008   eval "ac_cv_lib_$ac_lib_var=yes"
12009 else
12010   echo "configure: failed program was:" >&5
12011   cat conftest.$ac_ext >&5
12012   rm -rf conftest*
12013   eval "ac_cv_lib_$ac_lib_var=no"
12014 fi
12015 rm -f conftest*
12016 LIBS="$ac_save_LIBS"
12017
12018 fi
12019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12020   echo "$ac_t""yes" 1>&6
12021   LIBS="$LIBS -lldap";
12022         cat >> confdefs.h <<\EOF
12023 #define HAVE_LDAP 1
12024 EOF
12025
12026 else
12027   echo "$ac_t""no" 1>&6
12028 fi
12029
12030 fi
12031
12032 #################################################
12033 # check for automount support
12034 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12035 echo "configure:12036: checking whether to use AUTOMOUNT" >&5
12036 # Check whether --with-automount or --without-automount was given.
12037 if test "${with_automount+set}" = set; then
12038   withval="$with_automount"
12039    case "$withval" in
12040   yes)
12041     echo "$ac_t""yes" 1>&6
12042     cat >> confdefs.h <<\EOF
12043 #define WITH_AUTOMOUNT 1
12044 EOF
12045
12046     ;;
12047   *)
12048     echo "$ac_t""no" 1>&6
12049     ;;
12050   esac 
12051 else
12052   echo "$ac_t""no" 1>&6
12053
12054 fi
12055
12056
12057 #################################################
12058 # check for smbmount support
12059 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12060 echo "configure:12061: checking whether to use SMBMOUNT" >&5
12061 # Check whether --with-smbmount or --without-smbmount was given.
12062 if test "${with_smbmount+set}" = set; then
12063   withval="$with_smbmount"
12064    case "$withval" in
12065   yes)
12066         case "$host_os" in
12067         *linux*)
12068                 echo "$ac_t""yes" 1>&6
12069                 cat >> confdefs.h <<\EOF
12070 #define WITH_SMBMOUNT 1
12071 EOF
12072
12073                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12074                 ;;
12075         *)
12076                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12077                 ;;
12078         esac
12079     ;;
12080   *)
12081     echo "$ac_t""no" 1>&6
12082     MPROGS=
12083     ;;
12084   esac 
12085 else
12086   echo "$ac_t""no" 1>&6
12087   MPROGS=
12088
12089 fi
12090
12091
12092
12093 #################################################
12094 # check for a PAM clear-text auth, accounts, password and session support
12095 with_pam_for_crypt=no
12096 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12097 echo "configure:12098: checking whether to use PAM" >&5
12098 # Check whether --with-pam or --without-pam was given.
12099 if test "${with_pam+set}" = set; then
12100   withval="$with_pam"
12101    case "$withval" in
12102   yes)
12103     echo "$ac_t""yes" 1>&6
12104     cat >> confdefs.h <<\EOF
12105 #define WITH_PAM 1
12106 EOF
12107
12108     LIBS="$LIBS -lpam"
12109     with_pam_for_crypt=yes
12110     ;;
12111   *)
12112     echo "$ac_t""no" 1>&6
12113     ;;
12114   esac 
12115 else
12116   echo "$ac_t""no" 1>&6
12117
12118 fi
12119
12120
12121 # we can't build a pam module if we don't have pam.
12122 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12123 echo "configure:12124: checking for pam_get_data in -lpam" >&5
12124 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12125 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12126   echo $ac_n "(cached) $ac_c" 1>&6
12127 else
12128   ac_save_LIBS="$LIBS"
12129 LIBS="-lpam  $LIBS"
12130 cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 /* Override any gcc2 internal prototype to avoid an error.  */
12134 /* We use char because int might match the return type of a gcc2
12135     builtin and then its argument prototype would still apply.  */
12136 char pam_get_data();
12137
12138 int main() {
12139 pam_get_data()
12140 ; return 0; }
12141 EOF
12142 if { (eval echo configure:12143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12143   rm -rf conftest*
12144   eval "ac_cv_lib_$ac_lib_var=yes"
12145 else
12146   echo "configure: failed program was:" >&5
12147   cat conftest.$ac_ext >&5
12148   rm -rf conftest*
12149   eval "ac_cv_lib_$ac_lib_var=no"
12150 fi
12151 rm -f conftest*
12152 LIBS="$ac_save_LIBS"
12153
12154 fi
12155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12156   echo "$ac_t""yes" 1>&6
12157   cat >> confdefs.h <<\EOF
12158 #define HAVE_LIBPAM 1
12159 EOF
12160
12161 else
12162   echo "$ac_t""no" 1>&6
12163 fi
12164
12165
12166 #################################################
12167 # check for pam_smbpass support
12168 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12169 echo "configure:12170: checking whether to use pam_smbpass" >&5
12170 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12171 if test "${with_pam_smbpass+set}" = set; then
12172   withval="$with_pam_smbpass"
12173    case "$withval" in
12174   yes)
12175     echo "$ac_t""yes" 1>&6
12176
12177 # Conditions under which pam_smbpass should not be built.
12178
12179        if test x$PICFLAG = x; then
12180           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12181           PAM_MOD=""
12182        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12183           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12184           PAM_MOD=""
12185        else
12186           PAM_MOD="bin/pam_smbpass.so"
12187        fi
12188     ;;
12189   *)
12190     echo "$ac_t""no" 1>&6
12191     ;;
12192   esac 
12193 else
12194   echo "$ac_t""no" 1>&6
12195
12196 fi
12197
12198
12199
12200 ###############################################
12201 # test for where we get crypt() from, but only
12202 # if not using PAM
12203 if test $with_pam_for_crypt = no; then
12204 for ac_func in crypt
12205 do
12206 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12207 echo "configure:12208: checking for $ac_func" >&5
12208 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12209   echo $ac_n "(cached) $ac_c" 1>&6
12210 else
12211   cat > conftest.$ac_ext <<EOF
12212 #line 12213 "configure"
12213 #include "confdefs.h"
12214 /* System header to define __stub macros and hopefully few prototypes,
12215     which can conflict with char $ac_func(); below.  */
12216 #include <assert.h>
12217 /* Override any gcc2 internal prototype to avoid an error.  */
12218 /* We use char because int might match the return type of a gcc2
12219     builtin and then its argument prototype would still apply.  */
12220 char $ac_func();
12221
12222 int main() {
12223
12224 /* The GNU C library defines this for functions which it implements
12225     to always fail with ENOSYS.  Some functions are actually named
12226     something starting with __ and the normal name is an alias.  */
12227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12228 choke me
12229 #else
12230 $ac_func();
12231 #endif
12232
12233 ; return 0; }
12234 EOF
12235 if { (eval echo configure:12236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12236   rm -rf conftest*
12237   eval "ac_cv_func_$ac_func=yes"
12238 else
12239   echo "configure: failed program was:" >&5
12240   cat conftest.$ac_ext >&5
12241   rm -rf conftest*
12242   eval "ac_cv_func_$ac_func=no"
12243 fi
12244 rm -f conftest*
12245 fi
12246
12247 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12248   echo "$ac_t""yes" 1>&6
12249     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12250   cat >> confdefs.h <<EOF
12251 #define $ac_tr_func 1
12252 EOF
12253  
12254 else
12255   echo "$ac_t""no" 1>&6
12256 fi
12257 done
12258
12259 if test x"$ac_cv_func_crypt" = x"no"; then
12260     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12261 echo "configure:12262: checking for crypt in -lcrypt" >&5
12262 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12263 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12264   echo $ac_n "(cached) $ac_c" 1>&6
12265 else
12266   ac_save_LIBS="$LIBS"
12267 LIBS="-lcrypt  $LIBS"
12268 cat > conftest.$ac_ext <<EOF
12269 #line 12270 "configure"
12270 #include "confdefs.h"
12271 /* Override any gcc2 internal prototype to avoid an error.  */
12272 /* We use char because int might match the return type of a gcc2
12273     builtin and then its argument prototype would still apply.  */
12274 char crypt();
12275
12276 int main() {
12277 crypt()
12278 ; return 0; }
12279 EOF
12280 if { (eval echo configure:12281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12281   rm -rf conftest*
12282   eval "ac_cv_lib_$ac_lib_var=yes"
12283 else
12284   echo "configure: failed program was:" >&5
12285   cat conftest.$ac_ext >&5
12286   rm -rf conftest*
12287   eval "ac_cv_lib_$ac_lib_var=no"
12288 fi
12289 rm -f conftest*
12290 LIBS="$ac_save_LIBS"
12291
12292 fi
12293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12294   echo "$ac_t""yes" 1>&6
12295   LIBS="$LIBS -lcrypt";
12296         cat >> confdefs.h <<\EOF
12297 #define HAVE_CRYPT 1
12298 EOF
12299
12300 else
12301   echo "$ac_t""no" 1>&6
12302 fi
12303
12304 fi
12305 fi
12306
12307 ##
12308 ## moved after the check for -lcrypt in order to
12309 ## ensure that the necessary libraries are included
12310 ## check checking for truncated salt.  Wrapped by the
12311 ## $with_pam_for_crypt variable as above   --jerry
12312 ##
12313 if test $with_pam_for_crypt = no; then
12314 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12315 echo "configure:12316: checking for a crypt that needs truncated salt" >&5
12316 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12317   echo $ac_n "(cached) $ac_c" 1>&6
12318 else
12319   
12320 if test "$cross_compiling" = yes; then
12321   samba_cv_HAVE_TRUNCATED_SALT=cross
12322 else
12323   cat > conftest.$ac_ext <<EOF
12324 #line 12325 "configure"
12325 #include "confdefs.h"
12326 #include "${srcdir-.}/tests/crypttest.c"
12327 EOF
12328 if { (eval echo configure:12329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12329 then
12330   samba_cv_HAVE_TRUNCATED_SALT=no
12331 else
12332   echo "configure: failed program was:" >&5
12333   cat conftest.$ac_ext >&5
12334   rm -fr conftest*
12335   samba_cv_HAVE_TRUNCATED_SALT=yes
12336 fi
12337 rm -fr conftest*
12338 fi
12339
12340 fi
12341
12342 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12343 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12344         cat >> confdefs.h <<\EOF
12345 #define HAVE_TRUNCATED_SALT 1
12346 EOF
12347
12348 fi
12349 fi
12350
12351
12352
12353 ########################################################################################
12354 ##
12355 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12356 ##
12357 ########################################################################################
12358
12359 #################################################
12360 # check for a TDB password database
12361 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12362 echo "configure:12363: checking whether to use TDB SAM database" >&5
12363 # Check whether --with-tdbsam or --without-tdbsam was given.
12364 if test "${with_tdbsam+set}" = set; then
12365   withval="$with_tdbsam"
12366    case "$withval" in
12367   yes)
12368     echo "$ac_t""yes" 1>&6
12369     cat >> confdefs.h <<\EOF
12370 #define WITH_TDB_SAM 1
12371 EOF
12372
12373     ;;
12374   *)
12375     echo "$ac_t""no" 1>&6
12376     ;;
12377   esac 
12378 else
12379   echo "$ac_t""no" 1>&6
12380
12381 fi
12382
12383
12384 #################################################
12385 # check for a LDAP password database
12386 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12387 echo "configure:12388: checking whether to use LDAP SAM database" >&5
12388 # Check whether --with-ldapsam or --without-ldapsam was given.
12389 if test "${with_ldapsam+set}" = set; then
12390   withval="$with_ldapsam"
12391    case "$withval" in
12392   yes)
12393     echo "$ac_t""yes" 1>&6
12394     cat >> confdefs.h <<\EOF
12395 #define WITH_LDAP_SAM 1
12396 EOF
12397
12398     LIBS="-lldap -llber $LIBS"
12399     ;;
12400   *)
12401     echo "$ac_t""no" 1>&6
12402     ;;
12403   esac 
12404 else
12405   echo "$ac_t""no" 1>&6
12406
12407 fi
12408
12409
12410 #################################################
12411 # check for a NISPLUS password database
12412 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12413 echo "configure:12414: checking whether to use NISPLUS SAM database" >&5
12414 # Check whether --with-nisplussam or --without-nisplussam was given.
12415 if test "${with_nisplussam+set}" = set; then
12416   withval="$with_nisplussam"
12417    case "$withval" in
12418   yes)
12419     echo "$ac_t""yes" 1>&6
12420     cat >> confdefs.h <<\EOF
12421 #define WITH_NISPLUS_SAM 1
12422 EOF
12423
12424     ;;
12425   *)
12426     echo "$ac_t""no" 1>&6
12427     ;;
12428   esac 
12429 else
12430   echo "$ac_t""no" 1>&6
12431
12432 fi
12433
12434
12435 ########################################################################################
12436 ##
12437 ## END OF TESTS FOR SAM BACKENDS.  
12438 ##
12439 ########################################################################################
12440
12441 #################################################
12442 # check for a NISPLUS_HOME support 
12443 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12444 echo "configure:12445: checking whether to use NISPLUS_HOME" >&5
12445 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12446 if test "${with_nisplus_home+set}" = set; then
12447   withval="$with_nisplus_home"
12448    case "$withval" in
12449   yes)
12450     echo "$ac_t""yes" 1>&6
12451     cat >> confdefs.h <<\EOF
12452 #define WITH_NISPLUS_HOME 1
12453 EOF
12454
12455     ;;
12456   *)
12457     echo "$ac_t""no" 1>&6
12458     ;;
12459   esac 
12460 else
12461   echo "$ac_t""no" 1>&6
12462
12463 fi
12464
12465
12466 #################################################
12467 # check for the secure socket layer
12468 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12469 echo "configure:12470: checking whether to use SSL" >&5
12470 # Check whether --with-ssl or --without-ssl was given.
12471 if test "${with_ssl+set}" = set; then
12472   withval="$with_ssl"
12473    case "$withval" in
12474   yes)
12475     echo "$ac_t""yes" 1>&6
12476     cat >> confdefs.h <<\EOF
12477 #define WITH_SSL 1
12478 EOF
12479
12480     withval="/usr/local/ssl"     # default
12481
12482     if test "${with_sslinc+set}" = set; then
12483
12484         withval="$with_sslinc"
12485         case "$withval" in
12486         yes|no)
12487           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12488           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12489         ;;
12490         * )
12491           CFLAGS="-I${withval} $CFLAGS"
12492         ;;
12493         esac
12494
12495     else
12496
12497         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12498
12499     fi
12500
12501     if test "${with_ssllib+set}" = set; then
12502
12503         withval="$with_ssllib"
12504         case "$withval" in
12505         yes|no)
12506           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12507           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12508         ;;
12509         * )
12510           LDFLAGS="-L${withval}/lib $LDFLAGS"
12511         ;;
12512         esac
12513
12514     else
12515
12516         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12517
12518     fi
12519
12520     LIBS="-lssl -lcrypto $LIBS"
12521
12522 #    if test ! -d ${withval}; then
12523 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12524 #      exit 1
12525 #    fi 
12526
12527     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12528
12529     ;;
12530   *)
12531     echo "$ac_t""no" 1>&6
12532     ;;
12533   esac 
12534 else
12535   echo "$ac_t""no" 1>&6
12536
12537 fi
12538
12539
12540 #################################################
12541 # check for syslog logging
12542 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12543 echo "configure:12544: checking whether to use syslog logging" >&5
12544 # Check whether --with-syslog or --without-syslog was given.
12545 if test "${with_syslog+set}" = set; then
12546   withval="$with_syslog"
12547    case "$withval" in
12548   yes)
12549     echo "$ac_t""yes" 1>&6
12550     cat >> confdefs.h <<\EOF
12551 #define WITH_SYSLOG 1
12552 EOF
12553
12554     ;;
12555   *)
12556     echo "$ac_t""no" 1>&6
12557     ;;
12558   esac 
12559 else
12560   echo "$ac_t""no" 1>&6
12561
12562 fi
12563
12564
12565 #################################################
12566 # check for a shared memory profiling support
12567 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12568 echo "configure:12569: checking whether to use profiling" >&5
12569 # Check whether --with-profiling-data or --without-profiling-data was given.
12570 if test "${with_profiling_data+set}" = set; then
12571   withval="$with_profiling_data"
12572    case "$withval" in
12573   yes)
12574     echo "$ac_t""yes" 1>&6
12575     cat >> confdefs.h <<\EOF
12576 #define WITH_PROFILE 1
12577 EOF
12578
12579     ;;
12580   *)
12581     echo "$ac_t""no" 1>&6
12582     ;;
12583   esac 
12584 else
12585   echo "$ac_t""no" 1>&6
12586
12587 fi
12588
12589
12590
12591 #################################################
12592 # check for experimental disk-quotas support
12593 QUOTAOBJS=smbd/noquotas.o
12594
12595 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12596 echo "configure:12597: checking whether to support disk-quotas" >&5
12597 # Check whether --with-quotas or --without-quotas was given.
12598 if test "${with_quotas+set}" = set; then
12599   withval="$with_quotas"
12600    case "$withval" in
12601   yes)
12602     echo "$ac_t""yes" 1>&6
12603     case "$host_os" in
12604       *linux*)
12605         # Check for kernel 2.4.x quota braindamage...
12606         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12607 echo "configure:12608: checking for linux 2.4.x quota braindamage.." >&5
12608 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12609   echo $ac_n "(cached) $ac_c" 1>&6
12610 else
12611   
12612         cat > conftest.$ac_ext <<EOF
12613 #line 12614 "configure"
12614 #include "confdefs.h"
12615 #include <stdio.h>
12616 #include <sys/types.h>
12617 #include <asm/types.h>
12618 #include <linux/quota.h>
12619 #include <mntent.h>
12620 #include <linux/unistd.h>
12621 int main() {
12622 struct mem_dqblk D;
12623 ; return 0; }
12624 EOF
12625 if { (eval echo configure:12626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12626   rm -rf conftest*
12627   samba_cv_linux_2_4_quota_braindamage=yes
12628 else
12629   echo "configure: failed program was:" >&5
12630   cat conftest.$ac_ext >&5
12631   rm -rf conftest*
12632   samba_cv_linux_2_4_quota_braindamage=no
12633 fi
12634 rm -f conftest*
12635 fi
12636
12637 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12638 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12639         cat >> confdefs.h <<\EOF
12640 #define LINUX_QUOTAS_2 1
12641 EOF
12642
12643 else
12644         cat >> confdefs.h <<\EOF
12645 #define LINUX_QUOTAS_1 1
12646 EOF
12647
12648 fi
12649         ;;
12650       *)
12651         ;;
12652     esac
12653     QUOTAOBJS=smbd/quotas.o
12654     cat >> confdefs.h <<\EOF
12655 #define WITH_QUOTAS 1
12656 EOF
12657
12658     ;;
12659   *)
12660     echo "$ac_t""no" 1>&6
12661     ;;
12662   esac 
12663 else
12664   echo "$ac_t""no" 1>&6
12665
12666 fi
12667
12668
12669
12670 #################################################
12671 # check for experimental utmp accounting
12672
12673 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12674 echo "configure:12675: checking whether to support utmp accounting" >&5
12675 # Check whether --with-utmp or --without-utmp was given.
12676 if test "${with_utmp+set}" = set; then
12677   withval="$with_utmp"
12678    case "$withval" in
12679   yes)
12680     echo "$ac_t""yes" 1>&6
12681     cat >> confdefs.h <<\EOF
12682 #define WITH_UTMP 1
12683 EOF
12684
12685     ;;
12686   *)
12687     echo "$ac_t""no" 1>&6
12688     ;;
12689   esac 
12690 else
12691   echo "$ac_t""no" 1>&6
12692
12693 fi
12694
12695
12696 #################################################
12697 # set private directory location
12698 # Check whether --with-privatedir or --without-privatedir was given.
12699 if test "${with_privatedir+set}" = set; then
12700   withval="$with_privatedir"
12701    case "$withval" in
12702   yes|no)
12703   #
12704   # Just in case anybody calls it without argument
12705   #
12706     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12707     privatedir='${prefix}/private'
12708   ;;
12709   * )
12710     privatedir="$withval"
12711     ;;
12712   esac
12713   
12714 else
12715   privatedir='${prefix}/private'
12716    
12717
12718 fi
12719
12720
12721 #################################################
12722 # set lock directory location
12723 # Check whether --with-lockdir or --without-lockdir was given.
12724 if test "${with_lockdir+set}" = set; then
12725   withval="$with_lockdir"
12726    case "$withval" in
12727   yes|no)
12728   #
12729   # Just in case anybody calls it without argument
12730   #
12731     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12732     lockdir='$(VARDIR)/locks'
12733   ;;
12734   * )
12735     lockdir="$withval"
12736     ;;
12737   esac
12738   
12739 else
12740   lockdir='$(VARDIR)/locks'
12741    
12742
12743 fi
12744
12745
12746 #################################################
12747 # set SWAT directory location
12748 # Check whether --with-swatdir or --without-swatdir was given.
12749 if test "${with_swatdir+set}" = set; then
12750   withval="$with_swatdir"
12751    case "$withval" in
12752   yes|no)
12753   #
12754   # Just in case anybody does it
12755   #
12756     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12757     swatdir='${prefix}/swat'
12758   ;;
12759   * )
12760     swatdir="$withval"
12761     ;;
12762   esac
12763   
12764 else
12765   swatdir='${prefix}/swat'
12766    
12767
12768 fi
12769
12770
12771 #################################################
12772 # choose native language(s) of man pages
12773 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12774 echo "configure:12775: checking chosen man pages' language(s)" >&5
12775 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12776 if test "${with_manpages_langs+set}" = set; then
12777   withval="$with_manpages_langs"
12778    case "$withval" in
12779   yes|no)
12780     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12781     manlangs="en"
12782   ;;
12783   *)
12784     manlangs="$withval"
12785   ;;
12786   esac
12787
12788   echo "$ac_t""$manlangs" 1>&6
12789   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12790   
12791 else
12792   manlangs="en"
12793   echo "$ac_t""$manlangs" 1>&6
12794   
12795
12796 fi
12797
12798
12799 #################################################
12800 # these tests are taken from the GNU fileutils package
12801 echo "checking how to get filesystem space usage" 1>&6
12802 echo "configure:12803: checking how to get filesystem space usage" >&5
12803 space=no
12804
12805 # Test for statvfs64.
12806 if test $space = no; then
12807   # SVR4
12808   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12809 echo "configure:12810: checking statvfs64 function (SVR4)" >&5
12810 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12811   echo $ac_n "(cached) $ac_c" 1>&6
12812 else
12813   if test "$cross_compiling" = yes; then
12814   fu_cv_sys_stat_statvfs64=cross
12815 else
12816   cat > conftest.$ac_ext <<EOF
12817 #line 12818 "configure"
12818 #include "confdefs.h"
12819
12820 #if defined(HAVE_UNISTD_H)
12821 #include <unistd.h>
12822 #endif
12823 #include <sys/types.h>
12824 #include <sys/statvfs.h>
12825   main ()
12826   {
12827     struct statvfs64 fsd;
12828     exit (statvfs64 (".", &fsd));
12829   }
12830 EOF
12831 if { (eval echo configure:12832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12832 then
12833   fu_cv_sys_stat_statvfs64=yes
12834 else
12835   echo "configure: failed program was:" >&5
12836   cat conftest.$ac_ext >&5
12837   rm -fr conftest*
12838   fu_cv_sys_stat_statvfs64=no
12839 fi
12840 rm -fr conftest*
12841 fi
12842
12843 fi
12844
12845 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12846   if test $fu_cv_sys_stat_statvfs64 = yes; then
12847     space=yes
12848     cat >> confdefs.h <<\EOF
12849 #define STAT_STATVFS64 1
12850 EOF
12851
12852   fi
12853 fi
12854
12855 # Perform only the link test since it seems there are no variants of the
12856 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12857 # because that got a false positive on SCO OSR5.  Adding the declaration
12858 # of a `struct statvfs' causes this test to fail (as it should) on such
12859 # systems.  That system is reported to work fine with STAT_STATFS4 which
12860 # is what it gets when this test fails.
12861 if test $space = no; then
12862   # SVR4
12863   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12864 echo "configure:12865: checking statvfs function (SVR4)" >&5
12865 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12866   echo $ac_n "(cached) $ac_c" 1>&6
12867 else
12868   cat > conftest.$ac_ext <<EOF
12869 #line 12870 "configure"
12870 #include "confdefs.h"
12871 #include <sys/types.h>
12872 #include <sys/statvfs.h>
12873 int main() {
12874 struct statvfs fsd; statvfs (0, &fsd);
12875 ; return 0; }
12876 EOF
12877 if { (eval echo configure:12878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12878   rm -rf conftest*
12879   fu_cv_sys_stat_statvfs=yes
12880 else
12881   echo "configure: failed program was:" >&5
12882   cat conftest.$ac_ext >&5
12883   rm -rf conftest*
12884   fu_cv_sys_stat_statvfs=no
12885 fi
12886 rm -f conftest*
12887 fi
12888
12889 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12890   if test $fu_cv_sys_stat_statvfs = yes; then
12891     space=yes
12892     cat >> confdefs.h <<\EOF
12893 #define STAT_STATVFS 1
12894 EOF
12895
12896   fi
12897 fi
12898
12899 if test $space = no; then
12900   # DEC Alpha running OSF/1
12901   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12902 echo "configure:12903: checking for 3-argument statfs function (DEC OSF/1)" >&5
12903   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12904   echo $ac_n "(cached) $ac_c" 1>&6
12905 else
12906   if test "$cross_compiling" = yes; then
12907   fu_cv_sys_stat_statfs3_osf1=no
12908 else
12909   cat > conftest.$ac_ext <<EOF
12910 #line 12911 "configure"
12911 #include "confdefs.h"
12912
12913 #include <sys/param.h>
12914 #include <sys/types.h>
12915 #include <sys/mount.h>
12916   main ()
12917   {
12918     struct statfs fsd;
12919     fsd.f_fsize = 0;
12920     exit (statfs (".", &fsd, sizeof (struct statfs)));
12921   }
12922 EOF
12923 if { (eval echo configure:12924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12924 then
12925   fu_cv_sys_stat_statfs3_osf1=yes
12926 else
12927   echo "configure: failed program was:" >&5
12928   cat conftest.$ac_ext >&5
12929   rm -fr conftest*
12930   fu_cv_sys_stat_statfs3_osf1=no
12931 fi
12932 rm -fr conftest*
12933 fi
12934
12935 fi
12936
12937   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12938   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12939     space=yes
12940     cat >> confdefs.h <<\EOF
12941 #define STAT_STATFS3_OSF1 1
12942 EOF
12943
12944   fi
12945 fi
12946
12947 if test $space = no; then
12948 # AIX
12949   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12950 echo "configure:12951: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12951   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12952   echo $ac_n "(cached) $ac_c" 1>&6
12953 else
12954   if test "$cross_compiling" = yes; then
12955   fu_cv_sys_stat_statfs2_bsize=no
12956 else
12957   cat > conftest.$ac_ext <<EOF
12958 #line 12959 "configure"
12959 #include "confdefs.h"
12960
12961 #ifdef HAVE_SYS_PARAM_H
12962 #include <sys/param.h>
12963 #endif
12964 #ifdef HAVE_SYS_MOUNT_H
12965 #include <sys/mount.h>
12966 #endif
12967 #ifdef HAVE_SYS_VFS_H
12968 #include <sys/vfs.h>
12969 #endif
12970   main ()
12971   {
12972   struct statfs fsd;
12973   fsd.f_bsize = 0;
12974   exit (statfs (".", &fsd));
12975   }
12976 EOF
12977 if { (eval echo configure:12978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12978 then
12979   fu_cv_sys_stat_statfs2_bsize=yes
12980 else
12981   echo "configure: failed program was:" >&5
12982   cat conftest.$ac_ext >&5
12983   rm -fr conftest*
12984   fu_cv_sys_stat_statfs2_bsize=no
12985 fi
12986 rm -fr conftest*
12987 fi
12988
12989 fi
12990
12991   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12992   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12993     space=yes
12994     cat >> confdefs.h <<\EOF
12995 #define STAT_STATFS2_BSIZE 1
12996 EOF
12997
12998   fi
12999 fi
13000
13001 if test $space = no; then
13002 # SVR3
13003   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13004 echo "configure:13005: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13005   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13006   echo $ac_n "(cached) $ac_c" 1>&6
13007 else
13008   if test "$cross_compiling" = yes; then
13009   fu_cv_sys_stat_statfs4=no
13010 else
13011   cat > conftest.$ac_ext <<EOF
13012 #line 13013 "configure"
13013 #include "confdefs.h"
13014 #include <sys/types.h>
13015 #include <sys/statfs.h>
13016   main ()
13017   {
13018   struct statfs fsd;
13019   exit (statfs (".", &fsd, sizeof fsd, 0));
13020   }
13021 EOF
13022 if { (eval echo configure:13023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13023 then
13024   fu_cv_sys_stat_statfs4=yes
13025 else
13026   echo "configure: failed program was:" >&5
13027   cat conftest.$ac_ext >&5
13028   rm -fr conftest*
13029   fu_cv_sys_stat_statfs4=no
13030 fi
13031 rm -fr conftest*
13032 fi
13033
13034 fi
13035
13036   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13037   if test $fu_cv_sys_stat_statfs4 = yes; then
13038     space=yes
13039     cat >> confdefs.h <<\EOF
13040 #define STAT_STATFS4 1
13041 EOF
13042
13043   fi
13044 fi
13045
13046 if test $space = no; then
13047 # 4.4BSD and NetBSD
13048   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13049 echo "configure:13050: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13050   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13051   echo $ac_n "(cached) $ac_c" 1>&6
13052 else
13053   if test "$cross_compiling" = yes; then
13054   fu_cv_sys_stat_statfs2_fsize=no
13055 else
13056   cat > conftest.$ac_ext <<EOF
13057 #line 13058 "configure"
13058 #include "confdefs.h"
13059 #include <sys/types.h>
13060 #ifdef HAVE_SYS_PARAM_H
13061 #include <sys/param.h>
13062 #endif
13063 #ifdef HAVE_SYS_MOUNT_H
13064 #include <sys/mount.h>
13065 #endif
13066   main ()
13067   {
13068   struct statfs fsd;
13069   fsd.f_fsize = 0;
13070   exit (statfs (".", &fsd));
13071   }
13072 EOF
13073 if { (eval echo configure:13074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13074 then
13075   fu_cv_sys_stat_statfs2_fsize=yes
13076 else
13077   echo "configure: failed program was:" >&5
13078   cat conftest.$ac_ext >&5
13079   rm -fr conftest*
13080   fu_cv_sys_stat_statfs2_fsize=no
13081 fi
13082 rm -fr conftest*
13083 fi
13084
13085 fi
13086
13087   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13088   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13089     space=yes
13090     cat >> confdefs.h <<\EOF
13091 #define STAT_STATFS2_FSIZE 1
13092 EOF
13093
13094   fi
13095 fi
13096
13097 if test $space = no; then
13098   # Ultrix
13099   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13100 echo "configure:13101: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13101   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13102   echo $ac_n "(cached) $ac_c" 1>&6
13103 else
13104   if test "$cross_compiling" = yes; then
13105   fu_cv_sys_stat_fs_data=no
13106 else
13107   cat > conftest.$ac_ext <<EOF
13108 #line 13109 "configure"
13109 #include "confdefs.h"
13110 #include <sys/types.h>
13111 #ifdef HAVE_SYS_PARAM_H
13112 #include <sys/param.h>
13113 #endif
13114 #ifdef HAVE_SYS_MOUNT_H
13115 #include <sys/mount.h>
13116 #endif
13117 #ifdef HAVE_SYS_FS_TYPES_H
13118 #include <sys/fs_types.h>
13119 #endif
13120   main ()
13121   {
13122   struct fs_data fsd;
13123   /* Ultrix's statfs returns 1 for success,
13124      0 for not mounted, -1 for failure.  */
13125   exit (statfs (".", &fsd) != 1);
13126   }
13127 EOF
13128 if { (eval echo configure:13129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13129 then
13130   fu_cv_sys_stat_fs_data=yes
13131 else
13132   echo "configure: failed program was:" >&5
13133   cat conftest.$ac_ext >&5
13134   rm -fr conftest*
13135   fu_cv_sys_stat_fs_data=no
13136 fi
13137 rm -fr conftest*
13138 fi
13139
13140 fi
13141
13142   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13143   if test $fu_cv_sys_stat_fs_data = yes; then
13144     space=yes
13145     cat >> confdefs.h <<\EOF
13146 #define STAT_STATFS2_FS_DATA 1
13147 EOF
13148
13149   fi
13150 fi
13151
13152 #
13153 # As a gating factor for large file support, in order to
13154 # use <4GB files we must have the following minimal support
13155 # available.
13156 # long long, and a 64 bit off_t or off64_t.
13157 # If we don't have all of these then disable large
13158 # file support.
13159 #
13160 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13161 echo "configure:13162: checking if large file support can be enabled" >&5
13162 cat > conftest.$ac_ext <<EOF
13163 #line 13164 "configure"
13164 #include "confdefs.h"
13165
13166 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13167 #include <sys/types.h>
13168 #else
13169 __COMPILE_ERROR_
13170 #endif
13171
13172 int main() {
13173 int i
13174 ; return 0; }
13175 EOF
13176 if { (eval echo configure:13177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13177   rm -rf conftest*
13178   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13179 else
13180   echo "configure: failed program was:" >&5
13181   cat conftest.$ac_ext >&5
13182   rm -rf conftest*
13183   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13184 fi
13185 rm -f conftest*
13186 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13187     cat >> confdefs.h <<\EOF
13188 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13189 EOF
13190
13191 fi
13192 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13193
13194 # Check whether --with-spinlocks or --without-spinlocks was given.
13195 if test "${with_spinlocks+set}" = set; then
13196   withval="$with_spinlocks"
13197   :
13198 fi
13199
13200 if test "x$with_spinlocks" = "xyes"; then
13201     cat >> confdefs.h <<\EOF
13202 #define USE_SPINLOCKS 1
13203 EOF
13204
13205
13206     case "$host_cpu" in
13207         sparc)
13208             cat >> confdefs.h <<\EOF
13209 #define SPARC_SPINLOCKS 1
13210 EOF
13211
13212             ;;
13213
13214         i386|i486|i586|i686)
13215             cat >> confdefs.h <<\EOF
13216 #define INTEL_SPINLOCKS 1
13217 EOF
13218
13219             ;;
13220
13221         mips)
13222             cat >> confdefs.h <<\EOF
13223 #define MIPS_SPINLOCKS 1
13224 EOF
13225
13226             ;;
13227
13228         powerpc)
13229             cat >> confdefs.h <<\EOF
13230 #define POWERPC_SPINLOCKS 1
13231 EOF
13232
13233             ;;
13234     esac
13235 fi
13236
13237 #################################################
13238 # check for ACL support
13239
13240 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13241 echo "configure:13242: checking whether to support ACLs" >&5
13242 # Check whether --with-acl-support or --without-acl-support was given.
13243 if test "${with_acl_support+set}" = set; then
13244   withval="$with_acl_support"
13245    case "$withval" in
13246   yes)
13247
13248         case "$host_os" in
13249         *sysv5*)
13250                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13251                 cat >> confdefs.h <<\EOF
13252 #define HAVE_UNIXWARE_ACLS 1
13253 EOF
13254
13255                 ;;
13256         *solaris*)
13257                 echo "$ac_t""Using solaris ACLs" 1>&6
13258                 cat >> confdefs.h <<\EOF
13259 #define HAVE_SOLARIS_ACLS 1
13260 EOF
13261
13262                 ;;
13263         *hpux*)
13264                 echo "$ac_t""Using HPUX ACLs" 1>&6
13265                 cat >> confdefs.h <<\EOF
13266 #define HAVE_HPUX_ACLS 1
13267 EOF
13268
13269                 ;;
13270         *irix*)
13271                 echo "$ac_t""Using IRIX ACLs" 1>&6
13272                 cat >> confdefs.h <<\EOF
13273 #define HAVE_IRIX_ACLS 1
13274 EOF
13275
13276                 ;;
13277         *aix*)
13278                 echo "$ac_t""Using AIX ACLs" 1>&6
13279                 cat >> confdefs.h <<\EOF
13280 #define HAVE_AIX_ACLS 1
13281 EOF
13282
13283                 ;;
13284         *osf*)
13285                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13286                 cat >> confdefs.h <<\EOF
13287 #define HAVE_TRU64_ACLS 1
13288 EOF
13289
13290                 LIBS="$LIBS -lpacl"
13291                 ;;
13292         *)
13293                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13294 echo "configure:13295: checking for acl_get_file in -lacl" >&5
13295 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13296 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13297   echo $ac_n "(cached) $ac_c" 1>&6
13298 else
13299   ac_save_LIBS="$LIBS"
13300 LIBS="-lacl  $LIBS"
13301 cat > conftest.$ac_ext <<EOF
13302 #line 13303 "configure"
13303 #include "confdefs.h"
13304 /* Override any gcc2 internal prototype to avoid an error.  */
13305 /* We use char because int might match the return type of a gcc2
13306     builtin and then its argument prototype would still apply.  */
13307 char acl_get_file();
13308
13309 int main() {
13310 acl_get_file()
13311 ; return 0; }
13312 EOF
13313 if { (eval echo configure:13314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13314   rm -rf conftest*
13315   eval "ac_cv_lib_$ac_lib_var=yes"
13316 else
13317   echo "configure: failed program was:" >&5
13318   cat conftest.$ac_ext >&5
13319   rm -rf conftest*
13320   eval "ac_cv_lib_$ac_lib_var=no"
13321 fi
13322 rm -f conftest*
13323 LIBS="$ac_save_LIBS"
13324
13325 fi
13326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13327   echo "$ac_t""yes" 1>&6
13328     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13329     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13330   cat >> confdefs.h <<EOF
13331 #define $ac_tr_lib 1
13332 EOF
13333
13334   LIBS="-lacl $LIBS"
13335
13336 else
13337   echo "$ac_t""no" 1>&6
13338 fi
13339
13340                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13341 echo "configure:13342: checking for ACL support" >&5
13342 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13343   echo $ac_n "(cached) $ac_c" 1>&6
13344 else
13345   
13346                 cat > conftest.$ac_ext <<EOF
13347 #line 13348 "configure"
13348 #include "confdefs.h"
13349 #include <sys/types.h>
13350 #include <sys/acl.h>
13351 int main() {
13352  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13353 ; return 0; }
13354 EOF
13355 if { (eval echo configure:13356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13356   rm -rf conftest*
13357   samba_cv_HAVE_POSIX_ACLS=yes
13358 else
13359   echo "configure: failed program was:" >&5
13360   cat conftest.$ac_ext >&5
13361   rm -rf conftest*
13362   samba_cv_HAVE_POSIX_ACLS=no
13363 fi
13364 rm -f conftest*
13365 fi
13366
13367 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13368                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13369                                 echo "$ac_t""Using posix ACLs" 1>&6
13370                                 cat >> confdefs.h <<\EOF
13371 #define HAVE_POSIX_ACLS 1
13372 EOF
13373
13374                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13375 echo "configure:13376: checking for acl_get_perm_np" >&5
13376 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13377   echo $ac_n "(cached) $ac_c" 1>&6
13378 else
13379   
13380                                 cat > conftest.$ac_ext <<EOF
13381 #line 13382 "configure"
13382 #include "confdefs.h"
13383 #include <sys/types.h>
13384 #include <sys/acl.h>
13385 int main() {
13386  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13387 ; return 0; }
13388 EOF
13389 if { (eval echo configure:13390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13390   rm -rf conftest*
13391   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13392 else
13393   echo "configure: failed program was:" >&5
13394   cat conftest.$ac_ext >&5
13395   rm -rf conftest*
13396   samba_cv_HAVE_ACL_GET_PERM_NP=no
13397 fi
13398 rm -f conftest*
13399 fi
13400
13401 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13402                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13403                                         cat >> confdefs.h <<\EOF
13404 #define HAVE_ACL_GET_PERM_NP 1
13405 EOF
13406
13407                                 fi
13408                         fi
13409             ;;
13410         esac
13411         ;;
13412   *)
13413     echo "$ac_t""no" 1>&6
13414     cat >> confdefs.h <<\EOF
13415 #define HAVE_NO_ACLS 1
13416 EOF
13417
13418     ;;
13419   esac 
13420 else
13421   cat >> confdefs.h <<\EOF
13422 #define HAVE_NO_ACLS 1
13423 EOF
13424
13425   echo "$ac_t""no" 1>&6
13426
13427 fi
13428
13429
13430 #################################################
13431 # Check whether winbind is supported on this platform.  If so we need to
13432 # build and install client programs (WINBIND_TARGETS), sbin programs
13433 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13434
13435 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13436 echo "configure:13437: checking whether to build winbind" >&5
13437
13438 # Initially, the value of $host_os decides whether winbind is supported
13439
13440 case "$host_os" in
13441         *linux*|*irix*)
13442                 HAVE_WINBIND=yes
13443                 ;;
13444         *solaris*)
13445                 HAVE_WINBIND=yes
13446                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13447                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13448                 ;;
13449         *hpux11*)
13450                 HAVE_WINBIND=yes
13451                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13452                 ;;
13453         *)
13454                 HAVE_WINBIND=no
13455                 winbind_no_reason=", unsupported on $host_os"
13456                 ;;
13457 esac
13458
13459 # Check the setting of --with-winbindd
13460
13461 # Check whether --with-winbind or --without-winbind was given.
13462 if test "${with_winbind+set}" = set; then
13463   withval="$with_winbind"
13464    
13465   case "$withval" in
13466         yes)
13467                 HAVE_WINBIND=yes
13468                 ;;
13469         no)
13470                 HAVE_WINBIND=no
13471                 winbind_reason=""
13472                 ;;
13473   esac 
13474 fi
13475
13476
13477 # We need unix domain sockets for winbind
13478
13479 if test x"$HAVE_WINBIND" = x"yes"; then
13480         if test x"$samba_cv_unixsocket" = x"no"; then
13481                 winbind_no_reason=", no unix domain socket support on $host_os"
13482                 HAVE_WINBIND=no
13483         fi
13484 fi
13485
13486 # Display test results
13487
13488 WINBIND_TARGETS=""
13489 WINBIND_STARGETS=""
13490 WINBIND_LTARGETS=""
13491 WINBIND_PAM_PROGS=""
13492
13493 if test x"$HAVE_WINBIND" = x"yes"; then
13494         echo "$ac_t""yes" 1>&6
13495
13496         WINBIND_TARGETS="bin/wbinfo"
13497         WINBIND_STARGETS="bin/winbindd"
13498         if test x"$BLDSHARED" = x"true"; then
13499                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13500                 if test x"$with_pam" = x"yes"; then
13501                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13502                 fi
13503         fi
13504 else
13505         echo "$ac_t""no$winbind_no_reason" 1>&6
13506 fi
13507
13508 # Substitution time!
13509
13510
13511
13512
13513
13514
13515
13516
13517 #################################################
13518 # Check to see if we should use the included popt 
13519
13520 # Check whether --with-included-popt or --without-included-popt was given.
13521 if test "${with_included_popt+set}" = set; then
13522   withval="$with_included_popt"
13523    
13524   case "$withval" in
13525         yes)
13526                 INCLUDED_POPT=yes
13527                 ;;
13528         no)
13529                 INCLUDED_POPT=no
13530                 ;;
13531   esac 
13532 fi
13533
13534 if test x"$INCLUDED_POPT" != x"yes"; then
13535     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13536 echo "configure:13537: checking for poptGetContext in -lpopt" >&5
13537 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13538 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13539   echo $ac_n "(cached) $ac_c" 1>&6
13540 else
13541   ac_save_LIBS="$LIBS"
13542 LIBS="-lpopt  $LIBS"
13543 cat > conftest.$ac_ext <<EOF
13544 #line 13545 "configure"
13545 #include "confdefs.h"
13546 /* Override any gcc2 internal prototype to avoid an error.  */
13547 /* We use char because int might match the return type of a gcc2
13548     builtin and then its argument prototype would still apply.  */
13549 char poptGetContext();
13550
13551 int main() {
13552 poptGetContext()
13553 ; return 0; }
13554 EOF
13555 if { (eval echo configure:13556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13556   rm -rf conftest*
13557   eval "ac_cv_lib_$ac_lib_var=yes"
13558 else
13559   echo "configure: failed program was:" >&5
13560   cat conftest.$ac_ext >&5
13561   rm -rf conftest*
13562   eval "ac_cv_lib_$ac_lib_var=no"
13563 fi
13564 rm -f conftest*
13565 LIBS="$ac_save_LIBS"
13566
13567 fi
13568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13569   echo "$ac_t""yes" 1>&6
13570   INCLUDED_POPT=no
13571 else
13572   echo "$ac_t""no" 1>&6
13573 INCLUDED_POPT=yes
13574 fi
13575
13576 fi
13577
13578 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13579 echo "configure:13580: checking whether to use included popt" >&5
13580 if test x"$INCLUDED_POPT" = x"yes"; then
13581     echo "$ac_t""$srcdir/popt" 1>&6
13582     BUILD_POPT='$(POPT_OBJS)'
13583     FLAGS1="-I$srcdir/popt"
13584 else
13585     echo "$ac_t""no" 1>&6
13586     LIBS="$LIBS -lpopt"
13587 fi
13588
13589
13590
13591 #################################################
13592 # do extra things if we are running insure
13593
13594 if test "${ac_cv_prog_CC}" = "insure"; then
13595         CPPFLAGS="$CPPFLAGS -D__INSURE__"
13596 fi
13597
13598 #################################################
13599 # final configure stuff
13600
13601 echo $ac_n "checking configure summary""... $ac_c" 1>&6
13602 echo "configure:13603: checking configure summary" >&5
13603 if test "$cross_compiling" = yes; then
13604   echo "configure: warning: cannot run when cross-compiling" 1>&2
13605 else
13606   cat > conftest.$ac_ext <<EOF
13607 #line 13608 "configure"
13608 #include "confdefs.h"
13609 #include "${srcdir-.}/tests/summary.c"
13610 EOF
13611 if { (eval echo configure:13612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13612 then
13613   echo "$ac_t""yes" 1>&6
13614 else
13615   echo "configure: failed program was:" >&5
13616   cat conftest.$ac_ext >&5
13617   rm -fr conftest*
13618   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
13619 fi
13620 rm -fr conftest*
13621 fi
13622
13623
13624 builddir=`pwd`
13625
13626
13627 trap '' 1 2 15
13628 cat > confcache <<\EOF
13629 # This file is a shell script that caches the results of configure
13630 # tests run on this system so they can be shared between configure
13631 # scripts and configure runs.  It is not useful on other systems.
13632 # If it contains results you don't want to keep, you may remove or edit it.
13633 #
13634 # By default, configure uses ./config.cache as the cache file,
13635 # creating it if it does not exist already.  You can give configure
13636 # the --cache-file=FILE option to use a different cache file; that is
13637 # what configure does when it calls configure scripts in
13638 # subdirectories, so they share the cache.
13639 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13640 # config.status only pays attention to the cache file if you give it the
13641 # --recheck option to rerun configure.
13642 #
13643 EOF
13644 # The following way of writing the cache mishandles newlines in values,
13645 # but we know of no workaround that is simple, portable, and efficient.
13646 # So, don't put newlines in cache variables' values.
13647 # Ultrix sh set writes to stderr and can't be redirected directly,
13648 # and sets the high bit in the cache file unless we assign to the vars.
13649 (set) 2>&1 |
13650   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13651   *ac_space=\ *)
13652     # `set' does not quote correctly, so add quotes (double-quote substitution
13653     # turns \\\\ into \\, and sed turns \\ into \).
13654     sed -n \
13655       -e "s/'/'\\\\''/g" \
13656       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13657     ;;
13658   *)
13659     # `set' quotes correctly as required by POSIX, so do not add quotes.
13660     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13661     ;;
13662   esac >> confcache
13663 if cmp -s $cache_file confcache; then
13664   :
13665 else
13666   if test -w $cache_file; then
13667     echo "updating cache $cache_file"
13668     cat confcache > $cache_file
13669   else
13670     echo "not updating unwritable cache $cache_file"
13671   fi
13672 fi
13673 rm -f confcache
13674
13675 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13676
13677 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13678 # Let make expand exec_prefix.
13679 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13680
13681 # Any assignment to VPATH causes Sun make to only execute
13682 # the first set of double-colon rules, so remove it if not needed.
13683 # If there is a colon in the path, we need to keep it.
13684 if test "x$srcdir" = x.; then
13685   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13686 fi
13687
13688 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13689
13690 DEFS=-DHAVE_CONFIG_H
13691
13692 # Without the "./", some shells look in PATH for config.status.
13693 : ${CONFIG_STATUS=./config.status}
13694
13695 echo creating $CONFIG_STATUS
13696 rm -f $CONFIG_STATUS
13697 cat > $CONFIG_STATUS <<EOF
13698 #! /bin/sh
13699 # Generated automatically by configure.
13700 # Run this file to recreate the current configuration.
13701 # This directory was configured as follows,
13702 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13703 #
13704 # $0 $ac_configure_args
13705 #
13706 # Compiler output produced by configure, useful for debugging
13707 # configure, is in ./config.log if it exists.
13708
13709 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13710 for ac_option
13711 do
13712   case "\$ac_option" in
13713   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13714     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13715     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13716   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13717     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13718     exit 0 ;;
13719   -help | --help | --hel | --he | --h)
13720     echo "\$ac_cs_usage"; exit 0 ;;
13721   *) echo "\$ac_cs_usage"; exit 1 ;;
13722   esac
13723 done
13724
13725 ac_given_srcdir=$srcdir
13726 ac_given_INSTALL="$INSTALL"
13727
13728 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13729 EOF
13730 cat >> $CONFIG_STATUS <<EOF
13731
13732 # Protect against being on the right side of a sed subst in config.status.
13733 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13734  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13735 $ac_vpsub
13736 $extrasub
13737 s%@SHELL@%$SHELL%g
13738 s%@CFLAGS@%$CFLAGS%g
13739 s%@CPPFLAGS@%$CPPFLAGS%g
13740 s%@CXXFLAGS@%$CXXFLAGS%g
13741 s%@FFLAGS@%$FFLAGS%g
13742 s%@DEFS@%$DEFS%g
13743 s%@LDFLAGS@%$LDFLAGS%g
13744 s%@LIBS@%$LIBS%g
13745 s%@exec_prefix@%$exec_prefix%g
13746 s%@prefix@%$prefix%g
13747 s%@program_transform_name@%$program_transform_name%g
13748 s%@bindir@%$bindir%g
13749 s%@sbindir@%$sbindir%g
13750 s%@libexecdir@%$libexecdir%g
13751 s%@datadir@%$datadir%g
13752 s%@sysconfdir@%$sysconfdir%g
13753 s%@sharedstatedir@%$sharedstatedir%g
13754 s%@localstatedir@%$localstatedir%g
13755 s%@libdir@%$libdir%g
13756 s%@includedir@%$includedir%g
13757 s%@oldincludedir@%$oldincludedir%g
13758 s%@infodir@%$infodir%g
13759 s%@mandir@%$mandir%g
13760 s%@RUNPROG@%$RUNPROG%g
13761 s%@MPROGS@%$MPROGS%g
13762 s%@LDSHFLAGS@%$LDSHFLAGS%g
13763 s%@SHLD@%$SHLD%g
13764 s%@HOST_OS@%$HOST_OS%g
13765 s%@PAM_MOD@%$PAM_MOD%g
13766 s%@WRAP@%$WRAP%g
13767 s%@WRAP32@%$WRAP32%g
13768 s%@PICFLAG@%$PICFLAG%g
13769 s%@PICSUFFIX@%$PICSUFFIX%g
13770 s%@POBAD_CC@%$POBAD_CC%g
13771 s%@SHLIBEXT@%$SHLIBEXT%g
13772 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13773 s%@CC@%$CC%g
13774 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13775 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13776 s%@INSTALL_DATA@%$INSTALL_DATA%g
13777 s%@AWK@%$AWK%g
13778 s%@BROKEN_CC@%$BROKEN_CC%g
13779 s%@host@%$host%g
13780 s%@host_alias@%$host_alias%g
13781 s%@host_cpu@%$host_cpu%g
13782 s%@host_vendor@%$host_vendor%g
13783 s%@host_os@%$host_os%g
13784 s%@target@%$target%g
13785 s%@target_alias@%$target_alias%g
13786 s%@target_cpu@%$target_cpu%g
13787 s%@target_vendor@%$target_vendor%g
13788 s%@target_os@%$target_os%g
13789 s%@build@%$build%g
13790 s%@build_alias@%$build_alias%g
13791 s%@build_cpu@%$build_cpu%g
13792 s%@build_vendor@%$build_vendor%g
13793 s%@build_os@%$build_os%g
13794 s%@CPP@%$CPP%g
13795 s%@LIBOBJS@%$LIBOBJS%g
13796 s%@TERMLIBS@%$TERMLIBS%g
13797 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13798 s%@ROFF@%$ROFF%g
13799 s%@DYNEXP@%$DYNEXP%g
13800 s%@QUOTAOBJS@%$QUOTAOBJS%g
13801 s%@privatedir@%$privatedir%g
13802 s%@lockdir@%$lockdir%g
13803 s%@swatdir@%$swatdir%g
13804 s%@manlangs@%$manlangs%g
13805 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13806 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13807 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13808 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13809 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
13810 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
13811 s%@BUILD_POPT@%$BUILD_POPT%g
13812 s%@FLAGS1@%$FLAGS1%g
13813 s%@builddir@%$builddir%g
13814
13815 CEOF
13816 EOF
13817
13818 cat >> $CONFIG_STATUS <<\EOF
13819
13820 # Split the substitutions into bite-sized pieces for seds with
13821 # small command number limits, like on Digital OSF/1 and HP-UX.
13822 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13823 ac_file=1 # Number of current file.
13824 ac_beg=1 # First line for current file.
13825 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13826 ac_more_lines=:
13827 ac_sed_cmds=""
13828 while $ac_more_lines; do
13829   if test $ac_beg -gt 1; then
13830     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13831   else
13832     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13833   fi
13834   if test ! -s conftest.s$ac_file; then
13835     ac_more_lines=false
13836     rm -f conftest.s$ac_file
13837   else
13838     if test -z "$ac_sed_cmds"; then
13839       ac_sed_cmds="sed -f conftest.s$ac_file"
13840     else
13841       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13842     fi
13843     ac_file=`expr $ac_file + 1`
13844     ac_beg=$ac_end
13845     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13846   fi
13847 done
13848 if test -z "$ac_sed_cmds"; then
13849   ac_sed_cmds=cat
13850 fi
13851 EOF
13852
13853 cat >> $CONFIG_STATUS <<EOF
13854
13855 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13856 EOF
13857 cat >> $CONFIG_STATUS <<\EOF
13858 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13859   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13860   case "$ac_file" in
13861   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13862        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13863   *) ac_file_in="${ac_file}.in" ;;
13864   esac
13865
13866   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13867
13868   # Remove last slash and all that follows it.  Not all systems have dirname.
13869   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13870   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13871     # The file is in a subdirectory.
13872     test ! -d "$ac_dir" && mkdir "$ac_dir"
13873     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13874     # A "../" for each directory in $ac_dir_suffix.
13875     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13876   else
13877     ac_dir_suffix= ac_dots=
13878   fi
13879
13880   case "$ac_given_srcdir" in
13881   .)  srcdir=.
13882       if test -z "$ac_dots"; then top_srcdir=.
13883       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13884   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13885   *) # Relative path.
13886     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13887     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13888   esac
13889
13890   case "$ac_given_INSTALL" in
13891   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13892   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13893   esac
13894
13895   echo creating "$ac_file"
13896   rm -f "$ac_file"
13897   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13898   case "$ac_file" in
13899   *Makefile*) ac_comsub="1i\\
13900 # $configure_input" ;;
13901   *) ac_comsub= ;;
13902   esac
13903
13904   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13905   sed -e "$ac_comsub
13906 s%@configure_input@%$configure_input%g
13907 s%@srcdir@%$srcdir%g
13908 s%@top_srcdir@%$top_srcdir%g
13909 s%@INSTALL@%$INSTALL%g
13910 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13911 fi; done
13912 rm -f conftest.s*
13913
13914 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13915 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13916 #
13917 # ac_d sets the value in "#define NAME VALUE" lines.
13918 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13919 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13920 ac_dC='\3'
13921 ac_dD='%g'
13922 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13923 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13924 ac_uB='\([      ]\)%\1#\2define\3'
13925 ac_uC=' '
13926 ac_uD='\4%g'
13927 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13928 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13929 ac_eB='$%\1#\2define\3'
13930 ac_eC=' '
13931 ac_eD='%g'
13932
13933 if test "${CONFIG_HEADERS+set}" != set; then
13934 EOF
13935 cat >> $CONFIG_STATUS <<EOF
13936   CONFIG_HEADERS="include/config.h"
13937 EOF
13938 cat >> $CONFIG_STATUS <<\EOF
13939 fi
13940 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13941   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13942   case "$ac_file" in
13943   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13944        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13945   *) ac_file_in="${ac_file}.in" ;;
13946   esac
13947
13948   echo creating $ac_file
13949
13950   rm -f conftest.frag conftest.in conftest.out
13951   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13952   cat $ac_file_inputs > conftest.in
13953
13954 EOF
13955
13956 # Transform confdefs.h into a sed script conftest.vals that substitutes
13957 # the proper values into config.h.in to produce config.h.  And first:
13958 # Protect against being on the right side of a sed subst in config.status.
13959 # Protect against being in an unquoted here document in config.status.
13960 rm -f conftest.vals
13961 cat > conftest.hdr <<\EOF
13962 s/[\\&%]/\\&/g
13963 s%[\\$`]%\\&%g
13964 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13965 s%ac_d%ac_u%gp
13966 s%ac_u%ac_e%gp
13967 EOF
13968 sed -n -f conftest.hdr confdefs.h > conftest.vals
13969 rm -f conftest.hdr
13970
13971 # This sed command replaces #undef with comments.  This is necessary, for
13972 # example, in the case of _POSIX_SOURCE, which is predefined and required
13973 # on some systems where configure will not decide to define it.
13974 cat >> conftest.vals <<\EOF
13975 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13976 EOF
13977
13978 # Break up conftest.vals because some shells have a limit on
13979 # the size of here documents, and old seds have small limits too.
13980
13981 rm -f conftest.tail
13982 while :
13983 do
13984   ac_lines=`grep -c . conftest.vals`
13985   # grep -c gives empty output for an empty file on some AIX systems.
13986   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13987   # Write a limited-size here document to conftest.frag.
13988   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13989   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13990   echo 'CEOF
13991   sed -f conftest.frag conftest.in > conftest.out
13992   rm -f conftest.in
13993   mv conftest.out conftest.in
13994 ' >> $CONFIG_STATUS
13995   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13996   rm -f conftest.vals
13997   mv conftest.tail conftest.vals
13998 done
13999 rm -f conftest.vals
14000
14001 cat >> $CONFIG_STATUS <<\EOF
14002   rm -f conftest.frag conftest.h
14003   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14004   cat conftest.in >> conftest.h
14005   rm -f conftest.in
14006   if cmp -s $ac_file conftest.h 2>/dev/null; then
14007     echo "$ac_file is unchanged"
14008     rm -f conftest.h
14009   else
14010     # Remove last slash and all that follows it.  Not all systems have dirname.
14011       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14012       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14013       # The file is in a subdirectory.
14014       test ! -d "$ac_dir" && mkdir "$ac_dir"
14015     fi
14016     rm -f $ac_file
14017     mv conftest.h $ac_file
14018   fi
14019 fi; done
14020
14021 EOF
14022 cat >> $CONFIG_STATUS <<EOF
14023
14024 EOF
14025 cat >> $CONFIG_STATUS <<\EOF
14026
14027 exit 0
14028 EOF
14029 chmod +x $CONFIG_STATUS
14030 rm -fr confdefs* $ac_clean_files
14031 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14032
14033
14034 #################################################
14035 # Print very concise instructions on building/use
14036 if test "x$enable_dmalloc" = xyes
14037 then
14038         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14039         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14040 fi