dded Microsoft Dfs services.
[tprouty/samba.git] / source / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-maintainer-mode enable some make rules for maintainers"
17 ac_help="$ac_help
18   --with-smbwrapper     Include SMB wrapper support
19   --without-smbwrapper  Don't include SMB wrapper support (default)"
20 ac_help="$ac_help
21   --with-afs     Include AFS support
22   --without-afs  Don't include AFS support (default)"
23 ac_help="$ac_help
24   --with-dfs     Include DFS support
25   --without-dfs  Don't include DFS support (default)"
26 ac_help="$ac_help
27   --with-krb4=base-dir     Include Kerberos IV support
28   --without-krb4          Don't include Kerbers IV support (default)"
29 ac_help="$ac_help
30   --with-krb5=base-dir     Include Kerberos 5 support
31   --without-krb5          Don't include Kerbers 5 support (default)"
32 ac_help="$ac_help
33   --with-automount     Include AUTOMOUNT support
34   --without-automount  Don't include AUTOMOUNT support (default)"
35 ac_help="$ac_help
36   --with-smbmount     Include SMBMOUNT (Linux only) support
37   --without-smbmount  Don't include SMBMOUNT support (default)"
38 ac_help="$ac_help
39   --with-pam     Include PAM password database support
40   --without-pam  Don't include PAM password database support (default)"
41 ac_help="$ac_help
42   --with-ldap     Include LDAP support
43   --without-ldap  Don't include LDAP support (default)"
44 ac_help="$ac_help
45   --with-nisplus     Include NISPLUS password database support
46   --without-nisplus  Don't include NISPLUS password database support (default)"
47 ac_help="$ac_help
48   --with-nisplus-home     Include NISPLUS_HOME support
49   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
50 ac_help="$ac_help
51   --with-ssl     Include SSL support
52   --without-ssl  Don't include SSL support (default)
53   --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl)"
54 ac_help="$ac_help
55   --with-syslog     Include experimental SYSLOG support
56   --without-syslog  Don't include SYSLOG support (default)"
57 ac_help="$ac_help
58   --with-profile     Include profile support
59   --without-profile  Don't include profile support (default)"
60 ac_help="$ac_help
61   --with-netatalk     Include experimental Netatalk support
62   --without-netatalk  Don't include experimental Netatalk support (default)"
63 ac_help="$ac_help
64   --with-quotas     Include experimental disk-quota support
65   --without-quotas  Don't include experimental disk-quota support (default)"
66 ac_help="$ac_help
67   --with-utmp     Include experimental utmp accounting
68   --without-utmp  Don't include experimental utmp accounting (default)"
69 ac_help="$ac_help
70   --with-msdfs          Include MS Dfs support
71   --without-msdfs       Don't include MS Dfs support (default)"
72 ac_help="$ac_help
73   --with-privatedir=DIR     Where to put smbpasswd ($ac_default_prefix/private)"
74 ac_help="$ac_help
75   --with-lockdir=DIR     Where to put lock files ($ac_default_prefix/var/locks)"
76 ac_help="$ac_help
77   --with-swatdir=DIR     Where to put SWAT files ($ac_default_prefix/swat)"
78
79 # Initialize some variables set by options.
80 # The variables have the same names as the options, with
81 # dashes changed to underlines.
82 build=NONE
83 cache_file=./config.cache
84 exec_prefix=NONE
85 host=NONE
86 no_create=
87 nonopt=NONE
88 no_recursion=
89 prefix=NONE
90 program_prefix=NONE
91 program_suffix=NONE
92 program_transform_name=s,x,x,
93 silent=
94 site=
95 srcdir=
96 target=NONE
97 verbose=
98 x_includes=NONE
99 x_libraries=NONE
100 bindir='${exec_prefix}/bin'
101 sbindir='${exec_prefix}/sbin'
102 libexecdir='${exec_prefix}/libexec'
103 datadir='${prefix}/share'
104 sysconfdir='${prefix}/etc'
105 sharedstatedir='${prefix}/com'
106 localstatedir='${prefix}/var'
107 libdir='${exec_prefix}/lib'
108 includedir='${prefix}/include'
109 oldincludedir='/usr/include'
110 infodir='${prefix}/info'
111 mandir='${prefix}/man'
112
113 # Initialize some other variables.
114 subdirs=
115 MFLAGS= MAKEFLAGS=
116 SHELL=${CONFIG_SHELL-/bin/sh}
117 # Maximum number of lines to put in a shell here document.
118 ac_max_here_lines=12
119
120 ac_prev=
121 for ac_option
122 do
123
124   # If the previous option needs an argument, assign it.
125   if test -n "$ac_prev"; then
126     eval "$ac_prev=\$ac_option"
127     ac_prev=
128     continue
129   fi
130
131   case "$ac_option" in
132   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
133   *) ac_optarg= ;;
134   esac
135
136   # Accept the important Cygnus configure options, so we can diagnose typos.
137
138   case "$ac_option" in
139
140   -bindir | --bindir | --bindi | --bind | --bin | --bi)
141     ac_prev=bindir ;;
142   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
143     bindir="$ac_optarg" ;;
144
145   -build | --build | --buil | --bui | --bu)
146     ac_prev=build ;;
147   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
148     build="$ac_optarg" ;;
149
150   -cache-file | --cache-file | --cache-fil | --cache-fi \
151   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
152     ac_prev=cache_file ;;
153   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
154   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
155     cache_file="$ac_optarg" ;;
156
157   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
158     ac_prev=datadir ;;
159   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
160   | --da=*)
161     datadir="$ac_optarg" ;;
162
163   -disable-* | --disable-*)
164     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
165     # Reject names that are not valid shell variable names.
166     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
167       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
168     fi
169     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
170     eval "enable_${ac_feature}=no" ;;
171
172   -enable-* | --enable-*)
173     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
174     # Reject names that are not valid shell variable names.
175     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
176       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
177     fi
178     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
179     case "$ac_option" in
180       *=*) ;;
181       *) ac_optarg=yes ;;
182     esac
183     eval "enable_${ac_feature}='$ac_optarg'" ;;
184
185   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
186   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
187   | --exec | --exe | --ex)
188     ac_prev=exec_prefix ;;
189   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
190   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
191   | --exec=* | --exe=* | --ex=*)
192     exec_prefix="$ac_optarg" ;;
193
194   -gas | --gas | --ga | --g)
195     # Obsolete; use --with-gas.
196     with_gas=yes ;;
197
198   -help | --help | --hel | --he)
199     # Omit some internal or obsolete options to make the list less imposing.
200     # This message is too long to be a string in the A/UX 3.1 sh.
201     cat << EOF
202 Usage: configure [options] [host]
203 Options: [defaults in brackets after descriptions]
204 Configuration:
205   --cache-file=FILE       cache test results in FILE
206   --help                  print this message
207   --no-create             do not create output files
208   --quiet, --silent       do not print \`checking...' messages
209   --version               print the version of autoconf that created configure
210 Directory and file names:
211   --prefix=PREFIX         install architecture-independent files in PREFIX
212                           [$ac_default_prefix]
213   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
214                           [same as prefix]
215   --bindir=DIR            user executables in DIR [EPREFIX/bin]
216   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
217   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
218   --datadir=DIR           read-only architecture-independent data in DIR
219                           [PREFIX/share]
220   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
221   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
222                           [PREFIX/com]
223   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
224   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
225   --includedir=DIR        C header files in DIR [PREFIX/include]
226   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
227   --infodir=DIR           info documentation in DIR [PREFIX/info]
228   --mandir=DIR            man documentation in DIR [PREFIX/man]
229   --srcdir=DIR            find the sources in DIR [configure dir or ..]
230   --program-prefix=PREFIX prepend PREFIX to installed program names
231   --program-suffix=SUFFIX append SUFFIX to installed program names
232   --program-transform-name=PROGRAM
233                           run sed PROGRAM on installed program names
234 EOF
235     cat << EOF
236 Host type:
237   --build=BUILD           configure for building on BUILD [BUILD=HOST]
238   --host=HOST             configure for HOST [guessed]
239   --target=TARGET         configure for TARGET [TARGET=HOST]
240 Features and packages:
241   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
242   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
243   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
244   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
245   --x-includes=DIR        X include files are in DIR
246   --x-libraries=DIR       X library files are in DIR
247 EOF
248     if test -n "$ac_help"; then
249       echo "--enable and --with options recognized:$ac_help"
250     fi
251     exit 0 ;;
252
253   -host | --host | --hos | --ho)
254     ac_prev=host ;;
255   -host=* | --host=* | --hos=* | --ho=*)
256     host="$ac_optarg" ;;
257
258   -includedir | --includedir | --includedi | --included | --include \
259   | --includ | --inclu | --incl | --inc)
260     ac_prev=includedir ;;
261   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
262   | --includ=* | --inclu=* | --incl=* | --inc=*)
263     includedir="$ac_optarg" ;;
264
265   -infodir | --infodir | --infodi | --infod | --info | --inf)
266     ac_prev=infodir ;;
267   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
268     infodir="$ac_optarg" ;;
269
270   -libdir | --libdir | --libdi | --libd)
271     ac_prev=libdir ;;
272   -libdir=* | --libdir=* | --libdi=* | --libd=*)
273     libdir="$ac_optarg" ;;
274
275   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
276   | --libexe | --libex | --libe)
277     ac_prev=libexecdir ;;
278   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
279   | --libexe=* | --libex=* | --libe=*)
280     libexecdir="$ac_optarg" ;;
281
282   -localstatedir | --localstatedir | --localstatedi | --localstated \
283   | --localstate | --localstat | --localsta | --localst \
284   | --locals | --local | --loca | --loc | --lo)
285     ac_prev=localstatedir ;;
286   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
287   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
288   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
289     localstatedir="$ac_optarg" ;;
290
291   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
292     ac_prev=mandir ;;
293   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
294     mandir="$ac_optarg" ;;
295
296   -nfp | --nfp | --nf)
297     # Obsolete; use --without-fp.
298     with_fp=no ;;
299
300   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
301   | --no-cr | --no-c)
302     no_create=yes ;;
303
304   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
305   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
306     no_recursion=yes ;;
307
308   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
309   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
310   | --oldin | --oldi | --old | --ol | --o)
311     ac_prev=oldincludedir ;;
312   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
313   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
314   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
315     oldincludedir="$ac_optarg" ;;
316
317   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
318     ac_prev=prefix ;;
319   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
320     prefix="$ac_optarg" ;;
321
322   -program-prefix | --program-prefix | --program-prefi | --program-pref \
323   | --program-pre | --program-pr | --program-p)
324     ac_prev=program_prefix ;;
325   -program-prefix=* | --program-prefix=* | --program-prefi=* \
326   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
327     program_prefix="$ac_optarg" ;;
328
329   -program-suffix | --program-suffix | --program-suffi | --program-suff \
330   | --program-suf | --program-su | --program-s)
331     ac_prev=program_suffix ;;
332   -program-suffix=* | --program-suffix=* | --program-suffi=* \
333   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
334     program_suffix="$ac_optarg" ;;
335
336   -program-transform-name | --program-transform-name \
337   | --program-transform-nam | --program-transform-na \
338   | --program-transform-n | --program-transform- \
339   | --program-transform | --program-transfor \
340   | --program-transfo | --program-transf \
341   | --program-trans | --program-tran \
342   | --progr-tra | --program-tr | --program-t)
343     ac_prev=program_transform_name ;;
344   -program-transform-name=* | --program-transform-name=* \
345   | --program-transform-nam=* | --program-transform-na=* \
346   | --program-transform-n=* | --program-transform-=* \
347   | --program-transform=* | --program-transfor=* \
348   | --program-transfo=* | --program-transf=* \
349   | --program-trans=* | --program-tran=* \
350   | --progr-tra=* | --program-tr=* | --program-t=*)
351     program_transform_name="$ac_optarg" ;;
352
353   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
354   | -silent | --silent | --silen | --sile | --sil)
355     silent=yes ;;
356
357   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
358     ac_prev=sbindir ;;
359   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
360   | --sbi=* | --sb=*)
361     sbindir="$ac_optarg" ;;
362
363   -sharedstatedir | --sharedstatedir | --sharedstatedi \
364   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
365   | --sharedst | --shareds | --shared | --share | --shar \
366   | --sha | --sh)
367     ac_prev=sharedstatedir ;;
368   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
369   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
370   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
371   | --sha=* | --sh=*)
372     sharedstatedir="$ac_optarg" ;;
373
374   -site | --site | --sit)
375     ac_prev=site ;;
376   -site=* | --site=* | --sit=*)
377     site="$ac_optarg" ;;
378
379   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
380     ac_prev=srcdir ;;
381   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
382     srcdir="$ac_optarg" ;;
383
384   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
385   | --syscon | --sysco | --sysc | --sys | --sy)
386     ac_prev=sysconfdir ;;
387   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
388   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
389     sysconfdir="$ac_optarg" ;;
390
391   -target | --target | --targe | --targ | --tar | --ta | --t)
392     ac_prev=target ;;
393   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
394     target="$ac_optarg" ;;
395
396   -v | -verbose | --verbose | --verbos | --verbo | --verb)
397     verbose=yes ;;
398
399   -version | --version | --versio | --versi | --vers)
400     echo "configure generated by autoconf version 2.13"
401     exit 0 ;;
402
403   -with-* | --with-*)
404     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
405     # Reject names that are not valid shell variable names.
406     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
407       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
408     fi
409     ac_package=`echo $ac_package| sed 's/-/_/g'`
410     case "$ac_option" in
411       *=*) ;;
412       *) ac_optarg=yes ;;
413     esac
414     eval "with_${ac_package}='$ac_optarg'" ;;
415
416   -without-* | --without-*)
417     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
418     # Reject names that are not valid shell variable names.
419     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
420       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
421     fi
422     ac_package=`echo $ac_package| sed 's/-/_/g'`
423     eval "with_${ac_package}=no" ;;
424
425   --x)
426     # Obsolete; use --with-x.
427     with_x=yes ;;
428
429   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
430   | --x-incl | --x-inc | --x-in | --x-i)
431     ac_prev=x_includes ;;
432   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
433   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
434     x_includes="$ac_optarg" ;;
435
436   -x-libraries | --x-libraries | --x-librarie | --x-librari \
437   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
438     ac_prev=x_libraries ;;
439   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
440   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
441     x_libraries="$ac_optarg" ;;
442
443   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
444     ;;
445
446   *)
447     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
448       echo "configure: warning: $ac_option: invalid host type" 1>&2
449     fi
450     if test "x$nonopt" != xNONE; then
451       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
452     fi
453     nonopt="$ac_option"
454     ;;
455
456   esac
457 done
458
459 if test -n "$ac_prev"; then
460   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
461 fi
462
463 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
464
465 # File descriptor usage:
466 # 0 standard input
467 # 1 file creation
468 # 2 errors and warnings
469 # 3 some systems may open it to /dev/tty
470 # 4 used on the Kubota Titan
471 # 6 checking for... messages and results
472 # 5 compiler messages saved in config.log
473 if test "$silent" = yes; then
474   exec 6>/dev/null
475 else
476   exec 6>&1
477 fi
478 exec 5>./config.log
479
480 echo "\
481 This file contains any messages produced by compilers while
482 running configure, to aid debugging if configure makes a mistake.
483 " 1>&5
484
485 # Strip out --no-create and --no-recursion so they do not pile up.
486 # Also quote any args containing shell metacharacters.
487 ac_configure_args=
488 for ac_arg
489 do
490   case "$ac_arg" in
491   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
492   | --no-cr | --no-c) ;;
493   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
495   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
496   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
497   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
498   esac
499 done
500
501 # NLS nuisances.
502 # Only set these to C if already set.  These must not be set unconditionally
503 # because not all systems understand e.g. LANG=C (notably SCO).
504 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
505 # Non-C LC_CTYPE values break the ctype check.
506 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
507 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
508 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
509 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
510
511 # confdefs.h avoids OS command line length limits that DEFS can exceed.
512 rm -rf conftest* confdefs.h
513 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
514 echo > confdefs.h
515
516 # A filename unique to this package, relative to the directory that
517 # configure is in, which we can look for to find out if srcdir is correct.
518 ac_unique_file=include/includes.h
519
520 # Find the source files, if location was not specified.
521 if test -z "$srcdir"; then
522   ac_srcdir_defaulted=yes
523   # Try the directory containing this script, then its parent.
524   ac_prog=$0
525   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
526   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
527   srcdir=$ac_confdir
528   if test ! -r $srcdir/$ac_unique_file; then
529     srcdir=..
530   fi
531 else
532   ac_srcdir_defaulted=no
533 fi
534 if test ! -r $srcdir/$ac_unique_file; then
535   if test "$ac_srcdir_defaulted" = yes; then
536     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
537   else
538     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
539   fi
540 fi
541 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
542
543 # Prefer explicitly selected file to automatically selected ones.
544 if test -z "$CONFIG_SITE"; then
545   if test "x$prefix" != xNONE; then
546     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
547   else
548     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
549   fi
550 fi
551 for ac_site_file in $CONFIG_SITE; do
552   if test -r "$ac_site_file"; then
553     echo "loading site script $ac_site_file"
554     . "$ac_site_file"
555   fi
556 done
557
558 if test -r "$cache_file"; then
559   echo "loading cache $cache_file"
560   . $cache_file
561 else
562   echo "creating cache $cache_file"
563   > $cache_file
564 fi
565
566 ac_ext=c
567 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
568 ac_cpp='$CPP $CPPFLAGS'
569 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
570 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
571 cross_compiling=$ac_cv_prog_cc_cross
572
573 ac_exeext=
574 ac_objext=o
575 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
576   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
577   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
578     ac_n= ac_c='
579 ' ac_t='        '
580   else
581     ac_n=-n ac_c= ac_t=
582   fi
583 else
584   ac_n= ac_c='\c' ac_t=
585 fi
586
587
588
589 # we want to be compatibe with older versions of Samba
590
591
592
593
594
595
596
597
598
599
600
601
602 # compile with optimisation and without debugging by default
603 CFLAGS=${CFLAGS-"-O"}
604
605 # Extract the first word of "gcc", so it can be a program name with args.
606 set dummy gcc; ac_word=$2
607 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
608 echo "configure:609: checking for $ac_word" >&5
609 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
610   echo $ac_n "(cached) $ac_c" 1>&6
611 else
612   if test -n "$CC"; then
613   ac_cv_prog_CC="$CC" # Let the user override the test.
614 else
615   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
616   ac_dummy="$PATH"
617   for ac_dir in $ac_dummy; do
618     test -z "$ac_dir" && ac_dir=.
619     if test -f $ac_dir/$ac_word; then
620       ac_cv_prog_CC="gcc"
621       break
622     fi
623   done
624   IFS="$ac_save_ifs"
625 fi
626 fi
627 CC="$ac_cv_prog_CC"
628 if test -n "$CC"; then
629   echo "$ac_t""$CC" 1>&6
630 else
631   echo "$ac_t""no" 1>&6
632 fi
633
634 if test -z "$CC"; then
635   # Extract the first word of "cc", so it can be a program name with args.
636 set dummy cc; ac_word=$2
637 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
638 echo "configure:639: checking for $ac_word" >&5
639 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
640   echo $ac_n "(cached) $ac_c" 1>&6
641 else
642   if test -n "$CC"; then
643   ac_cv_prog_CC="$CC" # Let the user override the test.
644 else
645   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
646   ac_prog_rejected=no
647   ac_dummy="$PATH"
648   for ac_dir in $ac_dummy; do
649     test -z "$ac_dir" && ac_dir=.
650     if test -f $ac_dir/$ac_word; then
651       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
652         ac_prog_rejected=yes
653         continue
654       fi
655       ac_cv_prog_CC="cc"
656       break
657     fi
658   done
659   IFS="$ac_save_ifs"
660 if test $ac_prog_rejected = yes; then
661   # We found a bogon in the path, so make sure we never use it.
662   set dummy $ac_cv_prog_CC
663   shift
664   if test $# -gt 0; then
665     # We chose a different compiler from the bogus one.
666     # However, it has the same basename, so the bogon will be chosen
667     # first if we set CC to just the basename; use the full file name.
668     shift
669     set dummy "$ac_dir/$ac_word" "$@"
670     shift
671     ac_cv_prog_CC="$@"
672   fi
673 fi
674 fi
675 fi
676 CC="$ac_cv_prog_CC"
677 if test -n "$CC"; then
678   echo "$ac_t""$CC" 1>&6
679 else
680   echo "$ac_t""no" 1>&6
681 fi
682
683   if test -z "$CC"; then
684     case "`uname -s`" in
685     *win32* | *WIN32*)
686       # Extract the first word of "cl", so it can be a program name with args.
687 set dummy cl; ac_word=$2
688 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
689 echo "configure:690: checking for $ac_word" >&5
690 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
691   echo $ac_n "(cached) $ac_c" 1>&6
692 else
693   if test -n "$CC"; then
694   ac_cv_prog_CC="$CC" # Let the user override the test.
695 else
696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
697   ac_dummy="$PATH"
698   for ac_dir in $ac_dummy; do
699     test -z "$ac_dir" && ac_dir=.
700     if test -f $ac_dir/$ac_word; then
701       ac_cv_prog_CC="cl"
702       break
703     fi
704   done
705   IFS="$ac_save_ifs"
706 fi
707 fi
708 CC="$ac_cv_prog_CC"
709 if test -n "$CC"; then
710   echo "$ac_t""$CC" 1>&6
711 else
712   echo "$ac_t""no" 1>&6
713 fi
714  ;;
715     esac
716   fi
717   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
718 fi
719
720 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
721 echo "configure:722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
722
723 ac_ext=c
724 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
725 ac_cpp='$CPP $CPPFLAGS'
726 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
727 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
728 cross_compiling=$ac_cv_prog_cc_cross
729
730 cat > conftest.$ac_ext << EOF
731
732 #line 733 "configure"
733 #include "confdefs.h"
734
735 main(){return(0);}
736 EOF
737 if { (eval echo configure:738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
738   ac_cv_prog_cc_works=yes
739   # If we can't run a trivial program, we are probably using a cross compiler.
740   if (./conftest; exit) 2>/dev/null; then
741     ac_cv_prog_cc_cross=no
742   else
743     ac_cv_prog_cc_cross=yes
744   fi
745 else
746   echo "configure: failed program was:" >&5
747   cat conftest.$ac_ext >&5
748   ac_cv_prog_cc_works=no
749 fi
750 rm -fr conftest*
751 ac_ext=c
752 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
753 ac_cpp='$CPP $CPPFLAGS'
754 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
755 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
756 cross_compiling=$ac_cv_prog_cc_cross
757
758 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
759 if test $ac_cv_prog_cc_works = no; then
760   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
761 fi
762 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
763 echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
764 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
765 cross_compiling=$ac_cv_prog_cc_cross
766
767 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
768 echo "configure:769: checking whether we are using GNU C" >&5
769 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
770   echo $ac_n "(cached) $ac_c" 1>&6
771 else
772   cat > conftest.c <<EOF
773 #ifdef __GNUC__
774   yes;
775 #endif
776 EOF
777 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
778   ac_cv_prog_gcc=yes
779 else
780   ac_cv_prog_gcc=no
781 fi
782 fi
783
784 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
785
786 if test $ac_cv_prog_gcc = yes; then
787   GCC=yes
788 else
789   GCC=
790 fi
791
792 ac_test_CFLAGS="${CFLAGS+set}"
793 ac_save_CFLAGS="$CFLAGS"
794 CFLAGS=
795 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
796 echo "configure:797: checking whether ${CC-cc} accepts -g" >&5
797 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
798   echo $ac_n "(cached) $ac_c" 1>&6
799 else
800   echo 'void f(){}' > conftest.c
801 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
802   ac_cv_prog_cc_g=yes
803 else
804   ac_cv_prog_cc_g=no
805 fi
806 rm -f conftest*
807
808 fi
809
810 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
811 if test "$ac_test_CFLAGS" = set; then
812   CFLAGS="$ac_save_CFLAGS"
813 elif test $ac_cv_prog_cc_g = yes; then
814   if test "$GCC" = yes; then
815     CFLAGS="-g -O2"
816   else
817     CFLAGS="-g"
818   fi
819 else
820   if test "$GCC" = yes; then
821     CFLAGS="-O2"
822   else
823     CFLAGS=
824   fi
825 fi
826
827 ac_aux_dir=
828 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
829   if test -f $ac_dir/install-sh; then
830     ac_aux_dir=$ac_dir
831     ac_install_sh="$ac_aux_dir/install-sh -c"
832     break
833   elif test -f $ac_dir/install.sh; then
834     ac_aux_dir=$ac_dir
835     ac_install_sh="$ac_aux_dir/install.sh -c"
836     break
837   fi
838 done
839 if test -z "$ac_aux_dir"; then
840   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
841 fi
842 ac_config_guess=$ac_aux_dir/config.guess
843 ac_config_sub=$ac_aux_dir/config.sub
844 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
845
846 # Find a good install program.  We prefer a C program (faster),
847 # so one script is as good as another.  But avoid the broken or
848 # incompatible versions:
849 # SysV /etc/install, /usr/sbin/install
850 # SunOS /usr/etc/install
851 # IRIX /sbin/install
852 # AIX /bin/install
853 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
854 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
855 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
856 # ./install, which can be erroneously created by make from ./install.sh.
857 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
858 echo "configure:859: checking for a BSD compatible install" >&5
859 if test -z "$INSTALL"; then
860 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
861   echo $ac_n "(cached) $ac_c" 1>&6
862 else
863     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
864   for ac_dir in $PATH; do
865     # Account for people who put trailing slashes in PATH elements.
866     case "$ac_dir/" in
867     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
868     *)
869       # OSF1 and SCO ODT 3.0 have their own names for install.
870       # Don't use installbsd from OSF since it installs stuff as root
871       # by default.
872       for ac_prog in ginstall scoinst install; do
873         if test -f $ac_dir/$ac_prog; then
874           if test $ac_prog = install &&
875             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
876             # AIX install.  It has an incompatible calling convention.
877             :
878           else
879             ac_cv_path_install="$ac_dir/$ac_prog -c"
880             break 2
881           fi
882         fi
883       done
884       ;;
885     esac
886   done
887   IFS="$ac_save_IFS"
888
889 fi
890   if test "${ac_cv_path_install+set}" = set; then
891     INSTALL="$ac_cv_path_install"
892   else
893     # As a last resort, use the slow shell script.  We don't cache a
894     # path for INSTALL within a source directory, because that will
895     # break other packages using the cache if that directory is
896     # removed, or if the path is relative.
897     INSTALL="$ac_install_sh"
898   fi
899 fi
900 echo "$ac_t""$INSTALL" 1>&6
901
902 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
903 # It thinks the first close brace ends the variable substitution.
904 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
905
906 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
907
908 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
909
910 for ac_prog in mawk gawk nawk awk
911 do
912 # Extract the first word of "$ac_prog", so it can be a program name with args.
913 set dummy $ac_prog; ac_word=$2
914 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
915 echo "configure:916: checking for $ac_word" >&5
916 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
917   echo $ac_n "(cached) $ac_c" 1>&6
918 else
919   if test -n "$AWK"; then
920   ac_cv_prog_AWK="$AWK" # Let the user override the test.
921 else
922   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
923   ac_dummy="$PATH"
924   for ac_dir in $ac_dummy; do
925     test -z "$ac_dir" && ac_dir=.
926     if test -f $ac_dir/$ac_word; then
927       ac_cv_prog_AWK="$ac_prog"
928       break
929     fi
930   done
931   IFS="$ac_save_ifs"
932 fi
933 fi
934 AWK="$ac_cv_prog_AWK"
935 if test -n "$AWK"; then
936   echo "$ac_t""$AWK" 1>&6
937 else
938   echo "$ac_t""no" 1>&6
939 fi
940
941 test -n "$AWK" && break
942 done
943
944
945 if test "x$CC" != xcc; then
946   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
947 echo "configure:948: checking whether $CC and cc understand -c and -o together" >&5
948 else
949   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
950 echo "configure:951: checking whether cc understands -c and -o together" >&5
951 fi
952 set dummy $CC; ac_cc="`echo $2 |
953                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
954 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
955   echo $ac_n "(cached) $ac_c" 1>&6
956 else
957   echo 'foo(){}' > conftest.c
958 # Make sure it works both with $CC and with simple cc.
959 # We do the test twice because some compilers refuse to overwrite an
960 # existing .o file with -o, though they will create one.
961 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
962 if { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
963    test -f conftest.o && { (eval echo configure:964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
964 then
965   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
966   if test "x$CC" != xcc; then
967     # Test first that cc exists at all.
968     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
969       ac_try='cc -c conftest.c -o conftest.o 1>&5'
970       if { (eval echo configure:971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
971          test -f conftest.o && { (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
972       then
973         # cc works too.
974         :
975       else
976         # cc exists but doesn't like -o.
977         eval ac_cv_prog_cc_${ac_cc}_c_o=no
978       fi
979     fi
980   fi
981 else
982   eval ac_cv_prog_cc_${ac_cc}_c_o=no
983 fi
984 rm -f conftest*
985
986 fi
987 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
988   echo "$ac_t""yes" 1>&6
989 else
990   echo "$ac_t""no" 1>&6
991   cat >> confdefs.h <<\EOF
992 #define NO_MINUS_C_MINUS_O 1
993 EOF
994
995 fi
996
997 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
998       BROKEN_CC=
999 else
1000       BROKEN_CC=#
1001 fi
1002
1003
1004 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1005 echo "configure:1006: checking that the C compiler understands volatile" >&5
1006 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1007   echo $ac_n "(cached) $ac_c" 1>&6
1008 else
1009   
1010     cat > conftest.$ac_ext <<EOF
1011 #line 1012 "configure"
1012 #include "confdefs.h"
1013 #include <sys/types.h>
1014 int main() {
1015 volatile int i = 0
1016 ; return 0; }
1017 EOF
1018 if { (eval echo configure:1019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1019   rm -rf conftest*
1020   samba_cv_volatile=yes
1021 else
1022   echo "configure: failed program was:" >&5
1023   cat conftest.$ac_ext >&5
1024   rm -rf conftest*
1025   samba_cv_volatile=no
1026 fi
1027 rm -f conftest*
1028 fi
1029
1030 echo "$ac_t""$samba_cv_volatile" 1>&6
1031 if test x"$samba_cv_volatile" = x"yes"; then
1032    cat >> confdefs.h <<\EOF
1033 #define HAVE_VOLATILE 1
1034 EOF
1035
1036 fi
1037
1038
1039
1040
1041 # Do some error checking and defaulting for the host and target type.
1042 # The inputs are:
1043 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1044 #
1045 # The rules are:
1046 # 1. You are not allowed to specify --host, --target, and nonopt at the
1047 #    same time.
1048 # 2. Host defaults to nonopt.
1049 # 3. If nonopt is not specified, then host defaults to the current host,
1050 #    as determined by config.guess.
1051 # 4. Target and build default to nonopt.
1052 # 5. If nonopt is not specified, then target and build default to host.
1053
1054 # The aliases save the names the user supplied, while $host etc.
1055 # will get canonicalized.
1056 case $host---$target---$nonopt in
1057 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1058 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1059 esac
1060
1061
1062 # Make sure we can run config.sub.
1063 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1064 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1065 fi
1066
1067 echo $ac_n "checking host system type""... $ac_c" 1>&6
1068 echo "configure:1069: checking host system type" >&5
1069
1070 host_alias=$host
1071 case "$host_alias" in
1072 NONE)
1073   case $nonopt in
1074   NONE)
1075     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1076     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1077     fi ;;
1078   *) host_alias=$nonopt ;;
1079   esac ;;
1080 esac
1081
1082 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1083 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1084 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1085 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1086 echo "$ac_t""$host" 1>&6
1087
1088 echo $ac_n "checking target system type""... $ac_c" 1>&6
1089 echo "configure:1090: checking target system type" >&5
1090
1091 target_alias=$target
1092 case "$target_alias" in
1093 NONE)
1094   case $nonopt in
1095   NONE) target_alias=$host_alias ;;
1096   *) target_alias=$nonopt ;;
1097   esac ;;
1098 esac
1099
1100 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1101 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1102 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1103 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1104 echo "$ac_t""$target" 1>&6
1105
1106 echo $ac_n "checking build system type""... $ac_c" 1>&6
1107 echo "configure:1108: checking build system type" >&5
1108
1109 build_alias=$build
1110 case "$build_alias" in
1111 NONE)
1112   case $nonopt in
1113   NONE) build_alias=$host_alias ;;
1114   *) build_alias=$nonopt ;;
1115   esac ;;
1116 esac
1117
1118 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1119 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1120 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1121 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1122 echo "$ac_t""$build" 1>&6
1123
1124 test "$host_alias" != "$target_alias" &&
1125   test "$program_prefix$program_suffix$program_transform_name" = \
1126     NONENONEs,x,x, &&
1127   program_prefix=${target_alias}-
1128
1129
1130     
1131     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1132 echo "configure:1133: checking config.cache system type" >&5
1133     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1134          test x"$ac_cv_host_system_type" != x"$host"; } ||
1135        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1136          test x"$ac_cv_build_system_type" != x"$build"; } ||
1137        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1138          test x"$ac_cv_target_system_type" != x"$target"; }; then
1139         echo "$ac_t""different" 1>&6
1140         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1141     else
1142         echo "$ac_t""same" 1>&6
1143     fi
1144     ac_cv_host_system_type="$host"
1145     ac_cv_build_system_type="$build"
1146     ac_cv_target_system_type="$target"
1147
1148
1149   # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1150 if test "${enable_maintainer_mode+set}" = set; then
1151   enableval="$enable_maintainer_mode"
1152   maint_mode=$enableval
1153 else
1154   maint_mode=no
1155 fi
1156
1157   if test x"$maint_mode" = x"yes"; then MAINT=; else MAINT='#'; fi
1158   
1159   # Extract the first word of "autoconf", so it can be a program name with args.
1160 set dummy autoconf; ac_word=$2
1161 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1162 echo "configure:1163: checking for $ac_word" >&5
1163 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
1164   echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166   case "$AUTOCONF" in
1167   /*)
1168   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
1169   ;;
1170   ?:/*)                  
1171   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a dos path.
1172   ;;
1173   *)
1174   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1175   ac_dummy="$PATH"
1176   for ac_dir in $ac_dummy; do 
1177     test -z "$ac_dir" && ac_dir=.
1178     if test -f $ac_dir/$ac_word; then
1179       ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
1180       break
1181     fi
1182   done
1183   IFS="$ac_save_ifs"
1184   test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF="autoconf"
1185   ;;
1186 esac
1187 fi
1188 AUTOCONF="$ac_cv_path_AUTOCONF"
1189 if test -n "$AUTOCONF"; then
1190   echo "$ac_t""$AUTOCONF" 1>&6
1191 else
1192   echo "$ac_t""no" 1>&6
1193 fi
1194
1195   
1196   # Extract the first word of "autoheader", so it can be a program name with args.
1197 set dummy autoheader; ac_word=$2
1198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1199 echo "configure:1200: checking for $ac_word" >&5
1200 if eval "test \"`echo '$''{'ac_cv_path_AUTOHEADER'+set}'`\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   case "$AUTOHEADER" in
1204   /*)
1205   ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path.
1206   ;;
1207   ?:/*)                  
1208   ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a dos path.
1209   ;;
1210   *)
1211   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1212   ac_dummy="$PATH"
1213   for ac_dir in $ac_dummy; do 
1214     test -z "$ac_dir" && ac_dir=.
1215     if test -f $ac_dir/$ac_word; then
1216       ac_cv_path_AUTOHEADER="$ac_dir/$ac_word"
1217       break
1218     fi
1219   done
1220   IFS="$ac_save_ifs"
1221   test -z "$ac_cv_path_AUTOHEADER" && ac_cv_path_AUTOHEADER="autoheader"
1222   ;;
1223 esac
1224 fi
1225 AUTOHEADER="$ac_cv_path_AUTOHEADER"
1226 if test -n "$AUTOHEADER"; then
1227   echo "$ac_t""$AUTOHEADER" 1>&6
1228 else
1229   echo "$ac_t""no" 1>&6
1230 fi
1231
1232   
1233
1234
1235 #
1236 # Config CPPFLAG settings for strange OS's that must be set
1237 # before other tests.
1238 #
1239 case "$host_os" in
1240 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1241     *hpux*)
1242       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1243 echo "configure:1244: checking whether ${CC-cc} accepts -Ae" >&5
1244 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1245   echo $ac_n "(cached) $ac_c" 1>&6
1246 else
1247   echo 'void f(){}' > conftest.c
1248 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1249   ac_cv_prog_cc_Ae=yes
1250 else
1251   ac_cv_prog_cc_Ae=no
1252 fi
1253 rm -f conftest*
1254
1255 fi
1256
1257 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1258       if test $ac_cv_prog_cc_Ae = yes; then
1259         CPPFLAGS="$CPPFLAGS -Ae"
1260       fi
1261 #
1262 # Defines needed for HPUX support.
1263 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1264 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1265 #
1266       case `uname -r` in
1267                         *9*|*10*)
1268                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1269                                 cat >> confdefs.h <<\EOF
1270 #define USE_BOTH_CRYPT_CALLS 1
1271 EOF
1272
1273                                 ;;
1274                         *11*)
1275                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1276                                 cat >> confdefs.h <<\EOF
1277 #define USE_BOTH_CRYPT_CALLS 1
1278 EOF
1279
1280                                 ;;
1281       esac
1282       ;;
1283 #
1284 # AIX4.x doesn't even admit to having large
1285 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1286 #
1287     *aix4*)
1288           echo "$ac_t""enabling large file support" 1>&6
1289       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1290       ;;    
1291 #
1292 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1293 # to the existance of large files..
1294 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1295 # recommendations on large file support, however it makes the
1296 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1297 # recommendation makes the compile fail on gcc2.7. JRA.
1298 #
1299         *solaris*)
1300                 case `uname -r` in
1301                         5.6*|5.7*)
1302                         echo "$ac_t""enabling large file support" 1>&6
1303                         if test "$ac_cv_prog_gcc" = yes; then
1304                                 ${CC-cc} -v >conftest.c 2>&1
1305                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1306                                 rm -fr conftest.c
1307                                 case "$ac_cv_gcc_compiler_version_number" in
1308                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1309                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1310                                                 ;;
1311                                         *)
1312                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1313                                                 ;;
1314                                 esac
1315                         else
1316                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1317                         fi
1318                         ;;
1319                 esac
1320                 ;;
1321 #
1322 # Tests needed for SINIX large file support.
1323 #
1324     *sysv4*)
1325       if test $host = mips-sni-sysv4 ; then
1326         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1327 echo "configure:1328: checking for LFS support" >&5
1328         old_CPPFLAGS="$CPPFLAGS"
1329         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1330         if test "$cross_compiling" = yes; then
1331   SINIX_LFS_SUPPORT=cross
1332 else
1333   cat > conftest.$ac_ext <<EOF
1334 #line 1335 "configure"
1335 #include "confdefs.h"
1336
1337 #include <unistd.h>
1338 main () {
1339 #if _LFS64_LARGEFILE == 1
1340 exit(0);
1341 #else
1342 exit(1);
1343 #endif
1344 }
1345 EOF
1346 if { (eval echo configure:1347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1347 then
1348   SINIX_LFS_SUPPORT=yes
1349 else
1350   echo "configure: failed program was:" >&5
1351   cat conftest.$ac_ext >&5
1352   rm -fr conftest*
1353   SINIX_LFS_SUPPORT=no
1354 fi
1355 rm -fr conftest*
1356 fi
1357
1358         CPPFLAGS="$old_CPPFLAGS"
1359         if test x$SINIX_LFS_SUPPORT = xyes ; then
1360           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1361           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1362           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1363           LIBS="`getconf LFS64_LIBS` $LIBS"
1364         fi
1365       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1366       fi
1367     ;;
1368
1369 #
1370 # Tests needed for glibc 2.1 large file support.
1371
1372         *linux*)
1373                 echo "$ac_t""disabling large file support for glibc2.1 on Linux" 1>&6     
1374                 ;;
1375     *hurd*)
1376         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1377 echo "configure:1378: checking for LFS support" >&5
1378         old_CPPFLAGS="$CPPFLAGS"
1379         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1380         if test "$cross_compiling" = yes; then
1381   GLIBC_LFS_SUPPORT=cross
1382 else
1383   cat > conftest.$ac_ext <<EOF
1384 #line 1385 "configure"
1385 #include "confdefs.h"
1386
1387 #include <unistd.h>
1388 main () {
1389 #if _LFS64_LARGEFILE == 1
1390 exit(0);
1391 #else
1392 exit(1);
1393 #endif
1394 }
1395 EOF
1396 if { (eval echo configure:1397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1397 then
1398   GLIBC_LFS_SUPPORT=yes
1399 else
1400   echo "configure: failed program was:" >&5
1401   cat conftest.$ac_ext >&5
1402   rm -fr conftest*
1403   GLIBC_LFS_SUPPORT=no
1404 fi
1405 rm -fr conftest*
1406 fi
1407
1408         CPPFLAGS="$old_CPPFLAGS"
1409         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1410           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1411         fi
1412       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1413     ;;
1414
1415 esac
1416
1417 echo $ac_n "checking for inline""... $ac_c" 1>&6
1418 echo "configure:1419: checking for inline" >&5
1419 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1420   echo $ac_n "(cached) $ac_c" 1>&6
1421 else
1422   ac_cv_c_inline=no
1423 for ac_kw in inline __inline__ __inline; do
1424   cat > conftest.$ac_ext <<EOF
1425 #line 1426 "configure"
1426 #include "confdefs.h"
1427
1428 int main() {
1429 } $ac_kw foo() {
1430 ; return 0; }
1431 EOF
1432 if { (eval echo configure:1433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1433   rm -rf conftest*
1434   ac_cv_c_inline=$ac_kw; break
1435 else
1436   echo "configure: failed program was:" >&5
1437   cat conftest.$ac_ext >&5
1438 fi
1439 rm -f conftest*
1440 done
1441
1442 fi
1443
1444 echo "$ac_t""$ac_cv_c_inline" 1>&6
1445 case "$ac_cv_c_inline" in
1446   inline | yes) ;;
1447   no) cat >> confdefs.h <<\EOF
1448 #define inline 
1449 EOF
1450  ;;
1451   *)  cat >> confdefs.h <<EOF
1452 #define inline $ac_cv_c_inline
1453 EOF
1454  ;;
1455 esac
1456
1457 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1458 echo "configure:1459: checking how to run the C preprocessor" >&5
1459 # On Suns, sometimes $CPP names a directory.
1460 if test -n "$CPP" && test -d "$CPP"; then
1461   CPP=
1462 fi
1463 if test -z "$CPP"; then
1464 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1465   echo $ac_n "(cached) $ac_c" 1>&6
1466 else
1467     # This must be in double quotes, not single quotes, because CPP may get
1468   # substituted into the Makefile and "${CC-cc}" will confuse make.
1469   CPP="${CC-cc} -E"
1470   # On the NeXT, cc -E runs the code through the compiler's parser,
1471   # not just through cpp.
1472   cat > conftest.$ac_ext <<EOF
1473 #line 1474 "configure"
1474 #include "confdefs.h"
1475 #include <assert.h>
1476 Syntax Error
1477 EOF
1478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1479 { (eval echo configure:1480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1481 if test -z "$ac_err"; then
1482   :
1483 else
1484   echo "$ac_err" >&5
1485   echo "configure: failed program was:" >&5
1486   cat conftest.$ac_ext >&5
1487   rm -rf conftest*
1488   CPP="${CC-cc} -E -traditional-cpp"
1489   cat > conftest.$ac_ext <<EOF
1490 #line 1491 "configure"
1491 #include "confdefs.h"
1492 #include <assert.h>
1493 Syntax Error
1494 EOF
1495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1496 { (eval echo configure:1497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1498 if test -z "$ac_err"; then
1499   :
1500 else
1501   echo "$ac_err" >&5
1502   echo "configure: failed program was:" >&5
1503   cat conftest.$ac_ext >&5
1504   rm -rf conftest*
1505   CPP="${CC-cc} -nologo -E"
1506   cat > conftest.$ac_ext <<EOF
1507 #line 1508 "configure"
1508 #include "confdefs.h"
1509 #include <assert.h>
1510 Syntax Error
1511 EOF
1512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1513 { (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1515 if test -z "$ac_err"; then
1516   :
1517 else
1518   echo "$ac_err" >&5
1519   echo "configure: failed program was:" >&5
1520   cat conftest.$ac_ext >&5
1521   rm -rf conftest*
1522   CPP=/lib/cpp
1523 fi
1524 rm -f conftest*
1525 fi
1526 rm -f conftest*
1527 fi
1528 rm -f conftest*
1529   ac_cv_prog_CPP="$CPP"
1530 fi
1531   CPP="$ac_cv_prog_CPP"
1532 else
1533   ac_cv_prog_CPP="$CPP"
1534 fi
1535 echo "$ac_t""$CPP" 1>&6
1536
1537 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1538 echo "configure:1539: checking for ANSI C header files" >&5
1539 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1540   echo $ac_n "(cached) $ac_c" 1>&6
1541 else
1542   cat > conftest.$ac_ext <<EOF
1543 #line 1544 "configure"
1544 #include "confdefs.h"
1545 #include <stdlib.h>
1546 #include <stdarg.h>
1547 #include <string.h>
1548 #include <float.h>
1549 EOF
1550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1551 { (eval echo configure:1552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1553 if test -z "$ac_err"; then
1554   rm -rf conftest*
1555   ac_cv_header_stdc=yes
1556 else
1557   echo "$ac_err" >&5
1558   echo "configure: failed program was:" >&5
1559   cat conftest.$ac_ext >&5
1560   rm -rf conftest*
1561   ac_cv_header_stdc=no
1562 fi
1563 rm -f conftest*
1564
1565 if test $ac_cv_header_stdc = yes; then
1566   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1567 cat > conftest.$ac_ext <<EOF
1568 #line 1569 "configure"
1569 #include "confdefs.h"
1570 #include <string.h>
1571 EOF
1572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1573   egrep "memchr" >/dev/null 2>&1; then
1574   :
1575 else
1576   rm -rf conftest*
1577   ac_cv_header_stdc=no
1578 fi
1579 rm -f conftest*
1580
1581 fi
1582
1583 if test $ac_cv_header_stdc = yes; then
1584   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1585 cat > conftest.$ac_ext <<EOF
1586 #line 1587 "configure"
1587 #include "confdefs.h"
1588 #include <stdlib.h>
1589 EOF
1590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1591   egrep "free" >/dev/null 2>&1; then
1592   :
1593 else
1594   rm -rf conftest*
1595   ac_cv_header_stdc=no
1596 fi
1597 rm -f conftest*
1598
1599 fi
1600
1601 if test $ac_cv_header_stdc = yes; then
1602   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1603 if test "$cross_compiling" = yes; then
1604   :
1605 else
1606   cat > conftest.$ac_ext <<EOF
1607 #line 1608 "configure"
1608 #include "confdefs.h"
1609 #include <ctype.h>
1610 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1611 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1612 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1613 int main () { int i; for (i = 0; i < 256; i++)
1614 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1615 exit (0); }
1616
1617 EOF
1618 if { (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1619 then
1620   :
1621 else
1622   echo "configure: failed program was:" >&5
1623   cat conftest.$ac_ext >&5
1624   rm -fr conftest*
1625   ac_cv_header_stdc=no
1626 fi
1627 rm -fr conftest*
1628 fi
1629
1630 fi
1631 fi
1632
1633 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1634 if test $ac_cv_header_stdc = yes; then
1635   cat >> confdefs.h <<\EOF
1636 #define STDC_HEADERS 1
1637 EOF
1638
1639 fi
1640
1641 ac_header_dirent=no
1642 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1643 do
1644 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1645 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1646 echo "configure:1647: checking for $ac_hdr that defines DIR" >&5
1647 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1648   echo $ac_n "(cached) $ac_c" 1>&6
1649 else
1650   cat > conftest.$ac_ext <<EOF
1651 #line 1652 "configure"
1652 #include "confdefs.h"
1653 #include <sys/types.h>
1654 #include <$ac_hdr>
1655 int main() {
1656 DIR *dirp = 0;
1657 ; return 0; }
1658 EOF
1659 if { (eval echo configure:1660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1660   rm -rf conftest*
1661   eval "ac_cv_header_dirent_$ac_safe=yes"
1662 else
1663   echo "configure: failed program was:" >&5
1664   cat conftest.$ac_ext >&5
1665   rm -rf conftest*
1666   eval "ac_cv_header_dirent_$ac_safe=no"
1667 fi
1668 rm -f conftest*
1669 fi
1670 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1671   echo "$ac_t""yes" 1>&6
1672     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1673   cat >> confdefs.h <<EOF
1674 #define $ac_tr_hdr 1
1675 EOF
1676  ac_header_dirent=$ac_hdr; break
1677 else
1678   echo "$ac_t""no" 1>&6
1679 fi
1680 done
1681 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1682 if test $ac_header_dirent = dirent.h; then
1683 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1684 echo "configure:1685: checking for opendir in -ldir" >&5
1685 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1686 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1687   echo $ac_n "(cached) $ac_c" 1>&6
1688 else
1689   ac_save_LIBS="$LIBS"
1690 LIBS="-ldir  $LIBS"
1691 cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1694 /* Override any gcc2 internal prototype to avoid an error.  */
1695 /* We use char because int might match the return type of a gcc2
1696     builtin and then its argument prototype would still apply.  */
1697 char opendir();
1698
1699 int main() {
1700 opendir()
1701 ; return 0; }
1702 EOF
1703 if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1704   rm -rf conftest*
1705   eval "ac_cv_lib_$ac_lib_var=yes"
1706 else
1707   echo "configure: failed program was:" >&5
1708   cat conftest.$ac_ext >&5
1709   rm -rf conftest*
1710   eval "ac_cv_lib_$ac_lib_var=no"
1711 fi
1712 rm -f conftest*
1713 LIBS="$ac_save_LIBS"
1714
1715 fi
1716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1717   echo "$ac_t""yes" 1>&6
1718   LIBS="$LIBS -ldir"
1719 else
1720   echo "$ac_t""no" 1>&6
1721 fi
1722
1723 else
1724 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1725 echo "configure:1726: checking for opendir in -lx" >&5
1726 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1727 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1728   echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730   ac_save_LIBS="$LIBS"
1731 LIBS="-lx  $LIBS"
1732 cat > conftest.$ac_ext <<EOF
1733 #line 1734 "configure"
1734 #include "confdefs.h"
1735 /* Override any gcc2 internal prototype to avoid an error.  */
1736 /* We use char because int might match the return type of a gcc2
1737     builtin and then its argument prototype would still apply.  */
1738 char opendir();
1739
1740 int main() {
1741 opendir()
1742 ; return 0; }
1743 EOF
1744 if { (eval echo configure:1745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1745   rm -rf conftest*
1746   eval "ac_cv_lib_$ac_lib_var=yes"
1747 else
1748   echo "configure: failed program was:" >&5
1749   cat conftest.$ac_ext >&5
1750   rm -rf conftest*
1751   eval "ac_cv_lib_$ac_lib_var=no"
1752 fi
1753 rm -f conftest*
1754 LIBS="$ac_save_LIBS"
1755
1756 fi
1757 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1758   echo "$ac_t""yes" 1>&6
1759   LIBS="$LIBS -lx"
1760 else
1761   echo "$ac_t""no" 1>&6
1762 fi
1763
1764 fi
1765
1766 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1767 echo "configure:1768: checking whether time.h and sys/time.h may both be included" >&5
1768 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1769   echo $ac_n "(cached) $ac_c" 1>&6
1770 else
1771   cat > conftest.$ac_ext <<EOF
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774 #include <sys/types.h>
1775 #include <sys/time.h>
1776 #include <time.h>
1777 int main() {
1778 struct tm *tp;
1779 ; return 0; }
1780 EOF
1781 if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1782   rm -rf conftest*
1783   ac_cv_header_time=yes
1784 else
1785   echo "configure: failed program was:" >&5
1786   cat conftest.$ac_ext >&5
1787   rm -rf conftest*
1788   ac_cv_header_time=no
1789 fi
1790 rm -f conftest*
1791 fi
1792
1793 echo "$ac_t""$ac_cv_header_time" 1>&6
1794 if test $ac_cv_header_time = yes; then
1795   cat >> confdefs.h <<\EOF
1796 #define TIME_WITH_SYS_TIME 1
1797 EOF
1798
1799 fi
1800
1801 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1802 echo "configure:1803: checking for sys/wait.h that is POSIX.1 compatible" >&5
1803 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1804   echo $ac_n "(cached) $ac_c" 1>&6
1805 else
1806   cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1809 #include <sys/types.h>
1810 #include <sys/wait.h>
1811 #ifndef WEXITSTATUS
1812 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1813 #endif
1814 #ifndef WIFEXITED
1815 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1816 #endif
1817 int main() {
1818 int s;
1819 wait (&s);
1820 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1821 ; return 0; }
1822 EOF
1823 if { (eval echo configure:1824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1824   rm -rf conftest*
1825   ac_cv_header_sys_wait_h=yes
1826 else
1827   echo "configure: failed program was:" >&5
1828   cat conftest.$ac_ext >&5
1829   rm -rf conftest*
1830   ac_cv_header_sys_wait_h=no
1831 fi
1832 rm -f conftest*
1833 fi
1834
1835 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1836 if test $ac_cv_header_sys_wait_h = yes; then
1837   cat >> confdefs.h <<\EOF
1838 #define HAVE_SYS_WAIT_H 1
1839 EOF
1840
1841 fi
1842
1843 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1844 do
1845 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1846 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1847 echo "configure:1848: checking for $ac_hdr" >&5
1848 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1849   echo $ac_n "(cached) $ac_c" 1>&6
1850 else
1851   cat > conftest.$ac_ext <<EOF
1852 #line 1853 "configure"
1853 #include "confdefs.h"
1854 #include <$ac_hdr>
1855 EOF
1856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1857 { (eval echo configure:1858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1859 if test -z "$ac_err"; then
1860   rm -rf conftest*
1861   eval "ac_cv_header_$ac_safe=yes"
1862 else
1863   echo "$ac_err" >&5
1864   echo "configure: failed program was:" >&5
1865   cat conftest.$ac_ext >&5
1866   rm -rf conftest*
1867   eval "ac_cv_header_$ac_safe=no"
1868 fi
1869 rm -f conftest*
1870 fi
1871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1872   echo "$ac_t""yes" 1>&6
1873     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1874   cat >> confdefs.h <<EOF
1875 #define $ac_tr_hdr 1
1876 EOF
1877  
1878 else
1879   echo "$ac_t""no" 1>&6
1880 fi
1881 done
1882
1883 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1884 do
1885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1887 echo "configure:1888: checking for $ac_hdr" >&5
1888 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1889   echo $ac_n "(cached) $ac_c" 1>&6
1890 else
1891   cat > conftest.$ac_ext <<EOF
1892 #line 1893 "configure"
1893 #include "confdefs.h"
1894 #include <$ac_hdr>
1895 EOF
1896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1897 { (eval echo configure:1898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1899 if test -z "$ac_err"; then
1900   rm -rf conftest*
1901   eval "ac_cv_header_$ac_safe=yes"
1902 else
1903   echo "$ac_err" >&5
1904   echo "configure: failed program was:" >&5
1905   cat conftest.$ac_ext >&5
1906   rm -rf conftest*
1907   eval "ac_cv_header_$ac_safe=no"
1908 fi
1909 rm -f conftest*
1910 fi
1911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1912   echo "$ac_t""yes" 1>&6
1913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1914   cat >> confdefs.h <<EOF
1915 #define $ac_tr_hdr 1
1916 EOF
1917  
1918 else
1919   echo "$ac_t""no" 1>&6
1920 fi
1921 done
1922
1923 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1924 do
1925 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1926 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1927 echo "configure:1928: checking for $ac_hdr" >&5
1928 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1929   echo $ac_n "(cached) $ac_c" 1>&6
1930 else
1931   cat > conftest.$ac_ext <<EOF
1932 #line 1933 "configure"
1933 #include "confdefs.h"
1934 #include <$ac_hdr>
1935 EOF
1936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1937 { (eval echo configure:1938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1939 if test -z "$ac_err"; then
1940   rm -rf conftest*
1941   eval "ac_cv_header_$ac_safe=yes"
1942 else
1943   echo "$ac_err" >&5
1944   echo "configure: failed program was:" >&5
1945   cat conftest.$ac_ext >&5
1946   rm -rf conftest*
1947   eval "ac_cv_header_$ac_safe=no"
1948 fi
1949 rm -f conftest*
1950 fi
1951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1952   echo "$ac_t""yes" 1>&6
1953     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1954   cat >> confdefs.h <<EOF
1955 #define $ac_tr_hdr 1
1956 EOF
1957  
1958 else
1959   echo "$ac_t""no" 1>&6
1960 fi
1961 done
1962
1963 for ac_hdr in sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h
1964 do
1965 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1966 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1967 echo "configure:1968: checking for $ac_hdr" >&5
1968 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1969   echo $ac_n "(cached) $ac_c" 1>&6
1970 else
1971   cat > conftest.$ac_ext <<EOF
1972 #line 1973 "configure"
1973 #include "confdefs.h"
1974 #include <$ac_hdr>
1975 EOF
1976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1977 { (eval echo configure:1978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1979 if test -z "$ac_err"; then
1980   rm -rf conftest*
1981   eval "ac_cv_header_$ac_safe=yes"
1982 else
1983   echo "$ac_err" >&5
1984   echo "configure: failed program was:" >&5
1985   cat conftest.$ac_ext >&5
1986   rm -rf conftest*
1987   eval "ac_cv_header_$ac_safe=no"
1988 fi
1989 rm -f conftest*
1990 fi
1991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1992   echo "$ac_t""yes" 1>&6
1993     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1994   cat >> confdefs.h <<EOF
1995 #define $ac_tr_hdr 1
1996 EOF
1997  
1998 else
1999   echo "$ac_t""no" 1>&6
2000 fi
2001 done
2002
2003 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h string.h strings.h stdlib.h sys/socket.h
2004 do
2005 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2006 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2007 echo "configure:2008: checking for $ac_hdr" >&5
2008 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2009   echo $ac_n "(cached) $ac_c" 1>&6
2010 else
2011   cat > conftest.$ac_ext <<EOF
2012 #line 2013 "configure"
2013 #include "confdefs.h"
2014 #include <$ac_hdr>
2015 EOF
2016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2017 { (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2019 if test -z "$ac_err"; then
2020   rm -rf conftest*
2021   eval "ac_cv_header_$ac_safe=yes"
2022 else
2023   echo "$ac_err" >&5
2024   echo "configure: failed program was:" >&5
2025   cat conftest.$ac_ext >&5
2026   rm -rf conftest*
2027   eval "ac_cv_header_$ac_safe=no"
2028 fi
2029 rm -f conftest*
2030 fi
2031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2032   echo "$ac_t""yes" 1>&6
2033     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2034   cat >> confdefs.h <<EOF
2035 #define $ac_tr_hdr 1
2036 EOF
2037  
2038 else
2039   echo "$ac_t""no" 1>&6
2040 fi
2041 done
2042
2043 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2044 do
2045 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2046 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2047 echo "configure:2048: checking for $ac_hdr" >&5
2048 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2049   echo $ac_n "(cached) $ac_c" 1>&6
2050 else
2051   cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054 #include <$ac_hdr>
2055 EOF
2056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2057 { (eval echo configure:2058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2059 if test -z "$ac_err"; then
2060   rm -rf conftest*
2061   eval "ac_cv_header_$ac_safe=yes"
2062 else
2063   echo "$ac_err" >&5
2064   echo "configure: failed program was:" >&5
2065   cat conftest.$ac_ext >&5
2066   rm -rf conftest*
2067   eval "ac_cv_header_$ac_safe=no"
2068 fi
2069 rm -f conftest*
2070 fi
2071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2072   echo "$ac_t""yes" 1>&6
2073     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2074   cat >> confdefs.h <<EOF
2075 #define $ac_tr_hdr 1
2076 EOF
2077  
2078 else
2079   echo "$ac_t""no" 1>&6
2080 fi
2081 done
2082
2083 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2084 do
2085 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2086 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2087 echo "configure:2088: checking for $ac_hdr" >&5
2088 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2089   echo $ac_n "(cached) $ac_c" 1>&6
2090 else
2091   cat > conftest.$ac_ext <<EOF
2092 #line 2093 "configure"
2093 #include "confdefs.h"
2094 #include <$ac_hdr>
2095 EOF
2096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2097 { (eval echo configure:2098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2099 if test -z "$ac_err"; then
2100   rm -rf conftest*
2101   eval "ac_cv_header_$ac_safe=yes"
2102 else
2103   echo "$ac_err" >&5
2104   echo "configure: failed program was:" >&5
2105   cat conftest.$ac_ext >&5
2106   rm -rf conftest*
2107   eval "ac_cv_header_$ac_safe=no"
2108 fi
2109 rm -f conftest*
2110 fi
2111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2112   echo "$ac_t""yes" 1>&6
2113     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2114   cat >> confdefs.h <<EOF
2115 #define $ac_tr_hdr 1
2116 EOF
2117  
2118 else
2119   echo "$ac_t""no" 1>&6
2120 fi
2121 done
2122
2123 #
2124 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2125 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2126 #
2127 case "$host_os" in
2128     *hpux*)
2129                 cat > conftest.$ac_ext <<EOF
2130 #line 2131 "configure"
2131 #include "confdefs.h"
2132 #include <shadow.h>
2133 int main() {
2134 struct spwd testme
2135 ; return 0; }
2136 EOF
2137 if { (eval echo configure:2138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2138   rm -rf conftest*
2139   ac_cv_header_shadow_h=yes
2140 else
2141   echo "configure: failed program was:" >&5
2142   cat conftest.$ac_ext >&5
2143   rm -rf conftest*
2144   ac_cv_header_shadow_h=no
2145 fi
2146 rm -f conftest*
2147                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2148                    cat >> confdefs.h <<\EOF
2149 #define HAVE_SHADOW_H 1
2150 EOF
2151
2152                 fi
2153         ;;
2154 esac
2155 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2156 do
2157 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2158 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2159 echo "configure:2160: checking for $ac_hdr" >&5
2160 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2161   echo $ac_n "(cached) $ac_c" 1>&6
2162 else
2163   cat > conftest.$ac_ext <<EOF
2164 #line 2165 "configure"
2165 #include "confdefs.h"
2166 #include <$ac_hdr>
2167 EOF
2168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2169 { (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2171 if test -z "$ac_err"; then
2172   rm -rf conftest*
2173   eval "ac_cv_header_$ac_safe=yes"
2174 else
2175   echo "$ac_err" >&5
2176   echo "configure: failed program was:" >&5
2177   cat conftest.$ac_ext >&5
2178   rm -rf conftest*
2179   eval "ac_cv_header_$ac_safe=no"
2180 fi
2181 rm -f conftest*
2182 fi
2183 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2184   echo "$ac_t""yes" 1>&6
2185     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2186   cat >> confdefs.h <<EOF
2187 #define $ac_tr_hdr 1
2188 EOF
2189  
2190 else
2191   echo "$ac_t""no" 1>&6
2192 fi
2193 done
2194
2195 for ac_hdr in sys/security.h security/pam_appl.h
2196 do
2197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2199 echo "configure:2200: checking for $ac_hdr" >&5
2200 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2201   echo $ac_n "(cached) $ac_c" 1>&6
2202 else
2203   cat > conftest.$ac_ext <<EOF
2204 #line 2205 "configure"
2205 #include "confdefs.h"
2206 #include <$ac_hdr>
2207 EOF
2208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2209 { (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2211 if test -z "$ac_err"; then
2212   rm -rf conftest*
2213   eval "ac_cv_header_$ac_safe=yes"
2214 else
2215   echo "$ac_err" >&5
2216   echo "configure: failed program was:" >&5
2217   cat conftest.$ac_ext >&5
2218   rm -rf conftest*
2219   eval "ac_cv_header_$ac_safe=no"
2220 fi
2221 rm -f conftest*
2222 fi
2223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2224   echo "$ac_t""yes" 1>&6
2225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2226   cat >> confdefs.h <<EOF
2227 #define $ac_tr_hdr 1
2228 EOF
2229  
2230 else
2231   echo "$ac_t""no" 1>&6
2232 fi
2233 done
2234
2235 for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h
2236 do
2237 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2238 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2239 echo "configure:2240: checking for $ac_hdr" >&5
2240 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2241   echo $ac_n "(cached) $ac_c" 1>&6
2242 else
2243   cat > conftest.$ac_ext <<EOF
2244 #line 2245 "configure"
2245 #include "confdefs.h"
2246 #include <$ac_hdr>
2247 EOF
2248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2249 { (eval echo configure:2250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2251 if test -z "$ac_err"; then
2252   rm -rf conftest*
2253   eval "ac_cv_header_$ac_safe=yes"
2254 else
2255   echo "$ac_err" >&5
2256   echo "configure: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   rm -rf conftest*
2259   eval "ac_cv_header_$ac_safe=no"
2260 fi
2261 rm -f conftest*
2262 fi
2263 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2264   echo "$ac_t""yes" 1>&6
2265     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2266   cat >> confdefs.h <<EOF
2267 #define $ac_tr_hdr 1
2268 EOF
2269  
2270 else
2271   echo "$ac_t""no" 1>&6
2272 fi
2273 done
2274
2275 for ac_hdr in readline/history.h sys/capability.h syscall.h sys/syscall.h
2276 do
2277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2279 echo "configure:2280: checking for $ac_hdr" >&5
2280 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2281   echo $ac_n "(cached) $ac_c" 1>&6
2282 else
2283   cat > conftest.$ac_ext <<EOF
2284 #line 2285 "configure"
2285 #include "confdefs.h"
2286 #include <$ac_hdr>
2287 EOF
2288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2289 { (eval echo configure:2290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2291 if test -z "$ac_err"; then
2292   rm -rf conftest*
2293   eval "ac_cv_header_$ac_safe=yes"
2294 else
2295   echo "$ac_err" >&5
2296   echo "configure: failed program was:" >&5
2297   cat conftest.$ac_ext >&5
2298   rm -rf conftest*
2299   eval "ac_cv_header_$ac_safe=no"
2300 fi
2301 rm -f conftest*
2302 fi
2303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2304   echo "$ac_t""yes" 1>&6
2305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2306   cat >> confdefs.h <<EOF
2307 #define $ac_tr_hdr 1
2308 EOF
2309  
2310 else
2311   echo "$ac_t""no" 1>&6
2312 fi
2313 done
2314
2315 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2316 do
2317 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2318 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2319 echo "configure:2320: checking for $ac_hdr" >&5
2320 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2321   echo $ac_n "(cached) $ac_c" 1>&6
2322 else
2323   cat > conftest.$ac_ext <<EOF
2324 #line 2325 "configure"
2325 #include "confdefs.h"
2326 #include <$ac_hdr>
2327 EOF
2328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2329 { (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2331 if test -z "$ac_err"; then
2332   rm -rf conftest*
2333   eval "ac_cv_header_$ac_safe=yes"
2334 else
2335   echo "$ac_err" >&5
2336   echo "configure: failed program was:" >&5
2337   cat conftest.$ac_ext >&5
2338   rm -rf conftest*
2339   eval "ac_cv_header_$ac_safe=no"
2340 fi
2341 rm -f conftest*
2342 fi
2343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2344   echo "$ac_t""yes" 1>&6
2345     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2346   cat >> confdefs.h <<EOF
2347 #define $ac_tr_hdr 1
2348 EOF
2349  
2350 else
2351   echo "$ac_t""no" 1>&6
2352 fi
2353 done
2354
2355
2356 # For experimental utmp support
2357 for ac_hdr in utmp.h utmpx.h
2358 do
2359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2361 echo "configure:2362: checking for $ac_hdr" >&5
2362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2363   echo $ac_n "(cached) $ac_c" 1>&6
2364 else
2365   cat > conftest.$ac_ext <<EOF
2366 #line 2367 "configure"
2367 #include "confdefs.h"
2368 #include <$ac_hdr>
2369 EOF
2370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2371 { (eval echo configure:2372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2373 if test -z "$ac_err"; then
2374   rm -rf conftest*
2375   eval "ac_cv_header_$ac_safe=yes"
2376 else
2377   echo "$ac_err" >&5
2378   echo "configure: failed program was:" >&5
2379   cat conftest.$ac_ext >&5
2380   rm -rf conftest*
2381   eval "ac_cv_header_$ac_safe=no"
2382 fi
2383 rm -f conftest*
2384 fi
2385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2386   echo "$ac_t""yes" 1>&6
2387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2388   cat >> confdefs.h <<EOF
2389 #define $ac_tr_hdr 1
2390 EOF
2391  
2392 else
2393   echo "$ac_t""no" 1>&6
2394 fi
2395 done
2396
2397
2398 echo $ac_n "checking size of int""... $ac_c" 1>&6
2399 echo "configure:2400: checking size of int" >&5
2400 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2401   echo $ac_n "(cached) $ac_c" 1>&6
2402 else
2403   if test "$cross_compiling" = yes; then
2404   ac_cv_sizeof_int=cross
2405 else
2406   cat > conftest.$ac_ext <<EOF
2407 #line 2408 "configure"
2408 #include "confdefs.h"
2409 #include <stdio.h>
2410 main()
2411 {
2412   FILE *f=fopen("conftestval", "w");
2413   if (!f) exit(1);
2414   fprintf(f, "%d\n", sizeof(int));
2415   exit(0);
2416 }
2417 EOF
2418 if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2419 then
2420   ac_cv_sizeof_int=`cat conftestval`
2421 else
2422   echo "configure: failed program was:" >&5
2423   cat conftest.$ac_ext >&5
2424   rm -fr conftest*
2425   ac_cv_sizeof_int=0
2426 fi
2427 rm -fr conftest*
2428 fi
2429
2430 fi
2431 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2432 cat >> confdefs.h <<EOF
2433 #define SIZEOF_INT $ac_cv_sizeof_int
2434 EOF
2435
2436
2437 echo $ac_n "checking size of long""... $ac_c" 1>&6
2438 echo "configure:2439: checking size of long" >&5
2439 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   if test "$cross_compiling" = yes; then
2443   ac_cv_sizeof_long=cross
2444 else
2445   cat > conftest.$ac_ext <<EOF
2446 #line 2447 "configure"
2447 #include "confdefs.h"
2448 #include <stdio.h>
2449 main()
2450 {
2451   FILE *f=fopen("conftestval", "w");
2452   if (!f) exit(1);
2453   fprintf(f, "%d\n", sizeof(long));
2454   exit(0);
2455 }
2456 EOF
2457 if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2458 then
2459   ac_cv_sizeof_long=`cat conftestval`
2460 else
2461   echo "configure: failed program was:" >&5
2462   cat conftest.$ac_ext >&5
2463   rm -fr conftest*
2464   ac_cv_sizeof_long=0
2465 fi
2466 rm -fr conftest*
2467 fi
2468
2469 fi
2470 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2471 cat >> confdefs.h <<EOF
2472 #define SIZEOF_LONG $ac_cv_sizeof_long
2473 EOF
2474
2475
2476 echo $ac_n "checking size of short""... $ac_c" 1>&6
2477 echo "configure:2478: checking size of short" >&5
2478 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2479   echo $ac_n "(cached) $ac_c" 1>&6
2480 else
2481   if test "$cross_compiling" = yes; then
2482   ac_cv_sizeof_short=cross
2483 else
2484   cat > conftest.$ac_ext <<EOF
2485 #line 2486 "configure"
2486 #include "confdefs.h"
2487 #include <stdio.h>
2488 main()
2489 {
2490   FILE *f=fopen("conftestval", "w");
2491   if (!f) exit(1);
2492   fprintf(f, "%d\n", sizeof(short));
2493   exit(0);
2494 }
2495 EOF
2496 if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2497 then
2498   ac_cv_sizeof_short=`cat conftestval`
2499 else
2500   echo "configure: failed program was:" >&5
2501   cat conftest.$ac_ext >&5
2502   rm -fr conftest*
2503   ac_cv_sizeof_short=0
2504 fi
2505 rm -fr conftest*
2506 fi
2507
2508 fi
2509 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2510 cat >> confdefs.h <<EOF
2511 #define SIZEOF_SHORT $ac_cv_sizeof_short
2512 EOF
2513
2514
2515
2516 echo $ac_n "checking for working const""... $ac_c" 1>&6
2517 echo "configure:2518: checking for working const" >&5
2518 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2519   echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521   cat > conftest.$ac_ext <<EOF
2522 #line 2523 "configure"
2523 #include "confdefs.h"
2524
2525 int main() {
2526
2527 /* Ultrix mips cc rejects this.  */
2528 typedef int charset[2]; const charset x;
2529 /* SunOS 4.1.1 cc rejects this.  */
2530 char const *const *ccp;
2531 char **p;
2532 /* NEC SVR4.0.2 mips cc rejects this.  */
2533 struct point {int x, y;};
2534 static struct point const zero = {0,0};
2535 /* AIX XL C 1.02.0.0 rejects this.
2536    It does not let you subtract one const X* pointer from another in an arm
2537    of an if-expression whose if-part is not a constant expression */
2538 const char *g = "string";
2539 ccp = &g + (g ? g-g : 0);
2540 /* HPUX 7.0 cc rejects these. */
2541 ++ccp;
2542 p = (char**) ccp;
2543 ccp = (char const *const *) p;
2544 { /* SCO 3.2v4 cc rejects this.  */
2545   char *t;
2546   char const *s = 0 ? (char *) 0 : (char const *) 0;
2547
2548   *t++ = 0;
2549 }
2550 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2551   int x[] = {25, 17};
2552   const int *foo = &x[0];
2553   ++foo;
2554 }
2555 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2556   typedef const int *iptr;
2557   iptr p = 0;
2558   ++p;
2559 }
2560 { /* AIX XL C 1.02.0.0 rejects this saying
2561      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2562   struct s { int j; const int *ap[3]; };
2563   struct s *b; b->j = 5;
2564 }
2565 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2566   const int foo = 10;
2567 }
2568
2569 ; return 0; }
2570 EOF
2571 if { (eval echo configure:2572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2572   rm -rf conftest*
2573   ac_cv_c_const=yes
2574 else
2575   echo "configure: failed program was:" >&5
2576   cat conftest.$ac_ext >&5
2577   rm -rf conftest*
2578   ac_cv_c_const=no
2579 fi
2580 rm -f conftest*
2581 fi
2582
2583 echo "$ac_t""$ac_cv_c_const" 1>&6
2584 if test $ac_cv_c_const = no; then
2585   cat >> confdefs.h <<\EOF
2586 #define const 
2587 EOF
2588
2589 fi
2590
2591 echo $ac_n "checking for inline""... $ac_c" 1>&6
2592 echo "configure:2593: checking for inline" >&5
2593 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2594   echo $ac_n "(cached) $ac_c" 1>&6
2595 else
2596   ac_cv_c_inline=no
2597 for ac_kw in inline __inline__ __inline; do
2598   cat > conftest.$ac_ext <<EOF
2599 #line 2600 "configure"
2600 #include "confdefs.h"
2601
2602 int main() {
2603 } $ac_kw foo() {
2604 ; return 0; }
2605 EOF
2606 if { (eval echo configure:2607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2607   rm -rf conftest*
2608   ac_cv_c_inline=$ac_kw; break
2609 else
2610   echo "configure: failed program was:" >&5
2611   cat conftest.$ac_ext >&5
2612 fi
2613 rm -f conftest*
2614 done
2615
2616 fi
2617
2618 echo "$ac_t""$ac_cv_c_inline" 1>&6
2619 case "$ac_cv_c_inline" in
2620   inline | yes) ;;
2621   no) cat >> confdefs.h <<\EOF
2622 #define inline 
2623 EOF
2624  ;;
2625   *)  cat >> confdefs.h <<EOF
2626 #define inline $ac_cv_c_inline
2627 EOF
2628  ;;
2629 esac
2630
2631 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2632 echo "configure:2633: checking whether byte ordering is bigendian" >&5
2633 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2634   echo $ac_n "(cached) $ac_c" 1>&6
2635 else
2636   ac_cv_c_bigendian=unknown
2637 # See if sys/param.h defines the BYTE_ORDER macro.
2638 cat > conftest.$ac_ext <<EOF
2639 #line 2640 "configure"
2640 #include "confdefs.h"
2641 #include <sys/types.h>
2642 #include <sys/param.h>
2643 int main() {
2644
2645 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2646  bogus endian macros
2647 #endif
2648 ; return 0; }
2649 EOF
2650 if { (eval echo configure:2651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2651   rm -rf conftest*
2652   # It does; now see whether it defined to BIG_ENDIAN or not.
2653 cat > conftest.$ac_ext <<EOF
2654 #line 2655 "configure"
2655 #include "confdefs.h"
2656 #include <sys/types.h>
2657 #include <sys/param.h>
2658 int main() {
2659
2660 #if BYTE_ORDER != BIG_ENDIAN
2661  not big endian
2662 #endif
2663 ; return 0; }
2664 EOF
2665 if { (eval echo configure:2666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2666   rm -rf conftest*
2667   ac_cv_c_bigendian=yes
2668 else
2669   echo "configure: failed program was:" >&5
2670   cat conftest.$ac_ext >&5
2671   rm -rf conftest*
2672   ac_cv_c_bigendian=no
2673 fi
2674 rm -f conftest*
2675 else
2676   echo "configure: failed program was:" >&5
2677   cat conftest.$ac_ext >&5
2678 fi
2679 rm -f conftest*
2680 if test $ac_cv_c_bigendian = unknown; then
2681 if test "$cross_compiling" = yes; then
2682     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2683 else
2684   cat > conftest.$ac_ext <<EOF
2685 #line 2686 "configure"
2686 #include "confdefs.h"
2687 main () {
2688   /* Are we little or big endian?  From Harbison&Steele.  */
2689   union
2690   {
2691     long l;
2692     char c[sizeof (long)];
2693   } u;
2694   u.l = 1;
2695   exit (u.c[sizeof (long) - 1] == 1);
2696 }
2697 EOF
2698 if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2699 then
2700   ac_cv_c_bigendian=no
2701 else
2702   echo "configure: failed program was:" >&5
2703   cat conftest.$ac_ext >&5
2704   rm -fr conftest*
2705   ac_cv_c_bigendian=yes
2706 fi
2707 rm -fr conftest*
2708 fi
2709
2710 fi
2711 fi
2712
2713 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2714 if test $ac_cv_c_bigendian = yes; then
2715   cat >> confdefs.h <<\EOF
2716 #define WORDS_BIGENDIAN 1
2717 EOF
2718
2719 fi
2720
2721 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2722 echo "configure:2723: checking whether char is unsigned" >&5
2723 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2724   echo $ac_n "(cached) $ac_c" 1>&6
2725 else
2726   if test "$GCC" = yes; then
2727   # GCC predefines this symbol on systems where it applies.
2728 cat > conftest.$ac_ext <<EOF
2729 #line 2730 "configure"
2730 #include "confdefs.h"
2731 #ifdef __CHAR_UNSIGNED__
2732   yes
2733 #endif
2734
2735 EOF
2736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2737   egrep "yes" >/dev/null 2>&1; then
2738   rm -rf conftest*
2739   ac_cv_c_char_unsigned=yes
2740 else
2741   rm -rf conftest*
2742   ac_cv_c_char_unsigned=no
2743 fi
2744 rm -f conftest*
2745
2746 else
2747 if test "$cross_compiling" = yes; then
2748     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2749 else
2750   cat > conftest.$ac_ext <<EOF
2751 #line 2752 "configure"
2752 #include "confdefs.h"
2753 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2754 #if !defined(__STDC__) || __STDC__ != 1
2755 #define volatile
2756 #endif
2757 main() {
2758   volatile char c = 255; exit(c < 0);
2759 }
2760 EOF
2761 if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2762 then
2763   ac_cv_c_char_unsigned=yes
2764 else
2765   echo "configure: failed program was:" >&5
2766   cat conftest.$ac_ext >&5
2767   rm -fr conftest*
2768   ac_cv_c_char_unsigned=no
2769 fi
2770 rm -fr conftest*
2771 fi
2772
2773 fi
2774 fi
2775
2776 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2777 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2778   cat >> confdefs.h <<\EOF
2779 #define __CHAR_UNSIGNED__ 1
2780 EOF
2781
2782 fi
2783
2784
2785 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2786 echo "configure:2787: checking return type of signal handlers" >&5
2787 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2788   echo $ac_n "(cached) $ac_c" 1>&6
2789 else
2790   cat > conftest.$ac_ext <<EOF
2791 #line 2792 "configure"
2792 #include "confdefs.h"
2793 #include <sys/types.h>
2794 #include <signal.h>
2795 #ifdef signal
2796 #undef signal
2797 #endif
2798 #ifdef __cplusplus
2799 extern "C" void (*signal (int, void (*)(int)))(int);
2800 #else
2801 void (*signal ()) ();
2802 #endif
2803
2804 int main() {
2805 int i;
2806 ; return 0; }
2807 EOF
2808 if { (eval echo configure:2809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2809   rm -rf conftest*
2810   ac_cv_type_signal=void
2811 else
2812   echo "configure: failed program was:" >&5
2813   cat conftest.$ac_ext >&5
2814   rm -rf conftest*
2815   ac_cv_type_signal=int
2816 fi
2817 rm -f conftest*
2818 fi
2819
2820 echo "$ac_t""$ac_cv_type_signal" 1>&6
2821 cat >> confdefs.h <<EOF
2822 #define RETSIGTYPE $ac_cv_type_signal
2823 EOF
2824
2825
2826 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2827 echo "configure:2828: checking for uid_t in sys/types.h" >&5
2828 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2829   echo $ac_n "(cached) $ac_c" 1>&6
2830 else
2831   cat > conftest.$ac_ext <<EOF
2832 #line 2833 "configure"
2833 #include "confdefs.h"
2834 #include <sys/types.h>
2835 EOF
2836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2837   egrep "uid_t" >/dev/null 2>&1; then
2838   rm -rf conftest*
2839   ac_cv_type_uid_t=yes
2840 else
2841   rm -rf conftest*
2842   ac_cv_type_uid_t=no
2843 fi
2844 rm -f conftest*
2845
2846 fi
2847
2848 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2849 if test $ac_cv_type_uid_t = no; then
2850   cat >> confdefs.h <<\EOF
2851 #define uid_t int
2852 EOF
2853
2854   cat >> confdefs.h <<\EOF
2855 #define gid_t int
2856 EOF
2857
2858 fi
2859
2860 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2861 echo "configure:2862: checking for mode_t" >&5
2862 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2863   echo $ac_n "(cached) $ac_c" 1>&6
2864 else
2865   cat > conftest.$ac_ext <<EOF
2866 #line 2867 "configure"
2867 #include "confdefs.h"
2868 #include <sys/types.h>
2869 #if STDC_HEADERS
2870 #include <stdlib.h>
2871 #include <stddef.h>
2872 #endif
2873 EOF
2874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2875   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2876   rm -rf conftest*
2877   ac_cv_type_mode_t=yes
2878 else
2879   rm -rf conftest*
2880   ac_cv_type_mode_t=no
2881 fi
2882 rm -f conftest*
2883
2884 fi
2885 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2886 if test $ac_cv_type_mode_t = no; then
2887   cat >> confdefs.h <<\EOF
2888 #define mode_t int
2889 EOF
2890
2891 fi
2892
2893 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2894 echo "configure:2895: checking for off_t" >&5
2895 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2896   echo $ac_n "(cached) $ac_c" 1>&6
2897 else
2898   cat > conftest.$ac_ext <<EOF
2899 #line 2900 "configure"
2900 #include "confdefs.h"
2901 #include <sys/types.h>
2902 #if STDC_HEADERS
2903 #include <stdlib.h>
2904 #include <stddef.h>
2905 #endif
2906 EOF
2907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2908   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2909   rm -rf conftest*
2910   ac_cv_type_off_t=yes
2911 else
2912   rm -rf conftest*
2913   ac_cv_type_off_t=no
2914 fi
2915 rm -f conftest*
2916
2917 fi
2918 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2919 if test $ac_cv_type_off_t = no; then
2920   cat >> confdefs.h <<\EOF
2921 #define off_t long
2922 EOF
2923
2924 fi
2925
2926 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2927 echo "configure:2928: checking for size_t" >&5
2928 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2929   echo $ac_n "(cached) $ac_c" 1>&6
2930 else
2931   cat > conftest.$ac_ext <<EOF
2932 #line 2933 "configure"
2933 #include "confdefs.h"
2934 #include <sys/types.h>
2935 #if STDC_HEADERS
2936 #include <stdlib.h>
2937 #include <stddef.h>
2938 #endif
2939 EOF
2940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2941   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2942   rm -rf conftest*
2943   ac_cv_type_size_t=yes
2944 else
2945   rm -rf conftest*
2946   ac_cv_type_size_t=no
2947 fi
2948 rm -f conftest*
2949
2950 fi
2951 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2952 if test $ac_cv_type_size_t = no; then
2953   cat >> confdefs.h <<\EOF
2954 #define size_t unsigned
2955 EOF
2956
2957 fi
2958
2959 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2960 echo "configure:2961: checking for pid_t" >&5
2961 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2962   echo $ac_n "(cached) $ac_c" 1>&6
2963 else
2964   cat > conftest.$ac_ext <<EOF
2965 #line 2966 "configure"
2966 #include "confdefs.h"
2967 #include <sys/types.h>
2968 #if STDC_HEADERS
2969 #include <stdlib.h>
2970 #include <stddef.h>
2971 #endif
2972 EOF
2973 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2974   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2975   rm -rf conftest*
2976   ac_cv_type_pid_t=yes
2977 else
2978   rm -rf conftest*
2979   ac_cv_type_pid_t=no
2980 fi
2981 rm -f conftest*
2982
2983 fi
2984 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2985 if test $ac_cv_type_pid_t = no; then
2986   cat >> confdefs.h <<\EOF
2987 #define pid_t int
2988 EOF
2989
2990 fi
2991
2992 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2993 echo "configure:2994: checking for st_rdev in struct stat" >&5
2994 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2995   echo $ac_n "(cached) $ac_c" 1>&6
2996 else
2997   cat > conftest.$ac_ext <<EOF
2998 #line 2999 "configure"
2999 #include "confdefs.h"
3000 #include <sys/types.h>
3001 #include <sys/stat.h>
3002 int main() {
3003 struct stat s; s.st_rdev;
3004 ; return 0; }
3005 EOF
3006 if { (eval echo configure:3007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3007   rm -rf conftest*
3008   ac_cv_struct_st_rdev=yes
3009 else
3010   echo "configure: failed program was:" >&5
3011   cat conftest.$ac_ext >&5
3012   rm -rf conftest*
3013   ac_cv_struct_st_rdev=no
3014 fi
3015 rm -f conftest*
3016 fi
3017
3018 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3019 if test $ac_cv_struct_st_rdev = yes; then
3020   cat >> confdefs.h <<\EOF
3021 #define HAVE_ST_RDEV 1
3022 EOF
3023
3024 fi
3025
3026 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3027 echo "configure:3028: checking for d_off in dirent" >&5
3028 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+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
3035 #include <unistd.h>
3036 #include <sys/types.h>
3037 #include <dirent.h>
3038 int main() {
3039 struct dirent d; d.d_off;
3040 ; return 0; }
3041 EOF
3042 if { (eval echo configure:3043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3043   rm -rf conftest*
3044   ac_cv_dirent_d_off=yes
3045 else
3046   echo "configure: failed program was:" >&5
3047   cat conftest.$ac_ext >&5
3048   rm -rf conftest*
3049   ac_cv_dirent_d_off=no
3050 fi
3051 rm -f conftest*
3052 fi
3053
3054 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3055 if test $ac_cv_dirent_d_off = yes; then
3056   cat >> confdefs.h <<\EOF
3057 #define HAVE_DIRENT_D_OFF 1
3058 EOF
3059
3060 fi
3061
3062 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3063 echo "configure:3064: checking for ino_t" >&5
3064 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3065   echo $ac_n "(cached) $ac_c" 1>&6
3066 else
3067   cat > conftest.$ac_ext <<EOF
3068 #line 3069 "configure"
3069 #include "confdefs.h"
3070 #include <sys/types.h>
3071 #if STDC_HEADERS
3072 #include <stdlib.h>
3073 #include <stddef.h>
3074 #endif
3075 EOF
3076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3077   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3078   rm -rf conftest*
3079   ac_cv_type_ino_t=yes
3080 else
3081   rm -rf conftest*
3082   ac_cv_type_ino_t=no
3083 fi
3084 rm -f conftest*
3085
3086 fi
3087 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3088 if test $ac_cv_type_ino_t = no; then
3089   cat >> confdefs.h <<\EOF
3090 #define ino_t unsigned
3091 EOF
3092
3093 fi
3094
3095 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3096 echo "configure:3097: checking for loff_t" >&5
3097 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3098   echo $ac_n "(cached) $ac_c" 1>&6
3099 else
3100   cat > conftest.$ac_ext <<EOF
3101 #line 3102 "configure"
3102 #include "confdefs.h"
3103 #include <sys/types.h>
3104 #if STDC_HEADERS
3105 #include <stdlib.h>
3106 #include <stddef.h>
3107 #endif
3108 EOF
3109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3110   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3111   rm -rf conftest*
3112   ac_cv_type_loff_t=yes
3113 else
3114   rm -rf conftest*
3115   ac_cv_type_loff_t=no
3116 fi
3117 rm -f conftest*
3118
3119 fi
3120 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3121 if test $ac_cv_type_loff_t = no; then
3122   cat >> confdefs.h <<\EOF
3123 #define loff_t off_t
3124 EOF
3125
3126 fi
3127
3128 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3129 echo "configure:3130: checking for offset_t" >&5
3130 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3131   echo $ac_n "(cached) $ac_c" 1>&6
3132 else
3133   cat > conftest.$ac_ext <<EOF
3134 #line 3135 "configure"
3135 #include "confdefs.h"
3136 #include <sys/types.h>
3137 #if STDC_HEADERS
3138 #include <stdlib.h>
3139 #include <stddef.h>
3140 #endif
3141 EOF
3142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3143   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3144   rm -rf conftest*
3145   ac_cv_type_offset_t=yes
3146 else
3147   rm -rf conftest*
3148   ac_cv_type_offset_t=no
3149 fi
3150 rm -f conftest*
3151
3152 fi
3153 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3154 if test $ac_cv_type_offset_t = no; then
3155   cat >> confdefs.h <<\EOF
3156 #define offset_t loff_t
3157 EOF
3158
3159 fi
3160
3161 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3162 echo "configure:3163: checking for ssize_t" >&5
3163 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3164   echo $ac_n "(cached) $ac_c" 1>&6
3165 else
3166   cat > conftest.$ac_ext <<EOF
3167 #line 3168 "configure"
3168 #include "confdefs.h"
3169 #include <sys/types.h>
3170 #if STDC_HEADERS
3171 #include <stdlib.h>
3172 #include <stddef.h>
3173 #endif
3174 EOF
3175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3176   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3177   rm -rf conftest*
3178   ac_cv_type_ssize_t=yes
3179 else
3180   rm -rf conftest*
3181   ac_cv_type_ssize_t=no
3182 fi
3183 rm -f conftest*
3184
3185 fi
3186 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3187 if test $ac_cv_type_ssize_t = no; then
3188   cat >> confdefs.h <<\EOF
3189 #define ssize_t int
3190 EOF
3191
3192 fi
3193
3194 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3195 echo "configure:3196: checking for wchar_t" >&5
3196 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3197   echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199   cat > conftest.$ac_ext <<EOF
3200 #line 3201 "configure"
3201 #include "confdefs.h"
3202 #include <sys/types.h>
3203 #if STDC_HEADERS
3204 #include <stdlib.h>
3205 #include <stddef.h>
3206 #endif
3207 EOF
3208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3209   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3210   rm -rf conftest*
3211   ac_cv_type_wchar_t=yes
3212 else
3213   rm -rf conftest*
3214   ac_cv_type_wchar_t=no
3215 fi
3216 rm -f conftest*
3217
3218 fi
3219 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3220 if test $ac_cv_type_wchar_t = no; then
3221   cat >> confdefs.h <<\EOF
3222 #define wchar_t unsigned short
3223 EOF
3224
3225 fi
3226
3227
3228 # we need libcups for CUPS support...
3229 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3230 echo "configure:3231: checking for httpConnect in -lcups" >&5
3231 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3232 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3233   echo $ac_n "(cached) $ac_c" 1>&6
3234 else
3235   ac_save_LIBS="$LIBS"
3236 LIBS="-lcups  $LIBS"
3237 cat > conftest.$ac_ext <<EOF
3238 #line 3239 "configure"
3239 #include "confdefs.h"
3240 /* Override any gcc2 internal prototype to avoid an error.  */
3241 /* We use char because int might match the return type of a gcc2
3242     builtin and then its argument prototype would still apply.  */
3243 char httpConnect();
3244
3245 int main() {
3246 httpConnect()
3247 ; return 0; }
3248 EOF
3249 if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3250   rm -rf conftest*
3251   eval "ac_cv_lib_$ac_lib_var=yes"
3252 else
3253   echo "configure: failed program was:" >&5
3254   cat conftest.$ac_ext >&5
3255   rm -rf conftest*
3256   eval "ac_cv_lib_$ac_lib_var=no"
3257 fi
3258 rm -f conftest*
3259 LIBS="$ac_save_LIBS"
3260
3261 fi
3262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3263   echo "$ac_t""yes" 1>&6
3264     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3265     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3266   cat >> confdefs.h <<EOF
3267 #define $ac_tr_lib 1
3268 EOF
3269
3270   LIBS="-lcups $LIBS"
3271
3272 else
3273   echo "$ac_t""no" 1>&6
3274 fi
3275
3276
3277 # we need libdl for PAM and the new VFS code
3278 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3279 echo "configure:3280: checking for dlopen in -ldl" >&5
3280 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3281 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3282   echo $ac_n "(cached) $ac_c" 1>&6
3283 else
3284   ac_save_LIBS="$LIBS"
3285 LIBS="-ldl  $LIBS"
3286 cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3289 /* Override any gcc2 internal prototype to avoid an error.  */
3290 /* We use char because int might match the return type of a gcc2
3291     builtin and then its argument prototype would still apply.  */
3292 char dlopen();
3293
3294 int main() {
3295 dlopen()
3296 ; return 0; }
3297 EOF
3298 if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3299   rm -rf conftest*
3300   eval "ac_cv_lib_$ac_lib_var=yes"
3301 else
3302   echo "configure: failed program was:" >&5
3303   cat conftest.$ac_ext >&5
3304   rm -rf conftest*
3305   eval "ac_cv_lib_$ac_lib_var=no"
3306 fi
3307 rm -f conftest*
3308 LIBS="$ac_save_LIBS"
3309
3310 fi
3311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3312   echo "$ac_t""yes" 1>&6
3313   LIBS="$LIBS -ldl";
3314         cat >> confdefs.h <<\EOF
3315 #define HAVE_LIBDL 1
3316 EOF
3317
3318 else
3319   echo "$ac_t""no" 1>&6
3320 fi
3321
3322
3323 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3324 echo "configure:3325: checking for sig_atomic_t type" >&5
3325 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3326   echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328   
3329     cat > conftest.$ac_ext <<EOF
3330 #line 3331 "configure"
3331 #include "confdefs.h"
3332
3333 #include <sys/types.h>
3334 #if STDC_HEADERS
3335 #include <stdlib.h>
3336 #include <stddef.h>
3337 #endif
3338 #include <signal.h>
3339 int main() {
3340 sig_atomic_t i = 0
3341 ; return 0; }
3342 EOF
3343 if { (eval echo configure:3344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3344   rm -rf conftest*
3345   samba_cv_sig_atomic_t=yes
3346 else
3347   echo "configure: failed program was:" >&5
3348   cat conftest.$ac_ext >&5
3349   rm -rf conftest*
3350   samba_cv_sig_atomic_t=no
3351 fi
3352 rm -f conftest*
3353 fi
3354
3355 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3356 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3357    cat >> confdefs.h <<\EOF
3358 #define HAVE_SIG_ATOMIC_T_TYPE 1
3359 EOF
3360
3361 fi
3362
3363 echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
3364 echo "configure:3365: checking for errno in errno.h" >&5
3365 if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
3366   echo $ac_n "(cached) $ac_c" 1>&6
3367 else
3368   
3369     cat > conftest.$ac_ext <<EOF
3370 #line 3371 "configure"
3371 #include "confdefs.h"
3372 #include <errno.h>
3373 int main() {
3374 int i = errno
3375 ; return 0; }
3376 EOF
3377 if { (eval echo configure:3378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3378   rm -rf conftest*
3379   samba_cv_errno=yes
3380 else
3381   echo "configure: failed program was:" >&5
3382   cat conftest.$ac_ext >&5
3383   rm -rf conftest*
3384   samba_cv_have_errno=no
3385 fi
3386 rm -f conftest*
3387 fi
3388
3389 echo "$ac_t""$samba_cv_errno" 1>&6
3390 if test x"$samba_cv_errno" = x"yes"; then
3391    cat >> confdefs.h <<\EOF
3392 #define HAVE_ERRNO_DECL 1
3393 EOF
3394
3395 fi
3396
3397 # stupid glibc has the functions but no declaration. grrrr.
3398 echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3399 echo "configure:3400: checking for setresuid declaration" >&5
3400 if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   
3404     cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407 #include <unistd.h>
3408 int main() {
3409 int i = (int)setresuid
3410 ; return 0; }
3411 EOF
3412 if { (eval echo configure:3413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3413   rm -rf conftest*
3414   samba_cv_have_setresuid_decl=yes
3415 else
3416   echo "configure: failed program was:" >&5
3417   cat conftest.$ac_ext >&5
3418   rm -rf conftest*
3419   samba_cv_have_setresuid_decl=no
3420 fi
3421 rm -f conftest*
3422 fi
3423
3424 echo "$ac_t""$samba_cv_have_setresuid_decl" 1>&6
3425 if test x"$samba_cv_have_setresuid_decl" = x"yes"; then
3426     cat >> confdefs.h <<\EOF
3427 #define HAVE_SETRESUID_DECL 1
3428 EOF
3429
3430 fi
3431
3432 # stupid glibc has the functions but no declaration. grrrr.
3433 echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3434 echo "configure:3435: checking for setresgid declaration" >&5
3435 if eval "test \"`echo '$''{'samba_cv_have_setresgid_decl'+set}'`\" = set"; then
3436   echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438   
3439     cat > conftest.$ac_ext <<EOF
3440 #line 3441 "configure"
3441 #include "confdefs.h"
3442 #include <unistd.h>
3443 int main() {
3444 int i = (int)setresgid
3445 ; return 0; }
3446 EOF
3447 if { (eval echo configure:3448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3448   rm -rf conftest*
3449   samba_cv_have_setresgid_decl=yes
3450 else
3451   echo "configure: failed program was:" >&5
3452   cat conftest.$ac_ext >&5
3453   rm -rf conftest*
3454   samba_cv_have_setresgid_decl=no
3455 fi
3456 rm -f conftest*
3457 fi
3458
3459 echo "$ac_t""$samba_cv_have_setresgid_decl" 1>&6
3460 if test x"$samba_cv_have_setresgid_decl" = x"yes"; then
3461     cat >> confdefs.h <<\EOF
3462 #define HAVE_SETRESGID_DECL 1
3463 EOF
3464
3465 fi
3466
3467 # and glibc has setresuid under linux but the function does
3468 # nothing until kernel 2.1.44! very dumb.
3469 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3470 echo "configure:3471: checking for real setresuid" >&5
3471 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3472   echo $ac_n "(cached) $ac_c" 1>&6
3473 else
3474   
3475     if test "$cross_compiling" = yes; then
3476   samba_cv_have_setresuid=cross
3477 else
3478   cat > conftest.$ac_ext <<EOF
3479 #line 3480 "configure"
3480 #include "confdefs.h"
3481 #include <errno.h>
3482 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3483 EOF
3484 if { (eval echo configure:3485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3485 then
3486   samba_cv_have_setresuid=yes
3487 else
3488   echo "configure: failed program was:" >&5
3489   cat conftest.$ac_ext >&5
3490   rm -fr conftest*
3491   samba_cv_have_setresuid=no
3492 fi
3493 rm -fr conftest*
3494 fi
3495
3496 fi
3497
3498 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3499 if test x"$samba_cv_have_setresuid" = x"yes"; then
3500     cat >> confdefs.h <<\EOF
3501 #define HAVE_SETRESUID 1
3502 EOF
3503
3504 fi
3505
3506 # Do the same check for setresguid...
3507 #
3508 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3509 echo "configure:3510: checking for real setresgid" >&5
3510 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3511   echo $ac_n "(cached) $ac_c" 1>&6
3512 else
3513   
3514     if test "$cross_compiling" = yes; then
3515   samba_cv_have_setresgid=cross
3516 else
3517   cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 #include <unistd.h>
3521 #include <errno.h>
3522 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3523 EOF
3524 if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3525 then
3526   samba_cv_have_setresgid=yes
3527 else
3528   echo "configure: failed program was:" >&5
3529   cat conftest.$ac_ext >&5
3530   rm -fr conftest*
3531   samba_cv_have_setresgid=no
3532 fi
3533 rm -fr conftest*
3534 fi
3535
3536 fi
3537
3538 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3539 if test x"$samba_cv_have_setresgid" = x"yes"; then
3540     cat >> confdefs.h <<\EOF
3541 #define HAVE_SETRESGID 1
3542 EOF
3543
3544 fi
3545
3546 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3547 echo "configure:3548: checking for 8-bit clean memcmp" >&5
3548 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3549   echo $ac_n "(cached) $ac_c" 1>&6
3550 else
3551   if test "$cross_compiling" = yes; then
3552   ac_cv_func_memcmp_clean=no
3553 else
3554   cat > conftest.$ac_ext <<EOF
3555 #line 3556 "configure"
3556 #include "confdefs.h"
3557
3558 main()
3559 {
3560   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3561   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3562 }
3563
3564 EOF
3565 if { (eval echo configure:3566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3566 then
3567   ac_cv_func_memcmp_clean=yes
3568 else
3569   echo "configure: failed program was:" >&5
3570   cat conftest.$ac_ext >&5
3571   rm -fr conftest*
3572   ac_cv_func_memcmp_clean=no
3573 fi
3574 rm -fr conftest*
3575 fi
3576
3577 fi
3578
3579 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3580 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3581
3582
3583 ###############################################
3584 # test for where we get crypt() from
3585 for ac_func in crypt
3586 do
3587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3588 echo "configure:3589: checking for $ac_func" >&5
3589 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3590   echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592   cat > conftest.$ac_ext <<EOF
3593 #line 3594 "configure"
3594 #include "confdefs.h"
3595 /* System header to define __stub macros and hopefully few prototypes,
3596     which can conflict with char $ac_func(); below.  */
3597 #include <assert.h>
3598 /* Override any gcc2 internal prototype to avoid an error.  */
3599 /* We use char because int might match the return type of a gcc2
3600     builtin and then its argument prototype would still apply.  */
3601 char $ac_func();
3602
3603 int main() {
3604
3605 /* The GNU C library defines this for functions which it implements
3606     to always fail with ENOSYS.  Some functions are actually named
3607     something starting with __ and the normal name is an alias.  */
3608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3609 choke me
3610 #else
3611 $ac_func();
3612 #endif
3613
3614 ; return 0; }
3615 EOF
3616 if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3617   rm -rf conftest*
3618   eval "ac_cv_func_$ac_func=yes"
3619 else
3620   echo "configure: failed program was:" >&5
3621   cat conftest.$ac_ext >&5
3622   rm -rf conftest*
3623   eval "ac_cv_func_$ac_func=no"
3624 fi
3625 rm -f conftest*
3626 fi
3627
3628 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3629   echo "$ac_t""yes" 1>&6
3630     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3631   cat >> confdefs.h <<EOF
3632 #define $ac_tr_func 1
3633 EOF
3634  
3635 else
3636   echo "$ac_t""no" 1>&6
3637 fi
3638 done
3639
3640 if test x"$ac_cv_func_crypt" = x"no"; then
3641     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3642 echo "configure:3643: checking for crypt in -lcrypt" >&5
3643 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3644 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3645   echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647   ac_save_LIBS="$LIBS"
3648 LIBS="-lcrypt  $LIBS"
3649 cat > conftest.$ac_ext <<EOF
3650 #line 3651 "configure"
3651 #include "confdefs.h"
3652 /* Override any gcc2 internal prototype to avoid an error.  */
3653 /* We use char because int might match the return type of a gcc2
3654     builtin and then its argument prototype would still apply.  */
3655 char crypt();
3656
3657 int main() {
3658 crypt()
3659 ; return 0; }
3660 EOF
3661 if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3662   rm -rf conftest*
3663   eval "ac_cv_lib_$ac_lib_var=yes"
3664 else
3665   echo "configure: failed program was:" >&5
3666   cat conftest.$ac_ext >&5
3667   rm -rf conftest*
3668   eval "ac_cv_lib_$ac_lib_var=no"
3669 fi
3670 rm -f conftest*
3671 LIBS="$ac_save_LIBS"
3672
3673 fi
3674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3675   echo "$ac_t""yes" 1>&6
3676   LIBS="$LIBS -lcrypt";
3677         cat >> confdefs.h <<\EOF
3678 #define HAVE_CRYPT 1
3679 EOF
3680
3681 else
3682   echo "$ac_t""no" 1>&6
3683 fi
3684
3685 fi
3686
3687
3688 ###############################################
3689 # test for where we get readline() from
3690 if test "$ac_cv_header_readline_h" = "yes" ||
3691    test "$ac_cv_header_readline_readline_h" = "yes"; then
3692   echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
3693 echo "configure:3694: checking for readline in -lreadline" >&5
3694 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3695 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3696   echo $ac_n "(cached) $ac_c" 1>&6
3697 else
3698   ac_save_LIBS="$LIBS"
3699 LIBS="-lreadline  $LIBS"
3700 cat > conftest.$ac_ext <<EOF
3701 #line 3702 "configure"
3702 #include "confdefs.h"
3703 /* Override any gcc2 internal prototype to avoid an error.  */
3704 /* We use char because int might match the return type of a gcc2
3705     builtin and then its argument prototype would still apply.  */
3706 char readline();
3707
3708 int main() {
3709 readline()
3710 ; return 0; }
3711 EOF
3712 if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3713   rm -rf conftest*
3714   eval "ac_cv_lib_$ac_lib_var=yes"
3715 else
3716   echo "configure: failed program was:" >&5
3717   cat conftest.$ac_ext >&5
3718   rm -rf conftest*
3719   eval "ac_cv_lib_$ac_lib_var=no"
3720 fi
3721 rm -f conftest*
3722 LIBS="$ac_save_LIBS"
3723
3724 fi
3725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3726   echo "$ac_t""yes" 1>&6
3727     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3728     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3729   cat >> confdefs.h <<EOF
3730 #define $ac_tr_lib 1
3731 EOF
3732
3733   LIBS="-lreadline $LIBS"
3734
3735 else
3736   echo "$ac_t""no" 1>&6
3737 fi
3738
3739 fi
3740
3741
3742 # The following test taken from the cvs sources
3743 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
3744 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
3745 # libsocket.so which has a bad implementation of gethostbyname (it
3746 # only looks in /etc/hosts), so we only look for -lsocket if we need
3747 # it.
3748 for ac_func in connect
3749 do
3750 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3751 echo "configure:3752: checking for $ac_func" >&5
3752 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3753   echo $ac_n "(cached) $ac_c" 1>&6
3754 else
3755   cat > conftest.$ac_ext <<EOF
3756 #line 3757 "configure"
3757 #include "confdefs.h"
3758 /* System header to define __stub macros and hopefully few prototypes,
3759     which can conflict with char $ac_func(); below.  */
3760 #include <assert.h>
3761 /* Override any gcc2 internal prototype to avoid an error.  */
3762 /* We use char because int might match the return type of a gcc2
3763     builtin and then its argument prototype would still apply.  */
3764 char $ac_func();
3765
3766 int main() {
3767
3768 /* The GNU C library defines this for functions which it implements
3769     to always fail with ENOSYS.  Some functions are actually named
3770     something starting with __ and the normal name is an alias.  */
3771 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3772 choke me
3773 #else
3774 $ac_func();
3775 #endif
3776
3777 ; return 0; }
3778 EOF
3779 if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3780   rm -rf conftest*
3781   eval "ac_cv_func_$ac_func=yes"
3782 else
3783   echo "configure: failed program was:" >&5
3784   cat conftest.$ac_ext >&5
3785   rm -rf conftest*
3786   eval "ac_cv_func_$ac_func=no"
3787 fi
3788 rm -f conftest*
3789 fi
3790
3791 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3792   echo "$ac_t""yes" 1>&6
3793     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3794   cat >> confdefs.h <<EOF
3795 #define $ac_tr_func 1
3796 EOF
3797  
3798 else
3799   echo "$ac_t""no" 1>&6
3800 fi
3801 done
3802
3803 if test x"$ac_cv_func_connect" = x"no"; then
3804     case "$LIBS" in
3805     *-lnsl*) ;;
3806     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
3807 echo "configure:3808: checking for printf in -lnsl_s" >&5
3808 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
3809 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3810   echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812   ac_save_LIBS="$LIBS"
3813 LIBS="-lnsl_s  $LIBS"
3814 cat > conftest.$ac_ext <<EOF
3815 #line 3816 "configure"
3816 #include "confdefs.h"
3817 /* Override any gcc2 internal prototype to avoid an error.  */
3818 /* We use char because int might match the return type of a gcc2
3819     builtin and then its argument prototype would still apply.  */
3820 char printf();
3821
3822 int main() {
3823 printf()
3824 ; return 0; }
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3827   rm -rf conftest*
3828   eval "ac_cv_lib_$ac_lib_var=yes"
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -rf conftest*
3833   eval "ac_cv_lib_$ac_lib_var=no"
3834 fi
3835 rm -f conftest*
3836 LIBS="$ac_save_LIBS"
3837
3838 fi
3839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3840   echo "$ac_t""yes" 1>&6
3841     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3842     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3843   cat >> confdefs.h <<EOF
3844 #define $ac_tr_lib 1
3845 EOF
3846
3847   LIBS="-lnsl_s $LIBS"
3848
3849 else
3850   echo "$ac_t""no" 1>&6
3851 fi
3852  ;;
3853     esac
3854     case "$LIBS" in
3855     *-lnsl*) ;;
3856     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
3857 echo "configure:3858: checking for printf in -lnsl" >&5
3858 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
3859 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3860   echo $ac_n "(cached) $ac_c" 1>&6
3861 else
3862   ac_save_LIBS="$LIBS"
3863 LIBS="-lnsl  $LIBS"
3864 cat > conftest.$ac_ext <<EOF
3865 #line 3866 "configure"
3866 #include "confdefs.h"
3867 /* Override any gcc2 internal prototype to avoid an error.  */
3868 /* We use char because int might match the return type of a gcc2
3869     builtin and then its argument prototype would still apply.  */
3870 char printf();
3871
3872 int main() {
3873 printf()
3874 ; return 0; }
3875 EOF
3876 if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3877   rm -rf conftest*
3878   eval "ac_cv_lib_$ac_lib_var=yes"
3879 else
3880   echo "configure: failed program was:" >&5
3881   cat conftest.$ac_ext >&5
3882   rm -rf conftest*
3883   eval "ac_cv_lib_$ac_lib_var=no"
3884 fi
3885 rm -f conftest*
3886 LIBS="$ac_save_LIBS"
3887
3888 fi
3889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3890   echo "$ac_t""yes" 1>&6
3891     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3892     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3893   cat >> confdefs.h <<EOF
3894 #define $ac_tr_lib 1
3895 EOF
3896
3897   LIBS="-lnsl $LIBS"
3898
3899 else
3900   echo "$ac_t""no" 1>&6
3901 fi
3902  ;;
3903     esac
3904     case "$LIBS" in
3905     *-lsocket*) ;;
3906     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3907 echo "configure:3908: checking for connect in -lsocket" >&5
3908 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3910   echo $ac_n "(cached) $ac_c" 1>&6
3911 else
3912   ac_save_LIBS="$LIBS"
3913 LIBS="-lsocket  $LIBS"
3914 cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917 /* Override any gcc2 internal prototype to avoid an error.  */
3918 /* We use char because int might match the return type of a gcc2
3919     builtin and then its argument prototype would still apply.  */
3920 char connect();
3921
3922 int main() {
3923 connect()
3924 ; return 0; }
3925 EOF
3926 if { (eval echo configure:3927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3927   rm -rf conftest*
3928   eval "ac_cv_lib_$ac_lib_var=yes"
3929 else
3930   echo "configure: failed program was:" >&5
3931   cat conftest.$ac_ext >&5
3932   rm -rf conftest*
3933   eval "ac_cv_lib_$ac_lib_var=no"
3934 fi
3935 rm -f conftest*
3936 LIBS="$ac_save_LIBS"
3937
3938 fi
3939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3940   echo "$ac_t""yes" 1>&6
3941     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3942     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3943   cat >> confdefs.h <<EOF
3944 #define $ac_tr_lib 1
3945 EOF
3946
3947   LIBS="-lsocket $LIBS"
3948
3949 else
3950   echo "$ac_t""no" 1>&6
3951 fi
3952  ;;
3953     esac
3954     case "$LIBS" in
3955     *-linet*) ;;
3956     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
3957 echo "configure:3958: checking for connect in -linet" >&5
3958 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
3959 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3960   echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962   ac_save_LIBS="$LIBS"
3963 LIBS="-linet  $LIBS"
3964 cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3967 /* Override any gcc2 internal prototype to avoid an error.  */
3968 /* We use char because int might match the return type of a gcc2
3969     builtin and then its argument prototype would still apply.  */
3970 char connect();
3971
3972 int main() {
3973 connect()
3974 ; return 0; }
3975 EOF
3976 if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3977   rm -rf conftest*
3978   eval "ac_cv_lib_$ac_lib_var=yes"
3979 else
3980   echo "configure: failed program was:" >&5
3981   cat conftest.$ac_ext >&5
3982   rm -rf conftest*
3983   eval "ac_cv_lib_$ac_lib_var=no"
3984 fi
3985 rm -f conftest*
3986 LIBS="$ac_save_LIBS"
3987
3988 fi
3989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3990   echo "$ac_t""yes" 1>&6
3991     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3992     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3993   cat >> confdefs.h <<EOF
3994 #define $ac_tr_lib 1
3995 EOF
3996
3997   LIBS="-linet $LIBS"
3998
3999 else
4000   echo "$ac_t""no" 1>&6
4001 fi
4002  ;;
4003     esac
4004             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4005        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4006         # ac_cv_func_connect=yes
4007         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4008         cat >> confdefs.h <<\EOF
4009 #define HAVE_CONNECT 1
4010 EOF
4011
4012     fi
4013 fi
4014
4015 # Check if we have execl, if not we need to compile smbrun.
4016 for ac_func in execl
4017 do
4018 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4019 echo "configure:4020: checking for $ac_func" >&5
4020 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4021   echo $ac_n "(cached) $ac_c" 1>&6
4022 else
4023   cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 /* System header to define __stub macros and hopefully few prototypes,
4027     which can conflict with char $ac_func(); below.  */
4028 #include <assert.h>
4029 /* Override any gcc2 internal prototype to avoid an error.  */
4030 /* We use char because int might match the return type of a gcc2
4031     builtin and then its argument prototype would still apply.  */
4032 char $ac_func();
4033
4034 int main() {
4035
4036 /* The GNU C library defines this for functions which it implements
4037     to always fail with ENOSYS.  Some functions are actually named
4038     something starting with __ and the normal name is an alias.  */
4039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4040 choke me
4041 #else
4042 $ac_func();
4043 #endif
4044
4045 ; return 0; }
4046 EOF
4047 if { (eval echo configure:4048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4048   rm -rf conftest*
4049   eval "ac_cv_func_$ac_func=yes"
4050 else
4051   echo "configure: failed program was:" >&5
4052   cat conftest.$ac_ext >&5
4053   rm -rf conftest*
4054   eval "ac_cv_func_$ac_func=no"
4055 fi
4056 rm -f conftest*
4057 fi
4058
4059 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4060   echo "$ac_t""yes" 1>&6
4061     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4062   cat >> confdefs.h <<EOF
4063 #define $ac_tr_func 1
4064 EOF
4065  
4066 else
4067   echo "$ac_t""no" 1>&6
4068 fi
4069 done
4070
4071 if test x"$ac_cv_func_execl" = x"no"; then
4072     RUNPROG="bin/smbrun"
4073 else
4074     RUNPROG=""
4075 fi
4076
4077 for ac_func in waitpid getcwd strdup strtoul strerror chown chmod chroot
4078 do
4079 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4080 echo "configure:4081: checking for $ac_func" >&5
4081 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4082   echo $ac_n "(cached) $ac_c" 1>&6
4083 else
4084   cat > conftest.$ac_ext <<EOF
4085 #line 4086 "configure"
4086 #include "confdefs.h"
4087 /* System header to define __stub macros and hopefully few prototypes,
4088     which can conflict with char $ac_func(); below.  */
4089 #include <assert.h>
4090 /* Override any gcc2 internal prototype to avoid an error.  */
4091 /* We use char because int might match the return type of a gcc2
4092     builtin and then its argument prototype would still apply.  */
4093 char $ac_func();
4094
4095 int main() {
4096
4097 /* The GNU C library defines this for functions which it implements
4098     to always fail with ENOSYS.  Some functions are actually named
4099     something starting with __ and the normal name is an alias.  */
4100 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4101 choke me
4102 #else
4103 $ac_func();
4104 #endif
4105
4106 ; return 0; }
4107 EOF
4108 if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4109   rm -rf conftest*
4110   eval "ac_cv_func_$ac_func=yes"
4111 else
4112   echo "configure: failed program was:" >&5
4113   cat conftest.$ac_ext >&5
4114   rm -rf conftest*
4115   eval "ac_cv_func_$ac_func=no"
4116 fi
4117 rm -f conftest*
4118 fi
4119
4120 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4121   echo "$ac_t""yes" 1>&6
4122     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4123   cat >> confdefs.h <<EOF
4124 #define $ac_tr_func 1
4125 EOF
4126  
4127 else
4128   echo "$ac_t""no" 1>&6
4129 fi
4130 done
4131
4132 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
4133 do
4134 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4135 echo "configure:4136: checking for $ac_func" >&5
4136 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   cat > conftest.$ac_ext <<EOF
4140 #line 4141 "configure"
4141 #include "confdefs.h"
4142 /* System header to define __stub macros and hopefully few prototypes,
4143     which can conflict with char $ac_func(); below.  */
4144 #include <assert.h>
4145 /* Override any gcc2 internal prototype to avoid an error.  */
4146 /* We use char because int might match the return type of a gcc2
4147     builtin and then its argument prototype would still apply.  */
4148 char $ac_func();
4149
4150 int main() {
4151
4152 /* The GNU C library defines this for functions which it implements
4153     to always fail with ENOSYS.  Some functions are actually named
4154     something starting with __ and the normal name is an alias.  */
4155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4156 choke me
4157 #else
4158 $ac_func();
4159 #endif
4160
4161 ; return 0; }
4162 EOF
4163 if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4164   rm -rf conftest*
4165   eval "ac_cv_func_$ac_func=yes"
4166 else
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   eval "ac_cv_func_$ac_func=no"
4171 fi
4172 rm -f conftest*
4173 fi
4174
4175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4176   echo "$ac_t""yes" 1>&6
4177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4178   cat >> confdefs.h <<EOF
4179 #define $ac_tr_func 1
4180 EOF
4181  
4182 else
4183   echo "$ac_t""no" 1>&6
4184 fi
4185 done
4186
4187 for ac_func in memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid
4188 do
4189 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4190 echo "configure:4191: checking for $ac_func" >&5
4191 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 /* System header to define __stub macros and hopefully few prototypes,
4198     which can conflict with char $ac_func(); below.  */
4199 #include <assert.h>
4200 /* Override any gcc2 internal prototype to avoid an error.  */
4201 /* We use char because int might match the return type of a gcc2
4202     builtin and then its argument prototype would still apply.  */
4203 char $ac_func();
4204
4205 int main() {
4206
4207 /* The GNU C library defines this for functions which it implements
4208     to always fail with ENOSYS.  Some functions are actually named
4209     something starting with __ and the normal name is an alias.  */
4210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4211 choke me
4212 #else
4213 $ac_func();
4214 #endif
4215
4216 ; return 0; }
4217 EOF
4218 if { (eval echo configure:4219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4219   rm -rf conftest*
4220   eval "ac_cv_func_$ac_func=yes"
4221 else
4222   echo "configure: failed program was:" >&5
4223   cat conftest.$ac_ext >&5
4224   rm -rf conftest*
4225   eval "ac_cv_func_$ac_func=no"
4226 fi
4227 rm -f conftest*
4228 fi
4229
4230 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4231   echo "$ac_t""yes" 1>&6
4232     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4233   cat >> confdefs.h <<EOF
4234 #define $ac_tr_func 1
4235 EOF
4236  
4237 else
4238   echo "$ac_t""no" 1>&6
4239 fi
4240 done
4241
4242 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
4243 do
4244 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4245 echo "configure:4246: checking for $ac_func" >&5
4246 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4247   echo $ac_n "(cached) $ac_c" 1>&6
4248 else
4249   cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 /* System header to define __stub macros and hopefully few prototypes,
4253     which can conflict with char $ac_func(); below.  */
4254 #include <assert.h>
4255 /* Override any gcc2 internal prototype to avoid an error.  */
4256 /* We use char because int might match the return type of a gcc2
4257     builtin and then its argument prototype would still apply.  */
4258 char $ac_func();
4259
4260 int main() {
4261
4262 /* The GNU C library defines this for functions which it implements
4263     to always fail with ENOSYS.  Some functions are actually named
4264     something starting with __ and the normal name is an alias.  */
4265 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4266 choke me
4267 #else
4268 $ac_func();
4269 #endif
4270
4271 ; return 0; }
4272 EOF
4273 if { (eval echo configure:4274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4274   rm -rf conftest*
4275   eval "ac_cv_func_$ac_func=yes"
4276 else
4277   echo "configure: failed program was:" >&5
4278   cat conftest.$ac_ext >&5
4279   rm -rf conftest*
4280   eval "ac_cv_func_$ac_func=no"
4281 fi
4282 rm -f conftest*
4283 fi
4284
4285 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4286   echo "$ac_t""yes" 1>&6
4287     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4288   cat >> confdefs.h <<EOF
4289 #define $ac_tr_func 1
4290 EOF
4291  
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295 done
4296
4297 for ac_func in initgroups select rdchk getgrnam getgrent pathconf
4298 do
4299 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4300 echo "configure:4301: checking for $ac_func" >&5
4301 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4302   echo $ac_n "(cached) $ac_c" 1>&6
4303 else
4304   cat > conftest.$ac_ext <<EOF
4305 #line 4306 "configure"
4306 #include "confdefs.h"
4307 /* System header to define __stub macros and hopefully few prototypes,
4308     which can conflict with char $ac_func(); below.  */
4309 #include <assert.h>
4310 /* Override any gcc2 internal prototype to avoid an error.  */
4311 /* We use char because int might match the return type of a gcc2
4312     builtin and then its argument prototype would still apply.  */
4313 char $ac_func();
4314
4315 int main() {
4316
4317 /* The GNU C library defines this for functions which it implements
4318     to always fail with ENOSYS.  Some functions are actually named
4319     something starting with __ and the normal name is an alias.  */
4320 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4321 choke me
4322 #else
4323 $ac_func();
4324 #endif
4325
4326 ; return 0; }
4327 EOF
4328 if { (eval echo configure:4329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4329   rm -rf conftest*
4330   eval "ac_cv_func_$ac_func=yes"
4331 else
4332   echo "configure: failed program was:" >&5
4333   cat conftest.$ac_ext >&5
4334   rm -rf conftest*
4335   eval "ac_cv_func_$ac_func=no"
4336 fi
4337 rm -f conftest*
4338 fi
4339
4340 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4341   echo "$ac_t""yes" 1>&6
4342     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4343   cat >> confdefs.h <<EOF
4344 #define $ac_tr_func 1
4345 EOF
4346  
4347 else
4348   echo "$ac_t""no" 1>&6
4349 fi
4350 done
4351
4352 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
4353 do
4354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4355 echo "configure:4356: checking for $ac_func" >&5
4356 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   cat > conftest.$ac_ext <<EOF
4360 #line 4361 "configure"
4361 #include "confdefs.h"
4362 /* System header to define __stub macros and hopefully few prototypes,
4363     which can conflict with char $ac_func(); below.  */
4364 #include <assert.h>
4365 /* Override any gcc2 internal prototype to avoid an error.  */
4366 /* We use char because int might match the return type of a gcc2
4367     builtin and then its argument prototype would still apply.  */
4368 char $ac_func();
4369
4370 int main() {
4371
4372 /* The GNU C library defines this for functions which it implements
4373     to always fail with ENOSYS.  Some functions are actually named
4374     something starting with __ and the normal name is an alias.  */
4375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4376 choke me
4377 #else
4378 $ac_func();
4379 #endif
4380
4381 ; return 0; }
4382 EOF
4383 if { (eval echo configure:4384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4384   rm -rf conftest*
4385   eval "ac_cv_func_$ac_func=yes"
4386 else
4387   echo "configure: failed program was:" >&5
4388   cat conftest.$ac_ext >&5
4389   rm -rf conftest*
4390   eval "ac_cv_func_$ac_func=no"
4391 fi
4392 rm -f conftest*
4393 fi
4394
4395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4396   echo "$ac_t""yes" 1>&6
4397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4398   cat >> confdefs.h <<EOF
4399 #define $ac_tr_func 1
4400 EOF
4401  
4402 else
4403   echo "$ac_t""no" 1>&6
4404 fi
4405 done
4406
4407 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
4408 do
4409 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4410 echo "configure:4411: checking for $ac_func" >&5
4411 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   cat > conftest.$ac_ext <<EOF
4415 #line 4416 "configure"
4416 #include "confdefs.h"
4417 /* System header to define __stub macros and hopefully few prototypes,
4418     which can conflict with char $ac_func(); below.  */
4419 #include <assert.h>
4420 /* Override any gcc2 internal prototype to avoid an error.  */
4421 /* We use char because int might match the return type of a gcc2
4422     builtin and then its argument prototype would still apply.  */
4423 char $ac_func();
4424
4425 int main() {
4426
4427 /* The GNU C library defines this for functions which it implements
4428     to always fail with ENOSYS.  Some functions are actually named
4429     something starting with __ and the normal name is an alias.  */
4430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4431 choke me
4432 #else
4433 $ac_func();
4434 #endif
4435
4436 ; return 0; }
4437 EOF
4438 if { (eval echo configure:4439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4439   rm -rf conftest*
4440   eval "ac_cv_func_$ac_func=yes"
4441 else
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444   rm -rf conftest*
4445   eval "ac_cv_func_$ac_func=no"
4446 fi
4447 rm -f conftest*
4448 fi
4449
4450 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4451   echo "$ac_t""yes" 1>&6
4452     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4453   cat >> confdefs.h <<EOF
4454 #define $ac_tr_func 1
4455 EOF
4456  
4457 else
4458   echo "$ac_t""no" 1>&6
4459 fi
4460 done
4461
4462 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid yp_get_default_domain getpwanam
4463 do
4464 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4465 echo "configure:4466: checking for $ac_func" >&5
4466 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4467   echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469   cat > conftest.$ac_ext <<EOF
4470 #line 4471 "configure"
4471 #include "confdefs.h"
4472 /* System header to define __stub macros and hopefully few prototypes,
4473     which can conflict with char $ac_func(); below.  */
4474 #include <assert.h>
4475 /* Override any gcc2 internal prototype to avoid an error.  */
4476 /* We use char because int might match the return type of a gcc2
4477     builtin and then its argument prototype would still apply.  */
4478 char $ac_func();
4479
4480 int main() {
4481
4482 /* The GNU C library defines this for functions which it implements
4483     to always fail with ENOSYS.  Some functions are actually named
4484     something starting with __ and the normal name is an alias.  */
4485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4486 choke me
4487 #else
4488 $ac_func();
4489 #endif
4490
4491 ; return 0; }
4492 EOF
4493 if { (eval echo configure:4494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4494   rm -rf conftest*
4495   eval "ac_cv_func_$ac_func=yes"
4496 else
4497   echo "configure: failed program was:" >&5
4498   cat conftest.$ac_ext >&5
4499   rm -rf conftest*
4500   eval "ac_cv_func_$ac_func=no"
4501 fi
4502 rm -f conftest*
4503 fi
4504
4505 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4506   echo "$ac_t""yes" 1>&6
4507     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4508   cat >> confdefs.h <<EOF
4509 #define $ac_tr_func 1
4510 EOF
4511  
4512 else
4513   echo "$ac_t""no" 1>&6
4514 fi
4515 done
4516
4517 for ac_func in srandom random srand rand setenv usleep mmap64 strcasecmp fcvt fcvtl
4518 do
4519 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4520 echo "configure:4521: checking for $ac_func" >&5
4521 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4522   echo $ac_n "(cached) $ac_c" 1>&6
4523 else
4524   cat > conftest.$ac_ext <<EOF
4525 #line 4526 "configure"
4526 #include "confdefs.h"
4527 /* System header to define __stub macros and hopefully few prototypes,
4528     which can conflict with char $ac_func(); below.  */
4529 #include <assert.h>
4530 /* Override any gcc2 internal prototype to avoid an error.  */
4531 /* We use char because int might match the return type of a gcc2
4532     builtin and then its argument prototype would still apply.  */
4533 char $ac_func();
4534
4535 int main() {
4536
4537 /* The GNU C library defines this for functions which it implements
4538     to always fail with ENOSYS.  Some functions are actually named
4539     something starting with __ and the normal name is an alias.  */
4540 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4541 choke me
4542 #else
4543 $ac_func();
4544 #endif
4545
4546 ; return 0; }
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4549   rm -rf conftest*
4550   eval "ac_cv_func_$ac_func=yes"
4551 else
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -rf conftest*
4555   eval "ac_cv_func_$ac_func=no"
4556 fi
4557 rm -f conftest*
4558 fi
4559
4560 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4561   echo "$ac_t""yes" 1>&6
4562     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4563   cat >> confdefs.h <<EOF
4564 #define $ac_tr_func 1
4565 EOF
4566  
4567 else
4568   echo "$ac_t""no" 1>&6
4569 fi
4570 done
4571
4572
4573 # syscall() is needed for smbwrapper.
4574 for ac_func in syscall
4575 do
4576 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4577 echo "configure:4578: checking for $ac_func" >&5
4578 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4579   echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581   cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 /* System header to define __stub macros and hopefully few prototypes,
4585     which can conflict with char $ac_func(); below.  */
4586 #include <assert.h>
4587 /* Override any gcc2 internal prototype to avoid an error.  */
4588 /* We use char because int might match the return type of a gcc2
4589     builtin and then its argument prototype would still apply.  */
4590 char $ac_func();
4591
4592 int main() {
4593
4594 /* The GNU C library defines this for functions which it implements
4595     to always fail with ENOSYS.  Some functions are actually named
4596     something starting with __ and the normal name is an alias.  */
4597 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4598 choke me
4599 #else
4600 $ac_func();
4601 #endif
4602
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606   rm -rf conftest*
4607   eval "ac_cv_func_$ac_func=yes"
4608 else
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   eval "ac_cv_func_$ac_func=no"
4613 fi
4614 rm -f conftest*
4615 fi
4616
4617 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4618   echo "$ac_t""yes" 1>&6
4619     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4620   cat >> confdefs.h <<EOF
4621 #define $ac_tr_func 1
4622 EOF
4623  
4624 else
4625   echo "$ac_t""no" 1>&6
4626 fi
4627 done
4628
4629
4630 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
4631 do
4632 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4633 echo "configure:4634: checking for $ac_func" >&5
4634 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640 /* System header to define __stub macros and hopefully few prototypes,
4641     which can conflict with char $ac_func(); below.  */
4642 #include <assert.h>
4643 /* Override any gcc2 internal prototype to avoid an error.  */
4644 /* We use char because int might match the return type of a gcc2
4645     builtin and then its argument prototype would still apply.  */
4646 char $ac_func();
4647
4648 int main() {
4649
4650 /* The GNU C library defines this for functions which it implements
4651     to always fail with ENOSYS.  Some functions are actually named
4652     something starting with __ and the normal name is an alias.  */
4653 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4654 choke me
4655 #else
4656 $ac_func();
4657 #endif
4658
4659 ; return 0; }
4660 EOF
4661 if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4662   rm -rf conftest*
4663   eval "ac_cv_func_$ac_func=yes"
4664 else
4665   echo "configure: failed program was:" >&5
4666   cat conftest.$ac_ext >&5
4667   rm -rf conftest*
4668   eval "ac_cv_func_$ac_func=no"
4669 fi
4670 rm -f conftest*
4671 fi
4672
4673 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4674   echo "$ac_t""yes" 1>&6
4675     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4676   cat >> confdefs.h <<EOF
4677 #define $ac_tr_func 1
4678 EOF
4679  
4680 else
4681   echo "$ac_t""no" 1>&6
4682 fi
4683 done
4684
4685 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
4686 do
4687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4688 echo "configure:4689: checking for $ac_func" >&5
4689 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4690   echo $ac_n "(cached) $ac_c" 1>&6
4691 else
4692   cat > conftest.$ac_ext <<EOF
4693 #line 4694 "configure"
4694 #include "confdefs.h"
4695 /* System header to define __stub macros and hopefully few prototypes,
4696     which can conflict with char $ac_func(); below.  */
4697 #include <assert.h>
4698 /* Override any gcc2 internal prototype to avoid an error.  */
4699 /* We use char because int might match the return type of a gcc2
4700     builtin and then its argument prototype would still apply.  */
4701 char $ac_func();
4702
4703 int main() {
4704
4705 /* The GNU C library defines this for functions which it implements
4706     to always fail with ENOSYS.  Some functions are actually named
4707     something starting with __ and the normal name is an alias.  */
4708 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4709 choke me
4710 #else
4711 $ac_func();
4712 #endif
4713
4714 ; return 0; }
4715 EOF
4716 if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4717   rm -rf conftest*
4718   eval "ac_cv_func_$ac_func=yes"
4719 else
4720   echo "configure: failed program was:" >&5
4721   cat conftest.$ac_ext >&5
4722   rm -rf conftest*
4723   eval "ac_cv_func_$ac_func=no"
4724 fi
4725 rm -f conftest*
4726 fi
4727
4728 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4729   echo "$ac_t""yes" 1>&6
4730     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4731   cat >> confdefs.h <<EOF
4732 #define $ac_tr_func 1
4733 EOF
4734  
4735 else
4736   echo "$ac_t""no" 1>&6
4737 fi
4738 done
4739
4740 for ac_func in __getcwd _getcwd
4741 do
4742 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4743 echo "configure:4744: checking for $ac_func" >&5
4744 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4745   echo $ac_n "(cached) $ac_c" 1>&6
4746 else
4747   cat > conftest.$ac_ext <<EOF
4748 #line 4749 "configure"
4749 #include "confdefs.h"
4750 /* System header to define __stub macros and hopefully few prototypes,
4751     which can conflict with char $ac_func(); below.  */
4752 #include <assert.h>
4753 /* Override any gcc2 internal prototype to avoid an error.  */
4754 /* We use char because int might match the return type of a gcc2
4755     builtin and then its argument prototype would still apply.  */
4756 char $ac_func();
4757
4758 int main() {
4759
4760 /* The GNU C library defines this for functions which it implements
4761     to always fail with ENOSYS.  Some functions are actually named
4762     something starting with __ and the normal name is an alias.  */
4763 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4764 choke me
4765 #else
4766 $ac_func();
4767 #endif
4768
4769 ; return 0; }
4770 EOF
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4772   rm -rf conftest*
4773   eval "ac_cv_func_$ac_func=yes"
4774 else
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   eval "ac_cv_func_$ac_func=no"
4779 fi
4780 rm -f conftest*
4781 fi
4782
4783 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4786   cat >> confdefs.h <<EOF
4787 #define $ac_tr_func 1
4788 EOF
4789  
4790 else
4791   echo "$ac_t""no" 1>&6
4792 fi
4793 done
4794
4795 for ac_func in __xstat __fxstat __lxstat
4796 do
4797 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4798 echo "configure:4799: checking for $ac_func" >&5
4799 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4800   echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802   cat > conftest.$ac_ext <<EOF
4803 #line 4804 "configure"
4804 #include "confdefs.h"
4805 /* System header to define __stub macros and hopefully few prototypes,
4806     which can conflict with char $ac_func(); below.  */
4807 #include <assert.h>
4808 /* Override any gcc2 internal prototype to avoid an error.  */
4809 /* We use char because int might match the return type of a gcc2
4810     builtin and then its argument prototype would still apply.  */
4811 char $ac_func();
4812
4813 int main() {
4814
4815 /* The GNU C library defines this for functions which it implements
4816     to always fail with ENOSYS.  Some functions are actually named
4817     something starting with __ and the normal name is an alias.  */
4818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4819 choke me
4820 #else
4821 $ac_func();
4822 #endif
4823
4824 ; return 0; }
4825 EOF
4826 if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4827   rm -rf conftest*
4828   eval "ac_cv_func_$ac_func=yes"
4829 else
4830   echo "configure: failed program was:" >&5
4831   cat conftest.$ac_ext >&5
4832   rm -rf conftest*
4833   eval "ac_cv_func_$ac_func=no"
4834 fi
4835 rm -f conftest*
4836 fi
4837
4838 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4839   echo "$ac_t""yes" 1>&6
4840     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4841   cat >> confdefs.h <<EOF
4842 #define $ac_tr_func 1
4843 EOF
4844  
4845 else
4846   echo "$ac_t""no" 1>&6
4847 fi
4848 done
4849
4850 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
4851 do
4852 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4853 echo "configure:4854: checking for $ac_func" >&5
4854 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4855   echo $ac_n "(cached) $ac_c" 1>&6
4856 else
4857   cat > conftest.$ac_ext <<EOF
4858 #line 4859 "configure"
4859 #include "confdefs.h"
4860 /* System header to define __stub macros and hopefully few prototypes,
4861     which can conflict with char $ac_func(); below.  */
4862 #include <assert.h>
4863 /* Override any gcc2 internal prototype to avoid an error.  */
4864 /* We use char because int might match the return type of a gcc2
4865     builtin and then its argument prototype would still apply.  */
4866 char $ac_func();
4867
4868 int main() {
4869
4870 /* The GNU C library defines this for functions which it implements
4871     to always fail with ENOSYS.  Some functions are actually named
4872     something starting with __ and the normal name is an alias.  */
4873 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4874 choke me
4875 #else
4876 $ac_func();
4877 #endif
4878
4879 ; return 0; }
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4882   rm -rf conftest*
4883   eval "ac_cv_func_$ac_func=yes"
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   eval "ac_cv_func_$ac_func=no"
4889 fi
4890 rm -f conftest*
4891 fi
4892
4893 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4894   echo "$ac_t""yes" 1>&6
4895     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4896   cat >> confdefs.h <<EOF
4897 #define $ac_tr_func 1
4898 EOF
4899  
4900 else
4901   echo "$ac_t""no" 1>&6
4902 fi
4903 done
4904
4905 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
4906 do
4907 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4908 echo "configure:4909: checking for $ac_func" >&5
4909 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4910   echo $ac_n "(cached) $ac_c" 1>&6
4911 else
4912   cat > conftest.$ac_ext <<EOF
4913 #line 4914 "configure"
4914 #include "confdefs.h"
4915 /* System header to define __stub macros and hopefully few prototypes,
4916     which can conflict with char $ac_func(); below.  */
4917 #include <assert.h>
4918 /* Override any gcc2 internal prototype to avoid an error.  */
4919 /* We use char because int might match the return type of a gcc2
4920     builtin and then its argument prototype would still apply.  */
4921 char $ac_func();
4922
4923 int main() {
4924
4925 /* The GNU C library defines this for functions which it implements
4926     to always fail with ENOSYS.  Some functions are actually named
4927     something starting with __ and the normal name is an alias.  */
4928 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4929 choke me
4930 #else
4931 $ac_func();
4932 #endif
4933
4934 ; return 0; }
4935 EOF
4936 if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4937   rm -rf conftest*
4938   eval "ac_cv_func_$ac_func=yes"
4939 else
4940   echo "configure: failed program was:" >&5
4941   cat conftest.$ac_ext >&5
4942   rm -rf conftest*
4943   eval "ac_cv_func_$ac_func=no"
4944 fi
4945 rm -f conftest*
4946 fi
4947
4948 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4949   echo "$ac_t""yes" 1>&6
4950     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4951   cat >> confdefs.h <<EOF
4952 #define $ac_tr_func 1
4953 EOF
4954  
4955 else
4956   echo "$ac_t""no" 1>&6
4957 fi
4958 done
4959
4960 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
4961 do
4962 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4963 echo "configure:4964: checking for $ac_func" >&5
4964 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4965   echo $ac_n "(cached) $ac_c" 1>&6
4966 else
4967   cat > conftest.$ac_ext <<EOF
4968 #line 4969 "configure"
4969 #include "confdefs.h"
4970 /* System header to define __stub macros and hopefully few prototypes,
4971     which can conflict with char $ac_func(); below.  */
4972 #include <assert.h>
4973 /* Override any gcc2 internal prototype to avoid an error.  */
4974 /* We use char because int might match the return type of a gcc2
4975     builtin and then its argument prototype would still apply.  */
4976 char $ac_func();
4977
4978 int main() {
4979
4980 /* The GNU C library defines this for functions which it implements
4981     to always fail with ENOSYS.  Some functions are actually named
4982     something starting with __ and the normal name is an alias.  */
4983 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4984 choke me
4985 #else
4986 $ac_func();
4987 #endif
4988
4989 ; return 0; }
4990 EOF
4991 if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4992   rm -rf conftest*
4993   eval "ac_cv_func_$ac_func=yes"
4994 else
4995   echo "configure: failed program was:" >&5
4996   cat conftest.$ac_ext >&5
4997   rm -rf conftest*
4998   eval "ac_cv_func_$ac_func=no"
4999 fi
5000 rm -f conftest*
5001 fi
5002
5003 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5004   echo "$ac_t""yes" 1>&6
5005     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5006   cat >> confdefs.h <<EOF
5007 #define $ac_tr_func 1
5008 EOF
5009  
5010 else
5011   echo "$ac_t""no" 1>&6
5012 fi
5013 done
5014
5015 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5016 do
5017 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5018 echo "configure:5019: checking for $ac_func" >&5
5019 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5020   echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022   cat > conftest.$ac_ext <<EOF
5023 #line 5024 "configure"
5024 #include "confdefs.h"
5025 /* System header to define __stub macros and hopefully few prototypes,
5026     which can conflict with char $ac_func(); below.  */
5027 #include <assert.h>
5028 /* Override any gcc2 internal prototype to avoid an error.  */
5029 /* We use char because int might match the return type of a gcc2
5030     builtin and then its argument prototype would still apply.  */
5031 char $ac_func();
5032
5033 int main() {
5034
5035 /* The GNU C library defines this for functions which it implements
5036     to always fail with ENOSYS.  Some functions are actually named
5037     something starting with __ and the normal name is an alias.  */
5038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5039 choke me
5040 #else
5041 $ac_func();
5042 #endif
5043
5044 ; return 0; }
5045 EOF
5046 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5047   rm -rf conftest*
5048   eval "ac_cv_func_$ac_func=yes"
5049 else
5050   echo "configure: failed program was:" >&5
5051   cat conftest.$ac_ext >&5
5052   rm -rf conftest*
5053   eval "ac_cv_func_$ac_func=no"
5054 fi
5055 rm -f conftest*
5056 fi
5057
5058 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5059   echo "$ac_t""yes" 1>&6
5060     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5061   cat >> confdefs.h <<EOF
5062 #define $ac_tr_func 1
5063 EOF
5064  
5065 else
5066   echo "$ac_t""no" 1>&6
5067 fi
5068 done
5069
5070 for ac_func in _write __write _fork __fork
5071 do
5072 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5073 echo "configure:5074: checking for $ac_func" >&5
5074 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5075   echo $ac_n "(cached) $ac_c" 1>&6
5076 else
5077   cat > conftest.$ac_ext <<EOF
5078 #line 5079 "configure"
5079 #include "confdefs.h"
5080 /* System header to define __stub macros and hopefully few prototypes,
5081     which can conflict with char $ac_func(); below.  */
5082 #include <assert.h>
5083 /* Override any gcc2 internal prototype to avoid an error.  */
5084 /* We use char because int might match the return type of a gcc2
5085     builtin and then its argument prototype would still apply.  */
5086 char $ac_func();
5087
5088 int main() {
5089
5090 /* The GNU C library defines this for functions which it implements
5091     to always fail with ENOSYS.  Some functions are actually named
5092     something starting with __ and the normal name is an alias.  */
5093 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5094 choke me
5095 #else
5096 $ac_func();
5097 #endif
5098
5099 ; return 0; }
5100 EOF
5101 if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5102   rm -rf conftest*
5103   eval "ac_cv_func_$ac_func=yes"
5104 else
5105   echo "configure: failed program was:" >&5
5106   cat conftest.$ac_ext >&5
5107   rm -rf conftest*
5108   eval "ac_cv_func_$ac_func=no"
5109 fi
5110 rm -f conftest*
5111 fi
5112
5113 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5114   echo "$ac_t""yes" 1>&6
5115     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5116   cat >> confdefs.h <<EOF
5117 #define $ac_tr_func 1
5118 EOF
5119  
5120 else
5121   echo "$ac_t""no" 1>&6
5122 fi
5123 done
5124
5125 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
5126 do
5127 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5128 echo "configure:5129: checking for $ac_func" >&5
5129 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5130   echo $ac_n "(cached) $ac_c" 1>&6
5131 else
5132   cat > conftest.$ac_ext <<EOF
5133 #line 5134 "configure"
5134 #include "confdefs.h"
5135 /* System header to define __stub macros and hopefully few prototypes,
5136     which can conflict with char $ac_func(); below.  */
5137 #include <assert.h>
5138 /* Override any gcc2 internal prototype to avoid an error.  */
5139 /* We use char because int might match the return type of a gcc2
5140     builtin and then its argument prototype would still apply.  */
5141 char $ac_func();
5142
5143 int main() {
5144
5145 /* The GNU C library defines this for functions which it implements
5146     to always fail with ENOSYS.  Some functions are actually named
5147     something starting with __ and the normal name is an alias.  */
5148 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5149 choke me
5150 #else
5151 $ac_func();
5152 #endif
5153
5154 ; return 0; }
5155 EOF
5156 if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5157   rm -rf conftest*
5158   eval "ac_cv_func_$ac_func=yes"
5159 else
5160   echo "configure: failed program was:" >&5
5161   cat conftest.$ac_ext >&5
5162   rm -rf conftest*
5163   eval "ac_cv_func_$ac_func=no"
5164 fi
5165 rm -f conftest*
5166 fi
5167
5168 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5169   echo "$ac_t""yes" 1>&6
5170     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5171   cat >> confdefs.h <<EOF
5172 #define $ac_tr_func 1
5173 EOF
5174  
5175 else
5176   echo "$ac_t""no" 1>&6
5177 fi
5178 done
5179
5180 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
5181 do
5182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5183 echo "configure:5184: checking for $ac_func" >&5
5184 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5185   echo $ac_n "(cached) $ac_c" 1>&6
5186 else
5187   cat > conftest.$ac_ext <<EOF
5188 #line 5189 "configure"
5189 #include "confdefs.h"
5190 /* System header to define __stub macros and hopefully few prototypes,
5191     which can conflict with char $ac_func(); below.  */
5192 #include <assert.h>
5193 /* Override any gcc2 internal prototype to avoid an error.  */
5194 /* We use char because int might match the return type of a gcc2
5195     builtin and then its argument prototype would still apply.  */
5196 char $ac_func();
5197
5198 int main() {
5199
5200 /* The GNU C library defines this for functions which it implements
5201     to always fail with ENOSYS.  Some functions are actually named
5202     something starting with __ and the normal name is an alias.  */
5203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5204 choke me
5205 #else
5206 $ac_func();
5207 #endif
5208
5209 ; return 0; }
5210 EOF
5211 if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5212   rm -rf conftest*
5213   eval "ac_cv_func_$ac_func=yes"
5214 else
5215   echo "configure: failed program was:" >&5
5216   cat conftest.$ac_ext >&5
5217   rm -rf conftest*
5218   eval "ac_cv_func_$ac_func=no"
5219 fi
5220 rm -f conftest*
5221 fi
5222
5223 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5224   echo "$ac_t""yes" 1>&6
5225     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5226   cat >> confdefs.h <<EOF
5227 #define $ac_tr_func 1
5228 EOF
5229  
5230 else
5231   echo "$ac_t""no" 1>&6
5232 fi
5233 done
5234
5235 for ac_func in pread _pread __pread pread64 _pread64 __pread64
5236 do
5237 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5238 echo "configure:5239: checking for $ac_func" >&5
5239 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242   cat > conftest.$ac_ext <<EOF
5243 #line 5244 "configure"
5244 #include "confdefs.h"
5245 /* System header to define __stub macros and hopefully few prototypes,
5246     which can conflict with char $ac_func(); below.  */
5247 #include <assert.h>
5248 /* Override any gcc2 internal prototype to avoid an error.  */
5249 /* We use char because int might match the return type of a gcc2
5250     builtin and then its argument prototype would still apply.  */
5251 char $ac_func();
5252
5253 int main() {
5254
5255 /* The GNU C library defines this for functions which it implements
5256     to always fail with ENOSYS.  Some functions are actually named
5257     something starting with __ and the normal name is an alias.  */
5258 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5259 choke me
5260 #else
5261 $ac_func();
5262 #endif
5263
5264 ; return 0; }
5265 EOF
5266 if { (eval echo configure:5267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5267   rm -rf conftest*
5268   eval "ac_cv_func_$ac_func=yes"
5269 else
5270   echo "configure: failed program was:" >&5
5271   cat conftest.$ac_ext >&5
5272   rm -rf conftest*
5273   eval "ac_cv_func_$ac_func=no"
5274 fi
5275 rm -f conftest*
5276 fi
5277
5278 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5279   echo "$ac_t""yes" 1>&6
5280     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5281   cat >> confdefs.h <<EOF
5282 #define $ac_tr_func 1
5283 EOF
5284  
5285 else
5286   echo "$ac_t""no" 1>&6
5287 fi
5288 done
5289
5290 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
5291 do
5292 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5293 echo "configure:5294: checking for $ac_func" >&5
5294 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5295   echo $ac_n "(cached) $ac_c" 1>&6
5296 else
5297   cat > conftest.$ac_ext <<EOF
5298 #line 5299 "configure"
5299 #include "confdefs.h"
5300 /* System header to define __stub macros and hopefully few prototypes,
5301     which can conflict with char $ac_func(); below.  */
5302 #include <assert.h>
5303 /* Override any gcc2 internal prototype to avoid an error.  */
5304 /* We use char because int might match the return type of a gcc2
5305     builtin and then its argument prototype would still apply.  */
5306 char $ac_func();
5307
5308 int main() {
5309
5310 /* The GNU C library defines this for functions which it implements
5311     to always fail with ENOSYS.  Some functions are actually named
5312     something starting with __ and the normal name is an alias.  */
5313 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5314 choke me
5315 #else
5316 $ac_func();
5317 #endif
5318
5319 ; return 0; }
5320 EOF
5321 if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5322   rm -rf conftest*
5323   eval "ac_cv_func_$ac_func=yes"
5324 else
5325   echo "configure: failed program was:" >&5
5326   cat conftest.$ac_ext >&5
5327   rm -rf conftest*
5328   eval "ac_cv_func_$ac_func=no"
5329 fi
5330 rm -f conftest*
5331 fi
5332
5333 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5334   echo "$ac_t""yes" 1>&6
5335     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5336   cat >> confdefs.h <<EOF
5337 #define $ac_tr_func 1
5338 EOF
5339  
5340 else
5341   echo "$ac_t""no" 1>&6
5342 fi
5343 done
5344
5345 for ac_func in open64 _open64 __open64 creat64
5346 do
5347 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5348 echo "configure:5349: checking for $ac_func" >&5
5349 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5350   echo $ac_n "(cached) $ac_c" 1>&6
5351 else
5352   cat > conftest.$ac_ext <<EOF
5353 #line 5354 "configure"
5354 #include "confdefs.h"
5355 /* System header to define __stub macros and hopefully few prototypes,
5356     which can conflict with char $ac_func(); below.  */
5357 #include <assert.h>
5358 /* Override any gcc2 internal prototype to avoid an error.  */
5359 /* We use char because int might match the return type of a gcc2
5360     builtin and then its argument prototype would still apply.  */
5361 char $ac_func();
5362
5363 int main() {
5364
5365 /* The GNU C library defines this for functions which it implements
5366     to always fail with ENOSYS.  Some functions are actually named
5367     something starting with __ and the normal name is an alias.  */
5368 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5369 choke me
5370 #else
5371 $ac_func();
5372 #endif
5373
5374 ; return 0; }
5375 EOF
5376 if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5377   rm -rf conftest*
5378   eval "ac_cv_func_$ac_func=yes"
5379 else
5380   echo "configure: failed program was:" >&5
5381   cat conftest.$ac_ext >&5
5382   rm -rf conftest*
5383   eval "ac_cv_func_$ac_func=no"
5384 fi
5385 rm -f conftest*
5386 fi
5387
5388 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5389   echo "$ac_t""yes" 1>&6
5390     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5391   cat >> confdefs.h <<EOF
5392 #define $ac_tr_func 1
5393 EOF
5394  
5395 else
5396   echo "$ac_t""no" 1>&6
5397 fi
5398 done
5399
5400
5401 #
5402 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
5403 #
5404
5405 if test x$ac_cv_func_stat64 = xno ; then
5406   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
5407 echo "configure:5408: checking for stat64 in <sys/stat.h>" >&5
5408   cat > conftest.$ac_ext <<EOF
5409 #line 5410 "configure"
5410 #include "confdefs.h"
5411
5412 #if defined(HAVE_UNISTD_H)
5413 #include <unistd.h>
5414 #endif
5415 #include <sys/stat.h>
5416
5417 int main() {
5418 struct stat64 st64; exit(stat64(".",&st64));
5419 ; return 0; }
5420 EOF
5421 if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5422   rm -rf conftest*
5423   ac_cv_func_stat64=yes
5424 else
5425   echo "configure: failed program was:" >&5
5426   cat conftest.$ac_ext >&5
5427 fi
5428 rm -f conftest*
5429   echo "$ac_t""$ac_cv_func_stat64" 1>&6
5430   if test x$ac_cv_func_stat64 = xyes ; then
5431     cat >> confdefs.h <<\EOF
5432 #define HAVE_STAT64 1
5433 EOF
5434
5435   fi
5436 fi
5437
5438 if test x$ac_cv_func_lstat64 = xno ; then
5439   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
5440 echo "configure:5441: checking for lstat64 in <sys/stat.h>" >&5
5441   cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444
5445 #if defined(HAVE_UNISTD_H)
5446 #include <unistd.h>
5447 #endif
5448 #include <sys/stat.h>
5449
5450 int main() {
5451 struct stat64 st64; exit(lstat64(".",&st64));
5452 ; return 0; }
5453 EOF
5454 if { (eval echo configure:5455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5455   rm -rf conftest*
5456   ac_cv_func_lstat64=yes
5457 else
5458   echo "configure: failed program was:" >&5
5459   cat conftest.$ac_ext >&5
5460 fi
5461 rm -f conftest*
5462   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
5463   if test x$ac_cv_func_lstat64 = xyes ; then
5464     cat >> confdefs.h <<\EOF
5465 #define HAVE_LSTAT64 1
5466 EOF
5467
5468   fi
5469 fi
5470
5471 if test x$ac_cv_func_fstat64 = xno ; then
5472   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
5473 echo "configure:5474: checking for fstat64 in <sys/stat.h>" >&5
5474   cat > conftest.$ac_ext <<EOF
5475 #line 5476 "configure"
5476 #include "confdefs.h"
5477
5478 #if defined(HAVE_UNISTD_H)
5479 #include <unistd.h>
5480 #endif
5481 #include <sys/stat.h>
5482
5483 int main() {
5484 struct stat64 st64; exit(fstat64(0,&st64));
5485 ; return 0; }
5486 EOF
5487 if { (eval echo configure:5488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5488   rm -rf conftest*
5489   ac_cv_func_fstat64=yes
5490 else
5491   echo "configure: failed program was:" >&5
5492   cat conftest.$ac_ext >&5
5493 fi
5494 rm -f conftest*
5495   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
5496   if test x$ac_cv_func_fstat64 = xyes ; then
5497     cat >> confdefs.h <<\EOF
5498 #define HAVE_FSTAT64 1
5499 EOF
5500
5501   fi
5502 fi
5503
5504 #
5505 # If no strcasecmp, check for it in some known places
5506 # It is in -lresolv on ReliantUNIX and UnixWare
5507 #   -lresolve *must* follow -lnsl for name resolution to work properly
5508 #
5509
5510 if test x$ac_cv_func_strcasecmp = xno ; then
5511         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
5512 echo "configure:5513: checking for strcasecmp in -lresolv" >&5
5513 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
5514 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5515   echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517   ac_save_LIBS="$LIBS"
5518 LIBS="-lresolv  $LIBS"
5519 cat > conftest.$ac_ext <<EOF
5520 #line 5521 "configure"
5521 #include "confdefs.h"
5522 /* Override any gcc2 internal prototype to avoid an error.  */
5523 /* We use char because int might match the return type of a gcc2
5524     builtin and then its argument prototype would still apply.  */
5525 char strcasecmp();
5526
5527 int main() {
5528 strcasecmp()
5529 ; return 0; }
5530 EOF
5531 if { (eval echo configure:5532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5532   rm -rf conftest*
5533   eval "ac_cv_lib_$ac_lib_var=yes"
5534 else
5535   echo "configure: failed program was:" >&5
5536   cat conftest.$ac_ext >&5
5537   rm -rf conftest*
5538   eval "ac_cv_lib_$ac_lib_var=no"
5539 fi
5540 rm -f conftest*
5541 LIBS="$ac_save_LIBS"
5542
5543 fi
5544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5545   echo "$ac_t""yes" 1>&6
5546   LIBS="$LIBS -lresolv"
5547                 cat >> confdefs.h <<\EOF
5548 #define HAVE_STRCASECMP 1
5549 EOF
5550
5551 else
5552   echo "$ac_t""no" 1>&6
5553 fi
5554
5555 fi
5556
5557 #
5558 # Check for the functions putprpwnam, set_auth_parameters,
5559 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
5560 # Needed for OSF1 and HPUX.
5561 #
5562
5563 case "$LIBS" in
5564   *-lsecurity*) for ac_func in putprpwnam
5565 do
5566 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5567 echo "configure:5568: checking for $ac_func" >&5
5568 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5569   echo $ac_n "(cached) $ac_c" 1>&6
5570 else
5571   cat > conftest.$ac_ext <<EOF
5572 #line 5573 "configure"
5573 #include "confdefs.h"
5574 /* System header to define __stub macros and hopefully few prototypes,
5575     which can conflict with char $ac_func(); below.  */
5576 #include <assert.h>
5577 /* Override any gcc2 internal prototype to avoid an error.  */
5578 /* We use char because int might match the return type of a gcc2
5579     builtin and then its argument prototype would still apply.  */
5580 char $ac_func();
5581
5582 int main() {
5583
5584 /* The GNU C library defines this for functions which it implements
5585     to always fail with ENOSYS.  Some functions are actually named
5586     something starting with __ and the normal name is an alias.  */
5587 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5588 choke me
5589 #else
5590 $ac_func();
5591 #endif
5592
5593 ; return 0; }
5594 EOF
5595 if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5596   rm -rf conftest*
5597   eval "ac_cv_func_$ac_func=yes"
5598 else
5599   echo "configure: failed program was:" >&5
5600   cat conftest.$ac_ext >&5
5601   rm -rf conftest*
5602   eval "ac_cv_func_$ac_func=no"
5603 fi
5604 rm -f conftest*
5605 fi
5606
5607 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5608   echo "$ac_t""yes" 1>&6
5609     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5610   cat >> confdefs.h <<EOF
5611 #define $ac_tr_func 1
5612 EOF
5613  
5614 else
5615   echo "$ac_t""no" 1>&6
5616 fi
5617 done
5618  ;;
5619   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
5620 echo "configure:5621: checking for putprpwnam in -lsecurity" >&5
5621 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
5622 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5623   echo $ac_n "(cached) $ac_c" 1>&6
5624 else
5625   ac_save_LIBS="$LIBS"
5626 LIBS="-lsecurity  $LIBS"
5627 cat > conftest.$ac_ext <<EOF
5628 #line 5629 "configure"
5629 #include "confdefs.h"
5630 /* Override any gcc2 internal prototype to avoid an error.  */
5631 /* We use char because int might match the return type of a gcc2
5632     builtin and then its argument prototype would still apply.  */
5633 char putprpwnam();
5634
5635 int main() {
5636 putprpwnam()
5637 ; return 0; }
5638 EOF
5639 if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5640   rm -rf conftest*
5641   eval "ac_cv_lib_$ac_lib_var=yes"
5642 else
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   eval "ac_cv_lib_$ac_lib_var=no"
5647 fi
5648 rm -f conftest*
5649 LIBS="$ac_save_LIBS"
5650
5651 fi
5652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5653   echo "$ac_t""yes" 1>&6
5654     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5655     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5656   cat >> confdefs.h <<EOF
5657 #define $ac_tr_lib 1
5658 EOF
5659
5660   LIBS="-lsecurity $LIBS"
5661
5662 else
5663   echo "$ac_t""no" 1>&6
5664 fi
5665  
5666      for ac_func in putprpwnam
5667 do
5668 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5669 echo "configure:5670: checking for $ac_func" >&5
5670 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5671   echo $ac_n "(cached) $ac_c" 1>&6
5672 else
5673   cat > conftest.$ac_ext <<EOF
5674 #line 5675 "configure"
5675 #include "confdefs.h"
5676 /* System header to define __stub macros and hopefully few prototypes,
5677     which can conflict with char $ac_func(); below.  */
5678 #include <assert.h>
5679 /* Override any gcc2 internal prototype to avoid an error.  */
5680 /* We use char because int might match the return type of a gcc2
5681     builtin and then its argument prototype would still apply.  */
5682 char $ac_func();
5683
5684 int main() {
5685
5686 /* The GNU C library defines this for functions which it implements
5687     to always fail with ENOSYS.  Some functions are actually named
5688     something starting with __ and the normal name is an alias.  */
5689 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5690 choke me
5691 #else
5692 $ac_func();
5693 #endif
5694
5695 ; return 0; }
5696 EOF
5697 if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5698   rm -rf conftest*
5699   eval "ac_cv_func_$ac_func=yes"
5700 else
5701   echo "configure: failed program was:" >&5
5702   cat conftest.$ac_ext >&5
5703   rm -rf conftest*
5704   eval "ac_cv_func_$ac_func=no"
5705 fi
5706 rm -f conftest*
5707 fi
5708
5709 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5710   echo "$ac_t""yes" 1>&6
5711     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5712   cat >> confdefs.h <<EOF
5713 #define $ac_tr_func 1
5714 EOF
5715  
5716 else
5717   echo "$ac_t""no" 1>&6
5718 fi
5719 done
5720
5721   ;;
5722   esac
5723
5724 case "$LIBS" in
5725   *-lsec*) for ac_func in putprpwnam
5726 do
5727 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5728 echo "configure:5729: checking for $ac_func" >&5
5729 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5730   echo $ac_n "(cached) $ac_c" 1>&6
5731 else
5732   cat > conftest.$ac_ext <<EOF
5733 #line 5734 "configure"
5734 #include "confdefs.h"
5735 /* System header to define __stub macros and hopefully few prototypes,
5736     which can conflict with char $ac_func(); below.  */
5737 #include <assert.h>
5738 /* Override any gcc2 internal prototype to avoid an error.  */
5739 /* We use char because int might match the return type of a gcc2
5740     builtin and then its argument prototype would still apply.  */
5741 char $ac_func();
5742
5743 int main() {
5744
5745 /* The GNU C library defines this for functions which it implements
5746     to always fail with ENOSYS.  Some functions are actually named
5747     something starting with __ and the normal name is an alias.  */
5748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5749 choke me
5750 #else
5751 $ac_func();
5752 #endif
5753
5754 ; return 0; }
5755 EOF
5756 if { (eval echo configure:5757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5757   rm -rf conftest*
5758   eval "ac_cv_func_$ac_func=yes"
5759 else
5760   echo "configure: failed program was:" >&5
5761   cat conftest.$ac_ext >&5
5762   rm -rf conftest*
5763   eval "ac_cv_func_$ac_func=no"
5764 fi
5765 rm -f conftest*
5766 fi
5767
5768 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5769   echo "$ac_t""yes" 1>&6
5770     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5771   cat >> confdefs.h <<EOF
5772 #define $ac_tr_func 1
5773 EOF
5774  
5775 else
5776   echo "$ac_t""no" 1>&6
5777 fi
5778 done
5779  ;;
5780   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
5781 echo "configure:5782: checking for putprpwnam in -lsec" >&5
5782 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
5783 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5784   echo $ac_n "(cached) $ac_c" 1>&6
5785 else
5786   ac_save_LIBS="$LIBS"
5787 LIBS="-lsec  $LIBS"
5788 cat > conftest.$ac_ext <<EOF
5789 #line 5790 "configure"
5790 #include "confdefs.h"
5791 /* Override any gcc2 internal prototype to avoid an error.  */
5792 /* We use char because int might match the return type of a gcc2
5793     builtin and then its argument prototype would still apply.  */
5794 char putprpwnam();
5795
5796 int main() {
5797 putprpwnam()
5798 ; return 0; }
5799 EOF
5800 if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5801   rm -rf conftest*
5802   eval "ac_cv_lib_$ac_lib_var=yes"
5803 else
5804   echo "configure: failed program was:" >&5
5805   cat conftest.$ac_ext >&5
5806   rm -rf conftest*
5807   eval "ac_cv_lib_$ac_lib_var=no"
5808 fi
5809 rm -f conftest*
5810 LIBS="$ac_save_LIBS"
5811
5812 fi
5813 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5814   echo "$ac_t""yes" 1>&6
5815     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5816     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5817   cat >> confdefs.h <<EOF
5818 #define $ac_tr_lib 1
5819 EOF
5820
5821   LIBS="-lsec $LIBS"
5822
5823 else
5824   echo "$ac_t""no" 1>&6
5825 fi
5826  
5827      for ac_func in putprpwnam
5828 do
5829 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5830 echo "configure:5831: checking for $ac_func" >&5
5831 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5832   echo $ac_n "(cached) $ac_c" 1>&6
5833 else
5834   cat > conftest.$ac_ext <<EOF
5835 #line 5836 "configure"
5836 #include "confdefs.h"
5837 /* System header to define __stub macros and hopefully few prototypes,
5838     which can conflict with char $ac_func(); below.  */
5839 #include <assert.h>
5840 /* Override any gcc2 internal prototype to avoid an error.  */
5841 /* We use char because int might match the return type of a gcc2
5842     builtin and then its argument prototype would still apply.  */
5843 char $ac_func();
5844
5845 int main() {
5846
5847 /* The GNU C library defines this for functions which it implements
5848     to always fail with ENOSYS.  Some functions are actually named
5849     something starting with __ and the normal name is an alias.  */
5850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5851 choke me
5852 #else
5853 $ac_func();
5854 #endif
5855
5856 ; return 0; }
5857 EOF
5858 if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5859   rm -rf conftest*
5860   eval "ac_cv_func_$ac_func=yes"
5861 else
5862   echo "configure: failed program was:" >&5
5863   cat conftest.$ac_ext >&5
5864   rm -rf conftest*
5865   eval "ac_cv_func_$ac_func=no"
5866 fi
5867 rm -f conftest*
5868 fi
5869
5870 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5871   echo "$ac_t""yes" 1>&6
5872     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5873   cat >> confdefs.h <<EOF
5874 #define $ac_tr_func 1
5875 EOF
5876  
5877 else
5878   echo "$ac_t""no" 1>&6
5879 fi
5880 done
5881
5882   ;;
5883   esac
5884
5885
5886 case "$LIBS" in
5887   *-lsecurity*) for ac_func in set_auth_parameters
5888 do
5889 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5890 echo "configure:5891: checking for $ac_func" >&5
5891 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5892   echo $ac_n "(cached) $ac_c" 1>&6
5893 else
5894   cat > conftest.$ac_ext <<EOF
5895 #line 5896 "configure"
5896 #include "confdefs.h"
5897 /* System header to define __stub macros and hopefully few prototypes,
5898     which can conflict with char $ac_func(); below.  */
5899 #include <assert.h>
5900 /* Override any gcc2 internal prototype to avoid an error.  */
5901 /* We use char because int might match the return type of a gcc2
5902     builtin and then its argument prototype would still apply.  */
5903 char $ac_func();
5904
5905 int main() {
5906
5907 /* The GNU C library defines this for functions which it implements
5908     to always fail with ENOSYS.  Some functions are actually named
5909     something starting with __ and the normal name is an alias.  */
5910 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5911 choke me
5912 #else
5913 $ac_func();
5914 #endif
5915
5916 ; return 0; }
5917 EOF
5918 if { (eval echo configure:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5919   rm -rf conftest*
5920   eval "ac_cv_func_$ac_func=yes"
5921 else
5922   echo "configure: failed program was:" >&5
5923   cat conftest.$ac_ext >&5
5924   rm -rf conftest*
5925   eval "ac_cv_func_$ac_func=no"
5926 fi
5927 rm -f conftest*
5928 fi
5929
5930 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5931   echo "$ac_t""yes" 1>&6
5932     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5933   cat >> confdefs.h <<EOF
5934 #define $ac_tr_func 1
5935 EOF
5936  
5937 else
5938   echo "$ac_t""no" 1>&6
5939 fi
5940 done
5941  ;;
5942   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
5943 echo "configure:5944: checking for set_auth_parameters in -lsecurity" >&5
5944 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
5945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5946   echo $ac_n "(cached) $ac_c" 1>&6
5947 else
5948   ac_save_LIBS="$LIBS"
5949 LIBS="-lsecurity  $LIBS"
5950 cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953 /* Override any gcc2 internal prototype to avoid an error.  */
5954 /* We use char because int might match the return type of a gcc2
5955     builtin and then its argument prototype would still apply.  */
5956 char set_auth_parameters();
5957
5958 int main() {
5959 set_auth_parameters()
5960 ; return 0; }
5961 EOF
5962 if { (eval echo configure:5963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5963   rm -rf conftest*
5964   eval "ac_cv_lib_$ac_lib_var=yes"
5965 else
5966   echo "configure: failed program was:" >&5
5967   cat conftest.$ac_ext >&5
5968   rm -rf conftest*
5969   eval "ac_cv_lib_$ac_lib_var=no"
5970 fi
5971 rm -f conftest*
5972 LIBS="$ac_save_LIBS"
5973
5974 fi
5975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5976   echo "$ac_t""yes" 1>&6
5977     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5978     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5979   cat >> confdefs.h <<EOF
5980 #define $ac_tr_lib 1
5981 EOF
5982
5983   LIBS="-lsecurity $LIBS"
5984
5985 else
5986   echo "$ac_t""no" 1>&6
5987 fi
5988  
5989      for ac_func in set_auth_parameters
5990 do
5991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5992 echo "configure:5993: checking for $ac_func" >&5
5993 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5994   echo $ac_n "(cached) $ac_c" 1>&6
5995 else
5996   cat > conftest.$ac_ext <<EOF
5997 #line 5998 "configure"
5998 #include "confdefs.h"
5999 /* System header to define __stub macros and hopefully few prototypes,
6000     which can conflict with char $ac_func(); below.  */
6001 #include <assert.h>
6002 /* Override any gcc2 internal prototype to avoid an error.  */
6003 /* We use char because int might match the return type of a gcc2
6004     builtin and then its argument prototype would still apply.  */
6005 char $ac_func();
6006
6007 int main() {
6008
6009 /* The GNU C library defines this for functions which it implements
6010     to always fail with ENOSYS.  Some functions are actually named
6011     something starting with __ and the normal name is an alias.  */
6012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6013 choke me
6014 #else
6015 $ac_func();
6016 #endif
6017
6018 ; return 0; }
6019 EOF
6020 if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6021   rm -rf conftest*
6022   eval "ac_cv_func_$ac_func=yes"
6023 else
6024   echo "configure: failed program was:" >&5
6025   cat conftest.$ac_ext >&5
6026   rm -rf conftest*
6027   eval "ac_cv_func_$ac_func=no"
6028 fi
6029 rm -f conftest*
6030 fi
6031
6032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6033   echo "$ac_t""yes" 1>&6
6034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6035   cat >> confdefs.h <<EOF
6036 #define $ac_tr_func 1
6037 EOF
6038  
6039 else
6040   echo "$ac_t""no" 1>&6
6041 fi
6042 done
6043
6044   ;;
6045   esac
6046
6047 case "$LIBS" in
6048   *-lsec*) for ac_func in set_auth_parameters
6049 do
6050 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6051 echo "configure:6052: checking for $ac_func" >&5
6052 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6053   echo $ac_n "(cached) $ac_c" 1>&6
6054 else
6055   cat > conftest.$ac_ext <<EOF
6056 #line 6057 "configure"
6057 #include "confdefs.h"
6058 /* System header to define __stub macros and hopefully few prototypes,
6059     which can conflict with char $ac_func(); below.  */
6060 #include <assert.h>
6061 /* Override any gcc2 internal prototype to avoid an error.  */
6062 /* We use char because int might match the return type of a gcc2
6063     builtin and then its argument prototype would still apply.  */
6064 char $ac_func();
6065
6066 int main() {
6067
6068 /* The GNU C library defines this for functions which it implements
6069     to always fail with ENOSYS.  Some functions are actually named
6070     something starting with __ and the normal name is an alias.  */
6071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6072 choke me
6073 #else
6074 $ac_func();
6075 #endif
6076
6077 ; return 0; }
6078 EOF
6079 if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6080   rm -rf conftest*
6081   eval "ac_cv_func_$ac_func=yes"
6082 else
6083   echo "configure: failed program was:" >&5
6084   cat conftest.$ac_ext >&5
6085   rm -rf conftest*
6086   eval "ac_cv_func_$ac_func=no"
6087 fi
6088 rm -f conftest*
6089 fi
6090
6091 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6092   echo "$ac_t""yes" 1>&6
6093     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6094   cat >> confdefs.h <<EOF
6095 #define $ac_tr_func 1
6096 EOF
6097  
6098 else
6099   echo "$ac_t""no" 1>&6
6100 fi
6101 done
6102  ;;
6103   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
6104 echo "configure:6105: checking for set_auth_parameters in -lsec" >&5
6105 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6106 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6107   echo $ac_n "(cached) $ac_c" 1>&6
6108 else
6109   ac_save_LIBS="$LIBS"
6110 LIBS="-lsec  $LIBS"
6111 cat > conftest.$ac_ext <<EOF
6112 #line 6113 "configure"
6113 #include "confdefs.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 set_auth_parameters();
6118
6119 int main() {
6120 set_auth_parameters()
6121 ; return 0; }
6122 EOF
6123 if { (eval echo configure:6124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6124   rm -rf conftest*
6125   eval "ac_cv_lib_$ac_lib_var=yes"
6126 else
6127   echo "configure: failed program was:" >&5
6128   cat conftest.$ac_ext >&5
6129   rm -rf conftest*
6130   eval "ac_cv_lib_$ac_lib_var=no"
6131 fi
6132 rm -f conftest*
6133 LIBS="$ac_save_LIBS"
6134
6135 fi
6136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6137   echo "$ac_t""yes" 1>&6
6138     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6139     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6140   cat >> confdefs.h <<EOF
6141 #define $ac_tr_lib 1
6142 EOF
6143
6144   LIBS="-lsec $LIBS"
6145
6146 else
6147   echo "$ac_t""no" 1>&6
6148 fi
6149  
6150      for ac_func in set_auth_parameters
6151 do
6152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6153 echo "configure:6154: checking for $ac_func" >&5
6154 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6155   echo $ac_n "(cached) $ac_c" 1>&6
6156 else
6157   cat > conftest.$ac_ext <<EOF
6158 #line 6159 "configure"
6159 #include "confdefs.h"
6160 /* System header to define __stub macros and hopefully few prototypes,
6161     which can conflict with char $ac_func(); below.  */
6162 #include <assert.h>
6163 /* Override any gcc2 internal prototype to avoid an error.  */
6164 /* We use char because int might match the return type of a gcc2
6165     builtin and then its argument prototype would still apply.  */
6166 char $ac_func();
6167
6168 int main() {
6169
6170 /* The GNU C library defines this for functions which it implements
6171     to always fail with ENOSYS.  Some functions are actually named
6172     something starting with __ and the normal name is an alias.  */
6173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6174 choke me
6175 #else
6176 $ac_func();
6177 #endif
6178
6179 ; return 0; }
6180 EOF
6181 if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6182   rm -rf conftest*
6183   eval "ac_cv_func_$ac_func=yes"
6184 else
6185   echo "configure: failed program was:" >&5
6186   cat conftest.$ac_ext >&5
6187   rm -rf conftest*
6188   eval "ac_cv_func_$ac_func=no"
6189 fi
6190 rm -f conftest*
6191 fi
6192
6193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6194   echo "$ac_t""yes" 1>&6
6195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6196   cat >> confdefs.h <<EOF
6197 #define $ac_tr_func 1
6198 EOF
6199  
6200 else
6201   echo "$ac_t""no" 1>&6
6202 fi
6203 done
6204
6205   ;;
6206   esac
6207
6208
6209 # UnixWare 7.x has its getspnam in -lgen
6210 case "$LIBS" in
6211   *-lgen*) for ac_func in getspnam
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   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
6267 echo "configure:6268: checking for getspnam in -lgen" >&5
6268 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
6269 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6270   echo $ac_n "(cached) $ac_c" 1>&6
6271 else
6272   ac_save_LIBS="$LIBS"
6273 LIBS="-lgen  $LIBS"
6274 cat > conftest.$ac_ext <<EOF
6275 #line 6276 "configure"
6276 #include "confdefs.h"
6277 /* Override any gcc2 internal prototype to avoid an error.  */
6278 /* We use char because int might match the return type of a gcc2
6279     builtin and then its argument prototype would still apply.  */
6280 char getspnam();
6281
6282 int main() {
6283 getspnam()
6284 ; return 0; }
6285 EOF
6286 if { (eval echo configure:6287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6287   rm -rf conftest*
6288   eval "ac_cv_lib_$ac_lib_var=yes"
6289 else
6290   echo "configure: failed program was:" >&5
6291   cat conftest.$ac_ext >&5
6292   rm -rf conftest*
6293   eval "ac_cv_lib_$ac_lib_var=no"
6294 fi
6295 rm -f conftest*
6296 LIBS="$ac_save_LIBS"
6297
6298 fi
6299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6300   echo "$ac_t""yes" 1>&6
6301     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6302     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6303   cat >> confdefs.h <<EOF
6304 #define $ac_tr_lib 1
6305 EOF
6306
6307   LIBS="-lgen $LIBS"
6308
6309 else
6310   echo "$ac_t""no" 1>&6
6311 fi
6312  
6313      for ac_func in getspnam
6314 do
6315 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6316 echo "configure:6317: checking for $ac_func" >&5
6317 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6318   echo $ac_n "(cached) $ac_c" 1>&6
6319 else
6320   cat > conftest.$ac_ext <<EOF
6321 #line 6322 "configure"
6322 #include "confdefs.h"
6323 /* System header to define __stub macros and hopefully few prototypes,
6324     which can conflict with char $ac_func(); below.  */
6325 #include <assert.h>
6326 /* Override any gcc2 internal prototype to avoid an error.  */
6327 /* We use char because int might match the return type of a gcc2
6328     builtin and then its argument prototype would still apply.  */
6329 char $ac_func();
6330
6331 int main() {
6332
6333 /* The GNU C library defines this for functions which it implements
6334     to always fail with ENOSYS.  Some functions are actually named
6335     something starting with __ and the normal name is an alias.  */
6336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6337 choke me
6338 #else
6339 $ac_func();
6340 #endif
6341
6342 ; return 0; }
6343 EOF
6344 if { (eval echo configure:6345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6345   rm -rf conftest*
6346   eval "ac_cv_func_$ac_func=yes"
6347 else
6348   echo "configure: failed program was:" >&5
6349   cat conftest.$ac_ext >&5
6350   rm -rf conftest*
6351   eval "ac_cv_func_$ac_func=no"
6352 fi
6353 rm -f conftest*
6354 fi
6355
6356 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6357   echo "$ac_t""yes" 1>&6
6358     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6359   cat >> confdefs.h <<EOF
6360 #define $ac_tr_func 1
6361 EOF
6362  
6363 else
6364   echo "$ac_t""no" 1>&6
6365 fi
6366 done
6367
6368   ;;
6369   esac
6370
6371
6372 case "$LIBS" in
6373   *-lsecurity*) for ac_func in getspnam
6374 do
6375 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6376 echo "configure:6377: checking for $ac_func" >&5
6377 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6378   echo $ac_n "(cached) $ac_c" 1>&6
6379 else
6380   cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6383 /* System header to define __stub macros and hopefully few prototypes,
6384     which can conflict with char $ac_func(); below.  */
6385 #include <assert.h>
6386 /* Override any gcc2 internal prototype to avoid an error.  */
6387 /* We use char because int might match the return type of a gcc2
6388     builtin and then its argument prototype would still apply.  */
6389 char $ac_func();
6390
6391 int main() {
6392
6393 /* The GNU C library defines this for functions which it implements
6394     to always fail with ENOSYS.  Some functions are actually named
6395     something starting with __ and the normal name is an alias.  */
6396 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6397 choke me
6398 #else
6399 $ac_func();
6400 #endif
6401
6402 ; return 0; }
6403 EOF
6404 if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6405   rm -rf conftest*
6406   eval "ac_cv_func_$ac_func=yes"
6407 else
6408   echo "configure: failed program was:" >&5
6409   cat conftest.$ac_ext >&5
6410   rm -rf conftest*
6411   eval "ac_cv_func_$ac_func=no"
6412 fi
6413 rm -f conftest*
6414 fi
6415
6416 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6417   echo "$ac_t""yes" 1>&6
6418     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6419   cat >> confdefs.h <<EOF
6420 #define $ac_tr_func 1
6421 EOF
6422  
6423 else
6424   echo "$ac_t""no" 1>&6
6425 fi
6426 done
6427  ;;
6428   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
6429 echo "configure:6430: checking for getspnam in -lsecurity" >&5
6430 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
6431 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6432   echo $ac_n "(cached) $ac_c" 1>&6
6433 else
6434   ac_save_LIBS="$LIBS"
6435 LIBS="-lsecurity  $LIBS"
6436 cat > conftest.$ac_ext <<EOF
6437 #line 6438 "configure"
6438 #include "confdefs.h"
6439 /* Override any gcc2 internal prototype to avoid an error.  */
6440 /* We use char because int might match the return type of a gcc2
6441     builtin and then its argument prototype would still apply.  */
6442 char getspnam();
6443
6444 int main() {
6445 getspnam()
6446 ; return 0; }
6447 EOF
6448 if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6449   rm -rf conftest*
6450   eval "ac_cv_lib_$ac_lib_var=yes"
6451 else
6452   echo "configure: failed program was:" >&5
6453   cat conftest.$ac_ext >&5
6454   rm -rf conftest*
6455   eval "ac_cv_lib_$ac_lib_var=no"
6456 fi
6457 rm -f conftest*
6458 LIBS="$ac_save_LIBS"
6459
6460 fi
6461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6462   echo "$ac_t""yes" 1>&6
6463     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6464     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6465   cat >> confdefs.h <<EOF
6466 #define $ac_tr_lib 1
6467 EOF
6468
6469   LIBS="-lsecurity $LIBS"
6470
6471 else
6472   echo "$ac_t""no" 1>&6
6473 fi
6474  
6475      for ac_func in getspnam
6476 do
6477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6478 echo "configure:6479: checking for $ac_func" >&5
6479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6480   echo $ac_n "(cached) $ac_c" 1>&6
6481 else
6482   cat > conftest.$ac_ext <<EOF
6483 #line 6484 "configure"
6484 #include "confdefs.h"
6485 /* System header to define __stub macros and hopefully few prototypes,
6486     which can conflict with char $ac_func(); below.  */
6487 #include <assert.h>
6488 /* Override any gcc2 internal prototype to avoid an error.  */
6489 /* We use char because int might match the return type of a gcc2
6490     builtin and then its argument prototype would still apply.  */
6491 char $ac_func();
6492
6493 int main() {
6494
6495 /* The GNU C library defines this for functions which it implements
6496     to always fail with ENOSYS.  Some functions are actually named
6497     something starting with __ and the normal name is an alias.  */
6498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6499 choke me
6500 #else
6501 $ac_func();
6502 #endif
6503
6504 ; return 0; }
6505 EOF
6506 if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6507   rm -rf conftest*
6508   eval "ac_cv_func_$ac_func=yes"
6509 else
6510   echo "configure: failed program was:" >&5
6511   cat conftest.$ac_ext >&5
6512   rm -rf conftest*
6513   eval "ac_cv_func_$ac_func=no"
6514 fi
6515 rm -f conftest*
6516 fi
6517
6518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6519   echo "$ac_t""yes" 1>&6
6520     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6521   cat >> confdefs.h <<EOF
6522 #define $ac_tr_func 1
6523 EOF
6524  
6525 else
6526   echo "$ac_t""no" 1>&6
6527 fi
6528 done
6529
6530   ;;
6531   esac
6532
6533 case "$LIBS" in
6534   *-lsec*) for ac_func in getspnam
6535 do
6536 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6537 echo "configure:6538: checking for $ac_func" >&5
6538 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6539   echo $ac_n "(cached) $ac_c" 1>&6
6540 else
6541   cat > conftest.$ac_ext <<EOF
6542 #line 6543 "configure"
6543 #include "confdefs.h"
6544 /* System header to define __stub macros and hopefully few prototypes,
6545     which can conflict with char $ac_func(); below.  */
6546 #include <assert.h>
6547 /* Override any gcc2 internal prototype to avoid an error.  */
6548 /* We use char because int might match the return type of a gcc2
6549     builtin and then its argument prototype would still apply.  */
6550 char $ac_func();
6551
6552 int main() {
6553
6554 /* The GNU C library defines this for functions which it implements
6555     to always fail with ENOSYS.  Some functions are actually named
6556     something starting with __ and the normal name is an alias.  */
6557 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6558 choke me
6559 #else
6560 $ac_func();
6561 #endif
6562
6563 ; return 0; }
6564 EOF
6565 if { (eval echo configure:6566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6566   rm -rf conftest*
6567   eval "ac_cv_func_$ac_func=yes"
6568 else
6569   echo "configure: failed program was:" >&5
6570   cat conftest.$ac_ext >&5
6571   rm -rf conftest*
6572   eval "ac_cv_func_$ac_func=no"
6573 fi
6574 rm -f conftest*
6575 fi
6576
6577 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6578   echo "$ac_t""yes" 1>&6
6579     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6580   cat >> confdefs.h <<EOF
6581 #define $ac_tr_func 1
6582 EOF
6583  
6584 else
6585   echo "$ac_t""no" 1>&6
6586 fi
6587 done
6588  ;;
6589   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
6590 echo "configure:6591: checking for getspnam in -lsec" >&5
6591 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
6592 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6593   echo $ac_n "(cached) $ac_c" 1>&6
6594 else
6595   ac_save_LIBS="$LIBS"
6596 LIBS="-lsec  $LIBS"
6597 cat > conftest.$ac_ext <<EOF
6598 #line 6599 "configure"
6599 #include "confdefs.h"
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 /* We use char because int might match the return type of a gcc2
6602     builtin and then its argument prototype would still apply.  */
6603 char getspnam();
6604
6605 int main() {
6606 getspnam()
6607 ; return 0; }
6608 EOF
6609 if { (eval echo configure:6610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6610   rm -rf conftest*
6611   eval "ac_cv_lib_$ac_lib_var=yes"
6612 else
6613   echo "configure: failed program was:" >&5
6614   cat conftest.$ac_ext >&5
6615   rm -rf conftest*
6616   eval "ac_cv_lib_$ac_lib_var=no"
6617 fi
6618 rm -f conftest*
6619 LIBS="$ac_save_LIBS"
6620
6621 fi
6622 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6623   echo "$ac_t""yes" 1>&6
6624     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6625     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6626   cat >> confdefs.h <<EOF
6627 #define $ac_tr_lib 1
6628 EOF
6629
6630   LIBS="-lsec $LIBS"
6631
6632 else
6633   echo "$ac_t""no" 1>&6
6634 fi
6635  
6636      for ac_func in getspnam
6637 do
6638 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6639 echo "configure:6640: checking for $ac_func" >&5
6640 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6641   echo $ac_n "(cached) $ac_c" 1>&6
6642 else
6643   cat > conftest.$ac_ext <<EOF
6644 #line 6645 "configure"
6645 #include "confdefs.h"
6646 /* System header to define __stub macros and hopefully few prototypes,
6647     which can conflict with char $ac_func(); below.  */
6648 #include <assert.h>
6649 /* Override any gcc2 internal prototype to avoid an error.  */
6650 /* We use char because int might match the return type of a gcc2
6651     builtin and then its argument prototype would still apply.  */
6652 char $ac_func();
6653
6654 int main() {
6655
6656 /* The GNU C library defines this for functions which it implements
6657     to always fail with ENOSYS.  Some functions are actually named
6658     something starting with __ and the normal name is an alias.  */
6659 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6660 choke me
6661 #else
6662 $ac_func();
6663 #endif
6664
6665 ; return 0; }
6666 EOF
6667 if { (eval echo configure:6668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6668   rm -rf conftest*
6669   eval "ac_cv_func_$ac_func=yes"
6670 else
6671   echo "configure: failed program was:" >&5
6672   cat conftest.$ac_ext >&5
6673   rm -rf conftest*
6674   eval "ac_cv_func_$ac_func=no"
6675 fi
6676 rm -f conftest*
6677 fi
6678
6679 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6680   echo "$ac_t""yes" 1>&6
6681     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6682   cat >> confdefs.h <<EOF
6683 #define $ac_tr_func 1
6684 EOF
6685  
6686 else
6687   echo "$ac_t""no" 1>&6
6688 fi
6689 done
6690
6691   ;;
6692   esac
6693
6694
6695 case "$LIBS" in
6696   *-lsecurity*) for ac_func in bigcrypt
6697 do
6698 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6699 echo "configure:6700: checking for $ac_func" >&5
6700 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6701   echo $ac_n "(cached) $ac_c" 1>&6
6702 else
6703   cat > conftest.$ac_ext <<EOF
6704 #line 6705 "configure"
6705 #include "confdefs.h"
6706 /* System header to define __stub macros and hopefully few prototypes,
6707     which can conflict with char $ac_func(); below.  */
6708 #include <assert.h>
6709 /* Override any gcc2 internal prototype to avoid an error.  */
6710 /* We use char because int might match the return type of a gcc2
6711     builtin and then its argument prototype would still apply.  */
6712 char $ac_func();
6713
6714 int main() {
6715
6716 /* The GNU C library defines this for functions which it implements
6717     to always fail with ENOSYS.  Some functions are actually named
6718     something starting with __ and the normal name is an alias.  */
6719 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6720 choke me
6721 #else
6722 $ac_func();
6723 #endif
6724
6725 ; return 0; }
6726 EOF
6727 if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6728   rm -rf conftest*
6729   eval "ac_cv_func_$ac_func=yes"
6730 else
6731   echo "configure: failed program was:" >&5
6732   cat conftest.$ac_ext >&5
6733   rm -rf conftest*
6734   eval "ac_cv_func_$ac_func=no"
6735 fi
6736 rm -f conftest*
6737 fi
6738
6739 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6740   echo "$ac_t""yes" 1>&6
6741     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6742   cat >> confdefs.h <<EOF
6743 #define $ac_tr_func 1
6744 EOF
6745  
6746 else
6747   echo "$ac_t""no" 1>&6
6748 fi
6749 done
6750  ;;
6751   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
6752 echo "configure:6753: checking for bigcrypt in -lsecurity" >&5
6753 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
6754 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6755   echo $ac_n "(cached) $ac_c" 1>&6
6756 else
6757   ac_save_LIBS="$LIBS"
6758 LIBS="-lsecurity  $LIBS"
6759 cat > conftest.$ac_ext <<EOF
6760 #line 6761 "configure"
6761 #include "confdefs.h"
6762 /* Override any gcc2 internal prototype to avoid an error.  */
6763 /* We use char because int might match the return type of a gcc2
6764     builtin and then its argument prototype would still apply.  */
6765 char bigcrypt();
6766
6767 int main() {
6768 bigcrypt()
6769 ; return 0; }
6770 EOF
6771 if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6772   rm -rf conftest*
6773   eval "ac_cv_lib_$ac_lib_var=yes"
6774 else
6775   echo "configure: failed program was:" >&5
6776   cat conftest.$ac_ext >&5
6777   rm -rf conftest*
6778   eval "ac_cv_lib_$ac_lib_var=no"
6779 fi
6780 rm -f conftest*
6781 LIBS="$ac_save_LIBS"
6782
6783 fi
6784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6785   echo "$ac_t""yes" 1>&6
6786     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6787     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6788   cat >> confdefs.h <<EOF
6789 #define $ac_tr_lib 1
6790 EOF
6791
6792   LIBS="-lsecurity $LIBS"
6793
6794 else
6795   echo "$ac_t""no" 1>&6
6796 fi
6797  
6798      for ac_func in bigcrypt
6799 do
6800 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6801 echo "configure:6802: checking for $ac_func" >&5
6802 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6803   echo $ac_n "(cached) $ac_c" 1>&6
6804 else
6805   cat > conftest.$ac_ext <<EOF
6806 #line 6807 "configure"
6807 #include "confdefs.h"
6808 /* System header to define __stub macros and hopefully few prototypes,
6809     which can conflict with char $ac_func(); below.  */
6810 #include <assert.h>
6811 /* Override any gcc2 internal prototype to avoid an error.  */
6812 /* We use char because int might match the return type of a gcc2
6813     builtin and then its argument prototype would still apply.  */
6814 char $ac_func();
6815
6816 int main() {
6817
6818 /* The GNU C library defines this for functions which it implements
6819     to always fail with ENOSYS.  Some functions are actually named
6820     something starting with __ and the normal name is an alias.  */
6821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6822 choke me
6823 #else
6824 $ac_func();
6825 #endif
6826
6827 ; return 0; }
6828 EOF
6829 if { (eval echo configure:6830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6830   rm -rf conftest*
6831   eval "ac_cv_func_$ac_func=yes"
6832 else
6833   echo "configure: failed program was:" >&5
6834   cat conftest.$ac_ext >&5
6835   rm -rf conftest*
6836   eval "ac_cv_func_$ac_func=no"
6837 fi
6838 rm -f conftest*
6839 fi
6840
6841 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6842   echo "$ac_t""yes" 1>&6
6843     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6844   cat >> confdefs.h <<EOF
6845 #define $ac_tr_func 1
6846 EOF
6847  
6848 else
6849   echo "$ac_t""no" 1>&6
6850 fi
6851 done
6852
6853   ;;
6854   esac
6855
6856 case "$LIBS" in
6857   *-lsec*) for ac_func in bigcrypt
6858 do
6859 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6860 echo "configure:6861: checking for $ac_func" >&5
6861 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6862   echo $ac_n "(cached) $ac_c" 1>&6
6863 else
6864   cat > conftest.$ac_ext <<EOF
6865 #line 6866 "configure"
6866 #include "confdefs.h"
6867 /* System header to define __stub macros and hopefully few prototypes,
6868     which can conflict with char $ac_func(); below.  */
6869 #include <assert.h>
6870 /* Override any gcc2 internal prototype to avoid an error.  */
6871 /* We use char because int might match the return type of a gcc2
6872     builtin and then its argument prototype would still apply.  */
6873 char $ac_func();
6874
6875 int main() {
6876
6877 /* The GNU C library defines this for functions which it implements
6878     to always fail with ENOSYS.  Some functions are actually named
6879     something starting with __ and the normal name is an alias.  */
6880 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6881 choke me
6882 #else
6883 $ac_func();
6884 #endif
6885
6886 ; return 0; }
6887 EOF
6888 if { (eval echo configure:6889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6889   rm -rf conftest*
6890   eval "ac_cv_func_$ac_func=yes"
6891 else
6892   echo "configure: failed program was:" >&5
6893   cat conftest.$ac_ext >&5
6894   rm -rf conftest*
6895   eval "ac_cv_func_$ac_func=no"
6896 fi
6897 rm -f conftest*
6898 fi
6899
6900 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6901   echo "$ac_t""yes" 1>&6
6902     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6903   cat >> confdefs.h <<EOF
6904 #define $ac_tr_func 1
6905 EOF
6906  
6907 else
6908   echo "$ac_t""no" 1>&6
6909 fi
6910 done
6911  ;;
6912   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
6913 echo "configure:6914: checking for bigcrypt in -lsec" >&5
6914 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
6915 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6916   echo $ac_n "(cached) $ac_c" 1>&6
6917 else
6918   ac_save_LIBS="$LIBS"
6919 LIBS="-lsec  $LIBS"
6920 cat > conftest.$ac_ext <<EOF
6921 #line 6922 "configure"
6922 #include "confdefs.h"
6923 /* Override any gcc2 internal prototype to avoid an error.  */
6924 /* We use char because int might match the return type of a gcc2
6925     builtin and then its argument prototype would still apply.  */
6926 char bigcrypt();
6927
6928 int main() {
6929 bigcrypt()
6930 ; return 0; }
6931 EOF
6932 if { (eval echo configure:6933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6933   rm -rf conftest*
6934   eval "ac_cv_lib_$ac_lib_var=yes"
6935 else
6936   echo "configure: failed program was:" >&5
6937   cat conftest.$ac_ext >&5
6938   rm -rf conftest*
6939   eval "ac_cv_lib_$ac_lib_var=no"
6940 fi
6941 rm -f conftest*
6942 LIBS="$ac_save_LIBS"
6943
6944 fi
6945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6946   echo "$ac_t""yes" 1>&6
6947     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6948     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6949   cat >> confdefs.h <<EOF
6950 #define $ac_tr_lib 1
6951 EOF
6952
6953   LIBS="-lsec $LIBS"
6954
6955 else
6956   echo "$ac_t""no" 1>&6
6957 fi
6958  
6959      for ac_func in bigcrypt
6960 do
6961 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6962 echo "configure:6963: checking for $ac_func" >&5
6963 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6964   echo $ac_n "(cached) $ac_c" 1>&6
6965 else
6966   cat > conftest.$ac_ext <<EOF
6967 #line 6968 "configure"
6968 #include "confdefs.h"
6969 /* System header to define __stub macros and hopefully few prototypes,
6970     which can conflict with char $ac_func(); below.  */
6971 #include <assert.h>
6972 /* Override any gcc2 internal prototype to avoid an error.  */
6973 /* We use char because int might match the return type of a gcc2
6974     builtin and then its argument prototype would still apply.  */
6975 char $ac_func();
6976
6977 int main() {
6978
6979 /* The GNU C library defines this for functions which it implements
6980     to always fail with ENOSYS.  Some functions are actually named
6981     something starting with __ and the normal name is an alias.  */
6982 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6983 choke me
6984 #else
6985 $ac_func();
6986 #endif
6987
6988 ; return 0; }
6989 EOF
6990 if { (eval echo configure:6991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6991   rm -rf conftest*
6992   eval "ac_cv_func_$ac_func=yes"
6993 else
6994   echo "configure: failed program was:" >&5
6995   cat conftest.$ac_ext >&5
6996   rm -rf conftest*
6997   eval "ac_cv_func_$ac_func=no"
6998 fi
6999 rm -f conftest*
7000 fi
7001
7002 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7003   echo "$ac_t""yes" 1>&6
7004     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7005   cat >> confdefs.h <<EOF
7006 #define $ac_tr_func 1
7007 EOF
7008  
7009 else
7010   echo "$ac_t""no" 1>&6
7011 fi
7012 done
7013
7014   ;;
7015   esac
7016
7017
7018 case "$LIBS" in
7019   *-lsecurity*) for ac_func in getprpwnam
7020 do
7021 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7022 echo "configure:7023: checking for $ac_func" >&5
7023 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7024   echo $ac_n "(cached) $ac_c" 1>&6
7025 else
7026   cat > conftest.$ac_ext <<EOF
7027 #line 7028 "configure"
7028 #include "confdefs.h"
7029 /* System header to define __stub macros and hopefully few prototypes,
7030     which can conflict with char $ac_func(); below.  */
7031 #include <assert.h>
7032 /* Override any gcc2 internal prototype to avoid an error.  */
7033 /* We use char because int might match the return type of a gcc2
7034     builtin and then its argument prototype would still apply.  */
7035 char $ac_func();
7036
7037 int main() {
7038
7039 /* The GNU C library defines this for functions which it implements
7040     to always fail with ENOSYS.  Some functions are actually named
7041     something starting with __ and the normal name is an alias.  */
7042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7043 choke me
7044 #else
7045 $ac_func();
7046 #endif
7047
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051   rm -rf conftest*
7052   eval "ac_cv_func_$ac_func=yes"
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_func_$ac_func=no"
7058 fi
7059 rm -f conftest*
7060 fi
7061
7062 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7063   echo "$ac_t""yes" 1>&6
7064     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7065   cat >> confdefs.h <<EOF
7066 #define $ac_tr_func 1
7067 EOF
7068  
7069 else
7070   echo "$ac_t""no" 1>&6
7071 fi
7072 done
7073  ;;
7074   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
7075 echo "configure:7076: checking for getprpwnam in -lsecurity" >&5
7076 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
7077 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7078   echo $ac_n "(cached) $ac_c" 1>&6
7079 else
7080   ac_save_LIBS="$LIBS"
7081 LIBS="-lsecurity  $LIBS"
7082 cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085 /* Override any gcc2 internal prototype to avoid an error.  */
7086 /* We use char because int might match the return type of a gcc2
7087     builtin and then its argument prototype would still apply.  */
7088 char getprpwnam();
7089
7090 int main() {
7091 getprpwnam()
7092 ; return 0; }
7093 EOF
7094 if { (eval echo configure:7095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7095   rm -rf conftest*
7096   eval "ac_cv_lib_$ac_lib_var=yes"
7097 else
7098   echo "configure: failed program was:" >&5
7099   cat conftest.$ac_ext >&5
7100   rm -rf conftest*
7101   eval "ac_cv_lib_$ac_lib_var=no"
7102 fi
7103 rm -f conftest*
7104 LIBS="$ac_save_LIBS"
7105
7106 fi
7107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7108   echo "$ac_t""yes" 1>&6
7109     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7110     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7111   cat >> confdefs.h <<EOF
7112 #define $ac_tr_lib 1
7113 EOF
7114
7115   LIBS="-lsecurity $LIBS"
7116
7117 else
7118   echo "$ac_t""no" 1>&6
7119 fi
7120  
7121      for ac_func in getprpwnam
7122 do
7123 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7124 echo "configure:7125: checking for $ac_func" >&5
7125 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7126   echo $ac_n "(cached) $ac_c" 1>&6
7127 else
7128   cat > conftest.$ac_ext <<EOF
7129 #line 7130 "configure"
7130 #include "confdefs.h"
7131 /* System header to define __stub macros and hopefully few prototypes,
7132     which can conflict with char $ac_func(); below.  */
7133 #include <assert.h>
7134 /* Override any gcc2 internal prototype to avoid an error.  */
7135 /* We use char because int might match the return type of a gcc2
7136     builtin and then its argument prototype would still apply.  */
7137 char $ac_func();
7138
7139 int main() {
7140
7141 /* The GNU C library defines this for functions which it implements
7142     to always fail with ENOSYS.  Some functions are actually named
7143     something starting with __ and the normal name is an alias.  */
7144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7145 choke me
7146 #else
7147 $ac_func();
7148 #endif
7149
7150 ; return 0; }
7151 EOF
7152 if { (eval echo configure:7153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7153   rm -rf conftest*
7154   eval "ac_cv_func_$ac_func=yes"
7155 else
7156   echo "configure: failed program was:" >&5
7157   cat conftest.$ac_ext >&5
7158   rm -rf conftest*
7159   eval "ac_cv_func_$ac_func=no"
7160 fi
7161 rm -f conftest*
7162 fi
7163
7164 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7165   echo "$ac_t""yes" 1>&6
7166     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7167   cat >> confdefs.h <<EOF
7168 #define $ac_tr_func 1
7169 EOF
7170  
7171 else
7172   echo "$ac_t""no" 1>&6
7173 fi
7174 done
7175
7176   ;;
7177   esac
7178
7179 case "$LIBS" in
7180   *-lsec*) for ac_func in getprpwnam
7181 do
7182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7183 echo "configure:7184: checking for $ac_func" >&5
7184 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7185   echo $ac_n "(cached) $ac_c" 1>&6
7186 else
7187   cat > conftest.$ac_ext <<EOF
7188 #line 7189 "configure"
7189 #include "confdefs.h"
7190 /* System header to define __stub macros and hopefully few prototypes,
7191     which can conflict with char $ac_func(); below.  */
7192 #include <assert.h>
7193 /* Override any gcc2 internal prototype to avoid an error.  */
7194 /* We use char because int might match the return type of a gcc2
7195     builtin and then its argument prototype would still apply.  */
7196 char $ac_func();
7197
7198 int main() {
7199
7200 /* The GNU C library defines this for functions which it implements
7201     to always fail with ENOSYS.  Some functions are actually named
7202     something starting with __ and the normal name is an alias.  */
7203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7204 choke me
7205 #else
7206 $ac_func();
7207 #endif
7208
7209 ; return 0; }
7210 EOF
7211 if { (eval echo configure:7212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7212   rm -rf conftest*
7213   eval "ac_cv_func_$ac_func=yes"
7214 else
7215   echo "configure: failed program was:" >&5
7216   cat conftest.$ac_ext >&5
7217   rm -rf conftest*
7218   eval "ac_cv_func_$ac_func=no"
7219 fi
7220 rm -f conftest*
7221 fi
7222
7223 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7224   echo "$ac_t""yes" 1>&6
7225     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7226   cat >> confdefs.h <<EOF
7227 #define $ac_tr_func 1
7228 EOF
7229  
7230 else
7231   echo "$ac_t""no" 1>&6
7232 fi
7233 done
7234  ;;
7235   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
7236 echo "configure:7237: checking for getprpwnam in -lsec" >&5
7237 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
7238 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7239   echo $ac_n "(cached) $ac_c" 1>&6
7240 else
7241   ac_save_LIBS="$LIBS"
7242 LIBS="-lsec  $LIBS"
7243 cat > conftest.$ac_ext <<EOF
7244 #line 7245 "configure"
7245 #include "confdefs.h"
7246 /* Override any gcc2 internal prototype to avoid an error.  */
7247 /* We use char because int might match the return type of a gcc2
7248     builtin and then its argument prototype would still apply.  */
7249 char getprpwnam();
7250
7251 int main() {
7252 getprpwnam()
7253 ; return 0; }
7254 EOF
7255 if { (eval echo configure:7256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7256   rm -rf conftest*
7257   eval "ac_cv_lib_$ac_lib_var=yes"
7258 else
7259   echo "configure: failed program was:" >&5
7260   cat conftest.$ac_ext >&5
7261   rm -rf conftest*
7262   eval "ac_cv_lib_$ac_lib_var=no"
7263 fi
7264 rm -f conftest*
7265 LIBS="$ac_save_LIBS"
7266
7267 fi
7268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7269   echo "$ac_t""yes" 1>&6
7270     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7272   cat >> confdefs.h <<EOF
7273 #define $ac_tr_lib 1
7274 EOF
7275
7276   LIBS="-lsec $LIBS"
7277
7278 else
7279   echo "$ac_t""no" 1>&6
7280 fi
7281  
7282      for ac_func in getprpwnam
7283 do
7284 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7285 echo "configure:7286: checking for $ac_func" >&5
7286 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7287   echo $ac_n "(cached) $ac_c" 1>&6
7288 else
7289   cat > conftest.$ac_ext <<EOF
7290 #line 7291 "configure"
7291 #include "confdefs.h"
7292 /* System header to define __stub macros and hopefully few prototypes,
7293     which can conflict with char $ac_func(); below.  */
7294 #include <assert.h>
7295 /* Override any gcc2 internal prototype to avoid an error.  */
7296 /* We use char because int might match the return type of a gcc2
7297     builtin and then its argument prototype would still apply.  */
7298 char $ac_func();
7299
7300 int main() {
7301
7302 /* The GNU C library defines this for functions which it implements
7303     to always fail with ENOSYS.  Some functions are actually named
7304     something starting with __ and the normal name is an alias.  */
7305 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7306 choke me
7307 #else
7308 $ac_func();
7309 #endif
7310
7311 ; return 0; }
7312 EOF
7313 if { (eval echo configure:7314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7314   rm -rf conftest*
7315   eval "ac_cv_func_$ac_func=yes"
7316 else
7317   echo "configure: failed program was:" >&5
7318   cat conftest.$ac_ext >&5
7319   rm -rf conftest*
7320   eval "ac_cv_func_$ac_func=no"
7321 fi
7322 rm -f conftest*
7323 fi
7324
7325 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7326   echo "$ac_t""yes" 1>&6
7327     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7328   cat >> confdefs.h <<EOF
7329 #define $ac_tr_func 1
7330 EOF
7331  
7332 else
7333   echo "$ac_t""no" 1>&6
7334 fi
7335 done
7336
7337   ;;
7338   esac
7339
7340
7341 # this bit needs to be modified for each OS that is suported by
7342 # smbwrapper. You need to specify how to created a shared library and
7343 # how to compile C code to produce PIC object files
7344
7345 # these are the defaults, good for lots of systems
7346 HOST_OS="$host_os"
7347 LDSHFLAGS="-shared"
7348 PICFLAG=""
7349 SHLIBEXT="so"
7350
7351 # and these are for particular systems
7352 case "$host_os" in
7353                 *linux*)   cat >> confdefs.h <<\EOF
7354 #define LINUX 1
7355 EOF
7356 ;;
7357                 *solaris*) cat >> confdefs.h <<\EOF
7358 #define SUNOS5 1
7359 EOF
7360
7361                                         LDSHFLAGS="-G"
7362                 ;;
7363                 *sunos*) cat >> confdefs.h <<\EOF
7364 #define SUNOS4 1
7365 EOF
7366
7367                                         LDSHFLAGS=""
7368                 ;;
7369                 *bsd*) LDSHFLAGS="-shared -Bshareable"
7370                 ;;
7371                 *irix*) cat >> confdefs.h <<\EOF
7372 #define IRIX 1
7373 EOF
7374
7375                         case "$host_os" in
7376                         *irix6*) cat >> confdefs.h <<\EOF
7377 #define IRIX6 1
7378 EOF
7379
7380                         ;;
7381                         esac
7382                         ATTEMPT_WRAP32_BUILD=yes
7383                 ;;
7384                 *aix*) cat >> confdefs.h <<\EOF
7385 #define AIX 1
7386 EOF
7387 ;;
7388                 *hpux*) cat >> confdefs.h <<\EOF
7389 #define HPUX 1
7390 EOF
7391
7392                         SHLIBEXT="sl"
7393                         # Use special PIC flags for the native HP-UX compiler.
7394                         if test $ac_cv_prog_cc_Ae = yes; then
7395                                 LDSHFLAGS="-b"
7396                                 PICFLAG="+z"
7397                         fi
7398                 ;;
7399                 *qnx*) cat >> confdefs.h <<\EOF
7400 #define QNX 1
7401 EOF
7402 ;;
7403                 *osf*) cat >> confdefs.h <<\EOF
7404 #define OSF1 1
7405 EOF
7406 ;;
7407                 *sco*) cat >> confdefs.h <<\EOF
7408 #define SCO 1
7409 EOF
7410 ;;
7411                 *next2*) cat >> confdefs.h <<\EOF
7412 #define NEXT2 1
7413 EOF
7414 ;;
7415                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
7416 set dummy groff; ac_word=$2
7417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7418 echo "configure:7419: checking for $ac_word" >&5
7419 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
7420   echo $ac_n "(cached) $ac_c" 1>&6
7421 else
7422   if test -n "$ROFF"; then
7423   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
7424 else
7425   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7426   ac_dummy="$PATH"
7427   for ac_dir in $ac_dummy; do
7428     test -z "$ac_dir" && ac_dir=.
7429     if test -f $ac_dir/$ac_word; then
7430       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
7431       break
7432     fi
7433   done
7434   IFS="$ac_save_ifs"
7435 fi
7436 fi
7437 ROFF="$ac_cv_prog_ROFF"
7438 if test -n "$ROFF"; then
7439   echo "$ac_t""$ROFF" 1>&6
7440 else
7441   echo "$ac_t""no" 1>&6
7442 fi
7443 ;;
7444                 *sysv4*)
7445                         case "$host" in
7446                                 *-univel-*)     if  test "$GCC" != yes ; then
7447                                                                         cat >> confdefs.h <<\EOF
7448 #define HAVE_MEMSET 1
7449 EOF
7450
7451                                                                 fi
7452                                                                 LDSHFLAGS="-G"
7453                                 ;;
7454                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
7455 #define RELIANTUNIX 1
7456 EOF
7457 ;;
7458                         esac
7459                         ;;
7460                 *sysv5*)
7461                         if  test "$GCC" != yes ; then
7462                                 cat >> confdefs.h <<\EOF
7463 #define HAVE_MEMSET 1
7464 EOF
7465
7466                         fi
7467                         LDSHFLAGS="-G"
7468                         ;;
7469 esac
7470
7471 # try to work out how to produce pic code with this compiler
7472 echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
7473 echo "configure:7474: checking whether ${CC-cc} accepts -fpic" >&5
7474 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then
7475   echo $ac_n "(cached) $ac_c" 1>&6
7476 else
7477   echo 'void f(){}' > conftest.c
7478 if test -z "`${CC-cc} -fpic -c conftest.c 2>&1`"; then
7479   ac_cv_prog_cc_fpic=yes
7480 else
7481   ac_cv_prog_cc_fpic=no
7482 fi
7483 rm -f conftest*
7484
7485 fi
7486
7487 echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6
7488 if test $ac_cv_prog_cc_fpic = yes; then
7489     PICFLAG="-fpic";
7490 fi
7491 if test x$PICFLAG = x; then
7492   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
7493 echo "configure:7494: checking whether ${CC-cc} accepts -Kpic" >&5
7494 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
7495   echo $ac_n "(cached) $ac_c" 1>&6
7496 else
7497   echo 'void f(){}' > conftest.c
7498 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
7499   ac_cv_prog_cc_Kpic=yes
7500 else
7501   ac_cv_prog_cc_Kpic=no
7502 fi
7503 rm -f conftest*
7504
7505 fi
7506
7507 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
7508   if test $ac_cv_prog_cc_Kpic = yes; then
7509     PICFLAG="-Kpic";
7510   fi
7511 fi
7512 if test x$PICFLAG = x; then
7513   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
7514 echo "configure:7515: checking whether ${CC-cc} accepts -KPIC" >&5
7515 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
7516   echo $ac_n "(cached) $ac_c" 1>&6
7517 else
7518   echo 'void f(){}' > conftest.c
7519 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
7520   ac_cv_prog_cc_KPIC=yes
7521 else
7522   ac_cv_prog_cc_KPIC=no
7523 fi
7524 rm -f conftest*
7525
7526 fi
7527
7528 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
7529   if test $ac_cv_prog_cc_KPIC = yes; then
7530     PICFLAG="-KPIC";
7531   fi
7532 fi
7533
7534 ################
7535
7536 echo $ac_n "checking for long long""... $ac_c" 1>&6
7537 echo "configure:7538: checking for long long" >&5
7538 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
7539   echo $ac_n "(cached) $ac_c" 1>&6
7540 else
7541   
7542 if test "$cross_compiling" = yes; then
7543   samba_cv_have_longlong=cross
7544 else
7545   cat > conftest.$ac_ext <<EOF
7546 #line 7547 "configure"
7547 #include "confdefs.h"
7548 #include <stdio.h>
7549 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
7550 EOF
7551 if { (eval echo configure:7552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7552 then
7553   samba_cv_have_longlong=yes
7554 else
7555   echo "configure: failed program was:" >&5
7556   cat conftest.$ac_ext >&5
7557   rm -fr conftest*
7558   samba_cv_have_longlong=no
7559 fi
7560 rm -fr conftest*
7561 fi
7562
7563 fi
7564
7565 echo "$ac_t""$samba_cv_have_longlong" 1>&6
7566 if test x"$samba_cv_have_longlong" = x"yes"; then
7567     cat >> confdefs.h <<\EOF
7568 #define HAVE_LONGLONG 1
7569 EOF
7570
7571 fi
7572
7573 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
7574 echo "configure:7575: checking for 64 bit off_t" >&5
7575 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
7576   echo $ac_n "(cached) $ac_c" 1>&6
7577 else
7578   
7579 if test "$cross_compiling" = yes; then
7580   samba_cv_SIZEOF_OFF_T=cross
7581 else
7582   cat > conftest.$ac_ext <<EOF
7583 #line 7584 "configure"
7584 #include "confdefs.h"
7585 #include <stdio.h>
7586 #include <sys/stat.h>
7587 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
7588 EOF
7589 if { (eval echo configure:7590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7590 then
7591   samba_cv_SIZEOF_OFF_T=yes
7592 else
7593   echo "configure: failed program was:" >&5
7594   cat conftest.$ac_ext >&5
7595   rm -fr conftest*
7596   samba_cv_SIZEOF_OFF_T=no
7597 fi
7598 rm -fr conftest*
7599 fi
7600
7601 fi
7602
7603 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
7604 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
7605     cat >> confdefs.h <<\EOF
7606 #define SIZEOF_OFF_T 8
7607 EOF
7608
7609 fi
7610
7611 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
7612 echo "configure:7613: checking for off64_t" >&5
7613 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
7614   echo $ac_n "(cached) $ac_c" 1>&6
7615 else
7616   
7617 if test "$cross_compiling" = yes; then
7618   samba_cv_HAVE_OFF64_T=cross
7619 else
7620   cat > conftest.$ac_ext <<EOF
7621 #line 7622 "configure"
7622 #include "confdefs.h"
7623
7624 #if defined(HAVE_UNISTD_H)
7625 #include <unistd.h>
7626 #endif
7627 #include <stdio.h>
7628 #include <sys/stat.h>
7629 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
7630 EOF
7631 if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7632 then
7633   samba_cv_HAVE_OFF64_T=yes
7634 else
7635   echo "configure: failed program was:" >&5
7636   cat conftest.$ac_ext >&5
7637   rm -fr conftest*
7638   samba_cv_HAVE_OFF64_T=no
7639 fi
7640 rm -fr conftest*
7641 fi
7642
7643 fi
7644
7645 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
7646 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
7647     cat >> confdefs.h <<\EOF
7648 #define HAVE_OFF64_T 1
7649 EOF
7650
7651 fi
7652
7653 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
7654 echo "configure:7655: checking for 64 bit ino_t" >&5
7655 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
7656   echo $ac_n "(cached) $ac_c" 1>&6
7657 else
7658   
7659 if test "$cross_compiling" = yes; then
7660   samba_cv_SIZEOF_INO_T=cross
7661 else
7662   cat > conftest.$ac_ext <<EOF
7663 #line 7664 "configure"
7664 #include "confdefs.h"
7665 #include <stdio.h>
7666 #include <sys/stat.h>
7667 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
7668 EOF
7669 if { (eval echo configure:7670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7670 then
7671   samba_cv_SIZEOF_INO_T=yes
7672 else
7673   echo "configure: failed program was:" >&5
7674   cat conftest.$ac_ext >&5
7675   rm -fr conftest*
7676   samba_cv_SIZEOF_INO_T=no
7677 fi
7678 rm -fr conftest*
7679 fi
7680
7681 fi
7682
7683 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
7684 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
7685     cat >> confdefs.h <<\EOF
7686 #define SIZEOF_INO_T 8
7687 EOF
7688
7689 fi
7690
7691 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
7692 echo "configure:7693: checking for ino64_t" >&5
7693 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
7694   echo $ac_n "(cached) $ac_c" 1>&6
7695 else
7696   
7697 if test "$cross_compiling" = yes; then
7698   samba_cv_HAVE_INO64_T=cross
7699 else
7700   cat > conftest.$ac_ext <<EOF
7701 #line 7702 "configure"
7702 #include "confdefs.h"
7703
7704 #if defined(HAVE_UNISTD_H)
7705 #include <unistd.h>
7706 #endif
7707 #include <stdio.h>
7708 #include <sys/stat.h>
7709 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
7710 EOF
7711 if { (eval echo configure:7712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7712 then
7713   samba_cv_HAVE_INO64_T=yes
7714 else
7715   echo "configure: failed program was:" >&5
7716   cat conftest.$ac_ext >&5
7717   rm -fr conftest*
7718   samba_cv_HAVE_INO64_T=no
7719 fi
7720 rm -fr conftest*
7721 fi
7722
7723 fi
7724
7725 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
7726 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
7727     cat >> confdefs.h <<\EOF
7728 #define HAVE_INO64_T 1
7729 EOF
7730
7731 fi
7732
7733 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
7734 echo "configure:7735: checking for struct dirent64" >&5
7735 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
7736   echo $ac_n "(cached) $ac_c" 1>&6
7737 else
7738   
7739 cat > conftest.$ac_ext <<EOF
7740 #line 7741 "configure"
7741 #include "confdefs.h"
7742
7743 #if defined(HAVE_UNISTD_H)
7744 #include <unistd.h>
7745 #endif
7746 #include <sys/types.h>
7747 #include <dirent.h>
7748 int main() {
7749 struct dirent64 de;
7750 ; return 0; }
7751 EOF
7752 if { (eval echo configure:7753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7753   rm -rf conftest*
7754   samba_cv_HAVE_STRUCT_DIRENT64=yes
7755 else
7756   echo "configure: failed program was:" >&5
7757   cat conftest.$ac_ext >&5
7758   rm -rf conftest*
7759   samba_cv_HAVE_STRUCT_DIRENT64=no
7760 fi
7761 rm -f conftest*
7762 fi
7763
7764 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
7765 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
7766     cat >> confdefs.h <<\EOF
7767 #define HAVE_STRUCT_DIRENT64 1
7768 EOF
7769
7770 fi
7771
7772 echo $ac_n "checking for union semun""... $ac_c" 1>&6
7773 echo "configure:7774: checking for union semun" >&5
7774 if eval "test \"`echo '$''{'samba_cv_HAVE_UNION_SEMUN'+set}'`\" = set"; then
7775   echo $ac_n "(cached) $ac_c" 1>&6
7776 else
7777   
7778 if test "$cross_compiling" = yes; then
7779   samba_cv_HAVE_UNION_SEMUN=cross
7780 else
7781   cat > conftest.$ac_ext <<EOF
7782 #line 7783 "configure"
7783 #include "confdefs.h"
7784
7785 #include <sys/types.h>
7786 #include <sys/ipc.h>
7787 #include <sys/sem.h>
7788 main() { union semun ss; exit(0); }
7789 EOF
7790 if { (eval echo configure:7791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7791 then
7792   samba_cv_HAVE_UNION_SEMUN=yes
7793 else
7794   echo "configure: failed program was:" >&5
7795   cat conftest.$ac_ext >&5
7796   rm -fr conftest*
7797   samba_cv_HAVE_UNION_SEMUN=no
7798 fi
7799 rm -fr conftest*
7800 fi
7801
7802 fi
7803
7804 echo "$ac_t""$samba_cv_HAVE_UNION_SEMUN" 1>&6
7805 if test x"$samba_cv_HAVE_UNION_SEMUN" = x"yes"; then
7806     cat >> confdefs.h <<\EOF
7807 #define HAVE_UNION_SEMUN 1
7808 EOF
7809
7810 fi
7811
7812 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
7813 echo "configure:7814: checking for unsigned char" >&5
7814 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
7815   echo $ac_n "(cached) $ac_c" 1>&6
7816 else
7817   
7818 if test "$cross_compiling" = yes; then
7819   samba_cv_HAVE_UNSIGNED_CHAR=cross
7820 else
7821   cat > conftest.$ac_ext <<EOF
7822 #line 7823 "configure"
7823 #include "confdefs.h"
7824 #include <stdio.h>
7825 main() { char c; c=250; exit((c > 0)?0:1); }
7826 EOF
7827 if { (eval echo configure:7828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7828 then
7829   samba_cv_HAVE_UNSIGNED_CHAR=yes
7830 else
7831   echo "configure: failed program was:" >&5
7832   cat conftest.$ac_ext >&5
7833   rm -fr conftest*
7834   samba_cv_HAVE_UNSIGNED_CHAR=no
7835 fi
7836 rm -fr conftest*
7837 fi
7838
7839 fi
7840
7841 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
7842 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
7843     cat >> confdefs.h <<\EOF
7844 #define HAVE_UNSIGNED_CHAR 1
7845 EOF
7846
7847 fi
7848
7849 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
7850 echo "configure:7851: checking for sin_len in sock" >&5
7851 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
7852   echo $ac_n "(cached) $ac_c" 1>&6
7853 else
7854   
7855 cat > conftest.$ac_ext <<EOF
7856 #line 7857 "configure"
7857 #include "confdefs.h"
7858 #include <sys/types.h>
7859 #include <sys/socket.h>
7860 #include <netinet/in.h>
7861 int main() {
7862 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
7863 ; return 0; }
7864 EOF
7865 if { (eval echo configure:7866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7866   rm -rf conftest*
7867   samba_cv_HAVE_SOCK_SIN_LEN=yes
7868 else
7869   echo "configure: failed program was:" >&5
7870   cat conftest.$ac_ext >&5
7871   rm -rf conftest*
7872   samba_cv_HAVE_SOCK_SIN_LEN=no
7873 fi
7874 rm -f conftest*
7875 fi
7876
7877 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
7878 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
7879     cat >> confdefs.h <<\EOF
7880 #define HAVE_SOCK_SIN_LEN 1
7881 EOF
7882
7883 fi
7884
7885 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
7886 echo "configure:7887: checking whether seekdir returns void" >&5
7887 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
7888   echo $ac_n "(cached) $ac_c" 1>&6
7889 else
7890   
7891 cat > conftest.$ac_ext <<EOF
7892 #line 7893 "configure"
7893 #include "confdefs.h"
7894 #include <sys/types.h>
7895 #include <dirent.h>
7896 void seekdir(DIR *d, long loc) { return; }
7897 int main() {
7898 return 0;
7899 ; return 0; }
7900 EOF
7901 if { (eval echo configure:7902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7902   rm -rf conftest*
7903   samba_cv_SEEKDIR_RETURNS_VOID=yes
7904 else
7905   echo "configure: failed program was:" >&5
7906   cat conftest.$ac_ext >&5
7907   rm -rf conftest*
7908   samba_cv_SEEKDIR_RETURNS_VOID=no
7909 fi
7910 rm -f conftest*
7911 fi
7912
7913 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
7914 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
7915     cat >> confdefs.h <<\EOF
7916 #define SEEKDIR_RETURNS_VOID 1
7917 EOF
7918
7919 fi
7920
7921 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
7922 echo "configure:7923: checking for __FILE__ macro" >&5
7923 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
7924   echo $ac_n "(cached) $ac_c" 1>&6
7925 else
7926   
7927 cat > conftest.$ac_ext <<EOF
7928 #line 7929 "configure"
7929 #include "confdefs.h"
7930 #include <stdio.h>
7931 int main() {
7932 printf("%s\n", __FILE__);
7933 ; return 0; }
7934 EOF
7935 if { (eval echo configure:7936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7936   rm -rf conftest*
7937   samba_cv_HAVE_FILE_MACRO=yes
7938 else
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -rf conftest*
7942   samba_cv_HAVE_FILE_MACRO=no
7943 fi
7944 rm -f conftest*
7945 fi
7946
7947 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
7948 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
7949     cat >> confdefs.h <<\EOF
7950 #define HAVE_FILE_MACRO 1
7951 EOF
7952
7953 fi
7954
7955 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
7956 echo "configure:7957: checking for __FUNCTION__ macro" >&5
7957 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
7958   echo $ac_n "(cached) $ac_c" 1>&6
7959 else
7960   
7961 cat > conftest.$ac_ext <<EOF
7962 #line 7963 "configure"
7963 #include "confdefs.h"
7964 #include <stdio.h>
7965 int main() {
7966 printf("%s\n", __FUNCTION__);
7967 ; return 0; }
7968 EOF
7969 if { (eval echo configure:7970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7970   rm -rf conftest*
7971   samba_cv_HAVE_FUNCTION_MACRO=yes
7972 else
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   samba_cv_HAVE_FUNCTION_MACRO=no
7977 fi
7978 rm -f conftest*
7979 fi
7980
7981 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
7982 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
7983     cat >> confdefs.h <<\EOF
7984 #define HAVE_FUNCTION_MACRO 1
7985 EOF
7986
7987 fi
7988
7989 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
7990 echo "configure:7991: checking if gettimeofday takes tz argument" >&5
7991 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
7992   echo $ac_n "(cached) $ac_c" 1>&6
7993 else
7994   
7995 if test "$cross_compiling" = yes; then
7996   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
7997 else
7998   cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001
8002 #include <sys/time.h>
8003 #include <unistd.h>
8004 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8005 EOF
8006 if { (eval echo configure:8007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8007 then
8008   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8009 else
8010   echo "configure: failed program was:" >&5
8011   cat conftest.$ac_ext >&5
8012   rm -fr conftest*
8013   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8014 fi
8015 rm -fr conftest*
8016 fi
8017
8018 fi
8019
8020 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8021 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8022     cat >> confdefs.h <<\EOF
8023 #define HAVE_GETTIMEOFDAY_TZ 1
8024 EOF
8025
8026 fi
8027
8028
8029 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
8030 echo "configure:8031: checking for broken readdir" >&5
8031 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
8032   echo $ac_n "(cached) $ac_c" 1>&6
8033 else
8034   
8035 if test "$cross_compiling" = yes; then
8036   samba_cv_HAVE_BROKEN_READDIR=cross
8037 else
8038   cat > conftest.$ac_ext <<EOF
8039 #line 8040 "configure"
8040 #include "confdefs.h"
8041 #include <sys/types.h>
8042 #include <dirent.h>
8043 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
8044 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
8045 di->d_name[0] == 0) exit(0); exit(1);} 
8046 EOF
8047 if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8048 then
8049   samba_cv_HAVE_BROKEN_READDIR=yes
8050 else
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -fr conftest*
8054   samba_cv_HAVE_BROKEN_READDIR=no
8055 fi
8056 rm -fr conftest*
8057 fi
8058
8059 fi
8060
8061 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
8062 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
8063     cat >> confdefs.h <<\EOF
8064 #define HAVE_BROKEN_READDIR 1
8065 EOF
8066
8067 fi
8068
8069 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
8070 echo "configure:8071: checking for utimbuf" >&5
8071 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
8072   echo $ac_n "(cached) $ac_c" 1>&6
8073 else
8074   
8075 cat > conftest.$ac_ext <<EOF
8076 #line 8077 "configure"
8077 #include "confdefs.h"
8078 #include <sys/types.h>
8079 #include <utime.h>
8080 int main() {
8081 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
8082 ; return 0; }
8083 EOF
8084 if { (eval echo configure:8085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8085   rm -rf conftest*
8086   samba_cv_HAVE_UTIMBUF=yes
8087 else
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090   rm -rf conftest*
8091   samba_cv_HAVE_UTIMBUF=no
8092 fi
8093 rm -f conftest*
8094 fi
8095
8096 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
8097 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
8098     cat >> confdefs.h <<\EOF
8099 #define HAVE_UTIMBUF 1
8100 EOF
8101
8102 fi
8103
8104 echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6
8105 echo "configure:8106: checking for kernel oplock type definitions" >&5
8106 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS'+set}'`\" = set"; then
8107   echo $ac_n "(cached) $ac_c" 1>&6
8108 else
8109   
8110 cat > conftest.$ac_ext <<EOF
8111 #line 8112 "configure"
8112 #include "confdefs.h"
8113 #include <sys/types.h>
8114 #include <fcntl.h>
8115 int main() {
8116 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
8117 ; return 0; }
8118 EOF
8119 if { (eval echo configure:8120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8120   rm -rf conftest*
8121   samba_cv_HAVE_KERNEL_OPLOCKS=yes
8122 else
8123   echo "configure: failed program was:" >&5
8124   cat conftest.$ac_ext >&5
8125   rm -rf conftest*
8126   samba_cv_HAVE_KERNEL_OPLOCKS=no
8127 fi
8128 rm -f conftest*
8129 fi
8130
8131 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS" 1>&6
8132 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then
8133     cat >> confdefs.h <<\EOF
8134 #define HAVE_KERNEL_OPLOCKS 1
8135 EOF
8136
8137 fi
8138
8139 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
8140 echo "configure:8141: checking for irix specific capabilities" >&5
8141 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
8142   echo $ac_n "(cached) $ac_c" 1>&6
8143 else
8144   
8145 if test "$cross_compiling" = yes; then
8146   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
8147 else
8148   cat > conftest.$ac_ext <<EOF
8149 #line 8150 "configure"
8150 #include "confdefs.h"
8151 #include <sys/types.h>
8152 #include <sys/capability.h>
8153 main() {
8154  cap_t cap;
8155  if ((cap = cap_get_proc()) == NULL)
8156    exit(1);
8157  cap->cap_effective |= CAP_NETWORK_MGT;
8158  cap->cap_inheritable |= CAP_NETWORK_MGT;
8159  cap_set_proc(cap);
8160  exit(0);
8161 }
8162
8163 EOF
8164 if { (eval echo configure:8165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8165 then
8166   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
8167 else
8168   echo "configure: failed program was:" >&5
8169   cat conftest.$ac_ext >&5
8170   rm -fr conftest*
8171   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
8172 fi
8173 rm -fr conftest*
8174 fi
8175
8176 fi
8177
8178 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
8179 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
8180     cat >> confdefs.h <<\EOF
8181 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
8182 EOF
8183
8184 fi
8185
8186 #
8187 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
8188 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
8189 #
8190
8191 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8192 echo "configure:8193: checking for int16 typedef included by rpc/rpc.h" >&5
8193 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
8194   echo $ac_n "(cached) $ac_c" 1>&6
8195 else
8196   
8197 cat > conftest.$ac_ext <<EOF
8198 #line 8199 "configure"
8199 #include "confdefs.h"
8200 #include <sys/types.h>
8201 #if defined(HAVE_RPC_RPC_H)
8202 #include <rpc/rpc.h>
8203 #endif
8204 int main() {
8205 int16 testvar;
8206 ; return 0; }
8207 EOF
8208 if { (eval echo configure:8209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8209   rm -rf conftest*
8210   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
8211 else
8212   echo "configure: failed program was:" >&5
8213   cat conftest.$ac_ext >&5
8214   rm -rf conftest*
8215   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
8216 fi
8217 rm -f conftest*
8218 fi
8219
8220 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
8221 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
8222     cat >> confdefs.h <<\EOF
8223 #define HAVE_INT16_FROM_RPC_RPC_H 1
8224 EOF
8225
8226 fi
8227
8228 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8229 echo "configure:8230: checking for uint16 typedef included by rpc/rpc.h" >&5
8230 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
8231   echo $ac_n "(cached) $ac_c" 1>&6
8232 else
8233   
8234 cat > conftest.$ac_ext <<EOF
8235 #line 8236 "configure"
8236 #include "confdefs.h"
8237 #include <sys/types.h>
8238 #if defined(HAVE_RPC_RPC_H)
8239 #include <rpc/rpc.h>
8240 #endif
8241 int main() {
8242 uint16 testvar;
8243 ; return 0; }
8244 EOF
8245 if { (eval echo configure:8246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8246   rm -rf conftest*
8247   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
8248 else
8249   echo "configure: failed program was:" >&5
8250   cat conftest.$ac_ext >&5
8251   rm -rf conftest*
8252   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
8253 fi
8254 rm -f conftest*
8255 fi
8256
8257 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
8258 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
8259     cat >> confdefs.h <<\EOF
8260 #define HAVE_UINT16_FROM_RPC_RPC_H 1
8261 EOF
8262
8263 fi
8264
8265 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8266 echo "configure:8267: checking for int32 typedef included by rpc/rpc.h" >&5
8267 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
8268   echo $ac_n "(cached) $ac_c" 1>&6
8269 else
8270   
8271 cat > conftest.$ac_ext <<EOF
8272 #line 8273 "configure"
8273 #include "confdefs.h"
8274 #include <sys/types.h>
8275 #if defined(HAVE_RPC_RPC_H)
8276 #include <rpc/rpc.h>
8277 #endif
8278 int main() {
8279 int32 testvar;
8280 ; return 0; }
8281 EOF
8282 if { (eval echo configure:8283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8283   rm -rf conftest*
8284   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
8285 else
8286   echo "configure: failed program was:" >&5
8287   cat conftest.$ac_ext >&5
8288   rm -rf conftest*
8289   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
8290 fi
8291 rm -f conftest*
8292 fi
8293
8294 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
8295 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
8296     cat >> confdefs.h <<\EOF
8297 #define HAVE_INT32_FROM_RPC_RPC_H 1
8298 EOF
8299
8300 fi
8301
8302 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8303 echo "configure:8304: checking for uint32 typedef included by rpc/rpc.h" >&5
8304 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
8305   echo $ac_n "(cached) $ac_c" 1>&6
8306 else
8307   
8308 cat > conftest.$ac_ext <<EOF
8309 #line 8310 "configure"
8310 #include "confdefs.h"
8311 #include <sys/types.h>
8312 #if defined(HAVE_RPC_RPC_H)
8313 #include <rpc/rpc.h>
8314 #endif
8315 int main() {
8316 uint32 testvar;
8317 ; return 0; }
8318 EOF
8319 if { (eval echo configure:8320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8320   rm -rf conftest*
8321   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
8322 else
8323   echo "configure: failed program was:" >&5
8324   cat conftest.$ac_ext >&5
8325   rm -rf conftest*
8326   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
8327 fi
8328 rm -f conftest*
8329 fi
8330
8331 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
8332 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
8333     cat >> confdefs.h <<\EOF
8334 #define HAVE_UINT32_FROM_RPC_RPC_H 1
8335 EOF
8336
8337 fi
8338
8339
8340 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
8341 echo "configure:8342: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
8342 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
8343   echo $ac_n "(cached) $ac_c" 1>&6
8344 else
8345   
8346 cat > conftest.$ac_ext <<EOF
8347 #line 8348 "configure"
8348 #include "confdefs.h"
8349 #include <sys/types.h>
8350 #ifdef HAVE_SYS_SECURITY_H
8351 #include <sys/security.h>
8352 #include <prot.h>
8353 #endif  /* HAVE_SYS_SECURITY_H */
8354 #if defined(HAVE_RPC_RPC_H)
8355 #include <rpc/rpc.h>
8356 #endif
8357 int main() {
8358 int testvar;
8359 ; return 0; }
8360 EOF
8361 if { (eval echo configure:8362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8362   rm -rf conftest*
8363   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
8364 else
8365   echo "configure: failed program was:" >&5
8366   cat conftest.$ac_ext >&5
8367   rm -rf conftest*
8368   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
8369 fi
8370 rm -f conftest*
8371 fi
8372
8373 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
8374 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
8375     cat >> confdefs.h <<\EOF
8376 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
8377 EOF
8378
8379 fi
8380
8381 echo $ac_n "checking for test routines""... $ac_c" 1>&6
8382 echo "configure:8383: checking for test routines" >&5
8383 if test "$cross_compiling" = yes; then
8384   echo "configure: warning: cannot run when cross-compiling" 1>&2
8385 else
8386   cat > conftest.$ac_ext <<EOF
8387 #line 8388 "configure"
8388 #include "confdefs.h"
8389 #include "${srcdir-.}/tests/trivial.c"
8390 EOF
8391 if { (eval echo configure:8392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8392 then
8393   echo "$ac_t""yes" 1>&6
8394 else
8395   echo "configure: failed program was:" >&5
8396   cat conftest.$ac_ext >&5
8397   rm -fr conftest*
8398   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
8399 fi
8400 rm -fr conftest*
8401 fi
8402
8403
8404 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
8405 echo "configure:8406: checking for ftruncate extend" >&5
8406 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
8407   echo $ac_n "(cached) $ac_c" 1>&6
8408 else
8409   
8410 if test "$cross_compiling" = yes; then
8411   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
8412 else
8413   cat > conftest.$ac_ext <<EOF
8414 #line 8415 "configure"
8415 #include "confdefs.h"
8416 #include "${srcdir-.}/tests/ftruncate.c"
8417 EOF
8418 if { (eval echo configure:8419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8419 then
8420   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
8421 else
8422   echo "configure: failed program was:" >&5
8423   cat conftest.$ac_ext >&5
8424   rm -fr conftest*
8425   samba_cv_HAVE_FTRUNCATE_EXTEND=no
8426 fi
8427 rm -fr conftest*
8428 fi
8429
8430 fi
8431
8432 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
8433 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
8434     cat >> confdefs.h <<\EOF
8435 #define HAVE_FTRUNCATE_EXTEND 1
8436 EOF
8437
8438 fi
8439
8440 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
8441 echo "configure:8442: checking for broken getgroups" >&5
8442 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
8443   echo $ac_n "(cached) $ac_c" 1>&6
8444 else
8445   
8446 if test "$cross_compiling" = yes; then
8447   samba_cv_HAVE_BROKEN_GETGROUPS=cross
8448 else
8449   cat > conftest.$ac_ext <<EOF
8450 #line 8451 "configure"
8451 #include "confdefs.h"
8452 #include "${srcdir-.}/tests/getgroups.c"
8453 EOF
8454 if { (eval echo configure:8455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8455 then
8456   samba_cv_HAVE_BROKEN_GETGROUPS=yes
8457 else
8458   echo "configure: failed program was:" >&5
8459   cat conftest.$ac_ext >&5
8460   rm -fr conftest*
8461   samba_cv_HAVE_BROKEN_GETGROUPS=no
8462 fi
8463 rm -fr conftest*
8464 fi
8465
8466 fi
8467
8468 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
8469 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
8470     cat >> confdefs.h <<\EOF
8471 #define HAVE_BROKEN_GETGROUPS 1
8472 EOF
8473
8474 fi
8475
8476 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
8477 echo "configure:8478: checking whether getpass should be replaced" >&5
8478 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
8479   echo $ac_n "(cached) $ac_c" 1>&6
8480 else
8481   
8482 SAVE_CPPFLAGS="$CPPFLAGS"
8483 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
8484 cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8487
8488 #define REPLACE_GETPASS 1
8489 #define NO_CONFIG_H 1
8490 #define main dont_declare_main
8491 #include "${srcdir-.}/lib/getsmbpass.c"
8492 #undef main
8493
8494 int main() {
8495
8496 ; return 0; }
8497 EOF
8498 if { (eval echo configure:8499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8499   rm -rf conftest*
8500   samba_cv_REPLACE_GETPASS=yes
8501 else
8502   echo "configure: failed program was:" >&5
8503   cat conftest.$ac_ext >&5
8504   rm -rf conftest*
8505   samba_cv_REPLACE_GETPASS=no
8506 fi
8507 rm -f conftest*
8508 CPPFLAGS="$SAVE_CPPFLAGS"
8509
8510 fi
8511
8512 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
8513 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
8514         cat >> confdefs.h <<\EOF
8515 #define REPLACE_GETPASS 1
8516 EOF
8517
8518 fi
8519
8520 echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
8521 echo "configure:8522: checking for working fnmatch" >&5
8522 if eval "test \"`echo '$''{'samba_cv_HAVE_FNMATCH'+set}'`\" = set"; then
8523   echo $ac_n "(cached) $ac_c" 1>&6
8524 else
8525   
8526 if test "$cross_compiling" = yes; then
8527   samba_cv_HAVE_FNMATCH=cross
8528 else
8529   cat > conftest.$ac_ext <<EOF
8530 #line 8531 "configure"
8531 #include "confdefs.h"
8532 #include <fnmatch.h>
8533 main() { exit(fnmatch("*.o", "x.o", FNM_PATHNAME) == 0? 0: 1); }
8534 EOF
8535 if { (eval echo configure:8536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8536 then
8537   samba_cv_HAVE_FNMATCH=yes
8538 else
8539   echo "configure: failed program was:" >&5
8540   cat conftest.$ac_ext >&5
8541   rm -fr conftest*
8542   samba_cv_HAVE_FNMATCH=no
8543 fi
8544 rm -fr conftest*
8545 fi
8546
8547 fi
8548
8549 echo "$ac_t""$samba_cv_HAVE_FNMATCH" 1>&6
8550 if test x"$samba_cv_HAVE_FNMATCH" = x"yes"; then
8551     cat >> confdefs.h <<\EOF
8552 #define HAVE_FNMATCH 1
8553 EOF
8554
8555 fi
8556
8557 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
8558 echo "configure:8559: checking for broken inet_ntoa" >&5
8559 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
8560   echo $ac_n "(cached) $ac_c" 1>&6
8561 else
8562   
8563 if test "$cross_compiling" = yes; then
8564   samba_cv_REPLACE_INET_NTOA=cross
8565 else
8566   cat > conftest.$ac_ext <<EOF
8567 #line 8568 "configure"
8568 #include "confdefs.h"
8569
8570 #include <stdio.h>
8571 #include <sys/types.h>
8572 #include <netinet/in.h>
8573 #ifdef HAVE_ARPA_INET_H
8574 #include <arpa/inet.h>
8575 #endif
8576 main() { struct in_addr ip; ip.s_addr = 0x12345678;
8577 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
8578     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
8579 exit(1);}
8580 EOF
8581 if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8582 then
8583   samba_cv_REPLACE_INET_NTOA=yes
8584 else
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587   rm -fr conftest*
8588   samba_cv_REPLACE_INET_NTOA=no
8589 fi
8590 rm -fr conftest*
8591 fi
8592
8593 fi
8594
8595 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
8596 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
8597     cat >> confdefs.h <<\EOF
8598 #define REPLACE_INET_NTOA 1
8599 EOF
8600
8601 fi
8602
8603 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
8604 echo "configure:8605: checking for sysconf(_SC_NGROUPS_MAX)" >&5
8605 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
8606   echo $ac_n "(cached) $ac_c" 1>&6
8607 else
8608   
8609 if test "$cross_compiling" = yes; then
8610   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
8611 else
8612   cat > conftest.$ac_ext <<EOF
8613 #line 8614 "configure"
8614 #include "confdefs.h"
8615 #include <unistd.h>
8616 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
8617 EOF
8618 if { (eval echo configure:8619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8619 then
8620   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
8621 else
8622   echo "configure: failed program was:" >&5
8623   cat conftest.$ac_ext >&5
8624   rm -fr conftest*
8625   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
8626 fi
8627 rm -fr conftest*
8628 fi
8629
8630 fi
8631
8632 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
8633 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
8634     cat >> confdefs.h <<\EOF
8635 #define SYSCONF_SC_NGROUPS_MAX 1
8636 EOF
8637
8638 fi
8639
8640 echo $ac_n "checking for root""... $ac_c" 1>&6
8641 echo "configure:8642: checking for root" >&5
8642 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
8643   echo $ac_n "(cached) $ac_c" 1>&6
8644 else
8645   
8646 if test "$cross_compiling" = yes; then
8647   samba_cv_HAVE_ROOT=cross
8648 else
8649   cat > conftest.$ac_ext <<EOF
8650 #line 8651 "configure"
8651 #include "confdefs.h"
8652 main() { exit(getuid() != 0); }
8653 EOF
8654 if { (eval echo configure:8655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8655 then
8656   samba_cv_HAVE_ROOT=yes
8657 else
8658   echo "configure: failed program was:" >&5
8659   cat conftest.$ac_ext >&5
8660   rm -fr conftest*
8661   samba_cv_HAVE_ROOT=no
8662 fi
8663 rm -fr conftest*
8664 fi
8665
8666 fi
8667
8668 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
8669 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
8670     cat >> confdefs.h <<\EOF
8671 #define HAVE_ROOT 1
8672 EOF
8673
8674 else
8675     echo "configure: warning: running as non-root will disable some tests" 1>&2
8676 fi
8677
8678 ##################
8679 # look for a method of finding the list of network interfaces
8680 iface=no;
8681 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
8682 echo "configure:8683: checking for iface AIX" >&5
8683 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
8684   echo $ac_n "(cached) $ac_c" 1>&6
8685 else
8686   
8687 if test "$cross_compiling" = yes; then
8688   samba_cv_HAVE_IFACE_AIX=cross
8689 else
8690   cat > conftest.$ac_ext <<EOF
8691 #line 8692 "configure"
8692 #include "confdefs.h"
8693
8694 #define HAVE_IFACE_AIX 1
8695 #define AUTOCONF_TEST 1
8696 #include "confdefs.h"
8697 #include "${srcdir-.}/lib/interfaces.c"
8698 EOF
8699 if { (eval echo configure:8700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8700 then
8701   samba_cv_HAVE_IFACE_AIX=yes
8702 else
8703   echo "configure: failed program was:" >&5
8704   cat conftest.$ac_ext >&5
8705   rm -fr conftest*
8706   samba_cv_HAVE_IFACE_AIX=no
8707 fi
8708 rm -fr conftest*
8709 fi
8710
8711 fi
8712
8713 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
8714 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
8715     iface=yes;cat >> confdefs.h <<\EOF
8716 #define HAVE_IFACE_AIX 1
8717 EOF
8718
8719 fi
8720
8721 if test $iface = no; then
8722 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
8723 echo "configure:8724: checking for iface ifconf" >&5
8724 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
8725   echo $ac_n "(cached) $ac_c" 1>&6
8726 else
8727   
8728 if test "$cross_compiling" = yes; then
8729   samba_cv_HAVE_IFACE_IFCONF=cross
8730 else
8731   cat > conftest.$ac_ext <<EOF
8732 #line 8733 "configure"
8733 #include "confdefs.h"
8734
8735 #define HAVE_IFACE_IFCONF 1
8736 #define AUTOCONF_TEST 1
8737 #include "confdefs.h"
8738 #include "${srcdir-.}/lib/interfaces.c"
8739 EOF
8740 if { (eval echo configure:8741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8741 then
8742   samba_cv_HAVE_IFACE_IFCONF=yes
8743 else
8744   echo "configure: failed program was:" >&5
8745   cat conftest.$ac_ext >&5
8746   rm -fr conftest*
8747   samba_cv_HAVE_IFACE_IFCONF=no
8748 fi
8749 rm -fr conftest*
8750 fi
8751
8752 fi
8753
8754 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
8755 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
8756     iface=yes;cat >> confdefs.h <<\EOF
8757 #define HAVE_IFACE_IFCONF 1
8758 EOF
8759
8760 fi
8761 fi
8762
8763 if test $iface = no; then
8764 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
8765 echo "configure:8766: checking for iface ifreq" >&5
8766 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
8767   echo $ac_n "(cached) $ac_c" 1>&6
8768 else
8769   
8770 if test "$cross_compiling" = yes; then
8771   samba_cv_HAVE_IFACE_IFREQ=cross
8772 else
8773   cat > conftest.$ac_ext <<EOF
8774 #line 8775 "configure"
8775 #include "confdefs.h"
8776
8777 #define HAVE_IFACE_IFREQ 1
8778 #define AUTOCONF_TEST 1
8779 #include "confdefs.h"
8780 #include "${srcdir-.}/lib/interfaces.c"
8781 EOF
8782 if { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8783 then
8784   samba_cv_HAVE_IFACE_IFREQ=yes
8785 else
8786   echo "configure: failed program was:" >&5
8787   cat conftest.$ac_ext >&5
8788   rm -fr conftest*
8789   samba_cv_HAVE_IFACE_IFREQ=no
8790 fi
8791 rm -fr conftest*
8792 fi
8793
8794 fi
8795
8796 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
8797 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
8798     iface=yes;cat >> confdefs.h <<\EOF
8799 #define HAVE_IFACE_IFREQ 1
8800 EOF
8801
8802 fi
8803 fi
8804
8805
8806 ################################################
8807 # look for a method of setting the effective uid
8808 seteuid=no;
8809 if test $seteuid = no; then
8810 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
8811 echo "configure:8812: checking for setresuid" >&5
8812 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
8813   echo $ac_n "(cached) $ac_c" 1>&6
8814 else
8815   
8816 if test "$cross_compiling" = yes; then
8817   samba_cv_USE_SETRESUID=cross
8818 else
8819   cat > conftest.$ac_ext <<EOF
8820 #line 8821 "configure"
8821 #include "confdefs.h"
8822
8823 #define AUTOCONF_TEST 1
8824 #define USE_SETRESUID 1
8825 #include "confdefs.h"
8826 #include "${srcdir-.}/lib/util_sec.c"
8827 EOF
8828 if { (eval echo configure:8829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8829 then
8830   samba_cv_USE_SETRESUID=yes
8831 else
8832   echo "configure: failed program was:" >&5
8833   cat conftest.$ac_ext >&5
8834   rm -fr conftest*
8835   samba_cv_USE_SETRESUID=no
8836 fi
8837 rm -fr conftest*
8838 fi
8839
8840 fi
8841
8842 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
8843 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
8844     seteuid=yes;cat >> confdefs.h <<\EOF
8845 #define USE_SETRESUID 1
8846 EOF
8847
8848 fi
8849 fi
8850
8851
8852 if test $seteuid = no; then
8853 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
8854 echo "configure:8855: checking for setreuid" >&5
8855 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
8856   echo $ac_n "(cached) $ac_c" 1>&6
8857 else
8858   
8859 if test "$cross_compiling" = yes; then
8860   samba_cv_USE_SETREUID=cross
8861 else
8862   cat > conftest.$ac_ext <<EOF
8863 #line 8864 "configure"
8864 #include "confdefs.h"
8865
8866 #define AUTOCONF_TEST 1
8867 #define USE_SETREUID 1
8868 #include "confdefs.h"
8869 #include "${srcdir-.}/lib/util_sec.c"
8870 EOF
8871 if { (eval echo configure:8872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8872 then
8873   samba_cv_USE_SETREUID=yes
8874 else
8875   echo "configure: failed program was:" >&5
8876   cat conftest.$ac_ext >&5
8877   rm -fr conftest*
8878   samba_cv_USE_SETREUID=no
8879 fi
8880 rm -fr conftest*
8881 fi
8882
8883 fi
8884
8885 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
8886 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
8887     seteuid=yes;cat >> confdefs.h <<\EOF
8888 #define USE_SETREUID 1
8889 EOF
8890
8891 fi
8892 fi
8893
8894 if test $seteuid = no; then
8895 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
8896 echo "configure:8897: checking for seteuid" >&5
8897 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
8898   echo $ac_n "(cached) $ac_c" 1>&6
8899 else
8900   
8901 if test "$cross_compiling" = yes; then
8902   samba_cv_USE_SETEUID=cross
8903 else
8904   cat > conftest.$ac_ext <<EOF
8905 #line 8906 "configure"
8906 #include "confdefs.h"
8907
8908 #define AUTOCONF_TEST 1
8909 #define USE_SETEUID 1
8910 #include "confdefs.h"
8911 #include "${srcdir-.}/lib/util_sec.c"
8912 EOF
8913 if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8914 then
8915   samba_cv_USE_SETEUID=yes
8916 else
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -fr conftest*
8920   samba_cv_USE_SETEUID=no
8921 fi
8922 rm -fr conftest*
8923 fi
8924
8925 fi
8926
8927 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
8928 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
8929     seteuid=yes;cat >> confdefs.h <<\EOF
8930 #define USE_SETEUID 1
8931 EOF
8932
8933 fi
8934 fi
8935
8936 if test $seteuid = no; then
8937 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
8938 echo "configure:8939: checking for setuidx" >&5
8939 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
8940   echo $ac_n "(cached) $ac_c" 1>&6
8941 else
8942   
8943 if test "$cross_compiling" = yes; then
8944   samba_cv_USE_SETUIDX=cross
8945 else
8946   cat > conftest.$ac_ext <<EOF
8947 #line 8948 "configure"
8948 #include "confdefs.h"
8949
8950 #define AUTOCONF_TEST 1
8951 #define USE_SETUIDX 1
8952 #include "confdefs.h"
8953 #include "${srcdir-.}/lib/util_sec.c"
8954 EOF
8955 if { (eval echo configure:8956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8956 then
8957   samba_cv_USE_SETUIDX=yes
8958 else
8959   echo "configure: failed program was:" >&5
8960   cat conftest.$ac_ext >&5
8961   rm -fr conftest*
8962   samba_cv_USE_SETUIDX=no
8963 fi
8964 rm -fr conftest*
8965 fi
8966
8967 fi
8968
8969 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
8970 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
8971     seteuid=yes;cat >> confdefs.h <<\EOF
8972 #define USE_SETUIDX 1
8973 EOF
8974
8975 fi
8976 fi
8977
8978
8979 echo $ac_n "checking for shared mmap""... $ac_c" 1>&6
8980 echo "configure:8981: checking for shared mmap" >&5
8981 if eval "test \"`echo '$''{'samba_cv_HAVE_SHARED_MMAP'+set}'`\" = set"; then
8982   echo $ac_n "(cached) $ac_c" 1>&6
8983 else
8984   
8985 if test "$cross_compiling" = yes; then
8986   samba_cv_HAVE_SHARED_MMAP=cross
8987 else
8988   cat > conftest.$ac_ext <<EOF
8989 #line 8990 "configure"
8990 #include "confdefs.h"
8991 #include "${srcdir-.}/tests/shared_mmap.c"
8992 EOF
8993 if { (eval echo configure:8994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8994 then
8995   samba_cv_HAVE_SHARED_MMAP=yes
8996 else
8997   echo "configure: failed program was:" >&5
8998   cat conftest.$ac_ext >&5
8999   rm -fr conftest*
9000   samba_cv_HAVE_SHARED_MMAP=no
9001 fi
9002 rm -fr conftest*
9003 fi
9004
9005 fi
9006
9007 echo "$ac_t""$samba_cv_HAVE_SHARED_MMAP" 1>&6
9008 if test x"$samba_cv_HAVE_SHARED_MMAP" = x"yes"; then
9009     cat >> confdefs.h <<\EOF
9010 #define HAVE_SHARED_MMAP 1
9011 EOF
9012
9013     cat >> confdefs.h <<\EOF
9014 #define HAVE_MMAP 1
9015 EOF
9016
9017 fi
9018
9019 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
9020 echo "configure:9021: checking for ftruncate needs root" >&5
9021 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
9022   echo $ac_n "(cached) $ac_c" 1>&6
9023 else
9024   
9025 if test "$cross_compiling" = yes; then
9026   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
9027 else
9028   cat > conftest.$ac_ext <<EOF
9029 #line 9030 "configure"
9030 #include "confdefs.h"
9031 #include "${srcdir-.}/tests/ftruncroot.c"
9032 EOF
9033 if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9034 then
9035   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
9036 else
9037   echo "configure: failed program was:" >&5
9038   cat conftest.$ac_ext >&5
9039   rm -fr conftest*
9040   samba_cv_FTRUNCATE_NEEDS_ROOT=no
9041 fi
9042 rm -fr conftest*
9043 fi
9044
9045 fi
9046
9047 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
9048 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
9049     cat >> confdefs.h <<\EOF
9050 #define FTRUNCATE_NEEDS_ROOT 1
9051 EOF
9052
9053 fi
9054
9055 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
9056 echo "configure:9057: checking for fcntl locking" >&5
9057 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
9058   echo $ac_n "(cached) $ac_c" 1>&6
9059 else
9060   
9061 if test "$cross_compiling" = yes; then
9062   samba_cv_HAVE_FCNTL_LOCK=cross
9063 else
9064   cat > conftest.$ac_ext <<EOF
9065 #line 9066 "configure"
9066 #include "confdefs.h"
9067 #include "${srcdir-.}/tests/fcntl_lock.c"
9068 EOF
9069 if { (eval echo configure:9070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9070 then
9071   samba_cv_HAVE_FCNTL_LOCK=yes
9072 else
9073   echo "configure: failed program was:" >&5
9074   cat conftest.$ac_ext >&5
9075   rm -fr conftest*
9076   samba_cv_HAVE_FCNTL_LOCK=no
9077 fi
9078 rm -fr conftest*
9079 fi
9080
9081 fi
9082
9083 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
9084 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
9085     cat >> confdefs.h <<\EOF
9086 #define HAVE_FCNTL_LOCK 1
9087 EOF
9088
9089 fi
9090
9091 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
9092 echo "configure:9093: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
9093 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
9094   echo $ac_n "(cached) $ac_c" 1>&6
9095 else
9096   
9097 if test "$cross_compiling" = yes; then
9098   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
9099 else
9100   cat > conftest.$ac_ext <<EOF
9101 #line 9102 "configure"
9102 #include "confdefs.h"
9103 #include "${srcdir-.}/tests/fcntl_lock64.c"
9104 EOF
9105 if { (eval echo configure:9106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9106 then
9107   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
9108 else
9109   echo "configure: failed program was:" >&5
9110   cat conftest.$ac_ext >&5
9111   rm -fr conftest*
9112   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
9113 fi
9114 rm -fr conftest*
9115 fi
9116
9117 fi
9118
9119 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
9120 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
9121     cat >> confdefs.h <<\EOF
9122 #define HAVE_BROKEN_FCNTL64_LOCKS 1
9123 EOF
9124
9125
9126 else
9127
9128
9129   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
9130 echo "configure:9131: checking for 64 bit fcntl locking" >&5
9131 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
9132   echo $ac_n "(cached) $ac_c" 1>&6
9133 else
9134   
9135   if test "$cross_compiling" = yes; then
9136   samba_cv_HAVE_STRUCT_FLOCK64=cross
9137 else
9138   cat > conftest.$ac_ext <<EOF
9139 #line 9140 "configure"
9140 #include "confdefs.h"
9141
9142 #if defined(HAVE_UNISTD_H)
9143 #include <unistd.h>
9144 #endif
9145 #include <stdio.h>
9146 #include <stdlib.h>
9147
9148 #ifdef HAVE_FCNTL_H
9149 #include <fcntl.h>
9150 #endif
9151
9152 #ifdef HAVE_SYS_FCNTL_H
9153 #include <sys/fcntl.h>
9154 #endif
9155 main() { struct flock64 fl64;
9156 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
9157 exit(0);
9158 #else
9159 exit(1);
9160 #endif
9161 }
9162 EOF
9163 if { (eval echo configure:9164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9164 then
9165   samba_cv_HAVE_STRUCT_FLOCK64=yes
9166 else
9167   echo "configure: failed program was:" >&5
9168   cat conftest.$ac_ext >&5
9169   rm -fr conftest*
9170   samba_cv_HAVE_STRUCT_FLOCK64=no
9171 fi
9172 rm -fr conftest*
9173 fi
9174
9175 fi
9176
9177 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
9178
9179   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
9180       cat >> confdefs.h <<\EOF
9181 #define HAVE_STRUCT_FLOCK64 1
9182 EOF
9183
9184   fi
9185 fi
9186
9187 echo $ac_n "checking for sysv ipc""... $ac_c" 1>&6
9188 echo "configure:9189: checking for sysv ipc" >&5
9189 if eval "test \"`echo '$''{'samba_cv_HAVE_SYSV_IPC'+set}'`\" = set"; then
9190   echo $ac_n "(cached) $ac_c" 1>&6
9191 else
9192   
9193 if test "$cross_compiling" = yes; then
9194   samba_cv_HAVE_SYSV_IPC=cross
9195 else
9196   cat > conftest.$ac_ext <<EOF
9197 #line 9198 "configure"
9198 #include "confdefs.h"
9199 #include "${srcdir-.}/tests/sysv_ipc.c"
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9202 then
9203   samba_cv_HAVE_SYSV_IPC=yes
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -fr conftest*
9208   samba_cv_HAVE_SYSV_IPC=no
9209 fi
9210 rm -fr conftest*
9211 fi
9212
9213 fi
9214
9215 echo "$ac_t""$samba_cv_HAVE_SYSV_IPC" 1>&6
9216 if test x"$samba_cv_HAVE_SYSV_IPC" = x"yes"; then
9217     cat >> confdefs.h <<\EOF
9218 #define HAVE_SYSV_IPC 1
9219 EOF
9220
9221 fi
9222
9223 echo $ac_n "checking for IRIX sysv ipc semun problem using gcc""... $ac_c" 1>&6
9224 echo "configure:9225: checking for IRIX sysv ipc semun problem using gcc" >&5
9225 if eval "test \"`echo '$''{'samba_cv_NEED_SGI_SEMUN_HACK'+set}'`\" = set"; then
9226   echo $ac_n "(cached) $ac_c" 1>&6
9227 else
9228   
9229 if test "$cross_compiling" = yes; then
9230   samba_cv_NEED_SGI_SEMUN_HACK=cross
9231 else
9232   cat > conftest.$ac_ext <<EOF
9233 #line 9234 "configure"
9234 #include "confdefs.h"
9235 #include "${srcdir-.}/tests/sgi_sysv_hack.c"
9236 EOF
9237 if { (eval echo configure:9238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9238 then
9239   samba_cv_NEED_SGI_SEMUN_HACK=yes
9240 else
9241   echo "configure: failed program was:" >&5
9242   cat conftest.$ac_ext >&5
9243   rm -fr conftest*
9244   samba_cv_NEED_SGI_SEMUN_HACK=no
9245 fi
9246 rm -fr conftest*
9247 fi
9248
9249 fi
9250
9251 echo "$ac_t""$samba_cv_NEED_SGI_SEMUN_HACK" 1>&6
9252 if test x"$samba_cv_NEED_SGI_SEMUN_HACK" = x"yes"; then
9253     cat >> confdefs.h <<\EOF
9254 #define NEED_SGI_SEMUN_HACK 1
9255 EOF
9256
9257 fi
9258
9259 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
9260 echo "configure:9261: checking for a crypt that needs truncated salt" >&5
9261 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
9262   echo $ac_n "(cached) $ac_c" 1>&6
9263 else
9264   
9265 if test "$cross_compiling" = yes; then
9266   samba_cv_HAVE_TRUNCATED_SALT=cross
9267 else
9268   cat > conftest.$ac_ext <<EOF
9269 #line 9270 "configure"
9270 #include "confdefs.h"
9271 #include "${srcdir-.}/tests/crypttest.c"
9272 EOF
9273 if { (eval echo configure:9274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9274 then
9275   samba_cv_HAVE_TRUNCATED_SALT=no
9276 else
9277   echo "configure: failed program was:" >&5
9278   cat conftest.$ac_ext >&5
9279   rm -fr conftest*
9280   samba_cv_HAVE_TRUNCATED_SALT=yes
9281 fi
9282 rm -fr conftest*
9283 fi
9284
9285 fi
9286
9287 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
9288 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
9289     cat >> confdefs.h <<\EOF
9290 #define HAVE_TRUNCATED_SALT 1
9291 EOF
9292
9293 fi
9294
9295 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
9296 echo "configure:9297: checking for broken nisplus include files" >&5
9297 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
9298   echo $ac_n "(cached) $ac_c" 1>&6
9299 else
9300   
9301 cat > conftest.$ac_ext <<EOF
9302 #line 9303 "configure"
9303 #include "confdefs.h"
9304 #include <sys/acl.h>
9305 #if defined(HAVE_RPCSVC_NIS_H)
9306 #include <rpcsvc/nis.h>
9307 #endif
9308 int main() {
9309 return 0;
9310 ; return 0; }
9311 EOF
9312 if { (eval echo configure:9313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9313   rm -rf conftest*
9314   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
9315 else
9316   echo "configure: failed program was:" >&5
9317   cat conftest.$ac_ext >&5
9318   rm -rf conftest*
9319   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
9320 fi
9321 rm -f conftest*
9322 fi
9323
9324 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
9325 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
9326     cat >> confdefs.h <<\EOF
9327 #define BROKEN_NISPLUS_INCLUDE_FILES 1
9328 EOF
9329
9330 fi
9331
9332
9333 #################################################
9334 # check for smbwrapper support
9335 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
9336 echo "configure:9337: checking whether to use smbwrapper" >&5
9337 # Check whether --with-smbwrapper or --without-smbwrapper was given.
9338 if test "${with_smbwrapper+set}" = set; then
9339   withval="$with_smbwrapper"
9340    case "$withval" in
9341   yes)
9342     echo "$ac_t""yes" 1>&6
9343     cat >> confdefs.h <<\EOF
9344 #define WITH_SMBWRAPPER 1
9345 EOF
9346
9347         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
9348
9349         if test x$ATTEMPT_WRAP32_BUILD = x; then
9350                 WRAP32=""
9351         else
9352                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
9353         fi
9354
9355 # Conditions under which smbwrapper should not be built.
9356
9357         if test x$PICFLAG = x; then
9358            echo No support for PIC code - disabling smbwrapper and smbsh
9359            WRAP=""
9360            WRAP32=""
9361         elif test x$ac_cv_func_syscall = xno; then
9362            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
9363            WRAP=""
9364            WRAP32=""
9365         fi
9366     ;;
9367   *)
9368     echo "$ac_t""no" 1>&6
9369     ;;
9370   esac 
9371 else
9372   echo "$ac_t""no" 1>&6
9373
9374 fi
9375
9376
9377 #################################################
9378 # check for the AFS filesystem
9379 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
9380 echo "configure:9381: checking whether to use AFS" >&5
9381 # Check whether --with-afs or --without-afs was given.
9382 if test "${with_afs+set}" = set; then
9383   withval="$with_afs"
9384    case "$withval" in
9385   yes)
9386     echo "$ac_t""yes" 1>&6
9387     cat >> confdefs.h <<\EOF
9388 #define WITH_AFS 1
9389 EOF
9390
9391     ;;
9392   *)
9393     echo "$ac_t""no" 1>&6
9394     ;;
9395   esac 
9396 else
9397   echo "$ac_t""no" 1>&6
9398
9399 fi
9400
9401
9402
9403 #################################################
9404 # check for the DFS auth system
9405 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
9406 echo "configure:9407: checking whether to use DFS auth" >&5
9407 # Check whether --with-dfs or --without-dfs was given.
9408 if test "${with_dfs+set}" = set; then
9409   withval="$with_dfs"
9410    case "$withval" in
9411   yes)
9412     echo "$ac_t""yes" 1>&6
9413     cat >> confdefs.h <<\EOF
9414 #define WITH_DFS 1
9415 EOF
9416
9417     ;;
9418   *)
9419     echo "$ac_t""no" 1>&6
9420     ;;
9421   esac 
9422 else
9423   echo "$ac_t""no" 1>&6
9424
9425 fi
9426
9427
9428 #################################################
9429 # check for Kerberos IV auth system
9430 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
9431 echo "configure:9432: checking whether to use Kerberos IV" >&5
9432 # Check whether --with-krb4 or --without-krb4 was given.
9433 if test "${with_krb4+set}" = set; then
9434   withval="$with_krb4"
9435      echo "$ac_t""yes" 1>&6
9436     cat >> confdefs.h <<\EOF
9437 #define KRB4_AUTH 1
9438 EOF
9439
9440     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
9441 echo "configure:9442: checking for dn_expand in -lresolv" >&5
9442 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
9443 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9444   echo $ac_n "(cached) $ac_c" 1>&6
9445 else
9446   ac_save_LIBS="$LIBS"
9447 LIBS="-lresolv  $LIBS"
9448 cat > conftest.$ac_ext <<EOF
9449 #line 9450 "configure"
9450 #include "confdefs.h"
9451 /* Override any gcc2 internal prototype to avoid an error.  */
9452 /* We use char because int might match the return type of a gcc2
9453     builtin and then its argument prototype would still apply.  */
9454 char dn_expand();
9455
9456 int main() {
9457 dn_expand()
9458 ; return 0; }
9459 EOF
9460 if { (eval echo configure:9461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9461   rm -rf conftest*
9462   eval "ac_cv_lib_$ac_lib_var=yes"
9463 else
9464   echo "configure: failed program was:" >&5
9465   cat conftest.$ac_ext >&5
9466   rm -rf conftest*
9467   eval "ac_cv_lib_$ac_lib_var=no"
9468 fi
9469 rm -f conftest*
9470 LIBS="$ac_save_LIBS"
9471
9472 fi
9473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9474   echo "$ac_t""yes" 1>&6
9475     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9476     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9477   cat >> confdefs.h <<EOF
9478 #define $ac_tr_lib 1
9479 EOF
9480
9481   LIBS="-lresolv $LIBS"
9482
9483 else
9484   echo "$ac_t""no" 1>&6
9485 fi
9486
9487     LIBS="$LIBS -lkrb -ldes"
9488     CFLAGS="$CFLAGS -I$withval/include"
9489     LDFLAGS="$LDFLAGS -L$withval/lib"
9490 else
9491   echo "$ac_t""no" 1>&6
9492
9493 fi
9494
9495
9496 #################################################
9497 # check for Kerberos 5 auth system
9498 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
9499 echo "configure:9500: checking whether to use Kerberos 5" >&5
9500 # Check whether --with-krb5 or --without-krb5 was given.
9501 if test "${with_krb5+set}" = set; then
9502   withval="$with_krb5"
9503      echo "$ac_t""yes" 1>&6
9504     cat >> confdefs.h <<\EOF
9505 #define KRB5_AUTH 1
9506 EOF
9507
9508     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
9509     CFLAGS="$CFLAGS -I$withval/include"
9510     LDFLAGS="$LDFLAGS -L$withval/lib"
9511 else
9512   echo "$ac_t""no" 1>&6
9513
9514 fi
9515
9516
9517 #################################################
9518 # check for automount support
9519 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
9520 echo "configure:9521: checking whether to use AUTOMOUNT" >&5
9521 # Check whether --with-automount or --without-automount was given.
9522 if test "${with_automount+set}" = set; then
9523   withval="$with_automount"
9524    case "$withval" in
9525   yes)
9526     echo "$ac_t""yes" 1>&6
9527     cat >> confdefs.h <<\EOF
9528 #define WITH_AUTOMOUNT 1
9529 EOF
9530
9531     ;;
9532   *)
9533     echo "$ac_t""no" 1>&6
9534     ;;
9535   esac 
9536 else
9537   echo "$ac_t""no" 1>&6
9538
9539 fi
9540
9541
9542 #################################################
9543 # check for smbmount support
9544 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
9545 echo "configure:9546: checking whether to use SMBMOUNT" >&5
9546 # Check whether --with-smbmount or --without-smbmount was given.
9547 if test "${with_smbmount+set}" = set; then
9548   withval="$with_smbmount"
9549    case "$withval" in
9550   yes)
9551     echo "$ac_t""yes" 1>&6
9552     cat >> confdefs.h <<\EOF
9553 #define WITH_SMBMOUNT 1
9554 EOF
9555
9556     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
9557     ;;
9558   *)
9559     echo "$ac_t""no" 1>&6
9560     MPROGS=
9561     ;;
9562   esac 
9563 else
9564   echo "$ac_t""no" 1>&6
9565   MPROGS=
9566
9567 fi
9568
9569
9570
9571 #################################################
9572 # check for a PAM password database
9573 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
9574 echo "configure:9575: checking whether to use PAM password database" >&5
9575 # Check whether --with-pam or --without-pam was given.
9576 if test "${with_pam+set}" = set; then
9577   withval="$with_pam"
9578    case "$withval" in
9579   yes)
9580     echo "$ac_t""yes" 1>&6
9581     cat >> confdefs.h <<\EOF
9582 #define WITH_PAM 1
9583 EOF
9584
9585     LIBS="$LIBS -lpam"
9586     ;;
9587   *)
9588     echo "$ac_t""no" 1>&6
9589     ;;
9590   esac 
9591 else
9592   echo "$ac_t""no" 1>&6
9593
9594 fi
9595
9596
9597
9598 #################################################
9599 # check for a LDAP password database
9600 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
9601 echo "configure:9602: checking whether to use LDAP password database" >&5
9602 # Check whether --with-ldap or --without-ldap was given.
9603 if test "${with_ldap+set}" = set; then
9604   withval="$with_ldap"
9605    case "$withval" in
9606   yes)
9607     echo "$ac_t""yes" 1>&6
9608     cat >> confdefs.h <<\EOF
9609 #define WITH_LDAP 1
9610 EOF
9611
9612     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
9613     ;;
9614   *)
9615     echo "$ac_t""no" 1>&6
9616     ;;
9617   esac 
9618 else
9619   echo "$ac_t""no" 1>&6
9620
9621 fi
9622
9623
9624 #################################################
9625 # check for a NISPLUS password database
9626 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
9627 echo "configure:9628: checking whether to use NISPLUS password database" >&5
9628 # Check whether --with-nisplus or --without-nisplus was given.
9629 if test "${with_nisplus+set}" = set; then
9630   withval="$with_nisplus"
9631    case "$withval" in
9632   yes)
9633     echo "$ac_t""yes" 1>&6
9634     cat >> confdefs.h <<\EOF
9635 #define WITH_NISPLUS 1
9636 EOF
9637
9638     ;;
9639   *)
9640     echo "$ac_t""no" 1>&6
9641     ;;
9642   esac 
9643 else
9644   echo "$ac_t""no" 1>&6
9645
9646 fi
9647
9648
9649 #################################################
9650 # check for a NISPLUS_HOME support 
9651 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
9652 echo "configure:9653: checking whether to use NISPLUS_HOME" >&5
9653 # Check whether --with-nisplus-home or --without-nisplus-home was given.
9654 if test "${with_nisplus_home+set}" = set; then
9655   withval="$with_nisplus_home"
9656    case "$withval" in
9657   yes)
9658     echo "$ac_t""yes" 1>&6
9659     cat >> confdefs.h <<\EOF
9660 #define WITH_NISPLUS_HOME 1
9661 EOF
9662
9663     ;;
9664   *)
9665     echo "$ac_t""no" 1>&6
9666     ;;
9667   esac 
9668 else
9669   echo "$ac_t""no" 1>&6
9670
9671 fi
9672
9673
9674 #################################################
9675 # check for the secure socket layer
9676 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
9677 echo "configure:9678: checking whether to use SSL" >&5
9678 # Check whether --with-ssl or --without-ssl was given.
9679 if test "${with_ssl+set}" = set; then
9680   withval="$with_ssl"
9681    case "$withval" in
9682   yes)
9683     echo "$ac_t""yes" 1>&6
9684     cat >> confdefs.h <<\EOF
9685 #define WITH_SSL 1
9686 EOF
9687
9688     withval="/usr/local/ssl"     # default
9689
9690     if test "${with_sslinc+set}" = set; then
9691
9692         withval="$with_sslinc"
9693         case "$withval" in
9694         yes|no)
9695           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
9696           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
9697           LIBS="-lssl -lcrypto $LIBS"
9698           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
9699         ;;
9700         * )
9701           CFLAGS="-I${withval}/include $CFLAGS"
9702           LIBS="-lssl -lcrypto $LIBS"
9703           LDFLAGS="-L${withval}/lib $LDFLAGS"
9704         ;;
9705         esac
9706
9707     else
9708
9709         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
9710         LIBS="-lssl -lcrypto $LIBS"
9711         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
9712
9713     fi
9714
9715     if test ! -d ${withval}; then
9716       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
9717       exit 1
9718     fi 
9719
9720     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
9721
9722     ;;
9723   *)
9724     echo "$ac_t""no" 1>&6
9725     ;;
9726   esac 
9727 else
9728   echo "$ac_t""no" 1>&6
9729
9730 fi
9731
9732
9733 #################################################
9734 # check for syslog logging
9735 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
9736 echo "configure:9737: checking whether to use syslog logging" >&5
9737 # Check whether --with-syslog or --without-syslog was given.
9738 if test "${with_syslog+set}" = set; then
9739   withval="$with_syslog"
9740    case "$withval" in
9741   yes)
9742     echo "$ac_t""yes" 1>&6
9743     cat >> confdefs.h <<\EOF
9744 #define WITH_SYSLOG 1
9745 EOF
9746
9747     ;;
9748   *)
9749     echo "$ac_t""no" 1>&6
9750     ;;
9751   esac 
9752 else
9753   echo "$ac_t""no" 1>&6
9754
9755 fi
9756
9757
9758 #################################################
9759 # check for a shared memory profiling support
9760 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
9761 echo "configure:9762: checking whether to use profiling" >&5
9762 # Check whether --with-profile or --without-profile was given.
9763 if test "${with_profile+set}" = set; then
9764   withval="$with_profile"
9765    case "$withval" in
9766   yes)
9767     echo "$ac_t""yes" 1>&6
9768     cat >> confdefs.h <<\EOF
9769 #define WITH_PROFILE 1
9770 EOF
9771
9772     ;;
9773   *)
9774     echo "$ac_t""no" 1>&6
9775     ;;
9776   esac 
9777 else
9778   echo "$ac_t""no" 1>&6
9779
9780 fi
9781
9782
9783
9784 #################################################
9785 # check for experimental netatalk resource fork support
9786 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
9787 echo "configure:9788: checking whether to support netatalk" >&5
9788 # Check whether --with-netatalk or --without-netatalk was given.
9789 if test "${with_netatalk+set}" = set; then
9790   withval="$with_netatalk"
9791    case "$withval" in
9792   yes)
9793     echo "$ac_t""yes" 1>&6
9794     cat >> confdefs.h <<\EOF
9795 #define WITH_NETATALK 1
9796 EOF
9797
9798     ;;
9799   *)
9800     echo "$ac_t""no" 1>&6
9801     ;;
9802   esac 
9803 else
9804   echo "$ac_t""no" 1>&6
9805
9806 fi
9807
9808
9809 #################################################
9810 # check for experimental disk-quotas support
9811 QUOTAOBJS=noquotas.o
9812
9813 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
9814 echo "configure:9815: checking whether to support disk-quotas" >&5
9815 # Check whether --with-quotas or --without-quotas was given.
9816 if test "${with_quotas+set}" = set; then
9817   withval="$with_quotas"
9818    case "$withval" in
9819   yes)
9820     echo "$ac_t""yes" 1>&6
9821     QUOTAOBJS=quotas.o
9822     ;;
9823   *)
9824     echo "$ac_t""no" 1>&6
9825     ;;
9826   esac 
9827 else
9828   echo "$ac_t""no" 1>&6
9829
9830 fi
9831
9832
9833
9834 #################################################
9835 # check for experimental utmp accounting
9836
9837 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
9838 echo "configure:9839: checking whether to support utmp accounting" >&5
9839 # Check whether --with-utmp or --without-utmp was given.
9840 if test "${with_utmp+set}" = set; then
9841   withval="$with_utmp"
9842    case "$withval" in
9843   yes)
9844     echo "$ac_t""yes" 1>&6
9845     cat >> confdefs.h <<\EOF
9846 #define WITH_UTMP 1
9847 EOF
9848
9849     ;;
9850   *)
9851     echo "$ac_t""no" 1>&6
9852     ;;
9853   esac 
9854 else
9855   echo "$ac_t""no" 1>&6
9856
9857 fi
9858
9859
9860 #################################################
9861 # check for MS Dfs support
9862
9863 echo $ac_n "checking whether to support MS Dfs""... $ac_c" 1>&6
9864 echo "configure:9865: checking whether to support MS Dfs" >&5
9865 # Check whether --with-msdfs or --without-msdfs was given.
9866 if test "${with_msdfs+set}" = set; then
9867   withval="$with_msdfs"
9868    case "$withval" in
9869   yes)
9870      echo "$ac_t""yes" 1>&6
9871      cat >> confdefs.h <<\EOF
9872 #define MS_DFS 1
9873 EOF
9874
9875      ;;
9876   *)
9877     echo "$ac_t""no" 1>&6
9878     ;;
9879   esac 
9880 else
9881   echo "$ac_t""no" 1>&6
9882
9883 fi
9884
9885
9886 #################################################
9887 # set private directory location
9888 # Check whether --with-privatedir or --without-privatedir was given.
9889 if test "${with_privatedir+set}" = set; then
9890   withval="$with_privatedir"
9891    case "$withval" in
9892   yes|no)
9893   #
9894   # Just in case anybody calls it without argument
9895   #
9896     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
9897     privatedir='${prefix}/private'
9898   ;;
9899   * )
9900     privatedir="$withval"
9901     ;;
9902   esac
9903   
9904 else
9905   privatedir='${prefix}/private'
9906    
9907
9908 fi
9909
9910
9911 #################################################
9912 # set lock directory location
9913 # Check whether --with-lockdir or --without-lockdir was given.
9914 if test "${with_lockdir+set}" = set; then
9915   withval="$with_lockdir"
9916    case "$withval" in
9917   yes|no)
9918   #
9919   # Just in case anybody calls it without argument
9920   #
9921     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
9922     lockdir='$(VARDIR)/locks'
9923   ;;
9924   * )
9925     lockdir="$withval"
9926     ;;
9927   esac
9928   
9929 else
9930   lockdir='$(VARDIR)/locks'
9931    
9932
9933 fi
9934
9935
9936 #################################################
9937 # set SWAT directory location
9938 # Check whether --with-swatdir or --without-swatdir was given.
9939 if test "${with_swatdir+set}" = set; then
9940   withval="$with_swatdir"
9941    case "$withval" in
9942   yes|no)
9943   #
9944   # Just in case anybody does it
9945   #
9946     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
9947     swatdir='${prefix}/swat'
9948   ;;
9949   * )
9950     swatdir="$withval"
9951     ;;
9952   esac
9953   
9954 else
9955   swatdir='${prefix}/swat'
9956    
9957
9958 fi
9959
9960
9961 #################################################
9962 # these tests are taken from the GNU fileutils package
9963 echo "checking how to get filesystem space usage" 1>&6
9964 echo "configure:9965: checking how to get filesystem space usage" >&5
9965 space=no
9966
9967 # Test for statvfs64.
9968 if test $space = no; then
9969   # SVR4
9970   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
9971 echo "configure:9972: checking statvfs64 function (SVR4)" >&5
9972 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
9973   echo $ac_n "(cached) $ac_c" 1>&6
9974 else
9975   if test "$cross_compiling" = yes; then
9976   fu_cv_sys_stat_statvfs64=cross
9977 else
9978   cat > conftest.$ac_ext <<EOF
9979 #line 9980 "configure"
9980 #include "confdefs.h"
9981
9982 #if defined(HAVE_UNISTD_H)
9983 #include <unistd.h>
9984 #endif
9985 #include <sys/types.h>
9986 #include <sys/statvfs.h>
9987   main ()
9988   {
9989     struct statvfs64 fsd;
9990     exit (statvfs64 (".", &fsd));
9991   }
9992 EOF
9993 if { (eval echo configure:9994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9994 then
9995   fu_cv_sys_stat_statvfs64=yes
9996 else
9997   echo "configure: failed program was:" >&5
9998   cat conftest.$ac_ext >&5
9999   rm -fr conftest*
10000   fu_cv_sys_stat_statvfs64=no
10001 fi
10002 rm -fr conftest*
10003 fi
10004
10005 fi
10006
10007 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
10008   if test $fu_cv_sys_stat_statvfs64 = yes; then
10009     space=yes
10010     cat >> confdefs.h <<\EOF
10011 #define STAT_STATVFS64 1
10012 EOF
10013
10014   fi
10015 fi
10016
10017 # Perform only the link test since it seems there are no variants of the
10018 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
10019 # because that got a false positive on SCO OSR5.  Adding the declaration
10020 # of a `struct statvfs' causes this test to fail (as it should) on such
10021 # systems.  That system is reported to work fine with STAT_STATFS4 which
10022 # is what it gets when this test fails.
10023 if test $space = no; then
10024   # SVR4
10025   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
10026 echo "configure:10027: checking statvfs function (SVR4)" >&5
10027 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
10028   echo $ac_n "(cached) $ac_c" 1>&6
10029 else
10030   cat > conftest.$ac_ext <<EOF
10031 #line 10032 "configure"
10032 #include "confdefs.h"
10033 #include <sys/types.h>
10034 #include <sys/statvfs.h>
10035 int main() {
10036 struct statvfs fsd; statvfs (0, &fsd);
10037 ; return 0; }
10038 EOF
10039 if { (eval echo configure:10040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10040   rm -rf conftest*
10041   fu_cv_sys_stat_statvfs=yes
10042 else
10043   echo "configure: failed program was:" >&5
10044   cat conftest.$ac_ext >&5
10045   rm -rf conftest*
10046   fu_cv_sys_stat_statvfs=no
10047 fi
10048 rm -f conftest*
10049 fi
10050
10051 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
10052   if test $fu_cv_sys_stat_statvfs = yes; then
10053     space=yes
10054     cat >> confdefs.h <<\EOF
10055 #define STAT_STATVFS 1
10056 EOF
10057
10058   fi
10059 fi
10060
10061 if test $space = no; then
10062   # DEC Alpha running OSF/1
10063   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
10064 echo "configure:10065: checking for 3-argument statfs function (DEC OSF/1)" >&5
10065   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
10066   echo $ac_n "(cached) $ac_c" 1>&6
10067 else
10068   if test "$cross_compiling" = yes; then
10069   fu_cv_sys_stat_statfs3_osf1=no
10070 else
10071   cat > conftest.$ac_ext <<EOF
10072 #line 10073 "configure"
10073 #include "confdefs.h"
10074
10075 #include <sys/param.h>
10076 #include <sys/types.h>
10077 #include <sys/mount.h>
10078   main ()
10079   {
10080     struct statfs fsd;
10081     fsd.f_fsize = 0;
10082     exit (statfs (".", &fsd, sizeof (struct statfs)));
10083   }
10084 EOF
10085 if { (eval echo configure:10086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10086 then
10087   fu_cv_sys_stat_statfs3_osf1=yes
10088 else
10089   echo "configure: failed program was:" >&5
10090   cat conftest.$ac_ext >&5
10091   rm -fr conftest*
10092   fu_cv_sys_stat_statfs3_osf1=no
10093 fi
10094 rm -fr conftest*
10095 fi
10096
10097 fi
10098
10099   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
10100   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
10101     space=yes
10102     cat >> confdefs.h <<\EOF
10103 #define STAT_STATFS3_OSF1 1
10104 EOF
10105
10106   fi
10107 fi
10108
10109 if test $space = no; then
10110 # AIX
10111   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
10112 echo "configure:10113: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
10113   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
10114   echo $ac_n "(cached) $ac_c" 1>&6
10115 else
10116   if test "$cross_compiling" = yes; then
10117   fu_cv_sys_stat_statfs2_bsize=no
10118 else
10119   cat > conftest.$ac_ext <<EOF
10120 #line 10121 "configure"
10121 #include "confdefs.h"
10122
10123 #ifdef HAVE_SYS_PARAM_H
10124 #include <sys/param.h>
10125 #endif
10126 #ifdef HAVE_SYS_MOUNT_H
10127 #include <sys/mount.h>
10128 #endif
10129 #ifdef HAVE_SYS_VFS_H
10130 #include <sys/vfs.h>
10131 #endif
10132   main ()
10133   {
10134   struct statfs fsd;
10135   fsd.f_bsize = 0;
10136   exit (statfs (".", &fsd));
10137   }
10138 EOF
10139 if { (eval echo configure:10140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10140 then
10141   fu_cv_sys_stat_statfs2_bsize=yes
10142 else
10143   echo "configure: failed program was:" >&5
10144   cat conftest.$ac_ext >&5
10145   rm -fr conftest*
10146   fu_cv_sys_stat_statfs2_bsize=no
10147 fi
10148 rm -fr conftest*
10149 fi
10150
10151 fi
10152
10153   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
10154   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
10155     space=yes
10156     cat >> confdefs.h <<\EOF
10157 #define STAT_STATFS2_BSIZE 1
10158 EOF
10159
10160   fi
10161 fi
10162
10163 if test $space = no; then
10164 # SVR3
10165   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
10166 echo "configure:10167: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
10167   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
10168   echo $ac_n "(cached) $ac_c" 1>&6
10169 else
10170   if test "$cross_compiling" = yes; then
10171   fu_cv_sys_stat_statfs4=no
10172 else
10173   cat > conftest.$ac_ext <<EOF
10174 #line 10175 "configure"
10175 #include "confdefs.h"
10176 #include <sys/types.h>
10177 #include <sys/statfs.h>
10178   main ()
10179   {
10180   struct statfs fsd;
10181   exit (statfs (".", &fsd, sizeof fsd, 0));
10182   }
10183 EOF
10184 if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10185 then
10186   fu_cv_sys_stat_statfs4=yes
10187 else
10188   echo "configure: failed program was:" >&5
10189   cat conftest.$ac_ext >&5
10190   rm -fr conftest*
10191   fu_cv_sys_stat_statfs4=no
10192 fi
10193 rm -fr conftest*
10194 fi
10195
10196 fi
10197
10198   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
10199   if test $fu_cv_sys_stat_statfs4 = yes; then
10200     space=yes
10201     cat >> confdefs.h <<\EOF
10202 #define STAT_STATFS4 1
10203 EOF
10204
10205   fi
10206 fi
10207
10208 if test $space = no; then
10209 # 4.4BSD and NetBSD
10210   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
10211 echo "configure:10212: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
10212   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
10213   echo $ac_n "(cached) $ac_c" 1>&6
10214 else
10215   if test "$cross_compiling" = yes; then
10216   fu_cv_sys_stat_statfs2_fsize=no
10217 else
10218   cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221 #include <sys/types.h>
10222 #ifdef HAVE_SYS_PARAM_H
10223 #include <sys/param.h>
10224 #endif
10225 #ifdef HAVE_SYS_MOUNT_H
10226 #include <sys/mount.h>
10227 #endif
10228   main ()
10229   {
10230   struct statfs fsd;
10231   fsd.f_fsize = 0;
10232   exit (statfs (".", &fsd));
10233   }
10234 EOF
10235 if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10236 then
10237   fu_cv_sys_stat_statfs2_fsize=yes
10238 else
10239   echo "configure: failed program was:" >&5
10240   cat conftest.$ac_ext >&5
10241   rm -fr conftest*
10242   fu_cv_sys_stat_statfs2_fsize=no
10243 fi
10244 rm -fr conftest*
10245 fi
10246
10247 fi
10248
10249   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
10250   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
10251     space=yes
10252     cat >> confdefs.h <<\EOF
10253 #define STAT_STATFS2_FSIZE 1
10254 EOF
10255
10256   fi
10257 fi
10258
10259 if test $space = no; then
10260   # Ultrix
10261   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
10262 echo "configure:10263: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
10263   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
10264   echo $ac_n "(cached) $ac_c" 1>&6
10265 else
10266   if test "$cross_compiling" = yes; then
10267   fu_cv_sys_stat_fs_data=no
10268 else
10269   cat > conftest.$ac_ext <<EOF
10270 #line 10271 "configure"
10271 #include "confdefs.h"
10272 #include <sys/types.h>
10273 #ifdef HAVE_SYS_PARAM_H
10274 #include <sys/param.h>
10275 #endif
10276 #ifdef HAVE_SYS_MOUNT_H
10277 #include <sys/mount.h>
10278 #endif
10279 #ifdef HAVE_SYS_FS_TYPES_H
10280 #include <sys/fs_types.h>
10281 #endif
10282   main ()
10283   {
10284   struct fs_data fsd;
10285   /* Ultrix's statfs returns 1 for success,
10286      0 for not mounted, -1 for failure.  */
10287   exit (statfs (".", &fsd) != 1);
10288   }
10289 EOF
10290 if { (eval echo configure:10291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10291 then
10292   fu_cv_sys_stat_fs_data=yes
10293 else
10294   echo "configure: failed program was:" >&5
10295   cat conftest.$ac_ext >&5
10296   rm -fr conftest*
10297   fu_cv_sys_stat_fs_data=no
10298 fi
10299 rm -fr conftest*
10300 fi
10301
10302 fi
10303
10304   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
10305   if test $fu_cv_sys_stat_fs_data = yes; then
10306     space=yes
10307     cat >> confdefs.h <<\EOF
10308 #define STAT_STATFS2_FS_DATA 1
10309 EOF
10310
10311   fi
10312 fi
10313
10314 #
10315 # As a gating factor for large file support, in order to
10316 # use <4GB files we must have the following minimal support
10317 # available.
10318 # long long, and a 64 bit off_t or off64_t.
10319 # If we don't have all of these then disable large
10320 # file support.
10321 #
10322 echo "checking if large file support can be enabled"
10323 cat > conftest.$ac_ext <<EOF
10324 #line 10325 "configure"
10325 #include "confdefs.h"
10326
10327 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
10328 #include <sys/types.h>
10329 #else
10330 __COMPILE_ERROR_
10331 #endif
10332
10333 int main() {
10334 int i
10335 ; return 0; }
10336 EOF
10337 if { (eval echo configure:10338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10338   rm -rf conftest*
10339   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
10340 else
10341   echo "configure: failed program was:" >&5
10342   cat conftest.$ac_ext >&5
10343   rm -rf conftest*
10344   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
10345 fi
10346 rm -f conftest*
10347 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
10348     echo "yes"
10349     cat >> confdefs.h <<\EOF
10350 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
10351 EOF
10352
10353 else
10354     echo "no"
10355 fi
10356
10357 echo "checking configure summary"
10358 if test "$cross_compiling" = yes; then
10359   :
10360 else
10361   cat > conftest.$ac_ext <<EOF
10362 #line 10363 "configure"
10363 #include "confdefs.h"
10364 #include "${srcdir-.}/tests/summary.c"
10365 EOF
10366 if { (eval echo configure:10367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10367 then
10368   echo "configure OK";
10369 else
10370   echo "configure: failed program was:" >&5
10371   cat conftest.$ac_ext >&5
10372   rm -fr conftest*
10373   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
10374 fi
10375 rm -fr conftest*
10376 fi
10377
10378
10379 builddir=`pwd`
10380
10381
10382 trap '' 1 2 15
10383 cat > confcache <<\EOF
10384 # This file is a shell script that caches the results of configure
10385 # tests run on this system so they can be shared between configure
10386 # scripts and configure runs.  It is not useful on other systems.
10387 # If it contains results you don't want to keep, you may remove or edit it.
10388 #
10389 # By default, configure uses ./config.cache as the cache file,
10390 # creating it if it does not exist already.  You can give configure
10391 # the --cache-file=FILE option to use a different cache file; that is
10392 # what configure does when it calls configure scripts in
10393 # subdirectories, so they share the cache.
10394 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10395 # config.status only pays attention to the cache file if you give it the
10396 # --recheck option to rerun configure.
10397 #
10398 EOF
10399 # The following way of writing the cache mishandles newlines in values,
10400 # but we know of no workaround that is simple, portable, and efficient.
10401 # So, don't put newlines in cache variables' values.
10402 # Ultrix sh set writes to stderr and can't be redirected directly,
10403 # and sets the high bit in the cache file unless we assign to the vars.
10404 (set) 2>&1 |
10405   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10406   *ac_space=\ *)
10407     # `set' does not quote correctly, so add quotes (double-quote substitution
10408     # turns \\\\ into \\, and sed turns \\ into \).
10409     sed -n \
10410       -e "s/'/'\\\\''/g" \
10411       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10412     ;;
10413   *)
10414     # `set' quotes correctly as required by POSIX, so do not add quotes.
10415     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10416     ;;
10417   esac >> confcache
10418 if cmp -s $cache_file confcache; then
10419   :
10420 else
10421   if test -w $cache_file; then
10422     echo "updating cache $cache_file"
10423     cat confcache > $cache_file
10424   else
10425     echo "not updating unwritable cache $cache_file"
10426   fi
10427 fi
10428 rm -f confcache
10429
10430 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10431
10432 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10433 # Let make expand exec_prefix.
10434 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10435
10436 # Any assignment to VPATH causes Sun make to only execute
10437 # the first set of double-colon rules, so remove it if not needed.
10438 # If there is a colon in the path, we need to keep it.
10439 if test "x$srcdir" = x.; then
10440   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10441 fi
10442
10443 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10444
10445 DEFS=-DHAVE_CONFIG_H
10446
10447 # Without the "./", some shells look in PATH for config.status.
10448 : ${CONFIG_STATUS=./config.status}
10449
10450 echo creating $CONFIG_STATUS
10451 rm -f $CONFIG_STATUS
10452 cat > $CONFIG_STATUS <<EOF
10453 #! /bin/sh
10454 # Generated automatically by configure.
10455 # Run this file to recreate the current configuration.
10456 # This directory was configured as follows,
10457 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10458 #
10459 # $0 $ac_configure_args
10460 #
10461 # Compiler output produced by configure, useful for debugging
10462 # configure, is in ./config.log if it exists.
10463
10464 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10465 for ac_option
10466 do
10467   case "\$ac_option" in
10468   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10469     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10470     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10471   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10472     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10473     exit 0 ;;
10474   -help | --help | --hel | --he | --h)
10475     echo "\$ac_cs_usage"; exit 0 ;;
10476   *) echo "\$ac_cs_usage"; exit 1 ;;
10477   esac
10478 done
10479
10480 ac_given_srcdir=$srcdir
10481 ac_given_INSTALL="$INSTALL"
10482
10483 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10484 EOF
10485 cat >> $CONFIG_STATUS <<EOF
10486
10487 # Protect against being on the right side of a sed subst in config.status.
10488 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10489  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10490 $ac_vpsub
10491 $extrasub
10492 s%@SHELL@%$SHELL%g
10493 s%@CFLAGS@%$CFLAGS%g
10494 s%@CPPFLAGS@%$CPPFLAGS%g
10495 s%@CXXFLAGS@%$CXXFLAGS%g
10496 s%@FFLAGS@%$FFLAGS%g
10497 s%@DEFS@%$DEFS%g
10498 s%@LDFLAGS@%$LDFLAGS%g
10499 s%@LIBS@%$LIBS%g
10500 s%@exec_prefix@%$exec_prefix%g
10501 s%@prefix@%$prefix%g
10502 s%@program_transform_name@%$program_transform_name%g
10503 s%@bindir@%$bindir%g
10504 s%@sbindir@%$sbindir%g
10505 s%@libexecdir@%$libexecdir%g
10506 s%@datadir@%$datadir%g
10507 s%@sysconfdir@%$sysconfdir%g
10508 s%@sharedstatedir@%$sharedstatedir%g
10509 s%@localstatedir@%$localstatedir%g
10510 s%@libdir@%$libdir%g
10511 s%@includedir@%$includedir%g
10512 s%@oldincludedir@%$oldincludedir%g
10513 s%@infodir@%$infodir%g
10514 s%@mandir@%$mandir%g
10515 s%@RUNPROG@%$RUNPROG%g
10516 s%@MPROGS@%$MPROGS%g
10517 s%@LDSHFLAGS@%$LDSHFLAGS%g
10518 s%@HOST_OS@%$HOST_OS%g
10519 s%@WRAP@%$WRAP%g
10520 s%@WRAP32@%$WRAP32%g
10521 s%@PICFLAG@%$PICFLAG%g
10522 s%@SHLIBEXT@%$SHLIBEXT%g
10523 s%@CC@%$CC%g
10524 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10525 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10526 s%@INSTALL_DATA@%$INSTALL_DATA%g
10527 s%@AWK@%$AWK%g
10528 s%@BROKEN_CC@%$BROKEN_CC%g
10529 s%@host@%$host%g
10530 s%@host_alias@%$host_alias%g
10531 s%@host_cpu@%$host_cpu%g
10532 s%@host_vendor@%$host_vendor%g
10533 s%@host_os@%$host_os%g
10534 s%@target@%$target%g
10535 s%@target_alias@%$target_alias%g
10536 s%@target_cpu@%$target_cpu%g
10537 s%@target_vendor@%$target_vendor%g
10538 s%@target_os@%$target_os%g
10539 s%@build@%$build%g
10540 s%@build_alias@%$build_alias%g
10541 s%@build_cpu@%$build_cpu%g
10542 s%@build_vendor@%$build_vendor%g
10543 s%@build_os@%$build_os%g
10544 s%@MAINT@%$MAINT%g
10545 s%@AUTOCONF@%$AUTOCONF%g
10546 s%@AUTOHEADER@%$AUTOHEADER%g
10547 s%@CPP@%$CPP%g
10548 s%@LIBOBJS@%$LIBOBJS%g
10549 s%@ROFF@%$ROFF%g
10550 s%@QUOTAOBJS@%$QUOTAOBJS%g
10551 s%@privatedir@%$privatedir%g
10552 s%@lockdir@%$lockdir%g
10553 s%@swatdir@%$swatdir%g
10554 s%@builddir@%$builddir%g
10555
10556 CEOF
10557 EOF
10558
10559 cat >> $CONFIG_STATUS <<\EOF
10560
10561 # Split the substitutions into bite-sized pieces for seds with
10562 # small command number limits, like on Digital OSF/1 and HP-UX.
10563 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10564 ac_file=1 # Number of current file.
10565 ac_beg=1 # First line for current file.
10566 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10567 ac_more_lines=:
10568 ac_sed_cmds=""
10569 while $ac_more_lines; do
10570   if test $ac_beg -gt 1; then
10571     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10572   else
10573     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10574   fi
10575   if test ! -s conftest.s$ac_file; then
10576     ac_more_lines=false
10577     rm -f conftest.s$ac_file
10578   else
10579     if test -z "$ac_sed_cmds"; then
10580       ac_sed_cmds="sed -f conftest.s$ac_file"
10581     else
10582       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10583     fi
10584     ac_file=`expr $ac_file + 1`
10585     ac_beg=$ac_end
10586     ac_end=`expr $ac_end + $ac_max_sed_cmds`
10587   fi
10588 done
10589 if test -z "$ac_sed_cmds"; then
10590   ac_sed_cmds=cat
10591 fi
10592 EOF
10593
10594 cat >> $CONFIG_STATUS <<EOF
10595
10596 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
10597 EOF
10598 cat >> $CONFIG_STATUS <<\EOF
10599 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10600   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10601   case "$ac_file" in
10602   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10603        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10604   *) ac_file_in="${ac_file}.in" ;;
10605   esac
10606
10607   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10608
10609   # Remove last slash and all that follows it.  Not all systems have dirname.
10610   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10611   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10612     # The file is in a subdirectory.
10613     test ! -d "$ac_dir" && mkdir "$ac_dir"
10614     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10615     # A "../" for each directory in $ac_dir_suffix.
10616     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10617   else
10618     ac_dir_suffix= ac_dots=
10619   fi
10620
10621   case "$ac_given_srcdir" in
10622   .)  srcdir=.
10623       if test -z "$ac_dots"; then top_srcdir=.
10624       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10625   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10626   *) # Relative path.
10627     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10628     top_srcdir="$ac_dots$ac_given_srcdir" ;;
10629   esac
10630
10631   case "$ac_given_INSTALL" in
10632   [/$]*) INSTALL="$ac_given_INSTALL" ;;
10633   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10634   esac
10635
10636   echo creating "$ac_file"
10637   rm -f "$ac_file"
10638   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10639   case "$ac_file" in
10640   *Makefile*) ac_comsub="1i\\
10641 # $configure_input" ;;
10642   *) ac_comsub= ;;
10643   esac
10644
10645   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10646   sed -e "$ac_comsub
10647 s%@configure_input@%$configure_input%g
10648 s%@srcdir@%$srcdir%g
10649 s%@top_srcdir@%$top_srcdir%g
10650 s%@INSTALL@%$INSTALL%g
10651 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10652 fi; done
10653 rm -f conftest.s*
10654
10655 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10656 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10657 #
10658 # ac_d sets the value in "#define NAME VALUE" lines.
10659 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
10660 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
10661 ac_dC='\3'
10662 ac_dD='%g'
10663 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10664 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10665 ac_uB='\([      ]\)%\1#\2define\3'
10666 ac_uC=' '
10667 ac_uD='\4%g'
10668 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10669 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10670 ac_eB='$%\1#\2define\3'
10671 ac_eC=' '
10672 ac_eD='%g'
10673
10674 if test "${CONFIG_HEADERS+set}" != set; then
10675 EOF
10676 cat >> $CONFIG_STATUS <<EOF
10677   CONFIG_HEADERS="include/config.h"
10678 EOF
10679 cat >> $CONFIG_STATUS <<\EOF
10680 fi
10681 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10682   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10683   case "$ac_file" in
10684   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10685        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10686   *) ac_file_in="${ac_file}.in" ;;
10687   esac
10688
10689   echo creating $ac_file
10690
10691   rm -f conftest.frag conftest.in conftest.out
10692   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10693   cat $ac_file_inputs > conftest.in
10694
10695 EOF
10696
10697 # Transform confdefs.h into a sed script conftest.vals that substitutes
10698 # the proper values into config.h.in to produce config.h.  And first:
10699 # Protect against being on the right side of a sed subst in config.status.
10700 # Protect against being in an unquoted here document in config.status.
10701 rm -f conftest.vals
10702 cat > conftest.hdr <<\EOF
10703 s/[\\&%]/\\&/g
10704 s%[\\$`]%\\&%g
10705 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10706 s%ac_d%ac_u%gp
10707 s%ac_u%ac_e%gp
10708 EOF
10709 sed -n -f conftest.hdr confdefs.h > conftest.vals
10710 rm -f conftest.hdr
10711
10712 # This sed command replaces #undef with comments.  This is necessary, for
10713 # example, in the case of _POSIX_SOURCE, which is predefined and required
10714 # on some systems where configure will not decide to define it.
10715 cat >> conftest.vals <<\EOF
10716 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10717 EOF
10718
10719 # Break up conftest.vals because some shells have a limit on
10720 # the size of here documents, and old seds have small limits too.
10721
10722 rm -f conftest.tail
10723 while :
10724 do
10725   ac_lines=`grep -c . conftest.vals`
10726   # grep -c gives empty output for an empty file on some AIX systems.
10727   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10728   # Write a limited-size here document to conftest.frag.
10729   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10730   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10731   echo 'CEOF
10732   sed -f conftest.frag conftest.in > conftest.out
10733   rm -f conftest.in
10734   mv conftest.out conftest.in
10735 ' >> $CONFIG_STATUS
10736   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10737   rm -f conftest.vals
10738   mv conftest.tail conftest.vals
10739 done
10740 rm -f conftest.vals
10741
10742 cat >> $CONFIG_STATUS <<\EOF
10743   rm -f conftest.frag conftest.h
10744   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
10745   cat conftest.in >> conftest.h
10746   rm -f conftest.in
10747   if cmp -s $ac_file conftest.h 2>/dev/null; then
10748     echo "$ac_file is unchanged"
10749     rm -f conftest.h
10750   else
10751     # Remove last slash and all that follows it.  Not all systems have dirname.
10752       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10753       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10754       # The file is in a subdirectory.
10755       test ! -d "$ac_dir" && mkdir "$ac_dir"
10756     fi
10757     rm -f $ac_file
10758     mv conftest.h $ac_file
10759   fi
10760 fi; done
10761
10762 EOF
10763 cat >> $CONFIG_STATUS <<EOF
10764
10765 EOF
10766 cat >> $CONFIG_STATUS <<\EOF
10767
10768 exit 0
10769 EOF
10770 chmod +x $CONFIG_STATUS
10771 rm -fr confdefs* $ac_clean_files
10772 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10773