This is another *BIG* change...
[jra/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 #
1233 # Config CPPFLAG settings for strange OS's that must be set
1234 # before other tests.
1235 #
1236 case "$host_os" in
1237 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1238     *hpux*)
1239       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1240 echo "configure:1241: checking whether ${CC-cc} accepts -Ae" >&5
1241 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1242   echo $ac_n "(cached) $ac_c" 1>&6
1243 else
1244   echo 'void f(){}' > conftest.c
1245 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1246   ac_cv_prog_cc_Ae=yes
1247 else
1248   ac_cv_prog_cc_Ae=no
1249 fi
1250 rm -f conftest*
1251
1252 fi
1253
1254 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1255       # mmap on HPUX is completely broken...
1256       cat >> confdefs.h <<\EOF
1257 #define MMAP_BLACKLIST 1
1258 EOF
1259
1260       if test $ac_cv_prog_cc_Ae = yes; then
1261         CPPFLAGS="$CPPFLAGS -Ae"
1262       fi
1263 #
1264 # Defines needed for HPUX support.
1265 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1266 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1267 #
1268       case `uname -r` in
1269                         *9*|*10*)
1270                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1271                                 cat >> confdefs.h <<\EOF
1272 #define USE_BOTH_CRYPT_CALLS 1
1273 EOF
1274
1275                                 ;;
1276                         *11*)
1277                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1278                                 cat >> confdefs.h <<\EOF
1279 #define USE_BOTH_CRYPT_CALLS 1
1280 EOF
1281
1282                                 ;;
1283       esac
1284       ;;
1285
1286 #
1287 # CRAY Unicos has broken const handling
1288        *unicos*)
1289           echo "$ac_t""disabling const" 1>&6
1290           CPPFLAGS="$CPPFLAGS -Dconst="
1291           ;;
1292         
1293 #
1294 # AIX4.x doesn't even admit to having large
1295 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1296 #
1297     *aix4*)
1298           echo "$ac_t""enabling large file support" 1>&6
1299       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1300       ;;    
1301 #
1302 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1303 # to the existance of large files..
1304 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1305 # recommendations on large file support, however it makes the
1306 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1307 # recommendation makes the compile fail on gcc2.7. JRA.
1308 #
1309         *solaris*)
1310                 case `uname -r` in
1311                         5.0*|5.1*|5.2*|5.3*|5.5*)
1312                                 echo "$ac_t""no large file support" 1>&6
1313                                 ;;
1314                         5.*)
1315                         echo "$ac_t""enabling large file support" 1>&6
1316                         if test "$ac_cv_prog_gcc" = yes; then
1317                                 ${CC-cc} -v >conftest.c 2>&1
1318                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1319                                 rm -fr conftest.c
1320                                 case "$ac_cv_gcc_compiler_version_number" in
1321                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1322                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1323                                                 ;;
1324                                         *)
1325                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1326                                                 ;;
1327                                 esac
1328                         else
1329                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1330                         fi
1331                         ;;
1332                 esac
1333                 ;;
1334 #
1335 # Tests needed for SINIX large file support.
1336 #
1337     *sysv4*)
1338       if test $host = mips-sni-sysv4 ; then
1339         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1340 echo "configure:1341: checking for LFS support" >&5
1341         old_CPPFLAGS="$CPPFLAGS"
1342         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1343         if test "$cross_compiling" = yes; then
1344   SINIX_LFS_SUPPORT=cross
1345 else
1346   cat > conftest.$ac_ext <<EOF
1347 #line 1348 "configure"
1348 #include "confdefs.h"
1349
1350 #include <unistd.h>
1351 main () {
1352 #if _LFS64_LARGEFILE == 1
1353 exit(0);
1354 #else
1355 exit(1);
1356 #endif
1357 }
1358 EOF
1359 if { (eval echo configure:1360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1360 then
1361   SINIX_LFS_SUPPORT=yes
1362 else
1363   echo "configure: failed program was:" >&5
1364   cat conftest.$ac_ext >&5
1365   rm -fr conftest*
1366   SINIX_LFS_SUPPORT=no
1367 fi
1368 rm -fr conftest*
1369 fi
1370
1371         CPPFLAGS="$old_CPPFLAGS"
1372         if test x$SINIX_LFS_SUPPORT = xyes ; then
1373           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1374           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1375           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1376           LIBS="`getconf LFS64_LIBS` $LIBS"
1377         fi
1378       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1379       fi
1380     ;;
1381
1382 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1383 #
1384     *linux*)
1385         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1386 echo "configure:1387: checking for LFS support" >&5
1387         old_CPPFLAGS="$CPPFLAGS"
1388         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1389        if test "$cross_compiling" = yes; then
1390   LINUX_LFS_SUPPORT=cross
1391 else
1392   cat > conftest.$ac_ext <<EOF
1393 #line 1394 "configure"
1394 #include "confdefs.h"
1395
1396 #include <unistd.h>
1397 #include <sys/utsname.h>
1398 main() {
1399 #if _LFS64_LARGEFILE == 1
1400        struct utsname uts;
1401        char *release;
1402        int major, minor;
1403
1404        /* Ensure this is glibc 2.2 or higher */
1405 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1406        int libc_major = __GLIBC__;
1407        int libc_minor = __GLIBC_MINOR__;
1408
1409        if (libc_major < 2)
1410               exit(1);
1411        if (libc_minor < 2)
1412               exit(1);
1413 #endif
1414
1415        /* Ensure this is kernel 2.4 or higher */
1416
1417        uname(&uts);
1418        release = uts.release;
1419        major = atoi(strsep(&release, "."));
1420        minor = atoi(strsep(&release, "."));
1421
1422        if (major > 2 || (major == 2 && minor > 3))
1423                exit(0);
1424        exit(1);
1425 #else
1426        exit(1);
1427 #endif
1428 }
1429
1430 EOF
1431 if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1432 then
1433   LINUX_LFS_SUPPORT=yes
1434 else
1435   echo "configure: failed program was:" >&5
1436   cat conftest.$ac_ext >&5
1437   rm -fr conftest*
1438   LINUX_LFS_SUPPORT=no
1439 fi
1440 rm -fr conftest*
1441 fi
1442
1443         CPPFLAGS="$old_CPPFLAGS"
1444         if test x$LINUX_LFS_SUPPORT = xyes ; then
1445           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1446         fi
1447        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1448                 ;;
1449
1450     *hurd*)
1451         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1452 echo "configure:1453: checking for LFS support" >&5
1453         old_CPPFLAGS="$CPPFLAGS"
1454         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1455         if test "$cross_compiling" = yes; then
1456   GLIBC_LFS_SUPPORT=cross
1457 else
1458   cat > conftest.$ac_ext <<EOF
1459 #line 1460 "configure"
1460 #include "confdefs.h"
1461
1462 #include <unistd.h>
1463 main () {
1464 #if _LFS64_LARGEFILE == 1
1465 exit(0);
1466 #else
1467 exit(1);
1468 #endif
1469 }
1470 EOF
1471 if { (eval echo configure:1472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1472 then
1473   GLIBC_LFS_SUPPORT=yes
1474 else
1475   echo "configure: failed program was:" >&5
1476   cat conftest.$ac_ext >&5
1477   rm -fr conftest*
1478   GLIBC_LFS_SUPPORT=no
1479 fi
1480 rm -fr conftest*
1481 fi
1482
1483         CPPFLAGS="$old_CPPFLAGS"
1484         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1485           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1486         fi
1487       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1488     ;;
1489
1490 esac
1491
1492 echo $ac_n "checking for inline""... $ac_c" 1>&6
1493 echo "configure:1494: checking for inline" >&5
1494 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1495   echo $ac_n "(cached) $ac_c" 1>&6
1496 else
1497   ac_cv_c_inline=no
1498 for ac_kw in inline __inline__ __inline; do
1499   cat > conftest.$ac_ext <<EOF
1500 #line 1501 "configure"
1501 #include "confdefs.h"
1502
1503 int main() {
1504 } $ac_kw foo() {
1505 ; return 0; }
1506 EOF
1507 if { (eval echo configure:1508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1508   rm -rf conftest*
1509   ac_cv_c_inline=$ac_kw; break
1510 else
1511   echo "configure: failed program was:" >&5
1512   cat conftest.$ac_ext >&5
1513 fi
1514 rm -f conftest*
1515 done
1516
1517 fi
1518
1519 echo "$ac_t""$ac_cv_c_inline" 1>&6
1520 case "$ac_cv_c_inline" in
1521   inline | yes) ;;
1522   no) cat >> confdefs.h <<\EOF
1523 #define inline 
1524 EOF
1525  ;;
1526   *)  cat >> confdefs.h <<EOF
1527 #define inline $ac_cv_c_inline
1528 EOF
1529  ;;
1530 esac
1531
1532 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1533 echo "configure:1534: checking how to run the C preprocessor" >&5
1534 # On Suns, sometimes $CPP names a directory.
1535 if test -n "$CPP" && test -d "$CPP"; then
1536   CPP=
1537 fi
1538 if test -z "$CPP"; then
1539 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1540   echo $ac_n "(cached) $ac_c" 1>&6
1541 else
1542     # This must be in double quotes, not single quotes, because CPP may get
1543   # substituted into the Makefile and "${CC-cc}" will confuse make.
1544   CPP="${CC-cc} -E"
1545   # On the NeXT, cc -E runs the code through the compiler's parser,
1546   # not just through cpp.
1547   cat > conftest.$ac_ext <<EOF
1548 #line 1549 "configure"
1549 #include "confdefs.h"
1550 #include <assert.h>
1551 Syntax Error
1552 EOF
1553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1554 { (eval echo configure:1555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1556 if test -z "$ac_err"; then
1557   :
1558 else
1559   echo "$ac_err" >&5
1560   echo "configure: failed program was:" >&5
1561   cat conftest.$ac_ext >&5
1562   rm -rf conftest*
1563   CPP="${CC-cc} -E -traditional-cpp"
1564   cat > conftest.$ac_ext <<EOF
1565 #line 1566 "configure"
1566 #include "confdefs.h"
1567 #include <assert.h>
1568 Syntax Error
1569 EOF
1570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1571 { (eval echo configure:1572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1573 if test -z "$ac_err"; then
1574   :
1575 else
1576   echo "$ac_err" >&5
1577   echo "configure: failed program was:" >&5
1578   cat conftest.$ac_ext >&5
1579   rm -rf conftest*
1580   CPP="${CC-cc} -nologo -E"
1581   cat > conftest.$ac_ext <<EOF
1582 #line 1583 "configure"
1583 #include "confdefs.h"
1584 #include <assert.h>
1585 Syntax Error
1586 EOF
1587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1588 { (eval echo configure:1589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1590 if test -z "$ac_err"; then
1591   :
1592 else
1593   echo "$ac_err" >&5
1594   echo "configure: failed program was:" >&5
1595   cat conftest.$ac_ext >&5
1596   rm -rf conftest*
1597   CPP=/lib/cpp
1598 fi
1599 rm -f conftest*
1600 fi
1601 rm -f conftest*
1602 fi
1603 rm -f conftest*
1604   ac_cv_prog_CPP="$CPP"
1605 fi
1606   CPP="$ac_cv_prog_CPP"
1607 else
1608   ac_cv_prog_CPP="$CPP"
1609 fi
1610 echo "$ac_t""$CPP" 1>&6
1611
1612 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1613 echo "configure:1614: checking for ANSI C header files" >&5
1614 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1615   echo $ac_n "(cached) $ac_c" 1>&6
1616 else
1617   cat > conftest.$ac_ext <<EOF
1618 #line 1619 "configure"
1619 #include "confdefs.h"
1620 #include <stdlib.h>
1621 #include <stdarg.h>
1622 #include <string.h>
1623 #include <float.h>
1624 EOF
1625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1626 { (eval echo configure:1627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1628 if test -z "$ac_err"; then
1629   rm -rf conftest*
1630   ac_cv_header_stdc=yes
1631 else
1632   echo "$ac_err" >&5
1633   echo "configure: failed program was:" >&5
1634   cat conftest.$ac_ext >&5
1635   rm -rf conftest*
1636   ac_cv_header_stdc=no
1637 fi
1638 rm -f conftest*
1639
1640 if test $ac_cv_header_stdc = yes; then
1641   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1642 cat > conftest.$ac_ext <<EOF
1643 #line 1644 "configure"
1644 #include "confdefs.h"
1645 #include <string.h>
1646 EOF
1647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1648   egrep "memchr" >/dev/null 2>&1; then
1649   :
1650 else
1651   rm -rf conftest*
1652   ac_cv_header_stdc=no
1653 fi
1654 rm -f conftest*
1655
1656 fi
1657
1658 if test $ac_cv_header_stdc = yes; then
1659   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1660 cat > conftest.$ac_ext <<EOF
1661 #line 1662 "configure"
1662 #include "confdefs.h"
1663 #include <stdlib.h>
1664 EOF
1665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1666   egrep "free" >/dev/null 2>&1; then
1667   :
1668 else
1669   rm -rf conftest*
1670   ac_cv_header_stdc=no
1671 fi
1672 rm -f conftest*
1673
1674 fi
1675
1676 if test $ac_cv_header_stdc = yes; then
1677   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1678 if test "$cross_compiling" = yes; then
1679   :
1680 else
1681   cat > conftest.$ac_ext <<EOF
1682 #line 1683 "configure"
1683 #include "confdefs.h"
1684 #include <ctype.h>
1685 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1686 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1687 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1688 int main () { int i; for (i = 0; i < 256; i++)
1689 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1690 exit (0); }
1691
1692 EOF
1693 if { (eval echo configure:1694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1694 then
1695   :
1696 else
1697   echo "configure: failed program was:" >&5
1698   cat conftest.$ac_ext >&5
1699   rm -fr conftest*
1700   ac_cv_header_stdc=no
1701 fi
1702 rm -fr conftest*
1703 fi
1704
1705 fi
1706 fi
1707
1708 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1709 if test $ac_cv_header_stdc = yes; then
1710   cat >> confdefs.h <<\EOF
1711 #define STDC_HEADERS 1
1712 EOF
1713
1714 fi
1715
1716 ac_header_dirent=no
1717 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1718 do
1719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1720 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1721 echo "configure:1722: checking for $ac_hdr that defines DIR" >&5
1722 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1723   echo $ac_n "(cached) $ac_c" 1>&6
1724 else
1725   cat > conftest.$ac_ext <<EOF
1726 #line 1727 "configure"
1727 #include "confdefs.h"
1728 #include <sys/types.h>
1729 #include <$ac_hdr>
1730 int main() {
1731 DIR *dirp = 0;
1732 ; return 0; }
1733 EOF
1734 if { (eval echo configure:1735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1735   rm -rf conftest*
1736   eval "ac_cv_header_dirent_$ac_safe=yes"
1737 else
1738   echo "configure: failed program was:" >&5
1739   cat conftest.$ac_ext >&5
1740   rm -rf conftest*
1741   eval "ac_cv_header_dirent_$ac_safe=no"
1742 fi
1743 rm -f conftest*
1744 fi
1745 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1746   echo "$ac_t""yes" 1>&6
1747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1748   cat >> confdefs.h <<EOF
1749 #define $ac_tr_hdr 1
1750 EOF
1751  ac_header_dirent=$ac_hdr; break
1752 else
1753   echo "$ac_t""no" 1>&6
1754 fi
1755 done
1756 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1757 if test $ac_header_dirent = dirent.h; then
1758 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1759 echo "configure:1760: checking for opendir in -ldir" >&5
1760 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1762   echo $ac_n "(cached) $ac_c" 1>&6
1763 else
1764   ac_save_LIBS="$LIBS"
1765 LIBS="-ldir  $LIBS"
1766 cat > conftest.$ac_ext <<EOF
1767 #line 1768 "configure"
1768 #include "confdefs.h"
1769 /* Override any gcc2 internal prototype to avoid an error.  */
1770 /* We use char because int might match the return type of a gcc2
1771     builtin and then its argument prototype would still apply.  */
1772 char opendir();
1773
1774 int main() {
1775 opendir()
1776 ; return 0; }
1777 EOF
1778 if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1779   rm -rf conftest*
1780   eval "ac_cv_lib_$ac_lib_var=yes"
1781 else
1782   echo "configure: failed program was:" >&5
1783   cat conftest.$ac_ext >&5
1784   rm -rf conftest*
1785   eval "ac_cv_lib_$ac_lib_var=no"
1786 fi
1787 rm -f conftest*
1788 LIBS="$ac_save_LIBS"
1789
1790 fi
1791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1792   echo "$ac_t""yes" 1>&6
1793   LIBS="$LIBS -ldir"
1794 else
1795   echo "$ac_t""no" 1>&6
1796 fi
1797
1798 else
1799 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1800 echo "configure:1801: checking for opendir in -lx" >&5
1801 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1803   echo $ac_n "(cached) $ac_c" 1>&6
1804 else
1805   ac_save_LIBS="$LIBS"
1806 LIBS="-lx  $LIBS"
1807 cat > conftest.$ac_ext <<EOF
1808 #line 1809 "configure"
1809 #include "confdefs.h"
1810 /* Override any gcc2 internal prototype to avoid an error.  */
1811 /* We use char because int might match the return type of a gcc2
1812     builtin and then its argument prototype would still apply.  */
1813 char opendir();
1814
1815 int main() {
1816 opendir()
1817 ; return 0; }
1818 EOF
1819 if { (eval echo configure:1820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1820   rm -rf conftest*
1821   eval "ac_cv_lib_$ac_lib_var=yes"
1822 else
1823   echo "configure: failed program was:" >&5
1824   cat conftest.$ac_ext >&5
1825   rm -rf conftest*
1826   eval "ac_cv_lib_$ac_lib_var=no"
1827 fi
1828 rm -f conftest*
1829 LIBS="$ac_save_LIBS"
1830
1831 fi
1832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1833   echo "$ac_t""yes" 1>&6
1834   LIBS="$LIBS -lx"
1835 else
1836   echo "$ac_t""no" 1>&6
1837 fi
1838
1839 fi
1840
1841 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1842 echo "configure:1843: checking whether time.h and sys/time.h may both be included" >&5
1843 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1844   echo $ac_n "(cached) $ac_c" 1>&6
1845 else
1846   cat > conftest.$ac_ext <<EOF
1847 #line 1848 "configure"
1848 #include "confdefs.h"
1849 #include <sys/types.h>
1850 #include <sys/time.h>
1851 #include <time.h>
1852 int main() {
1853 struct tm *tp;
1854 ; return 0; }
1855 EOF
1856 if { (eval echo configure:1857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1857   rm -rf conftest*
1858   ac_cv_header_time=yes
1859 else
1860   echo "configure: failed program was:" >&5
1861   cat conftest.$ac_ext >&5
1862   rm -rf conftest*
1863   ac_cv_header_time=no
1864 fi
1865 rm -f conftest*
1866 fi
1867
1868 echo "$ac_t""$ac_cv_header_time" 1>&6
1869 if test $ac_cv_header_time = yes; then
1870   cat >> confdefs.h <<\EOF
1871 #define TIME_WITH_SYS_TIME 1
1872 EOF
1873
1874 fi
1875
1876 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1877 echo "configure:1878: checking for sys/wait.h that is POSIX.1 compatible" >&5
1878 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1879   echo $ac_n "(cached) $ac_c" 1>&6
1880 else
1881   cat > conftest.$ac_ext <<EOF
1882 #line 1883 "configure"
1883 #include "confdefs.h"
1884 #include <sys/types.h>
1885 #include <sys/wait.h>
1886 #ifndef WEXITSTATUS
1887 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1888 #endif
1889 #ifndef WIFEXITED
1890 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1891 #endif
1892 int main() {
1893 int s;
1894 wait (&s);
1895 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1896 ; return 0; }
1897 EOF
1898 if { (eval echo configure:1899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1899   rm -rf conftest*
1900   ac_cv_header_sys_wait_h=yes
1901 else
1902   echo "configure: failed program was:" >&5
1903   cat conftest.$ac_ext >&5
1904   rm -rf conftest*
1905   ac_cv_header_sys_wait_h=no
1906 fi
1907 rm -f conftest*
1908 fi
1909
1910 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1911 if test $ac_cv_header_sys_wait_h = yes; then
1912   cat >> confdefs.h <<\EOF
1913 #define HAVE_SYS_WAIT_H 1
1914 EOF
1915
1916 fi
1917
1918 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1919 do
1920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1922 echo "configure:1923: checking for $ac_hdr" >&5
1923 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1924   echo $ac_n "(cached) $ac_c" 1>&6
1925 else
1926   cat > conftest.$ac_ext <<EOF
1927 #line 1928 "configure"
1928 #include "confdefs.h"
1929 #include <$ac_hdr>
1930 EOF
1931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1932 { (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1934 if test -z "$ac_err"; then
1935   rm -rf conftest*
1936   eval "ac_cv_header_$ac_safe=yes"
1937 else
1938   echo "$ac_err" >&5
1939   echo "configure: failed program was:" >&5
1940   cat conftest.$ac_ext >&5
1941   rm -rf conftest*
1942   eval "ac_cv_header_$ac_safe=no"
1943 fi
1944 rm -f conftest*
1945 fi
1946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1947   echo "$ac_t""yes" 1>&6
1948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1949   cat >> confdefs.h <<EOF
1950 #define $ac_tr_hdr 1
1951 EOF
1952  
1953 else
1954   echo "$ac_t""no" 1>&6
1955 fi
1956 done
1957
1958 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1959 do
1960 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1961 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1962 echo "configure:1963: checking for $ac_hdr" >&5
1963 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1964   echo $ac_n "(cached) $ac_c" 1>&6
1965 else
1966   cat > conftest.$ac_ext <<EOF
1967 #line 1968 "configure"
1968 #include "confdefs.h"
1969 #include <$ac_hdr>
1970 EOF
1971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1972 { (eval echo configure:1973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1974 if test -z "$ac_err"; then
1975   rm -rf conftest*
1976   eval "ac_cv_header_$ac_safe=yes"
1977 else
1978   echo "$ac_err" >&5
1979   echo "configure: failed program was:" >&5
1980   cat conftest.$ac_ext >&5
1981   rm -rf conftest*
1982   eval "ac_cv_header_$ac_safe=no"
1983 fi
1984 rm -f conftest*
1985 fi
1986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1987   echo "$ac_t""yes" 1>&6
1988     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1989   cat >> confdefs.h <<EOF
1990 #define $ac_tr_hdr 1
1991 EOF
1992  
1993 else
1994   echo "$ac_t""no" 1>&6
1995 fi
1996 done
1997
1998 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1999 do
2000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2002 echo "configure:2003: checking for $ac_hdr" >&5
2003 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2004   echo $ac_n "(cached) $ac_c" 1>&6
2005 else
2006   cat > conftest.$ac_ext <<EOF
2007 #line 2008 "configure"
2008 #include "confdefs.h"
2009 #include <$ac_hdr>
2010 EOF
2011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2012 { (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2014 if test -z "$ac_err"; then
2015   rm -rf conftest*
2016   eval "ac_cv_header_$ac_safe=yes"
2017 else
2018   echo "$ac_err" >&5
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021   rm -rf conftest*
2022   eval "ac_cv_header_$ac_safe=no"
2023 fi
2024 rm -f conftest*
2025 fi
2026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2027   echo "$ac_t""yes" 1>&6
2028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2029   cat >> confdefs.h <<EOF
2030 #define $ac_tr_hdr 1
2031 EOF
2032  
2033 else
2034   echo "$ac_t""no" 1>&6
2035 fi
2036 done
2037
2038 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2039 do
2040 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2041 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2042 echo "configure:2043: checking for $ac_hdr" >&5
2043 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2044   echo $ac_n "(cached) $ac_c" 1>&6
2045 else
2046   cat > conftest.$ac_ext <<EOF
2047 #line 2048 "configure"
2048 #include "confdefs.h"
2049 #include <$ac_hdr>
2050 EOF
2051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2052 { (eval echo configure:2053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2054 if test -z "$ac_err"; then
2055   rm -rf conftest*
2056   eval "ac_cv_header_$ac_safe=yes"
2057 else
2058   echo "$ac_err" >&5
2059   echo "configure: failed program was:" >&5
2060   cat conftest.$ac_ext >&5
2061   rm -rf conftest*
2062   eval "ac_cv_header_$ac_safe=no"
2063 fi
2064 rm -f conftest*
2065 fi
2066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2067   echo "$ac_t""yes" 1>&6
2068     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2069   cat >> confdefs.h <<EOF
2070 #define $ac_tr_hdr 1
2071 EOF
2072  
2073 else
2074   echo "$ac_t""no" 1>&6
2075 fi
2076 done
2077
2078 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
2079 do
2080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2082 echo "configure:2083: checking for $ac_hdr" >&5
2083 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2084   echo $ac_n "(cached) $ac_c" 1>&6
2085 else
2086   cat > conftest.$ac_ext <<EOF
2087 #line 2088 "configure"
2088 #include "confdefs.h"
2089 #include <$ac_hdr>
2090 EOF
2091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2092 { (eval echo configure:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2094 if test -z "$ac_err"; then
2095   rm -rf conftest*
2096   eval "ac_cv_header_$ac_safe=yes"
2097 else
2098   echo "$ac_err" >&5
2099   echo "configure: failed program was:" >&5
2100   cat conftest.$ac_ext >&5
2101   rm -rf conftest*
2102   eval "ac_cv_header_$ac_safe=no"
2103 fi
2104 rm -f conftest*
2105 fi
2106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2107   echo "$ac_t""yes" 1>&6
2108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2109   cat >> confdefs.h <<EOF
2110 #define $ac_tr_hdr 1
2111 EOF
2112  
2113 else
2114   echo "$ac_t""no" 1>&6
2115 fi
2116 done
2117
2118 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2119 do
2120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2122 echo "configure:2123: checking for $ac_hdr" >&5
2123 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2124   echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126   cat > conftest.$ac_ext <<EOF
2127 #line 2128 "configure"
2128 #include "confdefs.h"
2129 #include <$ac_hdr>
2130 EOF
2131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2132 { (eval echo configure:2133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2134 if test -z "$ac_err"; then
2135   rm -rf conftest*
2136   eval "ac_cv_header_$ac_safe=yes"
2137 else
2138   echo "$ac_err" >&5
2139   echo "configure: failed program was:" >&5
2140   cat conftest.$ac_ext >&5
2141   rm -rf conftest*
2142   eval "ac_cv_header_$ac_safe=no"
2143 fi
2144 rm -f conftest*
2145 fi
2146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2147   echo "$ac_t""yes" 1>&6
2148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2149   cat >> confdefs.h <<EOF
2150 #define $ac_tr_hdr 1
2151 EOF
2152  
2153 else
2154   echo "$ac_t""no" 1>&6
2155 fi
2156 done
2157
2158 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2159 do
2160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2162 echo "configure:2163: checking for $ac_hdr" >&5
2163 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2164   echo $ac_n "(cached) $ac_c" 1>&6
2165 else
2166   cat > conftest.$ac_ext <<EOF
2167 #line 2168 "configure"
2168 #include "confdefs.h"
2169 #include <$ac_hdr>
2170 EOF
2171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2172 { (eval echo configure:2173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2174 if test -z "$ac_err"; then
2175   rm -rf conftest*
2176   eval "ac_cv_header_$ac_safe=yes"
2177 else
2178   echo "$ac_err" >&5
2179   echo "configure: failed program was:" >&5
2180   cat conftest.$ac_ext >&5
2181   rm -rf conftest*
2182   eval "ac_cv_header_$ac_safe=no"
2183 fi
2184 rm -f conftest*
2185 fi
2186 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2187   echo "$ac_t""yes" 1>&6
2188     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2189   cat >> confdefs.h <<EOF
2190 #define $ac_tr_hdr 1
2191 EOF
2192  
2193 else
2194   echo "$ac_t""no" 1>&6
2195 fi
2196 done
2197
2198 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h
2199 do
2200 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2201 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2202 echo "configure:2203: checking for $ac_hdr" >&5
2203 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2204   echo $ac_n "(cached) $ac_c" 1>&6
2205 else
2206   cat > conftest.$ac_ext <<EOF
2207 #line 2208 "configure"
2208 #include "confdefs.h"
2209 #include <$ac_hdr>
2210 EOF
2211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2212 { (eval echo configure:2213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2214 if test -z "$ac_err"; then
2215   rm -rf conftest*
2216   eval "ac_cv_header_$ac_safe=yes"
2217 else
2218   echo "$ac_err" >&5
2219   echo "configure: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221   rm -rf conftest*
2222   eval "ac_cv_header_$ac_safe=no"
2223 fi
2224 rm -f conftest*
2225 fi
2226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2227   echo "$ac_t""yes" 1>&6
2228     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2229   cat >> confdefs.h <<EOF
2230 #define $ac_tr_hdr 1
2231 EOF
2232  
2233 else
2234   echo "$ac_t""no" 1>&6
2235 fi
2236 done
2237
2238
2239 #
2240 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2241 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2242 #
2243 case "$host_os" in
2244     *hpux*)
2245                 cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <shadow.h>
2249 int main() {
2250 struct spwd testme
2251 ; return 0; }
2252 EOF
2253 if { (eval echo configure:2254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2254   rm -rf conftest*
2255   ac_cv_header_shadow_h=yes
2256 else
2257   echo "configure: failed program was:" >&5
2258   cat conftest.$ac_ext >&5
2259   rm -rf conftest*
2260   ac_cv_header_shadow_h=no
2261 fi
2262 rm -f conftest*
2263                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2264                    cat >> confdefs.h <<\EOF
2265 #define HAVE_SHADOW_H 1
2266 EOF
2267
2268                 fi
2269         ;;
2270 esac
2271 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2272 do
2273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2275 echo "configure:2276: checking for $ac_hdr" >&5
2276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2277   echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279   cat > conftest.$ac_ext <<EOF
2280 #line 2281 "configure"
2281 #include "confdefs.h"
2282 #include <$ac_hdr>
2283 EOF
2284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2285 { (eval echo configure:2286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2287 if test -z "$ac_err"; then
2288   rm -rf conftest*
2289   eval "ac_cv_header_$ac_safe=yes"
2290 else
2291   echo "$ac_err" >&5
2292   echo "configure: failed program was:" >&5
2293   cat conftest.$ac_ext >&5
2294   rm -rf conftest*
2295   eval "ac_cv_header_$ac_safe=no"
2296 fi
2297 rm -f conftest*
2298 fi
2299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2300   echo "$ac_t""yes" 1>&6
2301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2302   cat >> confdefs.h <<EOF
2303 #define $ac_tr_hdr 1
2304 EOF
2305  
2306 else
2307   echo "$ac_t""no" 1>&6
2308 fi
2309 done
2310
2311 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2312 do
2313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2315 echo "configure:2316: checking for $ac_hdr" >&5
2316 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2317   echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319   cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #include <$ac_hdr>
2323 EOF
2324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2325 { (eval echo configure:2326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2327 if test -z "$ac_err"; then
2328   rm -rf conftest*
2329   eval "ac_cv_header_$ac_safe=yes"
2330 else
2331   echo "$ac_err" >&5
2332   echo "configure: failed program was:" >&5
2333   cat conftest.$ac_ext >&5
2334   rm -rf conftest*
2335   eval "ac_cv_header_$ac_safe=no"
2336 fi
2337 rm -f conftest*
2338 fi
2339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2340   echo "$ac_t""yes" 1>&6
2341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2342   cat >> confdefs.h <<EOF
2343 #define $ac_tr_hdr 1
2344 EOF
2345  
2346 else
2347   echo "$ac_t""no" 1>&6
2348 fi
2349 done
2350
2351 for ac_hdr in stropts.h poll.h
2352 do
2353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2355 echo "configure:2356: checking for $ac_hdr" >&5
2356 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2357   echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359   cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 #include <$ac_hdr>
2363 EOF
2364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2365 { (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2367 if test -z "$ac_err"; then
2368   rm -rf conftest*
2369   eval "ac_cv_header_$ac_safe=yes"
2370 else
2371   echo "$ac_err" >&5
2372   echo "configure: failed program was:" >&5
2373   cat conftest.$ac_ext >&5
2374   rm -rf conftest*
2375   eval "ac_cv_header_$ac_safe=no"
2376 fi
2377 rm -f conftest*
2378 fi
2379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2380   echo "$ac_t""yes" 1>&6
2381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2382   cat >> confdefs.h <<EOF
2383 #define $ac_tr_hdr 1
2384 EOF
2385  
2386 else
2387   echo "$ac_t""no" 1>&6
2388 fi
2389 done
2390
2391 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2392 do
2393 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2394 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2395 echo "configure:2396: checking for $ac_hdr" >&5
2396 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2397   echo $ac_n "(cached) $ac_c" 1>&6
2398 else
2399   cat > conftest.$ac_ext <<EOF
2400 #line 2401 "configure"
2401 #include "confdefs.h"
2402 #include <$ac_hdr>
2403 EOF
2404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2405 { (eval echo configure:2406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2407 if test -z "$ac_err"; then
2408   rm -rf conftest*
2409   eval "ac_cv_header_$ac_safe=yes"
2410 else
2411   echo "$ac_err" >&5
2412   echo "configure: failed program was:" >&5
2413   cat conftest.$ac_ext >&5
2414   rm -rf conftest*
2415   eval "ac_cv_header_$ac_safe=no"
2416 fi
2417 rm -f conftest*
2418 fi
2419 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2420   echo "$ac_t""yes" 1>&6
2421     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2422   cat >> confdefs.h <<EOF
2423 #define $ac_tr_hdr 1
2424 EOF
2425  
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429 done
2430
2431 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2432 do
2433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2435 echo "configure:2436: checking for $ac_hdr" >&5
2436 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   cat > conftest.$ac_ext <<EOF
2440 #line 2441 "configure"
2441 #include "confdefs.h"
2442 #include <$ac_hdr>
2443 EOF
2444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2445 { (eval echo configure:2446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2447 if test -z "$ac_err"; then
2448   rm -rf conftest*
2449   eval "ac_cv_header_$ac_safe=yes"
2450 else
2451   echo "$ac_err" >&5
2452   echo "configure: failed program was:" >&5
2453   cat conftest.$ac_ext >&5
2454   rm -rf conftest*
2455   eval "ac_cv_header_$ac_safe=no"
2456 fi
2457 rm -f conftest*
2458 fi
2459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2460   echo "$ac_t""yes" 1>&6
2461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2462   cat >> confdefs.h <<EOF
2463 #define $ac_tr_hdr 1
2464 EOF
2465  
2466 else
2467   echo "$ac_t""no" 1>&6
2468 fi
2469 done
2470
2471
2472 # For experimental utmp support (lastlog on some BSD-like systems)
2473 for ac_hdr in utmp.h utmpx.h lastlog.h
2474 do
2475 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2476 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2477 echo "configure:2478: checking for $ac_hdr" >&5
2478 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2479   echo $ac_n "(cached) $ac_c" 1>&6
2480 else
2481   cat > conftest.$ac_ext <<EOF
2482 #line 2483 "configure"
2483 #include "confdefs.h"
2484 #include <$ac_hdr>
2485 EOF
2486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2487 { (eval echo configure:2488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2489 if test -z "$ac_err"; then
2490   rm -rf conftest*
2491   eval "ac_cv_header_$ac_safe=yes"
2492 else
2493   echo "$ac_err" >&5
2494   echo "configure: failed program was:" >&5
2495   cat conftest.$ac_ext >&5
2496   rm -rf conftest*
2497   eval "ac_cv_header_$ac_safe=no"
2498 fi
2499 rm -f conftest*
2500 fi
2501 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2502   echo "$ac_t""yes" 1>&6
2503     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2504   cat >> confdefs.h <<EOF
2505 #define $ac_tr_hdr 1
2506 EOF
2507  
2508 else
2509   echo "$ac_t""no" 1>&6
2510 fi
2511 done
2512
2513  
2514 # For quotas on Veritas VxFS filesystems
2515 for ac_hdr in sys/fs/vx_quota.h
2516 do
2517 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2518 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2519 echo "configure:2520: checking for $ac_hdr" >&5
2520 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2521   echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523   cat > conftest.$ac_ext <<EOF
2524 #line 2525 "configure"
2525 #include "confdefs.h"
2526 #include <$ac_hdr>
2527 EOF
2528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2529 { (eval echo configure:2530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2531 if test -z "$ac_err"; then
2532   rm -rf conftest*
2533   eval "ac_cv_header_$ac_safe=yes"
2534 else
2535   echo "$ac_err" >&5
2536   echo "configure: failed program was:" >&5
2537   cat conftest.$ac_ext >&5
2538   rm -rf conftest*
2539   eval "ac_cv_header_$ac_safe=no"
2540 fi
2541 rm -f conftest*
2542 fi
2543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2544   echo "$ac_t""yes" 1>&6
2545     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2546   cat >> confdefs.h <<EOF
2547 #define $ac_tr_hdr 1
2548 EOF
2549  
2550 else
2551   echo "$ac_t""no" 1>&6
2552 fi
2553 done
2554
2555
2556 # For quotas on Linux XFS filesystems
2557 for ac_hdr in linux/xqm.h
2558 do
2559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2561 echo "configure:2562: checking for $ac_hdr" >&5
2562 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2563   echo $ac_n "(cached) $ac_c" 1>&6
2564 else
2565   cat > conftest.$ac_ext <<EOF
2566 #line 2567 "configure"
2567 #include "confdefs.h"
2568 #include <$ac_hdr>
2569 EOF
2570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2571 { (eval echo configure:2572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2573 if test -z "$ac_err"; then
2574   rm -rf conftest*
2575   eval "ac_cv_header_$ac_safe=yes"
2576 else
2577   echo "$ac_err" >&5
2578   echo "configure: failed program was:" >&5
2579   cat conftest.$ac_ext >&5
2580   rm -rf conftest*
2581   eval "ac_cv_header_$ac_safe=no"
2582 fi
2583 rm -f conftest*
2584 fi
2585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2586   echo "$ac_t""yes" 1>&6
2587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2588   cat >> confdefs.h <<EOF
2589 #define $ac_tr_hdr 1
2590 EOF
2591  
2592 else
2593   echo "$ac_t""no" 1>&6
2594 fi
2595 done
2596
2597
2598 echo $ac_n "checking size of int""... $ac_c" 1>&6
2599 echo "configure:2600: checking size of int" >&5
2600 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2601   echo $ac_n "(cached) $ac_c" 1>&6
2602 else
2603   if test "$cross_compiling" = yes; then
2604   ac_cv_sizeof_int=cross
2605 else
2606   cat > conftest.$ac_ext <<EOF
2607 #line 2608 "configure"
2608 #include "confdefs.h"
2609 #include <stdio.h>
2610 main()
2611 {
2612   FILE *f=fopen("conftestval", "w");
2613   if (!f) exit(1);
2614   fprintf(f, "%d\n", sizeof(int));
2615   exit(0);
2616 }
2617 EOF
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2619 then
2620   ac_cv_sizeof_int=`cat conftestval`
2621 else
2622   echo "configure: failed program was:" >&5
2623   cat conftest.$ac_ext >&5
2624   rm -fr conftest*
2625   ac_cv_sizeof_int=0
2626 fi
2627 rm -fr conftest*
2628 fi
2629
2630 fi
2631 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2632 cat >> confdefs.h <<EOF
2633 #define SIZEOF_INT $ac_cv_sizeof_int
2634 EOF
2635
2636
2637 echo $ac_n "checking size of long""... $ac_c" 1>&6
2638 echo "configure:2639: checking size of long" >&5
2639 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2640   echo $ac_n "(cached) $ac_c" 1>&6
2641 else
2642   if test "$cross_compiling" = yes; then
2643   ac_cv_sizeof_long=cross
2644 else
2645   cat > conftest.$ac_ext <<EOF
2646 #line 2647 "configure"
2647 #include "confdefs.h"
2648 #include <stdio.h>
2649 main()
2650 {
2651   FILE *f=fopen("conftestval", "w");
2652   if (!f) exit(1);
2653   fprintf(f, "%d\n", sizeof(long));
2654   exit(0);
2655 }
2656 EOF
2657 if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2658 then
2659   ac_cv_sizeof_long=`cat conftestval`
2660 else
2661   echo "configure: failed program was:" >&5
2662   cat conftest.$ac_ext >&5
2663   rm -fr conftest*
2664   ac_cv_sizeof_long=0
2665 fi
2666 rm -fr conftest*
2667 fi
2668
2669 fi
2670 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2671 cat >> confdefs.h <<EOF
2672 #define SIZEOF_LONG $ac_cv_sizeof_long
2673 EOF
2674
2675
2676 echo $ac_n "checking size of short""... $ac_c" 1>&6
2677 echo "configure:2678: checking size of short" >&5
2678 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2679   echo $ac_n "(cached) $ac_c" 1>&6
2680 else
2681   if test "$cross_compiling" = yes; then
2682   ac_cv_sizeof_short=cross
2683 else
2684   cat > conftest.$ac_ext <<EOF
2685 #line 2686 "configure"
2686 #include "confdefs.h"
2687 #include <stdio.h>
2688 main()
2689 {
2690   FILE *f=fopen("conftestval", "w");
2691   if (!f) exit(1);
2692   fprintf(f, "%d\n", sizeof(short));
2693   exit(0);
2694 }
2695 EOF
2696 if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2697 then
2698   ac_cv_sizeof_short=`cat conftestval`
2699 else
2700   echo "configure: failed program was:" >&5
2701   cat conftest.$ac_ext >&5
2702   rm -fr conftest*
2703   ac_cv_sizeof_short=0
2704 fi
2705 rm -fr conftest*
2706 fi
2707
2708 fi
2709 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2710 cat >> confdefs.h <<EOF
2711 #define SIZEOF_SHORT $ac_cv_sizeof_short
2712 EOF
2713
2714
2715
2716 echo $ac_n "checking for working const""... $ac_c" 1>&6
2717 echo "configure:2718: checking for working const" >&5
2718 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2719   echo $ac_n "(cached) $ac_c" 1>&6
2720 else
2721   cat > conftest.$ac_ext <<EOF
2722 #line 2723 "configure"
2723 #include "confdefs.h"
2724
2725 int main() {
2726
2727 /* Ultrix mips cc rejects this.  */
2728 typedef int charset[2]; const charset x;
2729 /* SunOS 4.1.1 cc rejects this.  */
2730 char const *const *ccp;
2731 char **p;
2732 /* NEC SVR4.0.2 mips cc rejects this.  */
2733 struct point {int x, y;};
2734 static struct point const zero = {0,0};
2735 /* AIX XL C 1.02.0.0 rejects this.
2736    It does not let you subtract one const X* pointer from another in an arm
2737    of an if-expression whose if-part is not a constant expression */
2738 const char *g = "string";
2739 ccp = &g + (g ? g-g : 0);
2740 /* HPUX 7.0 cc rejects these. */
2741 ++ccp;
2742 p = (char**) ccp;
2743 ccp = (char const *const *) p;
2744 { /* SCO 3.2v4 cc rejects this.  */
2745   char *t;
2746   char const *s = 0 ? (char *) 0 : (char const *) 0;
2747
2748   *t++ = 0;
2749 }
2750 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2751   int x[] = {25, 17};
2752   const int *foo = &x[0];
2753   ++foo;
2754 }
2755 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2756   typedef const int *iptr;
2757   iptr p = 0;
2758   ++p;
2759 }
2760 { /* AIX XL C 1.02.0.0 rejects this saying
2761      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2762   struct s { int j; const int *ap[3]; };
2763   struct s *b; b->j = 5;
2764 }
2765 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2766   const int foo = 10;
2767 }
2768
2769 ; return 0; }
2770 EOF
2771 if { (eval echo configure:2772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2772   rm -rf conftest*
2773   ac_cv_c_const=yes
2774 else
2775   echo "configure: failed program was:" >&5
2776   cat conftest.$ac_ext >&5
2777   rm -rf conftest*
2778   ac_cv_c_const=no
2779 fi
2780 rm -f conftest*
2781 fi
2782
2783 echo "$ac_t""$ac_cv_c_const" 1>&6
2784 if test $ac_cv_c_const = no; then
2785   cat >> confdefs.h <<\EOF
2786 #define const 
2787 EOF
2788
2789 fi
2790
2791 echo $ac_n "checking for inline""... $ac_c" 1>&6
2792 echo "configure:2793: checking for inline" >&5
2793 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   ac_cv_c_inline=no
2797 for ac_kw in inline __inline__ __inline; do
2798   cat > conftest.$ac_ext <<EOF
2799 #line 2800 "configure"
2800 #include "confdefs.h"
2801
2802 int main() {
2803 } $ac_kw foo() {
2804 ; return 0; }
2805 EOF
2806 if { (eval echo configure:2807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2807   rm -rf conftest*
2808   ac_cv_c_inline=$ac_kw; break
2809 else
2810   echo "configure: failed program was:" >&5
2811   cat conftest.$ac_ext >&5
2812 fi
2813 rm -f conftest*
2814 done
2815
2816 fi
2817
2818 echo "$ac_t""$ac_cv_c_inline" 1>&6
2819 case "$ac_cv_c_inline" in
2820   inline | yes) ;;
2821   no) cat >> confdefs.h <<\EOF
2822 #define inline 
2823 EOF
2824  ;;
2825   *)  cat >> confdefs.h <<EOF
2826 #define inline $ac_cv_c_inline
2827 EOF
2828  ;;
2829 esac
2830
2831 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2832 echo "configure:2833: checking whether byte ordering is bigendian" >&5
2833 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2834   echo $ac_n "(cached) $ac_c" 1>&6
2835 else
2836   ac_cv_c_bigendian=unknown
2837 # See if sys/param.h defines the BYTE_ORDER macro.
2838 cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 #include <sys/types.h>
2842 #include <sys/param.h>
2843 int main() {
2844
2845 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2846  bogus endian macros
2847 #endif
2848 ; return 0; }
2849 EOF
2850 if { (eval echo configure:2851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2851   rm -rf conftest*
2852   # It does; now see whether it defined to BIG_ENDIAN or not.
2853 cat > conftest.$ac_ext <<EOF
2854 #line 2855 "configure"
2855 #include "confdefs.h"
2856 #include <sys/types.h>
2857 #include <sys/param.h>
2858 int main() {
2859
2860 #if BYTE_ORDER != BIG_ENDIAN
2861  not big endian
2862 #endif
2863 ; return 0; }
2864 EOF
2865 if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2866   rm -rf conftest*
2867   ac_cv_c_bigendian=yes
2868 else
2869   echo "configure: failed program was:" >&5
2870   cat conftest.$ac_ext >&5
2871   rm -rf conftest*
2872   ac_cv_c_bigendian=no
2873 fi
2874 rm -f conftest*
2875 else
2876   echo "configure: failed program was:" >&5
2877   cat conftest.$ac_ext >&5
2878 fi
2879 rm -f conftest*
2880 if test $ac_cv_c_bigendian = unknown; then
2881 if test "$cross_compiling" = yes; then
2882     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2883 else
2884   cat > conftest.$ac_ext <<EOF
2885 #line 2886 "configure"
2886 #include "confdefs.h"
2887 main () {
2888   /* Are we little or big endian?  From Harbison&Steele.  */
2889   union
2890   {
2891     long l;
2892     char c[sizeof (long)];
2893   } u;
2894   u.l = 1;
2895   exit (u.c[sizeof (long) - 1] == 1);
2896 }
2897 EOF
2898 if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2899 then
2900   ac_cv_c_bigendian=no
2901 else
2902   echo "configure: failed program was:" >&5
2903   cat conftest.$ac_ext >&5
2904   rm -fr conftest*
2905   ac_cv_c_bigendian=yes
2906 fi
2907 rm -fr conftest*
2908 fi
2909
2910 fi
2911 fi
2912
2913 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2914 if test $ac_cv_c_bigendian = yes; then
2915   cat >> confdefs.h <<\EOF
2916 #define WORDS_BIGENDIAN 1
2917 EOF
2918
2919 fi
2920
2921 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2922 echo "configure:2923: checking whether char is unsigned" >&5
2923 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2924   echo $ac_n "(cached) $ac_c" 1>&6
2925 else
2926   if test "$GCC" = yes; then
2927   # GCC predefines this symbol on systems where it applies.
2928 cat > conftest.$ac_ext <<EOF
2929 #line 2930 "configure"
2930 #include "confdefs.h"
2931 #ifdef __CHAR_UNSIGNED__
2932   yes
2933 #endif
2934
2935 EOF
2936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2937   egrep "yes" >/dev/null 2>&1; then
2938   rm -rf conftest*
2939   ac_cv_c_char_unsigned=yes
2940 else
2941   rm -rf conftest*
2942   ac_cv_c_char_unsigned=no
2943 fi
2944 rm -f conftest*
2945
2946 else
2947 if test "$cross_compiling" = yes; then
2948     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2949 else
2950   cat > conftest.$ac_ext <<EOF
2951 #line 2952 "configure"
2952 #include "confdefs.h"
2953 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2954 #if !defined(__STDC__) || __STDC__ != 1
2955 #define volatile
2956 #endif
2957 main() {
2958   volatile char c = 255; exit(c < 0);
2959 }
2960 EOF
2961 if { (eval echo configure:2962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2962 then
2963   ac_cv_c_char_unsigned=yes
2964 else
2965   echo "configure: failed program was:" >&5
2966   cat conftest.$ac_ext >&5
2967   rm -fr conftest*
2968   ac_cv_c_char_unsigned=no
2969 fi
2970 rm -fr conftest*
2971 fi
2972
2973 fi
2974 fi
2975
2976 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2977 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2978   cat >> confdefs.h <<\EOF
2979 #define __CHAR_UNSIGNED__ 1
2980 EOF
2981
2982 fi
2983
2984
2985 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2986 echo "configure:2987: checking return type of signal handlers" >&5
2987 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 #include <sys/types.h>
2994 #include <signal.h>
2995 #ifdef signal
2996 #undef signal
2997 #endif
2998 #ifdef __cplusplus
2999 extern "C" void (*signal (int, void (*)(int)))(int);
3000 #else
3001 void (*signal ()) ();
3002 #endif
3003
3004 int main() {
3005 int i;
3006 ; return 0; }
3007 EOF
3008 if { (eval echo configure:3009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3009   rm -rf conftest*
3010   ac_cv_type_signal=void
3011 else
3012   echo "configure: failed program was:" >&5
3013   cat conftest.$ac_ext >&5
3014   rm -rf conftest*
3015   ac_cv_type_signal=int
3016 fi
3017 rm -f conftest*
3018 fi
3019
3020 echo "$ac_t""$ac_cv_type_signal" 1>&6
3021 cat >> confdefs.h <<EOF
3022 #define RETSIGTYPE $ac_cv_type_signal
3023 EOF
3024
3025
3026 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3027 echo "configure:3028: checking for uid_t in sys/types.h" >&5
3028 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   cat > conftest.$ac_ext <<EOF
3032 #line 3033 "configure"
3033 #include "confdefs.h"
3034 #include <sys/types.h>
3035 EOF
3036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3037   egrep "uid_t" >/dev/null 2>&1; then
3038   rm -rf conftest*
3039   ac_cv_type_uid_t=yes
3040 else
3041   rm -rf conftest*
3042   ac_cv_type_uid_t=no
3043 fi
3044 rm -f conftest*
3045
3046 fi
3047
3048 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3049 if test $ac_cv_type_uid_t = no; then
3050   cat >> confdefs.h <<\EOF
3051 #define uid_t int
3052 EOF
3053
3054   cat >> confdefs.h <<\EOF
3055 #define gid_t int
3056 EOF
3057
3058 fi
3059
3060 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3061 echo "configure:3062: checking for mode_t" >&5
3062 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   cat > conftest.$ac_ext <<EOF
3066 #line 3067 "configure"
3067 #include "confdefs.h"
3068 #include <sys/types.h>
3069 #if STDC_HEADERS
3070 #include <stdlib.h>
3071 #include <stddef.h>
3072 #endif
3073 EOF
3074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3075   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3076   rm -rf conftest*
3077   ac_cv_type_mode_t=yes
3078 else
3079   rm -rf conftest*
3080   ac_cv_type_mode_t=no
3081 fi
3082 rm -f conftest*
3083
3084 fi
3085 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3086 if test $ac_cv_type_mode_t = no; then
3087   cat >> confdefs.h <<\EOF
3088 #define mode_t int
3089 EOF
3090
3091 fi
3092
3093 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3094 echo "configure:3095: checking for off_t" >&5
3095 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098   cat > conftest.$ac_ext <<EOF
3099 #line 3100 "configure"
3100 #include "confdefs.h"
3101 #include <sys/types.h>
3102 #if STDC_HEADERS
3103 #include <stdlib.h>
3104 #include <stddef.h>
3105 #endif
3106 EOF
3107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3108   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3109   rm -rf conftest*
3110   ac_cv_type_off_t=yes
3111 else
3112   rm -rf conftest*
3113   ac_cv_type_off_t=no
3114 fi
3115 rm -f conftest*
3116
3117 fi
3118 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3119 if test $ac_cv_type_off_t = no; then
3120   cat >> confdefs.h <<\EOF
3121 #define off_t long
3122 EOF
3123
3124 fi
3125
3126 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3127 echo "configure:3128: checking for size_t" >&5
3128 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3129   echo $ac_n "(cached) $ac_c" 1>&6
3130 else
3131   cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134 #include <sys/types.h>
3135 #if STDC_HEADERS
3136 #include <stdlib.h>
3137 #include <stddef.h>
3138 #endif
3139 EOF
3140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3141   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3142   rm -rf conftest*
3143   ac_cv_type_size_t=yes
3144 else
3145   rm -rf conftest*
3146   ac_cv_type_size_t=no
3147 fi
3148 rm -f conftest*
3149
3150 fi
3151 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3152 if test $ac_cv_type_size_t = no; then
3153   cat >> confdefs.h <<\EOF
3154 #define size_t unsigned
3155 EOF
3156
3157 fi
3158
3159 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3160 echo "configure:3161: checking for pid_t" >&5
3161 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3162   echo $ac_n "(cached) $ac_c" 1>&6
3163 else
3164   cat > conftest.$ac_ext <<EOF
3165 #line 3166 "configure"
3166 #include "confdefs.h"
3167 #include <sys/types.h>
3168 #if STDC_HEADERS
3169 #include <stdlib.h>
3170 #include <stddef.h>
3171 #endif
3172 EOF
3173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3174   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3175   rm -rf conftest*
3176   ac_cv_type_pid_t=yes
3177 else
3178   rm -rf conftest*
3179   ac_cv_type_pid_t=no
3180 fi
3181 rm -f conftest*
3182
3183 fi
3184 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3185 if test $ac_cv_type_pid_t = no; then
3186   cat >> confdefs.h <<\EOF
3187 #define pid_t int
3188 EOF
3189
3190 fi
3191
3192 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3193 echo "configure:3194: checking for st_rdev in struct stat" >&5
3194 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3195   echo $ac_n "(cached) $ac_c" 1>&6
3196 else
3197   cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 #include <sys/types.h>
3201 #include <sys/stat.h>
3202 int main() {
3203 struct stat s; s.st_rdev;
3204 ; return 0; }
3205 EOF
3206 if { (eval echo configure:3207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3207   rm -rf conftest*
3208   ac_cv_struct_st_rdev=yes
3209 else
3210   echo "configure: failed program was:" >&5
3211   cat conftest.$ac_ext >&5
3212   rm -rf conftest*
3213   ac_cv_struct_st_rdev=no
3214 fi
3215 rm -f conftest*
3216 fi
3217
3218 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3219 if test $ac_cv_struct_st_rdev = yes; then
3220   cat >> confdefs.h <<\EOF
3221 #define HAVE_ST_RDEV 1
3222 EOF
3223
3224 fi
3225
3226 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3227 echo "configure:3228: checking for d_off in dirent" >&5
3228 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3229   echo $ac_n "(cached) $ac_c" 1>&6
3230 else
3231   cat > conftest.$ac_ext <<EOF
3232 #line 3233 "configure"
3233 #include "confdefs.h"
3234
3235 #include <unistd.h>
3236 #include <sys/types.h>
3237 #include <dirent.h>
3238 int main() {
3239 struct dirent d; d.d_off;
3240 ; return 0; }
3241 EOF
3242 if { (eval echo configure:3243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3243   rm -rf conftest*
3244   ac_cv_dirent_d_off=yes
3245 else
3246   echo "configure: failed program was:" >&5
3247   cat conftest.$ac_ext >&5
3248   rm -rf conftest*
3249   ac_cv_dirent_d_off=no
3250 fi
3251 rm -f conftest*
3252 fi
3253
3254 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3255 if test $ac_cv_dirent_d_off = yes; then
3256   cat >> confdefs.h <<\EOF
3257 #define HAVE_DIRENT_D_OFF 1
3258 EOF
3259
3260 fi
3261
3262 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3263 echo "configure:3264: checking for ino_t" >&5
3264 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3265   echo $ac_n "(cached) $ac_c" 1>&6
3266 else
3267   cat > conftest.$ac_ext <<EOF
3268 #line 3269 "configure"
3269 #include "confdefs.h"
3270 #include <sys/types.h>
3271 #if STDC_HEADERS
3272 #include <stdlib.h>
3273 #include <stddef.h>
3274 #endif
3275 EOF
3276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3277   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3278   rm -rf conftest*
3279   ac_cv_type_ino_t=yes
3280 else
3281   rm -rf conftest*
3282   ac_cv_type_ino_t=no
3283 fi
3284 rm -f conftest*
3285
3286 fi
3287 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3288 if test $ac_cv_type_ino_t = no; then
3289   cat >> confdefs.h <<\EOF
3290 #define ino_t unsigned
3291 EOF
3292
3293 fi
3294
3295 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3296 echo "configure:3297: checking for loff_t" >&5
3297 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3298   echo $ac_n "(cached) $ac_c" 1>&6
3299 else
3300   cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 #include <sys/types.h>
3304 #if STDC_HEADERS
3305 #include <stdlib.h>
3306 #include <stddef.h>
3307 #endif
3308 EOF
3309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3310   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3311   rm -rf conftest*
3312   ac_cv_type_loff_t=yes
3313 else
3314   rm -rf conftest*
3315   ac_cv_type_loff_t=no
3316 fi
3317 rm -f conftest*
3318
3319 fi
3320 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3321 if test $ac_cv_type_loff_t = no; then
3322   cat >> confdefs.h <<\EOF
3323 #define loff_t off_t
3324 EOF
3325
3326 fi
3327
3328 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3329 echo "configure:3330: checking for offset_t" >&5
3330 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3331   echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333   cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336 #include <sys/types.h>
3337 #if STDC_HEADERS
3338 #include <stdlib.h>
3339 #include <stddef.h>
3340 #endif
3341 EOF
3342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3343   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3344   rm -rf conftest*
3345   ac_cv_type_offset_t=yes
3346 else
3347   rm -rf conftest*
3348   ac_cv_type_offset_t=no
3349 fi
3350 rm -f conftest*
3351
3352 fi
3353 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3354 if test $ac_cv_type_offset_t = no; then
3355   cat >> confdefs.h <<\EOF
3356 #define offset_t loff_t
3357 EOF
3358
3359 fi
3360
3361 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3362 echo "configure:3363: checking for ssize_t" >&5
3363 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3364   echo $ac_n "(cached) $ac_c" 1>&6
3365 else
3366   cat > conftest.$ac_ext <<EOF
3367 #line 3368 "configure"
3368 #include "confdefs.h"
3369 #include <sys/types.h>
3370 #if STDC_HEADERS
3371 #include <stdlib.h>
3372 #include <stddef.h>
3373 #endif
3374 EOF
3375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3376   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3377   rm -rf conftest*
3378   ac_cv_type_ssize_t=yes
3379 else
3380   rm -rf conftest*
3381   ac_cv_type_ssize_t=no
3382 fi
3383 rm -f conftest*
3384
3385 fi
3386 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3387 if test $ac_cv_type_ssize_t = no; then
3388   cat >> confdefs.h <<\EOF
3389 #define ssize_t int
3390 EOF
3391
3392 fi
3393
3394 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3395 echo "configure:3396: checking for wchar_t" >&5
3396 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   cat > conftest.$ac_ext <<EOF
3400 #line 3401 "configure"
3401 #include "confdefs.h"
3402 #include <sys/types.h>
3403 #if STDC_HEADERS
3404 #include <stdlib.h>
3405 #include <stddef.h>
3406 #endif
3407 EOF
3408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3409   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3410   rm -rf conftest*
3411   ac_cv_type_wchar_t=yes
3412 else
3413   rm -rf conftest*
3414   ac_cv_type_wchar_t=no
3415 fi
3416 rm -f conftest*
3417
3418 fi
3419 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3420 if test $ac_cv_type_wchar_t = no; then
3421   cat >> confdefs.h <<\EOF
3422 #define wchar_t unsigned short
3423 EOF
3424
3425 fi
3426
3427
3428 ############################################
3429 # for cups support we need libcups, and a handful of header files
3430
3431 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3432 echo "configure:3433: checking for httpConnect in -lcups" >&5
3433 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3434 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3435   echo $ac_n "(cached) $ac_c" 1>&6
3436 else
3437   ac_save_LIBS="$LIBS"
3438 LIBS="-lcups  $LIBS"
3439 cat > conftest.$ac_ext <<EOF
3440 #line 3441 "configure"
3441 #include "confdefs.h"
3442 /* Override any gcc2 internal prototype to avoid an error.  */
3443 /* We use char because int might match the return type of a gcc2
3444     builtin and then its argument prototype would still apply.  */
3445 char httpConnect();
3446
3447 int main() {
3448 httpConnect()
3449 ; return 0; }
3450 EOF
3451 if { (eval echo configure:3452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3452   rm -rf conftest*
3453   eval "ac_cv_lib_$ac_lib_var=yes"
3454 else
3455   echo "configure: failed program was:" >&5
3456   cat conftest.$ac_ext >&5
3457   rm -rf conftest*
3458   eval "ac_cv_lib_$ac_lib_var=no"
3459 fi
3460 rm -f conftest*
3461 LIBS="$ac_save_LIBS"
3462
3463 fi
3464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3465   echo "$ac_t""yes" 1>&6
3466     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3467     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3468   cat >> confdefs.h <<EOF
3469 #define $ac_tr_lib 1
3470 EOF
3471
3472   LIBS="-lcups $LIBS"
3473
3474 else
3475   echo "$ac_t""no" 1>&6
3476 fi
3477
3478
3479 # I wonder if there is a nicer way of doing this?
3480
3481 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3482         for ac_hdr in cups/cups.h cups/language.h
3483 do
3484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3486 echo "configure:3487: checking for $ac_hdr" >&5
3487 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3488   echo $ac_n "(cached) $ac_c" 1>&6
3489 else
3490   cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493 #include <$ac_hdr>
3494 EOF
3495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3496 { (eval echo configure:3497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3498 if test -z "$ac_err"; then
3499   rm -rf conftest*
3500   eval "ac_cv_header_$ac_safe=yes"
3501 else
3502   echo "$ac_err" >&5
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   rm -rf conftest*
3506   eval "ac_cv_header_$ac_safe=no"
3507 fi
3508 rm -f conftest*
3509 fi
3510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3511   echo "$ac_t""yes" 1>&6
3512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3513   cat >> confdefs.h <<EOF
3514 #define $ac_tr_hdr 1
3515 EOF
3516  
3517 else
3518   echo "$ac_t""no" 1>&6
3519 fi
3520 done
3521
3522         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3523                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3524                         cat >> confdefs.h <<\EOF
3525 #define HAVE_CUPS 1
3526 EOF
3527
3528                 fi
3529         fi
3530 fi
3531
3532 ############################################
3533 # we need libdl for PAM and the new VFS code
3534 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3535 echo "configure:3536: checking for dlopen in -ldl" >&5
3536 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3538   echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540   ac_save_LIBS="$LIBS"
3541 LIBS="-ldl  $LIBS"
3542 cat > conftest.$ac_ext <<EOF
3543 #line 3544 "configure"
3544 #include "confdefs.h"
3545 /* Override any gcc2 internal prototype to avoid an error.  */
3546 /* We use char because int might match the return type of a gcc2
3547     builtin and then its argument prototype would still apply.  */
3548 char dlopen();
3549
3550 int main() {
3551 dlopen()
3552 ; return 0; }
3553 EOF
3554 if { (eval echo configure:3555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3555   rm -rf conftest*
3556   eval "ac_cv_lib_$ac_lib_var=yes"
3557 else
3558   echo "configure: failed program was:" >&5
3559   cat conftest.$ac_ext >&5
3560   rm -rf conftest*
3561   eval "ac_cv_lib_$ac_lib_var=no"
3562 fi
3563 rm -f conftest*
3564 LIBS="$ac_save_LIBS"
3565
3566 fi
3567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3568   echo "$ac_t""yes" 1>&6
3569   LIBS="$LIBS -ldl";
3570         cat >> confdefs.h <<\EOF
3571 #define HAVE_LIBDL 1
3572 EOF
3573
3574 else
3575   echo "$ac_t""no" 1>&6
3576 fi
3577
3578
3579 ############################################
3580 # check if the compiler can do immediate structures
3581 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3582 echo "configure:3583: checking for immediate structures" >&5
3583 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586   
3587     cat > conftest.$ac_ext <<EOF
3588 #line 3589 "configure"
3589 #include "confdefs.h"
3590
3591 #include <stdio.h>
3592 int main() {
3593
3594    #define X_FOOBAR(x) ((FOOBAR) { x })
3595    typedef struct {unsigned x;} FOOBAR;
3596    FOOBAR f = X_FOOBAR(1);   
3597
3598 ; return 0; }
3599 EOF
3600 if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3601   rm -rf conftest*
3602   samba_cv_immediate_structures=yes
3603 else
3604   echo "configure: failed program was:" >&5
3605   cat conftest.$ac_ext >&5
3606   rm -rf conftest*
3607   samba_cv_immediate_structures=no
3608 fi
3609 rm -f conftest*
3610 fi
3611
3612 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3613 if test x"$samba_cv_immediate_structures" = x"yes"; then
3614    cat >> confdefs.h <<\EOF
3615 #define HAVE_IMMEDIATE_STRUCTURES 1
3616 EOF
3617
3618 fi
3619
3620 ############################################
3621 # check for unix domain sockets
3622 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3623 echo "configure:3624: checking for unix domain sockets" >&5
3624 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3625   echo $ac_n "(cached) $ac_c" 1>&6
3626 else
3627   
3628     cat > conftest.$ac_ext <<EOF
3629 #line 3630 "configure"
3630 #include "confdefs.h"
3631
3632 #include <sys/types.h>
3633 #include <stdlib.h>
3634 #include <stddef.h>
3635 #include <sys/socket.h>
3636 #include <sys/un.h>
3637 int main() {
3638
3639   struct sockaddr_un sunaddr; 
3640   sunaddr.sun_family = AF_UNIX;
3641
3642 ; return 0; }
3643 EOF
3644 if { (eval echo configure:3645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3645   rm -rf conftest*
3646   samba_cv_unixsocket=yes
3647 else
3648   echo "configure: failed program was:" >&5
3649   cat conftest.$ac_ext >&5
3650   rm -rf conftest*
3651   samba_cv_unixsocket=no
3652 fi
3653 rm -f conftest*
3654 fi
3655
3656 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3657 if test x"$samba_cv_unixsocket" = x"yes"; then
3658    cat >> confdefs.h <<\EOF
3659 #define HAVE_UNIXSOCKET 1
3660 EOF
3661
3662 fi
3663
3664
3665 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3666 echo "configure:3667: checking for socklen_t type" >&5
3667 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3668   echo $ac_n "(cached) $ac_c" 1>&6
3669 else
3670   
3671     cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3674
3675 #include <sys/types.h>
3676 #if STDC_HEADERS
3677 #include <stdlib.h>
3678 #include <stddef.h>
3679 #endif
3680 #include <sys/socket.h>
3681 int main() {
3682 socklen_t i = 0
3683 ; return 0; }
3684 EOF
3685 if { (eval echo configure:3686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3686   rm -rf conftest*
3687   samba_cv_socklen_t=yes
3688 else
3689   echo "configure: failed program was:" >&5
3690   cat conftest.$ac_ext >&5
3691   rm -rf conftest*
3692   samba_cv_socklen_t=no
3693 fi
3694 rm -f conftest*
3695 fi
3696
3697 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3698 if test x"$samba_cv_socklen_t" = x"yes"; then
3699    cat >> confdefs.h <<\EOF
3700 #define HAVE_SOCKLEN_T_TYPE 1
3701 EOF
3702
3703 fi
3704
3705 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3706 echo "configure:3707: checking for sig_atomic_t type" >&5
3707 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3708   echo $ac_n "(cached) $ac_c" 1>&6
3709 else
3710   
3711     cat > conftest.$ac_ext <<EOF
3712 #line 3713 "configure"
3713 #include "confdefs.h"
3714
3715 #include <sys/types.h>
3716 #if STDC_HEADERS
3717 #include <stdlib.h>
3718 #include <stddef.h>
3719 #endif
3720 #include <signal.h>
3721 int main() {
3722 sig_atomic_t i = 0
3723 ; return 0; }
3724 EOF
3725 if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3726   rm -rf conftest*
3727   samba_cv_sig_atomic_t=yes
3728 else
3729   echo "configure: failed program was:" >&5
3730   cat conftest.$ac_ext >&5
3731   rm -rf conftest*
3732   samba_cv_sig_atomic_t=no
3733 fi
3734 rm -f conftest*
3735 fi
3736
3737 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3738 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3739    cat >> confdefs.h <<\EOF
3740 #define HAVE_SIG_ATOMIC_T_TYPE 1
3741 EOF
3742
3743 fi
3744
3745 # stupid headers have the functions but no declaration. grrrr.
3746
3747  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3748 echo "configure:3749: checking for errno declaration" >&5
3749 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   
3753     cat > conftest.$ac_ext <<EOF
3754 #line 3755 "configure"
3755 #include "confdefs.h"
3756 #include <errno.h>
3757 int main() {
3758 int i = (int)errno
3759 ; return 0; }
3760 EOF
3761 if { (eval echo configure:3762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3762   rm -rf conftest*
3763   ac_cv_have_errno_decl=yes
3764 else
3765   echo "configure: failed program was:" >&5
3766   cat conftest.$ac_ext >&5
3767   rm -rf conftest*
3768   ac_cv_have_errno_decl=no
3769 fi
3770 rm -f conftest*
3771 fi
3772
3773 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3774  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3775     cat >> confdefs.h <<\EOF
3776 #define HAVE_ERRNO_DECL 1
3777 EOF
3778
3779  fi
3780
3781
3782  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3783 echo "configure:3784: checking for setresuid declaration" >&5
3784 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3785   echo $ac_n "(cached) $ac_c" 1>&6
3786 else
3787   
3788     cat > conftest.$ac_ext <<EOF
3789 #line 3790 "configure"
3790 #include "confdefs.h"
3791 #include <unistd.h>
3792 int main() {
3793 int i = (int)setresuid
3794 ; return 0; }
3795 EOF
3796 if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3797   rm -rf conftest*
3798   ac_cv_have_setresuid_decl=yes
3799 else
3800   echo "configure: failed program was:" >&5
3801   cat conftest.$ac_ext >&5
3802   rm -rf conftest*
3803   ac_cv_have_setresuid_decl=no
3804 fi
3805 rm -f conftest*
3806 fi
3807
3808 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3809  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3810     cat >> confdefs.h <<\EOF
3811 #define HAVE_SETRESUID_DECL 1
3812 EOF
3813
3814  fi
3815
3816
3817  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3818 echo "configure:3819: checking for setresgid declaration" >&5
3819 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3820   echo $ac_n "(cached) $ac_c" 1>&6
3821 else
3822   
3823     cat > conftest.$ac_ext <<EOF
3824 #line 3825 "configure"
3825 #include "confdefs.h"
3826 #include <unistd.h>
3827 int main() {
3828 int i = (int)setresgid
3829 ; return 0; }
3830 EOF
3831 if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3832   rm -rf conftest*
3833   ac_cv_have_setresgid_decl=yes
3834 else
3835   echo "configure: failed program was:" >&5
3836   cat conftest.$ac_ext >&5
3837   rm -rf conftest*
3838   ac_cv_have_setresgid_decl=no
3839 fi
3840 rm -f conftest*
3841 fi
3842
3843 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3844  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3845     cat >> confdefs.h <<\EOF
3846 #define HAVE_SETRESGID_DECL 1
3847 EOF
3848
3849  fi
3850
3851
3852  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3853 echo "configure:3854: checking for asprintf declaration" >&5
3854 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3855   echo $ac_n "(cached) $ac_c" 1>&6
3856 else
3857   
3858     cat > conftest.$ac_ext <<EOF
3859 #line 3860 "configure"
3860 #include "confdefs.h"
3861 #include <stdio.h>
3862 int main() {
3863 int i = (int)asprintf
3864 ; return 0; }
3865 EOF
3866 if { (eval echo configure:3867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3867   rm -rf conftest*
3868   ac_cv_have_asprintf_decl=yes
3869 else
3870   echo "configure: failed program was:" >&5
3871   cat conftest.$ac_ext >&5
3872   rm -rf conftest*
3873   ac_cv_have_asprintf_decl=no
3874 fi
3875 rm -f conftest*
3876 fi
3877
3878 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3879  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3880     cat >> confdefs.h <<\EOF
3881 #define HAVE_ASPRINTF_DECL 1
3882 EOF
3883
3884  fi
3885
3886
3887  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3888 echo "configure:3889: checking for vasprintf declaration" >&5
3889 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3890   echo $ac_n "(cached) $ac_c" 1>&6
3891 else
3892   
3893     cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896 #include <stdio.h>
3897 int main() {
3898 int i = (int)vasprintf
3899 ; return 0; }
3900 EOF
3901 if { (eval echo configure:3902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3902   rm -rf conftest*
3903   ac_cv_have_vasprintf_decl=yes
3904 else
3905   echo "configure: failed program was:" >&5
3906   cat conftest.$ac_ext >&5
3907   rm -rf conftest*
3908   ac_cv_have_vasprintf_decl=no
3909 fi
3910 rm -f conftest*
3911 fi
3912
3913 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3914  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3915     cat >> confdefs.h <<\EOF
3916 #define HAVE_VASPRINTF_DECL 1
3917 EOF
3918
3919  fi
3920
3921
3922  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3923 echo "configure:3924: checking for vsnprintf declaration" >&5
3924 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3925   echo $ac_n "(cached) $ac_c" 1>&6
3926 else
3927   
3928     cat > conftest.$ac_ext <<EOF
3929 #line 3930 "configure"
3930 #include "confdefs.h"
3931 #include <stdio.h>
3932 int main() {
3933 int i = (int)vsnprintf
3934 ; return 0; }
3935 EOF
3936 if { (eval echo configure:3937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3937   rm -rf conftest*
3938   ac_cv_have_vsnprintf_decl=yes
3939 else
3940   echo "configure: failed program was:" >&5
3941   cat conftest.$ac_ext >&5
3942   rm -rf conftest*
3943   ac_cv_have_vsnprintf_decl=no
3944 fi
3945 rm -f conftest*
3946 fi
3947
3948 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3949  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3950     cat >> confdefs.h <<\EOF
3951 #define HAVE_VSNPRINTF_DECL 1
3952 EOF
3953
3954  fi
3955
3956
3957  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3958 echo "configure:3959: checking for snprintf declaration" >&5
3959 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3960   echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962   
3963     cat > conftest.$ac_ext <<EOF
3964 #line 3965 "configure"
3965 #include "confdefs.h"
3966 #include <stdio.h>
3967 int main() {
3968 int i = (int)snprintf
3969 ; return 0; }
3970 EOF
3971 if { (eval echo configure:3972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3972   rm -rf conftest*
3973   ac_cv_have_snprintf_decl=yes
3974 else
3975   echo "configure: failed program was:" >&5
3976   cat conftest.$ac_ext >&5
3977   rm -rf conftest*
3978   ac_cv_have_snprintf_decl=no
3979 fi
3980 rm -f conftest*
3981 fi
3982
3983 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3984  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3985     cat >> confdefs.h <<\EOF
3986 #define HAVE_SNPRINTF_DECL 1
3987 EOF
3988
3989  fi
3990
3991
3992 # and glibc has setresuid under linux but the function does
3993 # nothing until kernel 2.1.44! very dumb.
3994 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3995 echo "configure:3996: checking for real setresuid" >&5
3996 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3997   echo $ac_n "(cached) $ac_c" 1>&6
3998 else
3999   
4000     if test "$cross_compiling" = yes; then
4001   samba_cv_have_setresuid=cross
4002 else
4003   cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006 #include <errno.h>
4007 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4008 EOF
4009 if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4010 then
4011   samba_cv_have_setresuid=yes
4012 else
4013   echo "configure: failed program was:" >&5
4014   cat conftest.$ac_ext >&5
4015   rm -fr conftest*
4016   samba_cv_have_setresuid=no
4017 fi
4018 rm -fr conftest*
4019 fi
4020
4021 fi
4022
4023 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4024 if test x"$samba_cv_have_setresuid" = x"yes"; then
4025     cat >> confdefs.h <<\EOF
4026 #define HAVE_SETRESUID 1
4027 EOF
4028
4029 fi
4030
4031 # Do the same check for setresguid...
4032 #
4033 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4034 echo "configure:4035: checking for real setresgid" >&5
4035 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4036   echo $ac_n "(cached) $ac_c" 1>&6
4037 else
4038   
4039     if test "$cross_compiling" = yes; then
4040   samba_cv_have_setresgid=cross
4041 else
4042   cat > conftest.$ac_ext <<EOF
4043 #line 4044 "configure"
4044 #include "confdefs.h"
4045 #include <unistd.h>
4046 #include <errno.h>
4047 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4048 EOF
4049 if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4050 then
4051   samba_cv_have_setresgid=yes
4052 else
4053   echo "configure: failed program was:" >&5
4054   cat conftest.$ac_ext >&5
4055   rm -fr conftest*
4056   samba_cv_have_setresgid=no
4057 fi
4058 rm -fr conftest*
4059 fi
4060
4061 fi
4062
4063 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4064 if test x"$samba_cv_have_setresgid" = x"yes"; then
4065     cat >> confdefs.h <<\EOF
4066 #define HAVE_SETRESGID 1
4067 EOF
4068
4069 fi
4070
4071 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4072 echo "configure:4073: checking for 8-bit clean memcmp" >&5
4073 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4074   echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076   if test "$cross_compiling" = yes; then
4077   ac_cv_func_memcmp_clean=no
4078 else
4079   cat > conftest.$ac_ext <<EOF
4080 #line 4081 "configure"
4081 #include "confdefs.h"
4082
4083 main()
4084 {
4085   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4086   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4087 }
4088
4089 EOF
4090 if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4091 then
4092   ac_cv_func_memcmp_clean=yes
4093 else
4094   echo "configure: failed program was:" >&5
4095   cat conftest.$ac_ext >&5
4096   rm -fr conftest*
4097   ac_cv_func_memcmp_clean=no
4098 fi
4099 rm -fr conftest*
4100 fi
4101
4102 fi
4103
4104 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4105 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4106
4107
4108 ###############################################
4109 # test for where we get crypt() from
4110 for ac_func in crypt
4111 do
4112 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4113 echo "configure:4114: checking for $ac_func" >&5
4114 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4115   echo $ac_n "(cached) $ac_c" 1>&6
4116 else
4117   cat > conftest.$ac_ext <<EOF
4118 #line 4119 "configure"
4119 #include "confdefs.h"
4120 /* System header to define __stub macros and hopefully few prototypes,
4121     which can conflict with char $ac_func(); below.  */
4122 #include <assert.h>
4123 /* Override any gcc2 internal prototype to avoid an error.  */
4124 /* We use char because int might match the return type of a gcc2
4125     builtin and then its argument prototype would still apply.  */
4126 char $ac_func();
4127
4128 int main() {
4129
4130 /* The GNU C library defines this for functions which it implements
4131     to always fail with ENOSYS.  Some functions are actually named
4132     something starting with __ and the normal name is an alias.  */
4133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4134 choke me
4135 #else
4136 $ac_func();
4137 #endif
4138
4139 ; return 0; }
4140 EOF
4141 if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4142   rm -rf conftest*
4143   eval "ac_cv_func_$ac_func=yes"
4144 else
4145   echo "configure: failed program was:" >&5
4146   cat conftest.$ac_ext >&5
4147   rm -rf conftest*
4148   eval "ac_cv_func_$ac_func=no"
4149 fi
4150 rm -f conftest*
4151 fi
4152
4153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4154   echo "$ac_t""yes" 1>&6
4155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4156   cat >> confdefs.h <<EOF
4157 #define $ac_tr_func 1
4158 EOF
4159  
4160 else
4161   echo "$ac_t""no" 1>&6
4162 fi
4163 done
4164
4165 if test x"$ac_cv_func_crypt" = x"no"; then
4166     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4167 echo "configure:4168: checking for crypt in -lcrypt" >&5
4168 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4169 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4170   echo $ac_n "(cached) $ac_c" 1>&6
4171 else
4172   ac_save_LIBS="$LIBS"
4173 LIBS="-lcrypt  $LIBS"
4174 cat > conftest.$ac_ext <<EOF
4175 #line 4176 "configure"
4176 #include "confdefs.h"
4177 /* Override any gcc2 internal prototype to avoid an error.  */
4178 /* We use char because int might match the return type of a gcc2
4179     builtin and then its argument prototype would still apply.  */
4180 char crypt();
4181
4182 int main() {
4183 crypt()
4184 ; return 0; }
4185 EOF
4186 if { (eval echo configure:4187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4187   rm -rf conftest*
4188   eval "ac_cv_lib_$ac_lib_var=yes"
4189 else
4190   echo "configure: failed program was:" >&5
4191   cat conftest.$ac_ext >&5
4192   rm -rf conftest*
4193   eval "ac_cv_lib_$ac_lib_var=no"
4194 fi
4195 rm -f conftest*
4196 LIBS="$ac_save_LIBS"
4197
4198 fi
4199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4200   echo "$ac_t""yes" 1>&6
4201   LIBS="$LIBS -lcrypt";
4202         cat >> confdefs.h <<\EOF
4203 #define HAVE_CRYPT 1
4204 EOF
4205
4206 else
4207   echo "$ac_t""no" 1>&6
4208 fi
4209
4210 fi
4211
4212
4213 ###############################################
4214 # Readline included by default unless explicitly asked not to
4215 test "${with_readline+set}" != "set" && with_readline=yes
4216
4217 # test for where we get readline() from
4218 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4219 echo "configure:4220: checking whether to use readline" >&5
4220 # Check whether --with-readline or --without-readline was given.
4221 if test "${with_readline+set}" = set; then
4222   withval="$with_readline"
4223     case "$with_readline" in
4224   yes)
4225     echo "$ac_t""yes" 1>&6
4226
4227     for ac_hdr in readline.h history.h readline/readline.h
4228 do
4229 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4230 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4231 echo "configure:4232: checking for $ac_hdr" >&5
4232 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4233   echo $ac_n "(cached) $ac_c" 1>&6
4234 else
4235   cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238 #include <$ac_hdr>
4239 EOF
4240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4241 { (eval echo configure:4242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4243 if test -z "$ac_err"; then
4244   rm -rf conftest*
4245   eval "ac_cv_header_$ac_safe=yes"
4246 else
4247   echo "$ac_err" >&5
4248   echo "configure: failed program was:" >&5
4249   cat conftest.$ac_ext >&5
4250   rm -rf conftest*
4251   eval "ac_cv_header_$ac_safe=no"
4252 fi
4253 rm -f conftest*
4254 fi
4255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4256   echo "$ac_t""yes" 1>&6
4257     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4258   cat >> confdefs.h <<EOF
4259 #define $ac_tr_hdr 1
4260 EOF
4261  
4262 else
4263   echo "$ac_t""no" 1>&6
4264 fi
4265 done
4266
4267     for ac_hdr in readline/history.h
4268 do
4269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4271 echo "configure:4272: checking for $ac_hdr" >&5
4272 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4273   echo $ac_n "(cached) $ac_c" 1>&6
4274 else
4275   cat > conftest.$ac_ext <<EOF
4276 #line 4277 "configure"
4277 #include "confdefs.h"
4278 #include <$ac_hdr>
4279 EOF
4280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4281 { (eval echo configure:4282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4283 if test -z "$ac_err"; then
4284   rm -rf conftest*
4285   eval "ac_cv_header_$ac_safe=yes"
4286 else
4287   echo "$ac_err" >&5
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -rf conftest*
4291   eval "ac_cv_header_$ac_safe=no"
4292 fi
4293 rm -f conftest*
4294 fi
4295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4296   echo "$ac_t""yes" 1>&6
4297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4298   cat >> confdefs.h <<EOF
4299 #define $ac_tr_hdr 1
4300 EOF
4301  
4302 else
4303   echo "$ac_t""no" 1>&6
4304 fi
4305 done
4306
4307
4308     for ac_hdr in readline.h readline/readline.h
4309 do
4310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4312 echo "configure:4313: checking for $ac_hdr" >&5
4313 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4314   echo $ac_n "(cached) $ac_c" 1>&6
4315 else
4316   cat > conftest.$ac_ext <<EOF
4317 #line 4318 "configure"
4318 #include "confdefs.h"
4319 #include <$ac_hdr>
4320 EOF
4321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4322 { (eval echo configure:4323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4324 if test -z "$ac_err"; then
4325   rm -rf conftest*
4326   eval "ac_cv_header_$ac_safe=yes"
4327 else
4328   echo "$ac_err" >&5
4329   echo "configure: failed program was:" >&5
4330   cat conftest.$ac_ext >&5
4331   rm -rf conftest*
4332   eval "ac_cv_header_$ac_safe=no"
4333 fi
4334 rm -f conftest*
4335 fi
4336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4337   echo "$ac_t""yes" 1>&6
4338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4339   cat >> confdefs.h <<EOF
4340 #define $ac_tr_hdr 1
4341 EOF
4342  
4343       for termlib in ncurses curses termcap terminfo termlib; do
4344        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4345 echo "configure:4346: checking for tgetent in -l${termlib}" >&5
4346 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4347 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4348   echo $ac_n "(cached) $ac_c" 1>&6
4349 else
4350   ac_save_LIBS="$LIBS"
4351 LIBS="-l${termlib}  $LIBS"
4352 cat > conftest.$ac_ext <<EOF
4353 #line 4354 "configure"
4354 #include "confdefs.h"
4355 /* Override any gcc2 internal prototype to avoid an error.  */
4356 /* We use char because int might match the return type of a gcc2
4357     builtin and then its argument prototype would still apply.  */
4358 char tgetent();
4359
4360 int main() {
4361 tgetent()
4362 ; return 0; }
4363 EOF
4364 if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4365   rm -rf conftest*
4366   eval "ac_cv_lib_$ac_lib_var=yes"
4367 else
4368   echo "configure: failed program was:" >&5
4369   cat conftest.$ac_ext >&5
4370   rm -rf conftest*
4371   eval "ac_cv_lib_$ac_lib_var=no"
4372 fi
4373 rm -f conftest*
4374 LIBS="$ac_save_LIBS"
4375
4376 fi
4377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4378   echo "$ac_t""yes" 1>&6
4379   TERMLIBS="-l${termlib}"; break
4380 else
4381   echo "$ac_t""no" 1>&6
4382 fi
4383
4384       done
4385       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4386 echo "configure:4387: checking for rl_callback_handler_install in -lreadline" >&5
4387 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4388 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4389   echo $ac_n "(cached) $ac_c" 1>&6
4390 else
4391   ac_save_LIBS="$LIBS"
4392 LIBS="-lreadline $TERMLIBS $LIBS"
4393 cat > conftest.$ac_ext <<EOF
4394 #line 4395 "configure"
4395 #include "confdefs.h"
4396 /* Override any gcc2 internal prototype to avoid an error.  */
4397 /* We use char because int might match the return type of a gcc2
4398     builtin and then its argument prototype would still apply.  */
4399 char rl_callback_handler_install();
4400
4401 int main() {
4402 rl_callback_handler_install()
4403 ; return 0; }
4404 EOF
4405 if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4406   rm -rf conftest*
4407   eval "ac_cv_lib_$ac_lib_var=yes"
4408 else
4409   echo "configure: failed program was:" >&5
4410   cat conftest.$ac_ext >&5
4411   rm -rf conftest*
4412   eval "ac_cv_lib_$ac_lib_var=no"
4413 fi
4414 rm -f conftest*
4415 LIBS="$ac_save_LIBS"
4416
4417 fi
4418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4419   echo "$ac_t""yes" 1>&6
4420   TERMLIBS="-lreadline $TERMLIBS"
4421        cat >> confdefs.h <<\EOF
4422 #define HAVE_LIBREADLINE 1
4423 EOF
4424
4425        break
4426 else
4427   echo "$ac_t""no" 1>&6
4428 TERMLIBS=
4429 fi
4430
4431 else
4432   echo "$ac_t""no" 1>&6
4433 fi
4434 done
4435
4436     ;;
4437   no)
4438     echo "$ac_t""no" 1>&6
4439     ;;
4440   *)
4441     echo "$ac_t""yes" 1>&6
4442
4443     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4444     # alternate readline path
4445     _ldflags=${LDFLAGS}
4446     _cppflags=${CPPFLAGS}
4447
4448     # Add additional search path
4449     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4450     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4451
4452     for ac_hdr in readline.h history.h readline/readline.h
4453 do
4454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4455 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4456 echo "configure:4457: checking for $ac_hdr" >&5
4457 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4458   echo $ac_n "(cached) $ac_c" 1>&6
4459 else
4460   cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463 #include <$ac_hdr>
4464 EOF
4465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4466 { (eval echo configure:4467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4468 if test -z "$ac_err"; then
4469   rm -rf conftest*
4470   eval "ac_cv_header_$ac_safe=yes"
4471 else
4472   echo "$ac_err" >&5
4473   echo "configure: failed program was:" >&5
4474   cat conftest.$ac_ext >&5
4475   rm -rf conftest*
4476   eval "ac_cv_header_$ac_safe=no"
4477 fi
4478 rm -f conftest*
4479 fi
4480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4481   echo "$ac_t""yes" 1>&6
4482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4483   cat >> confdefs.h <<EOF
4484 #define $ac_tr_hdr 1
4485 EOF
4486  
4487 else
4488   echo "$ac_t""no" 1>&6
4489 fi
4490 done
4491
4492     for ac_hdr in readline/history.h
4493 do
4494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4496 echo "configure:4497: checking for $ac_hdr" >&5
4497 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4498   echo $ac_n "(cached) $ac_c" 1>&6
4499 else
4500   cat > conftest.$ac_ext <<EOF
4501 #line 4502 "configure"
4502 #include "confdefs.h"
4503 #include <$ac_hdr>
4504 EOF
4505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4506 { (eval echo configure:4507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4508 if test -z "$ac_err"; then
4509   rm -rf conftest*
4510   eval "ac_cv_header_$ac_safe=yes"
4511 else
4512   echo "$ac_err" >&5
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -rf conftest*
4516   eval "ac_cv_header_$ac_safe=no"
4517 fi
4518 rm -f conftest*
4519 fi
4520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4521   echo "$ac_t""yes" 1>&6
4522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4523   cat >> confdefs.h <<EOF
4524 #define $ac_tr_hdr 1
4525 EOF
4526  
4527 else
4528   echo "$ac_t""no" 1>&6
4529 fi
4530 done
4531
4532
4533     for ac_hdr in readline.h readline/readline.h
4534 do
4535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4537 echo "configure:4538: checking for $ac_hdr" >&5
4538 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4539   echo $ac_n "(cached) $ac_c" 1>&6
4540 else
4541   cat > conftest.$ac_ext <<EOF
4542 #line 4543 "configure"
4543 #include "confdefs.h"
4544 #include <$ac_hdr>
4545 EOF
4546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4547 { (eval echo configure:4548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4549 if test -z "$ac_err"; then
4550   rm -rf conftest*
4551   eval "ac_cv_header_$ac_safe=yes"
4552 else
4553   echo "$ac_err" >&5
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -rf conftest*
4557   eval "ac_cv_header_$ac_safe=no"
4558 fi
4559 rm -f conftest*
4560 fi
4561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4562   echo "$ac_t""yes" 1>&6
4563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4564   cat >> confdefs.h <<EOF
4565 #define $ac_tr_hdr 1
4566 EOF
4567  
4568       for termlib in ncurses curses termcap terminfo termlib; do
4569        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4570 echo "configure:4571: checking for tgetent in -l${termlib}" >&5
4571 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4572 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4573   echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575   ac_save_LIBS="$LIBS"
4576 LIBS="-l${termlib}  $LIBS"
4577 cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580 /* Override any gcc2 internal prototype to avoid an error.  */
4581 /* We use char because int might match the return type of a gcc2
4582     builtin and then its argument prototype would still apply.  */
4583 char tgetent();
4584
4585 int main() {
4586 tgetent()
4587 ; return 0; }
4588 EOF
4589 if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4590   rm -rf conftest*
4591   eval "ac_cv_lib_$ac_lib_var=yes"
4592 else
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -rf conftest*
4596   eval "ac_cv_lib_$ac_lib_var=no"
4597 fi
4598 rm -f conftest*
4599 LIBS="$ac_save_LIBS"
4600
4601 fi
4602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4603   echo "$ac_t""yes" 1>&6
4604   TERMLIBS="-l${termlib}"; break
4605 else
4606   echo "$ac_t""no" 1>&6
4607 fi
4608
4609       done
4610       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4611 echo "configure:4612: checking for rl_callback_handler_install in -lreadline" >&5
4612 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4614   echo $ac_n "(cached) $ac_c" 1>&6
4615 else
4616   ac_save_LIBS="$LIBS"
4617 LIBS="-lreadline $TERMLIBS $LIBS"
4618 cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621 /* Override any gcc2 internal prototype to avoid an error.  */
4622 /* We use char because int might match the return type of a gcc2
4623     builtin and then its argument prototype would still apply.  */
4624 char rl_callback_handler_install();
4625
4626 int main() {
4627 rl_callback_handler_install()
4628 ; return 0; }
4629 EOF
4630 if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4631   rm -rf conftest*
4632   eval "ac_cv_lib_$ac_lib_var=yes"
4633 else
4634   echo "configure: failed program was:" >&5
4635   cat conftest.$ac_ext >&5
4636   rm -rf conftest*
4637   eval "ac_cv_lib_$ac_lib_var=no"
4638 fi
4639 rm -f conftest*
4640 LIBS="$ac_save_LIBS"
4641
4642 fi
4643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4644   echo "$ac_t""yes" 1>&6
4645   TERMLDFLAGS="-L$with_readline/lib"
4646        TERMCPPFLAGS="-I$with_readline/include"
4647        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4648        TERMLIBS="-lreadline $TERMLIBS"
4649        cat >> confdefs.h <<\EOF
4650 #define HAVE_LIBREADLINE 1
4651 EOF
4652
4653        break
4654 else
4655   echo "$ac_t""no" 1>&6
4656 TERMLIBS= CPPFLAGS=$_cppflags
4657 fi
4658
4659 else
4660   echo "$ac_t""no" 1>&6
4661 fi
4662 done
4663
4664
4665     LDFLAGS=$_ldflags
4666     ;;
4667   esac
4668 else
4669   echo "$ac_t""no" 1>&6
4670
4671 fi
4672
4673
4674
4675
4676 # The readline API changed slightly from readline3 to readline4, so
4677 # code will generate warnings on one of them unless we have a few
4678 # special cases.
4679 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4680 echo "configure:4681: checking for rl_completion_matches in -lreadline" >&5
4681 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4682 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4683   echo $ac_n "(cached) $ac_c" 1>&6
4684 else
4685   ac_save_LIBS="$LIBS"
4686 LIBS="-lreadline $TERMLIBS $LIBS"
4687 cat > conftest.$ac_ext <<EOF
4688 #line 4689 "configure"
4689 #include "confdefs.h"
4690 /* Override any gcc2 internal prototype to avoid an error.  */
4691 /* We use char because int might match the return type of a gcc2
4692     builtin and then its argument prototype would still apply.  */
4693 char rl_completion_matches();
4694
4695 int main() {
4696 rl_completion_matches()
4697 ; return 0; }
4698 EOF
4699 if { (eval echo configure:4700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4700   rm -rf conftest*
4701   eval "ac_cv_lib_$ac_lib_var=yes"
4702 else
4703   echo "configure: failed program was:" >&5
4704   cat conftest.$ac_ext >&5
4705   rm -rf conftest*
4706   eval "ac_cv_lib_$ac_lib_var=no"
4707 fi
4708 rm -f conftest*
4709 LIBS="$ac_save_LIBS"
4710
4711 fi
4712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4713   echo "$ac_t""yes" 1>&6
4714   cat >> confdefs.h <<\EOF
4715 #define HAVE_NEW_LIBREADLINE 1
4716 EOF
4717
4718 else
4719   echo "$ac_t""no" 1>&6
4720 fi
4721
4722
4723 # The following test taken from the cvs sources
4724 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4725 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4726 # libsocket.so which has a bad implementation of gethostbyname (it
4727 # only looks in /etc/hosts), so we only look for -lsocket if we need
4728 # it.
4729 for ac_func in connect
4730 do
4731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4732 echo "configure:4733: checking for $ac_func" >&5
4733 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   cat > conftest.$ac_ext <<EOF
4737 #line 4738 "configure"
4738 #include "confdefs.h"
4739 /* System header to define __stub macros and hopefully few prototypes,
4740     which can conflict with char $ac_func(); below.  */
4741 #include <assert.h>
4742 /* Override any gcc2 internal prototype to avoid an error.  */
4743 /* We use char because int might match the return type of a gcc2
4744     builtin and then its argument prototype would still apply.  */
4745 char $ac_func();
4746
4747 int main() {
4748
4749 /* The GNU C library defines this for functions which it implements
4750     to always fail with ENOSYS.  Some functions are actually named
4751     something starting with __ and the normal name is an alias.  */
4752 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4753 choke me
4754 #else
4755 $ac_func();
4756 #endif
4757
4758 ; return 0; }
4759 EOF
4760 if { (eval echo configure:4761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4761   rm -rf conftest*
4762   eval "ac_cv_func_$ac_func=yes"
4763 else
4764   echo "configure: failed program was:" >&5
4765   cat conftest.$ac_ext >&5
4766   rm -rf conftest*
4767   eval "ac_cv_func_$ac_func=no"
4768 fi
4769 rm -f conftest*
4770 fi
4771
4772 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4773   echo "$ac_t""yes" 1>&6
4774     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4775   cat >> confdefs.h <<EOF
4776 #define $ac_tr_func 1
4777 EOF
4778  
4779 else
4780   echo "$ac_t""no" 1>&6
4781 fi
4782 done
4783
4784 if test x"$ac_cv_func_connect" = x"no"; then
4785     case "$LIBS" in
4786     *-lnsl*) ;;
4787     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4788 echo "configure:4789: checking for printf in -lnsl_s" >&5
4789 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4790 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4791   echo $ac_n "(cached) $ac_c" 1>&6
4792 else
4793   ac_save_LIBS="$LIBS"
4794 LIBS="-lnsl_s  $LIBS"
4795 cat > conftest.$ac_ext <<EOF
4796 #line 4797 "configure"
4797 #include "confdefs.h"
4798 /* Override any gcc2 internal prototype to avoid an error.  */
4799 /* We use char because int might match the return type of a gcc2
4800     builtin and then its argument prototype would still apply.  */
4801 char printf();
4802
4803 int main() {
4804 printf()
4805 ; return 0; }
4806 EOF
4807 if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4808   rm -rf conftest*
4809   eval "ac_cv_lib_$ac_lib_var=yes"
4810 else
4811   echo "configure: failed program was:" >&5
4812   cat conftest.$ac_ext >&5
4813   rm -rf conftest*
4814   eval "ac_cv_lib_$ac_lib_var=no"
4815 fi
4816 rm -f conftest*
4817 LIBS="$ac_save_LIBS"
4818
4819 fi
4820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4821   echo "$ac_t""yes" 1>&6
4822     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4823     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4824   cat >> confdefs.h <<EOF
4825 #define $ac_tr_lib 1
4826 EOF
4827
4828   LIBS="-lnsl_s $LIBS"
4829
4830 else
4831   echo "$ac_t""no" 1>&6
4832 fi
4833  ;;
4834     esac
4835     case "$LIBS" in
4836     *-lnsl*) ;;
4837     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4838 echo "configure:4839: checking for printf in -lnsl" >&5
4839 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4840 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4841   echo $ac_n "(cached) $ac_c" 1>&6
4842 else
4843   ac_save_LIBS="$LIBS"
4844 LIBS="-lnsl  $LIBS"
4845 cat > conftest.$ac_ext <<EOF
4846 #line 4847 "configure"
4847 #include "confdefs.h"
4848 /* Override any gcc2 internal prototype to avoid an error.  */
4849 /* We use char because int might match the return type of a gcc2
4850     builtin and then its argument prototype would still apply.  */
4851 char printf();
4852
4853 int main() {
4854 printf()
4855 ; return 0; }
4856 EOF
4857 if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4858   rm -rf conftest*
4859   eval "ac_cv_lib_$ac_lib_var=yes"
4860 else
4861   echo "configure: failed program was:" >&5
4862   cat conftest.$ac_ext >&5
4863   rm -rf conftest*
4864   eval "ac_cv_lib_$ac_lib_var=no"
4865 fi
4866 rm -f conftest*
4867 LIBS="$ac_save_LIBS"
4868
4869 fi
4870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4871   echo "$ac_t""yes" 1>&6
4872     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4873     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4874   cat >> confdefs.h <<EOF
4875 #define $ac_tr_lib 1
4876 EOF
4877
4878   LIBS="-lnsl $LIBS"
4879
4880 else
4881   echo "$ac_t""no" 1>&6
4882 fi
4883  ;;
4884     esac
4885     case "$LIBS" in
4886     *-lsocket*) ;;
4887     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4888 echo "configure:4889: checking for connect in -lsocket" >&5
4889 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4890 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4891   echo $ac_n "(cached) $ac_c" 1>&6
4892 else
4893   ac_save_LIBS="$LIBS"
4894 LIBS="-lsocket  $LIBS"
4895 cat > conftest.$ac_ext <<EOF
4896 #line 4897 "configure"
4897 #include "confdefs.h"
4898 /* Override any gcc2 internal prototype to avoid an error.  */
4899 /* We use char because int might match the return type of a gcc2
4900     builtin and then its argument prototype would still apply.  */
4901 char connect();
4902
4903 int main() {
4904 connect()
4905 ; return 0; }
4906 EOF
4907 if { (eval echo configure:4908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4908   rm -rf conftest*
4909   eval "ac_cv_lib_$ac_lib_var=yes"
4910 else
4911   echo "configure: failed program was:" >&5
4912   cat conftest.$ac_ext >&5
4913   rm -rf conftest*
4914   eval "ac_cv_lib_$ac_lib_var=no"
4915 fi
4916 rm -f conftest*
4917 LIBS="$ac_save_LIBS"
4918
4919 fi
4920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4921   echo "$ac_t""yes" 1>&6
4922     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4923     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4924   cat >> confdefs.h <<EOF
4925 #define $ac_tr_lib 1
4926 EOF
4927
4928   LIBS="-lsocket $LIBS"
4929
4930 else
4931   echo "$ac_t""no" 1>&6
4932 fi
4933  ;;
4934     esac
4935     case "$LIBS" in
4936     *-linet*) ;;
4937     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4938 echo "configure:4939: checking for connect in -linet" >&5
4939 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4940 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   ac_save_LIBS="$LIBS"
4944 LIBS="-linet  $LIBS"
4945 cat > conftest.$ac_ext <<EOF
4946 #line 4947 "configure"
4947 #include "confdefs.h"
4948 /* Override any gcc2 internal prototype to avoid an error.  */
4949 /* We use char because int might match the return type of a gcc2
4950     builtin and then its argument prototype would still apply.  */
4951 char connect();
4952
4953 int main() {
4954 connect()
4955 ; return 0; }
4956 EOF
4957 if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4958   rm -rf conftest*
4959   eval "ac_cv_lib_$ac_lib_var=yes"
4960 else
4961   echo "configure: failed program was:" >&5
4962   cat conftest.$ac_ext >&5
4963   rm -rf conftest*
4964   eval "ac_cv_lib_$ac_lib_var=no"
4965 fi
4966 rm -f conftest*
4967 LIBS="$ac_save_LIBS"
4968
4969 fi
4970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4971   echo "$ac_t""yes" 1>&6
4972     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4973     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4974   cat >> confdefs.h <<EOF
4975 #define $ac_tr_lib 1
4976 EOF
4977
4978   LIBS="-linet $LIBS"
4979
4980 else
4981   echo "$ac_t""no" 1>&6
4982 fi
4983  ;;
4984     esac
4985             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4986        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4987         # ac_cv_func_connect=yes
4988         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4989         cat >> confdefs.h <<\EOF
4990 #define HAVE_CONNECT 1
4991 EOF
4992
4993     fi
4994 fi
4995
4996 ###############################################
4997 # test for where we get get_yp_default_domain() from
4998 for ac_func in yp_get_default_domain
4999 do
5000 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5001 echo "configure:5002: checking for $ac_func" >&5
5002 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5003   echo $ac_n "(cached) $ac_c" 1>&6
5004 else
5005   cat > conftest.$ac_ext <<EOF
5006 #line 5007 "configure"
5007 #include "confdefs.h"
5008 /* System header to define __stub macros and hopefully few prototypes,
5009     which can conflict with char $ac_func(); below.  */
5010 #include <assert.h>
5011 /* Override any gcc2 internal prototype to avoid an error.  */
5012 /* We use char because int might match the return type of a gcc2
5013     builtin and then its argument prototype would still apply.  */
5014 char $ac_func();
5015
5016 int main() {
5017
5018 /* The GNU C library defines this for functions which it implements
5019     to always fail with ENOSYS.  Some functions are actually named
5020     something starting with __ and the normal name is an alias.  */
5021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5022 choke me
5023 #else
5024 $ac_func();
5025 #endif
5026
5027 ; return 0; }
5028 EOF
5029 if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5030   rm -rf conftest*
5031   eval "ac_cv_func_$ac_func=yes"
5032 else
5033   echo "configure: failed program was:" >&5
5034   cat conftest.$ac_ext >&5
5035   rm -rf conftest*
5036   eval "ac_cv_func_$ac_func=no"
5037 fi
5038 rm -f conftest*
5039 fi
5040
5041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5042   echo "$ac_t""yes" 1>&6
5043     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5044   cat >> confdefs.h <<EOF
5045 #define $ac_tr_func 1
5046 EOF
5047  
5048 else
5049   echo "$ac_t""no" 1>&6
5050 fi
5051 done
5052
5053 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5054         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5055 echo "configure:5056: checking for yp_get_default_domain in -lnsl" >&5
5056 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5057 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5058   echo $ac_n "(cached) $ac_c" 1>&6
5059 else
5060   ac_save_LIBS="$LIBS"
5061 LIBS="-lnsl  $LIBS"
5062 cat > conftest.$ac_ext <<EOF
5063 #line 5064 "configure"
5064 #include "confdefs.h"
5065 /* Override any gcc2 internal prototype to avoid an error.  */
5066 /* We use char because int might match the return type of a gcc2
5067     builtin and then its argument prototype would still apply.  */
5068 char yp_get_default_domain();
5069
5070 int main() {
5071 yp_get_default_domain()
5072 ; return 0; }
5073 EOF
5074 if { (eval echo configure:5075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5075   rm -rf conftest*
5076   eval "ac_cv_lib_$ac_lib_var=yes"
5077 else
5078   echo "configure: failed program was:" >&5
5079   cat conftest.$ac_ext >&5
5080   rm -rf conftest*
5081   eval "ac_cv_lib_$ac_lib_var=no"
5082 fi
5083 rm -f conftest*
5084 LIBS="$ac_save_LIBS"
5085
5086 fi
5087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5088   echo "$ac_t""yes" 1>&6
5089   LIBS="$LIBS -lnsl";
5090         cat >> confdefs.h <<\EOF
5091 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5092 EOF
5093
5094 else
5095   echo "$ac_t""no" 1>&6
5096 fi
5097  
5098 fi
5099
5100 # Check if we have execl, if not we need to compile smbrun.
5101 for ac_func in execl
5102 do
5103 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5104 echo "configure:5105: checking for $ac_func" >&5
5105 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5106   echo $ac_n "(cached) $ac_c" 1>&6
5107 else
5108   cat > conftest.$ac_ext <<EOF
5109 #line 5110 "configure"
5110 #include "confdefs.h"
5111 /* System header to define __stub macros and hopefully few prototypes,
5112     which can conflict with char $ac_func(); below.  */
5113 #include <assert.h>
5114 /* Override any gcc2 internal prototype to avoid an error.  */
5115 /* We use char because int might match the return type of a gcc2
5116     builtin and then its argument prototype would still apply.  */
5117 char $ac_func();
5118
5119 int main() {
5120
5121 /* The GNU C library defines this for functions which it implements
5122     to always fail with ENOSYS.  Some functions are actually named
5123     something starting with __ and the normal name is an alias.  */
5124 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5125 choke me
5126 #else
5127 $ac_func();
5128 #endif
5129
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   eval "ac_cv_func_$ac_func=yes"
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   eval "ac_cv_func_$ac_func=no"
5140 fi
5141 rm -f conftest*
5142 fi
5143
5144 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5145   echo "$ac_t""yes" 1>&6
5146     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5147   cat >> confdefs.h <<EOF
5148 #define $ac_tr_func 1
5149 EOF
5150  
5151 else
5152   echo "$ac_t""no" 1>&6
5153 fi
5154 done
5155
5156 if test x"$ac_cv_func_execl" = x"no"; then
5157     RUNPROG="bin/smbrun"
5158 else
5159     RUNPROG=""
5160 fi
5161
5162 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5163 do
5164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5165 echo "configure:5166: checking for $ac_func" >&5
5166 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5167   echo $ac_n "(cached) $ac_c" 1>&6
5168 else
5169   cat > conftest.$ac_ext <<EOF
5170 #line 5171 "configure"
5171 #include "confdefs.h"
5172 /* System header to define __stub macros and hopefully few prototypes,
5173     which can conflict with char $ac_func(); below.  */
5174 #include <assert.h>
5175 /* Override any gcc2 internal prototype to avoid an error.  */
5176 /* We use char because int might match the return type of a gcc2
5177     builtin and then its argument prototype would still apply.  */
5178 char $ac_func();
5179
5180 int main() {
5181
5182 /* The GNU C library defines this for functions which it implements
5183     to always fail with ENOSYS.  Some functions are actually named
5184     something starting with __ and the normal name is an alias.  */
5185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5186 choke me
5187 #else
5188 $ac_func();
5189 #endif
5190
5191 ; return 0; }
5192 EOF
5193 if { (eval echo configure:5194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5194   rm -rf conftest*
5195   eval "ac_cv_func_$ac_func=yes"
5196 else
5197   echo "configure: failed program was:" >&5
5198   cat conftest.$ac_ext >&5
5199   rm -rf conftest*
5200   eval "ac_cv_func_$ac_func=no"
5201 fi
5202 rm -f conftest*
5203 fi
5204
5205 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5206   echo "$ac_t""yes" 1>&6
5207     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5208   cat >> confdefs.h <<EOF
5209 #define $ac_tr_func 1
5210 EOF
5211  
5212 else
5213   echo "$ac_t""no" 1>&6
5214 fi
5215 done
5216
5217 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5218 do
5219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5220 echo "configure:5221: checking for $ac_func" >&5
5221 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5222   echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224   cat > conftest.$ac_ext <<EOF
5225 #line 5226 "configure"
5226 #include "confdefs.h"
5227 /* System header to define __stub macros and hopefully few prototypes,
5228     which can conflict with char $ac_func(); below.  */
5229 #include <assert.h>
5230 /* Override any gcc2 internal prototype to avoid an error.  */
5231 /* We use char because int might match the return type of a gcc2
5232     builtin and then its argument prototype would still apply.  */
5233 char $ac_func();
5234
5235 int main() {
5236
5237 /* The GNU C library defines this for functions which it implements
5238     to always fail with ENOSYS.  Some functions are actually named
5239     something starting with __ and the normal name is an alias.  */
5240 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5241 choke me
5242 #else
5243 $ac_func();
5244 #endif
5245
5246 ; return 0; }
5247 EOF
5248 if { (eval echo configure:5249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5249   rm -rf conftest*
5250   eval "ac_cv_func_$ac_func=yes"
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254   rm -rf conftest*
5255   eval "ac_cv_func_$ac_func=no"
5256 fi
5257 rm -f conftest*
5258 fi
5259
5260 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5261   echo "$ac_t""yes" 1>&6
5262     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5263   cat >> confdefs.h <<EOF
5264 #define $ac_tr_func 1
5265 EOF
5266  
5267 else
5268   echo "$ac_t""no" 1>&6
5269 fi
5270 done
5271
5272 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5273 do
5274 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5275 echo "configure:5276: checking for $ac_func" >&5
5276 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5277   echo $ac_n "(cached) $ac_c" 1>&6
5278 else
5279   cat > conftest.$ac_ext <<EOF
5280 #line 5281 "configure"
5281 #include "confdefs.h"
5282 /* System header to define __stub macros and hopefully few prototypes,
5283     which can conflict with char $ac_func(); below.  */
5284 #include <assert.h>
5285 /* Override any gcc2 internal prototype to avoid an error.  */
5286 /* We use char because int might match the return type of a gcc2
5287     builtin and then its argument prototype would still apply.  */
5288 char $ac_func();
5289
5290 int main() {
5291
5292 /* The GNU C library defines this for functions which it implements
5293     to always fail with ENOSYS.  Some functions are actually named
5294     something starting with __ and the normal name is an alias.  */
5295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5296 choke me
5297 #else
5298 $ac_func();
5299 #endif
5300
5301 ; return 0; }
5302 EOF
5303 if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5304   rm -rf conftest*
5305   eval "ac_cv_func_$ac_func=yes"
5306 else
5307   echo "configure: failed program was:" >&5
5308   cat conftest.$ac_ext >&5
5309   rm -rf conftest*
5310   eval "ac_cv_func_$ac_func=no"
5311 fi
5312 rm -f conftest*
5313 fi
5314
5315 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5316   echo "$ac_t""yes" 1>&6
5317     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5318   cat >> confdefs.h <<EOF
5319 #define $ac_tr_func 1
5320 EOF
5321  
5322 else
5323   echo "$ac_t""no" 1>&6
5324 fi
5325 done
5326
5327 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5328 do
5329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5330 echo "configure:5331: checking for $ac_func" >&5
5331 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5332   echo $ac_n "(cached) $ac_c" 1>&6
5333 else
5334   cat > conftest.$ac_ext <<EOF
5335 #line 5336 "configure"
5336 #include "confdefs.h"
5337 /* System header to define __stub macros and hopefully few prototypes,
5338     which can conflict with char $ac_func(); below.  */
5339 #include <assert.h>
5340 /* Override any gcc2 internal prototype to avoid an error.  */
5341 /* We use char because int might match the return type of a gcc2
5342     builtin and then its argument prototype would still apply.  */
5343 char $ac_func();
5344
5345 int main() {
5346
5347 /* The GNU C library defines this for functions which it implements
5348     to always fail with ENOSYS.  Some functions are actually named
5349     something starting with __ and the normal name is an alias.  */
5350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5351 choke me
5352 #else
5353 $ac_func();
5354 #endif
5355
5356 ; return 0; }
5357 EOF
5358 if { (eval echo configure:5359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5359   rm -rf conftest*
5360   eval "ac_cv_func_$ac_func=yes"
5361 else
5362   echo "configure: failed program was:" >&5
5363   cat conftest.$ac_ext >&5
5364   rm -rf conftest*
5365   eval "ac_cv_func_$ac_func=no"
5366 fi
5367 rm -f conftest*
5368 fi
5369
5370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5371   echo "$ac_t""yes" 1>&6
5372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5373   cat >> confdefs.h <<EOF
5374 #define $ac_tr_func 1
5375 EOF
5376  
5377 else
5378   echo "$ac_t""no" 1>&6
5379 fi
5380 done
5381
5382 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5383 do
5384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5385 echo "configure:5386: checking for $ac_func" >&5
5386 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5387   echo $ac_n "(cached) $ac_c" 1>&6
5388 else
5389   cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392 /* System header to define __stub macros and hopefully few prototypes,
5393     which can conflict with char $ac_func(); below.  */
5394 #include <assert.h>
5395 /* Override any gcc2 internal prototype to avoid an error.  */
5396 /* We use char because int might match the return type of a gcc2
5397     builtin and then its argument prototype would still apply.  */
5398 char $ac_func();
5399
5400 int main() {
5401
5402 /* The GNU C library defines this for functions which it implements
5403     to always fail with ENOSYS.  Some functions are actually named
5404     something starting with __ and the normal name is an alias.  */
5405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5406 choke me
5407 #else
5408 $ac_func();
5409 #endif
5410
5411 ; return 0; }
5412 EOF
5413 if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5414   rm -rf conftest*
5415   eval "ac_cv_func_$ac_func=yes"
5416 else
5417   echo "configure: failed program was:" >&5
5418   cat conftest.$ac_ext >&5
5419   rm -rf conftest*
5420   eval "ac_cv_func_$ac_func=no"
5421 fi
5422 rm -f conftest*
5423 fi
5424
5425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5426   echo "$ac_t""yes" 1>&6
5427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5428   cat >> confdefs.h <<EOF
5429 #define $ac_tr_func 1
5430 EOF
5431  
5432 else
5433   echo "$ac_t""no" 1>&6
5434 fi
5435 done
5436
5437 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5438 do
5439 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5440 echo "configure:5441: checking for $ac_func" >&5
5441 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5442   echo $ac_n "(cached) $ac_c" 1>&6
5443 else
5444   cat > conftest.$ac_ext <<EOF
5445 #line 5446 "configure"
5446 #include "confdefs.h"
5447 /* System header to define __stub macros and hopefully few prototypes,
5448     which can conflict with char $ac_func(); below.  */
5449 #include <assert.h>
5450 /* Override any gcc2 internal prototype to avoid an error.  */
5451 /* We use char because int might match the return type of a gcc2
5452     builtin and then its argument prototype would still apply.  */
5453 char $ac_func();
5454
5455 int main() {
5456
5457 /* The GNU C library defines this for functions which it implements
5458     to always fail with ENOSYS.  Some functions are actually named
5459     something starting with __ and the normal name is an alias.  */
5460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5461 choke me
5462 #else
5463 $ac_func();
5464 #endif
5465
5466 ; return 0; }
5467 EOF
5468 if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5469   rm -rf conftest*
5470   eval "ac_cv_func_$ac_func=yes"
5471 else
5472   echo "configure: failed program was:" >&5
5473   cat conftest.$ac_ext >&5
5474   rm -rf conftest*
5475   eval "ac_cv_func_$ac_func=no"
5476 fi
5477 rm -f conftest*
5478 fi
5479
5480 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5481   echo "$ac_t""yes" 1>&6
5482     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5483   cat >> confdefs.h <<EOF
5484 #define $ac_tr_func 1
5485 EOF
5486  
5487 else
5488   echo "$ac_t""no" 1>&6
5489 fi
5490 done
5491
5492 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5493 do
5494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5495 echo "configure:5496: checking for $ac_func" >&5
5496 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5497   echo $ac_n "(cached) $ac_c" 1>&6
5498 else
5499   cat > conftest.$ac_ext <<EOF
5500 #line 5501 "configure"
5501 #include "confdefs.h"
5502 /* System header to define __stub macros and hopefully few prototypes,
5503     which can conflict with char $ac_func(); below.  */
5504 #include <assert.h>
5505 /* Override any gcc2 internal prototype to avoid an error.  */
5506 /* We use char because int might match the return type of a gcc2
5507     builtin and then its argument prototype would still apply.  */
5508 char $ac_func();
5509
5510 int main() {
5511
5512 /* The GNU C library defines this for functions which it implements
5513     to always fail with ENOSYS.  Some functions are actually named
5514     something starting with __ and the normal name is an alias.  */
5515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5516 choke me
5517 #else
5518 $ac_func();
5519 #endif
5520
5521 ; return 0; }
5522 EOF
5523 if { (eval echo configure:5524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5524   rm -rf conftest*
5525   eval "ac_cv_func_$ac_func=yes"
5526 else
5527   echo "configure: failed program was:" >&5
5528   cat conftest.$ac_ext >&5
5529   rm -rf conftest*
5530   eval "ac_cv_func_$ac_func=no"
5531 fi
5532 rm -f conftest*
5533 fi
5534
5535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5536   echo "$ac_t""yes" 1>&6
5537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5538   cat >> confdefs.h <<EOF
5539 #define $ac_tr_func 1
5540 EOF
5541  
5542 else
5543   echo "$ac_t""no" 1>&6
5544 fi
5545 done
5546
5547 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5548 do
5549 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5550 echo "configure:5551: checking for $ac_func" >&5
5551 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5552   echo $ac_n "(cached) $ac_c" 1>&6
5553 else
5554   cat > conftest.$ac_ext <<EOF
5555 #line 5556 "configure"
5556 #include "confdefs.h"
5557 /* System header to define __stub macros and hopefully few prototypes,
5558     which can conflict with char $ac_func(); below.  */
5559 #include <assert.h>
5560 /* Override any gcc2 internal prototype to avoid an error.  */
5561 /* We use char because int might match the return type of a gcc2
5562     builtin and then its argument prototype would still apply.  */
5563 char $ac_func();
5564
5565 int main() {
5566
5567 /* The GNU C library defines this for functions which it implements
5568     to always fail with ENOSYS.  Some functions are actually named
5569     something starting with __ and the normal name is an alias.  */
5570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5571 choke me
5572 #else
5573 $ac_func();
5574 #endif
5575
5576 ; return 0; }
5577 EOF
5578 if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5579   rm -rf conftest*
5580   eval "ac_cv_func_$ac_func=yes"
5581 else
5582   echo "configure: failed program was:" >&5
5583   cat conftest.$ac_ext >&5
5584   rm -rf conftest*
5585   eval "ac_cv_func_$ac_func=no"
5586 fi
5587 rm -f conftest*
5588 fi
5589
5590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5591   echo "$ac_t""yes" 1>&6
5592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5593   cat >> confdefs.h <<EOF
5594 #define $ac_tr_func 1
5595 EOF
5596  
5597 else
5598   echo "$ac_t""no" 1>&6
5599 fi
5600 done
5601
5602 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5603 do
5604 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5605 echo "configure:5606: checking for $ac_func" >&5
5606 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5607   echo $ac_n "(cached) $ac_c" 1>&6
5608 else
5609   cat > conftest.$ac_ext <<EOF
5610 #line 5611 "configure"
5611 #include "confdefs.h"
5612 /* System header to define __stub macros and hopefully few prototypes,
5613     which can conflict with char $ac_func(); below.  */
5614 #include <assert.h>
5615 /* Override any gcc2 internal prototype to avoid an error.  */
5616 /* We use char because int might match the return type of a gcc2
5617     builtin and then its argument prototype would still apply.  */
5618 char $ac_func();
5619
5620 int main() {
5621
5622 /* The GNU C library defines this for functions which it implements
5623     to always fail with ENOSYS.  Some functions are actually named
5624     something starting with __ and the normal name is an alias.  */
5625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5626 choke me
5627 #else
5628 $ac_func();
5629 #endif
5630
5631 ; return 0; }
5632 EOF
5633 if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5634   rm -rf conftest*
5635   eval "ac_cv_func_$ac_func=yes"
5636 else
5637   echo "configure: failed program was:" >&5
5638   cat conftest.$ac_ext >&5
5639   rm -rf conftest*
5640   eval "ac_cv_func_$ac_func=no"
5641 fi
5642 rm -f conftest*
5643 fi
5644
5645 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5646   echo "$ac_t""yes" 1>&6
5647     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5648   cat >> confdefs.h <<EOF
5649 #define $ac_tr_func 1
5650 EOF
5651  
5652 else
5653   echo "$ac_t""no" 1>&6
5654 fi
5655 done
5656
5657 for ac_func in syslog vsyslog
5658 do
5659 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5660 echo "configure:5661: checking for $ac_func" >&5
5661 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5662   echo $ac_n "(cached) $ac_c" 1>&6
5663 else
5664   cat > conftest.$ac_ext <<EOF
5665 #line 5666 "configure"
5666 #include "confdefs.h"
5667 /* System header to define __stub macros and hopefully few prototypes,
5668     which can conflict with char $ac_func(); below.  */
5669 #include <assert.h>
5670 /* Override any gcc2 internal prototype to avoid an error.  */
5671 /* We use char because int might match the return type of a gcc2
5672     builtin and then its argument prototype would still apply.  */
5673 char $ac_func();
5674
5675 int main() {
5676
5677 /* The GNU C library defines this for functions which it implements
5678     to always fail with ENOSYS.  Some functions are actually named
5679     something starting with __ and the normal name is an alias.  */
5680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5681 choke me
5682 #else
5683 $ac_func();
5684 #endif
5685
5686 ; return 0; }
5687 EOF
5688 if { (eval echo configure:5689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5689   rm -rf conftest*
5690   eval "ac_cv_func_$ac_func=yes"
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694   rm -rf conftest*
5695   eval "ac_cv_func_$ac_func=no"
5696 fi
5697 rm -f conftest*
5698 fi
5699
5700 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5701   echo "$ac_t""yes" 1>&6
5702     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5703   cat >> confdefs.h <<EOF
5704 #define $ac_tr_func 1
5705 EOF
5706  
5707 else
5708   echo "$ac_t""no" 1>&6
5709 fi
5710 done
5711
5712 # setbuffer is needed for smbtorture
5713 for ac_func in setbuffer
5714 do
5715 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5716 echo "configure:5717: checking for $ac_func" >&5
5717 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5718   echo $ac_n "(cached) $ac_c" 1>&6
5719 else
5720   cat > conftest.$ac_ext <<EOF
5721 #line 5722 "configure"
5722 #include "confdefs.h"
5723 /* System header to define __stub macros and hopefully few prototypes,
5724     which can conflict with char $ac_func(); below.  */
5725 #include <assert.h>
5726 /* Override any gcc2 internal prototype to avoid an error.  */
5727 /* We use char because int might match the return type of a gcc2
5728     builtin and then its argument prototype would still apply.  */
5729 char $ac_func();
5730
5731 int main() {
5732
5733 /* The GNU C library defines this for functions which it implements
5734     to always fail with ENOSYS.  Some functions are actually named
5735     something starting with __ and the normal name is an alias.  */
5736 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5737 choke me
5738 #else
5739 $ac_func();
5740 #endif
5741
5742 ; return 0; }
5743 EOF
5744 if { (eval echo configure:5745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5745   rm -rf conftest*
5746   eval "ac_cv_func_$ac_func=yes"
5747 else
5748   echo "configure: failed program was:" >&5
5749   cat conftest.$ac_ext >&5
5750   rm -rf conftest*
5751   eval "ac_cv_func_$ac_func=no"
5752 fi
5753 rm -f conftest*
5754 fi
5755
5756 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5757   echo "$ac_t""yes" 1>&6
5758     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5759   cat >> confdefs.h <<EOF
5760 #define $ac_tr_func 1
5761 EOF
5762  
5763 else
5764   echo "$ac_t""no" 1>&6
5765 fi
5766 done
5767
5768
5769 # syscall() is needed for smbwrapper.
5770 for ac_func in syscall
5771 do
5772 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5773 echo "configure:5774: checking for $ac_func" >&5
5774 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5775   echo $ac_n "(cached) $ac_c" 1>&6
5776 else
5777   cat > conftest.$ac_ext <<EOF
5778 #line 5779 "configure"
5779 #include "confdefs.h"
5780 /* System header to define __stub macros and hopefully few prototypes,
5781     which can conflict with char $ac_func(); below.  */
5782 #include <assert.h>
5783 /* Override any gcc2 internal prototype to avoid an error.  */
5784 /* We use char because int might match the return type of a gcc2
5785     builtin and then its argument prototype would still apply.  */
5786 char $ac_func();
5787
5788 int main() {
5789
5790 /* The GNU C library defines this for functions which it implements
5791     to always fail with ENOSYS.  Some functions are actually named
5792     something starting with __ and the normal name is an alias.  */
5793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5794 choke me
5795 #else
5796 $ac_func();
5797 #endif
5798
5799 ; return 0; }
5800 EOF
5801 if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5802   rm -rf conftest*
5803   eval "ac_cv_func_$ac_func=yes"
5804 else
5805   echo "configure: failed program was:" >&5
5806   cat conftest.$ac_ext >&5
5807   rm -rf conftest*
5808   eval "ac_cv_func_$ac_func=no"
5809 fi
5810 rm -f conftest*
5811 fi
5812
5813 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5814   echo "$ac_t""yes" 1>&6
5815     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5816   cat >> confdefs.h <<EOF
5817 #define $ac_tr_func 1
5818 EOF
5819  
5820 else
5821   echo "$ac_t""no" 1>&6
5822 fi
5823 done
5824
5825
5826 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5827 do
5828 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5829 echo "configure:5830: checking for $ac_func" >&5
5830 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5831   echo $ac_n "(cached) $ac_c" 1>&6
5832 else
5833   cat > conftest.$ac_ext <<EOF
5834 #line 5835 "configure"
5835 #include "confdefs.h"
5836 /* System header to define __stub macros and hopefully few prototypes,
5837     which can conflict with char $ac_func(); below.  */
5838 #include <assert.h>
5839 /* Override any gcc2 internal prototype to avoid an error.  */
5840 /* We use char because int might match the return type of a gcc2
5841     builtin and then its argument prototype would still apply.  */
5842 char $ac_func();
5843
5844 int main() {
5845
5846 /* The GNU C library defines this for functions which it implements
5847     to always fail with ENOSYS.  Some functions are actually named
5848     something starting with __ and the normal name is an alias.  */
5849 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5850 choke me
5851 #else
5852 $ac_func();
5853 #endif
5854
5855 ; return 0; }
5856 EOF
5857 if { (eval echo configure:5858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5858   rm -rf conftest*
5859   eval "ac_cv_func_$ac_func=yes"
5860 else
5861   echo "configure: failed program was:" >&5
5862   cat conftest.$ac_ext >&5
5863   rm -rf conftest*
5864   eval "ac_cv_func_$ac_func=no"
5865 fi
5866 rm -f conftest*
5867 fi
5868
5869 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5870   echo "$ac_t""yes" 1>&6
5871     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5872   cat >> confdefs.h <<EOF
5873 #define $ac_tr_func 1
5874 EOF
5875  
5876 else
5877   echo "$ac_t""no" 1>&6
5878 fi
5879 done
5880
5881 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5882 do
5883 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5884 echo "configure:5885: checking for $ac_func" >&5
5885 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5886   echo $ac_n "(cached) $ac_c" 1>&6
5887 else
5888   cat > conftest.$ac_ext <<EOF
5889 #line 5890 "configure"
5890 #include "confdefs.h"
5891 /* System header to define __stub macros and hopefully few prototypes,
5892     which can conflict with char $ac_func(); below.  */
5893 #include <assert.h>
5894 /* Override any gcc2 internal prototype to avoid an error.  */
5895 /* We use char because int might match the return type of a gcc2
5896     builtin and then its argument prototype would still apply.  */
5897 char $ac_func();
5898
5899 int main() {
5900
5901 /* The GNU C library defines this for functions which it implements
5902     to always fail with ENOSYS.  Some functions are actually named
5903     something starting with __ and the normal name is an alias.  */
5904 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5905 choke me
5906 #else
5907 $ac_func();
5908 #endif
5909
5910 ; return 0; }
5911 EOF
5912 if { (eval echo configure:5913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5913   rm -rf conftest*
5914   eval "ac_cv_func_$ac_func=yes"
5915 else
5916   echo "configure: failed program was:" >&5
5917   cat conftest.$ac_ext >&5
5918   rm -rf conftest*
5919   eval "ac_cv_func_$ac_func=no"
5920 fi
5921 rm -f conftest*
5922 fi
5923
5924 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5925   echo "$ac_t""yes" 1>&6
5926     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5927   cat >> confdefs.h <<EOF
5928 #define $ac_tr_func 1
5929 EOF
5930  
5931 else
5932   echo "$ac_t""no" 1>&6
5933 fi
5934 done
5935
5936 for ac_func in __getcwd _getcwd
5937 do
5938 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5939 echo "configure:5940: checking for $ac_func" >&5
5940 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5941   echo $ac_n "(cached) $ac_c" 1>&6
5942 else
5943   cat > conftest.$ac_ext <<EOF
5944 #line 5945 "configure"
5945 #include "confdefs.h"
5946 /* System header to define __stub macros and hopefully few prototypes,
5947     which can conflict with char $ac_func(); below.  */
5948 #include <assert.h>
5949 /* Override any gcc2 internal prototype to avoid an error.  */
5950 /* We use char because int might match the return type of a gcc2
5951     builtin and then its argument prototype would still apply.  */
5952 char $ac_func();
5953
5954 int main() {
5955
5956 /* The GNU C library defines this for functions which it implements
5957     to always fail with ENOSYS.  Some functions are actually named
5958     something starting with __ and the normal name is an alias.  */
5959 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5960 choke me
5961 #else
5962 $ac_func();
5963 #endif
5964
5965 ; return 0; }
5966 EOF
5967 if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5968   rm -rf conftest*
5969   eval "ac_cv_func_$ac_func=yes"
5970 else
5971   echo "configure: failed program was:" >&5
5972   cat conftest.$ac_ext >&5
5973   rm -rf conftest*
5974   eval "ac_cv_func_$ac_func=no"
5975 fi
5976 rm -f conftest*
5977 fi
5978
5979 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5980   echo "$ac_t""yes" 1>&6
5981     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5982   cat >> confdefs.h <<EOF
5983 #define $ac_tr_func 1
5984 EOF
5985  
5986 else
5987   echo "$ac_t""no" 1>&6
5988 fi
5989 done
5990
5991 for ac_func in __xstat __fxstat __lxstat
5992 do
5993 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5994 echo "configure:5995: checking for $ac_func" >&5
5995 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5996   echo $ac_n "(cached) $ac_c" 1>&6
5997 else
5998   cat > conftest.$ac_ext <<EOF
5999 #line 6000 "configure"
6000 #include "confdefs.h"
6001 /* System header to define __stub macros and hopefully few prototypes,
6002     which can conflict with char $ac_func(); below.  */
6003 #include <assert.h>
6004 /* Override any gcc2 internal prototype to avoid an error.  */
6005 /* We use char because int might match the return type of a gcc2
6006     builtin and then its argument prototype would still apply.  */
6007 char $ac_func();
6008
6009 int main() {
6010
6011 /* The GNU C library defines this for functions which it implements
6012     to always fail with ENOSYS.  Some functions are actually named
6013     something starting with __ and the normal name is an alias.  */
6014 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6015 choke me
6016 #else
6017 $ac_func();
6018 #endif
6019
6020 ; return 0; }
6021 EOF
6022 if { (eval echo configure:6023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6023   rm -rf conftest*
6024   eval "ac_cv_func_$ac_func=yes"
6025 else
6026   echo "configure: failed program was:" >&5
6027   cat conftest.$ac_ext >&5
6028   rm -rf conftest*
6029   eval "ac_cv_func_$ac_func=no"
6030 fi
6031 rm -f conftest*
6032 fi
6033
6034 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6035   echo "$ac_t""yes" 1>&6
6036     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6037   cat >> confdefs.h <<EOF
6038 #define $ac_tr_func 1
6039 EOF
6040  
6041 else
6042   echo "$ac_t""no" 1>&6
6043 fi
6044 done
6045
6046 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6047 do
6048 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6049 echo "configure:6050: checking for $ac_func" >&5
6050 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6051   echo $ac_n "(cached) $ac_c" 1>&6
6052 else
6053   cat > conftest.$ac_ext <<EOF
6054 #line 6055 "configure"
6055 #include "confdefs.h"
6056 /* System header to define __stub macros and hopefully few prototypes,
6057     which can conflict with char $ac_func(); below.  */
6058 #include <assert.h>
6059 /* Override any gcc2 internal prototype to avoid an error.  */
6060 /* We use char because int might match the return type of a gcc2
6061     builtin and then its argument prototype would still apply.  */
6062 char $ac_func();
6063
6064 int main() {
6065
6066 /* The GNU C library defines this for functions which it implements
6067     to always fail with ENOSYS.  Some functions are actually named
6068     something starting with __ and the normal name is an alias.  */
6069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6070 choke me
6071 #else
6072 $ac_func();
6073 #endif
6074
6075 ; return 0; }
6076 EOF
6077 if { (eval echo configure:6078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6078   rm -rf conftest*
6079   eval "ac_cv_func_$ac_func=yes"
6080 else
6081   echo "configure: failed program was:" >&5
6082   cat conftest.$ac_ext >&5
6083   rm -rf conftest*
6084   eval "ac_cv_func_$ac_func=no"
6085 fi
6086 rm -f conftest*
6087 fi
6088
6089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6090   echo "$ac_t""yes" 1>&6
6091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6092   cat >> confdefs.h <<EOF
6093 #define $ac_tr_func 1
6094 EOF
6095  
6096 else
6097   echo "$ac_t""no" 1>&6
6098 fi
6099 done
6100
6101 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6102 do
6103 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6104 echo "configure:6105: checking for $ac_func" >&5
6105 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6106   echo $ac_n "(cached) $ac_c" 1>&6
6107 else
6108   cat > conftest.$ac_ext <<EOF
6109 #line 6110 "configure"
6110 #include "confdefs.h"
6111 /* System header to define __stub macros and hopefully few prototypes,
6112     which can conflict with char $ac_func(); below.  */
6113 #include <assert.h>
6114 /* Override any gcc2 internal prototype to avoid an error.  */
6115 /* We use char because int might match the return type of a gcc2
6116     builtin and then its argument prototype would still apply.  */
6117 char $ac_func();
6118
6119 int main() {
6120
6121 /* The GNU C library defines this for functions which it implements
6122     to always fail with ENOSYS.  Some functions are actually named
6123     something starting with __ and the normal name is an alias.  */
6124 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6125 choke me
6126 #else
6127 $ac_func();
6128 #endif
6129
6130 ; return 0; }
6131 EOF
6132 if { (eval echo configure:6133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6133   rm -rf conftest*
6134   eval "ac_cv_func_$ac_func=yes"
6135 else
6136   echo "configure: failed program was:" >&5
6137   cat conftest.$ac_ext >&5
6138   rm -rf conftest*
6139   eval "ac_cv_func_$ac_func=no"
6140 fi
6141 rm -f conftest*
6142 fi
6143
6144 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6145   echo "$ac_t""yes" 1>&6
6146     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6147   cat >> confdefs.h <<EOF
6148 #define $ac_tr_func 1
6149 EOF
6150  
6151 else
6152   echo "$ac_t""no" 1>&6
6153 fi
6154 done
6155
6156 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6157 do
6158 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6159 echo "configure:6160: checking for $ac_func" >&5
6160 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6161   echo $ac_n "(cached) $ac_c" 1>&6
6162 else
6163   cat > conftest.$ac_ext <<EOF
6164 #line 6165 "configure"
6165 #include "confdefs.h"
6166 /* System header to define __stub macros and hopefully few prototypes,
6167     which can conflict with char $ac_func(); below.  */
6168 #include <assert.h>
6169 /* Override any gcc2 internal prototype to avoid an error.  */
6170 /* We use char because int might match the return type of a gcc2
6171     builtin and then its argument prototype would still apply.  */
6172 char $ac_func();
6173
6174 int main() {
6175
6176 /* The GNU C library defines this for functions which it implements
6177     to always fail with ENOSYS.  Some functions are actually named
6178     something starting with __ and the normal name is an alias.  */
6179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6180 choke me
6181 #else
6182 $ac_func();
6183 #endif
6184
6185 ; return 0; }
6186 EOF
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188   rm -rf conftest*
6189   eval "ac_cv_func_$ac_func=yes"
6190 else
6191   echo "configure: failed program was:" >&5
6192   cat conftest.$ac_ext >&5
6193   rm -rf conftest*
6194   eval "ac_cv_func_$ac_func=no"
6195 fi
6196 rm -f conftest*
6197 fi
6198
6199 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6200   echo "$ac_t""yes" 1>&6
6201     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6202   cat >> confdefs.h <<EOF
6203 #define $ac_tr_func 1
6204 EOF
6205  
6206 else
6207   echo "$ac_t""no" 1>&6
6208 fi
6209 done
6210
6211 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6212 do
6213 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6214 echo "configure:6215: checking for $ac_func" >&5
6215 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6216   echo $ac_n "(cached) $ac_c" 1>&6
6217 else
6218   cat > conftest.$ac_ext <<EOF
6219 #line 6220 "configure"
6220 #include "confdefs.h"
6221 /* System header to define __stub macros and hopefully few prototypes,
6222     which can conflict with char $ac_func(); below.  */
6223 #include <assert.h>
6224 /* Override any gcc2 internal prototype to avoid an error.  */
6225 /* We use char because int might match the return type of a gcc2
6226     builtin and then its argument prototype would still apply.  */
6227 char $ac_func();
6228
6229 int main() {
6230
6231 /* The GNU C library defines this for functions which it implements
6232     to always fail with ENOSYS.  Some functions are actually named
6233     something starting with __ and the normal name is an alias.  */
6234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6235 choke me
6236 #else
6237 $ac_func();
6238 #endif
6239
6240 ; return 0; }
6241 EOF
6242 if { (eval echo configure:6243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6243   rm -rf conftest*
6244   eval "ac_cv_func_$ac_func=yes"
6245 else
6246   echo "configure: failed program was:" >&5
6247   cat conftest.$ac_ext >&5
6248   rm -rf conftest*
6249   eval "ac_cv_func_$ac_func=no"
6250 fi
6251 rm -f conftest*
6252 fi
6253
6254 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6255   echo "$ac_t""yes" 1>&6
6256     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6257   cat >> confdefs.h <<EOF
6258 #define $ac_tr_func 1
6259 EOF
6260  
6261 else
6262   echo "$ac_t""no" 1>&6
6263 fi
6264 done
6265
6266 for ac_func in _write __write _fork __fork
6267 do
6268 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6269 echo "configure:6270: checking for $ac_func" >&5
6270 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6271   echo $ac_n "(cached) $ac_c" 1>&6
6272 else
6273   cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 /* System header to define __stub macros and hopefully few prototypes,
6277     which can conflict with char $ac_func(); below.  */
6278 #include <assert.h>
6279 /* Override any gcc2 internal prototype to avoid an error.  */
6280 /* We use char because int might match the return type of a gcc2
6281     builtin and then its argument prototype would still apply.  */
6282 char $ac_func();
6283
6284 int main() {
6285
6286 /* The GNU C library defines this for functions which it implements
6287     to always fail with ENOSYS.  Some functions are actually named
6288     something starting with __ and the normal name is an alias.  */
6289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6290 choke me
6291 #else
6292 $ac_func();
6293 #endif
6294
6295 ; return 0; }
6296 EOF
6297 if { (eval echo configure:6298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6298   rm -rf conftest*
6299   eval "ac_cv_func_$ac_func=yes"
6300 else
6301   echo "configure: failed program was:" >&5
6302   cat conftest.$ac_ext >&5
6303   rm -rf conftest*
6304   eval "ac_cv_func_$ac_func=no"
6305 fi
6306 rm -f conftest*
6307 fi
6308
6309 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6310   echo "$ac_t""yes" 1>&6
6311     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6312   cat >> confdefs.h <<EOF
6313 #define $ac_tr_func 1
6314 EOF
6315  
6316 else
6317   echo "$ac_t""no" 1>&6
6318 fi
6319 done
6320
6321 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6322 do
6323 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6324 echo "configure:6325: checking for $ac_func" >&5
6325 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6326   echo $ac_n "(cached) $ac_c" 1>&6
6327 else
6328   cat > conftest.$ac_ext <<EOF
6329 #line 6330 "configure"
6330 #include "confdefs.h"
6331 /* System header to define __stub macros and hopefully few prototypes,
6332     which can conflict with char $ac_func(); below.  */
6333 #include <assert.h>
6334 /* Override any gcc2 internal prototype to avoid an error.  */
6335 /* We use char because int might match the return type of a gcc2
6336     builtin and then its argument prototype would still apply.  */
6337 char $ac_func();
6338
6339 int main() {
6340
6341 /* The GNU C library defines this for functions which it implements
6342     to always fail with ENOSYS.  Some functions are actually named
6343     something starting with __ and the normal name is an alias.  */
6344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6345 choke me
6346 #else
6347 $ac_func();
6348 #endif
6349
6350 ; return 0; }
6351 EOF
6352 if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6353   rm -rf conftest*
6354   eval "ac_cv_func_$ac_func=yes"
6355 else
6356   echo "configure: failed program was:" >&5
6357   cat conftest.$ac_ext >&5
6358   rm -rf conftest*
6359   eval "ac_cv_func_$ac_func=no"
6360 fi
6361 rm -f conftest*
6362 fi
6363
6364 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6365   echo "$ac_t""yes" 1>&6
6366     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6367   cat >> confdefs.h <<EOF
6368 #define $ac_tr_func 1
6369 EOF
6370  
6371 else
6372   echo "$ac_t""no" 1>&6
6373 fi
6374 done
6375
6376 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6377 do
6378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6379 echo "configure:6380: checking for $ac_func" >&5
6380 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6381   echo $ac_n "(cached) $ac_c" 1>&6
6382 else
6383   cat > conftest.$ac_ext <<EOF
6384 #line 6385 "configure"
6385 #include "confdefs.h"
6386 /* System header to define __stub macros and hopefully few prototypes,
6387     which can conflict with char $ac_func(); below.  */
6388 #include <assert.h>
6389 /* Override any gcc2 internal prototype to avoid an error.  */
6390 /* We use char because int might match the return type of a gcc2
6391     builtin and then its argument prototype would still apply.  */
6392 char $ac_func();
6393
6394 int main() {
6395
6396 /* The GNU C library defines this for functions which it implements
6397     to always fail with ENOSYS.  Some functions are actually named
6398     something starting with __ and the normal name is an alias.  */
6399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6400 choke me
6401 #else
6402 $ac_func();
6403 #endif
6404
6405 ; return 0; }
6406 EOF
6407 if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6408   rm -rf conftest*
6409   eval "ac_cv_func_$ac_func=yes"
6410 else
6411   echo "configure: failed program was:" >&5
6412   cat conftest.$ac_ext >&5
6413   rm -rf conftest*
6414   eval "ac_cv_func_$ac_func=no"
6415 fi
6416 rm -f conftest*
6417 fi
6418
6419 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6420   echo "$ac_t""yes" 1>&6
6421     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6422   cat >> confdefs.h <<EOF
6423 #define $ac_tr_func 1
6424 EOF
6425  
6426 else
6427   echo "$ac_t""no" 1>&6
6428 fi
6429 done
6430
6431 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6432 do
6433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6434 echo "configure:6435: checking for $ac_func" >&5
6435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6436   echo $ac_n "(cached) $ac_c" 1>&6
6437 else
6438   cat > conftest.$ac_ext <<EOF
6439 #line 6440 "configure"
6440 #include "confdefs.h"
6441 /* System header to define __stub macros and hopefully few prototypes,
6442     which can conflict with char $ac_func(); below.  */
6443 #include <assert.h>
6444 /* Override any gcc2 internal prototype to avoid an error.  */
6445 /* We use char because int might match the return type of a gcc2
6446     builtin and then its argument prototype would still apply.  */
6447 char $ac_func();
6448
6449 int main() {
6450
6451 /* The GNU C library defines this for functions which it implements
6452     to always fail with ENOSYS.  Some functions are actually named
6453     something starting with __ and the normal name is an alias.  */
6454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6455 choke me
6456 #else
6457 $ac_func();
6458 #endif
6459
6460 ; return 0; }
6461 EOF
6462 if { (eval echo configure:6463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6463   rm -rf conftest*
6464   eval "ac_cv_func_$ac_func=yes"
6465 else
6466   echo "configure: failed program was:" >&5
6467   cat conftest.$ac_ext >&5
6468   rm -rf conftest*
6469   eval "ac_cv_func_$ac_func=no"
6470 fi
6471 rm -f conftest*
6472 fi
6473
6474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6475   echo "$ac_t""yes" 1>&6
6476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6477   cat >> confdefs.h <<EOF
6478 #define $ac_tr_func 1
6479 EOF
6480  
6481 else
6482   echo "$ac_t""no" 1>&6
6483 fi
6484 done
6485
6486 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6487 do
6488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6489 echo "configure:6490: checking for $ac_func" >&5
6490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6491   echo $ac_n "(cached) $ac_c" 1>&6
6492 else
6493   cat > conftest.$ac_ext <<EOF
6494 #line 6495 "configure"
6495 #include "confdefs.h"
6496 /* System header to define __stub macros and hopefully few prototypes,
6497     which can conflict with char $ac_func(); below.  */
6498 #include <assert.h>
6499 /* Override any gcc2 internal prototype to avoid an error.  */
6500 /* We use char because int might match the return type of a gcc2
6501     builtin and then its argument prototype would still apply.  */
6502 char $ac_func();
6503
6504 int main() {
6505
6506 /* The GNU C library defines this for functions which it implements
6507     to always fail with ENOSYS.  Some functions are actually named
6508     something starting with __ and the normal name is an alias.  */
6509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6510 choke me
6511 #else
6512 $ac_func();
6513 #endif
6514
6515 ; return 0; }
6516 EOF
6517 if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6518   rm -rf conftest*
6519   eval "ac_cv_func_$ac_func=yes"
6520 else
6521   echo "configure: failed program was:" >&5
6522   cat conftest.$ac_ext >&5
6523   rm -rf conftest*
6524   eval "ac_cv_func_$ac_func=no"
6525 fi
6526 rm -f conftest*
6527 fi
6528
6529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6530   echo "$ac_t""yes" 1>&6
6531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6532   cat >> confdefs.h <<EOF
6533 #define $ac_tr_func 1
6534 EOF
6535  
6536 else
6537   echo "$ac_t""no" 1>&6
6538 fi
6539 done
6540
6541 for ac_func in open64 _open64 __open64 creat64
6542 do
6543 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6544 echo "configure:6545: checking for $ac_func" >&5
6545 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6546   echo $ac_n "(cached) $ac_c" 1>&6
6547 else
6548   cat > conftest.$ac_ext <<EOF
6549 #line 6550 "configure"
6550 #include "confdefs.h"
6551 /* System header to define __stub macros and hopefully few prototypes,
6552     which can conflict with char $ac_func(); below.  */
6553 #include <assert.h>
6554 /* Override any gcc2 internal prototype to avoid an error.  */
6555 /* We use char because int might match the return type of a gcc2
6556     builtin and then its argument prototype would still apply.  */
6557 char $ac_func();
6558
6559 int main() {
6560
6561 /* The GNU C library defines this for functions which it implements
6562     to always fail with ENOSYS.  Some functions are actually named
6563     something starting with __ and the normal name is an alias.  */
6564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6565 choke me
6566 #else
6567 $ac_func();
6568 #endif
6569
6570 ; return 0; }
6571 EOF
6572 if { (eval echo configure:6573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6573   rm -rf conftest*
6574   eval "ac_cv_func_$ac_func=yes"
6575 else
6576   echo "configure: failed program was:" >&5
6577   cat conftest.$ac_ext >&5
6578   rm -rf conftest*
6579   eval "ac_cv_func_$ac_func=no"
6580 fi
6581 rm -f conftest*
6582 fi
6583
6584 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6585   echo "$ac_t""yes" 1>&6
6586     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6587   cat >> confdefs.h <<EOF
6588 #define $ac_tr_func 1
6589 EOF
6590  
6591 else
6592   echo "$ac_t""no" 1>&6
6593 fi
6594 done
6595
6596
6597 #
6598 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6599 #
6600
6601 if test x$ac_cv_func_stat64 = xno ; then
6602   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6603 echo "configure:6604: checking for stat64 in <sys/stat.h>" >&5
6604   cat > conftest.$ac_ext <<EOF
6605 #line 6606 "configure"
6606 #include "confdefs.h"
6607
6608 #if defined(HAVE_UNISTD_H)
6609 #include <unistd.h>
6610 #endif
6611 #include <sys/stat.h>
6612
6613 int main() {
6614 struct stat64 st64; exit(stat64(".",&st64));
6615 ; return 0; }
6616 EOF
6617 if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6618   rm -rf conftest*
6619   ac_cv_func_stat64=yes
6620 else
6621   echo "configure: failed program was:" >&5
6622   cat conftest.$ac_ext >&5
6623 fi
6624 rm -f conftest*
6625   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6626   if test x$ac_cv_func_stat64 = xyes ; then
6627     cat >> confdefs.h <<\EOF
6628 #define HAVE_STAT64 1
6629 EOF
6630
6631   fi
6632 fi
6633
6634 if test x$ac_cv_func_lstat64 = xno ; then
6635   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6636 echo "configure:6637: checking for lstat64 in <sys/stat.h>" >&5
6637   cat > conftest.$ac_ext <<EOF
6638 #line 6639 "configure"
6639 #include "confdefs.h"
6640
6641 #if defined(HAVE_UNISTD_H)
6642 #include <unistd.h>
6643 #endif
6644 #include <sys/stat.h>
6645
6646 int main() {
6647 struct stat64 st64; exit(lstat64(".",&st64));
6648 ; return 0; }
6649 EOF
6650 if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6651   rm -rf conftest*
6652   ac_cv_func_lstat64=yes
6653 else
6654   echo "configure: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656 fi
6657 rm -f conftest*
6658   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6659   if test x$ac_cv_func_lstat64 = xyes ; then
6660     cat >> confdefs.h <<\EOF
6661 #define HAVE_LSTAT64 1
6662 EOF
6663
6664   fi
6665 fi
6666
6667 if test x$ac_cv_func_fstat64 = xno ; then
6668   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6669 echo "configure:6670: checking for fstat64 in <sys/stat.h>" >&5
6670   cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673
6674 #if defined(HAVE_UNISTD_H)
6675 #include <unistd.h>
6676 #endif
6677 #include <sys/stat.h>
6678
6679 int main() {
6680 struct stat64 st64; exit(fstat64(0,&st64));
6681 ; return 0; }
6682 EOF
6683 if { (eval echo configure:6684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6684   rm -rf conftest*
6685   ac_cv_func_fstat64=yes
6686 else
6687   echo "configure: failed program was:" >&5
6688   cat conftest.$ac_ext >&5
6689 fi
6690 rm -f conftest*
6691   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6692   if test x$ac_cv_func_fstat64 = xyes ; then
6693     cat >> confdefs.h <<\EOF
6694 #define HAVE_FSTAT64 1
6695 EOF
6696
6697   fi
6698 fi
6699
6700 #####################################
6701 # we might need the resolv library on some systems
6702 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6703 echo "configure:6704: checking for dn_expand in -lresolv" >&5
6704 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6705 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6706   echo $ac_n "(cached) $ac_c" 1>&6
6707 else
6708   ac_save_LIBS="$LIBS"
6709 LIBS="-lresolv  $LIBS"
6710 cat > conftest.$ac_ext <<EOF
6711 #line 6712 "configure"
6712 #include "confdefs.h"
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 /* We use char because int might match the return type of a gcc2
6715     builtin and then its argument prototype would still apply.  */
6716 char dn_expand();
6717
6718 int main() {
6719 dn_expand()
6720 ; return 0; }
6721 EOF
6722 if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6723   rm -rf conftest*
6724   eval "ac_cv_lib_$ac_lib_var=yes"
6725 else
6726   echo "configure: failed program was:" >&5
6727   cat conftest.$ac_ext >&5
6728   rm -rf conftest*
6729   eval "ac_cv_lib_$ac_lib_var=no"
6730 fi
6731 rm -f conftest*
6732 LIBS="$ac_save_LIBS"
6733
6734 fi
6735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6736   echo "$ac_t""yes" 1>&6
6737     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6738     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6739   cat >> confdefs.h <<EOF
6740 #define $ac_tr_lib 1
6741 EOF
6742
6743   LIBS="-lresolv $LIBS"
6744
6745 else
6746   echo "$ac_t""no" 1>&6
6747 fi
6748
6749
6750 #
6751 # Check for the functions putprpwnam, set_auth_parameters,
6752 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6753 # Needed for OSF1 and HPUX.
6754 #
6755
6756 case "$LIBS" in
6757   *-lsecurity*) for ac_func in putprpwnam
6758 do
6759 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6760 echo "configure:6761: checking for $ac_func" >&5
6761 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6762   echo $ac_n "(cached) $ac_c" 1>&6
6763 else
6764   cat > conftest.$ac_ext <<EOF
6765 #line 6766 "configure"
6766 #include "confdefs.h"
6767 /* System header to define __stub macros and hopefully few prototypes,
6768     which can conflict with char $ac_func(); below.  */
6769 #include <assert.h>
6770 /* Override any gcc2 internal prototype to avoid an error.  */
6771 /* We use char because int might match the return type of a gcc2
6772     builtin and then its argument prototype would still apply.  */
6773 char $ac_func();
6774
6775 int main() {
6776
6777 /* The GNU C library defines this for functions which it implements
6778     to always fail with ENOSYS.  Some functions are actually named
6779     something starting with __ and the normal name is an alias.  */
6780 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6781 choke me
6782 #else
6783 $ac_func();
6784 #endif
6785
6786 ; return 0; }
6787 EOF
6788 if { (eval echo configure:6789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6789   rm -rf conftest*
6790   eval "ac_cv_func_$ac_func=yes"
6791 else
6792   echo "configure: failed program was:" >&5
6793   cat conftest.$ac_ext >&5
6794   rm -rf conftest*
6795   eval "ac_cv_func_$ac_func=no"
6796 fi
6797 rm -f conftest*
6798 fi
6799
6800 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6801   echo "$ac_t""yes" 1>&6
6802     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6803   cat >> confdefs.h <<EOF
6804 #define $ac_tr_func 1
6805 EOF
6806  
6807 else
6808   echo "$ac_t""no" 1>&6
6809 fi
6810 done
6811  ;;
6812   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6813 echo "configure:6814: checking for putprpwnam in -lsecurity" >&5
6814 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6815 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6816   echo $ac_n "(cached) $ac_c" 1>&6
6817 else
6818   ac_save_LIBS="$LIBS"
6819 LIBS="-lsecurity  $LIBS"
6820 cat > conftest.$ac_ext <<EOF
6821 #line 6822 "configure"
6822 #include "confdefs.h"
6823 /* Override any gcc2 internal prototype to avoid an error.  */
6824 /* We use char because int might match the return type of a gcc2
6825     builtin and then its argument prototype would still apply.  */
6826 char putprpwnam();
6827
6828 int main() {
6829 putprpwnam()
6830 ; return 0; }
6831 EOF
6832 if { (eval echo configure:6833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6833   rm -rf conftest*
6834   eval "ac_cv_lib_$ac_lib_var=yes"
6835 else
6836   echo "configure: failed program was:" >&5
6837   cat conftest.$ac_ext >&5
6838   rm -rf conftest*
6839   eval "ac_cv_lib_$ac_lib_var=no"
6840 fi
6841 rm -f conftest*
6842 LIBS="$ac_save_LIBS"
6843
6844 fi
6845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6846   echo "$ac_t""yes" 1>&6
6847     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6848     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6849   cat >> confdefs.h <<EOF
6850 #define $ac_tr_lib 1
6851 EOF
6852
6853   LIBS="-lsecurity $LIBS"
6854
6855 else
6856   echo "$ac_t""no" 1>&6
6857 fi
6858  
6859      for ac_func in putprpwnam
6860 do
6861 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6862 echo "configure:6863: checking for $ac_func" >&5
6863 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6864   echo $ac_n "(cached) $ac_c" 1>&6
6865 else
6866   cat > conftest.$ac_ext <<EOF
6867 #line 6868 "configure"
6868 #include "confdefs.h"
6869 /* System header to define __stub macros and hopefully few prototypes,
6870     which can conflict with char $ac_func(); below.  */
6871 #include <assert.h>
6872 /* Override any gcc2 internal prototype to avoid an error.  */
6873 /* We use char because int might match the return type of a gcc2
6874     builtin and then its argument prototype would still apply.  */
6875 char $ac_func();
6876
6877 int main() {
6878
6879 /* The GNU C library defines this for functions which it implements
6880     to always fail with ENOSYS.  Some functions are actually named
6881     something starting with __ and the normal name is an alias.  */
6882 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6883 choke me
6884 #else
6885 $ac_func();
6886 #endif
6887
6888 ; return 0; }
6889 EOF
6890 if { (eval echo configure:6891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6891   rm -rf conftest*
6892   eval "ac_cv_func_$ac_func=yes"
6893 else
6894   echo "configure: failed program was:" >&5
6895   cat conftest.$ac_ext >&5
6896   rm -rf conftest*
6897   eval "ac_cv_func_$ac_func=no"
6898 fi
6899 rm -f conftest*
6900 fi
6901
6902 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6903   echo "$ac_t""yes" 1>&6
6904     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6905   cat >> confdefs.h <<EOF
6906 #define $ac_tr_func 1
6907 EOF
6908  
6909 else
6910   echo "$ac_t""no" 1>&6
6911 fi
6912 done
6913
6914   ;;
6915   esac
6916
6917 case "$LIBS" in
6918   *-lsec*) for ac_func in putprpwnam
6919 do
6920 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6921 echo "configure:6922: checking for $ac_func" >&5
6922 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6923   echo $ac_n "(cached) $ac_c" 1>&6
6924 else
6925   cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928 /* System header to define __stub macros and hopefully few prototypes,
6929     which can conflict with char $ac_func(); below.  */
6930 #include <assert.h>
6931 /* Override any gcc2 internal prototype to avoid an error.  */
6932 /* We use char because int might match the return type of a gcc2
6933     builtin and then its argument prototype would still apply.  */
6934 char $ac_func();
6935
6936 int main() {
6937
6938 /* The GNU C library defines this for functions which it implements
6939     to always fail with ENOSYS.  Some functions are actually named
6940     something starting with __ and the normal name is an alias.  */
6941 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6942 choke me
6943 #else
6944 $ac_func();
6945 #endif
6946
6947 ; return 0; }
6948 EOF
6949 if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6950   rm -rf conftest*
6951   eval "ac_cv_func_$ac_func=yes"
6952 else
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955   rm -rf conftest*
6956   eval "ac_cv_func_$ac_func=no"
6957 fi
6958 rm -f conftest*
6959 fi
6960
6961 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6962   echo "$ac_t""yes" 1>&6
6963     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6964   cat >> confdefs.h <<EOF
6965 #define $ac_tr_func 1
6966 EOF
6967  
6968 else
6969   echo "$ac_t""no" 1>&6
6970 fi
6971 done
6972  ;;
6973   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6974 echo "configure:6975: checking for putprpwnam in -lsec" >&5
6975 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6976 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6977   echo $ac_n "(cached) $ac_c" 1>&6
6978 else
6979   ac_save_LIBS="$LIBS"
6980 LIBS="-lsec  $LIBS"
6981 cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984 /* Override any gcc2 internal prototype to avoid an error.  */
6985 /* We use char because int might match the return type of a gcc2
6986     builtin and then its argument prototype would still apply.  */
6987 char putprpwnam();
6988
6989 int main() {
6990 putprpwnam()
6991 ; return 0; }
6992 EOF
6993 if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6994   rm -rf conftest*
6995   eval "ac_cv_lib_$ac_lib_var=yes"
6996 else
6997   echo "configure: failed program was:" >&5
6998   cat conftest.$ac_ext >&5
6999   rm -rf conftest*
7000   eval "ac_cv_lib_$ac_lib_var=no"
7001 fi
7002 rm -f conftest*
7003 LIBS="$ac_save_LIBS"
7004
7005 fi
7006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7007   echo "$ac_t""yes" 1>&6
7008     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7009     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7010   cat >> confdefs.h <<EOF
7011 #define $ac_tr_lib 1
7012 EOF
7013
7014   LIBS="-lsec $LIBS"
7015
7016 else
7017   echo "$ac_t""no" 1>&6
7018 fi
7019  
7020      for ac_func in putprpwnam
7021 do
7022 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7023 echo "configure:7024: checking for $ac_func" >&5
7024 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7025   echo $ac_n "(cached) $ac_c" 1>&6
7026 else
7027   cat > conftest.$ac_ext <<EOF
7028 #line 7029 "configure"
7029 #include "confdefs.h"
7030 /* System header to define __stub macros and hopefully few prototypes,
7031     which can conflict with char $ac_func(); below.  */
7032 #include <assert.h>
7033 /* Override any gcc2 internal prototype to avoid an error.  */
7034 /* We use char because int might match the return type of a gcc2
7035     builtin and then its argument prototype would still apply.  */
7036 char $ac_func();
7037
7038 int main() {
7039
7040 /* The GNU C library defines this for functions which it implements
7041     to always fail with ENOSYS.  Some functions are actually named
7042     something starting with __ and the normal name is an alias.  */
7043 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7044 choke me
7045 #else
7046 $ac_func();
7047 #endif
7048
7049 ; return 0; }
7050 EOF
7051 if { (eval echo configure:7052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7052   rm -rf conftest*
7053   eval "ac_cv_func_$ac_func=yes"
7054 else
7055   echo "configure: failed program was:" >&5
7056   cat conftest.$ac_ext >&5
7057   rm -rf conftest*
7058   eval "ac_cv_func_$ac_func=no"
7059 fi
7060 rm -f conftest*
7061 fi
7062
7063 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7064   echo "$ac_t""yes" 1>&6
7065     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7066   cat >> confdefs.h <<EOF
7067 #define $ac_tr_func 1
7068 EOF
7069  
7070 else
7071   echo "$ac_t""no" 1>&6
7072 fi
7073 done
7074
7075   ;;
7076   esac
7077
7078
7079 case "$LIBS" in
7080   *-lsecurity*) for ac_func in set_auth_parameters
7081 do
7082 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7083 echo "configure:7084: checking for $ac_func" >&5
7084 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7085   echo $ac_n "(cached) $ac_c" 1>&6
7086 else
7087   cat > conftest.$ac_ext <<EOF
7088 #line 7089 "configure"
7089 #include "confdefs.h"
7090 /* System header to define __stub macros and hopefully few prototypes,
7091     which can conflict with char $ac_func(); below.  */
7092 #include <assert.h>
7093 /* Override any gcc2 internal prototype to avoid an error.  */
7094 /* We use char because int might match the return type of a gcc2
7095     builtin and then its argument prototype would still apply.  */
7096 char $ac_func();
7097
7098 int main() {
7099
7100 /* The GNU C library defines this for functions which it implements
7101     to always fail with ENOSYS.  Some functions are actually named
7102     something starting with __ and the normal name is an alias.  */
7103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7104 choke me
7105 #else
7106 $ac_func();
7107 #endif
7108
7109 ; return 0; }
7110 EOF
7111 if { (eval echo configure:7112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7112   rm -rf conftest*
7113   eval "ac_cv_func_$ac_func=yes"
7114 else
7115   echo "configure: failed program was:" >&5
7116   cat conftest.$ac_ext >&5
7117   rm -rf conftest*
7118   eval "ac_cv_func_$ac_func=no"
7119 fi
7120 rm -f conftest*
7121 fi
7122
7123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7124   echo "$ac_t""yes" 1>&6
7125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7126   cat >> confdefs.h <<EOF
7127 #define $ac_tr_func 1
7128 EOF
7129  
7130 else
7131   echo "$ac_t""no" 1>&6
7132 fi
7133 done
7134  ;;
7135   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7136 echo "configure:7137: checking for set_auth_parameters in -lsecurity" >&5
7137 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7138 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7139   echo $ac_n "(cached) $ac_c" 1>&6
7140 else
7141   ac_save_LIBS="$LIBS"
7142 LIBS="-lsecurity  $LIBS"
7143 cat > conftest.$ac_ext <<EOF
7144 #line 7145 "configure"
7145 #include "confdefs.h"
7146 /* Override any gcc2 internal prototype to avoid an error.  */
7147 /* We use char because int might match the return type of a gcc2
7148     builtin and then its argument prototype would still apply.  */
7149 char set_auth_parameters();
7150
7151 int main() {
7152 set_auth_parameters()
7153 ; return 0; }
7154 EOF
7155 if { (eval echo configure:7156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7156   rm -rf conftest*
7157   eval "ac_cv_lib_$ac_lib_var=yes"
7158 else
7159   echo "configure: failed program was:" >&5
7160   cat conftest.$ac_ext >&5
7161   rm -rf conftest*
7162   eval "ac_cv_lib_$ac_lib_var=no"
7163 fi
7164 rm -f conftest*
7165 LIBS="$ac_save_LIBS"
7166
7167 fi
7168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7169   echo "$ac_t""yes" 1>&6
7170     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7171     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7172   cat >> confdefs.h <<EOF
7173 #define $ac_tr_lib 1
7174 EOF
7175
7176   LIBS="-lsecurity $LIBS"
7177
7178 else
7179   echo "$ac_t""no" 1>&6
7180 fi
7181  
7182      for ac_func in set_auth_parameters
7183 do
7184 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7185 echo "configure:7186: checking for $ac_func" >&5
7186 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7187   echo $ac_n "(cached) $ac_c" 1>&6
7188 else
7189   cat > conftest.$ac_ext <<EOF
7190 #line 7191 "configure"
7191 #include "confdefs.h"
7192 /* System header to define __stub macros and hopefully few prototypes,
7193     which can conflict with char $ac_func(); below.  */
7194 #include <assert.h>
7195 /* Override any gcc2 internal prototype to avoid an error.  */
7196 /* We use char because int might match the return type of a gcc2
7197     builtin and then its argument prototype would still apply.  */
7198 char $ac_func();
7199
7200 int main() {
7201
7202 /* The GNU C library defines this for functions which it implements
7203     to always fail with ENOSYS.  Some functions are actually named
7204     something starting with __ and the normal name is an alias.  */
7205 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7206 choke me
7207 #else
7208 $ac_func();
7209 #endif
7210
7211 ; return 0; }
7212 EOF
7213 if { (eval echo configure:7214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7214   rm -rf conftest*
7215   eval "ac_cv_func_$ac_func=yes"
7216 else
7217   echo "configure: failed program was:" >&5
7218   cat conftest.$ac_ext >&5
7219   rm -rf conftest*
7220   eval "ac_cv_func_$ac_func=no"
7221 fi
7222 rm -f conftest*
7223 fi
7224
7225 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7226   echo "$ac_t""yes" 1>&6
7227     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7228   cat >> confdefs.h <<EOF
7229 #define $ac_tr_func 1
7230 EOF
7231  
7232 else
7233   echo "$ac_t""no" 1>&6
7234 fi
7235 done
7236
7237   ;;
7238   esac
7239
7240 case "$LIBS" in
7241   *-lsec*) for ac_func in set_auth_parameters
7242 do
7243 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7244 echo "configure:7245: checking for $ac_func" >&5
7245 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7246   echo $ac_n "(cached) $ac_c" 1>&6
7247 else
7248   cat > conftest.$ac_ext <<EOF
7249 #line 7250 "configure"
7250 #include "confdefs.h"
7251 /* System header to define __stub macros and hopefully few prototypes,
7252     which can conflict with char $ac_func(); below.  */
7253 #include <assert.h>
7254 /* Override any gcc2 internal prototype to avoid an error.  */
7255 /* We use char because int might match the return type of a gcc2
7256     builtin and then its argument prototype would still apply.  */
7257 char $ac_func();
7258
7259 int main() {
7260
7261 /* The GNU C library defines this for functions which it implements
7262     to always fail with ENOSYS.  Some functions are actually named
7263     something starting with __ and the normal name is an alias.  */
7264 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7265 choke me
7266 #else
7267 $ac_func();
7268 #endif
7269
7270 ; return 0; }
7271 EOF
7272 if { (eval echo configure:7273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7273   rm -rf conftest*
7274   eval "ac_cv_func_$ac_func=yes"
7275 else
7276   echo "configure: failed program was:" >&5
7277   cat conftest.$ac_ext >&5
7278   rm -rf conftest*
7279   eval "ac_cv_func_$ac_func=no"
7280 fi
7281 rm -f conftest*
7282 fi
7283
7284 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7285   echo "$ac_t""yes" 1>&6
7286     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7287   cat >> confdefs.h <<EOF
7288 #define $ac_tr_func 1
7289 EOF
7290  
7291 else
7292   echo "$ac_t""no" 1>&6
7293 fi
7294 done
7295  ;;
7296   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7297 echo "configure:7298: checking for set_auth_parameters in -lsec" >&5
7298 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7299 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7300   echo $ac_n "(cached) $ac_c" 1>&6
7301 else
7302   ac_save_LIBS="$LIBS"
7303 LIBS="-lsec  $LIBS"
7304 cat > conftest.$ac_ext <<EOF
7305 #line 7306 "configure"
7306 #include "confdefs.h"
7307 /* Override any gcc2 internal prototype to avoid an error.  */
7308 /* We use char because int might match the return type of a gcc2
7309     builtin and then its argument prototype would still apply.  */
7310 char set_auth_parameters();
7311
7312 int main() {
7313 set_auth_parameters()
7314 ; return 0; }
7315 EOF
7316 if { (eval echo configure:7317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7317   rm -rf conftest*
7318   eval "ac_cv_lib_$ac_lib_var=yes"
7319 else
7320   echo "configure: failed program was:" >&5
7321   cat conftest.$ac_ext >&5
7322   rm -rf conftest*
7323   eval "ac_cv_lib_$ac_lib_var=no"
7324 fi
7325 rm -f conftest*
7326 LIBS="$ac_save_LIBS"
7327
7328 fi
7329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7330   echo "$ac_t""yes" 1>&6
7331     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7332     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7333   cat >> confdefs.h <<EOF
7334 #define $ac_tr_lib 1
7335 EOF
7336
7337   LIBS="-lsec $LIBS"
7338
7339 else
7340   echo "$ac_t""no" 1>&6
7341 fi
7342  
7343      for ac_func in set_auth_parameters
7344 do
7345 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7346 echo "configure:7347: checking for $ac_func" >&5
7347 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7348   echo $ac_n "(cached) $ac_c" 1>&6
7349 else
7350   cat > conftest.$ac_ext <<EOF
7351 #line 7352 "configure"
7352 #include "confdefs.h"
7353 /* System header to define __stub macros and hopefully few prototypes,
7354     which can conflict with char $ac_func(); below.  */
7355 #include <assert.h>
7356 /* Override any gcc2 internal prototype to avoid an error.  */
7357 /* We use char because int might match the return type of a gcc2
7358     builtin and then its argument prototype would still apply.  */
7359 char $ac_func();
7360
7361 int main() {
7362
7363 /* The GNU C library defines this for functions which it implements
7364     to always fail with ENOSYS.  Some functions are actually named
7365     something starting with __ and the normal name is an alias.  */
7366 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7367 choke me
7368 #else
7369 $ac_func();
7370 #endif
7371
7372 ; return 0; }
7373 EOF
7374 if { (eval echo configure:7375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7375   rm -rf conftest*
7376   eval "ac_cv_func_$ac_func=yes"
7377 else
7378   echo "configure: failed program was:" >&5
7379   cat conftest.$ac_ext >&5
7380   rm -rf conftest*
7381   eval "ac_cv_func_$ac_func=no"
7382 fi
7383 rm -f conftest*
7384 fi
7385
7386 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7387   echo "$ac_t""yes" 1>&6
7388     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7389   cat >> confdefs.h <<EOF
7390 #define $ac_tr_func 1
7391 EOF
7392  
7393 else
7394   echo "$ac_t""no" 1>&6
7395 fi
7396 done
7397
7398   ;;
7399   esac
7400
7401
7402 # UnixWare 7.x has its getspnam in -lgen
7403 case "$LIBS" in
7404   *-lgen*) for ac_func in getspnam
7405 do
7406 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7407 echo "configure:7408: checking for $ac_func" >&5
7408 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7409   echo $ac_n "(cached) $ac_c" 1>&6
7410 else
7411   cat > conftest.$ac_ext <<EOF
7412 #line 7413 "configure"
7413 #include "confdefs.h"
7414 /* System header to define __stub macros and hopefully few prototypes,
7415     which can conflict with char $ac_func(); below.  */
7416 #include <assert.h>
7417 /* Override any gcc2 internal prototype to avoid an error.  */
7418 /* We use char because int might match the return type of a gcc2
7419     builtin and then its argument prototype would still apply.  */
7420 char $ac_func();
7421
7422 int main() {
7423
7424 /* The GNU C library defines this for functions which it implements
7425     to always fail with ENOSYS.  Some functions are actually named
7426     something starting with __ and the normal name is an alias.  */
7427 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7428 choke me
7429 #else
7430 $ac_func();
7431 #endif
7432
7433 ; return 0; }
7434 EOF
7435 if { (eval echo configure:7436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7436   rm -rf conftest*
7437   eval "ac_cv_func_$ac_func=yes"
7438 else
7439   echo "configure: failed program was:" >&5
7440   cat conftest.$ac_ext >&5
7441   rm -rf conftest*
7442   eval "ac_cv_func_$ac_func=no"
7443 fi
7444 rm -f conftest*
7445 fi
7446
7447 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7448   echo "$ac_t""yes" 1>&6
7449     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7450   cat >> confdefs.h <<EOF
7451 #define $ac_tr_func 1
7452 EOF
7453  
7454 else
7455   echo "$ac_t""no" 1>&6
7456 fi
7457 done
7458  ;;
7459   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7460 echo "configure:7461: checking for getspnam in -lgen" >&5
7461 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7462 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7463   echo $ac_n "(cached) $ac_c" 1>&6
7464 else
7465   ac_save_LIBS="$LIBS"
7466 LIBS="-lgen  $LIBS"
7467 cat > conftest.$ac_ext <<EOF
7468 #line 7469 "configure"
7469 #include "confdefs.h"
7470 /* Override any gcc2 internal prototype to avoid an error.  */
7471 /* We use char because int might match the return type of a gcc2
7472     builtin and then its argument prototype would still apply.  */
7473 char getspnam();
7474
7475 int main() {
7476 getspnam()
7477 ; return 0; }
7478 EOF
7479 if { (eval echo configure:7480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7480   rm -rf conftest*
7481   eval "ac_cv_lib_$ac_lib_var=yes"
7482 else
7483   echo "configure: failed program was:" >&5
7484   cat conftest.$ac_ext >&5
7485   rm -rf conftest*
7486   eval "ac_cv_lib_$ac_lib_var=no"
7487 fi
7488 rm -f conftest*
7489 LIBS="$ac_save_LIBS"
7490
7491 fi
7492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7493   echo "$ac_t""yes" 1>&6
7494     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7495     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7496   cat >> confdefs.h <<EOF
7497 #define $ac_tr_lib 1
7498 EOF
7499
7500   LIBS="-lgen $LIBS"
7501
7502 else
7503   echo "$ac_t""no" 1>&6
7504 fi
7505  
7506      for ac_func in getspnam
7507 do
7508 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7509 echo "configure:7510: checking for $ac_func" >&5
7510 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7511   echo $ac_n "(cached) $ac_c" 1>&6
7512 else
7513   cat > conftest.$ac_ext <<EOF
7514 #line 7515 "configure"
7515 #include "confdefs.h"
7516 /* System header to define __stub macros and hopefully few prototypes,
7517     which can conflict with char $ac_func(); below.  */
7518 #include <assert.h>
7519 /* Override any gcc2 internal prototype to avoid an error.  */
7520 /* We use char because int might match the return type of a gcc2
7521     builtin and then its argument prototype would still apply.  */
7522 char $ac_func();
7523
7524 int main() {
7525
7526 /* The GNU C library defines this for functions which it implements
7527     to always fail with ENOSYS.  Some functions are actually named
7528     something starting with __ and the normal name is an alias.  */
7529 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7530 choke me
7531 #else
7532 $ac_func();
7533 #endif
7534
7535 ; return 0; }
7536 EOF
7537 if { (eval echo configure:7538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7538   rm -rf conftest*
7539   eval "ac_cv_func_$ac_func=yes"
7540 else
7541   echo "configure: failed program was:" >&5
7542   cat conftest.$ac_ext >&5
7543   rm -rf conftest*
7544   eval "ac_cv_func_$ac_func=no"
7545 fi
7546 rm -f conftest*
7547 fi
7548
7549 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7550   echo "$ac_t""yes" 1>&6
7551     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7552   cat >> confdefs.h <<EOF
7553 #define $ac_tr_func 1
7554 EOF
7555  
7556 else
7557   echo "$ac_t""no" 1>&6
7558 fi
7559 done
7560
7561   ;;
7562   esac
7563
7564
7565 case "$LIBS" in
7566   *-lsecurity*) for ac_func in getspnam
7567 do
7568 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7569 echo "configure:7570: checking for $ac_func" >&5
7570 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7571   echo $ac_n "(cached) $ac_c" 1>&6
7572 else
7573   cat > conftest.$ac_ext <<EOF
7574 #line 7575 "configure"
7575 #include "confdefs.h"
7576 /* System header to define __stub macros and hopefully few prototypes,
7577     which can conflict with char $ac_func(); below.  */
7578 #include <assert.h>
7579 /* Override any gcc2 internal prototype to avoid an error.  */
7580 /* We use char because int might match the return type of a gcc2
7581     builtin and then its argument prototype would still apply.  */
7582 char $ac_func();
7583
7584 int main() {
7585
7586 /* The GNU C library defines this for functions which it implements
7587     to always fail with ENOSYS.  Some functions are actually named
7588     something starting with __ and the normal name is an alias.  */
7589 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7590 choke me
7591 #else
7592 $ac_func();
7593 #endif
7594
7595 ; return 0; }
7596 EOF
7597 if { (eval echo configure:7598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7598   rm -rf conftest*
7599   eval "ac_cv_func_$ac_func=yes"
7600 else
7601   echo "configure: failed program was:" >&5
7602   cat conftest.$ac_ext >&5
7603   rm -rf conftest*
7604   eval "ac_cv_func_$ac_func=no"
7605 fi
7606 rm -f conftest*
7607 fi
7608
7609 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7610   echo "$ac_t""yes" 1>&6
7611     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7612   cat >> confdefs.h <<EOF
7613 #define $ac_tr_func 1
7614 EOF
7615  
7616 else
7617   echo "$ac_t""no" 1>&6
7618 fi
7619 done
7620  ;;
7621   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7622 echo "configure:7623: checking for getspnam in -lsecurity" >&5
7623 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7624 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7625   echo $ac_n "(cached) $ac_c" 1>&6
7626 else
7627   ac_save_LIBS="$LIBS"
7628 LIBS="-lsecurity  $LIBS"
7629 cat > conftest.$ac_ext <<EOF
7630 #line 7631 "configure"
7631 #include "confdefs.h"
7632 /* Override any gcc2 internal prototype to avoid an error.  */
7633 /* We use char because int might match the return type of a gcc2
7634     builtin and then its argument prototype would still apply.  */
7635 char getspnam();
7636
7637 int main() {
7638 getspnam()
7639 ; return 0; }
7640 EOF
7641 if { (eval echo configure:7642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7642   rm -rf conftest*
7643   eval "ac_cv_lib_$ac_lib_var=yes"
7644 else
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   eval "ac_cv_lib_$ac_lib_var=no"
7649 fi
7650 rm -f conftest*
7651 LIBS="$ac_save_LIBS"
7652
7653 fi
7654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7655   echo "$ac_t""yes" 1>&6
7656     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7657     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7658   cat >> confdefs.h <<EOF
7659 #define $ac_tr_lib 1
7660 EOF
7661
7662   LIBS="-lsecurity $LIBS"
7663
7664 else
7665   echo "$ac_t""no" 1>&6
7666 fi
7667  
7668      for ac_func in getspnam
7669 do
7670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7671 echo "configure:7672: checking for $ac_func" >&5
7672 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7673   echo $ac_n "(cached) $ac_c" 1>&6
7674 else
7675   cat > conftest.$ac_ext <<EOF
7676 #line 7677 "configure"
7677 #include "confdefs.h"
7678 /* System header to define __stub macros and hopefully few prototypes,
7679     which can conflict with char $ac_func(); below.  */
7680 #include <assert.h>
7681 /* Override any gcc2 internal prototype to avoid an error.  */
7682 /* We use char because int might match the return type of a gcc2
7683     builtin and then its argument prototype would still apply.  */
7684 char $ac_func();
7685
7686 int main() {
7687
7688 /* The GNU C library defines this for functions which it implements
7689     to always fail with ENOSYS.  Some functions are actually named
7690     something starting with __ and the normal name is an alias.  */
7691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7692 choke me
7693 #else
7694 $ac_func();
7695 #endif
7696
7697 ; return 0; }
7698 EOF
7699 if { (eval echo configure:7700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7700   rm -rf conftest*
7701   eval "ac_cv_func_$ac_func=yes"
7702 else
7703   echo "configure: failed program was:" >&5
7704   cat conftest.$ac_ext >&5
7705   rm -rf conftest*
7706   eval "ac_cv_func_$ac_func=no"
7707 fi
7708 rm -f conftest*
7709 fi
7710
7711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7712   echo "$ac_t""yes" 1>&6
7713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7714   cat >> confdefs.h <<EOF
7715 #define $ac_tr_func 1
7716 EOF
7717  
7718 else
7719   echo "$ac_t""no" 1>&6
7720 fi
7721 done
7722
7723   ;;
7724   esac
7725
7726 case "$LIBS" in
7727   *-lsec*) for ac_func in getspnam
7728 do
7729 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7730 echo "configure:7731: checking for $ac_func" >&5
7731 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7732   echo $ac_n "(cached) $ac_c" 1>&6
7733 else
7734   cat > conftest.$ac_ext <<EOF
7735 #line 7736 "configure"
7736 #include "confdefs.h"
7737 /* System header to define __stub macros and hopefully few prototypes,
7738     which can conflict with char $ac_func(); below.  */
7739 #include <assert.h>
7740 /* Override any gcc2 internal prototype to avoid an error.  */
7741 /* We use char because int might match the return type of a gcc2
7742     builtin and then its argument prototype would still apply.  */
7743 char $ac_func();
7744
7745 int main() {
7746
7747 /* The GNU C library defines this for functions which it implements
7748     to always fail with ENOSYS.  Some functions are actually named
7749     something starting with __ and the normal name is an alias.  */
7750 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7751 choke me
7752 #else
7753 $ac_func();
7754 #endif
7755
7756 ; return 0; }
7757 EOF
7758 if { (eval echo configure:7759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7759   rm -rf conftest*
7760   eval "ac_cv_func_$ac_func=yes"
7761 else
7762   echo "configure: failed program was:" >&5
7763   cat conftest.$ac_ext >&5
7764   rm -rf conftest*
7765   eval "ac_cv_func_$ac_func=no"
7766 fi
7767 rm -f conftest*
7768 fi
7769
7770 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7771   echo "$ac_t""yes" 1>&6
7772     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7773   cat >> confdefs.h <<EOF
7774 #define $ac_tr_func 1
7775 EOF
7776  
7777 else
7778   echo "$ac_t""no" 1>&6
7779 fi
7780 done
7781  ;;
7782   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7783 echo "configure:7784: checking for getspnam in -lsec" >&5
7784 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7785 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7786   echo $ac_n "(cached) $ac_c" 1>&6
7787 else
7788   ac_save_LIBS="$LIBS"
7789 LIBS="-lsec  $LIBS"
7790 cat > conftest.$ac_ext <<EOF
7791 #line 7792 "configure"
7792 #include "confdefs.h"
7793 /* Override any gcc2 internal prototype to avoid an error.  */
7794 /* We use char because int might match the return type of a gcc2
7795     builtin and then its argument prototype would still apply.  */
7796 char getspnam();
7797
7798 int main() {
7799 getspnam()
7800 ; return 0; }
7801 EOF
7802 if { (eval echo configure:7803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7803   rm -rf conftest*
7804   eval "ac_cv_lib_$ac_lib_var=yes"
7805 else
7806   echo "configure: failed program was:" >&5
7807   cat conftest.$ac_ext >&5
7808   rm -rf conftest*
7809   eval "ac_cv_lib_$ac_lib_var=no"
7810 fi
7811 rm -f conftest*
7812 LIBS="$ac_save_LIBS"
7813
7814 fi
7815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7816   echo "$ac_t""yes" 1>&6
7817     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7818     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7819   cat >> confdefs.h <<EOF
7820 #define $ac_tr_lib 1
7821 EOF
7822
7823   LIBS="-lsec $LIBS"
7824
7825 else
7826   echo "$ac_t""no" 1>&6
7827 fi
7828  
7829      for ac_func in getspnam
7830 do
7831 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7832 echo "configure:7833: checking for $ac_func" >&5
7833 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7834   echo $ac_n "(cached) $ac_c" 1>&6
7835 else
7836   cat > conftest.$ac_ext <<EOF
7837 #line 7838 "configure"
7838 #include "confdefs.h"
7839 /* System header to define __stub macros and hopefully few prototypes,
7840     which can conflict with char $ac_func(); below.  */
7841 #include <assert.h>
7842 /* Override any gcc2 internal prototype to avoid an error.  */
7843 /* We use char because int might match the return type of a gcc2
7844     builtin and then its argument prototype would still apply.  */
7845 char $ac_func();
7846
7847 int main() {
7848
7849 /* The GNU C library defines this for functions which it implements
7850     to always fail with ENOSYS.  Some functions are actually named
7851     something starting with __ and the normal name is an alias.  */
7852 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7853 choke me
7854 #else
7855 $ac_func();
7856 #endif
7857
7858 ; return 0; }
7859 EOF
7860 if { (eval echo configure:7861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7861   rm -rf conftest*
7862   eval "ac_cv_func_$ac_func=yes"
7863 else
7864   echo "configure: failed program was:" >&5
7865   cat conftest.$ac_ext >&5
7866   rm -rf conftest*
7867   eval "ac_cv_func_$ac_func=no"
7868 fi
7869 rm -f conftest*
7870 fi
7871
7872 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7873   echo "$ac_t""yes" 1>&6
7874     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7875   cat >> confdefs.h <<EOF
7876 #define $ac_tr_func 1
7877 EOF
7878  
7879 else
7880   echo "$ac_t""no" 1>&6
7881 fi
7882 done
7883
7884   ;;
7885   esac
7886
7887
7888 case "$LIBS" in
7889   *-lsecurity*) for ac_func in bigcrypt
7890 do
7891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7892 echo "configure:7893: checking for $ac_func" >&5
7893 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7894   echo $ac_n "(cached) $ac_c" 1>&6
7895 else
7896   cat > conftest.$ac_ext <<EOF
7897 #line 7898 "configure"
7898 #include "confdefs.h"
7899 /* System header to define __stub macros and hopefully few prototypes,
7900     which can conflict with char $ac_func(); below.  */
7901 #include <assert.h>
7902 /* Override any gcc2 internal prototype to avoid an error.  */
7903 /* We use char because int might match the return type of a gcc2
7904     builtin and then its argument prototype would still apply.  */
7905 char $ac_func();
7906
7907 int main() {
7908
7909 /* The GNU C library defines this for functions which it implements
7910     to always fail with ENOSYS.  Some functions are actually named
7911     something starting with __ and the normal name is an alias.  */
7912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7913 choke me
7914 #else
7915 $ac_func();
7916 #endif
7917
7918 ; return 0; }
7919 EOF
7920 if { (eval echo configure:7921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7921   rm -rf conftest*
7922   eval "ac_cv_func_$ac_func=yes"
7923 else
7924   echo "configure: failed program was:" >&5
7925   cat conftest.$ac_ext >&5
7926   rm -rf conftest*
7927   eval "ac_cv_func_$ac_func=no"
7928 fi
7929 rm -f conftest*
7930 fi
7931
7932 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7933   echo "$ac_t""yes" 1>&6
7934     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7935   cat >> confdefs.h <<EOF
7936 #define $ac_tr_func 1
7937 EOF
7938  
7939 else
7940   echo "$ac_t""no" 1>&6
7941 fi
7942 done
7943  ;;
7944   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7945 echo "configure:7946: checking for bigcrypt in -lsecurity" >&5
7946 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7947 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7948   echo $ac_n "(cached) $ac_c" 1>&6
7949 else
7950   ac_save_LIBS="$LIBS"
7951 LIBS="-lsecurity  $LIBS"
7952 cat > conftest.$ac_ext <<EOF
7953 #line 7954 "configure"
7954 #include "confdefs.h"
7955 /* Override any gcc2 internal prototype to avoid an error.  */
7956 /* We use char because int might match the return type of a gcc2
7957     builtin and then its argument prototype would still apply.  */
7958 char bigcrypt();
7959
7960 int main() {
7961 bigcrypt()
7962 ; return 0; }
7963 EOF
7964 if { (eval echo configure:7965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7965   rm -rf conftest*
7966   eval "ac_cv_lib_$ac_lib_var=yes"
7967 else
7968   echo "configure: failed program was:" >&5
7969   cat conftest.$ac_ext >&5
7970   rm -rf conftest*
7971   eval "ac_cv_lib_$ac_lib_var=no"
7972 fi
7973 rm -f conftest*
7974 LIBS="$ac_save_LIBS"
7975
7976 fi
7977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7978   echo "$ac_t""yes" 1>&6
7979     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7980     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7981   cat >> confdefs.h <<EOF
7982 #define $ac_tr_lib 1
7983 EOF
7984
7985   LIBS="-lsecurity $LIBS"
7986
7987 else
7988   echo "$ac_t""no" 1>&6
7989 fi
7990  
7991      for ac_func in bigcrypt
7992 do
7993 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7994 echo "configure:7995: checking for $ac_func" >&5
7995 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7996   echo $ac_n "(cached) $ac_c" 1>&6
7997 else
7998   cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 /* System header to define __stub macros and hopefully few prototypes,
8002     which can conflict with char $ac_func(); below.  */
8003 #include <assert.h>
8004 /* Override any gcc2 internal prototype to avoid an error.  */
8005 /* We use char because int might match the return type of a gcc2
8006     builtin and then its argument prototype would still apply.  */
8007 char $ac_func();
8008
8009 int main() {
8010
8011 /* The GNU C library defines this for functions which it implements
8012     to always fail with ENOSYS.  Some functions are actually named
8013     something starting with __ and the normal name is an alias.  */
8014 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8015 choke me
8016 #else
8017 $ac_func();
8018 #endif
8019
8020 ; return 0; }
8021 EOF
8022 if { (eval echo configure:8023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8023   rm -rf conftest*
8024   eval "ac_cv_func_$ac_func=yes"
8025 else
8026   echo "configure: failed program was:" >&5
8027   cat conftest.$ac_ext >&5
8028   rm -rf conftest*
8029   eval "ac_cv_func_$ac_func=no"
8030 fi
8031 rm -f conftest*
8032 fi
8033
8034 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8035   echo "$ac_t""yes" 1>&6
8036     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8037   cat >> confdefs.h <<EOF
8038 #define $ac_tr_func 1
8039 EOF
8040  
8041 else
8042   echo "$ac_t""no" 1>&6
8043 fi
8044 done
8045
8046   ;;
8047   esac
8048
8049 case "$LIBS" in
8050   *-lsec*) for ac_func in bigcrypt
8051 do
8052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8053 echo "configure:8054: checking for $ac_func" >&5
8054 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8055   echo $ac_n "(cached) $ac_c" 1>&6
8056 else
8057   cat > conftest.$ac_ext <<EOF
8058 #line 8059 "configure"
8059 #include "confdefs.h"
8060 /* System header to define __stub macros and hopefully few prototypes,
8061     which can conflict with char $ac_func(); below.  */
8062 #include <assert.h>
8063 /* Override any gcc2 internal prototype to avoid an error.  */
8064 /* We use char because int might match the return type of a gcc2
8065     builtin and then its argument prototype would still apply.  */
8066 char $ac_func();
8067
8068 int main() {
8069
8070 /* The GNU C library defines this for functions which it implements
8071     to always fail with ENOSYS.  Some functions are actually named
8072     something starting with __ and the normal name is an alias.  */
8073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8074 choke me
8075 #else
8076 $ac_func();
8077 #endif
8078
8079 ; return 0; }
8080 EOF
8081 if { (eval echo configure:8082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8082   rm -rf conftest*
8083   eval "ac_cv_func_$ac_func=yes"
8084 else
8085   echo "configure: failed program was:" >&5
8086   cat conftest.$ac_ext >&5
8087   rm -rf conftest*
8088   eval "ac_cv_func_$ac_func=no"
8089 fi
8090 rm -f conftest*
8091 fi
8092
8093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8094   echo "$ac_t""yes" 1>&6
8095     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8096   cat >> confdefs.h <<EOF
8097 #define $ac_tr_func 1
8098 EOF
8099  
8100 else
8101   echo "$ac_t""no" 1>&6
8102 fi
8103 done
8104  ;;
8105   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8106 echo "configure:8107: checking for bigcrypt in -lsec" >&5
8107 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8108 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8109   echo $ac_n "(cached) $ac_c" 1>&6
8110 else
8111   ac_save_LIBS="$LIBS"
8112 LIBS="-lsec  $LIBS"
8113 cat > conftest.$ac_ext <<EOF
8114 #line 8115 "configure"
8115 #include "confdefs.h"
8116 /* Override any gcc2 internal prototype to avoid an error.  */
8117 /* We use char because int might match the return type of a gcc2
8118     builtin and then its argument prototype would still apply.  */
8119 char bigcrypt();
8120
8121 int main() {
8122 bigcrypt()
8123 ; return 0; }
8124 EOF
8125 if { (eval echo configure:8126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8126   rm -rf conftest*
8127   eval "ac_cv_lib_$ac_lib_var=yes"
8128 else
8129   echo "configure: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   rm -rf conftest*
8132   eval "ac_cv_lib_$ac_lib_var=no"
8133 fi
8134 rm -f conftest*
8135 LIBS="$ac_save_LIBS"
8136
8137 fi
8138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8139   echo "$ac_t""yes" 1>&6
8140     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8141     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8142   cat >> confdefs.h <<EOF
8143 #define $ac_tr_lib 1
8144 EOF
8145
8146   LIBS="-lsec $LIBS"
8147
8148 else
8149   echo "$ac_t""no" 1>&6
8150 fi
8151  
8152      for ac_func in bigcrypt
8153 do
8154 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8155 echo "configure:8156: checking for $ac_func" >&5
8156 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8157   echo $ac_n "(cached) $ac_c" 1>&6
8158 else
8159   cat > conftest.$ac_ext <<EOF
8160 #line 8161 "configure"
8161 #include "confdefs.h"
8162 /* System header to define __stub macros and hopefully few prototypes,
8163     which can conflict with char $ac_func(); below.  */
8164 #include <assert.h>
8165 /* Override any gcc2 internal prototype to avoid an error.  */
8166 /* We use char because int might match the return type of a gcc2
8167     builtin and then its argument prototype would still apply.  */
8168 char $ac_func();
8169
8170 int main() {
8171
8172 /* The GNU C library defines this for functions which it implements
8173     to always fail with ENOSYS.  Some functions are actually named
8174     something starting with __ and the normal name is an alias.  */
8175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8176 choke me
8177 #else
8178 $ac_func();
8179 #endif
8180
8181 ; return 0; }
8182 EOF
8183 if { (eval echo configure:8184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8184   rm -rf conftest*
8185   eval "ac_cv_func_$ac_func=yes"
8186 else
8187   echo "configure: failed program was:" >&5
8188   cat conftest.$ac_ext >&5
8189   rm -rf conftest*
8190   eval "ac_cv_func_$ac_func=no"
8191 fi
8192 rm -f conftest*
8193 fi
8194
8195 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8196   echo "$ac_t""yes" 1>&6
8197     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8198   cat >> confdefs.h <<EOF
8199 #define $ac_tr_func 1
8200 EOF
8201  
8202 else
8203   echo "$ac_t""no" 1>&6
8204 fi
8205 done
8206
8207   ;;
8208   esac
8209
8210
8211 case "$LIBS" in
8212   *-lsecurity*) for ac_func in getprpwnam
8213 do
8214 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8215 echo "configure:8216: checking for $ac_func" >&5
8216 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8217   echo $ac_n "(cached) $ac_c" 1>&6
8218 else
8219   cat > conftest.$ac_ext <<EOF
8220 #line 8221 "configure"
8221 #include "confdefs.h"
8222 /* System header to define __stub macros and hopefully few prototypes,
8223     which can conflict with char $ac_func(); below.  */
8224 #include <assert.h>
8225 /* Override any gcc2 internal prototype to avoid an error.  */
8226 /* We use char because int might match the return type of a gcc2
8227     builtin and then its argument prototype would still apply.  */
8228 char $ac_func();
8229
8230 int main() {
8231
8232 /* The GNU C library defines this for functions which it implements
8233     to always fail with ENOSYS.  Some functions are actually named
8234     something starting with __ and the normal name is an alias.  */
8235 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8236 choke me
8237 #else
8238 $ac_func();
8239 #endif
8240
8241 ; return 0; }
8242 EOF
8243 if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8244   rm -rf conftest*
8245   eval "ac_cv_func_$ac_func=yes"
8246 else
8247   echo "configure: failed program was:" >&5
8248   cat conftest.$ac_ext >&5
8249   rm -rf conftest*
8250   eval "ac_cv_func_$ac_func=no"
8251 fi
8252 rm -f conftest*
8253 fi
8254
8255 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8256   echo "$ac_t""yes" 1>&6
8257     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8258   cat >> confdefs.h <<EOF
8259 #define $ac_tr_func 1
8260 EOF
8261  
8262 else
8263   echo "$ac_t""no" 1>&6
8264 fi
8265 done
8266  ;;
8267   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8268 echo "configure:8269: checking for getprpwnam in -lsecurity" >&5
8269 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8270 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8271   echo $ac_n "(cached) $ac_c" 1>&6
8272 else
8273   ac_save_LIBS="$LIBS"
8274 LIBS="-lsecurity  $LIBS"
8275 cat > conftest.$ac_ext <<EOF
8276 #line 8277 "configure"
8277 #include "confdefs.h"
8278 /* Override any gcc2 internal prototype to avoid an error.  */
8279 /* We use char because int might match the return type of a gcc2
8280     builtin and then its argument prototype would still apply.  */
8281 char getprpwnam();
8282
8283 int main() {
8284 getprpwnam()
8285 ; return 0; }
8286 EOF
8287 if { (eval echo configure:8288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8288   rm -rf conftest*
8289   eval "ac_cv_lib_$ac_lib_var=yes"
8290 else
8291   echo "configure: failed program was:" >&5
8292   cat conftest.$ac_ext >&5
8293   rm -rf conftest*
8294   eval "ac_cv_lib_$ac_lib_var=no"
8295 fi
8296 rm -f conftest*
8297 LIBS="$ac_save_LIBS"
8298
8299 fi
8300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8301   echo "$ac_t""yes" 1>&6
8302     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8304   cat >> confdefs.h <<EOF
8305 #define $ac_tr_lib 1
8306 EOF
8307
8308   LIBS="-lsecurity $LIBS"
8309
8310 else
8311   echo "$ac_t""no" 1>&6
8312 fi
8313  
8314      for ac_func in getprpwnam
8315 do
8316 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8317 echo "configure:8318: checking for $ac_func" >&5
8318 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8319   echo $ac_n "(cached) $ac_c" 1>&6
8320 else
8321   cat > conftest.$ac_ext <<EOF
8322 #line 8323 "configure"
8323 #include "confdefs.h"
8324 /* System header to define __stub macros and hopefully few prototypes,
8325     which can conflict with char $ac_func(); below.  */
8326 #include <assert.h>
8327 /* Override any gcc2 internal prototype to avoid an error.  */
8328 /* We use char because int might match the return type of a gcc2
8329     builtin and then its argument prototype would still apply.  */
8330 char $ac_func();
8331
8332 int main() {
8333
8334 /* The GNU C library defines this for functions which it implements
8335     to always fail with ENOSYS.  Some functions are actually named
8336     something starting with __ and the normal name is an alias.  */
8337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8338 choke me
8339 #else
8340 $ac_func();
8341 #endif
8342
8343 ; return 0; }
8344 EOF
8345 if { (eval echo configure:8346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8346   rm -rf conftest*
8347   eval "ac_cv_func_$ac_func=yes"
8348 else
8349   echo "configure: failed program was:" >&5
8350   cat conftest.$ac_ext >&5
8351   rm -rf conftest*
8352   eval "ac_cv_func_$ac_func=no"
8353 fi
8354 rm -f conftest*
8355 fi
8356
8357 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8358   echo "$ac_t""yes" 1>&6
8359     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8360   cat >> confdefs.h <<EOF
8361 #define $ac_tr_func 1
8362 EOF
8363  
8364 else
8365   echo "$ac_t""no" 1>&6
8366 fi
8367 done
8368
8369   ;;
8370   esac
8371
8372 case "$LIBS" in
8373   *-lsec*) for ac_func in getprpwnam
8374 do
8375 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8376 echo "configure:8377: checking for $ac_func" >&5
8377 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8378   echo $ac_n "(cached) $ac_c" 1>&6
8379 else
8380   cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 /* System header to define __stub macros and hopefully few prototypes,
8384     which can conflict with char $ac_func(); below.  */
8385 #include <assert.h>
8386 /* Override any gcc2 internal prototype to avoid an error.  */
8387 /* We use char because int might match the return type of a gcc2
8388     builtin and then its argument prototype would still apply.  */
8389 char $ac_func();
8390
8391 int main() {
8392
8393 /* The GNU C library defines this for functions which it implements
8394     to always fail with ENOSYS.  Some functions are actually named
8395     something starting with __ and the normal name is an alias.  */
8396 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8397 choke me
8398 #else
8399 $ac_func();
8400 #endif
8401
8402 ; return 0; }
8403 EOF
8404 if { (eval echo configure:8405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8405   rm -rf conftest*
8406   eval "ac_cv_func_$ac_func=yes"
8407 else
8408   echo "configure: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   rm -rf conftest*
8411   eval "ac_cv_func_$ac_func=no"
8412 fi
8413 rm -f conftest*
8414 fi
8415
8416 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8417   echo "$ac_t""yes" 1>&6
8418     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8419   cat >> confdefs.h <<EOF
8420 #define $ac_tr_func 1
8421 EOF
8422  
8423 else
8424   echo "$ac_t""no" 1>&6
8425 fi
8426 done
8427  ;;
8428   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8429 echo "configure:8430: checking for getprpwnam in -lsec" >&5
8430 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8431 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8432   echo $ac_n "(cached) $ac_c" 1>&6
8433 else
8434   ac_save_LIBS="$LIBS"
8435 LIBS="-lsec  $LIBS"
8436 cat > conftest.$ac_ext <<EOF
8437 #line 8438 "configure"
8438 #include "confdefs.h"
8439 /* Override any gcc2 internal prototype to avoid an error.  */
8440 /* We use char because int might match the return type of a gcc2
8441     builtin and then its argument prototype would still apply.  */
8442 char getprpwnam();
8443
8444 int main() {
8445 getprpwnam()
8446 ; return 0; }
8447 EOF
8448 if { (eval echo configure:8449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8449   rm -rf conftest*
8450   eval "ac_cv_lib_$ac_lib_var=yes"
8451 else
8452   echo "configure: failed program was:" >&5
8453   cat conftest.$ac_ext >&5
8454   rm -rf conftest*
8455   eval "ac_cv_lib_$ac_lib_var=no"
8456 fi
8457 rm -f conftest*
8458 LIBS="$ac_save_LIBS"
8459
8460 fi
8461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8462   echo "$ac_t""yes" 1>&6
8463     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8464     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8465   cat >> confdefs.h <<EOF
8466 #define $ac_tr_lib 1
8467 EOF
8468
8469   LIBS="-lsec $LIBS"
8470
8471 else
8472   echo "$ac_t""no" 1>&6
8473 fi
8474  
8475      for ac_func in getprpwnam
8476 do
8477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8478 echo "configure:8479: checking for $ac_func" >&5
8479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8480   echo $ac_n "(cached) $ac_c" 1>&6
8481 else
8482   cat > conftest.$ac_ext <<EOF
8483 #line 8484 "configure"
8484 #include "confdefs.h"
8485 /* System header to define __stub macros and hopefully few prototypes,
8486     which can conflict with char $ac_func(); below.  */
8487 #include <assert.h>
8488 /* Override any gcc2 internal prototype to avoid an error.  */
8489 /* We use char because int might match the return type of a gcc2
8490     builtin and then its argument prototype would still apply.  */
8491 char $ac_func();
8492
8493 int main() {
8494
8495 /* The GNU C library defines this for functions which it implements
8496     to always fail with ENOSYS.  Some functions are actually named
8497     something starting with __ and the normal name is an alias.  */
8498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8499 choke me
8500 #else
8501 $ac_func();
8502 #endif
8503
8504 ; return 0; }
8505 EOF
8506 if { (eval echo configure:8507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8507   rm -rf conftest*
8508   eval "ac_cv_func_$ac_func=yes"
8509 else
8510   echo "configure: failed program was:" >&5
8511   cat conftest.$ac_ext >&5
8512   rm -rf conftest*
8513   eval "ac_cv_func_$ac_func=no"
8514 fi
8515 rm -f conftest*
8516 fi
8517
8518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8519   echo "$ac_t""yes" 1>&6
8520     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8521   cat >> confdefs.h <<EOF
8522 #define $ac_tr_func 1
8523 EOF
8524  
8525 else
8526   echo "$ac_t""no" 1>&6
8527 fi
8528 done
8529
8530   ;;
8531   esac
8532
8533
8534 # this bit needs to be modified for each OS that is suported by
8535 # smbwrapper. You need to specify how to created a shared library and
8536 # how to compile C code to produce PIC object files
8537
8538 # these are the defaults, good for lots of systems
8539 HOST_OS="$host_os"
8540 LDSHFLAGS="-shared"
8541 SHLD="\${CC}"
8542 PICFLAG=""
8543 PICSUFFIX="po"
8544 POBAD_CC="#"
8545 SHLIBEXT="so"
8546 # Assume non-shared by default and override below
8547 BLDSHARED="false"
8548 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8549 echo "configure:8550: checking ability to build shared libraries" >&5
8550
8551 # and these are for particular systems
8552 case "$host_os" in
8553                 *linux*)   cat >> confdefs.h <<\EOF
8554 #define LINUX 1
8555 EOF
8556
8557                         BLDSHARED="true"
8558                         LDSHFLAGS="-shared" 
8559                         PICFLAG="-fPIC"
8560                         cat >> confdefs.h <<\EOF
8561 #define STAT_ST_BLOCKSIZE 512
8562 EOF
8563
8564                 ;;
8565                 *solaris*) cat >> confdefs.h <<\EOF
8566 #define SUNOS5 1
8567 EOF
8568
8569                         BLDSHARED="true"
8570                         LDSHFLAGS="-h \$@ -G"
8571                         if test "${ac_cv_prog_CC}" = "gcc"; then
8572                                 PICFLAG="-fPIC"
8573                         else
8574                                 PICFLAG="-KPIC"
8575                                 POBAD_CC=""
8576                                 PICSUFFIX="po.o"
8577                         fi
8578                         cat >> confdefs.h <<\EOF
8579 #define STAT_ST_BLOCKSIZE 512
8580 EOF
8581
8582                 ;;
8583                 *sunos*) cat >> confdefs.h <<\EOF
8584 #define SUNOS4 1
8585 EOF
8586
8587                         BLDSHARED="true"
8588                         LDSHFLAGS="-Wl,-h,\$@ -G"
8589                         PICFLAG="-KPIC"   # Is this correct for SunOS
8590                 ;;
8591                 *bsd*)  BLDSHARED="true"
8592                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8593                         PICFLAG="-fPIC"
8594                         cat >> confdefs.h <<\EOF
8595 #define STAT_ST_BLOCKSIZE 512
8596 EOF
8597
8598                 ;;
8599                 *irix*) cat >> confdefs.h <<\EOF
8600 #define IRIX 1
8601 EOF
8602
8603                         case "$host_os" in
8604                         *irix6*) cat >> confdefs.h <<\EOF
8605 #define IRIX6 1
8606 EOF
8607
8608                         ;;
8609                         esac
8610                         ATTEMPT_WRAP32_BUILD=yes
8611                         BLDSHARED="true"
8612                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8613                         if test "${ac_cv_prog_CC}" = "gcc"; then
8614                                 PICFLAG="-fPIC"
8615                         else 
8616                                 PICFLAG="-KPIC"
8617                         fi
8618                         cat >> confdefs.h <<\EOF
8619 #define STAT_ST_BLOCKSIZE 512
8620 EOF
8621
8622                 ;;
8623                 *aix*) cat >> confdefs.h <<\EOF
8624 #define AIX 1
8625 EOF
8626
8627                         BLDSHARED="true"
8628                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8629                         PICFLAG="-O2 -qmaxmem=6000"
8630                         cat >> confdefs.h <<\EOF
8631 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8632 EOF
8633
8634                 ;;
8635                 *hpux*) cat >> confdefs.h <<\EOF
8636 #define HPUX 1
8637 EOF
8638
8639                         SHLIBEXT="sl"
8640                         # Use special PIC flags for the native HP-UX compiler.
8641                         if test $ac_cv_prog_cc_Ae = yes; then
8642                                 #BLDSHARED="true"
8643                                 LDSHFLAGS="-b -z +h \$@"
8644                                 PICFLAG="+z"
8645                         fi
8646                         cat >> confdefs.h <<\EOF
8647 #define STAT_ST_BLOCKSIZE 8192
8648 EOF
8649
8650                 ;;
8651                 *qnx*) cat >> confdefs.h <<\EOF
8652 #define QNX 1
8653 EOF
8654 ;;
8655                 *osf*) cat >> confdefs.h <<\EOF
8656 #define OSF1 1
8657 EOF
8658
8659                         BLDSHARED="true"
8660                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8661                         PICFLAG="-fPIC"
8662                 ;;
8663                 *sco*) cat >> confdefs.h <<\EOF
8664 #define SCO 1
8665 EOF
8666 ;;
8667                 *unixware*) cat >> confdefs.h <<\EOF
8668 #define UNIXWARE 1
8669 EOF
8670
8671                         BLDSHARED="true"
8672                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8673                         PICFLAG="-KPIC"
8674                 ;;
8675                 *next2*) cat >> confdefs.h <<\EOF
8676 #define NEXT2 1
8677 EOF
8678 ;;
8679                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8680 set dummy groff; ac_word=$2
8681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8682 echo "configure:8683: checking for $ac_word" >&5
8683 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8684   echo $ac_n "(cached) $ac_c" 1>&6
8685 else
8686   if test -n "$ROFF"; then
8687   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8688 else
8689   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8690   ac_dummy="$PATH"
8691   for ac_dir in $ac_dummy; do
8692     test -z "$ac_dir" && ac_dir=.
8693     if test -f $ac_dir/$ac_word; then
8694       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8695       break
8696     fi
8697   done
8698   IFS="$ac_save_ifs"
8699 fi
8700 fi
8701 ROFF="$ac_cv_prog_ROFF"
8702 if test -n "$ROFF"; then
8703   echo "$ac_t""$ROFF" 1>&6
8704 else
8705   echo "$ac_t""no" 1>&6
8706 fi
8707 ;;
8708                 *sysv4*)
8709                         case "$host" in
8710                                 *-univel-*)     if  test "$GCC" != yes ; then
8711                                                                         cat >> confdefs.h <<\EOF
8712 #define HAVE_MEMSET 1
8713 EOF
8714
8715                                                                 fi
8716                                                                 LDSHFLAGS="-G"
8717                                 ;;
8718                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8719 #define RELIANTUNIX 1
8720 EOF
8721 ;;
8722                         esac
8723                         ;;
8724                 *sysv5*)
8725                         if  test "$GCC" != yes ; then
8726                                 cat >> confdefs.h <<\EOF
8727 #define HAVE_MEMSET 1
8728 EOF
8729
8730                         fi
8731                         LDSHFLAGS="-G"
8732                         ;;
8733 esac
8734 echo "$ac_t""$BLDSHARED" 1>&6
8735 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8736 echo "configure:8737: checking linker flags for shared libraries" >&5
8737 echo "$ac_t""$LDSHFLAGS" 1>&6
8738 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8739 echo "configure:8740: checking compiler flags for position-independent code" >&5
8740 echo "$ac_t""$PICFLAGS" 1>&6
8741
8742 #######################################################
8743 # test whether building a shared library actually works
8744 if test $BLDSHARED = true; then
8745 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
8746 echo "configure:8747: checking whether building shared libraries actually works" >&5
8747 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
8748   echo $ac_n "(cached) $ac_c" 1>&6
8749 else
8750   
8751    ac_cv_shlib_works=no
8752    # try building a trivial shared library
8753    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
8754      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
8755      ac_cv_shlib_works=yes
8756    rm -f shlib.so shlib.po
8757
8758 fi
8759
8760 echo "$ac_t""$ac_cv_shlib_works" 1>&6
8761 if test $ac_cv_shlib_works = no; then
8762    BLDSHARED=false
8763 fi
8764 fi
8765
8766
8767 # this updates our target list if we can build shared libs
8768 if test $BLDSHARED = true; then
8769    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8770 else
8771    LIBSMBCLIENT_SHARED=
8772 fi
8773
8774 ################
8775
8776 echo $ac_n "checking for long long""... $ac_c" 1>&6
8777 echo "configure:8778: checking for long long" >&5
8778 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8779   echo $ac_n "(cached) $ac_c" 1>&6
8780 else
8781   
8782 if test "$cross_compiling" = yes; then
8783   samba_cv_have_longlong=cross
8784 else
8785   cat > conftest.$ac_ext <<EOF
8786 #line 8787 "configure"
8787 #include "confdefs.h"
8788 #include <stdio.h>
8789 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8790 EOF
8791 if { (eval echo configure:8792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8792 then
8793   samba_cv_have_longlong=yes
8794 else
8795   echo "configure: failed program was:" >&5
8796   cat conftest.$ac_ext >&5
8797   rm -fr conftest*
8798   samba_cv_have_longlong=no
8799 fi
8800 rm -fr conftest*
8801 fi
8802
8803 fi
8804
8805 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8806 if test x"$samba_cv_have_longlong" = x"yes"; then
8807     cat >> confdefs.h <<\EOF
8808 #define HAVE_LONGLONG 1
8809 EOF
8810
8811 fi
8812
8813 #
8814 # Check if the compiler supports the LL prefix on long long integers.
8815 # AIX needs this.
8816
8817 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8818 echo "configure:8819: checking for LL suffix on long long integers" >&5
8819 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8820   echo $ac_n "(cached) $ac_c" 1>&6
8821 else
8822   
8823     cat > conftest.$ac_ext <<EOF
8824 #line 8825 "configure"
8825 #include "confdefs.h"
8826 #include <stdio.h>
8827 int main() {
8828 long long i = 0x8000000000LL
8829 ; return 0; }
8830 EOF
8831 if { (eval echo configure:8832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8832   rm -rf conftest*
8833   samba_cv_compiler_supports_ll=yes
8834 else
8835   echo "configure: failed program was:" >&5
8836   cat conftest.$ac_ext >&5
8837   rm -rf conftest*
8838   samba_cv_compiler_supports_ll=no
8839 fi
8840 rm -f conftest*
8841 fi
8842
8843 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8844 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8845    cat >> confdefs.h <<\EOF
8846 #define COMPILER_SUPPORTS_LL 1
8847 EOF
8848
8849 fi
8850
8851   
8852 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8853 echo "configure:8854: checking for 64 bit off_t" >&5
8854 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8855   echo $ac_n "(cached) $ac_c" 1>&6
8856 else
8857   
8858 if test "$cross_compiling" = yes; then
8859   samba_cv_SIZEOF_OFF_T=cross
8860 else
8861   cat > conftest.$ac_ext <<EOF
8862 #line 8863 "configure"
8863 #include "confdefs.h"
8864 #include <stdio.h>
8865 #include <sys/stat.h>
8866 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8867 EOF
8868 if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8869 then
8870   samba_cv_SIZEOF_OFF_T=yes
8871 else
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -fr conftest*
8875   samba_cv_SIZEOF_OFF_T=no
8876 fi
8877 rm -fr conftest*
8878 fi
8879
8880 fi
8881
8882 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8883 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8884     cat >> confdefs.h <<\EOF
8885 #define SIZEOF_OFF_T 8
8886 EOF
8887
8888 fi
8889
8890 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8891 echo "configure:8892: checking for off64_t" >&5
8892 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8893   echo $ac_n "(cached) $ac_c" 1>&6
8894 else
8895   
8896 if test "$cross_compiling" = yes; then
8897   samba_cv_HAVE_OFF64_T=cross
8898 else
8899   cat > conftest.$ac_ext <<EOF
8900 #line 8901 "configure"
8901 #include "confdefs.h"
8902
8903 #if defined(HAVE_UNISTD_H)
8904 #include <unistd.h>
8905 #endif
8906 #include <stdio.h>
8907 #include <sys/stat.h>
8908 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8909 EOF
8910 if { (eval echo configure:8911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8911 then
8912   samba_cv_HAVE_OFF64_T=yes
8913 else
8914   echo "configure: failed program was:" >&5
8915   cat conftest.$ac_ext >&5
8916   rm -fr conftest*
8917   samba_cv_HAVE_OFF64_T=no
8918 fi
8919 rm -fr conftest*
8920 fi
8921
8922 fi
8923
8924 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8925 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8926     cat >> confdefs.h <<\EOF
8927 #define HAVE_OFF64_T 1
8928 EOF
8929
8930 fi
8931
8932 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8933 echo "configure:8934: checking for 64 bit ino_t" >&5
8934 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8935   echo $ac_n "(cached) $ac_c" 1>&6
8936 else
8937   
8938 if test "$cross_compiling" = yes; then
8939   samba_cv_SIZEOF_INO_T=cross
8940 else
8941   cat > conftest.$ac_ext <<EOF
8942 #line 8943 "configure"
8943 #include "confdefs.h"
8944 #include <stdio.h>
8945 #include <sys/stat.h>
8946 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8947 EOF
8948 if { (eval echo configure:8949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8949 then
8950   samba_cv_SIZEOF_INO_T=yes
8951 else
8952   echo "configure: failed program was:" >&5
8953   cat conftest.$ac_ext >&5
8954   rm -fr conftest*
8955   samba_cv_SIZEOF_INO_T=no
8956 fi
8957 rm -fr conftest*
8958 fi
8959
8960 fi
8961
8962 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8963 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8964     cat >> confdefs.h <<\EOF
8965 #define SIZEOF_INO_T 8
8966 EOF
8967
8968 fi
8969
8970 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8971 echo "configure:8972: checking for ino64_t" >&5
8972 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8973   echo $ac_n "(cached) $ac_c" 1>&6
8974 else
8975   
8976 if test "$cross_compiling" = yes; then
8977   samba_cv_HAVE_INO64_T=cross
8978 else
8979   cat > conftest.$ac_ext <<EOF
8980 #line 8981 "configure"
8981 #include "confdefs.h"
8982
8983 #if defined(HAVE_UNISTD_H)
8984 #include <unistd.h>
8985 #endif
8986 #include <stdio.h>
8987 #include <sys/stat.h>
8988 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8989 EOF
8990 if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8991 then
8992   samba_cv_HAVE_INO64_T=yes
8993 else
8994   echo "configure: failed program was:" >&5
8995   cat conftest.$ac_ext >&5
8996   rm -fr conftest*
8997   samba_cv_HAVE_INO64_T=no
8998 fi
8999 rm -fr conftest*
9000 fi
9001
9002 fi
9003
9004 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9005 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9006     cat >> confdefs.h <<\EOF
9007 #define HAVE_INO64_T 1
9008 EOF
9009
9010 fi
9011
9012 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9013 echo "configure:9014: checking for dev64_t" >&5
9014 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9015   echo $ac_n "(cached) $ac_c" 1>&6
9016 else
9017   
9018 if test "$cross_compiling" = yes; then
9019   samba_cv_HAVE_DEV64_T=cross
9020 else
9021   cat > conftest.$ac_ext <<EOF
9022 #line 9023 "configure"
9023 #include "confdefs.h"
9024
9025 #if defined(HAVE_UNISTD_H)
9026 #include <unistd.h>
9027 #endif
9028 #include <stdio.h>
9029 #include <sys/stat.h>
9030 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9031 EOF
9032 if { (eval echo configure:9033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9033 then
9034   samba_cv_HAVE_DEV64_T=yes
9035 else
9036   echo "configure: failed program was:" >&5
9037   cat conftest.$ac_ext >&5
9038   rm -fr conftest*
9039   samba_cv_HAVE_DEV64_T=no
9040 fi
9041 rm -fr conftest*
9042 fi
9043
9044 fi
9045
9046 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9047 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9048     cat >> confdefs.h <<\EOF
9049 #define HAVE_DEV64_T 1
9050 EOF
9051
9052 fi
9053
9054 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9055 echo "configure:9056: checking for struct dirent64" >&5
9056 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9057   echo $ac_n "(cached) $ac_c" 1>&6
9058 else
9059   
9060 cat > conftest.$ac_ext <<EOF
9061 #line 9062 "configure"
9062 #include "confdefs.h"
9063
9064 #if defined(HAVE_UNISTD_H)
9065 #include <unistd.h>
9066 #endif
9067 #include <sys/types.h>
9068 #include <dirent.h>
9069 int main() {
9070 struct dirent64 de;
9071 ; return 0; }
9072 EOF
9073 if { (eval echo configure:9074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9074   rm -rf conftest*
9075   samba_cv_HAVE_STRUCT_DIRENT64=yes
9076 else
9077   echo "configure: failed program was:" >&5
9078   cat conftest.$ac_ext >&5
9079   rm -rf conftest*
9080   samba_cv_HAVE_STRUCT_DIRENT64=no
9081 fi
9082 rm -f conftest*
9083 fi
9084
9085 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9086 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9087     cat >> confdefs.h <<\EOF
9088 #define HAVE_STRUCT_DIRENT64 1
9089 EOF
9090
9091 fi
9092
9093 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9094 echo "configure:9095: checking for major macro" >&5
9095 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9096   echo $ac_n "(cached) $ac_c" 1>&6
9097 else
9098   
9099 if test "$cross_compiling" = yes; then
9100   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9101 else
9102   cat > conftest.$ac_ext <<EOF
9103 #line 9104 "configure"
9104 #include "confdefs.h"
9105
9106 #if defined(HAVE_UNISTD_H)
9107 #include <unistd.h>
9108 #endif
9109 #include <sys/types.h>
9110 main() { dev_t dev; int i = major(dev); return 0; }
9111 EOF
9112 if { (eval echo configure:9113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9113 then
9114   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9115 else
9116   echo "configure: failed program was:" >&5
9117   cat conftest.$ac_ext >&5
9118   rm -fr conftest*
9119   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9120 fi
9121 rm -fr conftest*
9122 fi
9123
9124 fi
9125
9126 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9127 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9128     cat >> confdefs.h <<\EOF
9129 #define HAVE_DEVICE_MAJOR_FN 1
9130 EOF
9131
9132 fi
9133
9134 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9135 echo "configure:9136: checking for minor macro" >&5
9136 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9137   echo $ac_n "(cached) $ac_c" 1>&6
9138 else
9139   
9140 if test "$cross_compiling" = yes; then
9141   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9142 else
9143   cat > conftest.$ac_ext <<EOF
9144 #line 9145 "configure"
9145 #include "confdefs.h"
9146
9147 #if defined(HAVE_UNISTD_H)
9148 #include <unistd.h>
9149 #endif
9150 #include <sys/types.h>
9151 main() { dev_t dev; int i = minor(dev); return 0; }
9152 EOF
9153 if { (eval echo configure:9154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9154 then
9155   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9156 else
9157   echo "configure: failed program was:" >&5
9158   cat conftest.$ac_ext >&5
9159   rm -fr conftest*
9160   samba_cv_HAVE_DEVICE_MINOR_FN=no
9161 fi
9162 rm -fr conftest*
9163 fi
9164
9165 fi
9166
9167 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9168 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9169     cat >> confdefs.h <<\EOF
9170 #define HAVE_DEVICE_MINOR_FN 1
9171 EOF
9172
9173 fi
9174
9175 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9176 echo "configure:9177: checking for unsigned char" >&5
9177 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9178   echo $ac_n "(cached) $ac_c" 1>&6
9179 else
9180   
9181 if test "$cross_compiling" = yes; then
9182   samba_cv_HAVE_UNSIGNED_CHAR=cross
9183 else
9184   cat > conftest.$ac_ext <<EOF
9185 #line 9186 "configure"
9186 #include "confdefs.h"
9187 #include <stdio.h>
9188 main() { char c; c=250; exit((c > 0)?0:1); }
9189 EOF
9190 if { (eval echo configure:9191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9191 then
9192   samba_cv_HAVE_UNSIGNED_CHAR=yes
9193 else
9194   echo "configure: failed program was:" >&5
9195   cat conftest.$ac_ext >&5
9196   rm -fr conftest*
9197   samba_cv_HAVE_UNSIGNED_CHAR=no
9198 fi
9199 rm -fr conftest*
9200 fi
9201
9202 fi
9203
9204 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9205 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9206     cat >> confdefs.h <<\EOF
9207 #define HAVE_UNSIGNED_CHAR 1
9208 EOF
9209
9210 fi
9211
9212 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9213 echo "configure:9214: checking for sin_len in sock" >&5
9214 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9215   echo $ac_n "(cached) $ac_c" 1>&6
9216 else
9217   
9218 cat > conftest.$ac_ext <<EOF
9219 #line 9220 "configure"
9220 #include "confdefs.h"
9221 #include <sys/types.h>
9222 #include <sys/socket.h>
9223 #include <netinet/in.h>
9224 int main() {
9225 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9226 ; return 0; }
9227 EOF
9228 if { (eval echo configure:9229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9229   rm -rf conftest*
9230   samba_cv_HAVE_SOCK_SIN_LEN=yes
9231 else
9232   echo "configure: failed program was:" >&5
9233   cat conftest.$ac_ext >&5
9234   rm -rf conftest*
9235   samba_cv_HAVE_SOCK_SIN_LEN=no
9236 fi
9237 rm -f conftest*
9238 fi
9239
9240 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9241 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9242     cat >> confdefs.h <<\EOF
9243 #define HAVE_SOCK_SIN_LEN 1
9244 EOF
9245
9246 fi
9247
9248 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9249 echo "configure:9250: checking whether seekdir returns void" >&5
9250 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9251   echo $ac_n "(cached) $ac_c" 1>&6
9252 else
9253   
9254 cat > conftest.$ac_ext <<EOF
9255 #line 9256 "configure"
9256 #include "confdefs.h"
9257 #include <sys/types.h>
9258 #include <dirent.h>
9259 void seekdir(DIR *d, long loc) { return; }
9260 int main() {
9261 return 0;
9262 ; return 0; }
9263 EOF
9264 if { (eval echo configure:9265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9265   rm -rf conftest*
9266   samba_cv_SEEKDIR_RETURNS_VOID=yes
9267 else
9268   echo "configure: failed program was:" >&5
9269   cat conftest.$ac_ext >&5
9270   rm -rf conftest*
9271   samba_cv_SEEKDIR_RETURNS_VOID=no
9272 fi
9273 rm -f conftest*
9274 fi
9275
9276 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9277 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9278     cat >> confdefs.h <<\EOF
9279 #define SEEKDIR_RETURNS_VOID 1
9280 EOF
9281
9282 fi
9283
9284 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9285 echo "configure:9286: checking for __FILE__ macro" >&5
9286 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9287   echo $ac_n "(cached) $ac_c" 1>&6
9288 else
9289   
9290 cat > conftest.$ac_ext <<EOF
9291 #line 9292 "configure"
9292 #include "confdefs.h"
9293 #include <stdio.h>
9294 int main() {
9295 printf("%s\n", __FILE__);
9296 ; return 0; }
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9299   rm -rf conftest*
9300   samba_cv_HAVE_FILE_MACRO=yes
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   samba_cv_HAVE_FILE_MACRO=no
9306 fi
9307 rm -f conftest*
9308 fi
9309
9310 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9311 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9312     cat >> confdefs.h <<\EOF
9313 #define HAVE_FILE_MACRO 1
9314 EOF
9315
9316 fi
9317
9318 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9319 echo "configure:9320: checking for __FUNCTION__ macro" >&5
9320 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9321   echo $ac_n "(cached) $ac_c" 1>&6
9322 else
9323   
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327 #include <stdio.h>
9328 int main() {
9329 printf("%s\n", __FUNCTION__);
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9333   rm -rf conftest*
9334   samba_cv_HAVE_FUNCTION_MACRO=yes
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   samba_cv_HAVE_FUNCTION_MACRO=no
9340 fi
9341 rm -f conftest*
9342 fi
9343
9344 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9345 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9346     cat >> confdefs.h <<\EOF
9347 #define HAVE_FUNCTION_MACRO 1
9348 EOF
9349
9350 fi
9351
9352 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9353 echo "configure:9354: checking if gettimeofday takes tz argument" >&5
9354 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9355   echo $ac_n "(cached) $ac_c" 1>&6
9356 else
9357   
9358 if test "$cross_compiling" = yes; then
9359   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9360 else
9361   cat > conftest.$ac_ext <<EOF
9362 #line 9363 "configure"
9363 #include "confdefs.h"
9364
9365 #include <sys/time.h>
9366 #include <unistd.h>
9367 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9368 EOF
9369 if { (eval echo configure:9370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9370 then
9371   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9372 else
9373   echo "configure: failed program was:" >&5
9374   cat conftest.$ac_ext >&5
9375   rm -fr conftest*
9376   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9377 fi
9378 rm -fr conftest*
9379 fi
9380
9381 fi
9382
9383 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9384 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9385     cat >> confdefs.h <<\EOF
9386 #define HAVE_GETTIMEOFDAY_TZ 1
9387 EOF
9388
9389 fi
9390
9391 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9392 echo "configure:9393: checking for C99 vsnprintf" >&5
9393 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9394   echo $ac_n "(cached) $ac_c" 1>&6
9395 else
9396   
9397 if test "$cross_compiling" = yes; then
9398   samba_cv_HAVE_C99_VSNPRINTF=cross
9399 else
9400   cat > conftest.$ac_ext <<EOF
9401 #line 9402 "configure"
9402 #include "confdefs.h"
9403
9404 #include <sys/types.h>
9405 #include <stdarg.h>
9406 void foo(const char *format, ...) { 
9407        va_list ap;
9408        int len;
9409        char buf[5];
9410
9411        va_start(ap, format);
9412        len = vsnprintf(0, 0, format, ap);
9413        va_end(ap);
9414        if (len != 5) exit(1);
9415
9416        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9417
9418        exit(0);
9419 }
9420 main() { foo("hello"); }
9421
9422 EOF
9423 if { (eval echo configure:9424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9424 then
9425   samba_cv_HAVE_C99_VSNPRINTF=yes
9426 else
9427   echo "configure: failed program was:" >&5
9428   cat conftest.$ac_ext >&5
9429   rm -fr conftest*
9430   samba_cv_HAVE_C99_VSNPRINTF=no
9431 fi
9432 rm -fr conftest*
9433 fi
9434
9435 fi
9436
9437 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9438 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9439     cat >> confdefs.h <<\EOF
9440 #define HAVE_C99_VSNPRINTF 1
9441 EOF
9442
9443 fi
9444
9445 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9446 echo "configure:9447: checking for broken readdir" >&5
9447 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9448   echo $ac_n "(cached) $ac_c" 1>&6
9449 else
9450   
9451 if test "$cross_compiling" = yes; then
9452   samba_cv_HAVE_BROKEN_READDIR=cross
9453 else
9454   cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457 #include <sys/types.h>
9458 #include <dirent.h>
9459 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9460 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9461 di->d_name[0] == 0) exit(0); exit(1);} 
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9464 then
9465   samba_cv_HAVE_BROKEN_READDIR=yes
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -fr conftest*
9470   samba_cv_HAVE_BROKEN_READDIR=no
9471 fi
9472 rm -fr conftest*
9473 fi
9474
9475 fi
9476
9477 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9478 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9479     cat >> confdefs.h <<\EOF
9480 #define HAVE_BROKEN_READDIR 1
9481 EOF
9482
9483 fi
9484
9485 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9486 echo "configure:9487: checking for utimbuf" >&5
9487 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9488   echo $ac_n "(cached) $ac_c" 1>&6
9489 else
9490   
9491 cat > conftest.$ac_ext <<EOF
9492 #line 9493 "configure"
9493 #include "confdefs.h"
9494 #include <sys/types.h>
9495 #include <utime.h>
9496 int main() {
9497 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9498 ; return 0; }
9499 EOF
9500 if { (eval echo configure:9501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9501   rm -rf conftest*
9502   samba_cv_HAVE_UTIMBUF=yes
9503 else
9504   echo "configure: failed program was:" >&5
9505   cat conftest.$ac_ext >&5
9506   rm -rf conftest*
9507   samba_cv_HAVE_UTIMBUF=no
9508 fi
9509 rm -f conftest*
9510 fi
9511
9512 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9513 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9514     cat >> confdefs.h <<\EOF
9515 #define HAVE_UTIMBUF 1
9516 EOF
9517
9518 fi
9519
9520
9521 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9522 do
9523 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9524 echo "configure:9525: checking for $ac_func" >&5
9525 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9526   echo $ac_n "(cached) $ac_c" 1>&6
9527 else
9528   cat > conftest.$ac_ext <<EOF
9529 #line 9530 "configure"
9530 #include "confdefs.h"
9531 /* System header to define __stub macros and hopefully few prototypes,
9532     which can conflict with char $ac_func(); below.  */
9533 #include <assert.h>
9534 /* Override any gcc2 internal prototype to avoid an error.  */
9535 /* We use char because int might match the return type of a gcc2
9536     builtin and then its argument prototype would still apply.  */
9537 char $ac_func();
9538
9539 int main() {
9540
9541 /* The GNU C library defines this for functions which it implements
9542     to always fail with ENOSYS.  Some functions are actually named
9543     something starting with __ and the normal name is an alias.  */
9544 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9545 choke me
9546 #else
9547 $ac_func();
9548 #endif
9549
9550 ; return 0; }
9551 EOF
9552 if { (eval echo configure:9553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9553   rm -rf conftest*
9554   eval "ac_cv_func_$ac_func=yes"
9555 else
9556   echo "configure: failed program was:" >&5
9557   cat conftest.$ac_ext >&5
9558   rm -rf conftest*
9559   eval "ac_cv_func_$ac_func=no"
9560 fi
9561 rm -f conftest*
9562 fi
9563
9564 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9565   echo "$ac_t""yes" 1>&6
9566     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9567   cat >> confdefs.h <<EOF
9568 #define $ac_tr_func 1
9569 EOF
9570  
9571 else
9572   echo "$ac_t""no" 1>&6
9573 fi
9574 done
9575
9576
9577 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9578 echo "configure:9579: checking for ut_name in utmp" >&5
9579 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9580   echo $ac_n "(cached) $ac_c" 1>&6
9581 else
9582   
9583 cat > conftest.$ac_ext <<EOF
9584 #line 9585 "configure"
9585 #include "confdefs.h"
9586 #include <sys/types.h>
9587 #include <utmp.h>
9588 int main() {
9589 struct utmp ut;  ut.ut_name[0] = 'a';
9590 ; return 0; }
9591 EOF
9592 if { (eval echo configure:9593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9593   rm -rf conftest*
9594   samba_cv_HAVE_UT_UT_NAME=yes
9595 else
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -rf conftest*
9599   samba_cv_HAVE_UT_UT_NAME=no
9600 fi
9601 rm -f conftest*
9602 fi
9603
9604 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9605 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9606     cat >> confdefs.h <<\EOF
9607 #define HAVE_UT_UT_NAME 1
9608 EOF
9609
9610 fi 
9611
9612 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9613 echo "configure:9614: checking for ut_user in utmp" >&5
9614 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9615   echo $ac_n "(cached) $ac_c" 1>&6
9616 else
9617   
9618 cat > conftest.$ac_ext <<EOF
9619 #line 9620 "configure"
9620 #include "confdefs.h"
9621 #include <sys/types.h>
9622 #include <utmp.h>
9623 int main() {
9624 struct utmp ut;  ut.ut_user[0] = 'a';
9625 ; return 0; }
9626 EOF
9627 if { (eval echo configure:9628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9628   rm -rf conftest*
9629   samba_cv_HAVE_UT_UT_USER=yes
9630 else
9631   echo "configure: failed program was:" >&5
9632   cat conftest.$ac_ext >&5
9633   rm -rf conftest*
9634   samba_cv_HAVE_UT_UT_USER=no
9635 fi
9636 rm -f conftest*
9637 fi
9638
9639 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9640 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9641     cat >> confdefs.h <<\EOF
9642 #define HAVE_UT_UT_USER 1
9643 EOF
9644
9645 fi 
9646
9647 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9648 echo "configure:9649: checking for ut_id in utmp" >&5
9649 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9650   echo $ac_n "(cached) $ac_c" 1>&6
9651 else
9652   
9653 cat > conftest.$ac_ext <<EOF
9654 #line 9655 "configure"
9655 #include "confdefs.h"
9656 #include <sys/types.h>
9657 #include <utmp.h>
9658 int main() {
9659 struct utmp ut;  ut.ut_id[0] = 'a';
9660 ; return 0; }
9661 EOF
9662 if { (eval echo configure:9663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9663   rm -rf conftest*
9664   samba_cv_HAVE_UT_UT_ID=yes
9665 else
9666   echo "configure: failed program was:" >&5
9667   cat conftest.$ac_ext >&5
9668   rm -rf conftest*
9669   samba_cv_HAVE_UT_UT_ID=no
9670 fi
9671 rm -f conftest*
9672 fi
9673
9674 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9675 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9676     cat >> confdefs.h <<\EOF
9677 #define HAVE_UT_UT_ID 1
9678 EOF
9679
9680 fi 
9681
9682 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9683 echo "configure:9684: checking for ut_host in utmp" >&5
9684 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9685   echo $ac_n "(cached) $ac_c" 1>&6
9686 else
9687   
9688 cat > conftest.$ac_ext <<EOF
9689 #line 9690 "configure"
9690 #include "confdefs.h"
9691 #include <sys/types.h>
9692 #include <utmp.h>
9693 int main() {
9694 struct utmp ut;  ut.ut_host[0] = 'a';
9695 ; return 0; }
9696 EOF
9697 if { (eval echo configure:9698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9698   rm -rf conftest*
9699   samba_cv_HAVE_UT_UT_HOST=yes
9700 else
9701   echo "configure: failed program was:" >&5
9702   cat conftest.$ac_ext >&5
9703   rm -rf conftest*
9704   samba_cv_HAVE_UT_UT_HOST=no
9705 fi
9706 rm -f conftest*
9707 fi
9708
9709 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9710 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9711     cat >> confdefs.h <<\EOF
9712 #define HAVE_UT_UT_HOST 1
9713 EOF
9714
9715 fi 
9716
9717 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9718 echo "configure:9719: checking for ut_time in utmp" >&5
9719 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9720   echo $ac_n "(cached) $ac_c" 1>&6
9721 else
9722   
9723 cat > conftest.$ac_ext <<EOF
9724 #line 9725 "configure"
9725 #include "confdefs.h"
9726 #include <sys/types.h>
9727 #include <utmp.h>
9728 int main() {
9729 struct utmp ut;  time_t t; ut.ut_time = t;
9730 ; return 0; }
9731 EOF
9732 if { (eval echo configure:9733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9733   rm -rf conftest*
9734   samba_cv_HAVE_UT_UT_TIME=yes
9735 else
9736   echo "configure: failed program was:" >&5
9737   cat conftest.$ac_ext >&5
9738   rm -rf conftest*
9739   samba_cv_HAVE_UT_UT_TIME=no
9740 fi
9741 rm -f conftest*
9742 fi
9743
9744 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9745 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9746     cat >> confdefs.h <<\EOF
9747 #define HAVE_UT_UT_TIME 1
9748 EOF
9749
9750 fi 
9751
9752 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9753 echo "configure:9754: checking for ut_tv in utmp" >&5
9754 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9755   echo $ac_n "(cached) $ac_c" 1>&6
9756 else
9757   
9758 cat > conftest.$ac_ext <<EOF
9759 #line 9760 "configure"
9760 #include "confdefs.h"
9761 #include <sys/types.h>
9762 #include <utmp.h>
9763 int main() {
9764 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9765 ; return 0; }
9766 EOF
9767 if { (eval echo configure:9768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9768   rm -rf conftest*
9769   samba_cv_HAVE_UT_UT_TV=yes
9770 else
9771   echo "configure: failed program was:" >&5
9772   cat conftest.$ac_ext >&5
9773   rm -rf conftest*
9774   samba_cv_HAVE_UT_UT_TV=no
9775 fi
9776 rm -f conftest*
9777 fi
9778
9779 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9780 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9781     cat >> confdefs.h <<\EOF
9782 #define HAVE_UT_UT_TV 1
9783 EOF
9784
9785 fi 
9786
9787 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9788 echo "configure:9789: checking for ut_type in utmp" >&5
9789 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9790   echo $ac_n "(cached) $ac_c" 1>&6
9791 else
9792   
9793 cat > conftest.$ac_ext <<EOF
9794 #line 9795 "configure"
9795 #include "confdefs.h"
9796 #include <sys/types.h>
9797 #include <utmp.h>
9798 int main() {
9799 struct utmp ut;  ut.ut_type = 0;
9800 ; return 0; }
9801 EOF
9802 if { (eval echo configure:9803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9803   rm -rf conftest*
9804   samba_cv_HAVE_UT_UT_TYPE=yes
9805 else
9806   echo "configure: failed program was:" >&5
9807   cat conftest.$ac_ext >&5
9808   rm -rf conftest*
9809   samba_cv_HAVE_UT_UT_TYPE=no
9810 fi
9811 rm -f conftest*
9812 fi
9813
9814 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9815 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9816     cat >> confdefs.h <<\EOF
9817 #define HAVE_UT_UT_TYPE 1
9818 EOF
9819
9820 fi 
9821
9822 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9823 echo "configure:9824: checking for ut_pid in utmp" >&5
9824 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9825   echo $ac_n "(cached) $ac_c" 1>&6
9826 else
9827   
9828 cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 #include <sys/types.h>
9832 #include <utmp.h>
9833 int main() {
9834 struct utmp ut;  ut.ut_pid = 0;
9835 ; return 0; }
9836 EOF
9837 if { (eval echo configure:9838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9838   rm -rf conftest*
9839   samba_cv_HAVE_UT_UT_PID=yes
9840 else
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -rf conftest*
9844   samba_cv_HAVE_UT_UT_PID=no
9845 fi
9846 rm -f conftest*
9847 fi
9848
9849 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9850 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9851     cat >> confdefs.h <<\EOF
9852 #define HAVE_UT_UT_PID 1
9853 EOF
9854
9855 fi 
9856
9857 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9858 echo "configure:9859: checking for ut_exit in utmp" >&5
9859 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9860   echo $ac_n "(cached) $ac_c" 1>&6
9861 else
9862   
9863 cat > conftest.$ac_ext <<EOF
9864 #line 9865 "configure"
9865 #include "confdefs.h"
9866 #include <sys/types.h>
9867 #include <utmp.h>
9868 int main() {
9869 struct utmp ut;  ut.ut_exit.e_exit = 0;
9870 ; return 0; }
9871 EOF
9872 if { (eval echo configure:9873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9873   rm -rf conftest*
9874   samba_cv_HAVE_UT_UT_EXIT=yes
9875 else
9876   echo "configure: failed program was:" >&5
9877   cat conftest.$ac_ext >&5
9878   rm -rf conftest*
9879   samba_cv_HAVE_UT_UT_EXIT=no
9880 fi
9881 rm -f conftest*
9882 fi
9883
9884 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9885 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9886     cat >> confdefs.h <<\EOF
9887 #define HAVE_UT_UT_EXIT 1
9888 EOF
9889
9890 fi 
9891
9892 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9893 echo "configure:9894: checking for ut_addr in utmp" >&5
9894 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9895   echo $ac_n "(cached) $ac_c" 1>&6
9896 else
9897   
9898 cat > conftest.$ac_ext <<EOF
9899 #line 9900 "configure"
9900 #include "confdefs.h"
9901 #include <sys/types.h>
9902 #include <utmp.h>
9903 int main() {
9904 struct utmp ut;  ut.ut_addr = 0;
9905 ; return 0; }
9906 EOF
9907 if { (eval echo configure:9908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9908   rm -rf conftest*
9909   samba_cv_HAVE_UT_UT_ADDR=yes
9910 else
9911   echo "configure: failed program was:" >&5
9912   cat conftest.$ac_ext >&5
9913   rm -rf conftest*
9914   samba_cv_HAVE_UT_UT_ADDR=no
9915 fi
9916 rm -f conftest*
9917 fi
9918
9919 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9920 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9921     cat >> confdefs.h <<\EOF
9922 #define HAVE_UT_UT_ADDR 1
9923 EOF
9924
9925 fi 
9926
9927 if test x$ac_cv_func_pututline = xyes ; then
9928   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9929 echo "configure:9930: checking whether pututline returns pointer" >&5
9930 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9931   echo $ac_n "(cached) $ac_c" 1>&6
9932 else
9933   
9934   cat > conftest.$ac_ext <<EOF
9935 #line 9936 "configure"
9936 #include "confdefs.h"
9937 #include <sys/types.h>
9938 #include <utmp.h>
9939 int main() {
9940 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9941 ; return 0; }
9942 EOF
9943 if { (eval echo configure:9944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9944   rm -rf conftest*
9945   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9946 else
9947   echo "configure: failed program was:" >&5
9948   cat conftest.$ac_ext >&5
9949   rm -rf conftest*
9950   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9951 fi
9952 rm -f conftest*
9953 fi
9954
9955 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9956   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9957       cat >> confdefs.h <<\EOF
9958 #define PUTUTLINE_RETURNS_UTMP 1
9959 EOF
9960
9961   fi
9962 fi
9963
9964 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9965 echo "configure:9966: checking for ut_syslen in utmpx" >&5
9966 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9967   echo $ac_n "(cached) $ac_c" 1>&6
9968 else
9969   
9970 cat > conftest.$ac_ext <<EOF
9971 #line 9972 "configure"
9972 #include "confdefs.h"
9973 #include <sys/types.h>
9974 #include <utmpx.h>
9975 int main() {
9976 struct utmpx ux;  ux.ut_syslen = 0;
9977 ; return 0; }
9978 EOF
9979 if { (eval echo configure:9980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9980   rm -rf conftest*
9981   samba_cv_HAVE_UX_UT_SYSLEN=yes
9982 else
9983   echo "configure: failed program was:" >&5
9984   cat conftest.$ac_ext >&5
9985   rm -rf conftest*
9986   samba_cv_HAVE_UX_UT_SYSLEN=no
9987 fi
9988 rm -f conftest*
9989 fi
9990
9991 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9992 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9993     cat >> confdefs.h <<\EOF
9994 #define HAVE_UX_UT_SYSLEN 1
9995 EOF
9996
9997 fi 
9998
9999
10000 #################################################
10001 # check for libiconv support
10002 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10003 echo "configure:10004: checking whether to use libiconv" >&5
10004 # Check whether --with-libiconv or --without-libiconv was given.
10005 if test "${with_libiconv+set}" = set; then
10006   withval="$with_libiconv"
10007    case "$withval" in
10008   no)
10009     echo "$ac_t""no" 1>&6
10010     ;;
10011   *)
10012     echo "$ac_t""yes" 1>&6
10013     CFLAGS="$CFLAGS -I$withval/include"
10014     LDFLAGS="$LDFLAGS -L$withval/lib"
10015     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10016 echo "configure:10017: checking for iconv_open in -liconv" >&5
10017 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10018 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10019   echo $ac_n "(cached) $ac_c" 1>&6
10020 else
10021   ac_save_LIBS="$LIBS"
10022 LIBS="-liconv  $LIBS"
10023 cat > conftest.$ac_ext <<EOF
10024 #line 10025 "configure"
10025 #include "confdefs.h"
10026 /* Override any gcc2 internal prototype to avoid an error.  */
10027 /* We use char because int might match the return type of a gcc2
10028     builtin and then its argument prototype would still apply.  */
10029 char iconv_open();
10030
10031 int main() {
10032 iconv_open()
10033 ; return 0; }
10034 EOF
10035 if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10036   rm -rf conftest*
10037   eval "ac_cv_lib_$ac_lib_var=yes"
10038 else
10039   echo "configure: failed program was:" >&5
10040   cat conftest.$ac_ext >&5
10041   rm -rf conftest*
10042   eval "ac_cv_lib_$ac_lib_var=no"
10043 fi
10044 rm -f conftest*
10045 LIBS="$ac_save_LIBS"
10046
10047 fi
10048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10049   echo "$ac_t""yes" 1>&6
10050     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10051     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10052   cat >> confdefs.h <<EOF
10053 #define $ac_tr_lib 1
10054 EOF
10055
10056   LIBS="-liconv $LIBS"
10057
10058 else
10059   echo "$ac_t""no" 1>&6
10060 fi
10061
10062     cat >> confdefs.h <<EOF
10063 #define WITH_LIBICONV "${withval}"
10064 EOF
10065
10066     ;;
10067   esac 
10068 else
10069   echo "$ac_t""no" 1>&6
10070
10071 fi
10072
10073
10074
10075 ############
10076 # check for iconv in libc
10077 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10078 echo "configure:10079: checking for working iconv" >&5
10079 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10080   echo $ac_n "(cached) $ac_c" 1>&6
10081 else
10082   
10083 if test "$cross_compiling" = yes; then
10084   samba_cv_HAVE_NATIVE_ICONV=cross
10085 else
10086   cat > conftest.$ac_ext <<EOF
10087 #line 10088 "configure"
10088 #include "confdefs.h"
10089
10090 #include <iconv.h>
10091 main() {
10092        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10093        if (cd == 0 || cd == (iconv_t)-1) return -1;
10094        return 0;
10095 }
10096
10097 EOF
10098 if { (eval echo configure:10099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10099 then
10100   samba_cv_HAVE_NATIVE_ICONV=yes
10101 else
10102   echo "configure: failed program was:" >&5
10103   cat conftest.$ac_ext >&5
10104   rm -fr conftest*
10105   samba_cv_HAVE_NATIVE_ICONV=no
10106 fi
10107 rm -fr conftest*
10108 fi
10109
10110 fi
10111
10112 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10113 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10114     cat >> confdefs.h <<\EOF
10115 #define HAVE_NATIVE_ICONV 1
10116 EOF
10117
10118 fi
10119
10120
10121 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10122 echo "configure:10123: checking for Linux kernel oplocks" >&5
10123 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10124   echo $ac_n "(cached) $ac_c" 1>&6
10125 else
10126   
10127 if test "$cross_compiling" = yes; then
10128   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10129 else
10130   cat > conftest.$ac_ext <<EOF
10131 #line 10132 "configure"
10132 #include "confdefs.h"
10133
10134 #include <sys/types.h>
10135 #include <fcntl.h>
10136 #ifndef F_GETLEASE
10137 #define F_GETLEASE      1025
10138 #endif
10139 main() {
10140        int fd = open("/dev/null", O_RDONLY);
10141        return fcntl(fd, F_GETLEASE, 0) == -1;
10142 }
10143
10144 EOF
10145 if { (eval echo configure:10146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10146 then
10147   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10148 else
10149   echo "configure: failed program was:" >&5
10150   cat conftest.$ac_ext >&5
10151   rm -fr conftest*
10152   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10153 fi
10154 rm -fr conftest*
10155 fi
10156
10157 fi
10158
10159 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10160 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10161     cat >> confdefs.h <<\EOF
10162 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10163 EOF
10164
10165 fi
10166
10167 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10168 echo "configure:10169: checking for kernel change notify support" >&5
10169 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10170   echo $ac_n "(cached) $ac_c" 1>&6
10171 else
10172   
10173 if test "$cross_compiling" = yes; then
10174   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10175 else
10176   cat > conftest.$ac_ext <<EOF
10177 #line 10178 "configure"
10178 #include "confdefs.h"
10179
10180 #include <sys/types.h>
10181 #include <fcntl.h>
10182 #include <signal.h>
10183 #ifndef F_NOTIFY
10184 #define F_NOTIFY 1026
10185 #endif
10186 main() {
10187         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10188 }
10189
10190 EOF
10191 if { (eval echo configure:10192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10192 then
10193   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10194 else
10195   echo "configure: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   rm -fr conftest*
10198   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10199 fi
10200 rm -fr conftest*
10201 fi
10202
10203 fi
10204
10205 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10206 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10207     cat >> confdefs.h <<\EOF
10208 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10209 EOF
10210
10211 fi
10212
10213 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10214 echo "configure:10215: checking for kernel share modes" >&5
10215 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10216   echo $ac_n "(cached) $ac_c" 1>&6
10217 else
10218   
10219 if test "$cross_compiling" = yes; then
10220   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10221 else
10222   cat > conftest.$ac_ext <<EOF
10223 #line 10224 "configure"
10224 #include "confdefs.h"
10225
10226 #include <sys/types.h>
10227 #include <fcntl.h>
10228 #include <signal.h>
10229 #include <sys/file.h>
10230 #ifndef LOCK_MAND
10231 #define LOCK_MAND       32
10232 #define LOCK_READ       64
10233 #endif
10234 main() {
10235         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10236 }
10237
10238 EOF
10239 if { (eval echo configure:10240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10240 then
10241   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10242 else
10243   echo "configure: failed program was:" >&5
10244   cat conftest.$ac_ext >&5
10245   rm -fr conftest*
10246   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10247 fi
10248 rm -fr conftest*
10249 fi
10250
10251 fi
10252
10253 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10254 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10255     cat >> confdefs.h <<\EOF
10256 #define HAVE_KERNEL_SHARE_MODES 1
10257 EOF
10258
10259 fi
10260
10261
10262
10263
10264 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10265 echo "configure:10266: checking for IRIX kernel oplock type definitions" >&5
10266 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10267   echo $ac_n "(cached) $ac_c" 1>&6
10268 else
10269   
10270 cat > conftest.$ac_ext <<EOF
10271 #line 10272 "configure"
10272 #include "confdefs.h"
10273 #include <sys/types.h>
10274 #include <fcntl.h>
10275 int main() {
10276 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10277 ; return 0; }
10278 EOF
10279 if { (eval echo configure:10280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10280   rm -rf conftest*
10281   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10282 else
10283   echo "configure: failed program was:" >&5
10284   cat conftest.$ac_ext >&5
10285   rm -rf conftest*
10286   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10287 fi
10288 rm -f conftest*
10289 fi
10290
10291 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10292 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10293     cat >> confdefs.h <<\EOF
10294 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10295 EOF
10296
10297 fi
10298
10299 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10300 echo "configure:10301: checking for irix specific capabilities" >&5
10301 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10302   echo $ac_n "(cached) $ac_c" 1>&6
10303 else
10304   
10305 if test "$cross_compiling" = yes; then
10306   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10307 else
10308   cat > conftest.$ac_ext <<EOF
10309 #line 10310 "configure"
10310 #include "confdefs.h"
10311 #include <sys/types.h>
10312 #include <sys/capability.h>
10313 main() {
10314  cap_t cap;
10315  if ((cap = cap_get_proc()) == NULL)
10316    exit(1);
10317  cap->cap_effective |= CAP_NETWORK_MGT;
10318  cap->cap_inheritable |= CAP_NETWORK_MGT;
10319  cap_set_proc(cap);
10320  exit(0);
10321 }
10322
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10325 then
10326   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10327 else
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -fr conftest*
10331   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10332 fi
10333 rm -fr conftest*
10334 fi
10335
10336 fi
10337
10338 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10339 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10340     cat >> confdefs.h <<\EOF
10341 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10342 EOF
10343
10344 fi
10345
10346 #
10347 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10348 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10349 #
10350
10351 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10352 echo "configure:10353: checking for int16 typedef included by rpc/rpc.h" >&5
10353 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10354   echo $ac_n "(cached) $ac_c" 1>&6
10355 else
10356   
10357 cat > conftest.$ac_ext <<EOF
10358 #line 10359 "configure"
10359 #include "confdefs.h"
10360 #include <sys/types.h>
10361 #if defined(HAVE_RPC_RPC_H)
10362 #include <rpc/rpc.h>
10363 #endif
10364 int main() {
10365 int16 testvar;
10366 ; return 0; }
10367 EOF
10368 if { (eval echo configure:10369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10369   rm -rf conftest*
10370   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10371 else
10372   echo "configure: failed program was:" >&5
10373   cat conftest.$ac_ext >&5
10374   rm -rf conftest*
10375   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10376 fi
10377 rm -f conftest*
10378 fi
10379
10380 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10381 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10382     cat >> confdefs.h <<\EOF
10383 #define HAVE_INT16_FROM_RPC_RPC_H 1
10384 EOF
10385
10386 fi
10387
10388 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10389 echo "configure:10390: checking for uint16 typedef included by rpc/rpc.h" >&5
10390 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10391   echo $ac_n "(cached) $ac_c" 1>&6
10392 else
10393   
10394 cat > conftest.$ac_ext <<EOF
10395 #line 10396 "configure"
10396 #include "confdefs.h"
10397 #include <sys/types.h>
10398 #if defined(HAVE_RPC_RPC_H)
10399 #include <rpc/rpc.h>
10400 #endif
10401 int main() {
10402 uint16 testvar;
10403 ; return 0; }
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10406   rm -rf conftest*
10407   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -rf conftest*
10412   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10413 fi
10414 rm -f conftest*
10415 fi
10416
10417 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10418 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10419     cat >> confdefs.h <<\EOF
10420 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10421 EOF
10422
10423 fi
10424
10425 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10426 echo "configure:10427: checking for int32 typedef included by rpc/rpc.h" >&5
10427 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10428   echo $ac_n "(cached) $ac_c" 1>&6
10429 else
10430   
10431 cat > conftest.$ac_ext <<EOF
10432 #line 10433 "configure"
10433 #include "confdefs.h"
10434 #include <sys/types.h>
10435 #if defined(HAVE_RPC_RPC_H)
10436 #include <rpc/rpc.h>
10437 #endif
10438 int main() {
10439 int32 testvar;
10440 ; return 0; }
10441 EOF
10442 if { (eval echo configure:10443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10443   rm -rf conftest*
10444   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10445 else
10446   echo "configure: failed program was:" >&5
10447   cat conftest.$ac_ext >&5
10448   rm -rf conftest*
10449   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10450 fi
10451 rm -f conftest*
10452 fi
10453
10454 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10455 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10456     cat >> confdefs.h <<\EOF
10457 #define HAVE_INT32_FROM_RPC_RPC_H 1
10458 EOF
10459
10460 fi
10461
10462 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10463 echo "configure:10464: checking for uint32 typedef included by rpc/rpc.h" >&5
10464 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10465   echo $ac_n "(cached) $ac_c" 1>&6
10466 else
10467   
10468 cat > conftest.$ac_ext <<EOF
10469 #line 10470 "configure"
10470 #include "confdefs.h"
10471 #include <sys/types.h>
10472 #if defined(HAVE_RPC_RPC_H)
10473 #include <rpc/rpc.h>
10474 #endif
10475 int main() {
10476 uint32 testvar;
10477 ; return 0; }
10478 EOF
10479 if { (eval echo configure:10480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10480   rm -rf conftest*
10481   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10482 else
10483   echo "configure: failed program was:" >&5
10484   cat conftest.$ac_ext >&5
10485   rm -rf conftest*
10486   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10487 fi
10488 rm -f conftest*
10489 fi
10490
10491 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10492 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10493     cat >> confdefs.h <<\EOF
10494 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10495 EOF
10496
10497 fi
10498
10499
10500 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10501 echo "configure:10502: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10502 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10503   echo $ac_n "(cached) $ac_c" 1>&6
10504 else
10505   
10506 cat > conftest.$ac_ext <<EOF
10507 #line 10508 "configure"
10508 #include "confdefs.h"
10509 #include <sys/types.h>
10510 #ifdef HAVE_SYS_SECURITY_H
10511 #include <sys/security.h>
10512 #include <prot.h>
10513 #endif  /* HAVE_SYS_SECURITY_H */
10514 #if defined(HAVE_RPC_RPC_H)
10515 #include <rpc/rpc.h>
10516 #endif
10517 int main() {
10518 int testvar;
10519 ; return 0; }
10520 EOF
10521 if { (eval echo configure:10522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10522   rm -rf conftest*
10523   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10524 else
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -rf conftest*
10528   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10529 fi
10530 rm -f conftest*
10531 fi
10532
10533 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10534 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10535     cat >> confdefs.h <<\EOF
10536 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10537 EOF
10538
10539 fi
10540
10541 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10542 echo "configure:10543: checking for test routines" >&5
10543 if test "$cross_compiling" = yes; then
10544   echo "configure: warning: cannot run when cross-compiling" 1>&2
10545 else
10546   cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549 #include "${srcdir-.}/tests/trivial.c"
10550 EOF
10551 if { (eval echo configure:10552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10552 then
10553   echo "$ac_t""yes" 1>&6
10554 else
10555   echo "configure: failed program was:" >&5
10556   cat conftest.$ac_ext >&5
10557   rm -fr conftest*
10558   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10559 fi
10560 rm -fr conftest*
10561 fi
10562
10563
10564 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10565 echo "configure:10566: checking for ftruncate extend" >&5
10566 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10567   echo $ac_n "(cached) $ac_c" 1>&6
10568 else
10569   
10570 if test "$cross_compiling" = yes; then
10571   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10572 else
10573   cat > conftest.$ac_ext <<EOF
10574 #line 10575 "configure"
10575 #include "confdefs.h"
10576 #include "${srcdir-.}/tests/ftruncate.c"
10577 EOF
10578 if { (eval echo configure:10579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10579 then
10580   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10581 else
10582   echo "configure: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   rm -fr conftest*
10585   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10586 fi
10587 rm -fr conftest*
10588 fi
10589
10590 fi
10591
10592 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10593 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10594     cat >> confdefs.h <<\EOF
10595 #define HAVE_FTRUNCATE_EXTEND 1
10596 EOF
10597
10598 fi
10599
10600 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10601 echo "configure:10602: checking for AF_LOCAL socket support" >&5
10602 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10603   echo $ac_n "(cached) $ac_c" 1>&6
10604 else
10605   
10606 if test "$cross_compiling" = yes; then
10607   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10608 else
10609   cat > conftest.$ac_ext <<EOF
10610 #line 10611 "configure"
10611 #include "confdefs.h"
10612 #include "${srcdir-.}/tests/unixsock.c"
10613 EOF
10614 if { (eval echo configure:10615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10615 then
10616   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10617 else
10618   echo "configure: failed program was:" >&5
10619   cat conftest.$ac_ext >&5
10620   rm -fr conftest*
10621   samba_cv_HAVE_WORKING_AF_LOCAL=no
10622 fi
10623 rm -fr conftest*
10624 fi
10625
10626 fi
10627
10628 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10629 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10630 then
10631     cat >> confdefs.h <<\EOF
10632 #define HAVE_WORKING_AF_LOCAL 1
10633 EOF
10634
10635 fi
10636
10637 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10638 echo "configure:10639: checking for broken getgroups" >&5
10639 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10640   echo $ac_n "(cached) $ac_c" 1>&6
10641 else
10642   
10643 if test "$cross_compiling" = yes; then
10644   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10645 else
10646   cat > conftest.$ac_ext <<EOF
10647 #line 10648 "configure"
10648 #include "confdefs.h"
10649 #include "${srcdir-.}/tests/getgroups.c"
10650 EOF
10651 if { (eval echo configure:10652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10652 then
10653   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10654 else
10655   echo "configure: failed program was:" >&5
10656   cat conftest.$ac_ext >&5
10657   rm -fr conftest*
10658   samba_cv_HAVE_BROKEN_GETGROUPS=no
10659 fi
10660 rm -fr conftest*
10661 fi
10662
10663 fi
10664
10665 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10666 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10667     cat >> confdefs.h <<\EOF
10668 #define HAVE_BROKEN_GETGROUPS 1
10669 EOF
10670
10671 fi
10672
10673 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10674 echo "configure:10675: checking whether getpass should be replaced" >&5
10675 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10676   echo $ac_n "(cached) $ac_c" 1>&6
10677 else
10678   
10679 SAVE_CPPFLAGS="$CPPFLAGS"
10680 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10681 cat > conftest.$ac_ext <<EOF
10682 #line 10683 "configure"
10683 #include "confdefs.h"
10684
10685 #define REPLACE_GETPASS 1
10686 #define NO_CONFIG_H 1
10687 #define main dont_declare_main
10688 #include "${srcdir-.}/lib/getsmbpass.c"
10689 #undef main
10690
10691 int main() {
10692
10693 ; return 0; }
10694 EOF
10695 if { (eval echo configure:10696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10696   rm -rf conftest*
10697   samba_cv_REPLACE_GETPASS=yes
10698 else
10699   echo "configure: failed program was:" >&5
10700   cat conftest.$ac_ext >&5
10701   rm -rf conftest*
10702   samba_cv_REPLACE_GETPASS=no
10703 fi
10704 rm -f conftest*
10705 CPPFLAGS="$SAVE_CPPFLAGS"
10706
10707 fi
10708
10709 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10710 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10711         cat >> confdefs.h <<\EOF
10712 #define REPLACE_GETPASS 1
10713 EOF
10714
10715 fi
10716
10717 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10718 echo "configure:10719: checking for broken inet_ntoa" >&5
10719 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10720   echo $ac_n "(cached) $ac_c" 1>&6
10721 else
10722   
10723 if test "$cross_compiling" = yes; then
10724   samba_cv_REPLACE_INET_NTOA=cross
10725 else
10726   cat > conftest.$ac_ext <<EOF
10727 #line 10728 "configure"
10728 #include "confdefs.h"
10729
10730 #include <stdio.h>
10731 #include <sys/types.h>
10732 #include <netinet/in.h>
10733 #ifdef HAVE_ARPA_INET_H
10734 #include <arpa/inet.h>
10735 #endif
10736 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10737 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10738     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10739 exit(1);}
10740 EOF
10741 if { (eval echo configure:10742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10742 then
10743   samba_cv_REPLACE_INET_NTOA=yes
10744 else
10745   echo "configure: failed program was:" >&5
10746   cat conftest.$ac_ext >&5
10747   rm -fr conftest*
10748   samba_cv_REPLACE_INET_NTOA=no
10749 fi
10750 rm -fr conftest*
10751 fi
10752
10753 fi
10754
10755 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10756 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10757     cat >> confdefs.h <<\EOF
10758 #define REPLACE_INET_NTOA 1
10759 EOF
10760
10761 fi
10762
10763 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10764 echo "configure:10765: checking for secure mkstemp" >&5
10765 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10766   echo $ac_n "(cached) $ac_c" 1>&6
10767 else
10768   
10769 if test "$cross_compiling" = yes; then
10770   samba_cv_HAVE_SECURE_MKSTEMP=cross
10771 else
10772   cat > conftest.$ac_ext <<EOF
10773 #line 10774 "configure"
10774 #include "confdefs.h"
10775 #include <stdlib.h>
10776 #include <sys/types.h>
10777 #include <sys/stat.h>
10778 #include <unistd.h>
10779 main() { 
10780   struct stat st;
10781   char tpl[20]="/tmp/test.XXXXXX"; 
10782   int fd = mkstemp(tpl); 
10783   if (fd == -1) exit(1);
10784   unlink(tpl);
10785   if (fstat(fd, &st) != 0) exit(1);
10786   if ((st.st_mode & 0777) != 0600) exit(1);
10787   exit(0);
10788 }
10789 EOF
10790 if { (eval echo configure:10791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10791 then
10792   samba_cv_HAVE_SECURE_MKSTEMP=yes
10793 else
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -fr conftest*
10797   samba_cv_HAVE_SECURE_MKSTEMP=no
10798 fi
10799 rm -fr conftest*
10800 fi
10801
10802 fi
10803
10804 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10805 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10806     cat >> confdefs.h <<\EOF
10807 #define HAVE_SECURE_MKSTEMP 1
10808 EOF
10809
10810 fi
10811
10812 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10813 echo "configure:10814: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10814 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10815   echo $ac_n "(cached) $ac_c" 1>&6
10816 else
10817   
10818 if test "$cross_compiling" = yes; then
10819   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10820 else
10821   cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824 #include <unistd.h>
10825 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10826 EOF
10827 if { (eval echo configure:10828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10828 then
10829   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10830 else
10831   echo "configure: failed program was:" >&5
10832   cat conftest.$ac_ext >&5
10833   rm -fr conftest*
10834   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10835 fi
10836 rm -fr conftest*
10837 fi
10838
10839 fi
10840
10841 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10842 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10843     cat >> confdefs.h <<\EOF
10844 #define SYSCONF_SC_NGROUPS_MAX 1
10845 EOF
10846
10847 fi
10848
10849 echo $ac_n "checking for root""... $ac_c" 1>&6
10850 echo "configure:10851: checking for root" >&5
10851 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10852   echo $ac_n "(cached) $ac_c" 1>&6
10853 else
10854   
10855 if test "$cross_compiling" = yes; then
10856   samba_cv_HAVE_ROOT=cross
10857 else
10858   cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861 main() { exit(getuid() != 0); }
10862 EOF
10863 if { (eval echo configure:10864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10864 then
10865   samba_cv_HAVE_ROOT=yes
10866 else
10867   echo "configure: failed program was:" >&5
10868   cat conftest.$ac_ext >&5
10869   rm -fr conftest*
10870   samba_cv_HAVE_ROOT=no
10871 fi
10872 rm -fr conftest*
10873 fi
10874
10875 fi
10876
10877 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10878 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10879     cat >> confdefs.h <<\EOF
10880 #define HAVE_ROOT 1
10881 EOF
10882
10883 else
10884     echo "configure: warning: running as non-root will disable some tests" 1>&2
10885 fi
10886
10887 ##################
10888 # look for a method of finding the list of network interfaces
10889 iface=no;
10890 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10891 echo "configure:10892: checking for iface AIX" >&5
10892 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10893   echo $ac_n "(cached) $ac_c" 1>&6
10894 else
10895   
10896 if test "$cross_compiling" = yes; then
10897   samba_cv_HAVE_IFACE_AIX=cross
10898 else
10899   cat > conftest.$ac_ext <<EOF
10900 #line 10901 "configure"
10901 #include "confdefs.h"
10902
10903 #define HAVE_IFACE_AIX 1
10904 #define AUTOCONF_TEST 1
10905 #include "confdefs.h"
10906 #include "${srcdir-.}/lib/interfaces.c"
10907 EOF
10908 if { (eval echo configure:10909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10909 then
10910   samba_cv_HAVE_IFACE_AIX=yes
10911 else
10912   echo "configure: failed program was:" >&5
10913   cat conftest.$ac_ext >&5
10914   rm -fr conftest*
10915   samba_cv_HAVE_IFACE_AIX=no
10916 fi
10917 rm -fr conftest*
10918 fi
10919
10920 fi
10921
10922 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10923 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10924     iface=yes;cat >> confdefs.h <<\EOF
10925 #define HAVE_IFACE_AIX 1
10926 EOF
10927
10928 fi
10929
10930 if test $iface = no; then
10931 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10932 echo "configure:10933: checking for iface ifconf" >&5
10933 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10934   echo $ac_n "(cached) $ac_c" 1>&6
10935 else
10936   
10937 if test "$cross_compiling" = yes; then
10938   samba_cv_HAVE_IFACE_IFCONF=cross
10939 else
10940   cat > conftest.$ac_ext <<EOF
10941 #line 10942 "configure"
10942 #include "confdefs.h"
10943
10944 #define HAVE_IFACE_IFCONF 1
10945 #define AUTOCONF_TEST 1
10946 #include "confdefs.h"
10947 #include "${srcdir-.}/lib/interfaces.c"
10948 EOF
10949 if { (eval echo configure:10950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10950 then
10951   samba_cv_HAVE_IFACE_IFCONF=yes
10952 else
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -fr conftest*
10956   samba_cv_HAVE_IFACE_IFCONF=no
10957 fi
10958 rm -fr conftest*
10959 fi
10960
10961 fi
10962
10963 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10964 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10965     iface=yes;cat >> confdefs.h <<\EOF
10966 #define HAVE_IFACE_IFCONF 1
10967 EOF
10968
10969 fi
10970 fi
10971
10972 if test $iface = no; then
10973 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10974 echo "configure:10975: checking for iface ifreq" >&5
10975 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10976   echo $ac_n "(cached) $ac_c" 1>&6
10977 else
10978   
10979 if test "$cross_compiling" = yes; then
10980   samba_cv_HAVE_IFACE_IFREQ=cross
10981 else
10982   cat > conftest.$ac_ext <<EOF
10983 #line 10984 "configure"
10984 #include "confdefs.h"
10985
10986 #define HAVE_IFACE_IFREQ 1
10987 #define AUTOCONF_TEST 1
10988 #include "confdefs.h"
10989 #include "${srcdir-.}/lib/interfaces.c"
10990 EOF
10991 if { (eval echo configure:10992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10992 then
10993   samba_cv_HAVE_IFACE_IFREQ=yes
10994 else
10995   echo "configure: failed program was:" >&5
10996   cat conftest.$ac_ext >&5
10997   rm -fr conftest*
10998   samba_cv_HAVE_IFACE_IFREQ=no
10999 fi
11000 rm -fr conftest*
11001 fi
11002
11003 fi
11004
11005 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11006 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11007     iface=yes;cat >> confdefs.h <<\EOF
11008 #define HAVE_IFACE_IFREQ 1
11009 EOF
11010
11011 fi
11012 fi
11013
11014
11015 ################################################
11016 # look for a method of setting the effective uid
11017 seteuid=no;
11018 if test $seteuid = no; then
11019 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11020 echo "configure:11021: checking for setresuid" >&5
11021 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11022   echo $ac_n "(cached) $ac_c" 1>&6
11023 else
11024   
11025 if test "$cross_compiling" = yes; then
11026   samba_cv_USE_SETRESUID=cross
11027 else
11028   cat > conftest.$ac_ext <<EOF
11029 #line 11030 "configure"
11030 #include "confdefs.h"
11031
11032 #define AUTOCONF_TEST 1
11033 #define USE_SETRESUID 1
11034 #include "confdefs.h"
11035 #include "${srcdir-.}/lib/util_sec.c"
11036 EOF
11037 if { (eval echo configure:11038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11038 then
11039   samba_cv_USE_SETRESUID=yes
11040 else
11041   echo "configure: failed program was:" >&5
11042   cat conftest.$ac_ext >&5
11043   rm -fr conftest*
11044   samba_cv_USE_SETRESUID=no
11045 fi
11046 rm -fr conftest*
11047 fi
11048
11049 fi
11050
11051 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11052 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11053     seteuid=yes;cat >> confdefs.h <<\EOF
11054 #define USE_SETRESUID 1
11055 EOF
11056
11057 fi
11058 fi
11059
11060
11061 if test $seteuid = no; then
11062 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11063 echo "configure:11064: checking for setreuid" >&5
11064 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11065   echo $ac_n "(cached) $ac_c" 1>&6
11066 else
11067   
11068 if test "$cross_compiling" = yes; then
11069   samba_cv_USE_SETREUID=cross
11070 else
11071   cat > conftest.$ac_ext <<EOF
11072 #line 11073 "configure"
11073 #include "confdefs.h"
11074
11075 #define AUTOCONF_TEST 1
11076 #define USE_SETREUID 1
11077 #include "confdefs.h"
11078 #include "${srcdir-.}/lib/util_sec.c"
11079 EOF
11080 if { (eval echo configure:11081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11081 then
11082   samba_cv_USE_SETREUID=yes
11083 else
11084   echo "configure: failed program was:" >&5
11085   cat conftest.$ac_ext >&5
11086   rm -fr conftest*
11087   samba_cv_USE_SETREUID=no
11088 fi
11089 rm -fr conftest*
11090 fi
11091
11092 fi
11093
11094 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11095 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11096     seteuid=yes;cat >> confdefs.h <<\EOF
11097 #define USE_SETREUID 1
11098 EOF
11099
11100 fi
11101 fi
11102
11103 if test $seteuid = no; then
11104 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11105 echo "configure:11106: checking for seteuid" >&5
11106 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   
11110 if test "$cross_compiling" = yes; then
11111   samba_cv_USE_SETEUID=cross
11112 else
11113   cat > conftest.$ac_ext <<EOF
11114 #line 11115 "configure"
11115 #include "confdefs.h"
11116
11117 #define AUTOCONF_TEST 1
11118 #define USE_SETEUID 1
11119 #include "confdefs.h"
11120 #include "${srcdir-.}/lib/util_sec.c"
11121 EOF
11122 if { (eval echo configure:11123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11123 then
11124   samba_cv_USE_SETEUID=yes
11125 else
11126   echo "configure: failed program was:" >&5
11127   cat conftest.$ac_ext >&5
11128   rm -fr conftest*
11129   samba_cv_USE_SETEUID=no
11130 fi
11131 rm -fr conftest*
11132 fi
11133
11134 fi
11135
11136 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11137 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11138     seteuid=yes;cat >> confdefs.h <<\EOF
11139 #define USE_SETEUID 1
11140 EOF
11141
11142 fi
11143 fi
11144
11145 if test $seteuid = no; then
11146 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11147 echo "configure:11148: checking for setuidx" >&5
11148 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11149   echo $ac_n "(cached) $ac_c" 1>&6
11150 else
11151   
11152 if test "$cross_compiling" = yes; then
11153   samba_cv_USE_SETUIDX=cross
11154 else
11155   cat > conftest.$ac_ext <<EOF
11156 #line 11157 "configure"
11157 #include "confdefs.h"
11158
11159 #define AUTOCONF_TEST 1
11160 #define USE_SETUIDX 1
11161 #include "confdefs.h"
11162 #include "${srcdir-.}/lib/util_sec.c"
11163 EOF
11164 if { (eval echo configure:11165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11165 then
11166   samba_cv_USE_SETUIDX=yes
11167 else
11168   echo "configure: failed program was:" >&5
11169   cat conftest.$ac_ext >&5
11170   rm -fr conftest*
11171   samba_cv_USE_SETUIDX=no
11172 fi
11173 rm -fr conftest*
11174 fi
11175
11176 fi
11177
11178 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11179 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11180     seteuid=yes;cat >> confdefs.h <<\EOF
11181 #define USE_SETUIDX 1
11182 EOF
11183
11184 fi
11185 fi
11186
11187
11188 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11189 echo "configure:11190: checking for working mmap" >&5
11190 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11191   echo $ac_n "(cached) $ac_c" 1>&6
11192 else
11193   
11194 if test "$cross_compiling" = yes; then
11195   samba_cv_HAVE_MMAP=cross
11196 else
11197   cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 #include "${srcdir-.}/tests/shared_mmap.c"
11201 EOF
11202 if { (eval echo configure:11203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11203 then
11204   samba_cv_HAVE_MMAP=yes
11205 else
11206   echo "configure: failed program was:" >&5
11207   cat conftest.$ac_ext >&5
11208   rm -fr conftest*
11209   samba_cv_HAVE_MMAP=no
11210 fi
11211 rm -fr conftest*
11212 fi
11213
11214 fi
11215
11216 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11217 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11218     cat >> confdefs.h <<\EOF
11219 #define HAVE_MMAP 1
11220 EOF
11221
11222 fi
11223
11224 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11225 echo "configure:11226: checking for ftruncate needs root" >&5
11226 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11227   echo $ac_n "(cached) $ac_c" 1>&6
11228 else
11229   
11230 if test "$cross_compiling" = yes; then
11231   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11232 else
11233   cat > conftest.$ac_ext <<EOF
11234 #line 11235 "configure"
11235 #include "confdefs.h"
11236 #include "${srcdir-.}/tests/ftruncroot.c"
11237 EOF
11238 if { (eval echo configure:11239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11239 then
11240   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11241 else
11242   echo "configure: failed program was:" >&5
11243   cat conftest.$ac_ext >&5
11244   rm -fr conftest*
11245   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11246 fi
11247 rm -fr conftest*
11248 fi
11249
11250 fi
11251
11252 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11253 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11254     cat >> confdefs.h <<\EOF
11255 #define FTRUNCATE_NEEDS_ROOT 1
11256 EOF
11257
11258 fi
11259
11260 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11261 echo "configure:11262: checking for fcntl locking" >&5
11262 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11263   echo $ac_n "(cached) $ac_c" 1>&6
11264 else
11265   
11266 if test "$cross_compiling" = yes; then
11267   samba_cv_HAVE_FCNTL_LOCK=cross
11268 else
11269   cat > conftest.$ac_ext <<EOF
11270 #line 11271 "configure"
11271 #include "confdefs.h"
11272 #include "${srcdir-.}/tests/fcntl_lock.c"
11273 EOF
11274 if { (eval echo configure:11275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11275 then
11276   samba_cv_HAVE_FCNTL_LOCK=yes
11277 else
11278   echo "configure: failed program was:" >&5
11279   cat conftest.$ac_ext >&5
11280   rm -fr conftest*
11281   samba_cv_HAVE_FCNTL_LOCK=no
11282 fi
11283 rm -fr conftest*
11284 fi
11285
11286 fi
11287
11288 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11289 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11290     cat >> confdefs.h <<\EOF
11291 #define HAVE_FCNTL_LOCK 1
11292 EOF
11293
11294 fi
11295
11296 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11297 echo "configure:11298: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11298 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11299   echo $ac_n "(cached) $ac_c" 1>&6
11300 else
11301   
11302 if test "$cross_compiling" = yes; then
11303   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11304 else
11305   cat > conftest.$ac_ext <<EOF
11306 #line 11307 "configure"
11307 #include "confdefs.h"
11308 #include "${srcdir-.}/tests/fcntl_lock64.c"
11309 EOF
11310 if { (eval echo configure:11311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11311 then
11312   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11313 else
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -fr conftest*
11317   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11318 fi
11319 rm -fr conftest*
11320 fi
11321
11322 fi
11323
11324 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11325 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11326     cat >> confdefs.h <<\EOF
11327 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11328 EOF
11329
11330
11331 else
11332
11333
11334   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11335 echo "configure:11336: checking for 64 bit fcntl locking" >&5
11336 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11337   echo $ac_n "(cached) $ac_c" 1>&6
11338 else
11339   
11340   if test "$cross_compiling" = yes; then
11341   samba_cv_HAVE_STRUCT_FLOCK64=cross
11342 else
11343   cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346
11347 #if defined(HAVE_UNISTD_H)
11348 #include <unistd.h>
11349 #endif
11350 #include <stdio.h>
11351 #include <stdlib.h>
11352
11353 #ifdef HAVE_FCNTL_H
11354 #include <fcntl.h>
11355 #endif
11356
11357 #ifdef HAVE_SYS_FCNTL_H
11358 #include <sys/fcntl.h>
11359 #endif
11360 main() { struct flock64 fl64;
11361 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11362 exit(0);
11363 #else
11364 exit(1);
11365 #endif
11366 }
11367 EOF
11368 if { (eval echo configure:11369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11369 then
11370   samba_cv_HAVE_STRUCT_FLOCK64=yes
11371 else
11372   echo "configure: failed program was:" >&5
11373   cat conftest.$ac_ext >&5
11374   rm -fr conftest*
11375   samba_cv_HAVE_STRUCT_FLOCK64=no
11376 fi
11377 rm -fr conftest*
11378 fi
11379
11380 fi
11381
11382 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11383
11384   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11385       cat >> confdefs.h <<\EOF
11386 #define HAVE_STRUCT_FLOCK64 1
11387 EOF
11388
11389   fi
11390 fi
11391
11392 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11393 echo "configure:11394: checking for st_blocks in struct stat" >&5
11394 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11395   echo $ac_n "(cached) $ac_c" 1>&6
11396 else
11397   
11398 cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401 #include <sys/types.h>
11402 #include <sys/stat.h>
11403 #include <unistd.h>
11404 int main() {
11405 struct stat st;  st.st_blocks = 0;
11406 ; return 0; }
11407 EOF
11408 if { (eval echo configure:11409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11409   rm -rf conftest*
11410   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11411 else
11412   echo "configure: failed program was:" >&5
11413   cat conftest.$ac_ext >&5
11414   rm -rf conftest*
11415   samba_cv_HAVE_STAT_ST_BLOCKS=no
11416 fi
11417 rm -f conftest*
11418 fi
11419
11420 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11421 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11422     cat >> confdefs.h <<\EOF
11423 #define HAVE_STAT_ST_BLOCKS 1
11424 EOF
11425
11426 fi 
11427
11428 case "$host_os" in
11429 *linux*)
11430 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11431 echo "configure:11432: checking for broken RedHat 7.2 system header files" >&5
11432 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11433   echo $ac_n "(cached) $ac_c" 1>&6
11434 else
11435   
11436 cat > conftest.$ac_ext <<EOF
11437 #line 11438 "configure"
11438 #include "confdefs.h"
11439
11440 #ifdef HAVE_SYS_VFS_H
11441 #include <sys/vfs.h>
11442 #endif
11443 #ifdef HAVE_SYS_CAPABILITY_H
11444 #include <sys/capability.h>
11445 #endif
11446
11447 int main() {
11448 int i;
11449 ; return 0; }
11450 EOF
11451 if { (eval echo configure:11452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11452   rm -rf conftest*
11453   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11454 else
11455   echo "configure: failed program was:" >&5
11456   cat conftest.$ac_ext >&5
11457   rm -rf conftest*
11458   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11459 fi
11460 rm -f conftest*
11461 fi
11462
11463 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11464 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11465    cat >> confdefs.h <<\EOF
11466 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11467 EOF
11468
11469 fi
11470 ;;
11471 esac
11472
11473 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11474 echo "configure:11475: checking for broken nisplus include files" >&5
11475 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11476   echo $ac_n "(cached) $ac_c" 1>&6
11477 else
11478   
11479 cat > conftest.$ac_ext <<EOF
11480 #line 11481 "configure"
11481 #include "confdefs.h"
11482 #include <sys/acl.h>
11483 #if defined(HAVE_RPCSVC_NIS_H)
11484 #include <rpcsvc/nis.h>
11485 #endif
11486 int main() {
11487 int i;
11488 ; return 0; }
11489 EOF
11490 if { (eval echo configure:11491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11491   rm -rf conftest*
11492   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11493 else
11494   echo "configure: failed program was:" >&5
11495   cat conftest.$ac_ext >&5
11496   rm -rf conftest*
11497   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11498 fi
11499 rm -f conftest*
11500 fi
11501
11502 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11503 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11504     cat >> confdefs.h <<\EOF
11505 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11506 EOF
11507
11508 fi
11509
11510
11511 #################################################
11512 # check for smbwrapper support
11513 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11514 echo "configure:11515: checking whether to use smbwrapper" >&5
11515 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11516 if test "${with_smbwrapper+set}" = set; then
11517   withval="$with_smbwrapper"
11518    case "$withval" in
11519   yes)
11520     echo "$ac_t""yes" 1>&6
11521     cat >> confdefs.h <<\EOF
11522 #define WITH_SMBWRAPPER 1
11523 EOF
11524
11525         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11526
11527         if test x$ATTEMPT_WRAP32_BUILD = x; then
11528                 WRAP32=""
11529         else
11530                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11531         fi
11532
11533 # Conditions under which smbwrapper should not be built.
11534
11535         if test x$PICFLAG = x; then
11536            echo No support for PIC code - disabling smbwrapper and smbsh
11537            WRAP=""
11538            WRAP32=""
11539         elif test x$ac_cv_func_syscall = xno; then
11540            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11541            WRAP=""
11542            WRAP32=""
11543         fi
11544     ;;
11545   *)
11546     echo "$ac_t""no" 1>&6
11547     ;;
11548   esac 
11549 else
11550   echo "$ac_t""no" 1>&6
11551
11552 fi
11553
11554
11555 #################################################
11556 # check for AFS clear-text auth support
11557 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11558 echo "configure:11559: checking whether to use AFS clear-text auth" >&5
11559 # Check whether --with-afs or --without-afs was given.
11560 if test "${with_afs+set}" = set; then
11561   withval="$with_afs"
11562    case "$withval" in
11563   yes)
11564     echo "$ac_t""yes" 1>&6
11565     cat >> confdefs.h <<\EOF
11566 #define WITH_AFS 1
11567 EOF
11568
11569     ;;
11570   *)
11571     echo "$ac_t""no" 1>&6
11572     ;;
11573   esac 
11574 else
11575   echo "$ac_t""no" 1>&6
11576
11577 fi
11578
11579
11580
11581 #################################################
11582 # check for the DFS clear-text auth system
11583 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11584 echo "configure:11585: checking whether to use DFS clear-text auth" >&5
11585 # Check whether --with-dfs or --without-dfs was given.
11586 if test "${with_dfs+set}" = set; then
11587   withval="$with_dfs"
11588    case "$withval" in
11589   yes)
11590     echo "$ac_t""yes" 1>&6
11591     cat >> confdefs.h <<\EOF
11592 #define WITH_DFS 1
11593 EOF
11594
11595     ;;
11596   *)
11597     echo "$ac_t""no" 1>&6
11598     ;;
11599   esac 
11600 else
11601   echo "$ac_t""no" 1>&6
11602
11603 fi
11604
11605
11606
11607 #################################################
11608 # see if this box has the RedHat location for kerberos
11609 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11610 echo "configure:11611: checking for /usr/kerberos" >&5
11611 if test -d /usr/kerberos; then
11612     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11613     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11614     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11615     echo "$ac_t""yes" 1>&6
11616 else
11617     echo "$ac_t""no" 1>&6
11618 fi
11619
11620 #################################################
11621 # check for location of Kerberos 5 install
11622 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11623 echo "configure:11624: checking for kerberos 5 install path" >&5
11624 # Check whether --with-krb5 or --without-krb5 was given.
11625 if test "${with_krb5+set}" = set; then
11626   withval="$with_krb5"
11627    case "$withval" in
11628   no)
11629     echo "$ac_t""no" 1>&6
11630     ;;
11631   *)
11632     echo "$ac_t""yes" 1>&6
11633     LIBS="$LIBS -lkrb5"
11634     CFLAGS="$CFLAGS -I$withval/include"
11635     CPPFLAGS="$CPPFLAGS -I$withval/include"
11636     LDFLAGS="$LDFLAGS -L$withval/lib"
11637     ;;
11638   esac 
11639 else
11640   echo "$ac_t""no" 1>&6
11641
11642 fi
11643
11644
11645 # now check for krb5.h. Some systems have the libraries without the headers!
11646 # note that this check is done here to allow for different kerberos
11647 # include paths
11648 for ac_hdr in krb5.h
11649 do
11650 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11651 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11652 echo "configure:11653: checking for $ac_hdr" >&5
11653 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11654   echo $ac_n "(cached) $ac_c" 1>&6
11655 else
11656   cat > conftest.$ac_ext <<EOF
11657 #line 11658 "configure"
11658 #include "confdefs.h"
11659 #include <$ac_hdr>
11660 EOF
11661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11662 { (eval echo configure:11663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11664 if test -z "$ac_err"; then
11665   rm -rf conftest*
11666   eval "ac_cv_header_$ac_safe=yes"
11667 else
11668   echo "$ac_err" >&5
11669   echo "configure: failed program was:" >&5
11670   cat conftest.$ac_ext >&5
11671   rm -rf conftest*
11672   eval "ac_cv_header_$ac_safe=no"
11673 fi
11674 rm -f conftest*
11675 fi
11676 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11677   echo "$ac_t""yes" 1>&6
11678     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11679   cat >> confdefs.h <<EOF
11680 #define $ac_tr_hdr 1
11681 EOF
11682  
11683 else
11684   echo "$ac_t""no" 1>&6
11685 fi
11686 done
11687
11688
11689 # now check for gssapi headers.  This is also done here to allow for
11690 # different kerberos include paths
11691 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11692 do
11693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11695 echo "configure:11696: checking for $ac_hdr" >&5
11696 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11697   echo $ac_n "(cached) $ac_c" 1>&6
11698 else
11699   cat > conftest.$ac_ext <<EOF
11700 #line 11701 "configure"
11701 #include "confdefs.h"
11702 #include <$ac_hdr>
11703 EOF
11704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11705 { (eval echo configure:11706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11707 if test -z "$ac_err"; then
11708   rm -rf conftest*
11709   eval "ac_cv_header_$ac_safe=yes"
11710 else
11711   echo "$ac_err" >&5
11712   echo "configure: failed program was:" >&5
11713   cat conftest.$ac_ext >&5
11714   rm -rf conftest*
11715   eval "ac_cv_header_$ac_safe=no"
11716 fi
11717 rm -f conftest*
11718 fi
11719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11720   echo "$ac_t""yes" 1>&6
11721     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11722   cat >> confdefs.h <<EOF
11723 #define $ac_tr_hdr 1
11724 EOF
11725  
11726 else
11727   echo "$ac_t""no" 1>&6
11728 fi
11729 done
11730
11731
11732 ##################################################################
11733 # we might need the k5crypto and com_err libraries on some systems
11734 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11735 echo "configure:11736: checking for _et_list in -lcom_err" >&5
11736 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11737 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11738   echo $ac_n "(cached) $ac_c" 1>&6
11739 else
11740   ac_save_LIBS="$LIBS"
11741 LIBS="-lcom_err  $LIBS"
11742 cat > conftest.$ac_ext <<EOF
11743 #line 11744 "configure"
11744 #include "confdefs.h"
11745 /* Override any gcc2 internal prototype to avoid an error.  */
11746 /* We use char because int might match the return type of a gcc2
11747     builtin and then its argument prototype would still apply.  */
11748 char _et_list();
11749
11750 int main() {
11751 _et_list()
11752 ; return 0; }
11753 EOF
11754 if { (eval echo configure:11755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11755   rm -rf conftest*
11756   eval "ac_cv_lib_$ac_lib_var=yes"
11757 else
11758   echo "configure: failed program was:" >&5
11759   cat conftest.$ac_ext >&5
11760   rm -rf conftest*
11761   eval "ac_cv_lib_$ac_lib_var=no"
11762 fi
11763 rm -f conftest*
11764 LIBS="$ac_save_LIBS"
11765
11766 fi
11767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11768   echo "$ac_t""yes" 1>&6
11769   LIBS="$LIBS -lcom_err"
11770 else
11771   echo "$ac_t""no" 1>&6
11772 fi
11773
11774 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11775 echo "configure:11776: checking for krb5_encrypt_data in -lk5crypto" >&5
11776 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11777 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11778   echo $ac_n "(cached) $ac_c" 1>&6
11779 else
11780   ac_save_LIBS="$LIBS"
11781 LIBS="-lk5crypto  $LIBS"
11782 cat > conftest.$ac_ext <<EOF
11783 #line 11784 "configure"
11784 #include "confdefs.h"
11785 /* Override any gcc2 internal prototype to avoid an error.  */
11786 /* We use char because int might match the return type of a gcc2
11787     builtin and then its argument prototype would still apply.  */
11788 char krb5_encrypt_data();
11789
11790 int main() {
11791 krb5_encrypt_data()
11792 ; return 0; }
11793 EOF
11794 if { (eval echo configure:11795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11795   rm -rf conftest*
11796   eval "ac_cv_lib_$ac_lib_var=yes"
11797 else
11798   echo "configure: failed program was:" >&5
11799   cat conftest.$ac_ext >&5
11800   rm -rf conftest*
11801   eval "ac_cv_lib_$ac_lib_var=no"
11802 fi
11803 rm -f conftest*
11804 LIBS="$ac_save_LIBS"
11805
11806 fi
11807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11808   echo "$ac_t""yes" 1>&6
11809   LIBS="$LIBS -lk5crypto"
11810 else
11811   echo "$ac_t""no" 1>&6
11812 fi
11813
11814 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11815 echo "configure:11816: checking for gss_display_status in -lgssapi_krb5" >&5
11816 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11817 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11818   echo $ac_n "(cached) $ac_c" 1>&6
11819 else
11820   ac_save_LIBS="$LIBS"
11821 LIBS="-lgssapi_krb5  $LIBS"
11822 cat > conftest.$ac_ext <<EOF
11823 #line 11824 "configure"
11824 #include "confdefs.h"
11825 /* Override any gcc2 internal prototype to avoid an error.  */
11826 /* We use char because int might match the return type of a gcc2
11827     builtin and then its argument prototype would still apply.  */
11828 char gss_display_status();
11829
11830 int main() {
11831 gss_display_status()
11832 ; return 0; }
11833 EOF
11834 if { (eval echo configure:11835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11835   rm -rf conftest*
11836   eval "ac_cv_lib_$ac_lib_var=yes"
11837 else
11838   echo "configure: failed program was:" >&5
11839   cat conftest.$ac_ext >&5
11840   rm -rf conftest*
11841   eval "ac_cv_lib_$ac_lib_var=no"
11842 fi
11843 rm -f conftest*
11844 LIBS="$ac_save_LIBS"
11845
11846 fi
11847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11848   echo "$ac_t""yes" 1>&6
11849   LIBS="$LIBS -lgssapi_krb5"
11850 else
11851   echo "$ac_t""no" 1>&6
11852 fi
11853
11854
11855
11856 ########################################################
11857 # now see if we can find the krb5 libs in standard paths
11858 # or as specified above
11859 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11860 echo "configure:11861: checking for krb5_mk_req_extended in -lkrb5" >&5
11861 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11862 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11863   echo $ac_n "(cached) $ac_c" 1>&6
11864 else
11865   ac_save_LIBS="$LIBS"
11866 LIBS="-lkrb5  $LIBS"
11867 cat > conftest.$ac_ext <<EOF
11868 #line 11869 "configure"
11869 #include "confdefs.h"
11870 /* Override any gcc2 internal prototype to avoid an error.  */
11871 /* We use char because int might match the return type of a gcc2
11872     builtin and then its argument prototype would still apply.  */
11873 char krb5_mk_req_extended();
11874
11875 int main() {
11876 krb5_mk_req_extended()
11877 ; return 0; }
11878 EOF
11879 if { (eval echo configure:11880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11880   rm -rf conftest*
11881   eval "ac_cv_lib_$ac_lib_var=yes"
11882 else
11883   echo "configure: failed program was:" >&5
11884   cat conftest.$ac_ext >&5
11885   rm -rf conftest*
11886   eval "ac_cv_lib_$ac_lib_var=no"
11887 fi
11888 rm -f conftest*
11889 LIBS="$ac_save_LIBS"
11890
11891 fi
11892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11893   echo "$ac_t""yes" 1>&6
11894   LIBS="$LIBS -lkrb5";
11895         cat >> confdefs.h <<\EOF
11896 #define HAVE_KRB5 1
11897 EOF
11898
11899 else
11900   echo "$ac_t""no" 1>&6
11901 fi
11902
11903
11904 ########################################################
11905 # now see if we can find the gssapi libs in standard paths
11906 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11907 echo "configure:11908: checking for gss_display_status in -lgssapi_krb5" >&5
11908 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11910   echo $ac_n "(cached) $ac_c" 1>&6
11911 else
11912   ac_save_LIBS="$LIBS"
11913 LIBS="-lgssapi_krb5  $LIBS"
11914 cat > conftest.$ac_ext <<EOF
11915 #line 11916 "configure"
11916 #include "confdefs.h"
11917 /* Override any gcc2 internal prototype to avoid an error.  */
11918 /* We use char because int might match the return type of a gcc2
11919     builtin and then its argument prototype would still apply.  */
11920 char gss_display_status();
11921
11922 int main() {
11923 gss_display_status()
11924 ; return 0; }
11925 EOF
11926 if { (eval echo configure:11927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11927   rm -rf conftest*
11928   eval "ac_cv_lib_$ac_lib_var=yes"
11929 else
11930   echo "configure: failed program was:" >&5
11931   cat conftest.$ac_ext >&5
11932   rm -rf conftest*
11933   eval "ac_cv_lib_$ac_lib_var=no"
11934 fi
11935 rm -f conftest*
11936 LIBS="$ac_save_LIBS"
11937
11938 fi
11939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11940   echo "$ac_t""yes" 1>&6
11941   cat >> confdefs.h <<\EOF
11942 #define HAVE_GSSAPI 1
11943 EOF
11944
11945 else
11946   echo "$ac_t""no" 1>&6
11947 fi
11948
11949
11950
11951 ##################################################################
11952 # we might need the lber lib on some systems. To avoid link errors
11953 # this test must be before the libldap test
11954 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11955 echo "configure:11956: checking for ber_scanf in -llber" >&5
11956 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11957 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11958   echo $ac_n "(cached) $ac_c" 1>&6
11959 else
11960   ac_save_LIBS="$LIBS"
11961 LIBS="-llber  $LIBS"
11962 cat > conftest.$ac_ext <<EOF
11963 #line 11964 "configure"
11964 #include "confdefs.h"
11965 /* Override any gcc2 internal prototype to avoid an error.  */
11966 /* We use char because int might match the return type of a gcc2
11967     builtin and then its argument prototype would still apply.  */
11968 char ber_scanf();
11969
11970 int main() {
11971 ber_scanf()
11972 ; return 0; }
11973 EOF
11974 if { (eval echo configure:11975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11975   rm -rf conftest*
11976   eval "ac_cv_lib_$ac_lib_var=yes"
11977 else
11978   echo "configure: failed program was:" >&5
11979   cat conftest.$ac_ext >&5
11980   rm -rf conftest*
11981   eval "ac_cv_lib_$ac_lib_var=no"
11982 fi
11983 rm -f conftest*
11984 LIBS="$ac_save_LIBS"
11985
11986 fi
11987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11988   echo "$ac_t""yes" 1>&6
11989   LIBS="$LIBS -llber"
11990 else
11991   echo "$ac_t""no" 1>&6
11992 fi
11993
11994
11995 ########################################################
11996 # now see if we can find the ldap libs in standard paths
11997 if test x$have_ldap != xyes; then
11998 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
11999 echo "configure:12000: checking for ldap_domain2hostlist in -lldap" >&5
12000 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12001 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12002   echo $ac_n "(cached) $ac_c" 1>&6
12003 else
12004   ac_save_LIBS="$LIBS"
12005 LIBS="-lldap  $LIBS"
12006 cat > conftest.$ac_ext <<EOF
12007 #line 12008 "configure"
12008 #include "confdefs.h"
12009 /* Override any gcc2 internal prototype to avoid an error.  */
12010 /* We use char because int might match the return type of a gcc2
12011     builtin and then its argument prototype would still apply.  */
12012 char ldap_domain2hostlist();
12013
12014 int main() {
12015 ldap_domain2hostlist()
12016 ; return 0; }
12017 EOF
12018 if { (eval echo configure:12019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12019   rm -rf conftest*
12020   eval "ac_cv_lib_$ac_lib_var=yes"
12021 else
12022   echo "configure: failed program was:" >&5
12023   cat conftest.$ac_ext >&5
12024   rm -rf conftest*
12025   eval "ac_cv_lib_$ac_lib_var=no"
12026 fi
12027 rm -f conftest*
12028 LIBS="$ac_save_LIBS"
12029
12030 fi
12031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12032   echo "$ac_t""yes" 1>&6
12033   LIBS="$LIBS -lldap";
12034         cat >> confdefs.h <<\EOF
12035 #define HAVE_LDAP 1
12036 EOF
12037
12038 else
12039   echo "$ac_t""no" 1>&6
12040 fi
12041
12042 fi
12043
12044 #################################################
12045 # check for automount support
12046 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12047 echo "configure:12048: checking whether to use AUTOMOUNT" >&5
12048 # Check whether --with-automount or --without-automount was given.
12049 if test "${with_automount+set}" = set; then
12050   withval="$with_automount"
12051    case "$withval" in
12052   yes)
12053     echo "$ac_t""yes" 1>&6
12054     cat >> confdefs.h <<\EOF
12055 #define WITH_AUTOMOUNT 1
12056 EOF
12057
12058     ;;
12059   *)
12060     echo "$ac_t""no" 1>&6
12061     ;;
12062   esac 
12063 else
12064   echo "$ac_t""no" 1>&6
12065
12066 fi
12067
12068
12069 #################################################
12070 # check for smbmount support
12071 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12072 echo "configure:12073: checking whether to use SMBMOUNT" >&5
12073 # Check whether --with-smbmount or --without-smbmount was given.
12074 if test "${with_smbmount+set}" = set; then
12075   withval="$with_smbmount"
12076    case "$withval" in
12077   yes)
12078         case "$host_os" in
12079         *linux*)
12080                 echo "$ac_t""yes" 1>&6
12081                 cat >> confdefs.h <<\EOF
12082 #define WITH_SMBMOUNT 1
12083 EOF
12084
12085                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12086                 ;;
12087         *)
12088                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12089                 ;;
12090         esac
12091     ;;
12092   *)
12093     echo "$ac_t""no" 1>&6
12094     MPROGS=
12095     ;;
12096   esac 
12097 else
12098   echo "$ac_t""no" 1>&6
12099   MPROGS=
12100
12101 fi
12102
12103
12104
12105 #################################################
12106 # check for a PAM clear-text auth, accounts, password and session support
12107 with_pam_for_crypt=no
12108 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12109 echo "configure:12110: checking whether to use PAM" >&5
12110 # Check whether --with-pam or --without-pam was given.
12111 if test "${with_pam+set}" = set; then
12112   withval="$with_pam"
12113    case "$withval" in
12114   yes)
12115     echo "$ac_t""yes" 1>&6
12116     cat >> confdefs.h <<\EOF
12117 #define WITH_PAM 1
12118 EOF
12119
12120     LIBS="$LIBS -lpam"
12121     with_pam_for_crypt=yes
12122     ;;
12123   *)
12124     echo "$ac_t""no" 1>&6
12125     ;;
12126   esac 
12127 else
12128   echo "$ac_t""no" 1>&6
12129
12130 fi
12131
12132
12133 # we can't build a pam module if we don't have pam.
12134 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12135 echo "configure:12136: checking for pam_get_data in -lpam" >&5
12136 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12138   echo $ac_n "(cached) $ac_c" 1>&6
12139 else
12140   ac_save_LIBS="$LIBS"
12141 LIBS="-lpam  $LIBS"
12142 cat > conftest.$ac_ext <<EOF
12143 #line 12144 "configure"
12144 #include "confdefs.h"
12145 /* Override any gcc2 internal prototype to avoid an error.  */
12146 /* We use char because int might match the return type of a gcc2
12147     builtin and then its argument prototype would still apply.  */
12148 char pam_get_data();
12149
12150 int main() {
12151 pam_get_data()
12152 ; return 0; }
12153 EOF
12154 if { (eval echo configure:12155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12155   rm -rf conftest*
12156   eval "ac_cv_lib_$ac_lib_var=yes"
12157 else
12158   echo "configure: failed program was:" >&5
12159   cat conftest.$ac_ext >&5
12160   rm -rf conftest*
12161   eval "ac_cv_lib_$ac_lib_var=no"
12162 fi
12163 rm -f conftest*
12164 LIBS="$ac_save_LIBS"
12165
12166 fi
12167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12168   echo "$ac_t""yes" 1>&6
12169   cat >> confdefs.h <<\EOF
12170 #define HAVE_LIBPAM 1
12171 EOF
12172
12173 else
12174   echo "$ac_t""no" 1>&6
12175 fi
12176
12177
12178 #################################################
12179 # check for pam_smbpass support
12180 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12181 echo "configure:12182: checking whether to use pam_smbpass" >&5
12182 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12183 if test "${with_pam_smbpass+set}" = set; then
12184   withval="$with_pam_smbpass"
12185    case "$withval" in
12186   yes)
12187     echo "$ac_t""yes" 1>&6
12188
12189 # Conditions under which pam_smbpass should not be built.
12190
12191        if test x$PICFLAG = x; then
12192           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12193           PAM_MOD=""
12194        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12195           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12196           PAM_MOD=""
12197        else
12198           PAM_MOD="bin/pam_smbpass.so"
12199        fi
12200     ;;
12201   *)
12202     echo "$ac_t""no" 1>&6
12203     ;;
12204   esac 
12205 else
12206   echo "$ac_t""no" 1>&6
12207
12208 fi
12209
12210
12211
12212 ###############################################
12213 # test for where we get crypt() from, but only
12214 # if not using PAM
12215 if test $with_pam_for_crypt = no; then
12216 for ac_func in crypt
12217 do
12218 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12219 echo "configure:12220: checking for $ac_func" >&5
12220 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12221   echo $ac_n "(cached) $ac_c" 1>&6
12222 else
12223   cat > conftest.$ac_ext <<EOF
12224 #line 12225 "configure"
12225 #include "confdefs.h"
12226 /* System header to define __stub macros and hopefully few prototypes,
12227     which can conflict with char $ac_func(); below.  */
12228 #include <assert.h>
12229 /* Override any gcc2 internal prototype to avoid an error.  */
12230 /* We use char because int might match the return type of a gcc2
12231     builtin and then its argument prototype would still apply.  */
12232 char $ac_func();
12233
12234 int main() {
12235
12236 /* The GNU C library defines this for functions which it implements
12237     to always fail with ENOSYS.  Some functions are actually named
12238     something starting with __ and the normal name is an alias.  */
12239 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12240 choke me
12241 #else
12242 $ac_func();
12243 #endif
12244
12245 ; return 0; }
12246 EOF
12247 if { (eval echo configure:12248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12248   rm -rf conftest*
12249   eval "ac_cv_func_$ac_func=yes"
12250 else
12251   echo "configure: failed program was:" >&5
12252   cat conftest.$ac_ext >&5
12253   rm -rf conftest*
12254   eval "ac_cv_func_$ac_func=no"
12255 fi
12256 rm -f conftest*
12257 fi
12258
12259 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12260   echo "$ac_t""yes" 1>&6
12261     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12262   cat >> confdefs.h <<EOF
12263 #define $ac_tr_func 1
12264 EOF
12265  
12266 else
12267   echo "$ac_t""no" 1>&6
12268 fi
12269 done
12270
12271 if test x"$ac_cv_func_crypt" = x"no"; then
12272     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12273 echo "configure:12274: checking for crypt in -lcrypt" >&5
12274 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12275 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12276   echo $ac_n "(cached) $ac_c" 1>&6
12277 else
12278   ac_save_LIBS="$LIBS"
12279 LIBS="-lcrypt  $LIBS"
12280 cat > conftest.$ac_ext <<EOF
12281 #line 12282 "configure"
12282 #include "confdefs.h"
12283 /* Override any gcc2 internal prototype to avoid an error.  */
12284 /* We use char because int might match the return type of a gcc2
12285     builtin and then its argument prototype would still apply.  */
12286 char crypt();
12287
12288 int main() {
12289 crypt()
12290 ; return 0; }
12291 EOF
12292 if { (eval echo configure:12293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12293   rm -rf conftest*
12294   eval "ac_cv_lib_$ac_lib_var=yes"
12295 else
12296   echo "configure: failed program was:" >&5
12297   cat conftest.$ac_ext >&5
12298   rm -rf conftest*
12299   eval "ac_cv_lib_$ac_lib_var=no"
12300 fi
12301 rm -f conftest*
12302 LIBS="$ac_save_LIBS"
12303
12304 fi
12305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12306   echo "$ac_t""yes" 1>&6
12307   LIBS="$LIBS -lcrypt";
12308         cat >> confdefs.h <<\EOF
12309 #define HAVE_CRYPT 1
12310 EOF
12311
12312 else
12313   echo "$ac_t""no" 1>&6
12314 fi
12315
12316 fi
12317 fi
12318
12319 ##
12320 ## moved after the check for -lcrypt in order to
12321 ## ensure that the necessary libraries are included
12322 ## check checking for truncated salt.  Wrapped by the
12323 ## $with_pam_for_crypt variable as above   --jerry
12324 ##
12325 if test $with_pam_for_crypt = no; then
12326 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12327 echo "configure:12328: checking for a crypt that needs truncated salt" >&5
12328 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12329   echo $ac_n "(cached) $ac_c" 1>&6
12330 else
12331   
12332 if test "$cross_compiling" = yes; then
12333   samba_cv_HAVE_TRUNCATED_SALT=cross
12334 else
12335   cat > conftest.$ac_ext <<EOF
12336 #line 12337 "configure"
12337 #include "confdefs.h"
12338 #include "${srcdir-.}/tests/crypttest.c"
12339 EOF
12340 if { (eval echo configure:12341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12341 then
12342   samba_cv_HAVE_TRUNCATED_SALT=no
12343 else
12344   echo "configure: failed program was:" >&5
12345   cat conftest.$ac_ext >&5
12346   rm -fr conftest*
12347   samba_cv_HAVE_TRUNCATED_SALT=yes
12348 fi
12349 rm -fr conftest*
12350 fi
12351
12352 fi
12353
12354 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12355 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12356         cat >> confdefs.h <<\EOF
12357 #define HAVE_TRUNCATED_SALT 1
12358 EOF
12359
12360 fi
12361 fi
12362
12363
12364
12365 ########################################################################################
12366 ##
12367 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12368 ##
12369 ########################################################################################
12370
12371 #################################################
12372 # check for a TDB password database
12373 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12374 echo "configure:12375: checking whether to use TDB SAM database" >&5
12375 # Check whether --with-tdbsam or --without-tdbsam was given.
12376 if test "${with_tdbsam+set}" = set; then
12377   withval="$with_tdbsam"
12378    case "$withval" in
12379   yes)
12380     echo "$ac_t""yes" 1>&6
12381     cat >> confdefs.h <<\EOF
12382 #define WITH_TDB_SAM 1
12383 EOF
12384
12385     ;;
12386   *)
12387     echo "$ac_t""no" 1>&6
12388     ;;
12389   esac 
12390 else
12391   echo "$ac_t""no" 1>&6
12392
12393 fi
12394
12395
12396 #################################################
12397 # check for a LDAP password database
12398 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12399 echo "configure:12400: checking whether to use LDAP SAM database" >&5
12400 # Check whether --with-ldapsam or --without-ldapsam was given.
12401 if test "${with_ldapsam+set}" = set; then
12402   withval="$with_ldapsam"
12403    case "$withval" in
12404   yes)
12405     echo "$ac_t""yes" 1>&6
12406     cat >> confdefs.h <<\EOF
12407 #define WITH_LDAP_SAM 1
12408 EOF
12409
12410     LIBS="-lldap -llber $LIBS"
12411     ;;
12412   *)
12413     echo "$ac_t""no" 1>&6
12414     ;;
12415   esac 
12416 else
12417   echo "$ac_t""no" 1>&6
12418
12419 fi
12420
12421
12422 #################################################
12423 # check for a NISPLUS password database
12424 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12425 echo "configure:12426: checking whether to use NISPLUS SAM database" >&5
12426 # Check whether --with-nisplussam or --without-nisplussam was given.
12427 if test "${with_nisplussam+set}" = set; then
12428   withval="$with_nisplussam"
12429    case "$withval" in
12430   yes)
12431     echo "$ac_t""yes" 1>&6
12432     cat >> confdefs.h <<\EOF
12433 #define WITH_NISPLUS_SAM 1
12434 EOF
12435
12436     ;;
12437   *)
12438     echo "$ac_t""no" 1>&6
12439     ;;
12440   esac 
12441 else
12442   echo "$ac_t""no" 1>&6
12443
12444 fi
12445
12446
12447 ########################################################################################
12448 ##
12449 ## END OF TESTS FOR SAM BACKENDS.  
12450 ##
12451 ########################################################################################
12452
12453 #################################################
12454 # check for a NISPLUS_HOME support 
12455 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12456 echo "configure:12457: checking whether to use NISPLUS_HOME" >&5
12457 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12458 if test "${with_nisplus_home+set}" = set; then
12459   withval="$with_nisplus_home"
12460    case "$withval" in
12461   yes)
12462     echo "$ac_t""yes" 1>&6
12463     cat >> confdefs.h <<\EOF
12464 #define WITH_NISPLUS_HOME 1
12465 EOF
12466
12467     ;;
12468   *)
12469     echo "$ac_t""no" 1>&6
12470     ;;
12471   esac 
12472 else
12473   echo "$ac_t""no" 1>&6
12474
12475 fi
12476
12477
12478 #################################################
12479 # check for the secure socket layer
12480 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12481 echo "configure:12482: checking whether to use SSL" >&5
12482 # Check whether --with-ssl or --without-ssl was given.
12483 if test "${with_ssl+set}" = set; then
12484   withval="$with_ssl"
12485    case "$withval" in
12486   yes)
12487     echo "$ac_t""yes" 1>&6
12488     cat >> confdefs.h <<\EOF
12489 #define WITH_SSL 1
12490 EOF
12491
12492     withval="/usr/local/ssl"     # default
12493
12494     if test "${with_sslinc+set}" = set; then
12495
12496         withval="$with_sslinc"
12497         case "$withval" in
12498         yes|no)
12499           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12500           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12501         ;;
12502         * )
12503           CFLAGS="-I${withval} $CFLAGS"
12504         ;;
12505         esac
12506
12507     else
12508
12509         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12510
12511     fi
12512
12513     if test "${with_ssllib+set}" = set; then
12514
12515         withval="$with_ssllib"
12516         case "$withval" in
12517         yes|no)
12518           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12519           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12520         ;;
12521         * )
12522           LDFLAGS="-L${withval}/lib $LDFLAGS"
12523         ;;
12524         esac
12525
12526     else
12527
12528         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12529
12530     fi
12531
12532     LIBS="-lssl -lcrypto $LIBS"
12533
12534 #    if test ! -d ${withval}; then
12535 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12536 #      exit 1
12537 #    fi 
12538
12539     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12540
12541     ;;
12542   *)
12543     echo "$ac_t""no" 1>&6
12544     ;;
12545   esac 
12546 else
12547   echo "$ac_t""no" 1>&6
12548
12549 fi
12550
12551
12552 #################################################
12553 # check for syslog logging
12554 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12555 echo "configure:12556: checking whether to use syslog logging" >&5
12556 # Check whether --with-syslog or --without-syslog was given.
12557 if test "${with_syslog+set}" = set; then
12558   withval="$with_syslog"
12559    case "$withval" in
12560   yes)
12561     echo "$ac_t""yes" 1>&6
12562     cat >> confdefs.h <<\EOF
12563 #define WITH_SYSLOG 1
12564 EOF
12565
12566     ;;
12567   *)
12568     echo "$ac_t""no" 1>&6
12569     ;;
12570   esac 
12571 else
12572   echo "$ac_t""no" 1>&6
12573
12574 fi
12575
12576
12577 #################################################
12578 # check for a shared memory profiling support
12579 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12580 echo "configure:12581: checking whether to use profiling" >&5
12581 # Check whether --with-profiling-data or --without-profiling-data was given.
12582 if test "${with_profiling_data+set}" = set; then
12583   withval="$with_profiling_data"
12584    case "$withval" in
12585   yes)
12586     echo "$ac_t""yes" 1>&6
12587     cat >> confdefs.h <<\EOF
12588 #define WITH_PROFILE 1
12589 EOF
12590
12591     ;;
12592   *)
12593     echo "$ac_t""no" 1>&6
12594     ;;
12595   esac 
12596 else
12597   echo "$ac_t""no" 1>&6
12598
12599 fi
12600
12601
12602
12603 #################################################
12604 # check for experimental disk-quotas support
12605 QUOTAOBJS=smbd/noquotas.o
12606
12607 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12608 echo "configure:12609: checking whether to support disk-quotas" >&5
12609 # Check whether --with-quotas or --without-quotas was given.
12610 if test "${with_quotas+set}" = set; then
12611   withval="$with_quotas"
12612    case "$withval" in
12613   yes)
12614     echo "$ac_t""yes" 1>&6
12615     case "$host_os" in
12616       *linux*)
12617         # Check for kernel 2.4.x quota braindamage...
12618         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12619 echo "configure:12620: checking for linux 2.4.x quota braindamage.." >&5
12620 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12621   echo $ac_n "(cached) $ac_c" 1>&6
12622 else
12623   
12624         cat > conftest.$ac_ext <<EOF
12625 #line 12626 "configure"
12626 #include "confdefs.h"
12627 #include <stdio.h>
12628 #include <sys/types.h>
12629 #include <asm/types.h>
12630 #include <linux/quota.h>
12631 #include <mntent.h>
12632 #include <linux/unistd.h>
12633 int main() {
12634 struct mem_dqblk D;
12635 ; return 0; }
12636 EOF
12637 if { (eval echo configure:12638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12638   rm -rf conftest*
12639   samba_cv_linux_2_4_quota_braindamage=yes
12640 else
12641   echo "configure: failed program was:" >&5
12642   cat conftest.$ac_ext >&5
12643   rm -rf conftest*
12644   samba_cv_linux_2_4_quota_braindamage=no
12645 fi
12646 rm -f conftest*
12647 fi
12648
12649 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12650 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12651         cat >> confdefs.h <<\EOF
12652 #define LINUX_QUOTAS_2 1
12653 EOF
12654
12655 else
12656         cat >> confdefs.h <<\EOF
12657 #define LINUX_QUOTAS_1 1
12658 EOF
12659
12660 fi
12661         ;;
12662       *)
12663         ;;
12664     esac
12665     QUOTAOBJS=smbd/quotas.o
12666     cat >> confdefs.h <<\EOF
12667 #define WITH_QUOTAS 1
12668 EOF
12669
12670     ;;
12671   *)
12672     echo "$ac_t""no" 1>&6
12673     ;;
12674   esac 
12675 else
12676   echo "$ac_t""no" 1>&6
12677
12678 fi
12679
12680
12681
12682 #################################################
12683 # check for experimental utmp accounting
12684
12685 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12686 echo "configure:12687: checking whether to support utmp accounting" >&5
12687 # Check whether --with-utmp or --without-utmp was given.
12688 if test "${with_utmp+set}" = set; then
12689   withval="$with_utmp"
12690    case "$withval" in
12691   yes)
12692     echo "$ac_t""yes" 1>&6
12693     cat >> confdefs.h <<\EOF
12694 #define WITH_UTMP 1
12695 EOF
12696
12697     ;;
12698   *)
12699     echo "$ac_t""no" 1>&6
12700     ;;
12701   esac 
12702 else
12703   echo "$ac_t""no" 1>&6
12704
12705 fi
12706
12707
12708 #################################################
12709 # set private directory location
12710 # Check whether --with-privatedir or --without-privatedir was given.
12711 if test "${with_privatedir+set}" = set; then
12712   withval="$with_privatedir"
12713    case "$withval" in
12714   yes|no)
12715   #
12716   # Just in case anybody calls it without argument
12717   #
12718     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12719     privatedir='${prefix}/private'
12720   ;;
12721   * )
12722     privatedir="$withval"
12723     ;;
12724   esac
12725   
12726 else
12727   privatedir='${prefix}/private'
12728    
12729
12730 fi
12731
12732
12733 #################################################
12734 # set lock directory location
12735 # Check whether --with-lockdir or --without-lockdir was given.
12736 if test "${with_lockdir+set}" = set; then
12737   withval="$with_lockdir"
12738    case "$withval" in
12739   yes|no)
12740   #
12741   # Just in case anybody calls it without argument
12742   #
12743     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12744     lockdir='$(VARDIR)/locks'
12745   ;;
12746   * )
12747     lockdir="$withval"
12748     ;;
12749   esac
12750   
12751 else
12752   lockdir='$(VARDIR)/locks'
12753    
12754
12755 fi
12756
12757
12758 #################################################
12759 # set SWAT directory location
12760 # Check whether --with-swatdir or --without-swatdir was given.
12761 if test "${with_swatdir+set}" = set; then
12762   withval="$with_swatdir"
12763    case "$withval" in
12764   yes|no)
12765   #
12766   # Just in case anybody does it
12767   #
12768     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12769     swatdir='${prefix}/swat'
12770   ;;
12771   * )
12772     swatdir="$withval"
12773     ;;
12774   esac
12775   
12776 else
12777   swatdir='${prefix}/swat'
12778    
12779
12780 fi
12781
12782
12783 #################################################
12784 # choose native language(s) of man pages
12785 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12786 echo "configure:12787: checking chosen man pages' language(s)" >&5
12787 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12788 if test "${with_manpages_langs+set}" = set; then
12789   withval="$with_manpages_langs"
12790    case "$withval" in
12791   yes|no)
12792     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12793     manlangs="en"
12794   ;;
12795   *)
12796     manlangs="$withval"
12797   ;;
12798   esac
12799
12800   echo "$ac_t""$manlangs" 1>&6
12801   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12802   
12803 else
12804   manlangs="en"
12805   echo "$ac_t""$manlangs" 1>&6
12806   
12807
12808 fi
12809
12810
12811 #################################################
12812 # these tests are taken from the GNU fileutils package
12813 echo "checking how to get filesystem space usage" 1>&6
12814 echo "configure:12815: checking how to get filesystem space usage" >&5
12815 space=no
12816
12817 # Test for statvfs64.
12818 if test $space = no; then
12819   # SVR4
12820   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12821 echo "configure:12822: checking statvfs64 function (SVR4)" >&5
12822 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12823   echo $ac_n "(cached) $ac_c" 1>&6
12824 else
12825   if test "$cross_compiling" = yes; then
12826   fu_cv_sys_stat_statvfs64=cross
12827 else
12828   cat > conftest.$ac_ext <<EOF
12829 #line 12830 "configure"
12830 #include "confdefs.h"
12831
12832 #if defined(HAVE_UNISTD_H)
12833 #include <unistd.h>
12834 #endif
12835 #include <sys/types.h>
12836 #include <sys/statvfs.h>
12837   main ()
12838   {
12839     struct statvfs64 fsd;
12840     exit (statvfs64 (".", &fsd));
12841   }
12842 EOF
12843 if { (eval echo configure:12844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12844 then
12845   fu_cv_sys_stat_statvfs64=yes
12846 else
12847   echo "configure: failed program was:" >&5
12848   cat conftest.$ac_ext >&5
12849   rm -fr conftest*
12850   fu_cv_sys_stat_statvfs64=no
12851 fi
12852 rm -fr conftest*
12853 fi
12854
12855 fi
12856
12857 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12858   if test $fu_cv_sys_stat_statvfs64 = yes; then
12859     space=yes
12860     cat >> confdefs.h <<\EOF
12861 #define STAT_STATVFS64 1
12862 EOF
12863
12864   fi
12865 fi
12866
12867 # Perform only the link test since it seems there are no variants of the
12868 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12869 # because that got a false positive on SCO OSR5.  Adding the declaration
12870 # of a `struct statvfs' causes this test to fail (as it should) on such
12871 # systems.  That system is reported to work fine with STAT_STATFS4 which
12872 # is what it gets when this test fails.
12873 if test $space = no; then
12874   # SVR4
12875   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12876 echo "configure:12877: checking statvfs function (SVR4)" >&5
12877 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12878   echo $ac_n "(cached) $ac_c" 1>&6
12879 else
12880   cat > conftest.$ac_ext <<EOF
12881 #line 12882 "configure"
12882 #include "confdefs.h"
12883 #include <sys/types.h>
12884 #include <sys/statvfs.h>
12885 int main() {
12886 struct statvfs fsd; statvfs (0, &fsd);
12887 ; return 0; }
12888 EOF
12889 if { (eval echo configure:12890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12890   rm -rf conftest*
12891   fu_cv_sys_stat_statvfs=yes
12892 else
12893   echo "configure: failed program was:" >&5
12894   cat conftest.$ac_ext >&5
12895   rm -rf conftest*
12896   fu_cv_sys_stat_statvfs=no
12897 fi
12898 rm -f conftest*
12899 fi
12900
12901 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12902   if test $fu_cv_sys_stat_statvfs = yes; then
12903     space=yes
12904     cat >> confdefs.h <<\EOF
12905 #define STAT_STATVFS 1
12906 EOF
12907
12908   fi
12909 fi
12910
12911 if test $space = no; then
12912   # DEC Alpha running OSF/1
12913   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12914 echo "configure:12915: checking for 3-argument statfs function (DEC OSF/1)" >&5
12915   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12916   echo $ac_n "(cached) $ac_c" 1>&6
12917 else
12918   if test "$cross_compiling" = yes; then
12919   fu_cv_sys_stat_statfs3_osf1=no
12920 else
12921   cat > conftest.$ac_ext <<EOF
12922 #line 12923 "configure"
12923 #include "confdefs.h"
12924
12925 #include <sys/param.h>
12926 #include <sys/types.h>
12927 #include <sys/mount.h>
12928   main ()
12929   {
12930     struct statfs fsd;
12931     fsd.f_fsize = 0;
12932     exit (statfs (".", &fsd, sizeof (struct statfs)));
12933   }
12934 EOF
12935 if { (eval echo configure:12936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12936 then
12937   fu_cv_sys_stat_statfs3_osf1=yes
12938 else
12939   echo "configure: failed program was:" >&5
12940   cat conftest.$ac_ext >&5
12941   rm -fr conftest*
12942   fu_cv_sys_stat_statfs3_osf1=no
12943 fi
12944 rm -fr conftest*
12945 fi
12946
12947 fi
12948
12949   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12950   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12951     space=yes
12952     cat >> confdefs.h <<\EOF
12953 #define STAT_STATFS3_OSF1 1
12954 EOF
12955
12956   fi
12957 fi
12958
12959 if test $space = no; then
12960 # AIX
12961   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12962 echo "configure:12963: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12963   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12964   echo $ac_n "(cached) $ac_c" 1>&6
12965 else
12966   if test "$cross_compiling" = yes; then
12967   fu_cv_sys_stat_statfs2_bsize=no
12968 else
12969   cat > conftest.$ac_ext <<EOF
12970 #line 12971 "configure"
12971 #include "confdefs.h"
12972
12973 #ifdef HAVE_SYS_PARAM_H
12974 #include <sys/param.h>
12975 #endif
12976 #ifdef HAVE_SYS_MOUNT_H
12977 #include <sys/mount.h>
12978 #endif
12979 #ifdef HAVE_SYS_VFS_H
12980 #include <sys/vfs.h>
12981 #endif
12982   main ()
12983   {
12984   struct statfs fsd;
12985   fsd.f_bsize = 0;
12986   exit (statfs (".", &fsd));
12987   }
12988 EOF
12989 if { (eval echo configure:12990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12990 then
12991   fu_cv_sys_stat_statfs2_bsize=yes
12992 else
12993   echo "configure: failed program was:" >&5
12994   cat conftest.$ac_ext >&5
12995   rm -fr conftest*
12996   fu_cv_sys_stat_statfs2_bsize=no
12997 fi
12998 rm -fr conftest*
12999 fi
13000
13001 fi
13002
13003   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13004   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13005     space=yes
13006     cat >> confdefs.h <<\EOF
13007 #define STAT_STATFS2_BSIZE 1
13008 EOF
13009
13010   fi
13011 fi
13012
13013 if test $space = no; then
13014 # SVR3
13015   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13016 echo "configure:13017: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13017   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13018   echo $ac_n "(cached) $ac_c" 1>&6
13019 else
13020   if test "$cross_compiling" = yes; then
13021   fu_cv_sys_stat_statfs4=no
13022 else
13023   cat > conftest.$ac_ext <<EOF
13024 #line 13025 "configure"
13025 #include "confdefs.h"
13026 #include <sys/types.h>
13027 #include <sys/statfs.h>
13028   main ()
13029   {
13030   struct statfs fsd;
13031   exit (statfs (".", &fsd, sizeof fsd, 0));
13032   }
13033 EOF
13034 if { (eval echo configure:13035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13035 then
13036   fu_cv_sys_stat_statfs4=yes
13037 else
13038   echo "configure: failed program was:" >&5
13039   cat conftest.$ac_ext >&5
13040   rm -fr conftest*
13041   fu_cv_sys_stat_statfs4=no
13042 fi
13043 rm -fr conftest*
13044 fi
13045
13046 fi
13047
13048   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13049   if test $fu_cv_sys_stat_statfs4 = yes; then
13050     space=yes
13051     cat >> confdefs.h <<\EOF
13052 #define STAT_STATFS4 1
13053 EOF
13054
13055   fi
13056 fi
13057
13058 if test $space = no; then
13059 # 4.4BSD and NetBSD
13060   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13061 echo "configure:13062: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13062   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13063   echo $ac_n "(cached) $ac_c" 1>&6
13064 else
13065   if test "$cross_compiling" = yes; then
13066   fu_cv_sys_stat_statfs2_fsize=no
13067 else
13068   cat > conftest.$ac_ext <<EOF
13069 #line 13070 "configure"
13070 #include "confdefs.h"
13071 #include <sys/types.h>
13072 #ifdef HAVE_SYS_PARAM_H
13073 #include <sys/param.h>
13074 #endif
13075 #ifdef HAVE_SYS_MOUNT_H
13076 #include <sys/mount.h>
13077 #endif
13078   main ()
13079   {
13080   struct statfs fsd;
13081   fsd.f_fsize = 0;
13082   exit (statfs (".", &fsd));
13083   }
13084 EOF
13085 if { (eval echo configure:13086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13086 then
13087   fu_cv_sys_stat_statfs2_fsize=yes
13088 else
13089   echo "configure: failed program was:" >&5
13090   cat conftest.$ac_ext >&5
13091   rm -fr conftest*
13092   fu_cv_sys_stat_statfs2_fsize=no
13093 fi
13094 rm -fr conftest*
13095 fi
13096
13097 fi
13098
13099   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13100   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13101     space=yes
13102     cat >> confdefs.h <<\EOF
13103 #define STAT_STATFS2_FSIZE 1
13104 EOF
13105
13106   fi
13107 fi
13108
13109 if test $space = no; then
13110   # Ultrix
13111   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13112 echo "configure:13113: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13113   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13114   echo $ac_n "(cached) $ac_c" 1>&6
13115 else
13116   if test "$cross_compiling" = yes; then
13117   fu_cv_sys_stat_fs_data=no
13118 else
13119   cat > conftest.$ac_ext <<EOF
13120 #line 13121 "configure"
13121 #include "confdefs.h"
13122 #include <sys/types.h>
13123 #ifdef HAVE_SYS_PARAM_H
13124 #include <sys/param.h>
13125 #endif
13126 #ifdef HAVE_SYS_MOUNT_H
13127 #include <sys/mount.h>
13128 #endif
13129 #ifdef HAVE_SYS_FS_TYPES_H
13130 #include <sys/fs_types.h>
13131 #endif
13132   main ()
13133   {
13134   struct fs_data fsd;
13135   /* Ultrix's statfs returns 1 for success,
13136      0 for not mounted, -1 for failure.  */
13137   exit (statfs (".", &fsd) != 1);
13138   }
13139 EOF
13140 if { (eval echo configure:13141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13141 then
13142   fu_cv_sys_stat_fs_data=yes
13143 else
13144   echo "configure: failed program was:" >&5
13145   cat conftest.$ac_ext >&5
13146   rm -fr conftest*
13147   fu_cv_sys_stat_fs_data=no
13148 fi
13149 rm -fr conftest*
13150 fi
13151
13152 fi
13153
13154   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13155   if test $fu_cv_sys_stat_fs_data = yes; then
13156     space=yes
13157     cat >> confdefs.h <<\EOF
13158 #define STAT_STATFS2_FS_DATA 1
13159 EOF
13160
13161   fi
13162 fi
13163
13164 #
13165 # As a gating factor for large file support, in order to
13166 # use <4GB files we must have the following minimal support
13167 # available.
13168 # long long, and a 64 bit off_t or off64_t.
13169 # If we don't have all of these then disable large
13170 # file support.
13171 #
13172 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13173 echo "configure:13174: checking if large file support can be enabled" >&5
13174 cat > conftest.$ac_ext <<EOF
13175 #line 13176 "configure"
13176 #include "confdefs.h"
13177
13178 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13179 #include <sys/types.h>
13180 #else
13181 __COMPILE_ERROR_
13182 #endif
13183
13184 int main() {
13185 int i
13186 ; return 0; }
13187 EOF
13188 if { (eval echo configure:13189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13189   rm -rf conftest*
13190   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13191 else
13192   echo "configure: failed program was:" >&5
13193   cat conftest.$ac_ext >&5
13194   rm -rf conftest*
13195   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13196 fi
13197 rm -f conftest*
13198 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13199     cat >> confdefs.h <<\EOF
13200 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13201 EOF
13202
13203 fi
13204 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13205
13206 # Check whether --with-spinlocks or --without-spinlocks was given.
13207 if test "${with_spinlocks+set}" = set; then
13208   withval="$with_spinlocks"
13209   :
13210 fi
13211
13212 if test "x$with_spinlocks" = "xyes"; then
13213     cat >> confdefs.h <<\EOF
13214 #define USE_SPINLOCKS 1
13215 EOF
13216
13217
13218     case "$host_cpu" in
13219         sparc)
13220             cat >> confdefs.h <<\EOF
13221 #define SPARC_SPINLOCKS 1
13222 EOF
13223
13224             ;;
13225
13226         i386|i486|i586|i686)
13227             cat >> confdefs.h <<\EOF
13228 #define INTEL_SPINLOCKS 1
13229 EOF
13230
13231             ;;
13232
13233         mips)
13234             cat >> confdefs.h <<\EOF
13235 #define MIPS_SPINLOCKS 1
13236 EOF
13237
13238             ;;
13239
13240         powerpc)
13241             cat >> confdefs.h <<\EOF
13242 #define POWERPC_SPINLOCKS 1
13243 EOF
13244
13245             ;;
13246     esac
13247 fi
13248
13249 #################################################
13250 # check for ACL support
13251
13252 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13253 echo "configure:13254: checking whether to support ACLs" >&5
13254 # Check whether --with-acl-support or --without-acl-support was given.
13255 if test "${with_acl_support+set}" = set; then
13256   withval="$with_acl_support"
13257    case "$withval" in
13258   yes)
13259
13260         case "$host_os" in
13261         *sysv5*)
13262                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13263                 cat >> confdefs.h <<\EOF
13264 #define HAVE_UNIXWARE_ACLS 1
13265 EOF
13266
13267                 ;;
13268         *solaris*)
13269                 echo "$ac_t""Using solaris ACLs" 1>&6
13270                 cat >> confdefs.h <<\EOF
13271 #define HAVE_SOLARIS_ACLS 1
13272 EOF
13273
13274                 ;;
13275         *hpux*)
13276                 echo "$ac_t""Using HPUX ACLs" 1>&6
13277                 cat >> confdefs.h <<\EOF
13278 #define HAVE_HPUX_ACLS 1
13279 EOF
13280
13281                 ;;
13282         *irix*)
13283                 echo "$ac_t""Using IRIX ACLs" 1>&6
13284                 cat >> confdefs.h <<\EOF
13285 #define HAVE_IRIX_ACLS 1
13286 EOF
13287
13288                 ;;
13289         *aix*)
13290                 echo "$ac_t""Using AIX ACLs" 1>&6
13291                 cat >> confdefs.h <<\EOF
13292 #define HAVE_AIX_ACLS 1
13293 EOF
13294
13295                 ;;
13296         *osf*)
13297                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13298                 cat >> confdefs.h <<\EOF
13299 #define HAVE_TRU64_ACLS 1
13300 EOF
13301
13302                 LIBS="$LIBS -lpacl"
13303                 ;;
13304         *)
13305                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13306 echo "configure:13307: checking for acl_get_file in -lacl" >&5
13307 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13309   echo $ac_n "(cached) $ac_c" 1>&6
13310 else
13311   ac_save_LIBS="$LIBS"
13312 LIBS="-lacl  $LIBS"
13313 cat > conftest.$ac_ext <<EOF
13314 #line 13315 "configure"
13315 #include "confdefs.h"
13316 /* Override any gcc2 internal prototype to avoid an error.  */
13317 /* We use char because int might match the return type of a gcc2
13318     builtin and then its argument prototype would still apply.  */
13319 char acl_get_file();
13320
13321 int main() {
13322 acl_get_file()
13323 ; return 0; }
13324 EOF
13325 if { (eval echo configure:13326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13326   rm -rf conftest*
13327   eval "ac_cv_lib_$ac_lib_var=yes"
13328 else
13329   echo "configure: failed program was:" >&5
13330   cat conftest.$ac_ext >&5
13331   rm -rf conftest*
13332   eval "ac_cv_lib_$ac_lib_var=no"
13333 fi
13334 rm -f conftest*
13335 LIBS="$ac_save_LIBS"
13336
13337 fi
13338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13339   echo "$ac_t""yes" 1>&6
13340     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13341     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13342   cat >> confdefs.h <<EOF
13343 #define $ac_tr_lib 1
13344 EOF
13345
13346   LIBS="-lacl $LIBS"
13347
13348 else
13349   echo "$ac_t""no" 1>&6
13350 fi
13351
13352                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13353 echo "configure:13354: checking for ACL support" >&5
13354 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13355   echo $ac_n "(cached) $ac_c" 1>&6
13356 else
13357   
13358                 cat > conftest.$ac_ext <<EOF
13359 #line 13360 "configure"
13360 #include "confdefs.h"
13361 #include <sys/types.h>
13362 #include <sys/acl.h>
13363 int main() {
13364  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13365 ; return 0; }
13366 EOF
13367 if { (eval echo configure:13368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13368   rm -rf conftest*
13369   samba_cv_HAVE_POSIX_ACLS=yes
13370 else
13371   echo "configure: failed program was:" >&5
13372   cat conftest.$ac_ext >&5
13373   rm -rf conftest*
13374   samba_cv_HAVE_POSIX_ACLS=no
13375 fi
13376 rm -f conftest*
13377 fi
13378
13379 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13380                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13381                                 echo "$ac_t""Using posix ACLs" 1>&6
13382                                 cat >> confdefs.h <<\EOF
13383 #define HAVE_POSIX_ACLS 1
13384 EOF
13385
13386                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13387 echo "configure:13388: checking for acl_get_perm_np" >&5
13388 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13389   echo $ac_n "(cached) $ac_c" 1>&6
13390 else
13391   
13392                                 cat > conftest.$ac_ext <<EOF
13393 #line 13394 "configure"
13394 #include "confdefs.h"
13395 #include <sys/types.h>
13396 #include <sys/acl.h>
13397 int main() {
13398  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13399 ; return 0; }
13400 EOF
13401 if { (eval echo configure:13402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13402   rm -rf conftest*
13403   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13404 else
13405   echo "configure: failed program was:" >&5
13406   cat conftest.$ac_ext >&5
13407   rm -rf conftest*
13408   samba_cv_HAVE_ACL_GET_PERM_NP=no
13409 fi
13410 rm -f conftest*
13411 fi
13412
13413 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13414                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13415                                         cat >> confdefs.h <<\EOF
13416 #define HAVE_ACL_GET_PERM_NP 1
13417 EOF
13418
13419                                 fi
13420                         fi
13421             ;;
13422         esac
13423         ;;
13424   *)
13425     echo "$ac_t""no" 1>&6
13426     cat >> confdefs.h <<\EOF
13427 #define HAVE_NO_ACLS 1
13428 EOF
13429
13430     ;;
13431   esac 
13432 else
13433   cat >> confdefs.h <<\EOF
13434 #define HAVE_NO_ACLS 1
13435 EOF
13436
13437   echo "$ac_t""no" 1>&6
13438
13439 fi
13440
13441
13442 #################################################
13443 # Check whether winbind is supported on this platform.  If so we need to
13444 # build and install client programs (WINBIND_TARGETS), sbin programs
13445 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13446
13447 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13448 echo "configure:13449: checking whether to build winbind" >&5
13449
13450 # Initially, the value of $host_os decides whether winbind is supported
13451
13452 case "$host_os" in 
13453         *linux*|*solaris*|*irix*)
13454                 HAVE_WINBIND=yes
13455                 ;;
13456         *)
13457                 HAVE_WINBIND=no
13458                 winbind_no_reason=", unsupported on $host_os"
13459                 ;;
13460 esac
13461
13462 # Check the setting of --with-winbindd
13463
13464 # Check whether --with-winbind or --without-winbind was given.
13465 if test "${with_winbind+set}" = set; then
13466   withval="$with_winbind"
13467    
13468   case "$withval" in
13469         yes)
13470                 HAVE_WINBIND=yes
13471                 ;;
13472         no)
13473                 HAVE_WINBIND=no
13474                 winbind_reason=""
13475                 ;;
13476   esac 
13477 fi
13478
13479
13480 # We need unix domain sockets for winbind
13481
13482 if test x"$HAVE_WINBIND" = x"yes"; then
13483         if test x"$samba_cv_unixsocket" = x"no"; then
13484                 winbind_no_reason=", no unix domain socket support on $host_os"
13485                 HAVE_WINBIND=no
13486         fi
13487 fi
13488
13489 # Display test results
13490
13491 WINBIND_TARGETS=""
13492 WINBIND_STARGETS=""
13493 WINBIND_LTARGETS=""
13494 WINBIND_PAM_PROGS=""
13495
13496 if test x"$HAVE_WINBIND" = x"yes"; then
13497         echo "$ac_t""yes" 1>&6
13498
13499         WINBIND_TARGETS="bin/wbinfo"
13500         WINBIND_STARGETS="bin/winbindd"
13501         if test x"$BLDSHARED" = x"true"; then
13502                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13503                 if test x"$with_pam" = x"yes"; then
13504                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13505                 fi
13506         fi
13507 else
13508         echo "$ac_t""no$winbind_no_reason" 1>&6
13509 fi
13510
13511 # Substitution time!
13512
13513
13514
13515
13516
13517
13518 #################################################
13519 # Check to see if we should use the included popt 
13520
13521 # Check whether --with-included-popt or --without-included-popt was given.
13522 if test "${with_included_popt+set}" = set; then
13523   withval="$with_included_popt"
13524    
13525   case "$withval" in
13526         yes)
13527                 INCLUDED_POPT=yes
13528                 ;;
13529         no)
13530                 INCLUDED_POPT=no
13531                 ;;
13532   esac 
13533 fi
13534
13535 if test x"$INCLUDED_POPT" != x"yes"; then
13536     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13537 echo "configure:13538: checking for poptGetContext in -lpopt" >&5
13538 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13539 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13540   echo $ac_n "(cached) $ac_c" 1>&6
13541 else
13542   ac_save_LIBS="$LIBS"
13543 LIBS="-lpopt  $LIBS"
13544 cat > conftest.$ac_ext <<EOF
13545 #line 13546 "configure"
13546 #include "confdefs.h"
13547 /* Override any gcc2 internal prototype to avoid an error.  */
13548 /* We use char because int might match the return type of a gcc2
13549     builtin and then its argument prototype would still apply.  */
13550 char poptGetContext();
13551
13552 int main() {
13553 poptGetContext()
13554 ; return 0; }
13555 EOF
13556 if { (eval echo configure:13557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13557   rm -rf conftest*
13558   eval "ac_cv_lib_$ac_lib_var=yes"
13559 else
13560   echo "configure: failed program was:" >&5
13561   cat conftest.$ac_ext >&5
13562   rm -rf conftest*
13563   eval "ac_cv_lib_$ac_lib_var=no"
13564 fi
13565 rm -f conftest*
13566 LIBS="$ac_save_LIBS"
13567
13568 fi
13569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13570   echo "$ac_t""yes" 1>&6
13571   INCLUDED_POPT=no
13572 else
13573   echo "$ac_t""no" 1>&6
13574 INCLUDED_POPT=yes
13575 fi
13576
13577 fi
13578
13579 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13580 echo "configure:13581: checking whether to use included popt" >&5
13581 if test x"$INCLUDED_POPT" = x"yes"; then
13582     echo "$ac_t""$srcdir/popt" 1>&6
13583     BUILD_POPT='$(POPT_OBJS)'
13584     FLAGS1="-I$srcdir/popt"
13585 else
13586     echo "$ac_t""no" 1>&6
13587     LIBS="$LIBS -lpopt"
13588 fi
13589
13590
13591
13592 #################################################
13593 # final configure stuff
13594
13595 echo "checking configure summary"
13596 if test "$cross_compiling" = yes; then
13597   :
13598 else
13599   cat > conftest.$ac_ext <<EOF
13600 #line 13601 "configure"
13601 #include "confdefs.h"
13602 #include "${srcdir-.}/tests/summary.c"
13603 EOF
13604 if { (eval echo configure:13605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13605 then
13606   echo "configure OK";
13607 else
13608   echo "configure: failed program was:" >&5
13609   cat conftest.$ac_ext >&5
13610   rm -fr conftest*
13611   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13612 fi
13613 rm -fr conftest*
13614 fi
13615
13616
13617 builddir=`pwd`
13618
13619
13620 trap '' 1 2 15
13621 cat > confcache <<\EOF
13622 # This file is a shell script that caches the results of configure
13623 # tests run on this system so they can be shared between configure
13624 # scripts and configure runs.  It is not useful on other systems.
13625 # If it contains results you don't want to keep, you may remove or edit it.
13626 #
13627 # By default, configure uses ./config.cache as the cache file,
13628 # creating it if it does not exist already.  You can give configure
13629 # the --cache-file=FILE option to use a different cache file; that is
13630 # what configure does when it calls configure scripts in
13631 # subdirectories, so they share the cache.
13632 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13633 # config.status only pays attention to the cache file if you give it the
13634 # --recheck option to rerun configure.
13635 #
13636 EOF
13637 # The following way of writing the cache mishandles newlines in values,
13638 # but we know of no workaround that is simple, portable, and efficient.
13639 # So, don't put newlines in cache variables' values.
13640 # Ultrix sh set writes to stderr and can't be redirected directly,
13641 # and sets the high bit in the cache file unless we assign to the vars.
13642 (set) 2>&1 |
13643   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13644   *ac_space=\ *)
13645     # `set' does not quote correctly, so add quotes (double-quote substitution
13646     # turns \\\\ into \\, and sed turns \\ into \).
13647     sed -n \
13648       -e "s/'/'\\\\''/g" \
13649       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13650     ;;
13651   *)
13652     # `set' quotes correctly as required by POSIX, so do not add quotes.
13653     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13654     ;;
13655   esac >> confcache
13656 if cmp -s $cache_file confcache; then
13657   :
13658 else
13659   if test -w $cache_file; then
13660     echo "updating cache $cache_file"
13661     cat confcache > $cache_file
13662   else
13663     echo "not updating unwritable cache $cache_file"
13664   fi
13665 fi
13666 rm -f confcache
13667
13668 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13669
13670 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13671 # Let make expand exec_prefix.
13672 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13673
13674 # Any assignment to VPATH causes Sun make to only execute
13675 # the first set of double-colon rules, so remove it if not needed.
13676 # If there is a colon in the path, we need to keep it.
13677 if test "x$srcdir" = x.; then
13678   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13679 fi
13680
13681 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13682
13683 DEFS=-DHAVE_CONFIG_H
13684
13685 # Without the "./", some shells look in PATH for config.status.
13686 : ${CONFIG_STATUS=./config.status}
13687
13688 echo creating $CONFIG_STATUS
13689 rm -f $CONFIG_STATUS
13690 cat > $CONFIG_STATUS <<EOF
13691 #! /bin/sh
13692 # Generated automatically by configure.
13693 # Run this file to recreate the current configuration.
13694 # This directory was configured as follows,
13695 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13696 #
13697 # $0 $ac_configure_args
13698 #
13699 # Compiler output produced by configure, useful for debugging
13700 # configure, is in ./config.log if it exists.
13701
13702 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13703 for ac_option
13704 do
13705   case "\$ac_option" in
13706   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13707     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13708     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13709   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13710     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13711     exit 0 ;;
13712   -help | --help | --hel | --he | --h)
13713     echo "\$ac_cs_usage"; exit 0 ;;
13714   *) echo "\$ac_cs_usage"; exit 1 ;;
13715   esac
13716 done
13717
13718 ac_given_srcdir=$srcdir
13719 ac_given_INSTALL="$INSTALL"
13720
13721 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13722 EOF
13723 cat >> $CONFIG_STATUS <<EOF
13724
13725 # Protect against being on the right side of a sed subst in config.status.
13726 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13727  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13728 $ac_vpsub
13729 $extrasub
13730 s%@SHELL@%$SHELL%g
13731 s%@CFLAGS@%$CFLAGS%g
13732 s%@CPPFLAGS@%$CPPFLAGS%g
13733 s%@CXXFLAGS@%$CXXFLAGS%g
13734 s%@FFLAGS@%$FFLAGS%g
13735 s%@DEFS@%$DEFS%g
13736 s%@LDFLAGS@%$LDFLAGS%g
13737 s%@LIBS@%$LIBS%g
13738 s%@exec_prefix@%$exec_prefix%g
13739 s%@prefix@%$prefix%g
13740 s%@program_transform_name@%$program_transform_name%g
13741 s%@bindir@%$bindir%g
13742 s%@sbindir@%$sbindir%g
13743 s%@libexecdir@%$libexecdir%g
13744 s%@datadir@%$datadir%g
13745 s%@sysconfdir@%$sysconfdir%g
13746 s%@sharedstatedir@%$sharedstatedir%g
13747 s%@localstatedir@%$localstatedir%g
13748 s%@libdir@%$libdir%g
13749 s%@includedir@%$includedir%g
13750 s%@oldincludedir@%$oldincludedir%g
13751 s%@infodir@%$infodir%g
13752 s%@mandir@%$mandir%g
13753 s%@RUNPROG@%$RUNPROG%g
13754 s%@MPROGS@%$MPROGS%g
13755 s%@LDSHFLAGS@%$LDSHFLAGS%g
13756 s%@SHLD@%$SHLD%g
13757 s%@HOST_OS@%$HOST_OS%g
13758 s%@PAM_MOD@%$PAM_MOD%g
13759 s%@WRAP@%$WRAP%g
13760 s%@WRAP32@%$WRAP32%g
13761 s%@PICFLAG@%$PICFLAG%g
13762 s%@PICSUFFIX@%$PICSUFFIX%g
13763 s%@POBAD_CC@%$POBAD_CC%g
13764 s%@SHLIBEXT@%$SHLIBEXT%g
13765 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13766 s%@CC@%$CC%g
13767 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13768 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13769 s%@INSTALL_DATA@%$INSTALL_DATA%g
13770 s%@AWK@%$AWK%g
13771 s%@BROKEN_CC@%$BROKEN_CC%g
13772 s%@host@%$host%g
13773 s%@host_alias@%$host_alias%g
13774 s%@host_cpu@%$host_cpu%g
13775 s%@host_vendor@%$host_vendor%g
13776 s%@host_os@%$host_os%g
13777 s%@target@%$target%g
13778 s%@target_alias@%$target_alias%g
13779 s%@target_cpu@%$target_cpu%g
13780 s%@target_vendor@%$target_vendor%g
13781 s%@target_os@%$target_os%g
13782 s%@build@%$build%g
13783 s%@build_alias@%$build_alias%g
13784 s%@build_cpu@%$build_cpu%g
13785 s%@build_vendor@%$build_vendor%g
13786 s%@build_os@%$build_os%g
13787 s%@CPP@%$CPP%g
13788 s%@LIBOBJS@%$LIBOBJS%g
13789 s%@TERMLIBS@%$TERMLIBS%g
13790 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13791 s%@ROFF@%$ROFF%g
13792 s%@QUOTAOBJS@%$QUOTAOBJS%g
13793 s%@privatedir@%$privatedir%g
13794 s%@lockdir@%$lockdir%g
13795 s%@swatdir@%$swatdir%g
13796 s%@manlangs@%$manlangs%g
13797 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13798 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13799 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13800 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13801 s%@BUILD_POPT@%$BUILD_POPT%g
13802 s%@FLAGS1@%$FLAGS1%g
13803 s%@builddir@%$builddir%g
13804
13805 CEOF
13806 EOF
13807
13808 cat >> $CONFIG_STATUS <<\EOF
13809
13810 # Split the substitutions into bite-sized pieces for seds with
13811 # small command number limits, like on Digital OSF/1 and HP-UX.
13812 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13813 ac_file=1 # Number of current file.
13814 ac_beg=1 # First line for current file.
13815 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13816 ac_more_lines=:
13817 ac_sed_cmds=""
13818 while $ac_more_lines; do
13819   if test $ac_beg -gt 1; then
13820     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13821   else
13822     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13823   fi
13824   if test ! -s conftest.s$ac_file; then
13825     ac_more_lines=false
13826     rm -f conftest.s$ac_file
13827   else
13828     if test -z "$ac_sed_cmds"; then
13829       ac_sed_cmds="sed -f conftest.s$ac_file"
13830     else
13831       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13832     fi
13833     ac_file=`expr $ac_file + 1`
13834     ac_beg=$ac_end
13835     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13836   fi
13837 done
13838 if test -z "$ac_sed_cmds"; then
13839   ac_sed_cmds=cat
13840 fi
13841 EOF
13842
13843 cat >> $CONFIG_STATUS <<EOF
13844
13845 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13846 EOF
13847 cat >> $CONFIG_STATUS <<\EOF
13848 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13849   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13850   case "$ac_file" in
13851   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13852        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13853   *) ac_file_in="${ac_file}.in" ;;
13854   esac
13855
13856   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13857
13858   # Remove last slash and all that follows it.  Not all systems have dirname.
13859   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13860   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13861     # The file is in a subdirectory.
13862     test ! -d "$ac_dir" && mkdir "$ac_dir"
13863     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13864     # A "../" for each directory in $ac_dir_suffix.
13865     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13866   else
13867     ac_dir_suffix= ac_dots=
13868   fi
13869
13870   case "$ac_given_srcdir" in
13871   .)  srcdir=.
13872       if test -z "$ac_dots"; then top_srcdir=.
13873       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13874   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13875   *) # Relative path.
13876     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13877     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13878   esac
13879
13880   case "$ac_given_INSTALL" in
13881   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13882   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13883   esac
13884
13885   echo creating "$ac_file"
13886   rm -f "$ac_file"
13887   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13888   case "$ac_file" in
13889   *Makefile*) ac_comsub="1i\\
13890 # $configure_input" ;;
13891   *) ac_comsub= ;;
13892   esac
13893
13894   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13895   sed -e "$ac_comsub
13896 s%@configure_input@%$configure_input%g
13897 s%@srcdir@%$srcdir%g
13898 s%@top_srcdir@%$top_srcdir%g
13899 s%@INSTALL@%$INSTALL%g
13900 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13901 fi; done
13902 rm -f conftest.s*
13903
13904 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13905 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13906 #
13907 # ac_d sets the value in "#define NAME VALUE" lines.
13908 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13909 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13910 ac_dC='\3'
13911 ac_dD='%g'
13912 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13913 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13914 ac_uB='\([      ]\)%\1#\2define\3'
13915 ac_uC=' '
13916 ac_uD='\4%g'
13917 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13918 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13919 ac_eB='$%\1#\2define\3'
13920 ac_eC=' '
13921 ac_eD='%g'
13922
13923 if test "${CONFIG_HEADERS+set}" != set; then
13924 EOF
13925 cat >> $CONFIG_STATUS <<EOF
13926   CONFIG_HEADERS="include/config.h"
13927 EOF
13928 cat >> $CONFIG_STATUS <<\EOF
13929 fi
13930 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13931   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13932   case "$ac_file" in
13933   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13934        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13935   *) ac_file_in="${ac_file}.in" ;;
13936   esac
13937
13938   echo creating $ac_file
13939
13940   rm -f conftest.frag conftest.in conftest.out
13941   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13942   cat $ac_file_inputs > conftest.in
13943
13944 EOF
13945
13946 # Transform confdefs.h into a sed script conftest.vals that substitutes
13947 # the proper values into config.h.in to produce config.h.  And first:
13948 # Protect against being on the right side of a sed subst in config.status.
13949 # Protect against being in an unquoted here document in config.status.
13950 rm -f conftest.vals
13951 cat > conftest.hdr <<\EOF
13952 s/[\\&%]/\\&/g
13953 s%[\\$`]%\\&%g
13954 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13955 s%ac_d%ac_u%gp
13956 s%ac_u%ac_e%gp
13957 EOF
13958 sed -n -f conftest.hdr confdefs.h > conftest.vals
13959 rm -f conftest.hdr
13960
13961 # This sed command replaces #undef with comments.  This is necessary, for
13962 # example, in the case of _POSIX_SOURCE, which is predefined and required
13963 # on some systems where configure will not decide to define it.
13964 cat >> conftest.vals <<\EOF
13965 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13966 EOF
13967
13968 # Break up conftest.vals because some shells have a limit on
13969 # the size of here documents, and old seds have small limits too.
13970
13971 rm -f conftest.tail
13972 while :
13973 do
13974   ac_lines=`grep -c . conftest.vals`
13975   # grep -c gives empty output for an empty file on some AIX systems.
13976   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13977   # Write a limited-size here document to conftest.frag.
13978   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13979   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13980   echo 'CEOF
13981   sed -f conftest.frag conftest.in > conftest.out
13982   rm -f conftest.in
13983   mv conftest.out conftest.in
13984 ' >> $CONFIG_STATUS
13985   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13986   rm -f conftest.vals
13987   mv conftest.tail conftest.vals
13988 done
13989 rm -f conftest.vals
13990
13991 cat >> $CONFIG_STATUS <<\EOF
13992   rm -f conftest.frag conftest.h
13993   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13994   cat conftest.in >> conftest.h
13995   rm -f conftest.in
13996   if cmp -s $ac_file conftest.h 2>/dev/null; then
13997     echo "$ac_file is unchanged"
13998     rm -f conftest.h
13999   else
14000     # Remove last slash and all that follows it.  Not all systems have dirname.
14001       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14002       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14003       # The file is in a subdirectory.
14004       test ! -d "$ac_dir" && mkdir "$ac_dir"
14005     fi
14006     rm -f $ac_file
14007     mv conftest.h $ac_file
14008   fi
14009 fi; done
14010
14011 EOF
14012 cat >> $CONFIG_STATUS <<EOF
14013
14014 EOF
14015 cat >> $CONFIG_STATUS <<\EOF
14016
14017 exit 0
14018 EOF
14019 chmod +x $CONFIG_STATUS
14020 rm -fr confdefs* $ac_clean_files
14021 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14022
14023
14024 #################################################
14025 # Print very concise instructions on building/use
14026 if test "x$enable_dmalloc" = xyes
14027 then
14028         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14029         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14030 fi