removed some obsolete configure tests (sysv ipc etc)
[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-shared[=PKGS]  build shared libraries [default=yes]"
17 ac_help="$ac_help
18   --enable-static[=PKGS]  build static libraries [default=yes]"
19 ac_help="$ac_help
20   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
21 ac_help="$ac_help
22   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
23 ac_help="$ac_help
24   --disable-libtool-lock  avoid locking (might break parallel builds)"
25 ac_help="$ac_help
26   --enable-maintainer-mode enable some make rules for maintainers"
27 ac_help="$ac_help
28   --with-smbwrapper     Include SMB wrapper support
29   --without-smbwrapper  Don't include SMB wrapper support (default)"
30 ac_help="$ac_help
31   --with-afs     Include AFS support
32   --without-afs  Don't include AFS support (default)"
33 ac_help="$ac_help
34   --with-dfs     Include DFS support
35   --without-dfs  Don't include DFS support (default)"
36 ac_help="$ac_help
37   --with-krb4=base-dir     Include Kerberos IV support
38   --without-krb4          Don't include Kerberos IV support (default)"
39 ac_help="$ac_help
40   --with-krb5=base-dir     Include Kerberos 5 support
41   --without-krb5          Don't include Kerberos 5 support (default)"
42 ac_help="$ac_help
43   --with-automount     Include AUTOMOUNT support
44   --without-automount  Don't include AUTOMOUNT support (default)"
45 ac_help="$ac_help
46   --with-smbmount     Include SMBMOUNT (Linux only) support
47   --without-smbmount  Don't include SMBMOUNT support (default)"
48 ac_help="$ac_help
49   --with-pam     Include PAM password database support
50   --without-pam  Don't include PAM password database support (default)"
51 ac_help="$ac_help
52   --with-ldap     Include LDAP support
53   --without-ldap  Don't include LDAP support (default)"
54 ac_help="$ac_help
55   --with-nisplus     Include NISPLUS password database support
56   --without-nisplus  Don't include NISPLUS password database support (default)"
57 ac_help="$ac_help
58   --with-nisplus-home     Include NISPLUS_HOME support
59   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
60 ac_help="$ac_help
61   --with-ssl     Include SSL support
62   --without-ssl  Don't include SSL support (default)
63   --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl)"
64 ac_help="$ac_help
65   --with-syslog     Include experimental SYSLOG support
66   --without-syslog  Don't include SYSLOG support (default)"
67 ac_help="$ac_help
68   --with-profile     Include profile support
69   --without-profile  Don't include profile support (default)"
70 ac_help="$ac_help
71   --with-netatalk     Include experimental Netatalk support
72   --without-netatalk  Don't include experimental Netatalk support (default)"
73 ac_help="$ac_help
74   --with-quotas     Include experimental disk-quota support
75   --without-quotas  Don't include experimental disk-quota support (default)"
76 ac_help="$ac_help
77   --with-utmp     Include experimental utmp accounting
78   --without-utmp  Don't include experimental utmp accounting (default)"
79 ac_help="$ac_help
80   --with-msdfs          Include MS Dfs support
81   --without-msdfs       Don't include MS Dfs support (default)"
82 ac_help="$ac_help
83   --with-privatedir=DIR     Where to put smbpasswd ($ac_default_prefix/private)"
84 ac_help="$ac_help
85   --with-lockdir=DIR     Where to put lock files ($ac_default_prefix/var/locks)"
86 ac_help="$ac_help
87   --with-swatdir=DIR     Where to put SWAT files ($ac_default_prefix/swat)"
88
89 # Initialize some variables set by options.
90 # The variables have the same names as the options, with
91 # dashes changed to underlines.
92 build=NONE
93 cache_file=./config.cache
94 exec_prefix=NONE
95 host=NONE
96 no_create=
97 nonopt=NONE
98 no_recursion=
99 prefix=NONE
100 program_prefix=NONE
101 program_suffix=NONE
102 program_transform_name=s,x,x,
103 silent=
104 site=
105 srcdir=
106 target=NONE
107 verbose=
108 x_includes=NONE
109 x_libraries=NONE
110 bindir='${exec_prefix}/bin'
111 sbindir='${exec_prefix}/sbin'
112 libexecdir='${exec_prefix}/libexec'
113 datadir='${prefix}/share'
114 sysconfdir='${prefix}/etc'
115 sharedstatedir='${prefix}/com'
116 localstatedir='${prefix}/var'
117 libdir='${exec_prefix}/lib'
118 includedir='${prefix}/include'
119 oldincludedir='/usr/include'
120 infodir='${prefix}/info'
121 mandir='${prefix}/man'
122
123 # Initialize some other variables.
124 subdirs=
125 MFLAGS= MAKEFLAGS=
126 SHELL=${CONFIG_SHELL-/bin/sh}
127 # Maximum number of lines to put in a shell here document.
128 ac_max_here_lines=12
129
130 ac_prev=
131 for ac_option
132 do
133
134   # If the previous option needs an argument, assign it.
135   if test -n "$ac_prev"; then
136     eval "$ac_prev=\$ac_option"
137     ac_prev=
138     continue
139   fi
140
141   case "$ac_option" in
142   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
143   *) ac_optarg= ;;
144   esac
145
146   # Accept the important Cygnus configure options, so we can diagnose typos.
147
148   case "$ac_option" in
149
150   -bindir | --bindir | --bindi | --bind | --bin | --bi)
151     ac_prev=bindir ;;
152   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
153     bindir="$ac_optarg" ;;
154
155   -build | --build | --buil | --bui | --bu)
156     ac_prev=build ;;
157   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
158     build="$ac_optarg" ;;
159
160   -cache-file | --cache-file | --cache-fil | --cache-fi \
161   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
162     ac_prev=cache_file ;;
163   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
164   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
165     cache_file="$ac_optarg" ;;
166
167   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
168     ac_prev=datadir ;;
169   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
170   | --da=*)
171     datadir="$ac_optarg" ;;
172
173   -disable-* | --disable-*)
174     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
175     # Reject names that are not valid shell variable names.
176     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
177       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
178     fi
179     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
180     eval "enable_${ac_feature}=no" ;;
181
182   -enable-* | --enable-*)
183     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
184     # Reject names that are not valid shell variable names.
185     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
186       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
187     fi
188     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
189     case "$ac_option" in
190       *=*) ;;
191       *) ac_optarg=yes ;;
192     esac
193     eval "enable_${ac_feature}='$ac_optarg'" ;;
194
195   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
196   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
197   | --exec | --exe | --ex)
198     ac_prev=exec_prefix ;;
199   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
200   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
201   | --exec=* | --exe=* | --ex=*)
202     exec_prefix="$ac_optarg" ;;
203
204   -gas | --gas | --ga | --g)
205     # Obsolete; use --with-gas.
206     with_gas=yes ;;
207
208   -help | --help | --hel | --he)
209     # Omit some internal or obsolete options to make the list less imposing.
210     # This message is too long to be a string in the A/UX 3.1 sh.
211     cat << EOF
212 Usage: configure [options] [host]
213 Options: [defaults in brackets after descriptions]
214 Configuration:
215   --cache-file=FILE       cache test results in FILE
216   --help                  print this message
217   --no-create             do not create output files
218   --quiet, --silent       do not print \`checking...' messages
219   --version               print the version of autoconf that created configure
220 Directory and file names:
221   --prefix=PREFIX         install architecture-independent files in PREFIX
222                           [$ac_default_prefix]
223   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
224                           [same as prefix]
225   --bindir=DIR            user executables in DIR [EPREFIX/bin]
226   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
227   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
228   --datadir=DIR           read-only architecture-independent data in DIR
229                           [PREFIX/share]
230   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
231   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
232                           [PREFIX/com]
233   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
234   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
235   --includedir=DIR        C header files in DIR [PREFIX/include]
236   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
237   --infodir=DIR           info documentation in DIR [PREFIX/info]
238   --mandir=DIR            man documentation in DIR [PREFIX/man]
239   --srcdir=DIR            find the sources in DIR [configure dir or ..]
240   --program-prefix=PREFIX prepend PREFIX to installed program names
241   --program-suffix=SUFFIX append SUFFIX to installed program names
242   --program-transform-name=PROGRAM
243                           run sed PROGRAM on installed program names
244 EOF
245     cat << EOF
246 Host type:
247   --build=BUILD           configure for building on BUILD [BUILD=HOST]
248   --host=HOST             configure for HOST [guessed]
249   --target=TARGET         configure for TARGET [TARGET=HOST]
250 Features and packages:
251   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
252   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
253   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
254   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
255   --x-includes=DIR        X include files are in DIR
256   --x-libraries=DIR       X library files are in DIR
257 EOF
258     if test -n "$ac_help"; then
259       echo "--enable and --with options recognized:$ac_help"
260     fi
261     exit 0 ;;
262
263   -host | --host | --hos | --ho)
264     ac_prev=host ;;
265   -host=* | --host=* | --hos=* | --ho=*)
266     host="$ac_optarg" ;;
267
268   -includedir | --includedir | --includedi | --included | --include \
269   | --includ | --inclu | --incl | --inc)
270     ac_prev=includedir ;;
271   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
272   | --includ=* | --inclu=* | --incl=* | --inc=*)
273     includedir="$ac_optarg" ;;
274
275   -infodir | --infodir | --infodi | --infod | --info | --inf)
276     ac_prev=infodir ;;
277   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
278     infodir="$ac_optarg" ;;
279
280   -libdir | --libdir | --libdi | --libd)
281     ac_prev=libdir ;;
282   -libdir=* | --libdir=* | --libdi=* | --libd=*)
283     libdir="$ac_optarg" ;;
284
285   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
286   | --libexe | --libex | --libe)
287     ac_prev=libexecdir ;;
288   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
289   | --libexe=* | --libex=* | --libe=*)
290     libexecdir="$ac_optarg" ;;
291
292   -localstatedir | --localstatedir | --localstatedi | --localstated \
293   | --localstate | --localstat | --localsta | --localst \
294   | --locals | --local | --loca | --loc | --lo)
295     ac_prev=localstatedir ;;
296   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
297   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
298   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
299     localstatedir="$ac_optarg" ;;
300
301   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
302     ac_prev=mandir ;;
303   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
304     mandir="$ac_optarg" ;;
305
306   -nfp | --nfp | --nf)
307     # Obsolete; use --without-fp.
308     with_fp=no ;;
309
310   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
311   | --no-cr | --no-c)
312     no_create=yes ;;
313
314   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
315   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
316     no_recursion=yes ;;
317
318   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
319   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
320   | --oldin | --oldi | --old | --ol | --o)
321     ac_prev=oldincludedir ;;
322   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
323   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
324   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
325     oldincludedir="$ac_optarg" ;;
326
327   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
328     ac_prev=prefix ;;
329   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
330     prefix="$ac_optarg" ;;
331
332   -program-prefix | --program-prefix | --program-prefi | --program-pref \
333   | --program-pre | --program-pr | --program-p)
334     ac_prev=program_prefix ;;
335   -program-prefix=* | --program-prefix=* | --program-prefi=* \
336   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
337     program_prefix="$ac_optarg" ;;
338
339   -program-suffix | --program-suffix | --program-suffi | --program-suff \
340   | --program-suf | --program-su | --program-s)
341     ac_prev=program_suffix ;;
342   -program-suffix=* | --program-suffix=* | --program-suffi=* \
343   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
344     program_suffix="$ac_optarg" ;;
345
346   -program-transform-name | --program-transform-name \
347   | --program-transform-nam | --program-transform-na \
348   | --program-transform-n | --program-transform- \
349   | --program-transform | --program-transfor \
350   | --program-transfo | --program-transf \
351   | --program-trans | --program-tran \
352   | --progr-tra | --program-tr | --program-t)
353     ac_prev=program_transform_name ;;
354   -program-transform-name=* | --program-transform-name=* \
355   | --program-transform-nam=* | --program-transform-na=* \
356   | --program-transform-n=* | --program-transform-=* \
357   | --program-transform=* | --program-transfor=* \
358   | --program-transfo=* | --program-transf=* \
359   | --program-trans=* | --program-tran=* \
360   | --progr-tra=* | --program-tr=* | --program-t=*)
361     program_transform_name="$ac_optarg" ;;
362
363   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
364   | -silent | --silent | --silen | --sile | --sil)
365     silent=yes ;;
366
367   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
368     ac_prev=sbindir ;;
369   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
370   | --sbi=* | --sb=*)
371     sbindir="$ac_optarg" ;;
372
373   -sharedstatedir | --sharedstatedir | --sharedstatedi \
374   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
375   | --sharedst | --shareds | --shared | --share | --shar \
376   | --sha | --sh)
377     ac_prev=sharedstatedir ;;
378   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
379   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
380   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
381   | --sha=* | --sh=*)
382     sharedstatedir="$ac_optarg" ;;
383
384   -site | --site | --sit)
385     ac_prev=site ;;
386   -site=* | --site=* | --sit=*)
387     site="$ac_optarg" ;;
388
389   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
390     ac_prev=srcdir ;;
391   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
392     srcdir="$ac_optarg" ;;
393
394   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
395   | --syscon | --sysco | --sysc | --sys | --sy)
396     ac_prev=sysconfdir ;;
397   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
398   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
399     sysconfdir="$ac_optarg" ;;
400
401   -target | --target | --targe | --targ | --tar | --ta | --t)
402     ac_prev=target ;;
403   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
404     target="$ac_optarg" ;;
405
406   -v | -verbose | --verbose | --verbos | --verbo | --verb)
407     verbose=yes ;;
408
409   -version | --version | --versio | --versi | --vers)
410     echo "configure generated by autoconf version 2.13"
411     exit 0 ;;
412
413   -with-* | --with-*)
414     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
417       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
418     fi
419     ac_package=`echo $ac_package| sed 's/-/_/g'`
420     case "$ac_option" in
421       *=*) ;;
422       *) ac_optarg=yes ;;
423     esac
424     eval "with_${ac_package}='$ac_optarg'" ;;
425
426   -without-* | --without-*)
427     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
428     # Reject names that are not valid shell variable names.
429     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
430       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
431     fi
432     ac_package=`echo $ac_package| sed 's/-/_/g'`
433     eval "with_${ac_package}=no" ;;
434
435   --x)
436     # Obsolete; use --with-x.
437     with_x=yes ;;
438
439   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
440   | --x-incl | --x-inc | --x-in | --x-i)
441     ac_prev=x_includes ;;
442   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
443   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
444     x_includes="$ac_optarg" ;;
445
446   -x-libraries | --x-libraries | --x-librarie | --x-librari \
447   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
448     ac_prev=x_libraries ;;
449   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
450   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
451     x_libraries="$ac_optarg" ;;
452
453   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
454     ;;
455
456   *)
457     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
458       echo "configure: warning: $ac_option: invalid host type" 1>&2
459     fi
460     if test "x$nonopt" != xNONE; then
461       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
462     fi
463     nonopt="$ac_option"
464     ;;
465
466   esac
467 done
468
469 if test -n "$ac_prev"; then
470   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
471 fi
472
473 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
474
475 # File descriptor usage:
476 # 0 standard input
477 # 1 file creation
478 # 2 errors and warnings
479 # 3 some systems may open it to /dev/tty
480 # 4 used on the Kubota Titan
481 # 6 checking for... messages and results
482 # 5 compiler messages saved in config.log
483 if test "$silent" = yes; then
484   exec 6>/dev/null
485 else
486   exec 6>&1
487 fi
488 exec 5>./config.log
489
490 echo "\
491 This file contains any messages produced by compilers while
492 running configure, to aid debugging if configure makes a mistake.
493 " 1>&5
494
495 # Strip out --no-create and --no-recursion so they do not pile up.
496 # Also quote any args containing shell metacharacters.
497 ac_configure_args=
498 for ac_arg
499 do
500   case "$ac_arg" in
501   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
502   | --no-cr | --no-c) ;;
503   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
504   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
505   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
506   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
507   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
508   esac
509 done
510
511 # NLS nuisances.
512 # Only set these to C if already set.  These must not be set unconditionally
513 # because not all systems understand e.g. LANG=C (notably SCO).
514 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
515 # Non-C LC_CTYPE values break the ctype check.
516 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
517 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
518 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
519 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
520
521 # confdefs.h avoids OS command line length limits that DEFS can exceed.
522 rm -rf conftest* confdefs.h
523 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
524 echo > confdefs.h
525
526 # A filename unique to this package, relative to the directory that
527 # configure is in, which we can look for to find out if srcdir is correct.
528 ac_unique_file=include/includes.h
529
530 # Find the source files, if location was not specified.
531 if test -z "$srcdir"; then
532   ac_srcdir_defaulted=yes
533   # Try the directory containing this script, then its parent.
534   ac_prog=$0
535   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
536   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
537   srcdir=$ac_confdir
538   if test ! -r $srcdir/$ac_unique_file; then
539     srcdir=..
540   fi
541 else
542   ac_srcdir_defaulted=no
543 fi
544 if test ! -r $srcdir/$ac_unique_file; then
545   if test "$ac_srcdir_defaulted" = yes; then
546     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
547   else
548     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
549   fi
550 fi
551 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
552
553 # Prefer explicitly selected file to automatically selected ones.
554 if test -z "$CONFIG_SITE"; then
555   if test "x$prefix" != xNONE; then
556     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
557   else
558     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
559   fi
560 fi
561 for ac_site_file in $CONFIG_SITE; do
562   if test -r "$ac_site_file"; then
563     echo "loading site script $ac_site_file"
564     . "$ac_site_file"
565   fi
566 done
567
568 if test -r "$cache_file"; then
569   echo "loading cache $cache_file"
570   . $cache_file
571 else
572   echo "creating cache $cache_file"
573   > $cache_file
574 fi
575
576 ac_ext=c
577 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
578 ac_cpp='$CPP $CPPFLAGS'
579 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
580 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
581 cross_compiling=$ac_cv_prog_cc_cross
582
583 ac_exeext=
584 ac_objext=o
585 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
586   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
587   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
588     ac_n= ac_c='
589 ' ac_t='        '
590   else
591     ac_n=-n ac_c= ac_t=
592   fi
593 else
594   ac_n= ac_c='\c' ac_t=
595 fi
596
597
598
599 # we want to be compatibe with older versions of Samba
600
601
602
603
604
605
606
607
608
609
610
611
612 # compile with optimisation and without debugging by default
613 CFLAGS=${CFLAGS-"-O"}
614
615 # Extract the first word of "gcc", so it can be a program name with args.
616 set dummy gcc; ac_word=$2
617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
618 echo "configure:619: checking for $ac_word" >&5
619 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
620   echo $ac_n "(cached) $ac_c" 1>&6
621 else
622   if test -n "$CC"; then
623   ac_cv_prog_CC="$CC" # Let the user override the test.
624 else
625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
626   ac_dummy="$PATH"
627   for ac_dir in $ac_dummy; do
628     test -z "$ac_dir" && ac_dir=.
629     if test -f $ac_dir/$ac_word; then
630       ac_cv_prog_CC="gcc"
631       break
632     fi
633   done
634   IFS="$ac_save_ifs"
635 fi
636 fi
637 CC="$ac_cv_prog_CC"
638 if test -n "$CC"; then
639   echo "$ac_t""$CC" 1>&6
640 else
641   echo "$ac_t""no" 1>&6
642 fi
643
644 if test -z "$CC"; then
645   # Extract the first word of "cc", so it can be a program name with args.
646 set dummy cc; ac_word=$2
647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
648 echo "configure:649: checking for $ac_word" >&5
649 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
650   echo $ac_n "(cached) $ac_c" 1>&6
651 else
652   if test -n "$CC"; then
653   ac_cv_prog_CC="$CC" # Let the user override the test.
654 else
655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
656   ac_prog_rejected=no
657   ac_dummy="$PATH"
658   for ac_dir in $ac_dummy; do
659     test -z "$ac_dir" && ac_dir=.
660     if test -f $ac_dir/$ac_word; then
661       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
662         ac_prog_rejected=yes
663         continue
664       fi
665       ac_cv_prog_CC="cc"
666       break
667     fi
668   done
669   IFS="$ac_save_ifs"
670 if test $ac_prog_rejected = yes; then
671   # We found a bogon in the path, so make sure we never use it.
672   set dummy $ac_cv_prog_CC
673   shift
674   if test $# -gt 0; then
675     # We chose a different compiler from the bogus one.
676     # However, it has the same basename, so the bogon will be chosen
677     # first if we set CC to just the basename; use the full file name.
678     shift
679     set dummy "$ac_dir/$ac_word" "$@"
680     shift
681     ac_cv_prog_CC="$@"
682   fi
683 fi
684 fi
685 fi
686 CC="$ac_cv_prog_CC"
687 if test -n "$CC"; then
688   echo "$ac_t""$CC" 1>&6
689 else
690   echo "$ac_t""no" 1>&6
691 fi
692
693   if test -z "$CC"; then
694     case "`uname -s`" in
695     *win32* | *WIN32*)
696       # Extract the first word of "cl", so it can be a program name with args.
697 set dummy cl; ac_word=$2
698 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
699 echo "configure:700: checking for $ac_word" >&5
700 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
701   echo $ac_n "(cached) $ac_c" 1>&6
702 else
703   if test -n "$CC"; then
704   ac_cv_prog_CC="$CC" # Let the user override the test.
705 else
706   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
707   ac_dummy="$PATH"
708   for ac_dir in $ac_dummy; do
709     test -z "$ac_dir" && ac_dir=.
710     if test -f $ac_dir/$ac_word; then
711       ac_cv_prog_CC="cl"
712       break
713     fi
714   done
715   IFS="$ac_save_ifs"
716 fi
717 fi
718 CC="$ac_cv_prog_CC"
719 if test -n "$CC"; then
720   echo "$ac_t""$CC" 1>&6
721 else
722   echo "$ac_t""no" 1>&6
723 fi
724  ;;
725     esac
726   fi
727   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
728 fi
729
730 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
731 echo "configure:732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
732
733 ac_ext=c
734 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
735 ac_cpp='$CPP $CPPFLAGS'
736 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
737 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
738 cross_compiling=$ac_cv_prog_cc_cross
739
740 cat > conftest.$ac_ext << EOF
741
742 #line 743 "configure"
743 #include "confdefs.h"
744
745 main(){return(0);}
746 EOF
747 if { (eval echo configure:748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
748   ac_cv_prog_cc_works=yes
749   # If we can't run a trivial program, we are probably using a cross compiler.
750   if (./conftest; exit) 2>/dev/null; then
751     ac_cv_prog_cc_cross=no
752   else
753     ac_cv_prog_cc_cross=yes
754   fi
755 else
756   echo "configure: failed program was:" >&5
757   cat conftest.$ac_ext >&5
758   ac_cv_prog_cc_works=no
759 fi
760 rm -fr conftest*
761 ac_ext=c
762 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
763 ac_cpp='$CPP $CPPFLAGS'
764 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
765 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
766 cross_compiling=$ac_cv_prog_cc_cross
767
768 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
769 if test $ac_cv_prog_cc_works = no; then
770   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
771 fi
772 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
773 echo "configure:774: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
774 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
775 cross_compiling=$ac_cv_prog_cc_cross
776
777 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
778 echo "configure:779: checking whether we are using GNU C" >&5
779 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
780   echo $ac_n "(cached) $ac_c" 1>&6
781 else
782   cat > conftest.c <<EOF
783 #ifdef __GNUC__
784   yes;
785 #endif
786 EOF
787 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
788   ac_cv_prog_gcc=yes
789 else
790   ac_cv_prog_gcc=no
791 fi
792 fi
793
794 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
795
796 if test $ac_cv_prog_gcc = yes; then
797   GCC=yes
798 else
799   GCC=
800 fi
801
802 ac_test_CFLAGS="${CFLAGS+set}"
803 ac_save_CFLAGS="$CFLAGS"
804 CFLAGS=
805 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
806 echo "configure:807: checking whether ${CC-cc} accepts -g" >&5
807 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
808   echo $ac_n "(cached) $ac_c" 1>&6
809 else
810   echo 'void f(){}' > conftest.c
811 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
812   ac_cv_prog_cc_g=yes
813 else
814   ac_cv_prog_cc_g=no
815 fi
816 rm -f conftest*
817
818 fi
819
820 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
821 if test "$ac_test_CFLAGS" = set; then
822   CFLAGS="$ac_save_CFLAGS"
823 elif test $ac_cv_prog_cc_g = yes; then
824   if test "$GCC" = yes; then
825     CFLAGS="-g -O2"
826   else
827     CFLAGS="-g"
828   fi
829 else
830   if test "$GCC" = yes; then
831     CFLAGS="-O2"
832   else
833     CFLAGS=
834   fi
835 fi
836
837 ac_aux_dir=
838 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
839   if test -f $ac_dir/install-sh; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/install-sh -c"
842     break
843   elif test -f $ac_dir/install.sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install.sh -c"
846     break
847   fi
848 done
849 if test -z "$ac_aux_dir"; then
850   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
851 fi
852 ac_config_guess=$ac_aux_dir/config.guess
853 ac_config_sub=$ac_aux_dir/config.sub
854 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
855
856 # Find a good install program.  We prefer a C program (faster),
857 # so one script is as good as another.  But avoid the broken or
858 # incompatible versions:
859 # SysV /etc/install, /usr/sbin/install
860 # SunOS /usr/etc/install
861 # IRIX /sbin/install
862 # AIX /bin/install
863 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
864 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
865 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
866 # ./install, which can be erroneously created by make from ./install.sh.
867 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
868 echo "configure:869: checking for a BSD compatible install" >&5
869 if test -z "$INSTALL"; then
870 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
871   echo $ac_n "(cached) $ac_c" 1>&6
872 else
873     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
874   for ac_dir in $PATH; do
875     # Account for people who put trailing slashes in PATH elements.
876     case "$ac_dir/" in
877     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
878     *)
879       # OSF1 and SCO ODT 3.0 have their own names for install.
880       # Don't use installbsd from OSF since it installs stuff as root
881       # by default.
882       for ac_prog in ginstall scoinst install; do
883         if test -f $ac_dir/$ac_prog; then
884           if test $ac_prog = install &&
885             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
886             # AIX install.  It has an incompatible calling convention.
887             :
888           else
889             ac_cv_path_install="$ac_dir/$ac_prog -c"
890             break 2
891           fi
892         fi
893       done
894       ;;
895     esac
896   done
897   IFS="$ac_save_IFS"
898
899 fi
900   if test "${ac_cv_path_install+set}" = set; then
901     INSTALL="$ac_cv_path_install"
902   else
903     # As a last resort, use the slow shell script.  We don't cache a
904     # path for INSTALL within a source directory, because that will
905     # break other packages using the cache if that directory is
906     # removed, or if the path is relative.
907     INSTALL="$ac_install_sh"
908   fi
909 fi
910 echo "$ac_t""$INSTALL" 1>&6
911
912 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
913 # It thinks the first close brace ends the variable substitution.
914 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
915
916 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
917
918 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
919
920 for ac_prog in gawk mawk nawk awk
921 do
922 # Extract the first word of "$ac_prog", so it can be a program name with args.
923 set dummy $ac_prog; ac_word=$2
924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
925 echo "configure:926: checking for $ac_word" >&5
926 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
927   echo $ac_n "(cached) $ac_c" 1>&6
928 else
929   if test -n "$AWK"; then
930   ac_cv_prog_AWK="$AWK" # Let the user override the test.
931 else
932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
933   ac_dummy="$PATH"
934   for ac_dir in $ac_dummy; do
935     test -z "$ac_dir" && ac_dir=.
936     if test -f $ac_dir/$ac_word; then
937       ac_cv_prog_AWK="$ac_prog"
938       break
939     fi
940   done
941   IFS="$ac_save_ifs"
942 fi
943 fi
944 AWK="$ac_cv_prog_AWK"
945 if test -n "$AWK"; then
946   echo "$ac_t""$AWK" 1>&6
947 else
948   echo "$ac_t""no" 1>&6
949 fi
950
951 test -n "$AWK" && break
952 done
953
954 # Check whether --enable-shared or --disable-shared was given.
955 if test "${enable_shared+set}" = set; then
956   enableval="$enable_shared"
957   p=${PACKAGE-default}
958 case "$enableval" in
959 yes) enable_shared=yes ;;
960 no) enable_shared=no ;;
961 *)
962   enable_shared=no
963   # Look at the argument we got.  We use all the common list separators.
964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
965   for pkg in $enableval; do
966     if test "X$pkg" = "X$p"; then
967       enable_shared=yes
968     fi
969   done
970   IFS="$ac_save_ifs"
971   ;;
972 esac
973 else
974   enable_shared=yes
975 fi
976
977 # Check whether --enable-static or --disable-static was given.
978 if test "${enable_static+set}" = set; then
979   enableval="$enable_static"
980   p=${PACKAGE-default}
981 case "$enableval" in
982 yes) enable_static=yes ;;
983 no) enable_static=no ;;
984 *)
985   enable_static=no
986   # Look at the argument we got.  We use all the common list separators.
987   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
988   for pkg in $enableval; do
989     if test "X$pkg" = "X$p"; then
990       enable_static=yes
991     fi
992   done
993   IFS="$ac_save_ifs"
994   ;;
995 esac
996 else
997   enable_static=yes
998 fi
999
1000 # Check whether --enable-fast-install or --disable-fast-install was given.
1001 if test "${enable_fast_install+set}" = set; then
1002   enableval="$enable_fast_install"
1003   p=${PACKAGE-default}
1004 case "$enableval" in
1005 yes) enable_fast_install=yes ;;
1006 no) enable_fast_install=no ;;
1007 *)
1008   enable_fast_install=no
1009   # Look at the argument we got.  We use all the common list separators.
1010   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1011   for pkg in $enableval; do
1012     if test "X$pkg" = "X$p"; then
1013       enable_fast_install=yes
1014     fi
1015   done
1016   IFS="$ac_save_ifs"
1017   ;;
1018 esac
1019 else
1020   enable_fast_install=yes
1021 fi
1022
1023
1024 # Make sure we can run config.sub.
1025 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1026 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1027 fi
1028
1029 echo $ac_n "checking host system type""... $ac_c" 1>&6
1030 echo "configure:1031: checking host system type" >&5
1031
1032 host_alias=$host
1033 case "$host_alias" in
1034 NONE)
1035   case $nonopt in
1036   NONE)
1037     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1038     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1039     fi ;;
1040   *) host_alias=$nonopt ;;
1041   esac ;;
1042 esac
1043
1044 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1045 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1046 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1047 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1048 echo "$ac_t""$host" 1>&6
1049
1050 echo $ac_n "checking build system type""... $ac_c" 1>&6
1051 echo "configure:1052: checking build system type" >&5
1052
1053 build_alias=$build
1054 case "$build_alias" in
1055 NONE)
1056   case $nonopt in
1057   NONE) build_alias=$host_alias ;;
1058   *) build_alias=$nonopt ;;
1059   esac ;;
1060 esac
1061
1062 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1063 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1064 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1065 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1066 echo "$ac_t""$build" 1>&6
1067
1068 # Extract the first word of "ranlib", so it can be a program name with args.
1069 set dummy ranlib; ac_word=$2
1070 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1071 echo "configure:1072: checking for $ac_word" >&5
1072 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1073   echo $ac_n "(cached) $ac_c" 1>&6
1074 else
1075   if test -n "$RANLIB"; then
1076   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1077 else
1078   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1079   ac_dummy="$PATH"
1080   for ac_dir in $ac_dummy; do
1081     test -z "$ac_dir" && ac_dir=.
1082     if test -f $ac_dir/$ac_word; then
1083       ac_cv_prog_RANLIB="ranlib"
1084       break
1085     fi
1086   done
1087   IFS="$ac_save_ifs"
1088   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1089 fi
1090 fi
1091 RANLIB="$ac_cv_prog_RANLIB"
1092 if test -n "$RANLIB"; then
1093   echo "$ac_t""$RANLIB" 1>&6
1094 else
1095   echo "$ac_t""no" 1>&6
1096 fi
1097
1098 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1099 if test "${with_gnu_ld+set}" = set; then
1100   withval="$with_gnu_ld"
1101   test "$withval" = no || with_gnu_ld=yes
1102 else
1103   with_gnu_ld=no
1104 fi
1105
1106 ac_prog=ld
1107 if test "$ac_cv_prog_gcc" = yes; then
1108   # Check if gcc -print-prog-name=ld gives a path.
1109   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1110 echo "configure:1111: checking for ld used by GCC" >&5
1111   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1112   case "$ac_prog" in
1113     # Accept absolute paths.
1114     [\\/]* | [A-Za-z]:[\\/]*)
1115       re_direlt='/[^/][^/]*/\.\./'
1116       # Canonicalize the path of ld
1117       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1118       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1119         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1120       done
1121       test -z "$LD" && LD="$ac_prog"
1122       ;;
1123   "")
1124     # If it fails, then pretend we aren't using GCC.
1125     ac_prog=ld
1126     ;;
1127   *)
1128     # If it is relative, then search for the first ld in PATH.
1129     with_gnu_ld=unknown
1130     ;;
1131   esac
1132 elif test "$with_gnu_ld" = yes; then
1133   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1134 echo "configure:1135: checking for GNU ld" >&5
1135 else
1136   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1137 echo "configure:1138: checking for non-GNU ld" >&5
1138 fi
1139 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1140   echo $ac_n "(cached) $ac_c" 1>&6
1141 else
1142   if test -z "$LD"; then
1143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1144   for ac_dir in $PATH; do
1145     test -z "$ac_dir" && ac_dir=.
1146     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1147       ac_cv_path_LD="$ac_dir/$ac_prog"
1148       # Check to see if the program is GNU ld.  I'd rather use --version,
1149       # but apparently some GNU ld's only accept -v.
1150       # Break only if it was the GNU/non-GNU ld that we prefer.
1151       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1152         test "$with_gnu_ld" != no && break
1153       else
1154         test "$with_gnu_ld" != yes && break
1155       fi
1156     fi
1157   done
1158   IFS="$ac_save_ifs"
1159 else
1160   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1161 fi
1162 fi
1163
1164 LD="$ac_cv_path_LD"
1165 if test -n "$LD"; then
1166   echo "$ac_t""$LD" 1>&6
1167 else
1168   echo "$ac_t""no" 1>&6
1169 fi
1170 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1171 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1172 echo "configure:1173: checking if the linker ($LD) is GNU ld" >&5
1173 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1174   echo $ac_n "(cached) $ac_c" 1>&6
1175 else
1176   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1177 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1178   ac_cv_prog_gnu_ld=yes
1179 else
1180   ac_cv_prog_gnu_ld=no
1181 fi
1182 fi
1183
1184 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1185
1186
1187 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1188 echo "configure:1189: checking for BSD-compatible nm" >&5
1189 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1190   echo $ac_n "(cached) $ac_c" 1>&6
1191 else
1192   if test -n "$NM"; then
1193   # Let the user override the test.
1194   ac_cv_path_NM="$NM"
1195 else
1196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1197   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1198     test -z "$ac_dir" && ac_dir=.
1199     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1200       # Check to see if the nm accepts a BSD-compat flag.
1201       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1202       #   nm: unknown option "B" ignored
1203       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1204         ac_cv_path_NM="$ac_dir/nm -B"
1205         break
1206       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1207         ac_cv_path_NM="$ac_dir/nm -p"
1208         break
1209       else
1210         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1211         continue # so that we can try to find one that supports BSD flags
1212       fi
1213     fi
1214   done
1215   IFS="$ac_save_ifs"
1216   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1217 fi
1218 fi
1219
1220 NM="$ac_cv_path_NM"
1221 echo "$ac_t""$NM" 1>&6
1222
1223 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1224 echo "configure:1225: checking whether ln -s works" >&5
1225 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1226   echo $ac_n "(cached) $ac_c" 1>&6
1227 else
1228   rm -f conftestdata
1229 if ln -s X conftestdata 2>/dev/null
1230 then
1231   rm -f conftestdata
1232   ac_cv_prog_LN_S="ln -s"
1233 else
1234   ac_cv_prog_LN_S=ln
1235 fi
1236 fi
1237 LN_S="$ac_cv_prog_LN_S"
1238 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1239   echo "$ac_t""yes" 1>&6
1240 else
1241   echo "$ac_t""no" 1>&6
1242 fi
1243
1244
1245 case "$target" in
1246 NONE) lt_target="$host" ;;
1247 *) lt_target="$target" ;;
1248 esac
1249
1250 # Check for any special flags to pass to ltconfig.
1251 libtool_flags="--cache-file=$cache_file"
1252 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1253 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1254 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1255 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1256 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1257
1258
1259 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1260 if test "${enable_libtool_lock+set}" = set; then
1261   enableval="$enable_libtool_lock"
1262   :
1263 fi
1264
1265 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1266 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1267
1268 # Some flags need to be propagated to the compiler or linker for good
1269 # libtool support.
1270 case "$lt_target" in
1271 *-*-irix6*)
1272   # Find out which ABI we are using.
1273   echo '#line 1274 "configure"' > conftest.$ac_ext
1274   if { (eval echo configure:1275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1275     case "`/usr/bin/file conftest.o`" in
1276     *32-bit*)
1277       LD="${LD-ld} -32"
1278       ;;
1279     *N32*)
1280       LD="${LD-ld} -n32"
1281       ;;
1282     *64-bit*)
1283       LD="${LD-ld} -64"
1284       ;;
1285     esac
1286   fi
1287   rm -rf conftest*
1288   ;;
1289
1290 *-*-sco3.2v5*)
1291   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1292   SAVE_CFLAGS="$CFLAGS"
1293   CFLAGS="$CFLAGS -belf"
1294   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1295 echo "configure:1296: checking whether the C compiler needs -belf" >&5
1296 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1297   echo $ac_n "(cached) $ac_c" 1>&6
1298 else
1299   cat > conftest.$ac_ext <<EOF
1300 #line 1301 "configure"
1301 #include "confdefs.h"
1302
1303 int main() {
1304
1305 ; return 0; }
1306 EOF
1307 if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1308   rm -rf conftest*
1309   lt_cv_cc_needs_belf=yes
1310 else
1311   echo "configure: failed program was:" >&5
1312   cat conftest.$ac_ext >&5
1313   rm -rf conftest*
1314   lt_cv_cc_needs_belf=no
1315 fi
1316 rm -f conftest*
1317 fi
1318
1319 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1320   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1321     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1322     CFLAGS="$SAVE_CFLAGS"
1323   fi
1324   ;;
1325
1326
1327 esac
1328
1329
1330 # Save cache, so that ltconfig can load it
1331 cat > confcache <<\EOF
1332 # This file is a shell script that caches the results of configure
1333 # tests run on this system so they can be shared between configure
1334 # scripts and configure runs.  It is not useful on other systems.
1335 # If it contains results you don't want to keep, you may remove or edit it.
1336 #
1337 # By default, configure uses ./config.cache as the cache file,
1338 # creating it if it does not exist already.  You can give configure
1339 # the --cache-file=FILE option to use a different cache file; that is
1340 # what configure does when it calls configure scripts in
1341 # subdirectories, so they share the cache.
1342 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1343 # config.status only pays attention to the cache file if you give it the
1344 # --recheck option to rerun configure.
1345 #
1346 EOF
1347 # The following way of writing the cache mishandles newlines in values,
1348 # but we know of no workaround that is simple, portable, and efficient.
1349 # So, don't put newlines in cache variables' values.
1350 # Ultrix sh set writes to stderr and can't be redirected directly,
1351 # and sets the high bit in the cache file unless we assign to the vars.
1352 (set) 2>&1 |
1353   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1354   *ac_space=\ *)
1355     # `set' does not quote correctly, so add quotes (double-quote substitution
1356     # turns \\\\ into \\, and sed turns \\ into \).
1357     sed -n \
1358       -e "s/'/'\\\\''/g" \
1359       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1360     ;;
1361   *)
1362     # `set' quotes correctly as required by POSIX, so do not add quotes.
1363     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1364     ;;
1365   esac >> confcache
1366 if cmp -s $cache_file confcache; then
1367   :
1368 else
1369   if test -w $cache_file; then
1370     echo "updating cache $cache_file"
1371     cat confcache > $cache_file
1372   else
1373     echo "not updating unwritable cache $cache_file"
1374   fi
1375 fi
1376 rm -f confcache
1377
1378
1379 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1380 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1381 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1382 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1383 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1384 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1385 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1386 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1387
1388 # Reload cache, that may have been modified by ltconfig
1389 if test -r "$cache_file"; then
1390   echo "loading cache $cache_file"
1391   . $cache_file
1392 else
1393   echo "creating cache $cache_file"
1394   > $cache_file
1395 fi
1396
1397
1398 # This can be used to rebuild libtool when needed
1399 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1400
1401 # Always use our own libtool.
1402 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1403
1404 # Redirect the config.log output again, so that the ltconfig log is not
1405 # clobbered by the next message.
1406 exec 5>>./config.log
1407
1408
1409
1410 if test "x$CC" != xcc; then
1411   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1412 echo "configure:1413: checking whether $CC and cc understand -c and -o together" >&5
1413 else
1414   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1415 echo "configure:1416: checking whether cc understands -c and -o together" >&5
1416 fi
1417 set dummy $CC; ac_cc="`echo $2 |
1418                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1419 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1420   echo $ac_n "(cached) $ac_c" 1>&6
1421 else
1422   echo 'foo(){}' > conftest.c
1423 # Make sure it works both with $CC and with simple cc.
1424 # We do the test twice because some compilers refuse to overwrite an
1425 # existing .o file with -o, though they will create one.
1426 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1427 if { (eval echo configure:1428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1428    test -f conftest.o && { (eval echo configure:1429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1429 then
1430   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1431   if test "x$CC" != xcc; then
1432     # Test first that cc exists at all.
1433     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1434       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1435       if { (eval echo configure:1436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1436          test -f conftest.o && { (eval echo configure:1437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1437       then
1438         # cc works too.
1439         :
1440       else
1441         # cc exists but doesn't like -o.
1442         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1443       fi
1444     fi
1445   fi
1446 else
1447   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1448 fi
1449 rm -f conftest*
1450
1451 fi
1452 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1453   echo "$ac_t""yes" 1>&6
1454 else
1455   echo "$ac_t""no" 1>&6
1456   cat >> confdefs.h <<\EOF
1457 #define NO_MINUS_C_MINUS_O 1
1458 EOF
1459
1460 fi
1461
1462 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1463       BROKEN_CC=
1464 else
1465       BROKEN_CC=#
1466 fi
1467
1468
1469 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1470 echo "configure:1471: checking that the C compiler understands volatile" >&5
1471 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1472   echo $ac_n "(cached) $ac_c" 1>&6
1473 else
1474   
1475     cat > conftest.$ac_ext <<EOF
1476 #line 1477 "configure"
1477 #include "confdefs.h"
1478 #include <sys/types.h>
1479 int main() {
1480 volatile int i = 0
1481 ; return 0; }
1482 EOF
1483 if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1484   rm -rf conftest*
1485   samba_cv_volatile=yes
1486 else
1487   echo "configure: failed program was:" >&5
1488   cat conftest.$ac_ext >&5
1489   rm -rf conftest*
1490   samba_cv_volatile=no
1491 fi
1492 rm -f conftest*
1493 fi
1494
1495 echo "$ac_t""$samba_cv_volatile" 1>&6
1496 if test x"$samba_cv_volatile" = x"yes"; then
1497    cat >> confdefs.h <<\EOF
1498 #define HAVE_VOLATILE 1
1499 EOF
1500
1501 fi
1502
1503
1504
1505
1506 # Do some error checking and defaulting for the host and target type.
1507 # The inputs are:
1508 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1509 #
1510 # The rules are:
1511 # 1. You are not allowed to specify --host, --target, and nonopt at the
1512 #    same time.
1513 # 2. Host defaults to nonopt.
1514 # 3. If nonopt is not specified, then host defaults to the current host,
1515 #    as determined by config.guess.
1516 # 4. Target and build default to nonopt.
1517 # 5. If nonopt is not specified, then target and build default to host.
1518
1519 # The aliases save the names the user supplied, while $host etc.
1520 # will get canonicalized.
1521 case $host---$target---$nonopt in
1522 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1523 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1524 esac
1525
1526
1527 # Make sure we can run config.sub.
1528 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1529 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1530 fi
1531
1532 echo $ac_n "checking host system type""... $ac_c" 1>&6
1533 echo "configure:1534: checking host system type" >&5
1534
1535 host_alias=$host
1536 case "$host_alias" in
1537 NONE)
1538   case $nonopt in
1539   NONE)
1540     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1541     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1542     fi ;;
1543   *) host_alias=$nonopt ;;
1544   esac ;;
1545 esac
1546
1547 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1548 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1549 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1550 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1551 echo "$ac_t""$host" 1>&6
1552
1553 echo $ac_n "checking target system type""... $ac_c" 1>&6
1554 echo "configure:1555: checking target system type" >&5
1555
1556 target_alias=$target
1557 case "$target_alias" in
1558 NONE)
1559   case $nonopt in
1560   NONE) target_alias=$host_alias ;;
1561   *) target_alias=$nonopt ;;
1562   esac ;;
1563 esac
1564
1565 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1566 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1567 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1568 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1569 echo "$ac_t""$target" 1>&6
1570
1571 echo $ac_n "checking build system type""... $ac_c" 1>&6
1572 echo "configure:1573: checking build system type" >&5
1573
1574 build_alias=$build
1575 case "$build_alias" in
1576 NONE)
1577   case $nonopt in
1578   NONE) build_alias=$host_alias ;;
1579   *) build_alias=$nonopt ;;
1580   esac ;;
1581 esac
1582
1583 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1584 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1585 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1586 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1587 echo "$ac_t""$build" 1>&6
1588
1589 test "$host_alias" != "$target_alias" &&
1590   test "$program_prefix$program_suffix$program_transform_name" = \
1591     NONENONEs,x,x, &&
1592   program_prefix=${target_alias}-
1593
1594
1595   case "$host_os" in
1596         *irix*) cat >> confdefs.h <<\EOF
1597 #include <standards.h>
1598 EOF
1599
1600         ;;
1601 esac
1602
1603
1604     
1605     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1606 echo "configure:1607: checking config.cache system type" >&5
1607     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1608          test x"$ac_cv_host_system_type" != x"$host"; } ||
1609        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1610          test x"$ac_cv_build_system_type" != x"$build"; } ||
1611        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1612          test x"$ac_cv_target_system_type" != x"$target"; }; then
1613         echo "$ac_t""different" 1>&6
1614         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1615     else
1616         echo "$ac_t""same" 1>&6
1617     fi
1618     ac_cv_host_system_type="$host"
1619     ac_cv_build_system_type="$build"
1620     ac_cv_target_system_type="$target"
1621
1622
1623   # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1624 if test "${enable_maintainer_mode+set}" = set; then
1625   enableval="$enable_maintainer_mode"
1626   maint_mode=$enableval
1627 else
1628   maint_mode=no
1629 fi
1630
1631   if test x"$maint_mode" = x"yes"; then MAINT=; else MAINT='#'; fi
1632   
1633   # Extract the first word of "autoconf", so it can be a program name with args.
1634 set dummy autoconf; ac_word=$2
1635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1636 echo "configure:1637: checking for $ac_word" >&5
1637 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
1638   echo $ac_n "(cached) $ac_c" 1>&6
1639 else
1640   case "$AUTOCONF" in
1641   /*)
1642   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
1643   ;;
1644   ?:/*)                  
1645   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a dos path.
1646   ;;
1647   *)
1648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1649   ac_dummy="$PATH"
1650   for ac_dir in $ac_dummy; do 
1651     test -z "$ac_dir" && ac_dir=.
1652     if test -f $ac_dir/$ac_word; then
1653       ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
1654       break
1655     fi
1656   done
1657   IFS="$ac_save_ifs"
1658   test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF="autoconf"
1659   ;;
1660 esac
1661 fi
1662 AUTOCONF="$ac_cv_path_AUTOCONF"
1663 if test -n "$AUTOCONF"; then
1664   echo "$ac_t""$AUTOCONF" 1>&6
1665 else
1666   echo "$ac_t""no" 1>&6
1667 fi
1668
1669   
1670   # Extract the first word of "autoheader", so it can be a program name with args.
1671 set dummy autoheader; ac_word=$2
1672 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1673 echo "configure:1674: checking for $ac_word" >&5
1674 if eval "test \"`echo '$''{'ac_cv_path_AUTOHEADER'+set}'`\" = set"; then
1675   echo $ac_n "(cached) $ac_c" 1>&6
1676 else
1677   case "$AUTOHEADER" in
1678   /*)
1679   ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path.
1680   ;;
1681   ?:/*)                  
1682   ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a dos path.
1683   ;;
1684   *)
1685   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1686   ac_dummy="$PATH"
1687   for ac_dir in $ac_dummy; do 
1688     test -z "$ac_dir" && ac_dir=.
1689     if test -f $ac_dir/$ac_word; then
1690       ac_cv_path_AUTOHEADER="$ac_dir/$ac_word"
1691       break
1692     fi
1693   done
1694   IFS="$ac_save_ifs"
1695   test -z "$ac_cv_path_AUTOHEADER" && ac_cv_path_AUTOHEADER="autoheader"
1696   ;;
1697 esac
1698 fi
1699 AUTOHEADER="$ac_cv_path_AUTOHEADER"
1700 if test -n "$AUTOHEADER"; then
1701   echo "$ac_t""$AUTOHEADER" 1>&6
1702 else
1703   echo "$ac_t""no" 1>&6
1704 fi
1705
1706   
1707
1708
1709 #
1710 # Config CPPFLAG settings for strange OS's that must be set
1711 # before other tests.
1712 #
1713 case "$host_os" in
1714 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1715     *hpux*)
1716       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1717 echo "configure:1718: checking whether ${CC-cc} accepts -Ae" >&5
1718 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1719   echo $ac_n "(cached) $ac_c" 1>&6
1720 else
1721   echo 'void f(){}' > conftest.c
1722 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1723   ac_cv_prog_cc_Ae=yes
1724 else
1725   ac_cv_prog_cc_Ae=no
1726 fi
1727 rm -f conftest*
1728
1729 fi
1730
1731 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1732       if test $ac_cv_prog_cc_Ae = yes; then
1733         CPPFLAGS="$CPPFLAGS -Ae"
1734       fi
1735 #
1736 # Defines needed for HPUX support.
1737 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1738 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1739 #
1740       case `uname -r` in
1741                         *9*|*10*)
1742                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1743                                 cat >> confdefs.h <<\EOF
1744 #define USE_BOTH_CRYPT_CALLS 1
1745 EOF
1746
1747                                 ;;
1748                         *11*)
1749                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1750                                 cat >> confdefs.h <<\EOF
1751 #define USE_BOTH_CRYPT_CALLS 1
1752 EOF
1753
1754                                 ;;
1755       esac
1756       ;;
1757 #
1758 # AIX4.x doesn't even admit to having large
1759 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1760 #
1761     *aix4*)
1762           echo "$ac_t""enabling large file support" 1>&6
1763       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1764       ;;    
1765 #
1766 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1767 # to the existance of large files..
1768 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1769 # recommendations on large file support, however it makes the
1770 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1771 # recommendation makes the compile fail on gcc2.7. JRA.
1772 #
1773         *solaris*)
1774                 case `uname -r` in
1775                         5.6*|5.7*)
1776                         echo "$ac_t""enabling large file support" 1>&6
1777                         if test "$ac_cv_prog_gcc" = yes; then
1778                                 ${CC-cc} -v >conftest.c 2>&1
1779                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1780                                 rm -fr conftest.c
1781                                 case "$ac_cv_gcc_compiler_version_number" in
1782                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1783                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1784                                                 ;;
1785                                         *)
1786                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1787                                                 ;;
1788                                 esac
1789                         else
1790                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1791                         fi
1792                         ;;
1793                 esac
1794                 ;;
1795 #
1796 # Tests needed for SINIX large file support.
1797 #
1798     *sysv4*)
1799       if test $host = mips-sni-sysv4 ; then
1800         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1801 echo "configure:1802: checking for LFS support" >&5
1802         old_CPPFLAGS="$CPPFLAGS"
1803         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1804         if test "$cross_compiling" = yes; then
1805   SINIX_LFS_SUPPORT=cross
1806 else
1807   cat > conftest.$ac_ext <<EOF
1808 #line 1809 "configure"
1809 #include "confdefs.h"
1810
1811 #include <unistd.h>
1812 main () {
1813 #if _LFS64_LARGEFILE == 1
1814 exit(0);
1815 #else
1816 exit(1);
1817 #endif
1818 }
1819 EOF
1820 if { (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1821 then
1822   SINIX_LFS_SUPPORT=yes
1823 else
1824   echo "configure: failed program was:" >&5
1825   cat conftest.$ac_ext >&5
1826   rm -fr conftest*
1827   SINIX_LFS_SUPPORT=no
1828 fi
1829 rm -fr conftest*
1830 fi
1831
1832         CPPFLAGS="$old_CPPFLAGS"
1833         if test x$SINIX_LFS_SUPPORT = xyes ; then
1834           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1835           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1836           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1837           LIBS="`getconf LFS64_LIBS` $LIBS"
1838         fi
1839       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1840       fi
1841     ;;
1842
1843 #
1844 # Tests needed for glibc 2.1 large file support.
1845
1846         *linux*)
1847                 echo "$ac_t""disabling large file support for glibc2.1 on Linux" 1>&6     
1848                 ;;
1849     *hurd*)
1850         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1851 echo "configure:1852: checking for LFS support" >&5
1852         old_CPPFLAGS="$CPPFLAGS"
1853         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1854         if test "$cross_compiling" = yes; then
1855   GLIBC_LFS_SUPPORT=cross
1856 else
1857   cat > conftest.$ac_ext <<EOF
1858 #line 1859 "configure"
1859 #include "confdefs.h"
1860
1861 #include <unistd.h>
1862 main () {
1863 #if _LFS64_LARGEFILE == 1
1864 exit(0);
1865 #else
1866 exit(1);
1867 #endif
1868 }
1869 EOF
1870 if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1871 then
1872   GLIBC_LFS_SUPPORT=yes
1873 else
1874   echo "configure: failed program was:" >&5
1875   cat conftest.$ac_ext >&5
1876   rm -fr conftest*
1877   GLIBC_LFS_SUPPORT=no
1878 fi
1879 rm -fr conftest*
1880 fi
1881
1882         CPPFLAGS="$old_CPPFLAGS"
1883         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1884           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1885         fi
1886       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1887     ;;
1888
1889 esac
1890
1891 echo $ac_n "checking for inline""... $ac_c" 1>&6
1892 echo "configure:1893: checking for inline" >&5
1893 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1894   echo $ac_n "(cached) $ac_c" 1>&6
1895 else
1896   ac_cv_c_inline=no
1897 for ac_kw in inline __inline__ __inline; do
1898   cat > conftest.$ac_ext <<EOF
1899 #line 1900 "configure"
1900 #include "confdefs.h"
1901
1902 int main() {
1903 } $ac_kw foo() {
1904 ; return 0; }
1905 EOF
1906 if { (eval echo configure:1907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1907   rm -rf conftest*
1908   ac_cv_c_inline=$ac_kw; break
1909 else
1910   echo "configure: failed program was:" >&5
1911   cat conftest.$ac_ext >&5
1912 fi
1913 rm -f conftest*
1914 done
1915
1916 fi
1917
1918 echo "$ac_t""$ac_cv_c_inline" 1>&6
1919 case "$ac_cv_c_inline" in
1920   inline | yes) ;;
1921   no) cat >> confdefs.h <<\EOF
1922 #define inline 
1923 EOF
1924  ;;
1925   *)  cat >> confdefs.h <<EOF
1926 #define inline $ac_cv_c_inline
1927 EOF
1928  ;;
1929 esac
1930
1931 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1932 echo "configure:1933: checking how to run the C preprocessor" >&5
1933 # On Suns, sometimes $CPP names a directory.
1934 if test -n "$CPP" && test -d "$CPP"; then
1935   CPP=
1936 fi
1937 if test -z "$CPP"; then
1938 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1939   echo $ac_n "(cached) $ac_c" 1>&6
1940 else
1941     # This must be in double quotes, not single quotes, because CPP may get
1942   # substituted into the Makefile and "${CC-cc}" will confuse make.
1943   CPP="${CC-cc} -E"
1944   # On the NeXT, cc -E runs the code through the compiler's parser,
1945   # not just through cpp.
1946   cat > conftest.$ac_ext <<EOF
1947 #line 1948 "configure"
1948 #include "confdefs.h"
1949 #include <assert.h>
1950 Syntax Error
1951 EOF
1952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1953 { (eval echo configure:1954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1955 if test -z "$ac_err"; then
1956   :
1957 else
1958   echo "$ac_err" >&5
1959   echo "configure: failed program was:" >&5
1960   cat conftest.$ac_ext >&5
1961   rm -rf conftest*
1962   CPP="${CC-cc} -E -traditional-cpp"
1963   cat > conftest.$ac_ext <<EOF
1964 #line 1965 "configure"
1965 #include "confdefs.h"
1966 #include <assert.h>
1967 Syntax Error
1968 EOF
1969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1970 { (eval echo configure:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1972 if test -z "$ac_err"; then
1973   :
1974 else
1975   echo "$ac_err" >&5
1976   echo "configure: failed program was:" >&5
1977   cat conftest.$ac_ext >&5
1978   rm -rf conftest*
1979   CPP="${CC-cc} -nologo -E"
1980   cat > conftest.$ac_ext <<EOF
1981 #line 1982 "configure"
1982 #include "confdefs.h"
1983 #include <assert.h>
1984 Syntax Error
1985 EOF
1986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1987 { (eval echo configure:1988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1989 if test -z "$ac_err"; then
1990   :
1991 else
1992   echo "$ac_err" >&5
1993   echo "configure: failed program was:" >&5
1994   cat conftest.$ac_ext >&5
1995   rm -rf conftest*
1996   CPP=/lib/cpp
1997 fi
1998 rm -f conftest*
1999 fi
2000 rm -f conftest*
2001 fi
2002 rm -f conftest*
2003   ac_cv_prog_CPP="$CPP"
2004 fi
2005   CPP="$ac_cv_prog_CPP"
2006 else
2007   ac_cv_prog_CPP="$CPP"
2008 fi
2009 echo "$ac_t""$CPP" 1>&6
2010
2011 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2012 echo "configure:2013: checking for ANSI C header files" >&5
2013 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2014   echo $ac_n "(cached) $ac_c" 1>&6
2015 else
2016   cat > conftest.$ac_ext <<EOF
2017 #line 2018 "configure"
2018 #include "confdefs.h"
2019 #include <stdlib.h>
2020 #include <stdarg.h>
2021 #include <string.h>
2022 #include <float.h>
2023 EOF
2024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2025 { (eval echo configure:2026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2027 if test -z "$ac_err"; then
2028   rm -rf conftest*
2029   ac_cv_header_stdc=yes
2030 else
2031   echo "$ac_err" >&5
2032   echo "configure: failed program was:" >&5
2033   cat conftest.$ac_ext >&5
2034   rm -rf conftest*
2035   ac_cv_header_stdc=no
2036 fi
2037 rm -f conftest*
2038
2039 if test $ac_cv_header_stdc = yes; then
2040   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2041 cat > conftest.$ac_ext <<EOF
2042 #line 2043 "configure"
2043 #include "confdefs.h"
2044 #include <string.h>
2045 EOF
2046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2047   egrep "memchr" >/dev/null 2>&1; then
2048   :
2049 else
2050   rm -rf conftest*
2051   ac_cv_header_stdc=no
2052 fi
2053 rm -f conftest*
2054
2055 fi
2056
2057 if test $ac_cv_header_stdc = yes; then
2058   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2059 cat > conftest.$ac_ext <<EOF
2060 #line 2061 "configure"
2061 #include "confdefs.h"
2062 #include <stdlib.h>
2063 EOF
2064 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2065   egrep "free" >/dev/null 2>&1; then
2066   :
2067 else
2068   rm -rf conftest*
2069   ac_cv_header_stdc=no
2070 fi
2071 rm -f conftest*
2072
2073 fi
2074
2075 if test $ac_cv_header_stdc = yes; then
2076   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2077 if test "$cross_compiling" = yes; then
2078   :
2079 else
2080   cat > conftest.$ac_ext <<EOF
2081 #line 2082 "configure"
2082 #include "confdefs.h"
2083 #include <ctype.h>
2084 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2085 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2086 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2087 int main () { int i; for (i = 0; i < 256; i++)
2088 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2089 exit (0); }
2090
2091 EOF
2092 if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2093 then
2094   :
2095 else
2096   echo "configure: failed program was:" >&5
2097   cat conftest.$ac_ext >&5
2098   rm -fr conftest*
2099   ac_cv_header_stdc=no
2100 fi
2101 rm -fr conftest*
2102 fi
2103
2104 fi
2105 fi
2106
2107 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2108 if test $ac_cv_header_stdc = yes; then
2109   cat >> confdefs.h <<\EOF
2110 #define STDC_HEADERS 1
2111 EOF
2112
2113 fi
2114
2115 ac_header_dirent=no
2116 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2117 do
2118 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2119 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2120 echo "configure:2121: checking for $ac_hdr that defines DIR" >&5
2121 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2122   echo $ac_n "(cached) $ac_c" 1>&6
2123 else
2124   cat > conftest.$ac_ext <<EOF
2125 #line 2126 "configure"
2126 #include "confdefs.h"
2127 #include <sys/types.h>
2128 #include <$ac_hdr>
2129 int main() {
2130 DIR *dirp = 0;
2131 ; return 0; }
2132 EOF
2133 if { (eval echo configure:2134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2134   rm -rf conftest*
2135   eval "ac_cv_header_dirent_$ac_safe=yes"
2136 else
2137   echo "configure: failed program was:" >&5
2138   cat conftest.$ac_ext >&5
2139   rm -rf conftest*
2140   eval "ac_cv_header_dirent_$ac_safe=no"
2141 fi
2142 rm -f conftest*
2143 fi
2144 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2145   echo "$ac_t""yes" 1>&6
2146     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2147   cat >> confdefs.h <<EOF
2148 #define $ac_tr_hdr 1
2149 EOF
2150  ac_header_dirent=$ac_hdr; break
2151 else
2152   echo "$ac_t""no" 1>&6
2153 fi
2154 done
2155 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2156 if test $ac_header_dirent = dirent.h; then
2157 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2158 echo "configure:2159: checking for opendir in -ldir" >&5
2159 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2160 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2161   echo $ac_n "(cached) $ac_c" 1>&6
2162 else
2163   ac_save_LIBS="$LIBS"
2164 LIBS="-ldir  $LIBS"
2165 cat > conftest.$ac_ext <<EOF
2166 #line 2167 "configure"
2167 #include "confdefs.h"
2168 /* Override any gcc2 internal prototype to avoid an error.  */
2169 /* We use char because int might match the return type of a gcc2
2170     builtin and then its argument prototype would still apply.  */
2171 char opendir();
2172
2173 int main() {
2174 opendir()
2175 ; return 0; }
2176 EOF
2177 if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2178   rm -rf conftest*
2179   eval "ac_cv_lib_$ac_lib_var=yes"
2180 else
2181   echo "configure: failed program was:" >&5
2182   cat conftest.$ac_ext >&5
2183   rm -rf conftest*
2184   eval "ac_cv_lib_$ac_lib_var=no"
2185 fi
2186 rm -f conftest*
2187 LIBS="$ac_save_LIBS"
2188
2189 fi
2190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2191   echo "$ac_t""yes" 1>&6
2192   LIBS="$LIBS -ldir"
2193 else
2194   echo "$ac_t""no" 1>&6
2195 fi
2196
2197 else
2198 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2199 echo "configure:2200: checking for opendir in -lx" >&5
2200 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2201 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2202   echo $ac_n "(cached) $ac_c" 1>&6
2203 else
2204   ac_save_LIBS="$LIBS"
2205 LIBS="-lx  $LIBS"
2206 cat > conftest.$ac_ext <<EOF
2207 #line 2208 "configure"
2208 #include "confdefs.h"
2209 /* Override any gcc2 internal prototype to avoid an error.  */
2210 /* We use char because int might match the return type of a gcc2
2211     builtin and then its argument prototype would still apply.  */
2212 char opendir();
2213
2214 int main() {
2215 opendir()
2216 ; return 0; }
2217 EOF
2218 if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2219   rm -rf conftest*
2220   eval "ac_cv_lib_$ac_lib_var=yes"
2221 else
2222   echo "configure: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224   rm -rf conftest*
2225   eval "ac_cv_lib_$ac_lib_var=no"
2226 fi
2227 rm -f conftest*
2228 LIBS="$ac_save_LIBS"
2229
2230 fi
2231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2232   echo "$ac_t""yes" 1>&6
2233   LIBS="$LIBS -lx"
2234 else
2235   echo "$ac_t""no" 1>&6
2236 fi
2237
2238 fi
2239
2240 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2241 echo "configure:2242: checking whether time.h and sys/time.h may both be included" >&5
2242 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2243   echo $ac_n "(cached) $ac_c" 1>&6
2244 else
2245   cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <sys/types.h>
2249 #include <sys/time.h>
2250 #include <time.h>
2251 int main() {
2252 struct tm *tp;
2253 ; return 0; }
2254 EOF
2255 if { (eval echo configure:2256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2256   rm -rf conftest*
2257   ac_cv_header_time=yes
2258 else
2259   echo "configure: failed program was:" >&5
2260   cat conftest.$ac_ext >&5
2261   rm -rf conftest*
2262   ac_cv_header_time=no
2263 fi
2264 rm -f conftest*
2265 fi
2266
2267 echo "$ac_t""$ac_cv_header_time" 1>&6
2268 if test $ac_cv_header_time = yes; then
2269   cat >> confdefs.h <<\EOF
2270 #define TIME_WITH_SYS_TIME 1
2271 EOF
2272
2273 fi
2274
2275 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2276 echo "configure:2277: checking for sys/wait.h that is POSIX.1 compatible" >&5
2277 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2278   echo $ac_n "(cached) $ac_c" 1>&6
2279 else
2280   cat > conftest.$ac_ext <<EOF
2281 #line 2282 "configure"
2282 #include "confdefs.h"
2283 #include <sys/types.h>
2284 #include <sys/wait.h>
2285 #ifndef WEXITSTATUS
2286 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2287 #endif
2288 #ifndef WIFEXITED
2289 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2290 #endif
2291 int main() {
2292 int s;
2293 wait (&s);
2294 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2295 ; return 0; }
2296 EOF
2297 if { (eval echo configure:2298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2298   rm -rf conftest*
2299   ac_cv_header_sys_wait_h=yes
2300 else
2301   echo "configure: failed program was:" >&5
2302   cat conftest.$ac_ext >&5
2303   rm -rf conftest*
2304   ac_cv_header_sys_wait_h=no
2305 fi
2306 rm -f conftest*
2307 fi
2308
2309 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2310 if test $ac_cv_header_sys_wait_h = yes; then
2311   cat >> confdefs.h <<\EOF
2312 #define HAVE_SYS_WAIT_H 1
2313 EOF
2314
2315 fi
2316
2317 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2318 do
2319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2321 echo "configure:2322: checking for $ac_hdr" >&5
2322 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2323   echo $ac_n "(cached) $ac_c" 1>&6
2324 else
2325   cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 #include <$ac_hdr>
2329 EOF
2330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2331 { (eval echo configure:2332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2333 if test -z "$ac_err"; then
2334   rm -rf conftest*
2335   eval "ac_cv_header_$ac_safe=yes"
2336 else
2337   echo "$ac_err" >&5
2338   echo "configure: failed program was:" >&5
2339   cat conftest.$ac_ext >&5
2340   rm -rf conftest*
2341   eval "ac_cv_header_$ac_safe=no"
2342 fi
2343 rm -f conftest*
2344 fi
2345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2346   echo "$ac_t""yes" 1>&6
2347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2348   cat >> confdefs.h <<EOF
2349 #define $ac_tr_hdr 1
2350 EOF
2351  
2352 else
2353   echo "$ac_t""no" 1>&6
2354 fi
2355 done
2356
2357 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.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 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2398 do
2399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2401 echo "configure:2402: checking for $ac_hdr" >&5
2402 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2403   echo $ac_n "(cached) $ac_c" 1>&6
2404 else
2405   cat > conftest.$ac_ext <<EOF
2406 #line 2407 "configure"
2407 #include "confdefs.h"
2408 #include <$ac_hdr>
2409 EOF
2410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2411 { (eval echo configure:2412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2413 if test -z "$ac_err"; then
2414   rm -rf conftest*
2415   eval "ac_cv_header_$ac_safe=yes"
2416 else
2417   echo "$ac_err" >&5
2418   echo "configure: failed program was:" >&5
2419   cat conftest.$ac_ext >&5
2420   rm -rf conftest*
2421   eval "ac_cv_header_$ac_safe=no"
2422 fi
2423 rm -f conftest*
2424 fi
2425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2426   echo "$ac_t""yes" 1>&6
2427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2428   cat >> confdefs.h <<EOF
2429 #define $ac_tr_hdr 1
2430 EOF
2431  
2432 else
2433   echo "$ac_t""no" 1>&6
2434 fi
2435 done
2436
2437 for ac_hdr in sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h
2438 do
2439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2441 echo "configure:2442: checking for $ac_hdr" >&5
2442 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2443   echo $ac_n "(cached) $ac_c" 1>&6
2444 else
2445   cat > conftest.$ac_ext <<EOF
2446 #line 2447 "configure"
2447 #include "confdefs.h"
2448 #include <$ac_hdr>
2449 EOF
2450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2451 { (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2453 if test -z "$ac_err"; then
2454   rm -rf conftest*
2455   eval "ac_cv_header_$ac_safe=yes"
2456 else
2457   echo "$ac_err" >&5
2458   echo "configure: failed program was:" >&5
2459   cat conftest.$ac_ext >&5
2460   rm -rf conftest*
2461   eval "ac_cv_header_$ac_safe=no"
2462 fi
2463 rm -f conftest*
2464 fi
2465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2466   echo "$ac_t""yes" 1>&6
2467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2468   cat >> confdefs.h <<EOF
2469 #define $ac_tr_hdr 1
2470 EOF
2471  
2472 else
2473   echo "$ac_t""no" 1>&6
2474 fi
2475 done
2476
2477 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h string.h strings.h stdlib.h sys/socket.h
2478 do
2479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2481 echo "configure:2482: checking for $ac_hdr" >&5
2482 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2483   echo $ac_n "(cached) $ac_c" 1>&6
2484 else
2485   cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 #include <$ac_hdr>
2489 EOF
2490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2491 { (eval echo configure:2492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2493 if test -z "$ac_err"; then
2494   rm -rf conftest*
2495   eval "ac_cv_header_$ac_safe=yes"
2496 else
2497   echo "$ac_err" >&5
2498   echo "configure: failed program was:" >&5
2499   cat conftest.$ac_ext >&5
2500   rm -rf conftest*
2501   eval "ac_cv_header_$ac_safe=no"
2502 fi
2503 rm -f conftest*
2504 fi
2505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2506   echo "$ac_t""yes" 1>&6
2507     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2508   cat >> confdefs.h <<EOF
2509 #define $ac_tr_hdr 1
2510 EOF
2511  
2512 else
2513   echo "$ac_t""no" 1>&6
2514 fi
2515 done
2516
2517 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2518 do
2519 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2520 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2521 echo "configure:2522: checking for $ac_hdr" >&5
2522 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2523   echo $ac_n "(cached) $ac_c" 1>&6
2524 else
2525   cat > conftest.$ac_ext <<EOF
2526 #line 2527 "configure"
2527 #include "confdefs.h"
2528 #include <$ac_hdr>
2529 EOF
2530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2531 { (eval echo configure:2532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2533 if test -z "$ac_err"; then
2534   rm -rf conftest*
2535   eval "ac_cv_header_$ac_safe=yes"
2536 else
2537   echo "$ac_err" >&5
2538   echo "configure: failed program was:" >&5
2539   cat conftest.$ac_ext >&5
2540   rm -rf conftest*
2541   eval "ac_cv_header_$ac_safe=no"
2542 fi
2543 rm -f conftest*
2544 fi
2545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2546   echo "$ac_t""yes" 1>&6
2547     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2548   cat >> confdefs.h <<EOF
2549 #define $ac_tr_hdr 1
2550 EOF
2551  
2552 else
2553   echo "$ac_t""no" 1>&6
2554 fi
2555 done
2556
2557 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2558 do
2559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2561 echo "configure:2562: checking for $ac_hdr" >&5
2562 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2563   echo $ac_n "(cached) $ac_c" 1>&6
2564 else
2565   cat > conftest.$ac_ext <<EOF
2566 #line 2567 "configure"
2567 #include "confdefs.h"
2568 #include <$ac_hdr>
2569 EOF
2570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2571 { (eval echo configure:2572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2573 if test -z "$ac_err"; then
2574   rm -rf conftest*
2575   eval "ac_cv_header_$ac_safe=yes"
2576 else
2577   echo "$ac_err" >&5
2578   echo "configure: failed program was:" >&5
2579   cat conftest.$ac_ext >&5
2580   rm -rf conftest*
2581   eval "ac_cv_header_$ac_safe=no"
2582 fi
2583 rm -f conftest*
2584 fi
2585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2586   echo "$ac_t""yes" 1>&6
2587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2588   cat >> confdefs.h <<EOF
2589 #define $ac_tr_hdr 1
2590 EOF
2591  
2592 else
2593   echo "$ac_t""no" 1>&6
2594 fi
2595 done
2596
2597 #
2598 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2599 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2600 #
2601 case "$host_os" in
2602     *hpux*)
2603                 cat > conftest.$ac_ext <<EOF
2604 #line 2605 "configure"
2605 #include "confdefs.h"
2606 #include <shadow.h>
2607 int main() {
2608 struct spwd testme
2609 ; return 0; }
2610 EOF
2611 if { (eval echo configure:2612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2612   rm -rf conftest*
2613   ac_cv_header_shadow_h=yes
2614 else
2615   echo "configure: failed program was:" >&5
2616   cat conftest.$ac_ext >&5
2617   rm -rf conftest*
2618   ac_cv_header_shadow_h=no
2619 fi
2620 rm -f conftest*
2621                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2622                    cat >> confdefs.h <<\EOF
2623 #define HAVE_SHADOW_H 1
2624 EOF
2625
2626                 fi
2627         ;;
2628 esac
2629 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2630 do
2631 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2632 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2633 echo "configure:2634: checking for $ac_hdr" >&5
2634 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2635   echo $ac_n "(cached) $ac_c" 1>&6
2636 else
2637   cat > conftest.$ac_ext <<EOF
2638 #line 2639 "configure"
2639 #include "confdefs.h"
2640 #include <$ac_hdr>
2641 EOF
2642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2643 { (eval echo configure:2644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2645 if test -z "$ac_err"; then
2646   rm -rf conftest*
2647   eval "ac_cv_header_$ac_safe=yes"
2648 else
2649   echo "$ac_err" >&5
2650   echo "configure: failed program was:" >&5
2651   cat conftest.$ac_ext >&5
2652   rm -rf conftest*
2653   eval "ac_cv_header_$ac_safe=no"
2654 fi
2655 rm -f conftest*
2656 fi
2657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2658   echo "$ac_t""yes" 1>&6
2659     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2660   cat >> confdefs.h <<EOF
2661 #define $ac_tr_hdr 1
2662 EOF
2663  
2664 else
2665   echo "$ac_t""no" 1>&6
2666 fi
2667 done
2668
2669 for ac_hdr in sys/security.h security/pam_appl.h
2670 do
2671 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2672 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2673 echo "configure:2674: checking for $ac_hdr" >&5
2674 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2675   echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677   cat > conftest.$ac_ext <<EOF
2678 #line 2679 "configure"
2679 #include "confdefs.h"
2680 #include <$ac_hdr>
2681 EOF
2682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2683 { (eval echo configure:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2685 if test -z "$ac_err"; then
2686   rm -rf conftest*
2687   eval "ac_cv_header_$ac_safe=yes"
2688 else
2689   echo "$ac_err" >&5
2690   echo "configure: failed program was:" >&5
2691   cat conftest.$ac_ext >&5
2692   rm -rf conftest*
2693   eval "ac_cv_header_$ac_safe=no"
2694 fi
2695 rm -f conftest*
2696 fi
2697 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2698   echo "$ac_t""yes" 1>&6
2699     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2700   cat >> confdefs.h <<EOF
2701 #define $ac_tr_hdr 1
2702 EOF
2703  
2704 else
2705   echo "$ac_t""no" 1>&6
2706 fi
2707 done
2708
2709 for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h
2710 do
2711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2712 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2713 echo "configure:2714: checking for $ac_hdr" >&5
2714 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2715   echo $ac_n "(cached) $ac_c" 1>&6
2716 else
2717   cat > conftest.$ac_ext <<EOF
2718 #line 2719 "configure"
2719 #include "confdefs.h"
2720 #include <$ac_hdr>
2721 EOF
2722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2723 { (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2725 if test -z "$ac_err"; then
2726   rm -rf conftest*
2727   eval "ac_cv_header_$ac_safe=yes"
2728 else
2729   echo "$ac_err" >&5
2730   echo "configure: failed program was:" >&5
2731   cat conftest.$ac_ext >&5
2732   rm -rf conftest*
2733   eval "ac_cv_header_$ac_safe=no"
2734 fi
2735 rm -f conftest*
2736 fi
2737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2738   echo "$ac_t""yes" 1>&6
2739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2740   cat >> confdefs.h <<EOF
2741 #define $ac_tr_hdr 1
2742 EOF
2743  
2744 else
2745   echo "$ac_t""no" 1>&6
2746 fi
2747 done
2748
2749 for ac_hdr in readline/history.h sys/capability.h syscall.h sys/syscall.h
2750 do
2751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2753 echo "configure:2754: checking for $ac_hdr" >&5
2754 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2755   echo $ac_n "(cached) $ac_c" 1>&6
2756 else
2757   cat > conftest.$ac_ext <<EOF
2758 #line 2759 "configure"
2759 #include "confdefs.h"
2760 #include <$ac_hdr>
2761 EOF
2762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2763 { (eval echo configure:2764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2765 if test -z "$ac_err"; then
2766   rm -rf conftest*
2767   eval "ac_cv_header_$ac_safe=yes"
2768 else
2769   echo "$ac_err" >&5
2770   echo "configure: failed program was:" >&5
2771   cat conftest.$ac_ext >&5
2772   rm -rf conftest*
2773   eval "ac_cv_header_$ac_safe=no"
2774 fi
2775 rm -f conftest*
2776 fi
2777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2778   echo "$ac_t""yes" 1>&6
2779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2780   cat >> confdefs.h <<EOF
2781 #define $ac_tr_hdr 1
2782 EOF
2783  
2784 else
2785   echo "$ac_t""no" 1>&6
2786 fi
2787 done
2788
2789 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2790 do
2791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2793 echo "configure:2794: checking for $ac_hdr" >&5
2794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2795   echo $ac_n "(cached) $ac_c" 1>&6
2796 else
2797   cat > conftest.$ac_ext <<EOF
2798 #line 2799 "configure"
2799 #include "confdefs.h"
2800 #include <$ac_hdr>
2801 EOF
2802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2803 { (eval echo configure:2804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2805 if test -z "$ac_err"; then
2806   rm -rf conftest*
2807   eval "ac_cv_header_$ac_safe=yes"
2808 else
2809   echo "$ac_err" >&5
2810   echo "configure: failed program was:" >&5
2811   cat conftest.$ac_ext >&5
2812   rm -rf conftest*
2813   eval "ac_cv_header_$ac_safe=no"
2814 fi
2815 rm -f conftest*
2816 fi
2817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2818   echo "$ac_t""yes" 1>&6
2819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2820   cat >> confdefs.h <<EOF
2821 #define $ac_tr_hdr 1
2822 EOF
2823  
2824 else
2825   echo "$ac_t""no" 1>&6
2826 fi
2827 done
2828
2829
2830 # For experimental utmp support
2831 for ac_hdr in utmp.h utmpx.h
2832 do
2833 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2834 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2835 echo "configure:2836: checking for $ac_hdr" >&5
2836 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2837   echo $ac_n "(cached) $ac_c" 1>&6
2838 else
2839   cat > conftest.$ac_ext <<EOF
2840 #line 2841 "configure"
2841 #include "confdefs.h"
2842 #include <$ac_hdr>
2843 EOF
2844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2845 { (eval echo configure:2846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2847 if test -z "$ac_err"; then
2848   rm -rf conftest*
2849   eval "ac_cv_header_$ac_safe=yes"
2850 else
2851   echo "$ac_err" >&5
2852   echo "configure: failed program was:" >&5
2853   cat conftest.$ac_ext >&5
2854   rm -rf conftest*
2855   eval "ac_cv_header_$ac_safe=no"
2856 fi
2857 rm -f conftest*
2858 fi
2859 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2860   echo "$ac_t""yes" 1>&6
2861     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2862   cat >> confdefs.h <<EOF
2863 #define $ac_tr_hdr 1
2864 EOF
2865  
2866 else
2867   echo "$ac_t""no" 1>&6
2868 fi
2869 done
2870
2871
2872 echo $ac_n "checking size of int""... $ac_c" 1>&6
2873 echo "configure:2874: checking size of int" >&5
2874 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2875   echo $ac_n "(cached) $ac_c" 1>&6
2876 else
2877   if test "$cross_compiling" = yes; then
2878   ac_cv_sizeof_int=cross
2879 else
2880   cat > conftest.$ac_ext <<EOF
2881 #line 2882 "configure"
2882 #include "confdefs.h"
2883 #include <stdio.h>
2884 main()
2885 {
2886   FILE *f=fopen("conftestval", "w");
2887   if (!f) exit(1);
2888   fprintf(f, "%d\n", sizeof(int));
2889   exit(0);
2890 }
2891 EOF
2892 if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2893 then
2894   ac_cv_sizeof_int=`cat conftestval`
2895 else
2896   echo "configure: failed program was:" >&5
2897   cat conftest.$ac_ext >&5
2898   rm -fr conftest*
2899   ac_cv_sizeof_int=0
2900 fi
2901 rm -fr conftest*
2902 fi
2903
2904 fi
2905 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2906 cat >> confdefs.h <<EOF
2907 #define SIZEOF_INT $ac_cv_sizeof_int
2908 EOF
2909
2910
2911 echo $ac_n "checking size of long""... $ac_c" 1>&6
2912 echo "configure:2913: checking size of long" >&5
2913 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2914   echo $ac_n "(cached) $ac_c" 1>&6
2915 else
2916   if test "$cross_compiling" = yes; then
2917   ac_cv_sizeof_long=cross
2918 else
2919   cat > conftest.$ac_ext <<EOF
2920 #line 2921 "configure"
2921 #include "confdefs.h"
2922 #include <stdio.h>
2923 main()
2924 {
2925   FILE *f=fopen("conftestval", "w");
2926   if (!f) exit(1);
2927   fprintf(f, "%d\n", sizeof(long));
2928   exit(0);
2929 }
2930 EOF
2931 if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2932 then
2933   ac_cv_sizeof_long=`cat conftestval`
2934 else
2935   echo "configure: failed program was:" >&5
2936   cat conftest.$ac_ext >&5
2937   rm -fr conftest*
2938   ac_cv_sizeof_long=0
2939 fi
2940 rm -fr conftest*
2941 fi
2942
2943 fi
2944 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2945 cat >> confdefs.h <<EOF
2946 #define SIZEOF_LONG $ac_cv_sizeof_long
2947 EOF
2948
2949
2950 echo $ac_n "checking size of short""... $ac_c" 1>&6
2951 echo "configure:2952: checking size of short" >&5
2952 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   if test "$cross_compiling" = yes; then
2956   ac_cv_sizeof_short=cross
2957 else
2958   cat > conftest.$ac_ext <<EOF
2959 #line 2960 "configure"
2960 #include "confdefs.h"
2961 #include <stdio.h>
2962 main()
2963 {
2964   FILE *f=fopen("conftestval", "w");
2965   if (!f) exit(1);
2966   fprintf(f, "%d\n", sizeof(short));
2967   exit(0);
2968 }
2969 EOF
2970 if { (eval echo configure:2971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2971 then
2972   ac_cv_sizeof_short=`cat conftestval`
2973 else
2974   echo "configure: failed program was:" >&5
2975   cat conftest.$ac_ext >&5
2976   rm -fr conftest*
2977   ac_cv_sizeof_short=0
2978 fi
2979 rm -fr conftest*
2980 fi
2981
2982 fi
2983 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2984 cat >> confdefs.h <<EOF
2985 #define SIZEOF_SHORT $ac_cv_sizeof_short
2986 EOF
2987
2988
2989
2990 echo $ac_n "checking for working const""... $ac_c" 1>&6
2991 echo "configure:2992: checking for working const" >&5
2992 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2993   echo $ac_n "(cached) $ac_c" 1>&6
2994 else
2995   cat > conftest.$ac_ext <<EOF
2996 #line 2997 "configure"
2997 #include "confdefs.h"
2998
2999 int main() {
3000
3001 /* Ultrix mips cc rejects this.  */
3002 typedef int charset[2]; const charset x;
3003 /* SunOS 4.1.1 cc rejects this.  */
3004 char const *const *ccp;
3005 char **p;
3006 /* NEC SVR4.0.2 mips cc rejects this.  */
3007 struct point {int x, y;};
3008 static struct point const zero = {0,0};
3009 /* AIX XL C 1.02.0.0 rejects this.
3010    It does not let you subtract one const X* pointer from another in an arm
3011    of an if-expression whose if-part is not a constant expression */
3012 const char *g = "string";
3013 ccp = &g + (g ? g-g : 0);
3014 /* HPUX 7.0 cc rejects these. */
3015 ++ccp;
3016 p = (char**) ccp;
3017 ccp = (char const *const *) p;
3018 { /* SCO 3.2v4 cc rejects this.  */
3019   char *t;
3020   char const *s = 0 ? (char *) 0 : (char const *) 0;
3021
3022   *t++ = 0;
3023 }
3024 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3025   int x[] = {25, 17};
3026   const int *foo = &x[0];
3027   ++foo;
3028 }
3029 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3030   typedef const int *iptr;
3031   iptr p = 0;
3032   ++p;
3033 }
3034 { /* AIX XL C 1.02.0.0 rejects this saying
3035      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3036   struct s { int j; const int *ap[3]; };
3037   struct s *b; b->j = 5;
3038 }
3039 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3040   const int foo = 10;
3041 }
3042
3043 ; return 0; }
3044 EOF
3045 if { (eval echo configure:3046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3046   rm -rf conftest*
3047   ac_cv_c_const=yes
3048 else
3049   echo "configure: failed program was:" >&5
3050   cat conftest.$ac_ext >&5
3051   rm -rf conftest*
3052   ac_cv_c_const=no
3053 fi
3054 rm -f conftest*
3055 fi
3056
3057 echo "$ac_t""$ac_cv_c_const" 1>&6
3058 if test $ac_cv_c_const = no; then
3059   cat >> confdefs.h <<\EOF
3060 #define const 
3061 EOF
3062
3063 fi
3064
3065 echo $ac_n "checking for inline""... $ac_c" 1>&6
3066 echo "configure:3067: checking for inline" >&5
3067 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   ac_cv_c_inline=no
3071 for ac_kw in inline __inline__ __inline; do
3072   cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075
3076 int main() {
3077 } $ac_kw foo() {
3078 ; return 0; }
3079 EOF
3080 if { (eval echo configure:3081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3081   rm -rf conftest*
3082   ac_cv_c_inline=$ac_kw; break
3083 else
3084   echo "configure: failed program was:" >&5
3085   cat conftest.$ac_ext >&5
3086 fi
3087 rm -f conftest*
3088 done
3089
3090 fi
3091
3092 echo "$ac_t""$ac_cv_c_inline" 1>&6
3093 case "$ac_cv_c_inline" in
3094   inline | yes) ;;
3095   no) cat >> confdefs.h <<\EOF
3096 #define inline 
3097 EOF
3098  ;;
3099   *)  cat >> confdefs.h <<EOF
3100 #define inline $ac_cv_c_inline
3101 EOF
3102  ;;
3103 esac
3104
3105 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3106 echo "configure:3107: checking whether byte ordering is bigendian" >&5
3107 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3108   echo $ac_n "(cached) $ac_c" 1>&6
3109 else
3110   ac_cv_c_bigendian=unknown
3111 # See if sys/param.h defines the BYTE_ORDER macro.
3112 cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115 #include <sys/types.h>
3116 #include <sys/param.h>
3117 int main() {
3118
3119 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3120  bogus endian macros
3121 #endif
3122 ; return 0; }
3123 EOF
3124 if { (eval echo configure:3125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3125   rm -rf conftest*
3126   # It does; now see whether it defined to BIG_ENDIAN or not.
3127 cat > conftest.$ac_ext <<EOF
3128 #line 3129 "configure"
3129 #include "confdefs.h"
3130 #include <sys/types.h>
3131 #include <sys/param.h>
3132 int main() {
3133
3134 #if BYTE_ORDER != BIG_ENDIAN
3135  not big endian
3136 #endif
3137 ; return 0; }
3138 EOF
3139 if { (eval echo configure:3140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3140   rm -rf conftest*
3141   ac_cv_c_bigendian=yes
3142 else
3143   echo "configure: failed program was:" >&5
3144   cat conftest.$ac_ext >&5
3145   rm -rf conftest*
3146   ac_cv_c_bigendian=no
3147 fi
3148 rm -f conftest*
3149 else
3150   echo "configure: failed program was:" >&5
3151   cat conftest.$ac_ext >&5
3152 fi
3153 rm -f conftest*
3154 if test $ac_cv_c_bigendian = unknown; then
3155 if test "$cross_compiling" = yes; then
3156     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3157 else
3158   cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161 main () {
3162   /* Are we little or big endian?  From Harbison&Steele.  */
3163   union
3164   {
3165     long l;
3166     char c[sizeof (long)];
3167   } u;
3168   u.l = 1;
3169   exit (u.c[sizeof (long) - 1] == 1);
3170 }
3171 EOF
3172 if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3173 then
3174   ac_cv_c_bigendian=no
3175 else
3176   echo "configure: failed program was:" >&5
3177   cat conftest.$ac_ext >&5
3178   rm -fr conftest*
3179   ac_cv_c_bigendian=yes
3180 fi
3181 rm -fr conftest*
3182 fi
3183
3184 fi
3185 fi
3186
3187 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3188 if test $ac_cv_c_bigendian = yes; then
3189   cat >> confdefs.h <<\EOF
3190 #define WORDS_BIGENDIAN 1
3191 EOF
3192
3193 fi
3194
3195 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3196 echo "configure:3197: checking whether char is unsigned" >&5
3197 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3198   echo $ac_n "(cached) $ac_c" 1>&6
3199 else
3200   if test "$GCC" = yes; then
3201   # GCC predefines this symbol on systems where it applies.
3202 cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 #ifdef __CHAR_UNSIGNED__
3206   yes
3207 #endif
3208
3209 EOF
3210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3211   egrep "yes" >/dev/null 2>&1; then
3212   rm -rf conftest*
3213   ac_cv_c_char_unsigned=yes
3214 else
3215   rm -rf conftest*
3216   ac_cv_c_char_unsigned=no
3217 fi
3218 rm -f conftest*
3219
3220 else
3221 if test "$cross_compiling" = yes; then
3222     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3223 else
3224   cat > conftest.$ac_ext <<EOF
3225 #line 3226 "configure"
3226 #include "confdefs.h"
3227 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3228 #if !defined(__STDC__) || __STDC__ != 1
3229 #define volatile
3230 #endif
3231 main() {
3232   volatile char c = 255; exit(c < 0);
3233 }
3234 EOF
3235 if { (eval echo configure:3236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3236 then
3237   ac_cv_c_char_unsigned=yes
3238 else
3239   echo "configure: failed program was:" >&5
3240   cat conftest.$ac_ext >&5
3241   rm -fr conftest*
3242   ac_cv_c_char_unsigned=no
3243 fi
3244 rm -fr conftest*
3245 fi
3246
3247 fi
3248 fi
3249
3250 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3251 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3252   cat >> confdefs.h <<\EOF
3253 #define __CHAR_UNSIGNED__ 1
3254 EOF
3255
3256 fi
3257
3258
3259 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3260 echo "configure:3261: checking return type of signal handlers" >&5
3261 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3262   echo $ac_n "(cached) $ac_c" 1>&6
3263 else
3264   cat > conftest.$ac_ext <<EOF
3265 #line 3266 "configure"
3266 #include "confdefs.h"
3267 #include <sys/types.h>
3268 #include <signal.h>
3269 #ifdef signal
3270 #undef signal
3271 #endif
3272 #ifdef __cplusplus
3273 extern "C" void (*signal (int, void (*)(int)))(int);
3274 #else
3275 void (*signal ()) ();
3276 #endif
3277
3278 int main() {
3279 int i;
3280 ; return 0; }
3281 EOF
3282 if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3283   rm -rf conftest*
3284   ac_cv_type_signal=void
3285 else
3286   echo "configure: failed program was:" >&5
3287   cat conftest.$ac_ext >&5
3288   rm -rf conftest*
3289   ac_cv_type_signal=int
3290 fi
3291 rm -f conftest*
3292 fi
3293
3294 echo "$ac_t""$ac_cv_type_signal" 1>&6
3295 cat >> confdefs.h <<EOF
3296 #define RETSIGTYPE $ac_cv_type_signal
3297 EOF
3298
3299
3300 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3301 echo "configure:3302: checking for uid_t in sys/types.h" >&5
3302 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   cat > conftest.$ac_ext <<EOF
3306 #line 3307 "configure"
3307 #include "confdefs.h"
3308 #include <sys/types.h>
3309 EOF
3310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3311   egrep "uid_t" >/dev/null 2>&1; then
3312   rm -rf conftest*
3313   ac_cv_type_uid_t=yes
3314 else
3315   rm -rf conftest*
3316   ac_cv_type_uid_t=no
3317 fi
3318 rm -f conftest*
3319
3320 fi
3321
3322 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3323 if test $ac_cv_type_uid_t = no; then
3324   cat >> confdefs.h <<\EOF
3325 #define uid_t int
3326 EOF
3327
3328   cat >> confdefs.h <<\EOF
3329 #define gid_t int
3330 EOF
3331
3332 fi
3333
3334 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3335 echo "configure:3336: checking for mode_t" >&5
3336 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3337   echo $ac_n "(cached) $ac_c" 1>&6
3338 else
3339   cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342 #include <sys/types.h>
3343 #if STDC_HEADERS
3344 #include <stdlib.h>
3345 #include <stddef.h>
3346 #endif
3347 EOF
3348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3349   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3350   rm -rf conftest*
3351   ac_cv_type_mode_t=yes
3352 else
3353   rm -rf conftest*
3354   ac_cv_type_mode_t=no
3355 fi
3356 rm -f conftest*
3357
3358 fi
3359 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3360 if test $ac_cv_type_mode_t = no; then
3361   cat >> confdefs.h <<\EOF
3362 #define mode_t int
3363 EOF
3364
3365 fi
3366
3367 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3368 echo "configure:3369: checking for off_t" >&5
3369 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3370   echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372   cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 #include <sys/types.h>
3376 #if STDC_HEADERS
3377 #include <stdlib.h>
3378 #include <stddef.h>
3379 #endif
3380 EOF
3381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3382   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3383   rm -rf conftest*
3384   ac_cv_type_off_t=yes
3385 else
3386   rm -rf conftest*
3387   ac_cv_type_off_t=no
3388 fi
3389 rm -f conftest*
3390
3391 fi
3392 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3393 if test $ac_cv_type_off_t = no; then
3394   cat >> confdefs.h <<\EOF
3395 #define off_t long
3396 EOF
3397
3398 fi
3399
3400 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3401 echo "configure:3402: checking for size_t" >&5
3402 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405   cat > conftest.$ac_ext <<EOF
3406 #line 3407 "configure"
3407 #include "confdefs.h"
3408 #include <sys/types.h>
3409 #if STDC_HEADERS
3410 #include <stdlib.h>
3411 #include <stddef.h>
3412 #endif
3413 EOF
3414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3415   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3416   rm -rf conftest*
3417   ac_cv_type_size_t=yes
3418 else
3419   rm -rf conftest*
3420   ac_cv_type_size_t=no
3421 fi
3422 rm -f conftest*
3423
3424 fi
3425 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3426 if test $ac_cv_type_size_t = no; then
3427   cat >> confdefs.h <<\EOF
3428 #define size_t unsigned
3429 EOF
3430
3431 fi
3432
3433 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3434 echo "configure:3435: checking for pid_t" >&5
3435 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3436   echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438   cat > conftest.$ac_ext <<EOF
3439 #line 3440 "configure"
3440 #include "confdefs.h"
3441 #include <sys/types.h>
3442 #if STDC_HEADERS
3443 #include <stdlib.h>
3444 #include <stddef.h>
3445 #endif
3446 EOF
3447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3448   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3449   rm -rf conftest*
3450   ac_cv_type_pid_t=yes
3451 else
3452   rm -rf conftest*
3453   ac_cv_type_pid_t=no
3454 fi
3455 rm -f conftest*
3456
3457 fi
3458 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3459 if test $ac_cv_type_pid_t = no; then
3460   cat >> confdefs.h <<\EOF
3461 #define pid_t int
3462 EOF
3463
3464 fi
3465
3466 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3467 echo "configure:3468: checking for st_rdev in struct stat" >&5
3468 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3469   echo $ac_n "(cached) $ac_c" 1>&6
3470 else
3471   cat > conftest.$ac_ext <<EOF
3472 #line 3473 "configure"
3473 #include "confdefs.h"
3474 #include <sys/types.h>
3475 #include <sys/stat.h>
3476 int main() {
3477 struct stat s; s.st_rdev;
3478 ; return 0; }
3479 EOF
3480 if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3481   rm -rf conftest*
3482   ac_cv_struct_st_rdev=yes
3483 else
3484   echo "configure: failed program was:" >&5
3485   cat conftest.$ac_ext >&5
3486   rm -rf conftest*
3487   ac_cv_struct_st_rdev=no
3488 fi
3489 rm -f conftest*
3490 fi
3491
3492 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3493 if test $ac_cv_struct_st_rdev = yes; then
3494   cat >> confdefs.h <<\EOF
3495 #define HAVE_ST_RDEV 1
3496 EOF
3497
3498 fi
3499
3500 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3501 echo "configure:3502: checking for d_off in dirent" >&5
3502 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3503   echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505   cat > conftest.$ac_ext <<EOF
3506 #line 3507 "configure"
3507 #include "confdefs.h"
3508
3509 #include <unistd.h>
3510 #include <sys/types.h>
3511 #include <dirent.h>
3512 int main() {
3513 struct dirent d; d.d_off;
3514 ; return 0; }
3515 EOF
3516 if { (eval echo configure:3517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3517   rm -rf conftest*
3518   ac_cv_dirent_d_off=yes
3519 else
3520   echo "configure: failed program was:" >&5
3521   cat conftest.$ac_ext >&5
3522   rm -rf conftest*
3523   ac_cv_dirent_d_off=no
3524 fi
3525 rm -f conftest*
3526 fi
3527
3528 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3529 if test $ac_cv_dirent_d_off = yes; then
3530   cat >> confdefs.h <<\EOF
3531 #define HAVE_DIRENT_D_OFF 1
3532 EOF
3533
3534 fi
3535
3536 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3537 echo "configure:3538: checking for ino_t" >&5
3538 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3539   echo $ac_n "(cached) $ac_c" 1>&6
3540 else
3541   cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3544 #include <sys/types.h>
3545 #if STDC_HEADERS
3546 #include <stdlib.h>
3547 #include <stddef.h>
3548 #endif
3549 EOF
3550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3551   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3552   rm -rf conftest*
3553   ac_cv_type_ino_t=yes
3554 else
3555   rm -rf conftest*
3556   ac_cv_type_ino_t=no
3557 fi
3558 rm -f conftest*
3559
3560 fi
3561 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3562 if test $ac_cv_type_ino_t = no; then
3563   cat >> confdefs.h <<\EOF
3564 #define ino_t unsigned
3565 EOF
3566
3567 fi
3568
3569 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3570 echo "configure:3571: checking for loff_t" >&5
3571 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3572   echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574   cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577 #include <sys/types.h>
3578 #if STDC_HEADERS
3579 #include <stdlib.h>
3580 #include <stddef.h>
3581 #endif
3582 EOF
3583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3584   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3585   rm -rf conftest*
3586   ac_cv_type_loff_t=yes
3587 else
3588   rm -rf conftest*
3589   ac_cv_type_loff_t=no
3590 fi
3591 rm -f conftest*
3592
3593 fi
3594 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3595 if test $ac_cv_type_loff_t = no; then
3596   cat >> confdefs.h <<\EOF
3597 #define loff_t off_t
3598 EOF
3599
3600 fi
3601
3602 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3603 echo "configure:3604: checking for offset_t" >&5
3604 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   cat > conftest.$ac_ext <<EOF
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610 #include <sys/types.h>
3611 #if STDC_HEADERS
3612 #include <stdlib.h>
3613 #include <stddef.h>
3614 #endif
3615 EOF
3616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3617   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3618   rm -rf conftest*
3619   ac_cv_type_offset_t=yes
3620 else
3621   rm -rf conftest*
3622   ac_cv_type_offset_t=no
3623 fi
3624 rm -f conftest*
3625
3626 fi
3627 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3628 if test $ac_cv_type_offset_t = no; then
3629   cat >> confdefs.h <<\EOF
3630 #define offset_t loff_t
3631 EOF
3632
3633 fi
3634
3635 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3636 echo "configure:3637: checking for ssize_t" >&5
3637 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 #include <sys/types.h>
3644 #if STDC_HEADERS
3645 #include <stdlib.h>
3646 #include <stddef.h>
3647 #endif
3648 EOF
3649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3650   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3651   rm -rf conftest*
3652   ac_cv_type_ssize_t=yes
3653 else
3654   rm -rf conftest*
3655   ac_cv_type_ssize_t=no
3656 fi
3657 rm -f conftest*
3658
3659 fi
3660 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3661 if test $ac_cv_type_ssize_t = no; then
3662   cat >> confdefs.h <<\EOF
3663 #define ssize_t int
3664 EOF
3665
3666 fi
3667
3668 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3669 echo "configure:3670: checking for wchar_t" >&5
3670 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3671   echo $ac_n "(cached) $ac_c" 1>&6
3672 else
3673   cat > conftest.$ac_ext <<EOF
3674 #line 3675 "configure"
3675 #include "confdefs.h"
3676 #include <sys/types.h>
3677 #if STDC_HEADERS
3678 #include <stdlib.h>
3679 #include <stddef.h>
3680 #endif
3681 EOF
3682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3683   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3684   rm -rf conftest*
3685   ac_cv_type_wchar_t=yes
3686 else
3687   rm -rf conftest*
3688   ac_cv_type_wchar_t=no
3689 fi
3690 rm -f conftest*
3691
3692 fi
3693 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3694 if test $ac_cv_type_wchar_t = no; then
3695   cat >> confdefs.h <<\EOF
3696 #define wchar_t unsigned short
3697 EOF
3698
3699 fi
3700
3701
3702 # we need libcups for CUPS support...
3703 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3704 echo "configure:3705: checking for httpConnect in -lcups" >&5
3705 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3706 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3707   echo $ac_n "(cached) $ac_c" 1>&6
3708 else
3709   ac_save_LIBS="$LIBS"
3710 LIBS="-lcups  $LIBS"
3711 cat > conftest.$ac_ext <<EOF
3712 #line 3713 "configure"
3713 #include "confdefs.h"
3714 /* Override any gcc2 internal prototype to avoid an error.  */
3715 /* We use char because int might match the return type of a gcc2
3716     builtin and then its argument prototype would still apply.  */
3717 char httpConnect();
3718
3719 int main() {
3720 httpConnect()
3721 ; return 0; }
3722 EOF
3723 if { (eval echo configure:3724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3724   rm -rf conftest*
3725   eval "ac_cv_lib_$ac_lib_var=yes"
3726 else
3727   echo "configure: failed program was:" >&5
3728   cat conftest.$ac_ext >&5
3729   rm -rf conftest*
3730   eval "ac_cv_lib_$ac_lib_var=no"
3731 fi
3732 rm -f conftest*
3733 LIBS="$ac_save_LIBS"
3734
3735 fi
3736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3737   echo "$ac_t""yes" 1>&6
3738     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3739     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3740   cat >> confdefs.h <<EOF
3741 #define $ac_tr_lib 1
3742 EOF
3743
3744   LIBS="-lcups $LIBS"
3745
3746 else
3747   echo "$ac_t""no" 1>&6
3748 fi
3749
3750
3751 # we need libdl for PAM and the new VFS code
3752 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3753 echo "configure:3754: checking for dlopen in -ldl" >&5
3754 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3756   echo $ac_n "(cached) $ac_c" 1>&6
3757 else
3758   ac_save_LIBS="$LIBS"
3759 LIBS="-ldl  $LIBS"
3760 cat > conftest.$ac_ext <<EOF
3761 #line 3762 "configure"
3762 #include "confdefs.h"
3763 /* Override any gcc2 internal prototype to avoid an error.  */
3764 /* We use char because int might match the return type of a gcc2
3765     builtin and then its argument prototype would still apply.  */
3766 char dlopen();
3767
3768 int main() {
3769 dlopen()
3770 ; return 0; }
3771 EOF
3772 if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3773   rm -rf conftest*
3774   eval "ac_cv_lib_$ac_lib_var=yes"
3775 else
3776   echo "configure: failed program was:" >&5
3777   cat conftest.$ac_ext >&5
3778   rm -rf conftest*
3779   eval "ac_cv_lib_$ac_lib_var=no"
3780 fi
3781 rm -f conftest*
3782 LIBS="$ac_save_LIBS"
3783
3784 fi
3785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3786   echo "$ac_t""yes" 1>&6
3787   LIBS="$LIBS -ldl";
3788         cat >> confdefs.h <<\EOF
3789 #define HAVE_LIBDL 1
3790 EOF
3791
3792 else
3793   echo "$ac_t""no" 1>&6
3794 fi
3795
3796
3797 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3798 echo "configure:3799: checking for sig_atomic_t type" >&5
3799 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3800   echo $ac_n "(cached) $ac_c" 1>&6
3801 else
3802   
3803     cat > conftest.$ac_ext <<EOF
3804 #line 3805 "configure"
3805 #include "confdefs.h"
3806
3807 #include <sys/types.h>
3808 #if STDC_HEADERS
3809 #include <stdlib.h>
3810 #include <stddef.h>
3811 #endif
3812 #include <signal.h>
3813 int main() {
3814 sig_atomic_t i = 0
3815 ; return 0; }
3816 EOF
3817 if { (eval echo configure:3818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3818   rm -rf conftest*
3819   samba_cv_sig_atomic_t=yes
3820 else
3821   echo "configure: failed program was:" >&5
3822   cat conftest.$ac_ext >&5
3823   rm -rf conftest*
3824   samba_cv_sig_atomic_t=no
3825 fi
3826 rm -f conftest*
3827 fi
3828
3829 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3830 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3831    cat >> confdefs.h <<\EOF
3832 #define HAVE_SIG_ATOMIC_T_TYPE 1
3833 EOF
3834
3835 fi
3836
3837 echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
3838 echo "configure:3839: checking for errno in errno.h" >&5
3839 if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
3840   echo $ac_n "(cached) $ac_c" 1>&6
3841 else
3842   
3843     cat > conftest.$ac_ext <<EOF
3844 #line 3845 "configure"
3845 #include "confdefs.h"
3846 #include <errno.h>
3847 int main() {
3848 int i = errno
3849 ; return 0; }
3850 EOF
3851 if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3852   rm -rf conftest*
3853   samba_cv_errno=yes
3854 else
3855   echo "configure: failed program was:" >&5
3856   cat conftest.$ac_ext >&5
3857   rm -rf conftest*
3858   samba_cv_have_errno=no
3859 fi
3860 rm -f conftest*
3861 fi
3862
3863 echo "$ac_t""$samba_cv_errno" 1>&6
3864 if test x"$samba_cv_errno" = x"yes"; then
3865    cat >> confdefs.h <<\EOF
3866 #define HAVE_ERRNO_DECL 1
3867 EOF
3868
3869 fi
3870
3871 # stupid glibc has the functions but no declaration. grrrr.
3872 echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3873 echo "configure:3874: checking for setresuid declaration" >&5
3874 if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   
3878     cat > conftest.$ac_ext <<EOF
3879 #line 3880 "configure"
3880 #include "confdefs.h"
3881 #include <unistd.h>
3882 int main() {
3883 int i = (int)setresuid
3884 ; return 0; }
3885 EOF
3886 if { (eval echo configure:3887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3887   rm -rf conftest*
3888   samba_cv_have_setresuid_decl=yes
3889 else
3890   echo "configure: failed program was:" >&5
3891   cat conftest.$ac_ext >&5
3892   rm -rf conftest*
3893   samba_cv_have_setresuid_decl=no
3894 fi
3895 rm -f conftest*
3896 fi
3897
3898 echo "$ac_t""$samba_cv_have_setresuid_decl" 1>&6
3899 if test x"$samba_cv_have_setresuid_decl" = x"yes"; then
3900     cat >> confdefs.h <<\EOF
3901 #define HAVE_SETRESUID_DECL 1
3902 EOF
3903
3904 fi
3905
3906 # stupid glibc has the functions but no declaration. grrrr.
3907 echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3908 echo "configure:3909: checking for setresgid declaration" >&5
3909 if eval "test \"`echo '$''{'samba_cv_have_setresgid_decl'+set}'`\" = set"; then
3910   echo $ac_n "(cached) $ac_c" 1>&6
3911 else
3912   
3913     cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916 #include <unistd.h>
3917 int main() {
3918 int i = (int)setresgid
3919 ; return 0; }
3920 EOF
3921 if { (eval echo configure:3922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3922   rm -rf conftest*
3923   samba_cv_have_setresgid_decl=yes
3924 else
3925   echo "configure: failed program was:" >&5
3926   cat conftest.$ac_ext >&5
3927   rm -rf conftest*
3928   samba_cv_have_setresgid_decl=no
3929 fi
3930 rm -f conftest*
3931 fi
3932
3933 echo "$ac_t""$samba_cv_have_setresgid_decl" 1>&6
3934 if test x"$samba_cv_have_setresgid_decl" = x"yes"; then
3935     cat >> confdefs.h <<\EOF
3936 #define HAVE_SETRESGID_DECL 1
3937 EOF
3938
3939 fi
3940
3941 # and glibc has setresuid under linux but the function does
3942 # nothing until kernel 2.1.44! very dumb.
3943 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3944 echo "configure:3945: checking for real setresuid" >&5
3945 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3946   echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948   
3949     if test "$cross_compiling" = yes; then
3950   samba_cv_have_setresuid=cross
3951 else
3952   cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955 #include <errno.h>
3956 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3957 EOF
3958 if { (eval echo configure:3959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3959 then
3960   samba_cv_have_setresuid=yes
3961 else
3962   echo "configure: failed program was:" >&5
3963   cat conftest.$ac_ext >&5
3964   rm -fr conftest*
3965   samba_cv_have_setresuid=no
3966 fi
3967 rm -fr conftest*
3968 fi
3969
3970 fi
3971
3972 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3973 if test x"$samba_cv_have_setresuid" = x"yes"; then
3974     cat >> confdefs.h <<\EOF
3975 #define HAVE_SETRESUID 1
3976 EOF
3977
3978 fi
3979
3980 # Do the same check for setresguid...
3981 #
3982 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3983 echo "configure:3984: checking for real setresgid" >&5
3984 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3985   echo $ac_n "(cached) $ac_c" 1>&6
3986 else
3987   
3988     if test "$cross_compiling" = yes; then
3989   samba_cv_have_setresgid=cross
3990 else
3991   cat > conftest.$ac_ext <<EOF
3992 #line 3993 "configure"
3993 #include "confdefs.h"
3994 #include <unistd.h>
3995 #include <errno.h>
3996 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3997 EOF
3998 if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3999 then
4000   samba_cv_have_setresgid=yes
4001 else
4002   echo "configure: failed program was:" >&5
4003   cat conftest.$ac_ext >&5
4004   rm -fr conftest*
4005   samba_cv_have_setresgid=no
4006 fi
4007 rm -fr conftest*
4008 fi
4009
4010 fi
4011
4012 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4013 if test x"$samba_cv_have_setresgid" = x"yes"; then
4014     cat >> confdefs.h <<\EOF
4015 #define HAVE_SETRESGID 1
4016 EOF
4017
4018 fi
4019
4020 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4021 echo "configure:4022: checking for 8-bit clean memcmp" >&5
4022 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4023   echo $ac_n "(cached) $ac_c" 1>&6
4024 else
4025   if test "$cross_compiling" = yes; then
4026   ac_cv_func_memcmp_clean=no
4027 else
4028   cat > conftest.$ac_ext <<EOF
4029 #line 4030 "configure"
4030 #include "confdefs.h"
4031
4032 main()
4033 {
4034   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4035   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4036 }
4037
4038 EOF
4039 if { (eval echo configure:4040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4040 then
4041   ac_cv_func_memcmp_clean=yes
4042 else
4043   echo "configure: failed program was:" >&5
4044   cat conftest.$ac_ext >&5
4045   rm -fr conftest*
4046   ac_cv_func_memcmp_clean=no
4047 fi
4048 rm -fr conftest*
4049 fi
4050
4051 fi
4052
4053 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4054 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4055
4056
4057 ###############################################
4058 # test for where we get crypt() from
4059 for ac_func in crypt
4060 do
4061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4062 echo "configure:4063: checking for $ac_func" >&5
4063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4064   echo $ac_n "(cached) $ac_c" 1>&6
4065 else
4066   cat > conftest.$ac_ext <<EOF
4067 #line 4068 "configure"
4068 #include "confdefs.h"
4069 /* System header to define __stub macros and hopefully few prototypes,
4070     which can conflict with char $ac_func(); below.  */
4071 #include <assert.h>
4072 /* Override any gcc2 internal prototype to avoid an error.  */
4073 /* We use char because int might match the return type of a gcc2
4074     builtin and then its argument prototype would still apply.  */
4075 char $ac_func();
4076
4077 int main() {
4078
4079 /* The GNU C library defines this for functions which it implements
4080     to always fail with ENOSYS.  Some functions are actually named
4081     something starting with __ and the normal name is an alias.  */
4082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4083 choke me
4084 #else
4085 $ac_func();
4086 #endif
4087
4088 ; return 0; }
4089 EOF
4090 if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4091   rm -rf conftest*
4092   eval "ac_cv_func_$ac_func=yes"
4093 else
4094   echo "configure: failed program was:" >&5
4095   cat conftest.$ac_ext >&5
4096   rm -rf conftest*
4097   eval "ac_cv_func_$ac_func=no"
4098 fi
4099 rm -f conftest*
4100 fi
4101
4102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4103   echo "$ac_t""yes" 1>&6
4104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4105   cat >> confdefs.h <<EOF
4106 #define $ac_tr_func 1
4107 EOF
4108  
4109 else
4110   echo "$ac_t""no" 1>&6
4111 fi
4112 done
4113
4114 if test x"$ac_cv_func_crypt" = x"no"; then
4115     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4116 echo "configure:4117: checking for crypt in -lcrypt" >&5
4117 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4118 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4119   echo $ac_n "(cached) $ac_c" 1>&6
4120 else
4121   ac_save_LIBS="$LIBS"
4122 LIBS="-lcrypt  $LIBS"
4123 cat > conftest.$ac_ext <<EOF
4124 #line 4125 "configure"
4125 #include "confdefs.h"
4126 /* Override any gcc2 internal prototype to avoid an error.  */
4127 /* We use char because int might match the return type of a gcc2
4128     builtin and then its argument prototype would still apply.  */
4129 char crypt();
4130
4131 int main() {
4132 crypt()
4133 ; return 0; }
4134 EOF
4135 if { (eval echo configure:4136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4136   rm -rf conftest*
4137   eval "ac_cv_lib_$ac_lib_var=yes"
4138 else
4139   echo "configure: failed program was:" >&5
4140   cat conftest.$ac_ext >&5
4141   rm -rf conftest*
4142   eval "ac_cv_lib_$ac_lib_var=no"
4143 fi
4144 rm -f conftest*
4145 LIBS="$ac_save_LIBS"
4146
4147 fi
4148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4149   echo "$ac_t""yes" 1>&6
4150   LIBS="$LIBS -lcrypt";
4151         cat >> confdefs.h <<\EOF
4152 #define HAVE_CRYPT 1
4153 EOF
4154
4155 else
4156   echo "$ac_t""no" 1>&6
4157 fi
4158
4159 fi
4160
4161
4162 ###############################################
4163 # test for where we get readline() from
4164 if test "$ac_cv_header_readline_h" = "yes" ||
4165    test "$ac_cv_header_readline_readline_h" = "yes"; then
4166   echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
4167 echo "configure:4168: checking for readline in -lreadline" >&5
4168 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
4169 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4170   echo $ac_n "(cached) $ac_c" 1>&6
4171 else
4172   ac_save_LIBS="$LIBS"
4173 LIBS="-lreadline  $LIBS"
4174 cat > conftest.$ac_ext <<EOF
4175 #line 4176 "configure"
4176 #include "confdefs.h"
4177 /* Override any gcc2 internal prototype to avoid an error.  */
4178 /* We use char because int might match the return type of a gcc2
4179     builtin and then its argument prototype would still apply.  */
4180 char readline();
4181
4182 int main() {
4183 readline()
4184 ; return 0; }
4185 EOF
4186 if { (eval echo configure:4187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4187   rm -rf conftest*
4188   eval "ac_cv_lib_$ac_lib_var=yes"
4189 else
4190   echo "configure: failed program was:" >&5
4191   cat conftest.$ac_ext >&5
4192   rm -rf conftest*
4193   eval "ac_cv_lib_$ac_lib_var=no"
4194 fi
4195 rm -f conftest*
4196 LIBS="$ac_save_LIBS"
4197
4198 fi
4199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4200   echo "$ac_t""yes" 1>&6
4201     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4202     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4203   cat >> confdefs.h <<EOF
4204 #define $ac_tr_lib 1
4205 EOF
4206
4207   LIBS="-lreadline $LIBS"
4208
4209 else
4210   echo "$ac_t""no" 1>&6
4211 fi
4212
4213 fi
4214
4215
4216 # The following test taken from the cvs sources
4217 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4218 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4219 # libsocket.so which has a bad implementation of gethostbyname (it
4220 # only looks in /etc/hosts), so we only look for -lsocket if we need
4221 # it.
4222 for ac_func in connect
4223 do
4224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4225 echo "configure:4226: checking for $ac_func" >&5
4226 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4227   echo $ac_n "(cached) $ac_c" 1>&6
4228 else
4229   cat > conftest.$ac_ext <<EOF
4230 #line 4231 "configure"
4231 #include "confdefs.h"
4232 /* System header to define __stub macros and hopefully few prototypes,
4233     which can conflict with char $ac_func(); below.  */
4234 #include <assert.h>
4235 /* Override any gcc2 internal prototype to avoid an error.  */
4236 /* We use char because int might match the return type of a gcc2
4237     builtin and then its argument prototype would still apply.  */
4238 char $ac_func();
4239
4240 int main() {
4241
4242 /* The GNU C library defines this for functions which it implements
4243     to always fail with ENOSYS.  Some functions are actually named
4244     something starting with __ and the normal name is an alias.  */
4245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4246 choke me
4247 #else
4248 $ac_func();
4249 #endif
4250
4251 ; return 0; }
4252 EOF
4253 if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4254   rm -rf conftest*
4255   eval "ac_cv_func_$ac_func=yes"
4256 else
4257   echo "configure: failed program was:" >&5
4258   cat conftest.$ac_ext >&5
4259   rm -rf conftest*
4260   eval "ac_cv_func_$ac_func=no"
4261 fi
4262 rm -f conftest*
4263 fi
4264
4265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4266   echo "$ac_t""yes" 1>&6
4267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4268   cat >> confdefs.h <<EOF
4269 #define $ac_tr_func 1
4270 EOF
4271  
4272 else
4273   echo "$ac_t""no" 1>&6
4274 fi
4275 done
4276
4277 if test x"$ac_cv_func_connect" = x"no"; then
4278     case "$LIBS" in
4279     *-lnsl*) ;;
4280     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4281 echo "configure:4282: checking for printf in -lnsl_s" >&5
4282 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4283 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4284   echo $ac_n "(cached) $ac_c" 1>&6
4285 else
4286   ac_save_LIBS="$LIBS"
4287 LIBS="-lnsl_s  $LIBS"
4288 cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 /* Override any gcc2 internal prototype to avoid an error.  */
4292 /* We use char because int might match the return type of a gcc2
4293     builtin and then its argument prototype would still apply.  */
4294 char printf();
4295
4296 int main() {
4297 printf()
4298 ; return 0; }
4299 EOF
4300 if { (eval echo configure:4301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4301   rm -rf conftest*
4302   eval "ac_cv_lib_$ac_lib_var=yes"
4303 else
4304   echo "configure: failed program was:" >&5
4305   cat conftest.$ac_ext >&5
4306   rm -rf conftest*
4307   eval "ac_cv_lib_$ac_lib_var=no"
4308 fi
4309 rm -f conftest*
4310 LIBS="$ac_save_LIBS"
4311
4312 fi
4313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4314   echo "$ac_t""yes" 1>&6
4315     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4316     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4317   cat >> confdefs.h <<EOF
4318 #define $ac_tr_lib 1
4319 EOF
4320
4321   LIBS="-lnsl_s $LIBS"
4322
4323 else
4324   echo "$ac_t""no" 1>&6
4325 fi
4326  ;;
4327     esac
4328     case "$LIBS" in
4329     *-lnsl*) ;;
4330     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4331 echo "configure:4332: checking for printf in -lnsl" >&5
4332 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4333 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4334   echo $ac_n "(cached) $ac_c" 1>&6
4335 else
4336   ac_save_LIBS="$LIBS"
4337 LIBS="-lnsl  $LIBS"
4338 cat > conftest.$ac_ext <<EOF
4339 #line 4340 "configure"
4340 #include "confdefs.h"
4341 /* Override any gcc2 internal prototype to avoid an error.  */
4342 /* We use char because int might match the return type of a gcc2
4343     builtin and then its argument prototype would still apply.  */
4344 char printf();
4345
4346 int main() {
4347 printf()
4348 ; return 0; }
4349 EOF
4350 if { (eval echo configure:4351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4351   rm -rf conftest*
4352   eval "ac_cv_lib_$ac_lib_var=yes"
4353 else
4354   echo "configure: failed program was:" >&5
4355   cat conftest.$ac_ext >&5
4356   rm -rf conftest*
4357   eval "ac_cv_lib_$ac_lib_var=no"
4358 fi
4359 rm -f conftest*
4360 LIBS="$ac_save_LIBS"
4361
4362 fi
4363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4364   echo "$ac_t""yes" 1>&6
4365     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4366     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4367   cat >> confdefs.h <<EOF
4368 #define $ac_tr_lib 1
4369 EOF
4370
4371   LIBS="-lnsl $LIBS"
4372
4373 else
4374   echo "$ac_t""no" 1>&6
4375 fi
4376  ;;
4377     esac
4378     case "$LIBS" in
4379     *-lsocket*) ;;
4380     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4381 echo "configure:4382: checking for connect in -lsocket" >&5
4382 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4383 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4384   echo $ac_n "(cached) $ac_c" 1>&6
4385 else
4386   ac_save_LIBS="$LIBS"
4387 LIBS="-lsocket  $LIBS"
4388 cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
4390 #include "confdefs.h"
4391 /* Override any gcc2 internal prototype to avoid an error.  */
4392 /* We use char because int might match the return type of a gcc2
4393     builtin and then its argument prototype would still apply.  */
4394 char connect();
4395
4396 int main() {
4397 connect()
4398 ; return 0; }
4399 EOF
4400 if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4401   rm -rf conftest*
4402   eval "ac_cv_lib_$ac_lib_var=yes"
4403 else
4404   echo "configure: failed program was:" >&5
4405   cat conftest.$ac_ext >&5
4406   rm -rf conftest*
4407   eval "ac_cv_lib_$ac_lib_var=no"
4408 fi
4409 rm -f conftest*
4410 LIBS="$ac_save_LIBS"
4411
4412 fi
4413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4414   echo "$ac_t""yes" 1>&6
4415     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4416     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4417   cat >> confdefs.h <<EOF
4418 #define $ac_tr_lib 1
4419 EOF
4420
4421   LIBS="-lsocket $LIBS"
4422
4423 else
4424   echo "$ac_t""no" 1>&6
4425 fi
4426  ;;
4427     esac
4428     case "$LIBS" in
4429     *-linet*) ;;
4430     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4431 echo "configure:4432: checking for connect in -linet" >&5
4432 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4433 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4434   echo $ac_n "(cached) $ac_c" 1>&6
4435 else
4436   ac_save_LIBS="$LIBS"
4437 LIBS="-linet  $LIBS"
4438 cat > conftest.$ac_ext <<EOF
4439 #line 4440 "configure"
4440 #include "confdefs.h"
4441 /* Override any gcc2 internal prototype to avoid an error.  */
4442 /* We use char because int might match the return type of a gcc2
4443     builtin and then its argument prototype would still apply.  */
4444 char connect();
4445
4446 int main() {
4447 connect()
4448 ; return 0; }
4449 EOF
4450 if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4451   rm -rf conftest*
4452   eval "ac_cv_lib_$ac_lib_var=yes"
4453 else
4454   echo "configure: failed program was:" >&5
4455   cat conftest.$ac_ext >&5
4456   rm -rf conftest*
4457   eval "ac_cv_lib_$ac_lib_var=no"
4458 fi
4459 rm -f conftest*
4460 LIBS="$ac_save_LIBS"
4461
4462 fi
4463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4464   echo "$ac_t""yes" 1>&6
4465     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4466     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4467   cat >> confdefs.h <<EOF
4468 #define $ac_tr_lib 1
4469 EOF
4470
4471   LIBS="-linet $LIBS"
4472
4473 else
4474   echo "$ac_t""no" 1>&6
4475 fi
4476  ;;
4477     esac
4478             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4479        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4480         # ac_cv_func_connect=yes
4481         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4482         cat >> confdefs.h <<\EOF
4483 #define HAVE_CONNECT 1
4484 EOF
4485
4486     fi
4487 fi
4488
4489 # Check if we have execl, if not we need to compile smbrun.
4490 for ac_func in execl
4491 do
4492 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4493 echo "configure:4494: checking for $ac_func" >&5
4494 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4495   echo $ac_n "(cached) $ac_c" 1>&6
4496 else
4497   cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 /* System header to define __stub macros and hopefully few prototypes,
4501     which can conflict with char $ac_func(); below.  */
4502 #include <assert.h>
4503 /* Override any gcc2 internal prototype to avoid an error.  */
4504 /* We use char because int might match the return type of a gcc2
4505     builtin and then its argument prototype would still apply.  */
4506 char $ac_func();
4507
4508 int main() {
4509
4510 /* The GNU C library defines this for functions which it implements
4511     to always fail with ENOSYS.  Some functions are actually named
4512     something starting with __ and the normal name is an alias.  */
4513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4514 choke me
4515 #else
4516 $ac_func();
4517 #endif
4518
4519 ; return 0; }
4520 EOF
4521 if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4522   rm -rf conftest*
4523   eval "ac_cv_func_$ac_func=yes"
4524 else
4525   echo "configure: failed program was:" >&5
4526   cat conftest.$ac_ext >&5
4527   rm -rf conftest*
4528   eval "ac_cv_func_$ac_func=no"
4529 fi
4530 rm -f conftest*
4531 fi
4532
4533 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4534   echo "$ac_t""yes" 1>&6
4535     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4536   cat >> confdefs.h <<EOF
4537 #define $ac_tr_func 1
4538 EOF
4539  
4540 else
4541   echo "$ac_t""no" 1>&6
4542 fi
4543 done
4544
4545 if test x"$ac_cv_func_execl" = x"no"; then
4546     RUNPROG="bin/smbrun"
4547 else
4548     RUNPROG=""
4549 fi
4550
4551 for ac_func in waitpid getcwd strdup strtoul strerror chown chmod chroot
4552 do
4553 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4554 echo "configure:4555: checking for $ac_func" >&5
4555 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4556   echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558   cat > conftest.$ac_ext <<EOF
4559 #line 4560 "configure"
4560 #include "confdefs.h"
4561 /* System header to define __stub macros and hopefully few prototypes,
4562     which can conflict with char $ac_func(); below.  */
4563 #include <assert.h>
4564 /* Override any gcc2 internal prototype to avoid an error.  */
4565 /* We use char because int might match the return type of a gcc2
4566     builtin and then its argument prototype would still apply.  */
4567 char $ac_func();
4568
4569 int main() {
4570
4571 /* The GNU C library defines this for functions which it implements
4572     to always fail with ENOSYS.  Some functions are actually named
4573     something starting with __ and the normal name is an alias.  */
4574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4575 choke me
4576 #else
4577 $ac_func();
4578 #endif
4579
4580 ; return 0; }
4581 EOF
4582 if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4583   rm -rf conftest*
4584   eval "ac_cv_func_$ac_func=yes"
4585 else
4586   echo "configure: failed program was:" >&5
4587   cat conftest.$ac_ext >&5
4588   rm -rf conftest*
4589   eval "ac_cv_func_$ac_func=no"
4590 fi
4591 rm -f conftest*
4592 fi
4593
4594 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4595   echo "$ac_t""yes" 1>&6
4596     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4597   cat >> confdefs.h <<EOF
4598 #define $ac_tr_func 1
4599 EOF
4600  
4601 else
4602   echo "$ac_t""no" 1>&6
4603 fi
4604 done
4605
4606 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
4607 do
4608 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4609 echo "configure:4610: checking for $ac_func" >&5
4610 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4611   echo $ac_n "(cached) $ac_c" 1>&6
4612 else
4613   cat > conftest.$ac_ext <<EOF
4614 #line 4615 "configure"
4615 #include "confdefs.h"
4616 /* System header to define __stub macros and hopefully few prototypes,
4617     which can conflict with char $ac_func(); below.  */
4618 #include <assert.h>
4619 /* Override any gcc2 internal prototype to avoid an error.  */
4620 /* We use char because int might match the return type of a gcc2
4621     builtin and then its argument prototype would still apply.  */
4622 char $ac_func();
4623
4624 int main() {
4625
4626 /* The GNU C library defines this for functions which it implements
4627     to always fail with ENOSYS.  Some functions are actually named
4628     something starting with __ and the normal name is an alias.  */
4629 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4630 choke me
4631 #else
4632 $ac_func();
4633 #endif
4634
4635 ; return 0; }
4636 EOF
4637 if { (eval echo configure:4638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4638   rm -rf conftest*
4639   eval "ac_cv_func_$ac_func=yes"
4640 else
4641   echo "configure: failed program was:" >&5
4642   cat conftest.$ac_ext >&5
4643   rm -rf conftest*
4644   eval "ac_cv_func_$ac_func=no"
4645 fi
4646 rm -f conftest*
4647 fi
4648
4649 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4650   echo "$ac_t""yes" 1>&6
4651     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4652   cat >> confdefs.h <<EOF
4653 #define $ac_tr_func 1
4654 EOF
4655  
4656 else
4657   echo "$ac_t""no" 1>&6
4658 fi
4659 done
4660
4661 for ac_func in memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid
4662 do
4663 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4664 echo "configure:4665: checking for $ac_func" >&5
4665 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4666   echo $ac_n "(cached) $ac_c" 1>&6
4667 else
4668   cat > conftest.$ac_ext <<EOF
4669 #line 4670 "configure"
4670 #include "confdefs.h"
4671 /* System header to define __stub macros and hopefully few prototypes,
4672     which can conflict with char $ac_func(); below.  */
4673 #include <assert.h>
4674 /* Override any gcc2 internal prototype to avoid an error.  */
4675 /* We use char because int might match the return type of a gcc2
4676     builtin and then its argument prototype would still apply.  */
4677 char $ac_func();
4678
4679 int main() {
4680
4681 /* The GNU C library defines this for functions which it implements
4682     to always fail with ENOSYS.  Some functions are actually named
4683     something starting with __ and the normal name is an alias.  */
4684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4685 choke me
4686 #else
4687 $ac_func();
4688 #endif
4689
4690 ; return 0; }
4691 EOF
4692 if { (eval echo configure:4693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4693   rm -rf conftest*
4694   eval "ac_cv_func_$ac_func=yes"
4695 else
4696   echo "configure: failed program was:" >&5
4697   cat conftest.$ac_ext >&5
4698   rm -rf conftest*
4699   eval "ac_cv_func_$ac_func=no"
4700 fi
4701 rm -f conftest*
4702 fi
4703
4704 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4705   echo "$ac_t""yes" 1>&6
4706     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4707   cat >> confdefs.h <<EOF
4708 #define $ac_tr_func 1
4709 EOF
4710  
4711 else
4712   echo "$ac_t""no" 1>&6
4713 fi
4714 done
4715
4716 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
4717 do
4718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4719 echo "configure:4720: checking for $ac_func" >&5
4720 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4726 /* System header to define __stub macros and hopefully few prototypes,
4727     which can conflict with char $ac_func(); below.  */
4728 #include <assert.h>
4729 /* Override any gcc2 internal prototype to avoid an error.  */
4730 /* We use char because int might match the return type of a gcc2
4731     builtin and then its argument prototype would still apply.  */
4732 char $ac_func();
4733
4734 int main() {
4735
4736 /* The GNU C library defines this for functions which it implements
4737     to always fail with ENOSYS.  Some functions are actually named
4738     something starting with __ and the normal name is an alias.  */
4739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4740 choke me
4741 #else
4742 $ac_func();
4743 #endif
4744
4745 ; return 0; }
4746 EOF
4747 if { (eval echo configure:4748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4748   rm -rf conftest*
4749   eval "ac_cv_func_$ac_func=yes"
4750 else
4751   echo "configure: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753   rm -rf conftest*
4754   eval "ac_cv_func_$ac_func=no"
4755 fi
4756 rm -f conftest*
4757 fi
4758
4759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4760   echo "$ac_t""yes" 1>&6
4761     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4762   cat >> confdefs.h <<EOF
4763 #define $ac_tr_func 1
4764 EOF
4765  
4766 else
4767   echo "$ac_t""no" 1>&6
4768 fi
4769 done
4770
4771 for ac_func in initgroups select rdchk getgrnam getgrent pathconf
4772 do
4773 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4774 echo "configure:4775: checking for $ac_func" >&5
4775 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4776   echo $ac_n "(cached) $ac_c" 1>&6
4777 else
4778   cat > conftest.$ac_ext <<EOF
4779 #line 4780 "configure"
4780 #include "confdefs.h"
4781 /* System header to define __stub macros and hopefully few prototypes,
4782     which can conflict with char $ac_func(); below.  */
4783 #include <assert.h>
4784 /* Override any gcc2 internal prototype to avoid an error.  */
4785 /* We use char because int might match the return type of a gcc2
4786     builtin and then its argument prototype would still apply.  */
4787 char $ac_func();
4788
4789 int main() {
4790
4791 /* The GNU C library defines this for functions which it implements
4792     to always fail with ENOSYS.  Some functions are actually named
4793     something starting with __ and the normal name is an alias.  */
4794 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4795 choke me
4796 #else
4797 $ac_func();
4798 #endif
4799
4800 ; return 0; }
4801 EOF
4802 if { (eval echo configure:4803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4803   rm -rf conftest*
4804   eval "ac_cv_func_$ac_func=yes"
4805 else
4806   echo "configure: failed program was:" >&5
4807   cat conftest.$ac_ext >&5
4808   rm -rf conftest*
4809   eval "ac_cv_func_$ac_func=no"
4810 fi
4811 rm -f conftest*
4812 fi
4813
4814 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4815   echo "$ac_t""yes" 1>&6
4816     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4817   cat >> confdefs.h <<EOF
4818 #define $ac_tr_func 1
4819 EOF
4820  
4821 else
4822   echo "$ac_t""no" 1>&6
4823 fi
4824 done
4825
4826 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
4827 do
4828 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4829 echo "configure:4830: checking for $ac_func" >&5
4830 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4831   echo $ac_n "(cached) $ac_c" 1>&6
4832 else
4833   cat > conftest.$ac_ext <<EOF
4834 #line 4835 "configure"
4835 #include "confdefs.h"
4836 /* System header to define __stub macros and hopefully few prototypes,
4837     which can conflict with char $ac_func(); below.  */
4838 #include <assert.h>
4839 /* Override any gcc2 internal prototype to avoid an error.  */
4840 /* We use char because int might match the return type of a gcc2
4841     builtin and then its argument prototype would still apply.  */
4842 char $ac_func();
4843
4844 int main() {
4845
4846 /* The GNU C library defines this for functions which it implements
4847     to always fail with ENOSYS.  Some functions are actually named
4848     something starting with __ and the normal name is an alias.  */
4849 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4850 choke me
4851 #else
4852 $ac_func();
4853 #endif
4854
4855 ; return 0; }
4856 EOF
4857 if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4858   rm -rf conftest*
4859   eval "ac_cv_func_$ac_func=yes"
4860 else
4861   echo "configure: failed program was:" >&5
4862   cat conftest.$ac_ext >&5
4863   rm -rf conftest*
4864   eval "ac_cv_func_$ac_func=no"
4865 fi
4866 rm -f conftest*
4867 fi
4868
4869 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4870   echo "$ac_t""yes" 1>&6
4871     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4872   cat >> confdefs.h <<EOF
4873 #define $ac_tr_func 1
4874 EOF
4875  
4876 else
4877   echo "$ac_t""no" 1>&6
4878 fi
4879 done
4880
4881 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
4882 do
4883 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4884 echo "configure:4885: checking for $ac_func" >&5
4885 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4886   echo $ac_n "(cached) $ac_c" 1>&6
4887 else
4888   cat > conftest.$ac_ext <<EOF
4889 #line 4890 "configure"
4890 #include "confdefs.h"
4891 /* System header to define __stub macros and hopefully few prototypes,
4892     which can conflict with char $ac_func(); below.  */
4893 #include <assert.h>
4894 /* Override any gcc2 internal prototype to avoid an error.  */
4895 /* We use char because int might match the return type of a gcc2
4896     builtin and then its argument prototype would still apply.  */
4897 char $ac_func();
4898
4899 int main() {
4900
4901 /* The GNU C library defines this for functions which it implements
4902     to always fail with ENOSYS.  Some functions are actually named
4903     something starting with __ and the normal name is an alias.  */
4904 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4905 choke me
4906 #else
4907 $ac_func();
4908 #endif
4909
4910 ; return 0; }
4911 EOF
4912 if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4913   rm -rf conftest*
4914   eval "ac_cv_func_$ac_func=yes"
4915 else
4916   echo "configure: failed program was:" >&5
4917   cat conftest.$ac_ext >&5
4918   rm -rf conftest*
4919   eval "ac_cv_func_$ac_func=no"
4920 fi
4921 rm -f conftest*
4922 fi
4923
4924 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4925   echo "$ac_t""yes" 1>&6
4926     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4927   cat >> confdefs.h <<EOF
4928 #define $ac_tr_func 1
4929 EOF
4930  
4931 else
4932   echo "$ac_t""no" 1>&6
4933 fi
4934 done
4935
4936 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid yp_get_default_domain getpwanam
4937 do
4938 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4939 echo "configure:4940: checking for $ac_func" >&5
4940 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946 /* System header to define __stub macros and hopefully few prototypes,
4947     which can conflict with char $ac_func(); below.  */
4948 #include <assert.h>
4949 /* Override any gcc2 internal prototype to avoid an error.  */
4950 /* We use char because int might match the return type of a gcc2
4951     builtin and then its argument prototype would still apply.  */
4952 char $ac_func();
4953
4954 int main() {
4955
4956 /* The GNU C library defines this for functions which it implements
4957     to always fail with ENOSYS.  Some functions are actually named
4958     something starting with __ and the normal name is an alias.  */
4959 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4960 choke me
4961 #else
4962 $ac_func();
4963 #endif
4964
4965 ; return 0; }
4966 EOF
4967 if { (eval echo configure:4968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4968   rm -rf conftest*
4969   eval "ac_cv_func_$ac_func=yes"
4970 else
4971   echo "configure: failed program was:" >&5
4972   cat conftest.$ac_ext >&5
4973   rm -rf conftest*
4974   eval "ac_cv_func_$ac_func=no"
4975 fi
4976 rm -f conftest*
4977 fi
4978
4979 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4980   echo "$ac_t""yes" 1>&6
4981     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4982   cat >> confdefs.h <<EOF
4983 #define $ac_tr_func 1
4984 EOF
4985  
4986 else
4987   echo "$ac_t""no" 1>&6
4988 fi
4989 done
4990
4991 for ac_func in srandom random srand rand setenv usleep mmap64 strcasecmp fcvt fcvtl
4992 do
4993 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4994 echo "configure:4995: checking for $ac_func" >&5
4995 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4996   echo $ac_n "(cached) $ac_c" 1>&6
4997 else
4998   cat > conftest.$ac_ext <<EOF
4999 #line 5000 "configure"
5000 #include "confdefs.h"
5001 /* System header to define __stub macros and hopefully few prototypes,
5002     which can conflict with char $ac_func(); below.  */
5003 #include <assert.h>
5004 /* Override any gcc2 internal prototype to avoid an error.  */
5005 /* We use char because int might match the return type of a gcc2
5006     builtin and then its argument prototype would still apply.  */
5007 char $ac_func();
5008
5009 int main() {
5010
5011 /* The GNU C library defines this for functions which it implements
5012     to always fail with ENOSYS.  Some functions are actually named
5013     something starting with __ and the normal name is an alias.  */
5014 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5015 choke me
5016 #else
5017 $ac_func();
5018 #endif
5019
5020 ; return 0; }
5021 EOF
5022 if { (eval echo configure:5023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5023   rm -rf conftest*
5024   eval "ac_cv_func_$ac_func=yes"
5025 else
5026   echo "configure: failed program was:" >&5
5027   cat conftest.$ac_ext >&5
5028   rm -rf conftest*
5029   eval "ac_cv_func_$ac_func=no"
5030 fi
5031 rm -f conftest*
5032 fi
5033
5034 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5035   echo "$ac_t""yes" 1>&6
5036     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5037   cat >> confdefs.h <<EOF
5038 #define $ac_tr_func 1
5039 EOF
5040  
5041 else
5042   echo "$ac_t""no" 1>&6
5043 fi
5044 done
5045
5046
5047 # syscall() is needed for smbwrapper.
5048 for ac_func in syscall
5049 do
5050 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5051 echo "configure:5052: checking for $ac_func" >&5
5052 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5053   echo $ac_n "(cached) $ac_c" 1>&6
5054 else
5055   cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058 /* System header to define __stub macros and hopefully few prototypes,
5059     which can conflict with char $ac_func(); below.  */
5060 #include <assert.h>
5061 /* Override any gcc2 internal prototype to avoid an error.  */
5062 /* We use char because int might match the return type of a gcc2
5063     builtin and then its argument prototype would still apply.  */
5064 char $ac_func();
5065
5066 int main() {
5067
5068 /* The GNU C library defines this for functions which it implements
5069     to always fail with ENOSYS.  Some functions are actually named
5070     something starting with __ and the normal name is an alias.  */
5071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5072 choke me
5073 #else
5074 $ac_func();
5075 #endif
5076
5077 ; return 0; }
5078 EOF
5079 if { (eval echo configure:5080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5080   rm -rf conftest*
5081   eval "ac_cv_func_$ac_func=yes"
5082 else
5083   echo "configure: failed program was:" >&5
5084   cat conftest.$ac_ext >&5
5085   rm -rf conftest*
5086   eval "ac_cv_func_$ac_func=no"
5087 fi
5088 rm -f conftest*
5089 fi
5090
5091 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5092   echo "$ac_t""yes" 1>&6
5093     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5094   cat >> confdefs.h <<EOF
5095 #define $ac_tr_func 1
5096 EOF
5097  
5098 else
5099   echo "$ac_t""no" 1>&6
5100 fi
5101 done
5102
5103
5104 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5105 do
5106 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5107 echo "configure:5108: checking for $ac_func" >&5
5108 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5109   echo $ac_n "(cached) $ac_c" 1>&6
5110 else
5111   cat > conftest.$ac_ext <<EOF
5112 #line 5113 "configure"
5113 #include "confdefs.h"
5114 /* System header to define __stub macros and hopefully few prototypes,
5115     which can conflict with char $ac_func(); below.  */
5116 #include <assert.h>
5117 /* Override any gcc2 internal prototype to avoid an error.  */
5118 /* We use char because int might match the return type of a gcc2
5119     builtin and then its argument prototype would still apply.  */
5120 char $ac_func();
5121
5122 int main() {
5123
5124 /* The GNU C library defines this for functions which it implements
5125     to always fail with ENOSYS.  Some functions are actually named
5126     something starting with __ and the normal name is an alias.  */
5127 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5128 choke me
5129 #else
5130 $ac_func();
5131 #endif
5132
5133 ; return 0; }
5134 EOF
5135 if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5136   rm -rf conftest*
5137   eval "ac_cv_func_$ac_func=yes"
5138 else
5139   echo "configure: failed program was:" >&5
5140   cat conftest.$ac_ext >&5
5141   rm -rf conftest*
5142   eval "ac_cv_func_$ac_func=no"
5143 fi
5144 rm -f conftest*
5145 fi
5146
5147 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5148   echo "$ac_t""yes" 1>&6
5149     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5150   cat >> confdefs.h <<EOF
5151 #define $ac_tr_func 1
5152 EOF
5153  
5154 else
5155   echo "$ac_t""no" 1>&6
5156 fi
5157 done
5158
5159 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5160 do
5161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5162 echo "configure:5163: checking for $ac_func" >&5
5163 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5164   echo $ac_n "(cached) $ac_c" 1>&6
5165 else
5166   cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5169 /* System header to define __stub macros and hopefully few prototypes,
5170     which can conflict with char $ac_func(); below.  */
5171 #include <assert.h>
5172 /* Override any gcc2 internal prototype to avoid an error.  */
5173 /* We use char because int might match the return type of a gcc2
5174     builtin and then its argument prototype would still apply.  */
5175 char $ac_func();
5176
5177 int main() {
5178
5179 /* The GNU C library defines this for functions which it implements
5180     to always fail with ENOSYS.  Some functions are actually named
5181     something starting with __ and the normal name is an alias.  */
5182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5183 choke me
5184 #else
5185 $ac_func();
5186 #endif
5187
5188 ; return 0; }
5189 EOF
5190 if { (eval echo configure:5191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5191   rm -rf conftest*
5192   eval "ac_cv_func_$ac_func=yes"
5193 else
5194   echo "configure: failed program was:" >&5
5195   cat conftest.$ac_ext >&5
5196   rm -rf conftest*
5197   eval "ac_cv_func_$ac_func=no"
5198 fi
5199 rm -f conftest*
5200 fi
5201
5202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5203   echo "$ac_t""yes" 1>&6
5204     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5205   cat >> confdefs.h <<EOF
5206 #define $ac_tr_func 1
5207 EOF
5208  
5209 else
5210   echo "$ac_t""no" 1>&6
5211 fi
5212 done
5213
5214 for ac_func in __getcwd _getcwd
5215 do
5216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5217 echo "configure:5218: checking for $ac_func" >&5
5218 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5219   echo $ac_n "(cached) $ac_c" 1>&6
5220 else
5221   cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224 /* System header to define __stub macros and hopefully few prototypes,
5225     which can conflict with char $ac_func(); below.  */
5226 #include <assert.h>
5227 /* Override any gcc2 internal prototype to avoid an error.  */
5228 /* We use char because int might match the return type of a gcc2
5229     builtin and then its argument prototype would still apply.  */
5230 char $ac_func();
5231
5232 int main() {
5233
5234 /* The GNU C library defines this for functions which it implements
5235     to always fail with ENOSYS.  Some functions are actually named
5236     something starting with __ and the normal name is an alias.  */
5237 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5238 choke me
5239 #else
5240 $ac_func();
5241 #endif
5242
5243 ; return 0; }
5244 EOF
5245 if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5246   rm -rf conftest*
5247   eval "ac_cv_func_$ac_func=yes"
5248 else
5249   echo "configure: failed program was:" >&5
5250   cat conftest.$ac_ext >&5
5251   rm -rf conftest*
5252   eval "ac_cv_func_$ac_func=no"
5253 fi
5254 rm -f conftest*
5255 fi
5256
5257 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5258   echo "$ac_t""yes" 1>&6
5259     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5260   cat >> confdefs.h <<EOF
5261 #define $ac_tr_func 1
5262 EOF
5263  
5264 else
5265   echo "$ac_t""no" 1>&6
5266 fi
5267 done
5268
5269 for ac_func in __xstat __fxstat __lxstat
5270 do
5271 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5272 echo "configure:5273: checking for $ac_func" >&5
5273 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5274   echo $ac_n "(cached) $ac_c" 1>&6
5275 else
5276   cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279 /* System header to define __stub macros and hopefully few prototypes,
5280     which can conflict with char $ac_func(); below.  */
5281 #include <assert.h>
5282 /* Override any gcc2 internal prototype to avoid an error.  */
5283 /* We use char because int might match the return type of a gcc2
5284     builtin and then its argument prototype would still apply.  */
5285 char $ac_func();
5286
5287 int main() {
5288
5289 /* The GNU C library defines this for functions which it implements
5290     to always fail with ENOSYS.  Some functions are actually named
5291     something starting with __ and the normal name is an alias.  */
5292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5293 choke me
5294 #else
5295 $ac_func();
5296 #endif
5297
5298 ; return 0; }
5299 EOF
5300 if { (eval echo configure:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5301   rm -rf conftest*
5302   eval "ac_cv_func_$ac_func=yes"
5303 else
5304   echo "configure: failed program was:" >&5
5305   cat conftest.$ac_ext >&5
5306   rm -rf conftest*
5307   eval "ac_cv_func_$ac_func=no"
5308 fi
5309 rm -f conftest*
5310 fi
5311
5312 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5313   echo "$ac_t""yes" 1>&6
5314     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5315   cat >> confdefs.h <<EOF
5316 #define $ac_tr_func 1
5317 EOF
5318  
5319 else
5320   echo "$ac_t""no" 1>&6
5321 fi
5322 done
5323
5324 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5325 do
5326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5327 echo "configure:5328: checking for $ac_func" >&5
5328 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5329   echo $ac_n "(cached) $ac_c" 1>&6
5330 else
5331   cat > conftest.$ac_ext <<EOF
5332 #line 5333 "configure"
5333 #include "confdefs.h"
5334 /* System header to define __stub macros and hopefully few prototypes,
5335     which can conflict with char $ac_func(); below.  */
5336 #include <assert.h>
5337 /* Override any gcc2 internal prototype to avoid an error.  */
5338 /* We use char because int might match the return type of a gcc2
5339     builtin and then its argument prototype would still apply.  */
5340 char $ac_func();
5341
5342 int main() {
5343
5344 /* The GNU C library defines this for functions which it implements
5345     to always fail with ENOSYS.  Some functions are actually named
5346     something starting with __ and the normal name is an alias.  */
5347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5348 choke me
5349 #else
5350 $ac_func();
5351 #endif
5352
5353 ; return 0; }
5354 EOF
5355 if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5356   rm -rf conftest*
5357   eval "ac_cv_func_$ac_func=yes"
5358 else
5359   echo "configure: failed program was:" >&5
5360   cat conftest.$ac_ext >&5
5361   rm -rf conftest*
5362   eval "ac_cv_func_$ac_func=no"
5363 fi
5364 rm -f conftest*
5365 fi
5366
5367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5368   echo "$ac_t""yes" 1>&6
5369     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5370   cat >> confdefs.h <<EOF
5371 #define $ac_tr_func 1
5372 EOF
5373  
5374 else
5375   echo "$ac_t""no" 1>&6
5376 fi
5377 done
5378
5379 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5380 do
5381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5382 echo "configure:5383: checking for $ac_func" >&5
5383 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5384   echo $ac_n "(cached) $ac_c" 1>&6
5385 else
5386   cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389 /* System header to define __stub macros and hopefully few prototypes,
5390     which can conflict with char $ac_func(); below.  */
5391 #include <assert.h>
5392 /* Override any gcc2 internal prototype to avoid an error.  */
5393 /* We use char because int might match the return type of a gcc2
5394     builtin and then its argument prototype would still apply.  */
5395 char $ac_func();
5396
5397 int main() {
5398
5399 /* The GNU C library defines this for functions which it implements
5400     to always fail with ENOSYS.  Some functions are actually named
5401     something starting with __ and the normal name is an alias.  */
5402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5403 choke me
5404 #else
5405 $ac_func();
5406 #endif
5407
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_func_$ac_func=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_func_$ac_func=no"
5418 fi
5419 rm -f conftest*
5420 fi
5421
5422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5423   echo "$ac_t""yes" 1>&6
5424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5425   cat >> confdefs.h <<EOF
5426 #define $ac_tr_func 1
5427 EOF
5428  
5429 else
5430   echo "$ac_t""no" 1>&6
5431 fi
5432 done
5433
5434 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5435 do
5436 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5437 echo "configure:5438: checking for $ac_func" >&5
5438 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5439   echo $ac_n "(cached) $ac_c" 1>&6
5440 else
5441   cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444 /* System header to define __stub macros and hopefully few prototypes,
5445     which can conflict with char $ac_func(); below.  */
5446 #include <assert.h>
5447 /* Override any gcc2 internal prototype to avoid an error.  */
5448 /* We use char because int might match the return type of a gcc2
5449     builtin and then its argument prototype would still apply.  */
5450 char $ac_func();
5451
5452 int main() {
5453
5454 /* The GNU C library defines this for functions which it implements
5455     to always fail with ENOSYS.  Some functions are actually named
5456     something starting with __ and the normal name is an alias.  */
5457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5458 choke me
5459 #else
5460 $ac_func();
5461 #endif
5462
5463 ; return 0; }
5464 EOF
5465 if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5466   rm -rf conftest*
5467   eval "ac_cv_func_$ac_func=yes"
5468 else
5469   echo "configure: failed program was:" >&5
5470   cat conftest.$ac_ext >&5
5471   rm -rf conftest*
5472   eval "ac_cv_func_$ac_func=no"
5473 fi
5474 rm -f conftest*
5475 fi
5476
5477 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5478   echo "$ac_t""yes" 1>&6
5479     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5480   cat >> confdefs.h <<EOF
5481 #define $ac_tr_func 1
5482 EOF
5483  
5484 else
5485   echo "$ac_t""no" 1>&6
5486 fi
5487 done
5488
5489 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5490 do
5491 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5492 echo "configure:5493: checking for $ac_func" >&5
5493 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5494   echo $ac_n "(cached) $ac_c" 1>&6
5495 else
5496   cat > conftest.$ac_ext <<EOF
5497 #line 5498 "configure"
5498 #include "confdefs.h"
5499 /* System header to define __stub macros and hopefully few prototypes,
5500     which can conflict with char $ac_func(); below.  */
5501 #include <assert.h>
5502 /* Override any gcc2 internal prototype to avoid an error.  */
5503 /* We use char because int might match the return type of a gcc2
5504     builtin and then its argument prototype would still apply.  */
5505 char $ac_func();
5506
5507 int main() {
5508
5509 /* The GNU C library defines this for functions which it implements
5510     to always fail with ENOSYS.  Some functions are actually named
5511     something starting with __ and the normal name is an alias.  */
5512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5513 choke me
5514 #else
5515 $ac_func();
5516 #endif
5517
5518 ; return 0; }
5519 EOF
5520 if { (eval echo configure:5521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5521   rm -rf conftest*
5522   eval "ac_cv_func_$ac_func=yes"
5523 else
5524   echo "configure: failed program was:" >&5
5525   cat conftest.$ac_ext >&5
5526   rm -rf conftest*
5527   eval "ac_cv_func_$ac_func=no"
5528 fi
5529 rm -f conftest*
5530 fi
5531
5532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5533   echo "$ac_t""yes" 1>&6
5534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5535   cat >> confdefs.h <<EOF
5536 #define $ac_tr_func 1
5537 EOF
5538  
5539 else
5540   echo "$ac_t""no" 1>&6
5541 fi
5542 done
5543
5544 for ac_func in _write __write _fork __fork
5545 do
5546 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5547 echo "configure:5548: checking for $ac_func" >&5
5548 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5549   echo $ac_n "(cached) $ac_c" 1>&6
5550 else
5551   cat > conftest.$ac_ext <<EOF
5552 #line 5553 "configure"
5553 #include "confdefs.h"
5554 /* System header to define __stub macros and hopefully few prototypes,
5555     which can conflict with char $ac_func(); below.  */
5556 #include <assert.h>
5557 /* Override any gcc2 internal prototype to avoid an error.  */
5558 /* We use char because int might match the return type of a gcc2
5559     builtin and then its argument prototype would still apply.  */
5560 char $ac_func();
5561
5562 int main() {
5563
5564 /* The GNU C library defines this for functions which it implements
5565     to always fail with ENOSYS.  Some functions are actually named
5566     something starting with __ and the normal name is an alias.  */
5567 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5568 choke me
5569 #else
5570 $ac_func();
5571 #endif
5572
5573 ; return 0; }
5574 EOF
5575 if { (eval echo configure:5576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5576   rm -rf conftest*
5577   eval "ac_cv_func_$ac_func=yes"
5578 else
5579   echo "configure: failed program was:" >&5
5580   cat conftest.$ac_ext >&5
5581   rm -rf conftest*
5582   eval "ac_cv_func_$ac_func=no"
5583 fi
5584 rm -f conftest*
5585 fi
5586
5587 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5588   echo "$ac_t""yes" 1>&6
5589     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5590   cat >> confdefs.h <<EOF
5591 #define $ac_tr_func 1
5592 EOF
5593  
5594 else
5595   echo "$ac_t""no" 1>&6
5596 fi
5597 done
5598
5599 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
5600 do
5601 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5602 echo "configure:5603: checking for $ac_func" >&5
5603 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5604   echo $ac_n "(cached) $ac_c" 1>&6
5605 else
5606   cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609 /* System header to define __stub macros and hopefully few prototypes,
5610     which can conflict with char $ac_func(); below.  */
5611 #include <assert.h>
5612 /* Override any gcc2 internal prototype to avoid an error.  */
5613 /* We use char because int might match the return type of a gcc2
5614     builtin and then its argument prototype would still apply.  */
5615 char $ac_func();
5616
5617 int main() {
5618
5619 /* The GNU C library defines this for functions which it implements
5620     to always fail with ENOSYS.  Some functions are actually named
5621     something starting with __ and the normal name is an alias.  */
5622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5623 choke me
5624 #else
5625 $ac_func();
5626 #endif
5627
5628 ; return 0; }
5629 EOF
5630 if { (eval echo configure:5631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5631   rm -rf conftest*
5632   eval "ac_cv_func_$ac_func=yes"
5633 else
5634   echo "configure: failed program was:" >&5
5635   cat conftest.$ac_ext >&5
5636   rm -rf conftest*
5637   eval "ac_cv_func_$ac_func=no"
5638 fi
5639 rm -f conftest*
5640 fi
5641
5642 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5643   echo "$ac_t""yes" 1>&6
5644     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5645   cat >> confdefs.h <<EOF
5646 #define $ac_tr_func 1
5647 EOF
5648  
5649 else
5650   echo "$ac_t""no" 1>&6
5651 fi
5652 done
5653
5654 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
5655 do
5656 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5657 echo "configure:5658: checking for $ac_func" >&5
5658 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5659   echo $ac_n "(cached) $ac_c" 1>&6
5660 else
5661   cat > conftest.$ac_ext <<EOF
5662 #line 5663 "configure"
5663 #include "confdefs.h"
5664 /* System header to define __stub macros and hopefully few prototypes,
5665     which can conflict with char $ac_func(); below.  */
5666 #include <assert.h>
5667 /* Override any gcc2 internal prototype to avoid an error.  */
5668 /* We use char because int might match the return type of a gcc2
5669     builtin and then its argument prototype would still apply.  */
5670 char $ac_func();
5671
5672 int main() {
5673
5674 /* The GNU C library defines this for functions which it implements
5675     to always fail with ENOSYS.  Some functions are actually named
5676     something starting with __ and the normal name is an alias.  */
5677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5678 choke me
5679 #else
5680 $ac_func();
5681 #endif
5682
5683 ; return 0; }
5684 EOF
5685 if { (eval echo configure:5686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5686   rm -rf conftest*
5687   eval "ac_cv_func_$ac_func=yes"
5688 else
5689   echo "configure: failed program was:" >&5
5690   cat conftest.$ac_ext >&5
5691   rm -rf conftest*
5692   eval "ac_cv_func_$ac_func=no"
5693 fi
5694 rm -f conftest*
5695 fi
5696
5697 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5698   echo "$ac_t""yes" 1>&6
5699     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5700   cat >> confdefs.h <<EOF
5701 #define $ac_tr_func 1
5702 EOF
5703  
5704 else
5705   echo "$ac_t""no" 1>&6
5706 fi
5707 done
5708
5709 for ac_func in pread _pread __pread pread64 _pread64 __pread64
5710 do
5711 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5712 echo "configure:5713: checking for $ac_func" >&5
5713 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5714   echo $ac_n "(cached) $ac_c" 1>&6
5715 else
5716   cat > conftest.$ac_ext <<EOF
5717 #line 5718 "configure"
5718 #include "confdefs.h"
5719 /* System header to define __stub macros and hopefully few prototypes,
5720     which can conflict with char $ac_func(); below.  */
5721 #include <assert.h>
5722 /* Override any gcc2 internal prototype to avoid an error.  */
5723 /* We use char because int might match the return type of a gcc2
5724     builtin and then its argument prototype would still apply.  */
5725 char $ac_func();
5726
5727 int main() {
5728
5729 /* The GNU C library defines this for functions which it implements
5730     to always fail with ENOSYS.  Some functions are actually named
5731     something starting with __ and the normal name is an alias.  */
5732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5733 choke me
5734 #else
5735 $ac_func();
5736 #endif
5737
5738 ; return 0; }
5739 EOF
5740 if { (eval echo configure:5741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5741   rm -rf conftest*
5742   eval "ac_cv_func_$ac_func=yes"
5743 else
5744   echo "configure: failed program was:" >&5
5745   cat conftest.$ac_ext >&5
5746   rm -rf conftest*
5747   eval "ac_cv_func_$ac_func=no"
5748 fi
5749 rm -f conftest*
5750 fi
5751
5752 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5753   echo "$ac_t""yes" 1>&6
5754     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5755   cat >> confdefs.h <<EOF
5756 #define $ac_tr_func 1
5757 EOF
5758  
5759 else
5760   echo "$ac_t""no" 1>&6
5761 fi
5762 done
5763
5764 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
5765 do
5766 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5767 echo "configure:5768: checking for $ac_func" >&5
5768 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5769   echo $ac_n "(cached) $ac_c" 1>&6
5770 else
5771   cat > conftest.$ac_ext <<EOF
5772 #line 5773 "configure"
5773 #include "confdefs.h"
5774 /* System header to define __stub macros and hopefully few prototypes,
5775     which can conflict with char $ac_func(); below.  */
5776 #include <assert.h>
5777 /* Override any gcc2 internal prototype to avoid an error.  */
5778 /* We use char because int might match the return type of a gcc2
5779     builtin and then its argument prototype would still apply.  */
5780 char $ac_func();
5781
5782 int main() {
5783
5784 /* The GNU C library defines this for functions which it implements
5785     to always fail with ENOSYS.  Some functions are actually named
5786     something starting with __ and the normal name is an alias.  */
5787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5788 choke me
5789 #else
5790 $ac_func();
5791 #endif
5792
5793 ; return 0; }
5794 EOF
5795 if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5796   rm -rf conftest*
5797   eval "ac_cv_func_$ac_func=yes"
5798 else
5799   echo "configure: failed program was:" >&5
5800   cat conftest.$ac_ext >&5
5801   rm -rf conftest*
5802   eval "ac_cv_func_$ac_func=no"
5803 fi
5804 rm -f conftest*
5805 fi
5806
5807 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5808   echo "$ac_t""yes" 1>&6
5809     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5810   cat >> confdefs.h <<EOF
5811 #define $ac_tr_func 1
5812 EOF
5813  
5814 else
5815   echo "$ac_t""no" 1>&6
5816 fi
5817 done
5818
5819 for ac_func in open64 _open64 __open64 creat64
5820 do
5821 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5822 echo "configure:5823: checking for $ac_func" >&5
5823 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5824   echo $ac_n "(cached) $ac_c" 1>&6
5825 else
5826   cat > conftest.$ac_ext <<EOF
5827 #line 5828 "configure"
5828 #include "confdefs.h"
5829 /* System header to define __stub macros and hopefully few prototypes,
5830     which can conflict with char $ac_func(); below.  */
5831 #include <assert.h>
5832 /* Override any gcc2 internal prototype to avoid an error.  */
5833 /* We use char because int might match the return type of a gcc2
5834     builtin and then its argument prototype would still apply.  */
5835 char $ac_func();
5836
5837 int main() {
5838
5839 /* The GNU C library defines this for functions which it implements
5840     to always fail with ENOSYS.  Some functions are actually named
5841     something starting with __ and the normal name is an alias.  */
5842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5843 choke me
5844 #else
5845 $ac_func();
5846 #endif
5847
5848 ; return 0; }
5849 EOF
5850 if { (eval echo configure:5851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5851   rm -rf conftest*
5852   eval "ac_cv_func_$ac_func=yes"
5853 else
5854   echo "configure: failed program was:" >&5
5855   cat conftest.$ac_ext >&5
5856   rm -rf conftest*
5857   eval "ac_cv_func_$ac_func=no"
5858 fi
5859 rm -f conftest*
5860 fi
5861
5862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5863   echo "$ac_t""yes" 1>&6
5864     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5865   cat >> confdefs.h <<EOF
5866 #define $ac_tr_func 1
5867 EOF
5868  
5869 else
5870   echo "$ac_t""no" 1>&6
5871 fi
5872 done
5873
5874
5875 #
5876 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
5877 #
5878
5879 if test x$ac_cv_func_stat64 = xno ; then
5880   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
5881 echo "configure:5882: checking for stat64 in <sys/stat.h>" >&5
5882   cat > conftest.$ac_ext <<EOF
5883 #line 5884 "configure"
5884 #include "confdefs.h"
5885
5886 #if defined(HAVE_UNISTD_H)
5887 #include <unistd.h>
5888 #endif
5889 #include <sys/stat.h>
5890
5891 int main() {
5892 struct stat64 st64; exit(stat64(".",&st64));
5893 ; return 0; }
5894 EOF
5895 if { (eval echo configure:5896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5896   rm -rf conftest*
5897   ac_cv_func_stat64=yes
5898 else
5899   echo "configure: failed program was:" >&5
5900   cat conftest.$ac_ext >&5
5901 fi
5902 rm -f conftest*
5903   echo "$ac_t""$ac_cv_func_stat64" 1>&6
5904   if test x$ac_cv_func_stat64 = xyes ; then
5905     cat >> confdefs.h <<\EOF
5906 #define HAVE_STAT64 1
5907 EOF
5908
5909   fi
5910 fi
5911
5912 if test x$ac_cv_func_lstat64 = xno ; then
5913   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
5914 echo "configure:5915: checking for lstat64 in <sys/stat.h>" >&5
5915   cat > conftest.$ac_ext <<EOF
5916 #line 5917 "configure"
5917 #include "confdefs.h"
5918
5919 #if defined(HAVE_UNISTD_H)
5920 #include <unistd.h>
5921 #endif
5922 #include <sys/stat.h>
5923
5924 int main() {
5925 struct stat64 st64; exit(lstat64(".",&st64));
5926 ; return 0; }
5927 EOF
5928 if { (eval echo configure:5929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5929   rm -rf conftest*
5930   ac_cv_func_lstat64=yes
5931 else
5932   echo "configure: failed program was:" >&5
5933   cat conftest.$ac_ext >&5
5934 fi
5935 rm -f conftest*
5936   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
5937   if test x$ac_cv_func_lstat64 = xyes ; then
5938     cat >> confdefs.h <<\EOF
5939 #define HAVE_LSTAT64 1
5940 EOF
5941
5942   fi
5943 fi
5944
5945 if test x$ac_cv_func_fstat64 = xno ; then
5946   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
5947 echo "configure:5948: checking for fstat64 in <sys/stat.h>" >&5
5948   cat > conftest.$ac_ext <<EOF
5949 #line 5950 "configure"
5950 #include "confdefs.h"
5951
5952 #if defined(HAVE_UNISTD_H)
5953 #include <unistd.h>
5954 #endif
5955 #include <sys/stat.h>
5956
5957 int main() {
5958 struct stat64 st64; exit(fstat64(0,&st64));
5959 ; return 0; }
5960 EOF
5961 if { (eval echo configure:5962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5962   rm -rf conftest*
5963   ac_cv_func_fstat64=yes
5964 else
5965   echo "configure: failed program was:" >&5
5966   cat conftest.$ac_ext >&5
5967 fi
5968 rm -f conftest*
5969   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
5970   if test x$ac_cv_func_fstat64 = xyes ; then
5971     cat >> confdefs.h <<\EOF
5972 #define HAVE_FSTAT64 1
5973 EOF
5974
5975   fi
5976 fi
5977
5978 #
5979 # If no strcasecmp, check for it in some known places
5980 # It is in -lresolv on ReliantUNIX and UnixWare
5981 #   -lresolve *must* follow -lnsl for name resolution to work properly
5982 #
5983
5984 if test x$ac_cv_func_strcasecmp = xno ; then
5985         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
5986 echo "configure:5987: checking for strcasecmp in -lresolv" >&5
5987 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
5988 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5989   echo $ac_n "(cached) $ac_c" 1>&6
5990 else
5991   ac_save_LIBS="$LIBS"
5992 LIBS="-lresolv  $LIBS"
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996 /* Override any gcc2 internal prototype to avoid an error.  */
5997 /* We use char because int might match the return type of a gcc2
5998     builtin and then its argument prototype would still apply.  */
5999 char strcasecmp();
6000
6001 int main() {
6002 strcasecmp()
6003 ; return 0; }
6004 EOF
6005 if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6006   rm -rf conftest*
6007   eval "ac_cv_lib_$ac_lib_var=yes"
6008 else
6009   echo "configure: failed program was:" >&5
6010   cat conftest.$ac_ext >&5
6011   rm -rf conftest*
6012   eval "ac_cv_lib_$ac_lib_var=no"
6013 fi
6014 rm -f conftest*
6015 LIBS="$ac_save_LIBS"
6016
6017 fi
6018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6019   echo "$ac_t""yes" 1>&6
6020   LIBS="$LIBS -lresolv"
6021                 cat >> confdefs.h <<\EOF
6022 #define HAVE_STRCASECMP 1
6023 EOF
6024
6025 else
6026   echo "$ac_t""no" 1>&6
6027 fi
6028
6029 fi
6030
6031 #
6032 # Check for the functions putprpwnam, set_auth_parameters,
6033 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6034 # Needed for OSF1 and HPUX.
6035 #
6036
6037 case "$LIBS" in
6038   *-lsecurity*) for ac_func in putprpwnam
6039 do
6040 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6041 echo "configure:6042: checking for $ac_func" >&5
6042 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6043   echo $ac_n "(cached) $ac_c" 1>&6
6044 else
6045   cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048 /* System header to define __stub macros and hopefully few prototypes,
6049     which can conflict with char $ac_func(); below.  */
6050 #include <assert.h>
6051 /* Override any gcc2 internal prototype to avoid an error.  */
6052 /* We use char because int might match the return type of a gcc2
6053     builtin and then its argument prototype would still apply.  */
6054 char $ac_func();
6055
6056 int main() {
6057
6058 /* The GNU C library defines this for functions which it implements
6059     to always fail with ENOSYS.  Some functions are actually named
6060     something starting with __ and the normal name is an alias.  */
6061 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6062 choke me
6063 #else
6064 $ac_func();
6065 #endif
6066
6067 ; return 0; }
6068 EOF
6069 if { (eval echo configure:6070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6070   rm -rf conftest*
6071   eval "ac_cv_func_$ac_func=yes"
6072 else
6073   echo "configure: failed program was:" >&5
6074   cat conftest.$ac_ext >&5
6075   rm -rf conftest*
6076   eval "ac_cv_func_$ac_func=no"
6077 fi
6078 rm -f conftest*
6079 fi
6080
6081 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6082   echo "$ac_t""yes" 1>&6
6083     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6084   cat >> confdefs.h <<EOF
6085 #define $ac_tr_func 1
6086 EOF
6087  
6088 else
6089   echo "$ac_t""no" 1>&6
6090 fi
6091 done
6092  ;;
6093   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6094 echo "configure:6095: checking for putprpwnam in -lsecurity" >&5
6095 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6096 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6097   echo $ac_n "(cached) $ac_c" 1>&6
6098 else
6099   ac_save_LIBS="$LIBS"
6100 LIBS="-lsecurity  $LIBS"
6101 cat > conftest.$ac_ext <<EOF
6102 #line 6103 "configure"
6103 #include "confdefs.h"
6104 /* Override any gcc2 internal prototype to avoid an error.  */
6105 /* We use char because int might match the return type of a gcc2
6106     builtin and then its argument prototype would still apply.  */
6107 char putprpwnam();
6108
6109 int main() {
6110 putprpwnam()
6111 ; return 0; }
6112 EOF
6113 if { (eval echo configure:6114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6114   rm -rf conftest*
6115   eval "ac_cv_lib_$ac_lib_var=yes"
6116 else
6117   echo "configure: failed program was:" >&5
6118   cat conftest.$ac_ext >&5
6119   rm -rf conftest*
6120   eval "ac_cv_lib_$ac_lib_var=no"
6121 fi
6122 rm -f conftest*
6123 LIBS="$ac_save_LIBS"
6124
6125 fi
6126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6127   echo "$ac_t""yes" 1>&6
6128     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6129     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6130   cat >> confdefs.h <<EOF
6131 #define $ac_tr_lib 1
6132 EOF
6133
6134   LIBS="-lsecurity $LIBS"
6135
6136 else
6137   echo "$ac_t""no" 1>&6
6138 fi
6139  
6140      for ac_func in putprpwnam
6141 do
6142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6143 echo "configure:6144: checking for $ac_func" >&5
6144 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6145   echo $ac_n "(cached) $ac_c" 1>&6
6146 else
6147   cat > conftest.$ac_ext <<EOF
6148 #line 6149 "configure"
6149 #include "confdefs.h"
6150 /* System header to define __stub macros and hopefully few prototypes,
6151     which can conflict with char $ac_func(); below.  */
6152 #include <assert.h>
6153 /* Override any gcc2 internal prototype to avoid an error.  */
6154 /* We use char because int might match the return type of a gcc2
6155     builtin and then its argument prototype would still apply.  */
6156 char $ac_func();
6157
6158 int main() {
6159
6160 /* The GNU C library defines this for functions which it implements
6161     to always fail with ENOSYS.  Some functions are actually named
6162     something starting with __ and the normal name is an alias.  */
6163 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6164 choke me
6165 #else
6166 $ac_func();
6167 #endif
6168
6169 ; return 0; }
6170 EOF
6171 if { (eval echo configure:6172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6172   rm -rf conftest*
6173   eval "ac_cv_func_$ac_func=yes"
6174 else
6175   echo "configure: failed program was:" >&5
6176   cat conftest.$ac_ext >&5
6177   rm -rf conftest*
6178   eval "ac_cv_func_$ac_func=no"
6179 fi
6180 rm -f conftest*
6181 fi
6182
6183 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6184   echo "$ac_t""yes" 1>&6
6185     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6186   cat >> confdefs.h <<EOF
6187 #define $ac_tr_func 1
6188 EOF
6189  
6190 else
6191   echo "$ac_t""no" 1>&6
6192 fi
6193 done
6194
6195   ;;
6196   esac
6197
6198 case "$LIBS" in
6199   *-lsec*) for ac_func in putprpwnam
6200 do
6201 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6202 echo "configure:6203: checking for $ac_func" >&5
6203 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6204   echo $ac_n "(cached) $ac_c" 1>&6
6205 else
6206   cat > conftest.$ac_ext <<EOF
6207 #line 6208 "configure"
6208 #include "confdefs.h"
6209 /* System header to define __stub macros and hopefully few prototypes,
6210     which can conflict with char $ac_func(); below.  */
6211 #include <assert.h>
6212 /* Override any gcc2 internal prototype to avoid an error.  */
6213 /* We use char because int might match the return type of a gcc2
6214     builtin and then its argument prototype would still apply.  */
6215 char $ac_func();
6216
6217 int main() {
6218
6219 /* The GNU C library defines this for functions which it implements
6220     to always fail with ENOSYS.  Some functions are actually named
6221     something starting with __ and the normal name is an alias.  */
6222 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6223 choke me
6224 #else
6225 $ac_func();
6226 #endif
6227
6228 ; return 0; }
6229 EOF
6230 if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6231   rm -rf conftest*
6232   eval "ac_cv_func_$ac_func=yes"
6233 else
6234   echo "configure: failed program was:" >&5
6235   cat conftest.$ac_ext >&5
6236   rm -rf conftest*
6237   eval "ac_cv_func_$ac_func=no"
6238 fi
6239 rm -f conftest*
6240 fi
6241
6242 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6243   echo "$ac_t""yes" 1>&6
6244     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6245   cat >> confdefs.h <<EOF
6246 #define $ac_tr_func 1
6247 EOF
6248  
6249 else
6250   echo "$ac_t""no" 1>&6
6251 fi
6252 done
6253  ;;
6254   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6255 echo "configure:6256: checking for putprpwnam in -lsec" >&5
6256 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6257 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6258   echo $ac_n "(cached) $ac_c" 1>&6
6259 else
6260   ac_save_LIBS="$LIBS"
6261 LIBS="-lsec  $LIBS"
6262 cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265 /* Override any gcc2 internal prototype to avoid an error.  */
6266 /* We use char because int might match the return type of a gcc2
6267     builtin and then its argument prototype would still apply.  */
6268 char putprpwnam();
6269
6270 int main() {
6271 putprpwnam()
6272 ; return 0; }
6273 EOF
6274 if { (eval echo configure:6275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6275   rm -rf conftest*
6276   eval "ac_cv_lib_$ac_lib_var=yes"
6277 else
6278   echo "configure: failed program was:" >&5
6279   cat conftest.$ac_ext >&5
6280   rm -rf conftest*
6281   eval "ac_cv_lib_$ac_lib_var=no"
6282 fi
6283 rm -f conftest*
6284 LIBS="$ac_save_LIBS"
6285
6286 fi
6287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6288   echo "$ac_t""yes" 1>&6
6289     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6290     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6291   cat >> confdefs.h <<EOF
6292 #define $ac_tr_lib 1
6293 EOF
6294
6295   LIBS="-lsec $LIBS"
6296
6297 else
6298   echo "$ac_t""no" 1>&6
6299 fi
6300  
6301      for ac_func in putprpwnam
6302 do
6303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6304 echo "configure:6305: checking for $ac_func" >&5
6305 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6306   echo $ac_n "(cached) $ac_c" 1>&6
6307 else
6308   cat > conftest.$ac_ext <<EOF
6309 #line 6310 "configure"
6310 #include "confdefs.h"
6311 /* System header to define __stub macros and hopefully few prototypes,
6312     which can conflict with char $ac_func(); below.  */
6313 #include <assert.h>
6314 /* Override any gcc2 internal prototype to avoid an error.  */
6315 /* We use char because int might match the return type of a gcc2
6316     builtin and then its argument prototype would still apply.  */
6317 char $ac_func();
6318
6319 int main() {
6320
6321 /* The GNU C library defines this for functions which it implements
6322     to always fail with ENOSYS.  Some functions are actually named
6323     something starting with __ and the normal name is an alias.  */
6324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6325 choke me
6326 #else
6327 $ac_func();
6328 #endif
6329
6330 ; return 0; }
6331 EOF
6332 if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6333   rm -rf conftest*
6334   eval "ac_cv_func_$ac_func=yes"
6335 else
6336   echo "configure: failed program was:" >&5
6337   cat conftest.$ac_ext >&5
6338   rm -rf conftest*
6339   eval "ac_cv_func_$ac_func=no"
6340 fi
6341 rm -f conftest*
6342 fi
6343
6344 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6345   echo "$ac_t""yes" 1>&6
6346     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6347   cat >> confdefs.h <<EOF
6348 #define $ac_tr_func 1
6349 EOF
6350  
6351 else
6352   echo "$ac_t""no" 1>&6
6353 fi
6354 done
6355
6356   ;;
6357   esac
6358
6359
6360 case "$LIBS" in
6361   *-lsecurity*) for ac_func in set_auth_parameters
6362 do
6363 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6364 echo "configure:6365: checking for $ac_func" >&5
6365 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6366   echo $ac_n "(cached) $ac_c" 1>&6
6367 else
6368   cat > conftest.$ac_ext <<EOF
6369 #line 6370 "configure"
6370 #include "confdefs.h"
6371 /* System header to define __stub macros and hopefully few prototypes,
6372     which can conflict with char $ac_func(); below.  */
6373 #include <assert.h>
6374 /* Override any gcc2 internal prototype to avoid an error.  */
6375 /* We use char because int might match the return type of a gcc2
6376     builtin and then its argument prototype would still apply.  */
6377 char $ac_func();
6378
6379 int main() {
6380
6381 /* The GNU C library defines this for functions which it implements
6382     to always fail with ENOSYS.  Some functions are actually named
6383     something starting with __ and the normal name is an alias.  */
6384 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6385 choke me
6386 #else
6387 $ac_func();
6388 #endif
6389
6390 ; return 0; }
6391 EOF
6392 if { (eval echo configure:6393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6393   rm -rf conftest*
6394   eval "ac_cv_func_$ac_func=yes"
6395 else
6396   echo "configure: failed program was:" >&5
6397   cat conftest.$ac_ext >&5
6398   rm -rf conftest*
6399   eval "ac_cv_func_$ac_func=no"
6400 fi
6401 rm -f conftest*
6402 fi
6403
6404 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6405   echo "$ac_t""yes" 1>&6
6406     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6407   cat >> confdefs.h <<EOF
6408 #define $ac_tr_func 1
6409 EOF
6410  
6411 else
6412   echo "$ac_t""no" 1>&6
6413 fi
6414 done
6415  ;;
6416   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6417 echo "configure:6418: checking for set_auth_parameters in -lsecurity" >&5
6418 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6419 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6420   echo $ac_n "(cached) $ac_c" 1>&6
6421 else
6422   ac_save_LIBS="$LIBS"
6423 LIBS="-lsecurity  $LIBS"
6424 cat > conftest.$ac_ext <<EOF
6425 #line 6426 "configure"
6426 #include "confdefs.h"
6427 /* Override any gcc2 internal prototype to avoid an error.  */
6428 /* We use char because int might match the return type of a gcc2
6429     builtin and then its argument prototype would still apply.  */
6430 char set_auth_parameters();
6431
6432 int main() {
6433 set_auth_parameters()
6434 ; return 0; }
6435 EOF
6436 if { (eval echo configure:6437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6437   rm -rf conftest*
6438   eval "ac_cv_lib_$ac_lib_var=yes"
6439 else
6440   echo "configure: failed program was:" >&5
6441   cat conftest.$ac_ext >&5
6442   rm -rf conftest*
6443   eval "ac_cv_lib_$ac_lib_var=no"
6444 fi
6445 rm -f conftest*
6446 LIBS="$ac_save_LIBS"
6447
6448 fi
6449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6450   echo "$ac_t""yes" 1>&6
6451     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6452     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6453   cat >> confdefs.h <<EOF
6454 #define $ac_tr_lib 1
6455 EOF
6456
6457   LIBS="-lsecurity $LIBS"
6458
6459 else
6460   echo "$ac_t""no" 1>&6
6461 fi
6462  
6463      for ac_func in set_auth_parameters
6464 do
6465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6466 echo "configure:6467: checking for $ac_func" >&5
6467 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6468   echo $ac_n "(cached) $ac_c" 1>&6
6469 else
6470   cat > conftest.$ac_ext <<EOF
6471 #line 6472 "configure"
6472 #include "confdefs.h"
6473 /* System header to define __stub macros and hopefully few prototypes,
6474     which can conflict with char $ac_func(); below.  */
6475 #include <assert.h>
6476 /* Override any gcc2 internal prototype to avoid an error.  */
6477 /* We use char because int might match the return type of a gcc2
6478     builtin and then its argument prototype would still apply.  */
6479 char $ac_func();
6480
6481 int main() {
6482
6483 /* The GNU C library defines this for functions which it implements
6484     to always fail with ENOSYS.  Some functions are actually named
6485     something starting with __ and the normal name is an alias.  */
6486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6487 choke me
6488 #else
6489 $ac_func();
6490 #endif
6491
6492 ; return 0; }
6493 EOF
6494 if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6495   rm -rf conftest*
6496   eval "ac_cv_func_$ac_func=yes"
6497 else
6498   echo "configure: failed program was:" >&5
6499   cat conftest.$ac_ext >&5
6500   rm -rf conftest*
6501   eval "ac_cv_func_$ac_func=no"
6502 fi
6503 rm -f conftest*
6504 fi
6505
6506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6507   echo "$ac_t""yes" 1>&6
6508     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6509   cat >> confdefs.h <<EOF
6510 #define $ac_tr_func 1
6511 EOF
6512  
6513 else
6514   echo "$ac_t""no" 1>&6
6515 fi
6516 done
6517
6518   ;;
6519   esac
6520
6521 case "$LIBS" in
6522   *-lsec*) for ac_func in set_auth_parameters
6523 do
6524 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6525 echo "configure:6526: checking for $ac_func" >&5
6526 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6527   echo $ac_n "(cached) $ac_c" 1>&6
6528 else
6529   cat > conftest.$ac_ext <<EOF
6530 #line 6531 "configure"
6531 #include "confdefs.h"
6532 /* System header to define __stub macros and hopefully few prototypes,
6533     which can conflict with char $ac_func(); below.  */
6534 #include <assert.h>
6535 /* Override any gcc2 internal prototype to avoid an error.  */
6536 /* We use char because int might match the return type of a gcc2
6537     builtin and then its argument prototype would still apply.  */
6538 char $ac_func();
6539
6540 int main() {
6541
6542 /* The GNU C library defines this for functions which it implements
6543     to always fail with ENOSYS.  Some functions are actually named
6544     something starting with __ and the normal name is an alias.  */
6545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6546 choke me
6547 #else
6548 $ac_func();
6549 #endif
6550
6551 ; return 0; }
6552 EOF
6553 if { (eval echo configure:6554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6554   rm -rf conftest*
6555   eval "ac_cv_func_$ac_func=yes"
6556 else
6557   echo "configure: failed program was:" >&5
6558   cat conftest.$ac_ext >&5
6559   rm -rf conftest*
6560   eval "ac_cv_func_$ac_func=no"
6561 fi
6562 rm -f conftest*
6563 fi
6564
6565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6566   echo "$ac_t""yes" 1>&6
6567     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6568   cat >> confdefs.h <<EOF
6569 #define $ac_tr_func 1
6570 EOF
6571  
6572 else
6573   echo "$ac_t""no" 1>&6
6574 fi
6575 done
6576  ;;
6577   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
6578 echo "configure:6579: checking for set_auth_parameters in -lsec" >&5
6579 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6580 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6581   echo $ac_n "(cached) $ac_c" 1>&6
6582 else
6583   ac_save_LIBS="$LIBS"
6584 LIBS="-lsec  $LIBS"
6585 cat > conftest.$ac_ext <<EOF
6586 #line 6587 "configure"
6587 #include "confdefs.h"
6588 /* Override any gcc2 internal prototype to avoid an error.  */
6589 /* We use char because int might match the return type of a gcc2
6590     builtin and then its argument prototype would still apply.  */
6591 char set_auth_parameters();
6592
6593 int main() {
6594 set_auth_parameters()
6595 ; return 0; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6598   rm -rf conftest*
6599   eval "ac_cv_lib_$ac_lib_var=yes"
6600 else
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   eval "ac_cv_lib_$ac_lib_var=no"
6605 fi
6606 rm -f conftest*
6607 LIBS="$ac_save_LIBS"
6608
6609 fi
6610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6611   echo "$ac_t""yes" 1>&6
6612     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6613     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6614   cat >> confdefs.h <<EOF
6615 #define $ac_tr_lib 1
6616 EOF
6617
6618   LIBS="-lsec $LIBS"
6619
6620 else
6621   echo "$ac_t""no" 1>&6
6622 fi
6623  
6624      for ac_func in set_auth_parameters
6625 do
6626 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6627 echo "configure:6628: checking for $ac_func" >&5
6628 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6629   echo $ac_n "(cached) $ac_c" 1>&6
6630 else
6631   cat > conftest.$ac_ext <<EOF
6632 #line 6633 "configure"
6633 #include "confdefs.h"
6634 /* System header to define __stub macros and hopefully few prototypes,
6635     which can conflict with char $ac_func(); below.  */
6636 #include <assert.h>
6637 /* Override any gcc2 internal prototype to avoid an error.  */
6638 /* We use char because int might match the return type of a gcc2
6639     builtin and then its argument prototype would still apply.  */
6640 char $ac_func();
6641
6642 int main() {
6643
6644 /* The GNU C library defines this for functions which it implements
6645     to always fail with ENOSYS.  Some functions are actually named
6646     something starting with __ and the normal name is an alias.  */
6647 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6648 choke me
6649 #else
6650 $ac_func();
6651 #endif
6652
6653 ; return 0; }
6654 EOF
6655 if { (eval echo configure:6656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6656   rm -rf conftest*
6657   eval "ac_cv_func_$ac_func=yes"
6658 else
6659   echo "configure: failed program was:" >&5
6660   cat conftest.$ac_ext >&5
6661   rm -rf conftest*
6662   eval "ac_cv_func_$ac_func=no"
6663 fi
6664 rm -f conftest*
6665 fi
6666
6667 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6668   echo "$ac_t""yes" 1>&6
6669     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6670   cat >> confdefs.h <<EOF
6671 #define $ac_tr_func 1
6672 EOF
6673  
6674 else
6675   echo "$ac_t""no" 1>&6
6676 fi
6677 done
6678
6679   ;;
6680   esac
6681
6682
6683 # UnixWare 7.x has its getspnam in -lgen
6684 case "$LIBS" in
6685   *-lgen*) for ac_func in getspnam
6686 do
6687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6688 echo "configure:6689: checking for $ac_func" >&5
6689 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6690   echo $ac_n "(cached) $ac_c" 1>&6
6691 else
6692   cat > conftest.$ac_ext <<EOF
6693 #line 6694 "configure"
6694 #include "confdefs.h"
6695 /* System header to define __stub macros and hopefully few prototypes,
6696     which can conflict with char $ac_func(); below.  */
6697 #include <assert.h>
6698 /* Override any gcc2 internal prototype to avoid an error.  */
6699 /* We use char because int might match the return type of a gcc2
6700     builtin and then its argument prototype would still apply.  */
6701 char $ac_func();
6702
6703 int main() {
6704
6705 /* The GNU C library defines this for functions which it implements
6706     to always fail with ENOSYS.  Some functions are actually named
6707     something starting with __ and the normal name is an alias.  */
6708 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6709 choke me
6710 #else
6711 $ac_func();
6712 #endif
6713
6714 ; return 0; }
6715 EOF
6716 if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6717   rm -rf conftest*
6718   eval "ac_cv_func_$ac_func=yes"
6719 else
6720   echo "configure: failed program was:" >&5
6721   cat conftest.$ac_ext >&5
6722   rm -rf conftest*
6723   eval "ac_cv_func_$ac_func=no"
6724 fi
6725 rm -f conftest*
6726 fi
6727
6728 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6729   echo "$ac_t""yes" 1>&6
6730     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6731   cat >> confdefs.h <<EOF
6732 #define $ac_tr_func 1
6733 EOF
6734  
6735 else
6736   echo "$ac_t""no" 1>&6
6737 fi
6738 done
6739  ;;
6740   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
6741 echo "configure:6742: checking for getspnam in -lgen" >&5
6742 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
6743 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6744   echo $ac_n "(cached) $ac_c" 1>&6
6745 else
6746   ac_save_LIBS="$LIBS"
6747 LIBS="-lgen  $LIBS"
6748 cat > conftest.$ac_ext <<EOF
6749 #line 6750 "configure"
6750 #include "confdefs.h"
6751 /* Override any gcc2 internal prototype to avoid an error.  */
6752 /* We use char because int might match the return type of a gcc2
6753     builtin and then its argument prototype would still apply.  */
6754 char getspnam();
6755
6756 int main() {
6757 getspnam()
6758 ; return 0; }
6759 EOF
6760 if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6761   rm -rf conftest*
6762   eval "ac_cv_lib_$ac_lib_var=yes"
6763 else
6764   echo "configure: failed program was:" >&5
6765   cat conftest.$ac_ext >&5
6766   rm -rf conftest*
6767   eval "ac_cv_lib_$ac_lib_var=no"
6768 fi
6769 rm -f conftest*
6770 LIBS="$ac_save_LIBS"
6771
6772 fi
6773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6774   echo "$ac_t""yes" 1>&6
6775     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6776     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6777   cat >> confdefs.h <<EOF
6778 #define $ac_tr_lib 1
6779 EOF
6780
6781   LIBS="-lgen $LIBS"
6782
6783 else
6784   echo "$ac_t""no" 1>&6
6785 fi
6786  
6787      for ac_func in getspnam
6788 do
6789 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6790 echo "configure:6791: checking for $ac_func" >&5
6791 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6792   echo $ac_n "(cached) $ac_c" 1>&6
6793 else
6794   cat > conftest.$ac_ext <<EOF
6795 #line 6796 "configure"
6796 #include "confdefs.h"
6797 /* System header to define __stub macros and hopefully few prototypes,
6798     which can conflict with char $ac_func(); below.  */
6799 #include <assert.h>
6800 /* Override any gcc2 internal prototype to avoid an error.  */
6801 /* We use char because int might match the return type of a gcc2
6802     builtin and then its argument prototype would still apply.  */
6803 char $ac_func();
6804
6805 int main() {
6806
6807 /* The GNU C library defines this for functions which it implements
6808     to always fail with ENOSYS.  Some functions are actually named
6809     something starting with __ and the normal name is an alias.  */
6810 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6811 choke me
6812 #else
6813 $ac_func();
6814 #endif
6815
6816 ; return 0; }
6817 EOF
6818 if { (eval echo configure:6819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6819   rm -rf conftest*
6820   eval "ac_cv_func_$ac_func=yes"
6821 else
6822   echo "configure: failed program was:" >&5
6823   cat conftest.$ac_ext >&5
6824   rm -rf conftest*
6825   eval "ac_cv_func_$ac_func=no"
6826 fi
6827 rm -f conftest*
6828 fi
6829
6830 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6831   echo "$ac_t""yes" 1>&6
6832     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6833   cat >> confdefs.h <<EOF
6834 #define $ac_tr_func 1
6835 EOF
6836  
6837 else
6838   echo "$ac_t""no" 1>&6
6839 fi
6840 done
6841
6842   ;;
6843   esac
6844
6845
6846 case "$LIBS" in
6847   *-lsecurity*) for ac_func in getspnam
6848 do
6849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6850 echo "configure:6851: checking for $ac_func" >&5
6851 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6852   echo $ac_n "(cached) $ac_c" 1>&6
6853 else
6854   cat > conftest.$ac_ext <<EOF
6855 #line 6856 "configure"
6856 #include "confdefs.h"
6857 /* System header to define __stub macros and hopefully few prototypes,
6858     which can conflict with char $ac_func(); below.  */
6859 #include <assert.h>
6860 /* Override any gcc2 internal prototype to avoid an error.  */
6861 /* We use char because int might match the return type of a gcc2
6862     builtin and then its argument prototype would still apply.  */
6863 char $ac_func();
6864
6865 int main() {
6866
6867 /* The GNU C library defines this for functions which it implements
6868     to always fail with ENOSYS.  Some functions are actually named
6869     something starting with __ and the normal name is an alias.  */
6870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6871 choke me
6872 #else
6873 $ac_func();
6874 #endif
6875
6876 ; return 0; }
6877 EOF
6878 if { (eval echo configure:6879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6879   rm -rf conftest*
6880   eval "ac_cv_func_$ac_func=yes"
6881 else
6882   echo "configure: failed program was:" >&5
6883   cat conftest.$ac_ext >&5
6884   rm -rf conftest*
6885   eval "ac_cv_func_$ac_func=no"
6886 fi
6887 rm -f conftest*
6888 fi
6889
6890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6891   echo "$ac_t""yes" 1>&6
6892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6893   cat >> confdefs.h <<EOF
6894 #define $ac_tr_func 1
6895 EOF
6896  
6897 else
6898   echo "$ac_t""no" 1>&6
6899 fi
6900 done
6901  ;;
6902   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
6903 echo "configure:6904: checking for getspnam in -lsecurity" >&5
6904 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
6905 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6906   echo $ac_n "(cached) $ac_c" 1>&6
6907 else
6908   ac_save_LIBS="$LIBS"
6909 LIBS="-lsecurity  $LIBS"
6910 cat > conftest.$ac_ext <<EOF
6911 #line 6912 "configure"
6912 #include "confdefs.h"
6913 /* Override any gcc2 internal prototype to avoid an error.  */
6914 /* We use char because int might match the return type of a gcc2
6915     builtin and then its argument prototype would still apply.  */
6916 char getspnam();
6917
6918 int main() {
6919 getspnam()
6920 ; return 0; }
6921 EOF
6922 if { (eval echo configure:6923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6923   rm -rf conftest*
6924   eval "ac_cv_lib_$ac_lib_var=yes"
6925 else
6926   echo "configure: failed program was:" >&5
6927   cat conftest.$ac_ext >&5
6928   rm -rf conftest*
6929   eval "ac_cv_lib_$ac_lib_var=no"
6930 fi
6931 rm -f conftest*
6932 LIBS="$ac_save_LIBS"
6933
6934 fi
6935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6936   echo "$ac_t""yes" 1>&6
6937     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6938     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6939   cat >> confdefs.h <<EOF
6940 #define $ac_tr_lib 1
6941 EOF
6942
6943   LIBS="-lsecurity $LIBS"
6944
6945 else
6946   echo "$ac_t""no" 1>&6
6947 fi
6948  
6949      for ac_func in getspnam
6950 do
6951 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6952 echo "configure:6953: checking for $ac_func" >&5
6953 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6954   echo $ac_n "(cached) $ac_c" 1>&6
6955 else
6956   cat > conftest.$ac_ext <<EOF
6957 #line 6958 "configure"
6958 #include "confdefs.h"
6959 /* System header to define __stub macros and hopefully few prototypes,
6960     which can conflict with char $ac_func(); below.  */
6961 #include <assert.h>
6962 /* Override any gcc2 internal prototype to avoid an error.  */
6963 /* We use char because int might match the return type of a gcc2
6964     builtin and then its argument prototype would still apply.  */
6965 char $ac_func();
6966
6967 int main() {
6968
6969 /* The GNU C library defines this for functions which it implements
6970     to always fail with ENOSYS.  Some functions are actually named
6971     something starting with __ and the normal name is an alias.  */
6972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6973 choke me
6974 #else
6975 $ac_func();
6976 #endif
6977
6978 ; return 0; }
6979 EOF
6980 if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6981   rm -rf conftest*
6982   eval "ac_cv_func_$ac_func=yes"
6983 else
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986   rm -rf conftest*
6987   eval "ac_cv_func_$ac_func=no"
6988 fi
6989 rm -f conftest*
6990 fi
6991
6992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6993   echo "$ac_t""yes" 1>&6
6994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6995   cat >> confdefs.h <<EOF
6996 #define $ac_tr_func 1
6997 EOF
6998  
6999 else
7000   echo "$ac_t""no" 1>&6
7001 fi
7002 done
7003
7004   ;;
7005   esac
7006
7007 case "$LIBS" in
7008   *-lsec*) for ac_func in getspnam
7009 do
7010 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7011 echo "configure:7012: checking for $ac_func" >&5
7012 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7013   echo $ac_n "(cached) $ac_c" 1>&6
7014 else
7015   cat > conftest.$ac_ext <<EOF
7016 #line 7017 "configure"
7017 #include "confdefs.h"
7018 /* System header to define __stub macros and hopefully few prototypes,
7019     which can conflict with char $ac_func(); below.  */
7020 #include <assert.h>
7021 /* Override any gcc2 internal prototype to avoid an error.  */
7022 /* We use char because int might match the return type of a gcc2
7023     builtin and then its argument prototype would still apply.  */
7024 char $ac_func();
7025
7026 int main() {
7027
7028 /* The GNU C library defines this for functions which it implements
7029     to always fail with ENOSYS.  Some functions are actually named
7030     something starting with __ and the normal name is an alias.  */
7031 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7032 choke me
7033 #else
7034 $ac_func();
7035 #endif
7036
7037 ; return 0; }
7038 EOF
7039 if { (eval echo configure:7040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7040   rm -rf conftest*
7041   eval "ac_cv_func_$ac_func=yes"
7042 else
7043   echo "configure: failed program was:" >&5
7044   cat conftest.$ac_ext >&5
7045   rm -rf conftest*
7046   eval "ac_cv_func_$ac_func=no"
7047 fi
7048 rm -f conftest*
7049 fi
7050
7051 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7052   echo "$ac_t""yes" 1>&6
7053     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7054   cat >> confdefs.h <<EOF
7055 #define $ac_tr_func 1
7056 EOF
7057  
7058 else
7059   echo "$ac_t""no" 1>&6
7060 fi
7061 done
7062  ;;
7063   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7064 echo "configure:7065: checking for getspnam in -lsec" >&5
7065 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7066 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7067   echo $ac_n "(cached) $ac_c" 1>&6
7068 else
7069   ac_save_LIBS="$LIBS"
7070 LIBS="-lsec  $LIBS"
7071 cat > conftest.$ac_ext <<EOF
7072 #line 7073 "configure"
7073 #include "confdefs.h"
7074 /* Override any gcc2 internal prototype to avoid an error.  */
7075 /* We use char because int might match the return type of a gcc2
7076     builtin and then its argument prototype would still apply.  */
7077 char getspnam();
7078
7079 int main() {
7080 getspnam()
7081 ; return 0; }
7082 EOF
7083 if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7084   rm -rf conftest*
7085   eval "ac_cv_lib_$ac_lib_var=yes"
7086 else
7087   echo "configure: failed program was:" >&5
7088   cat conftest.$ac_ext >&5
7089   rm -rf conftest*
7090   eval "ac_cv_lib_$ac_lib_var=no"
7091 fi
7092 rm -f conftest*
7093 LIBS="$ac_save_LIBS"
7094
7095 fi
7096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7097   echo "$ac_t""yes" 1>&6
7098     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7099     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7100   cat >> confdefs.h <<EOF
7101 #define $ac_tr_lib 1
7102 EOF
7103
7104   LIBS="-lsec $LIBS"
7105
7106 else
7107   echo "$ac_t""no" 1>&6
7108 fi
7109  
7110      for ac_func in getspnam
7111 do
7112 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7113 echo "configure:7114: checking for $ac_func" >&5
7114 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7115   echo $ac_n "(cached) $ac_c" 1>&6
7116 else
7117   cat > conftest.$ac_ext <<EOF
7118 #line 7119 "configure"
7119 #include "confdefs.h"
7120 /* System header to define __stub macros and hopefully few prototypes,
7121     which can conflict with char $ac_func(); below.  */
7122 #include <assert.h>
7123 /* Override any gcc2 internal prototype to avoid an error.  */
7124 /* We use char because int might match the return type of a gcc2
7125     builtin and then its argument prototype would still apply.  */
7126 char $ac_func();
7127
7128 int main() {
7129
7130 /* The GNU C library defines this for functions which it implements
7131     to always fail with ENOSYS.  Some functions are actually named
7132     something starting with __ and the normal name is an alias.  */
7133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7134 choke me
7135 #else
7136 $ac_func();
7137 #endif
7138
7139 ; return 0; }
7140 EOF
7141 if { (eval echo configure:7142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7142   rm -rf conftest*
7143   eval "ac_cv_func_$ac_func=yes"
7144 else
7145   echo "configure: failed program was:" >&5
7146   cat conftest.$ac_ext >&5
7147   rm -rf conftest*
7148   eval "ac_cv_func_$ac_func=no"
7149 fi
7150 rm -f conftest*
7151 fi
7152
7153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7154   echo "$ac_t""yes" 1>&6
7155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7156   cat >> confdefs.h <<EOF
7157 #define $ac_tr_func 1
7158 EOF
7159  
7160 else
7161   echo "$ac_t""no" 1>&6
7162 fi
7163 done
7164
7165   ;;
7166   esac
7167
7168
7169 case "$LIBS" in
7170   *-lsecurity*) for ac_func in bigcrypt
7171 do
7172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7173 echo "configure:7174: checking for $ac_func" >&5
7174 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7175   echo $ac_n "(cached) $ac_c" 1>&6
7176 else
7177   cat > conftest.$ac_ext <<EOF
7178 #line 7179 "configure"
7179 #include "confdefs.h"
7180 /* System header to define __stub macros and hopefully few prototypes,
7181     which can conflict with char $ac_func(); below.  */
7182 #include <assert.h>
7183 /* Override any gcc2 internal prototype to avoid an error.  */
7184 /* We use char because int might match the return type of a gcc2
7185     builtin and then its argument prototype would still apply.  */
7186 char $ac_func();
7187
7188 int main() {
7189
7190 /* The GNU C library defines this for functions which it implements
7191     to always fail with ENOSYS.  Some functions are actually named
7192     something starting with __ and the normal name is an alias.  */
7193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7194 choke me
7195 #else
7196 $ac_func();
7197 #endif
7198
7199 ; return 0; }
7200 EOF
7201 if { (eval echo configure:7202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7202   rm -rf conftest*
7203   eval "ac_cv_func_$ac_func=yes"
7204 else
7205   echo "configure: failed program was:" >&5
7206   cat conftest.$ac_ext >&5
7207   rm -rf conftest*
7208   eval "ac_cv_func_$ac_func=no"
7209 fi
7210 rm -f conftest*
7211 fi
7212
7213 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7214   echo "$ac_t""yes" 1>&6
7215     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7216   cat >> confdefs.h <<EOF
7217 #define $ac_tr_func 1
7218 EOF
7219  
7220 else
7221   echo "$ac_t""no" 1>&6
7222 fi
7223 done
7224  ;;
7225   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7226 echo "configure:7227: checking for bigcrypt in -lsecurity" >&5
7227 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7228 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7229   echo $ac_n "(cached) $ac_c" 1>&6
7230 else
7231   ac_save_LIBS="$LIBS"
7232 LIBS="-lsecurity  $LIBS"
7233 cat > conftest.$ac_ext <<EOF
7234 #line 7235 "configure"
7235 #include "confdefs.h"
7236 /* Override any gcc2 internal prototype to avoid an error.  */
7237 /* We use char because int might match the return type of a gcc2
7238     builtin and then its argument prototype would still apply.  */
7239 char bigcrypt();
7240
7241 int main() {
7242 bigcrypt()
7243 ; return 0; }
7244 EOF
7245 if { (eval echo configure:7246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7246   rm -rf conftest*
7247   eval "ac_cv_lib_$ac_lib_var=yes"
7248 else
7249   echo "configure: failed program was:" >&5
7250   cat conftest.$ac_ext >&5
7251   rm -rf conftest*
7252   eval "ac_cv_lib_$ac_lib_var=no"
7253 fi
7254 rm -f conftest*
7255 LIBS="$ac_save_LIBS"
7256
7257 fi
7258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7259   echo "$ac_t""yes" 1>&6
7260     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7261     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7262   cat >> confdefs.h <<EOF
7263 #define $ac_tr_lib 1
7264 EOF
7265
7266   LIBS="-lsecurity $LIBS"
7267
7268 else
7269   echo "$ac_t""no" 1>&6
7270 fi
7271  
7272      for ac_func in bigcrypt
7273 do
7274 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7275 echo "configure:7276: checking for $ac_func" >&5
7276 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7277   echo $ac_n "(cached) $ac_c" 1>&6
7278 else
7279   cat > conftest.$ac_ext <<EOF
7280 #line 7281 "configure"
7281 #include "confdefs.h"
7282 /* System header to define __stub macros and hopefully few prototypes,
7283     which can conflict with char $ac_func(); below.  */
7284 #include <assert.h>
7285 /* Override any gcc2 internal prototype to avoid an error.  */
7286 /* We use char because int might match the return type of a gcc2
7287     builtin and then its argument prototype would still apply.  */
7288 char $ac_func();
7289
7290 int main() {
7291
7292 /* The GNU C library defines this for functions which it implements
7293     to always fail with ENOSYS.  Some functions are actually named
7294     something starting with __ and the normal name is an alias.  */
7295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7296 choke me
7297 #else
7298 $ac_func();
7299 #endif
7300
7301 ; return 0; }
7302 EOF
7303 if { (eval echo configure:7304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7304   rm -rf conftest*
7305   eval "ac_cv_func_$ac_func=yes"
7306 else
7307   echo "configure: failed program was:" >&5
7308   cat conftest.$ac_ext >&5
7309   rm -rf conftest*
7310   eval "ac_cv_func_$ac_func=no"
7311 fi
7312 rm -f conftest*
7313 fi
7314
7315 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7316   echo "$ac_t""yes" 1>&6
7317     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7318   cat >> confdefs.h <<EOF
7319 #define $ac_tr_func 1
7320 EOF
7321  
7322 else
7323   echo "$ac_t""no" 1>&6
7324 fi
7325 done
7326
7327   ;;
7328   esac
7329
7330 case "$LIBS" in
7331   *-lsec*) for ac_func in bigcrypt
7332 do
7333 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7334 echo "configure:7335: checking for $ac_func" >&5
7335 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7336   echo $ac_n "(cached) $ac_c" 1>&6
7337 else
7338   cat > conftest.$ac_ext <<EOF
7339 #line 7340 "configure"
7340 #include "confdefs.h"
7341 /* System header to define __stub macros and hopefully few prototypes,
7342     which can conflict with char $ac_func(); below.  */
7343 #include <assert.h>
7344 /* Override any gcc2 internal prototype to avoid an error.  */
7345 /* We use char because int might match the return type of a gcc2
7346     builtin and then its argument prototype would still apply.  */
7347 char $ac_func();
7348
7349 int main() {
7350
7351 /* The GNU C library defines this for functions which it implements
7352     to always fail with ENOSYS.  Some functions are actually named
7353     something starting with __ and the normal name is an alias.  */
7354 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7355 choke me
7356 #else
7357 $ac_func();
7358 #endif
7359
7360 ; return 0; }
7361 EOF
7362 if { (eval echo configure:7363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7363   rm -rf conftest*
7364   eval "ac_cv_func_$ac_func=yes"
7365 else
7366   echo "configure: failed program was:" >&5
7367   cat conftest.$ac_ext >&5
7368   rm -rf conftest*
7369   eval "ac_cv_func_$ac_func=no"
7370 fi
7371 rm -f conftest*
7372 fi
7373
7374 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7375   echo "$ac_t""yes" 1>&6
7376     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7377   cat >> confdefs.h <<EOF
7378 #define $ac_tr_func 1
7379 EOF
7380  
7381 else
7382   echo "$ac_t""no" 1>&6
7383 fi
7384 done
7385  ;;
7386   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7387 echo "configure:7388: checking for bigcrypt in -lsec" >&5
7388 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7389 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7390   echo $ac_n "(cached) $ac_c" 1>&6
7391 else
7392   ac_save_LIBS="$LIBS"
7393 LIBS="-lsec  $LIBS"
7394 cat > conftest.$ac_ext <<EOF
7395 #line 7396 "configure"
7396 #include "confdefs.h"
7397 /* Override any gcc2 internal prototype to avoid an error.  */
7398 /* We use char because int might match the return type of a gcc2
7399     builtin and then its argument prototype would still apply.  */
7400 char bigcrypt();
7401
7402 int main() {
7403 bigcrypt()
7404 ; return 0; }
7405 EOF
7406 if { (eval echo configure:7407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7407   rm -rf conftest*
7408   eval "ac_cv_lib_$ac_lib_var=yes"
7409 else
7410   echo "configure: failed program was:" >&5
7411   cat conftest.$ac_ext >&5
7412   rm -rf conftest*
7413   eval "ac_cv_lib_$ac_lib_var=no"
7414 fi
7415 rm -f conftest*
7416 LIBS="$ac_save_LIBS"
7417
7418 fi
7419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7420   echo "$ac_t""yes" 1>&6
7421     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7422     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7423   cat >> confdefs.h <<EOF
7424 #define $ac_tr_lib 1
7425 EOF
7426
7427   LIBS="-lsec $LIBS"
7428
7429 else
7430   echo "$ac_t""no" 1>&6
7431 fi
7432  
7433      for ac_func in bigcrypt
7434 do
7435 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7436 echo "configure:7437: checking for $ac_func" >&5
7437 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7438   echo $ac_n "(cached) $ac_c" 1>&6
7439 else
7440   cat > conftest.$ac_ext <<EOF
7441 #line 7442 "configure"
7442 #include "confdefs.h"
7443 /* System header to define __stub macros and hopefully few prototypes,
7444     which can conflict with char $ac_func(); below.  */
7445 #include <assert.h>
7446 /* Override any gcc2 internal prototype to avoid an error.  */
7447 /* We use char because int might match the return type of a gcc2
7448     builtin and then its argument prototype would still apply.  */
7449 char $ac_func();
7450
7451 int main() {
7452
7453 /* The GNU C library defines this for functions which it implements
7454     to always fail with ENOSYS.  Some functions are actually named
7455     something starting with __ and the normal name is an alias.  */
7456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7457 choke me
7458 #else
7459 $ac_func();
7460 #endif
7461
7462 ; return 0; }
7463 EOF
7464 if { (eval echo configure:7465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7465   rm -rf conftest*
7466   eval "ac_cv_func_$ac_func=yes"
7467 else
7468   echo "configure: failed program was:" >&5
7469   cat conftest.$ac_ext >&5
7470   rm -rf conftest*
7471   eval "ac_cv_func_$ac_func=no"
7472 fi
7473 rm -f conftest*
7474 fi
7475
7476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7477   echo "$ac_t""yes" 1>&6
7478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7479   cat >> confdefs.h <<EOF
7480 #define $ac_tr_func 1
7481 EOF
7482  
7483 else
7484   echo "$ac_t""no" 1>&6
7485 fi
7486 done
7487
7488   ;;
7489   esac
7490
7491
7492 case "$LIBS" in
7493   *-lsecurity*) for ac_func in getprpwnam
7494 do
7495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7496 echo "configure:7497: checking for $ac_func" >&5
7497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7498   echo $ac_n "(cached) $ac_c" 1>&6
7499 else
7500   cat > conftest.$ac_ext <<EOF
7501 #line 7502 "configure"
7502 #include "confdefs.h"
7503 /* System header to define __stub macros and hopefully few prototypes,
7504     which can conflict with char $ac_func(); below.  */
7505 #include <assert.h>
7506 /* Override any gcc2 internal prototype to avoid an error.  */
7507 /* We use char because int might match the return type of a gcc2
7508     builtin and then its argument prototype would still apply.  */
7509 char $ac_func();
7510
7511 int main() {
7512
7513 /* The GNU C library defines this for functions which it implements
7514     to always fail with ENOSYS.  Some functions are actually named
7515     something starting with __ and the normal name is an alias.  */
7516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7517 choke me
7518 #else
7519 $ac_func();
7520 #endif
7521
7522 ; return 0; }
7523 EOF
7524 if { (eval echo configure:7525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7525   rm -rf conftest*
7526   eval "ac_cv_func_$ac_func=yes"
7527 else
7528   echo "configure: failed program was:" >&5
7529   cat conftest.$ac_ext >&5
7530   rm -rf conftest*
7531   eval "ac_cv_func_$ac_func=no"
7532 fi
7533 rm -f conftest*
7534 fi
7535
7536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7537   echo "$ac_t""yes" 1>&6
7538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7539   cat >> confdefs.h <<EOF
7540 #define $ac_tr_func 1
7541 EOF
7542  
7543 else
7544   echo "$ac_t""no" 1>&6
7545 fi
7546 done
7547  ;;
7548   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
7549 echo "configure:7550: checking for getprpwnam in -lsecurity" >&5
7550 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
7551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7552   echo $ac_n "(cached) $ac_c" 1>&6
7553 else
7554   ac_save_LIBS="$LIBS"
7555 LIBS="-lsecurity  $LIBS"
7556 cat > conftest.$ac_ext <<EOF
7557 #line 7558 "configure"
7558 #include "confdefs.h"
7559 /* Override any gcc2 internal prototype to avoid an error.  */
7560 /* We use char because int might match the return type of a gcc2
7561     builtin and then its argument prototype would still apply.  */
7562 char getprpwnam();
7563
7564 int main() {
7565 getprpwnam()
7566 ; return 0; }
7567 EOF
7568 if { (eval echo configure:7569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7569   rm -rf conftest*
7570   eval "ac_cv_lib_$ac_lib_var=yes"
7571 else
7572   echo "configure: failed program was:" >&5
7573   cat conftest.$ac_ext >&5
7574   rm -rf conftest*
7575   eval "ac_cv_lib_$ac_lib_var=no"
7576 fi
7577 rm -f conftest*
7578 LIBS="$ac_save_LIBS"
7579
7580 fi
7581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7582   echo "$ac_t""yes" 1>&6
7583     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7584     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7585   cat >> confdefs.h <<EOF
7586 #define $ac_tr_lib 1
7587 EOF
7588
7589   LIBS="-lsecurity $LIBS"
7590
7591 else
7592   echo "$ac_t""no" 1>&6
7593 fi
7594  
7595      for ac_func in getprpwnam
7596 do
7597 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7598 echo "configure:7599: checking for $ac_func" >&5
7599 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7600   echo $ac_n "(cached) $ac_c" 1>&6
7601 else
7602   cat > conftest.$ac_ext <<EOF
7603 #line 7604 "configure"
7604 #include "confdefs.h"
7605 /* System header to define __stub macros and hopefully few prototypes,
7606     which can conflict with char $ac_func(); below.  */
7607 #include <assert.h>
7608 /* Override any gcc2 internal prototype to avoid an error.  */
7609 /* We use char because int might match the return type of a gcc2
7610     builtin and then its argument prototype would still apply.  */
7611 char $ac_func();
7612
7613 int main() {
7614
7615 /* The GNU C library defines this for functions which it implements
7616     to always fail with ENOSYS.  Some functions are actually named
7617     something starting with __ and the normal name is an alias.  */
7618 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7619 choke me
7620 #else
7621 $ac_func();
7622 #endif
7623
7624 ; return 0; }
7625 EOF
7626 if { (eval echo configure:7627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7627   rm -rf conftest*
7628   eval "ac_cv_func_$ac_func=yes"
7629 else
7630   echo "configure: failed program was:" >&5
7631   cat conftest.$ac_ext >&5
7632   rm -rf conftest*
7633   eval "ac_cv_func_$ac_func=no"
7634 fi
7635 rm -f conftest*
7636 fi
7637
7638 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7639   echo "$ac_t""yes" 1>&6
7640     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7641   cat >> confdefs.h <<EOF
7642 #define $ac_tr_func 1
7643 EOF
7644  
7645 else
7646   echo "$ac_t""no" 1>&6
7647 fi
7648 done
7649
7650   ;;
7651   esac
7652
7653 case "$LIBS" in
7654   *-lsec*) for ac_func in getprpwnam
7655 do
7656 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7657 echo "configure:7658: checking for $ac_func" >&5
7658 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7659   echo $ac_n "(cached) $ac_c" 1>&6
7660 else
7661   cat > conftest.$ac_ext <<EOF
7662 #line 7663 "configure"
7663 #include "confdefs.h"
7664 /* System header to define __stub macros and hopefully few prototypes,
7665     which can conflict with char $ac_func(); below.  */
7666 #include <assert.h>
7667 /* Override any gcc2 internal prototype to avoid an error.  */
7668 /* We use char because int might match the return type of a gcc2
7669     builtin and then its argument prototype would still apply.  */
7670 char $ac_func();
7671
7672 int main() {
7673
7674 /* The GNU C library defines this for functions which it implements
7675     to always fail with ENOSYS.  Some functions are actually named
7676     something starting with __ and the normal name is an alias.  */
7677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7678 choke me
7679 #else
7680 $ac_func();
7681 #endif
7682
7683 ; return 0; }
7684 EOF
7685 if { (eval echo configure:7686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7686   rm -rf conftest*
7687   eval "ac_cv_func_$ac_func=yes"
7688 else
7689   echo "configure: failed program was:" >&5
7690   cat conftest.$ac_ext >&5
7691   rm -rf conftest*
7692   eval "ac_cv_func_$ac_func=no"
7693 fi
7694 rm -f conftest*
7695 fi
7696
7697 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7698   echo "$ac_t""yes" 1>&6
7699     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7700   cat >> confdefs.h <<EOF
7701 #define $ac_tr_func 1
7702 EOF
7703  
7704 else
7705   echo "$ac_t""no" 1>&6
7706 fi
7707 done
7708  ;;
7709   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
7710 echo "configure:7711: checking for getprpwnam in -lsec" >&5
7711 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
7712 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7713   echo $ac_n "(cached) $ac_c" 1>&6
7714 else
7715   ac_save_LIBS="$LIBS"
7716 LIBS="-lsec  $LIBS"
7717 cat > conftest.$ac_ext <<EOF
7718 #line 7719 "configure"
7719 #include "confdefs.h"
7720 /* Override any gcc2 internal prototype to avoid an error.  */
7721 /* We use char because int might match the return type of a gcc2
7722     builtin and then its argument prototype would still apply.  */
7723 char getprpwnam();
7724
7725 int main() {
7726 getprpwnam()
7727 ; return 0; }
7728 EOF
7729 if { (eval echo configure:7730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7730   rm -rf conftest*
7731   eval "ac_cv_lib_$ac_lib_var=yes"
7732 else
7733   echo "configure: failed program was:" >&5
7734   cat conftest.$ac_ext >&5
7735   rm -rf conftest*
7736   eval "ac_cv_lib_$ac_lib_var=no"
7737 fi
7738 rm -f conftest*
7739 LIBS="$ac_save_LIBS"
7740
7741 fi
7742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7743   echo "$ac_t""yes" 1>&6
7744     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7745     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7746   cat >> confdefs.h <<EOF
7747 #define $ac_tr_lib 1
7748 EOF
7749
7750   LIBS="-lsec $LIBS"
7751
7752 else
7753   echo "$ac_t""no" 1>&6
7754 fi
7755  
7756      for ac_func in getprpwnam
7757 do
7758 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7759 echo "configure:7760: checking for $ac_func" >&5
7760 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7761   echo $ac_n "(cached) $ac_c" 1>&6
7762 else
7763   cat > conftest.$ac_ext <<EOF
7764 #line 7765 "configure"
7765 #include "confdefs.h"
7766 /* System header to define __stub macros and hopefully few prototypes,
7767     which can conflict with char $ac_func(); below.  */
7768 #include <assert.h>
7769 /* Override any gcc2 internal prototype to avoid an error.  */
7770 /* We use char because int might match the return type of a gcc2
7771     builtin and then its argument prototype would still apply.  */
7772 char $ac_func();
7773
7774 int main() {
7775
7776 /* The GNU C library defines this for functions which it implements
7777     to always fail with ENOSYS.  Some functions are actually named
7778     something starting with __ and the normal name is an alias.  */
7779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7780 choke me
7781 #else
7782 $ac_func();
7783 #endif
7784
7785 ; return 0; }
7786 EOF
7787 if { (eval echo configure:7788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7788   rm -rf conftest*
7789   eval "ac_cv_func_$ac_func=yes"
7790 else
7791   echo "configure: failed program was:" >&5
7792   cat conftest.$ac_ext >&5
7793   rm -rf conftest*
7794   eval "ac_cv_func_$ac_func=no"
7795 fi
7796 rm -f conftest*
7797 fi
7798
7799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7800   echo "$ac_t""yes" 1>&6
7801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7802   cat >> confdefs.h <<EOF
7803 #define $ac_tr_func 1
7804 EOF
7805  
7806 else
7807   echo "$ac_t""no" 1>&6
7808 fi
7809 done
7810
7811   ;;
7812   esac
7813
7814
7815 # this bit needs to be modified for each OS that is suported by
7816 # smbwrapper. You need to specify how to created a shared library and
7817 # how to compile C code to produce PIC object files
7818
7819 # these are the defaults, good for lots of systems
7820 HOST_OS="$host_os"
7821 LDSHFLAGS="-shared"
7822 PICFLAG=""
7823 SHLIBEXT="so"
7824
7825 # and these are for particular systems
7826 case "$host_os" in
7827                 *linux*)   cat >> confdefs.h <<\EOF
7828 #define LINUX 1
7829 EOF
7830 ;;
7831                 *solaris*) cat >> confdefs.h <<\EOF
7832 #define SUNOS5 1
7833 EOF
7834
7835                                         LDSHFLAGS="-G"
7836                 ;;
7837                 *sunos*) cat >> confdefs.h <<\EOF
7838 #define SUNOS4 1
7839 EOF
7840
7841                                         LDSHFLAGS=""
7842                 ;;
7843                 *bsd*) LDSHFLAGS="-shared -Bshareable"
7844                 ;;
7845                 *irix*) cat >> confdefs.h <<\EOF
7846 #define IRIX 1
7847 EOF
7848
7849                         case "$host_os" in
7850                         *irix6*) cat >> confdefs.h <<\EOF
7851 #define IRIX6 1
7852 EOF
7853
7854                         ;;
7855                         esac
7856                         ATTEMPT_WRAP32_BUILD=yes
7857                 ;;
7858                 *aix*) cat >> confdefs.h <<\EOF
7859 #define AIX 1
7860 EOF
7861 ;;
7862                 *hpux*) cat >> confdefs.h <<\EOF
7863 #define HPUX 1
7864 EOF
7865
7866                         SHLIBEXT="sl"
7867                         # Use special PIC flags for the native HP-UX compiler.
7868                         if test $ac_cv_prog_cc_Ae = yes; then
7869                                 LDSHFLAGS="-b"
7870                                 PICFLAG="+z"
7871                         fi
7872                 ;;
7873                 *qnx*) cat >> confdefs.h <<\EOF
7874 #define QNX 1
7875 EOF
7876 ;;
7877                 *osf*) cat >> confdefs.h <<\EOF
7878 #define OSF1 1
7879 EOF
7880 ;;
7881                 *sco*) cat >> confdefs.h <<\EOF
7882 #define SCO 1
7883 EOF
7884 ;;
7885                 *next2*) cat >> confdefs.h <<\EOF
7886 #define NEXT2 1
7887 EOF
7888 ;;
7889                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
7890 set dummy groff; ac_word=$2
7891 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7892 echo "configure:7893: checking for $ac_word" >&5
7893 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
7894   echo $ac_n "(cached) $ac_c" 1>&6
7895 else
7896   if test -n "$ROFF"; then
7897   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
7898 else
7899   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7900   ac_dummy="$PATH"
7901   for ac_dir in $ac_dummy; do
7902     test -z "$ac_dir" && ac_dir=.
7903     if test -f $ac_dir/$ac_word; then
7904       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
7905       break
7906     fi
7907   done
7908   IFS="$ac_save_ifs"
7909 fi
7910 fi
7911 ROFF="$ac_cv_prog_ROFF"
7912 if test -n "$ROFF"; then
7913   echo "$ac_t""$ROFF" 1>&6
7914 else
7915   echo "$ac_t""no" 1>&6
7916 fi
7917 ;;
7918                 *sysv4*)
7919                         case "$host" in
7920                                 *-univel-*)     if  test "$GCC" != yes ; then
7921                                                                         cat >> confdefs.h <<\EOF
7922 #define HAVE_MEMSET 1
7923 EOF
7924
7925                                                                 fi
7926                                                                 LDSHFLAGS="-G"
7927                                 ;;
7928                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
7929 #define RELIANTUNIX 1
7930 EOF
7931 ;;
7932                         esac
7933                         ;;
7934                 *sysv5*)
7935                         if  test "$GCC" != yes ; then
7936                                 cat >> confdefs.h <<\EOF
7937 #define HAVE_MEMSET 1
7938 EOF
7939
7940                         fi
7941                         LDSHFLAGS="-G"
7942                         ;;
7943 esac
7944
7945 # try to work out how to produce pic code with this compiler
7946 echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
7947 echo "configure:7948: checking whether ${CC-cc} accepts -fpic" >&5
7948 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then
7949   echo $ac_n "(cached) $ac_c" 1>&6
7950 else
7951   echo 'void f(){}' > conftest.c
7952 if test -z "`${CC-cc} -fpic -c conftest.c 2>&1`"; then
7953   ac_cv_prog_cc_fpic=yes
7954 else
7955   ac_cv_prog_cc_fpic=no
7956 fi
7957 rm -f conftest*
7958
7959 fi
7960
7961 echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6
7962 if test $ac_cv_prog_cc_fpic = yes; then
7963     PICFLAG="-fpic";
7964 fi
7965 if test x$PICFLAG = x; then
7966   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
7967 echo "configure:7968: checking whether ${CC-cc} accepts -Kpic" >&5
7968 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
7969   echo $ac_n "(cached) $ac_c" 1>&6
7970 else
7971   echo 'void f(){}' > conftest.c
7972 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
7973   ac_cv_prog_cc_Kpic=yes
7974 else
7975   ac_cv_prog_cc_Kpic=no
7976 fi
7977 rm -f conftest*
7978
7979 fi
7980
7981 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
7982   if test $ac_cv_prog_cc_Kpic = yes; then
7983     PICFLAG="-Kpic";
7984   fi
7985 fi
7986 if test x$PICFLAG = x; then
7987   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
7988 echo "configure:7989: checking whether ${CC-cc} accepts -KPIC" >&5
7989 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
7990   echo $ac_n "(cached) $ac_c" 1>&6
7991 else
7992   echo 'void f(){}' > conftest.c
7993 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
7994   ac_cv_prog_cc_KPIC=yes
7995 else
7996   ac_cv_prog_cc_KPIC=no
7997 fi
7998 rm -f conftest*
7999
8000 fi
8001
8002 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
8003   if test $ac_cv_prog_cc_KPIC = yes; then
8004     PICFLAG="-KPIC";
8005   fi
8006 fi
8007
8008 ################
8009
8010 echo $ac_n "checking for long long""... $ac_c" 1>&6
8011 echo "configure:8012: checking for long long" >&5
8012 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8013   echo $ac_n "(cached) $ac_c" 1>&6
8014 else
8015   
8016 if test "$cross_compiling" = yes; then
8017   samba_cv_have_longlong=cross
8018 else
8019   cat > conftest.$ac_ext <<EOF
8020 #line 8021 "configure"
8021 #include "confdefs.h"
8022 #include <stdio.h>
8023 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8024 EOF
8025 if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8026 then
8027   samba_cv_have_longlong=yes
8028 else
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -fr conftest*
8032   samba_cv_have_longlong=no
8033 fi
8034 rm -fr conftest*
8035 fi
8036
8037 fi
8038
8039 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8040 if test x"$samba_cv_have_longlong" = x"yes"; then
8041     cat >> confdefs.h <<\EOF
8042 #define HAVE_LONGLONG 1
8043 EOF
8044
8045 fi
8046
8047 #
8048 # Check if the compiler supports the LL prefix on long long integers.
8049 # AIX needs this.
8050
8051 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8052 echo "configure:8053: checking for LL suffix on long long integers" >&5
8053 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8054   echo $ac_n "(cached) $ac_c" 1>&6
8055 else
8056   
8057     cat > conftest.$ac_ext <<EOF
8058 #line 8059 "configure"
8059 #include "confdefs.h"
8060 #include <stdio.h>
8061 int main() {
8062 long long i = 0x8000000000LL
8063 ; return 0; }
8064 EOF
8065 if { (eval echo configure:8066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8066   rm -rf conftest*
8067   samba_cv_compiler_supports_ll=yes
8068 else
8069   echo "configure: failed program was:" >&5
8070   cat conftest.$ac_ext >&5
8071   rm -rf conftest*
8072   samba_cv_compiler_supports_ll=no
8073 fi
8074 rm -f conftest*
8075 fi
8076
8077 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8078 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8079    cat >> confdefs.h <<\EOF
8080 #define COMPILER_SUPPORTS_LL 1
8081 EOF
8082
8083 fi
8084
8085   
8086 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8087 echo "configure:8088: checking for 64 bit off_t" >&5
8088 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8089   echo $ac_n "(cached) $ac_c" 1>&6
8090 else
8091   
8092 if test "$cross_compiling" = yes; then
8093   samba_cv_SIZEOF_OFF_T=cross
8094 else
8095   cat > conftest.$ac_ext <<EOF
8096 #line 8097 "configure"
8097 #include "confdefs.h"
8098 #include <stdio.h>
8099 #include <sys/stat.h>
8100 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8101 EOF
8102 if { (eval echo configure:8103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8103 then
8104   samba_cv_SIZEOF_OFF_T=yes
8105 else
8106   echo "configure: failed program was:" >&5
8107   cat conftest.$ac_ext >&5
8108   rm -fr conftest*
8109   samba_cv_SIZEOF_OFF_T=no
8110 fi
8111 rm -fr conftest*
8112 fi
8113
8114 fi
8115
8116 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8117 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8118     cat >> confdefs.h <<\EOF
8119 #define SIZEOF_OFF_T 8
8120 EOF
8121
8122 fi
8123
8124 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8125 echo "configure:8126: checking for off64_t" >&5
8126 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8127   echo $ac_n "(cached) $ac_c" 1>&6
8128 else
8129   
8130 if test "$cross_compiling" = yes; then
8131   samba_cv_HAVE_OFF64_T=cross
8132 else
8133   cat > conftest.$ac_ext <<EOF
8134 #line 8135 "configure"
8135 #include "confdefs.h"
8136
8137 #if defined(HAVE_UNISTD_H)
8138 #include <unistd.h>
8139 #endif
8140 #include <stdio.h>
8141 #include <sys/stat.h>
8142 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8143 EOF
8144 if { (eval echo configure:8145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8145 then
8146   samba_cv_HAVE_OFF64_T=yes
8147 else
8148   echo "configure: failed program was:" >&5
8149   cat conftest.$ac_ext >&5
8150   rm -fr conftest*
8151   samba_cv_HAVE_OFF64_T=no
8152 fi
8153 rm -fr conftest*
8154 fi
8155
8156 fi
8157
8158 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8159 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8160     cat >> confdefs.h <<\EOF
8161 #define HAVE_OFF64_T 1
8162 EOF
8163
8164 fi
8165
8166 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8167 echo "configure:8168: checking for 64 bit ino_t" >&5
8168 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8169   echo $ac_n "(cached) $ac_c" 1>&6
8170 else
8171   
8172 if test "$cross_compiling" = yes; then
8173   samba_cv_SIZEOF_INO_T=cross
8174 else
8175   cat > conftest.$ac_ext <<EOF
8176 #line 8177 "configure"
8177 #include "confdefs.h"
8178 #include <stdio.h>
8179 #include <sys/stat.h>
8180 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8181 EOF
8182 if { (eval echo configure:8183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8183 then
8184   samba_cv_SIZEOF_INO_T=yes
8185 else
8186   echo "configure: failed program was:" >&5
8187   cat conftest.$ac_ext >&5
8188   rm -fr conftest*
8189   samba_cv_SIZEOF_INO_T=no
8190 fi
8191 rm -fr conftest*
8192 fi
8193
8194 fi
8195
8196 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8197 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8198     cat >> confdefs.h <<\EOF
8199 #define SIZEOF_INO_T 8
8200 EOF
8201
8202 fi
8203
8204 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8205 echo "configure:8206: checking for ino64_t" >&5
8206 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8207   echo $ac_n "(cached) $ac_c" 1>&6
8208 else
8209   
8210 if test "$cross_compiling" = yes; then
8211   samba_cv_HAVE_INO64_T=cross
8212 else
8213   cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216
8217 #if defined(HAVE_UNISTD_H)
8218 #include <unistd.h>
8219 #endif
8220 #include <stdio.h>
8221 #include <sys/stat.h>
8222 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8223 EOF
8224 if { (eval echo configure:8225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8225 then
8226   samba_cv_HAVE_INO64_T=yes
8227 else
8228   echo "configure: failed program was:" >&5
8229   cat conftest.$ac_ext >&5
8230   rm -fr conftest*
8231   samba_cv_HAVE_INO64_T=no
8232 fi
8233 rm -fr conftest*
8234 fi
8235
8236 fi
8237
8238 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8239 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8240     cat >> confdefs.h <<\EOF
8241 #define HAVE_INO64_T 1
8242 EOF
8243
8244 fi
8245
8246 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8247 echo "configure:8248: checking for struct dirent64" >&5
8248 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8249   echo $ac_n "(cached) $ac_c" 1>&6
8250 else
8251   
8252 cat > conftest.$ac_ext <<EOF
8253 #line 8254 "configure"
8254 #include "confdefs.h"
8255
8256 #if defined(HAVE_UNISTD_H)
8257 #include <unistd.h>
8258 #endif
8259 #include <sys/types.h>
8260 #include <dirent.h>
8261 int main() {
8262 struct dirent64 de;
8263 ; return 0; }
8264 EOF
8265 if { (eval echo configure:8266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8266   rm -rf conftest*
8267   samba_cv_HAVE_STRUCT_DIRENT64=yes
8268 else
8269   echo "configure: failed program was:" >&5
8270   cat conftest.$ac_ext >&5
8271   rm -rf conftest*
8272   samba_cv_HAVE_STRUCT_DIRENT64=no
8273 fi
8274 rm -f conftest*
8275 fi
8276
8277 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8278 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8279     cat >> confdefs.h <<\EOF
8280 #define HAVE_STRUCT_DIRENT64 1
8281 EOF
8282
8283 fi
8284
8285 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8286 echo "configure:8287: checking for unsigned char" >&5
8287 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8288   echo $ac_n "(cached) $ac_c" 1>&6
8289 else
8290   
8291 if test "$cross_compiling" = yes; then
8292   samba_cv_HAVE_UNSIGNED_CHAR=cross
8293 else
8294   cat > conftest.$ac_ext <<EOF
8295 #line 8296 "configure"
8296 #include "confdefs.h"
8297 #include <stdio.h>
8298 main() { char c; c=250; exit((c > 0)?0:1); }
8299 EOF
8300 if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8301 then
8302   samba_cv_HAVE_UNSIGNED_CHAR=yes
8303 else
8304   echo "configure: failed program was:" >&5
8305   cat conftest.$ac_ext >&5
8306   rm -fr conftest*
8307   samba_cv_HAVE_UNSIGNED_CHAR=no
8308 fi
8309 rm -fr conftest*
8310 fi
8311
8312 fi
8313
8314 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8315 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8316     cat >> confdefs.h <<\EOF
8317 #define HAVE_UNSIGNED_CHAR 1
8318 EOF
8319
8320 fi
8321
8322 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8323 echo "configure:8324: checking for sin_len in sock" >&5
8324 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8325   echo $ac_n "(cached) $ac_c" 1>&6
8326 else
8327   
8328 cat > conftest.$ac_ext <<EOF
8329 #line 8330 "configure"
8330 #include "confdefs.h"
8331 #include <sys/types.h>
8332 #include <sys/socket.h>
8333 #include <netinet/in.h>
8334 int main() {
8335 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8336 ; return 0; }
8337 EOF
8338 if { (eval echo configure:8339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8339   rm -rf conftest*
8340   samba_cv_HAVE_SOCK_SIN_LEN=yes
8341 else
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -rf conftest*
8345   samba_cv_HAVE_SOCK_SIN_LEN=no
8346 fi
8347 rm -f conftest*
8348 fi
8349
8350 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8351 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8352     cat >> confdefs.h <<\EOF
8353 #define HAVE_SOCK_SIN_LEN 1
8354 EOF
8355
8356 fi
8357
8358 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8359 echo "configure:8360: checking whether seekdir returns void" >&5
8360 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8361   echo $ac_n "(cached) $ac_c" 1>&6
8362 else
8363   
8364 cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367 #include <sys/types.h>
8368 #include <dirent.h>
8369 void seekdir(DIR *d, long loc) { return; }
8370 int main() {
8371 return 0;
8372 ; return 0; }
8373 EOF
8374 if { (eval echo configure:8375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8375   rm -rf conftest*
8376   samba_cv_SEEKDIR_RETURNS_VOID=yes
8377 else
8378   echo "configure: failed program was:" >&5
8379   cat conftest.$ac_ext >&5
8380   rm -rf conftest*
8381   samba_cv_SEEKDIR_RETURNS_VOID=no
8382 fi
8383 rm -f conftest*
8384 fi
8385
8386 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8387 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8388     cat >> confdefs.h <<\EOF
8389 #define SEEKDIR_RETURNS_VOID 1
8390 EOF
8391
8392 fi
8393
8394 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8395 echo "configure:8396: checking for __FILE__ macro" >&5
8396 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8397   echo $ac_n "(cached) $ac_c" 1>&6
8398 else
8399   
8400 cat > conftest.$ac_ext <<EOF
8401 #line 8402 "configure"
8402 #include "confdefs.h"
8403 #include <stdio.h>
8404 int main() {
8405 printf("%s\n", __FILE__);
8406 ; return 0; }
8407 EOF
8408 if { (eval echo configure:8409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8409   rm -rf conftest*
8410   samba_cv_HAVE_FILE_MACRO=yes
8411 else
8412   echo "configure: failed program was:" >&5
8413   cat conftest.$ac_ext >&5
8414   rm -rf conftest*
8415   samba_cv_HAVE_FILE_MACRO=no
8416 fi
8417 rm -f conftest*
8418 fi
8419
8420 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8421 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8422     cat >> confdefs.h <<\EOF
8423 #define HAVE_FILE_MACRO 1
8424 EOF
8425
8426 fi
8427
8428 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8429 echo "configure:8430: checking for __FUNCTION__ macro" >&5
8430 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8431   echo $ac_n "(cached) $ac_c" 1>&6
8432 else
8433   
8434 cat > conftest.$ac_ext <<EOF
8435 #line 8436 "configure"
8436 #include "confdefs.h"
8437 #include <stdio.h>
8438 int main() {
8439 printf("%s\n", __FUNCTION__);
8440 ; return 0; }
8441 EOF
8442 if { (eval echo configure:8443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8443   rm -rf conftest*
8444   samba_cv_HAVE_FUNCTION_MACRO=yes
8445 else
8446   echo "configure: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   rm -rf conftest*
8449   samba_cv_HAVE_FUNCTION_MACRO=no
8450 fi
8451 rm -f conftest*
8452 fi
8453
8454 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8455 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8456     cat >> confdefs.h <<\EOF
8457 #define HAVE_FUNCTION_MACRO 1
8458 EOF
8459
8460 fi
8461
8462 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8463 echo "configure:8464: checking if gettimeofday takes tz argument" >&5
8464 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8465   echo $ac_n "(cached) $ac_c" 1>&6
8466 else
8467   
8468 if test "$cross_compiling" = yes; then
8469   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8470 else
8471   cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474
8475 #include <sys/time.h>
8476 #include <unistd.h>
8477 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8478 EOF
8479 if { (eval echo configure:8480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8480 then
8481   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8482 else
8483   echo "configure: failed program was:" >&5
8484   cat conftest.$ac_ext >&5
8485   rm -fr conftest*
8486   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8487 fi
8488 rm -fr conftest*
8489 fi
8490
8491 fi
8492
8493 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8494 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8495     cat >> confdefs.h <<\EOF
8496 #define HAVE_GETTIMEOFDAY_TZ 1
8497 EOF
8498
8499 fi
8500
8501
8502 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
8503 echo "configure:8504: checking for broken readdir" >&5
8504 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
8505   echo $ac_n "(cached) $ac_c" 1>&6
8506 else
8507   
8508 if test "$cross_compiling" = yes; then
8509   samba_cv_HAVE_BROKEN_READDIR=cross
8510 else
8511   cat > conftest.$ac_ext <<EOF
8512 #line 8513 "configure"
8513 #include "confdefs.h"
8514 #include <sys/types.h>
8515 #include <dirent.h>
8516 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
8517 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
8518 di->d_name[0] == 0) exit(0); exit(1);} 
8519 EOF
8520 if { (eval echo configure:8521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8521 then
8522   samba_cv_HAVE_BROKEN_READDIR=yes
8523 else
8524   echo "configure: failed program was:" >&5
8525   cat conftest.$ac_ext >&5
8526   rm -fr conftest*
8527   samba_cv_HAVE_BROKEN_READDIR=no
8528 fi
8529 rm -fr conftest*
8530 fi
8531
8532 fi
8533
8534 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
8535 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
8536     cat >> confdefs.h <<\EOF
8537 #define HAVE_BROKEN_READDIR 1
8538 EOF
8539
8540 fi
8541
8542 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
8543 echo "configure:8544: checking for utimbuf" >&5
8544 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
8545   echo $ac_n "(cached) $ac_c" 1>&6
8546 else
8547   
8548 cat > conftest.$ac_ext <<EOF
8549 #line 8550 "configure"
8550 #include "confdefs.h"
8551 #include <sys/types.h>
8552 #include <utime.h>
8553 int main() {
8554 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
8555 ; return 0; }
8556 EOF
8557 if { (eval echo configure:8558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8558   rm -rf conftest*
8559   samba_cv_HAVE_UTIMBUF=yes
8560 else
8561   echo "configure: failed program was:" >&5
8562   cat conftest.$ac_ext >&5
8563   rm -rf conftest*
8564   samba_cv_HAVE_UTIMBUF=no
8565 fi
8566 rm -f conftest*
8567 fi
8568
8569 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
8570 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
8571     cat >> confdefs.h <<\EOF
8572 #define HAVE_UTIMBUF 1
8573 EOF
8574
8575 fi
8576
8577 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
8578 echo "configure:8579: checking for ut_syslen in utmpx" >&5
8579 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
8580   echo $ac_n "(cached) $ac_c" 1>&6
8581 else
8582   
8583 cat > conftest.$ac_ext <<EOF
8584 #line 8585 "configure"
8585 #include "confdefs.h"
8586 #include <utmpx.h>
8587 int main() {
8588 struct utmpx ux;  ux.ut_syslen = 0;
8589 ; return 0; }
8590 EOF
8591 if { (eval echo configure:8592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8592   rm -rf conftest*
8593   samba_cv_HAVE_UX_UT_SYSLEN=yes
8594 else
8595   echo "configure: failed program was:" >&5
8596   cat conftest.$ac_ext >&5
8597   rm -rf conftest*
8598   samba_cv_HAVE_UX_UT_SYSLEN=no
8599 fi
8600 rm -f conftest*
8601 fi
8602
8603 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
8604 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
8605     cat >> confdefs.h <<\EOF
8606 #define HAVE_UX_UT_SYSLEN 1
8607 EOF
8608
8609 fi 
8610
8611 echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6
8612 echo "configure:8613: checking for kernel oplock type definitions" >&5
8613 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS'+set}'`\" = set"; then
8614   echo $ac_n "(cached) $ac_c" 1>&6
8615 else
8616   
8617 cat > conftest.$ac_ext <<EOF
8618 #line 8619 "configure"
8619 #include "confdefs.h"
8620 #include <sys/types.h>
8621 #include <fcntl.h>
8622 int main() {
8623 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
8624 ; return 0; }
8625 EOF
8626 if { (eval echo configure:8627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8627   rm -rf conftest*
8628   samba_cv_HAVE_KERNEL_OPLOCKS=yes
8629 else
8630   echo "configure: failed program was:" >&5
8631   cat conftest.$ac_ext >&5
8632   rm -rf conftest*
8633   samba_cv_HAVE_KERNEL_OPLOCKS=no
8634 fi
8635 rm -f conftest*
8636 fi
8637
8638 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS" 1>&6
8639 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then
8640     cat >> confdefs.h <<\EOF
8641 #define HAVE_KERNEL_OPLOCKS 1
8642 EOF
8643
8644 fi
8645
8646 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
8647 echo "configure:8648: checking for irix specific capabilities" >&5
8648 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
8649   echo $ac_n "(cached) $ac_c" 1>&6
8650 else
8651   
8652 if test "$cross_compiling" = yes; then
8653   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
8654 else
8655   cat > conftest.$ac_ext <<EOF
8656 #line 8657 "configure"
8657 #include "confdefs.h"
8658 #include <sys/types.h>
8659 #include <sys/capability.h>
8660 main() {
8661  cap_t cap;
8662  if ((cap = cap_get_proc()) == NULL)
8663    exit(1);
8664  cap->cap_effective |= CAP_NETWORK_MGT;
8665  cap->cap_inheritable |= CAP_NETWORK_MGT;
8666  cap_set_proc(cap);
8667  exit(0);
8668 }
8669
8670 EOF
8671 if { (eval echo configure:8672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8672 then
8673   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
8674 else
8675   echo "configure: failed program was:" >&5
8676   cat conftest.$ac_ext >&5
8677   rm -fr conftest*
8678   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
8679 fi
8680 rm -fr conftest*
8681 fi
8682
8683 fi
8684
8685 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
8686 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
8687     cat >> confdefs.h <<\EOF
8688 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
8689 EOF
8690
8691 fi
8692
8693 #
8694 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
8695 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
8696 #
8697
8698 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8699 echo "configure:8700: checking for int16 typedef included by rpc/rpc.h" >&5
8700 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
8701   echo $ac_n "(cached) $ac_c" 1>&6
8702 else
8703   
8704 cat > conftest.$ac_ext <<EOF
8705 #line 8706 "configure"
8706 #include "confdefs.h"
8707 #include <sys/types.h>
8708 #if defined(HAVE_RPC_RPC_H)
8709 #include <rpc/rpc.h>
8710 #endif
8711 int main() {
8712 int16 testvar;
8713 ; return 0; }
8714 EOF
8715 if { (eval echo configure:8716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8716   rm -rf conftest*
8717   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
8718 else
8719   echo "configure: failed program was:" >&5
8720   cat conftest.$ac_ext >&5
8721   rm -rf conftest*
8722   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
8723 fi
8724 rm -f conftest*
8725 fi
8726
8727 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
8728 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
8729     cat >> confdefs.h <<\EOF
8730 #define HAVE_INT16_FROM_RPC_RPC_H 1
8731 EOF
8732
8733 fi
8734
8735 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8736 echo "configure:8737: checking for uint16 typedef included by rpc/rpc.h" >&5
8737 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   
8741 cat > conftest.$ac_ext <<EOF
8742 #line 8743 "configure"
8743 #include "confdefs.h"
8744 #include <sys/types.h>
8745 #if defined(HAVE_RPC_RPC_H)
8746 #include <rpc/rpc.h>
8747 #endif
8748 int main() {
8749 uint16 testvar;
8750 ; return 0; }
8751 EOF
8752 if { (eval echo configure:8753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8753   rm -rf conftest*
8754   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
8755 else
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -rf conftest*
8759   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
8760 fi
8761 rm -f conftest*
8762 fi
8763
8764 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
8765 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
8766     cat >> confdefs.h <<\EOF
8767 #define HAVE_UINT16_FROM_RPC_RPC_H 1
8768 EOF
8769
8770 fi
8771
8772 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8773 echo "configure:8774: checking for int32 typedef included by rpc/rpc.h" >&5
8774 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
8775   echo $ac_n "(cached) $ac_c" 1>&6
8776 else
8777   
8778 cat > conftest.$ac_ext <<EOF
8779 #line 8780 "configure"
8780 #include "confdefs.h"
8781 #include <sys/types.h>
8782 #if defined(HAVE_RPC_RPC_H)
8783 #include <rpc/rpc.h>
8784 #endif
8785 int main() {
8786 int32 testvar;
8787 ; return 0; }
8788 EOF
8789 if { (eval echo configure:8790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8790   rm -rf conftest*
8791   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
8792 else
8793   echo "configure: failed program was:" >&5
8794   cat conftest.$ac_ext >&5
8795   rm -rf conftest*
8796   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
8797 fi
8798 rm -f conftest*
8799 fi
8800
8801 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
8802 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
8803     cat >> confdefs.h <<\EOF
8804 #define HAVE_INT32_FROM_RPC_RPC_H 1
8805 EOF
8806
8807 fi
8808
8809 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8810 echo "configure:8811: checking for uint32 typedef included by rpc/rpc.h" >&5
8811 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
8812   echo $ac_n "(cached) $ac_c" 1>&6
8813 else
8814   
8815 cat > conftest.$ac_ext <<EOF
8816 #line 8817 "configure"
8817 #include "confdefs.h"
8818 #include <sys/types.h>
8819 #if defined(HAVE_RPC_RPC_H)
8820 #include <rpc/rpc.h>
8821 #endif
8822 int main() {
8823 uint32 testvar;
8824 ; return 0; }
8825 EOF
8826 if { (eval echo configure:8827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8827   rm -rf conftest*
8828   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
8829 else
8830   echo "configure: failed program was:" >&5
8831   cat conftest.$ac_ext >&5
8832   rm -rf conftest*
8833   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
8834 fi
8835 rm -f conftest*
8836 fi
8837
8838 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
8839 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
8840     cat >> confdefs.h <<\EOF
8841 #define HAVE_UINT32_FROM_RPC_RPC_H 1
8842 EOF
8843
8844 fi
8845
8846
8847 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
8848 echo "configure:8849: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
8849 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
8850   echo $ac_n "(cached) $ac_c" 1>&6
8851 else
8852   
8853 cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 #include <sys/types.h>
8857 #ifdef HAVE_SYS_SECURITY_H
8858 #include <sys/security.h>
8859 #include <prot.h>
8860 #endif  /* HAVE_SYS_SECURITY_H */
8861 #if defined(HAVE_RPC_RPC_H)
8862 #include <rpc/rpc.h>
8863 #endif
8864 int main() {
8865 int testvar;
8866 ; return 0; }
8867 EOF
8868 if { (eval echo configure:8869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8869   rm -rf conftest*
8870   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
8871 else
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -rf conftest*
8875   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
8876 fi
8877 rm -f conftest*
8878 fi
8879
8880 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
8881 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
8882     cat >> confdefs.h <<\EOF
8883 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
8884 EOF
8885
8886 fi
8887
8888 echo $ac_n "checking for test routines""... $ac_c" 1>&6
8889 echo "configure:8890: checking for test routines" >&5
8890 if test "$cross_compiling" = yes; then
8891   echo "configure: warning: cannot run when cross-compiling" 1>&2
8892 else
8893   cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 #include "${srcdir-.}/tests/trivial.c"
8897 EOF
8898 if { (eval echo configure:8899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8899 then
8900   echo "$ac_t""yes" 1>&6
8901 else
8902   echo "configure: failed program was:" >&5
8903   cat conftest.$ac_ext >&5
8904   rm -fr conftest*
8905   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
8906 fi
8907 rm -fr conftest*
8908 fi
8909
8910
8911 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
8912 echo "configure:8913: checking for ftruncate extend" >&5
8913 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
8914   echo $ac_n "(cached) $ac_c" 1>&6
8915 else
8916   
8917 if test "$cross_compiling" = yes; then
8918   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
8919 else
8920   cat > conftest.$ac_ext <<EOF
8921 #line 8922 "configure"
8922 #include "confdefs.h"
8923 #include "${srcdir-.}/tests/ftruncate.c"
8924 EOF
8925 if { (eval echo configure:8926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8926 then
8927   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
8928 else
8929   echo "configure: failed program was:" >&5
8930   cat conftest.$ac_ext >&5
8931   rm -fr conftest*
8932   samba_cv_HAVE_FTRUNCATE_EXTEND=no
8933 fi
8934 rm -fr conftest*
8935 fi
8936
8937 fi
8938
8939 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
8940 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
8941     cat >> confdefs.h <<\EOF
8942 #define HAVE_FTRUNCATE_EXTEND 1
8943 EOF
8944
8945 fi
8946
8947 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
8948 echo "configure:8949: checking for broken getgroups" >&5
8949 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
8950   echo $ac_n "(cached) $ac_c" 1>&6
8951 else
8952   
8953 if test "$cross_compiling" = yes; then
8954   samba_cv_HAVE_BROKEN_GETGROUPS=cross
8955 else
8956   cat > conftest.$ac_ext <<EOF
8957 #line 8958 "configure"
8958 #include "confdefs.h"
8959 #include "${srcdir-.}/tests/getgroups.c"
8960 EOF
8961 if { (eval echo configure:8962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8962 then
8963   samba_cv_HAVE_BROKEN_GETGROUPS=yes
8964 else
8965   echo "configure: failed program was:" >&5
8966   cat conftest.$ac_ext >&5
8967   rm -fr conftest*
8968   samba_cv_HAVE_BROKEN_GETGROUPS=no
8969 fi
8970 rm -fr conftest*
8971 fi
8972
8973 fi
8974
8975 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
8976 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
8977     cat >> confdefs.h <<\EOF
8978 #define HAVE_BROKEN_GETGROUPS 1
8979 EOF
8980
8981 fi
8982
8983 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
8984 echo "configure:8985: checking whether getpass should be replaced" >&5
8985 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
8986   echo $ac_n "(cached) $ac_c" 1>&6
8987 else
8988   
8989 SAVE_CPPFLAGS="$CPPFLAGS"
8990 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
8991 cat > conftest.$ac_ext <<EOF
8992 #line 8993 "configure"
8993 #include "confdefs.h"
8994
8995 #define REPLACE_GETPASS 1
8996 #define NO_CONFIG_H 1
8997 #define main dont_declare_main
8998 #include "${srcdir-.}/lib/getsmbpass.c"
8999 #undef main
9000
9001 int main() {
9002
9003 ; return 0; }
9004 EOF
9005 if { (eval echo configure:9006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9006   rm -rf conftest*
9007   samba_cv_REPLACE_GETPASS=yes
9008 else
9009   echo "configure: failed program was:" >&5
9010   cat conftest.$ac_ext >&5
9011   rm -rf conftest*
9012   samba_cv_REPLACE_GETPASS=no
9013 fi
9014 rm -f conftest*
9015 CPPFLAGS="$SAVE_CPPFLAGS"
9016
9017 fi
9018
9019 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
9020 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
9021         cat >> confdefs.h <<\EOF
9022 #define REPLACE_GETPASS 1
9023 EOF
9024
9025 fi
9026
9027 echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
9028 echo "configure:9029: checking for working fnmatch" >&5
9029 if eval "test \"`echo '$''{'samba_cv_HAVE_FNMATCH'+set}'`\" = set"; then
9030   echo $ac_n "(cached) $ac_c" 1>&6
9031 else
9032   
9033 if test "$cross_compiling" = yes; then
9034   samba_cv_HAVE_FNMATCH=cross
9035 else
9036   cat > conftest.$ac_ext <<EOF
9037 #line 9038 "configure"
9038 #include "confdefs.h"
9039 #include <fnmatch.h>
9040 main() { exit(fnmatch("*.o", "x.o", FNM_PATHNAME) == 0? 0: 1); }
9041 EOF
9042 if { (eval echo configure:9043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9043 then
9044   samba_cv_HAVE_FNMATCH=yes
9045 else
9046   echo "configure: failed program was:" >&5
9047   cat conftest.$ac_ext >&5
9048   rm -fr conftest*
9049   samba_cv_HAVE_FNMATCH=no
9050 fi
9051 rm -fr conftest*
9052 fi
9053
9054 fi
9055
9056 echo "$ac_t""$samba_cv_HAVE_FNMATCH" 1>&6
9057 if test x"$samba_cv_HAVE_FNMATCH" = x"yes"; then
9058     cat >> confdefs.h <<\EOF
9059 #define HAVE_FNMATCH 1
9060 EOF
9061
9062 fi
9063
9064 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
9065 echo "configure:9066: checking for broken inet_ntoa" >&5
9066 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
9067   echo $ac_n "(cached) $ac_c" 1>&6
9068 else
9069   
9070 if test "$cross_compiling" = yes; then
9071   samba_cv_REPLACE_INET_NTOA=cross
9072 else
9073   cat > conftest.$ac_ext <<EOF
9074 #line 9075 "configure"
9075 #include "confdefs.h"
9076
9077 #include <stdio.h>
9078 #include <sys/types.h>
9079 #include <netinet/in.h>
9080 #ifdef HAVE_ARPA_INET_H
9081 #include <arpa/inet.h>
9082 #endif
9083 main() { struct in_addr ip; ip.s_addr = 0x12345678;
9084 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
9085     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
9086 exit(1);}
9087 EOF
9088 if { (eval echo configure:9089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9089 then
9090   samba_cv_REPLACE_INET_NTOA=yes
9091 else
9092   echo "configure: failed program was:" >&5
9093   cat conftest.$ac_ext >&5
9094   rm -fr conftest*
9095   samba_cv_REPLACE_INET_NTOA=no
9096 fi
9097 rm -fr conftest*
9098 fi
9099
9100 fi
9101
9102 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
9103 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
9104     cat >> confdefs.h <<\EOF
9105 #define REPLACE_INET_NTOA 1
9106 EOF
9107
9108 fi
9109
9110 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
9111 echo "configure:9112: checking for sysconf(_SC_NGROUPS_MAX)" >&5
9112 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
9113   echo $ac_n "(cached) $ac_c" 1>&6
9114 else
9115   
9116 if test "$cross_compiling" = yes; then
9117   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
9118 else
9119   cat > conftest.$ac_ext <<EOF
9120 #line 9121 "configure"
9121 #include "confdefs.h"
9122 #include <unistd.h>
9123 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
9124 EOF
9125 if { (eval echo configure:9126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9126 then
9127   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
9128 else
9129   echo "configure: failed program was:" >&5
9130   cat conftest.$ac_ext >&5
9131   rm -fr conftest*
9132   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
9133 fi
9134 rm -fr conftest*
9135 fi
9136
9137 fi
9138
9139 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
9140 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
9141     cat >> confdefs.h <<\EOF
9142 #define SYSCONF_SC_NGROUPS_MAX 1
9143 EOF
9144
9145 fi
9146
9147 echo $ac_n "checking for root""... $ac_c" 1>&6
9148 echo "configure:9149: checking for root" >&5
9149 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
9150   echo $ac_n "(cached) $ac_c" 1>&6
9151 else
9152   
9153 if test "$cross_compiling" = yes; then
9154   samba_cv_HAVE_ROOT=cross
9155 else
9156   cat > conftest.$ac_ext <<EOF
9157 #line 9158 "configure"
9158 #include "confdefs.h"
9159 main() { exit(getuid() != 0); }
9160 EOF
9161 if { (eval echo configure:9162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9162 then
9163   samba_cv_HAVE_ROOT=yes
9164 else
9165   echo "configure: failed program was:" >&5
9166   cat conftest.$ac_ext >&5
9167   rm -fr conftest*
9168   samba_cv_HAVE_ROOT=no
9169 fi
9170 rm -fr conftest*
9171 fi
9172
9173 fi
9174
9175 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
9176 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
9177     cat >> confdefs.h <<\EOF
9178 #define HAVE_ROOT 1
9179 EOF
9180
9181 else
9182     echo "configure: warning: running as non-root will disable some tests" 1>&2
9183 fi
9184
9185 ##################
9186 # look for a method of finding the list of network interfaces
9187 iface=no;
9188 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
9189 echo "configure:9190: checking for iface AIX" >&5
9190 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
9191   echo $ac_n "(cached) $ac_c" 1>&6
9192 else
9193   
9194 if test "$cross_compiling" = yes; then
9195   samba_cv_HAVE_IFACE_AIX=cross
9196 else
9197   cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200
9201 #define HAVE_IFACE_AIX 1
9202 #define AUTOCONF_TEST 1
9203 #include "confdefs.h"
9204 #include "${srcdir-.}/lib/interfaces.c"
9205 EOF
9206 if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9207 then
9208   samba_cv_HAVE_IFACE_AIX=yes
9209 else
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -fr conftest*
9213   samba_cv_HAVE_IFACE_AIX=no
9214 fi
9215 rm -fr conftest*
9216 fi
9217
9218 fi
9219
9220 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
9221 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
9222     iface=yes;cat >> confdefs.h <<\EOF
9223 #define HAVE_IFACE_AIX 1
9224 EOF
9225
9226 fi
9227
9228 if test $iface = no; then
9229 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
9230 echo "configure:9231: checking for iface ifconf" >&5
9231 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
9232   echo $ac_n "(cached) $ac_c" 1>&6
9233 else
9234   
9235 if test "$cross_compiling" = yes; then
9236   samba_cv_HAVE_IFACE_IFCONF=cross
9237 else
9238   cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241
9242 #define HAVE_IFACE_IFCONF 1
9243 #define AUTOCONF_TEST 1
9244 #include "confdefs.h"
9245 #include "${srcdir-.}/lib/interfaces.c"
9246 EOF
9247 if { (eval echo configure:9248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9248 then
9249   samba_cv_HAVE_IFACE_IFCONF=yes
9250 else
9251   echo "configure: failed program was:" >&5
9252   cat conftest.$ac_ext >&5
9253   rm -fr conftest*
9254   samba_cv_HAVE_IFACE_IFCONF=no
9255 fi
9256 rm -fr conftest*
9257 fi
9258
9259 fi
9260
9261 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
9262 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
9263     iface=yes;cat >> confdefs.h <<\EOF
9264 #define HAVE_IFACE_IFCONF 1
9265 EOF
9266
9267 fi
9268 fi
9269
9270 if test $iface = no; then
9271 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
9272 echo "configure:9273: checking for iface ifreq" >&5
9273 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
9274   echo $ac_n "(cached) $ac_c" 1>&6
9275 else
9276   
9277 if test "$cross_compiling" = yes; then
9278   samba_cv_HAVE_IFACE_IFREQ=cross
9279 else
9280   cat > conftest.$ac_ext <<EOF
9281 #line 9282 "configure"
9282 #include "confdefs.h"
9283
9284 #define HAVE_IFACE_IFREQ 1
9285 #define AUTOCONF_TEST 1
9286 #include "confdefs.h"
9287 #include "${srcdir-.}/lib/interfaces.c"
9288 EOF
9289 if { (eval echo configure:9290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9290 then
9291   samba_cv_HAVE_IFACE_IFREQ=yes
9292 else
9293   echo "configure: failed program was:" >&5
9294   cat conftest.$ac_ext >&5
9295   rm -fr conftest*
9296   samba_cv_HAVE_IFACE_IFREQ=no
9297 fi
9298 rm -fr conftest*
9299 fi
9300
9301 fi
9302
9303 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
9304 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
9305     iface=yes;cat >> confdefs.h <<\EOF
9306 #define HAVE_IFACE_IFREQ 1
9307 EOF
9308
9309 fi
9310 fi
9311
9312
9313 ################################################
9314 # look for a method of setting the effective uid
9315 seteuid=no;
9316 if test $seteuid = no; then
9317 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
9318 echo "configure:9319: checking for setresuid" >&5
9319 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
9320   echo $ac_n "(cached) $ac_c" 1>&6
9321 else
9322   
9323 if test "$cross_compiling" = yes; then
9324   samba_cv_USE_SETRESUID=cross
9325 else
9326   cat > conftest.$ac_ext <<EOF
9327 #line 9328 "configure"
9328 #include "confdefs.h"
9329
9330 #define AUTOCONF_TEST 1
9331 #define USE_SETRESUID 1
9332 #include "confdefs.h"
9333 #include "${srcdir-.}/lib/util_sec.c"
9334 EOF
9335 if { (eval echo configure:9336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9336 then
9337   samba_cv_USE_SETRESUID=yes
9338 else
9339   echo "configure: failed program was:" >&5
9340   cat conftest.$ac_ext >&5
9341   rm -fr conftest*
9342   samba_cv_USE_SETRESUID=no
9343 fi
9344 rm -fr conftest*
9345 fi
9346
9347 fi
9348
9349 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
9350 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
9351     seteuid=yes;cat >> confdefs.h <<\EOF
9352 #define USE_SETRESUID 1
9353 EOF
9354
9355 fi
9356 fi
9357
9358
9359 if test $seteuid = no; then
9360 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
9361 echo "configure:9362: checking for setreuid" >&5
9362 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
9363   echo $ac_n "(cached) $ac_c" 1>&6
9364 else
9365   
9366 if test "$cross_compiling" = yes; then
9367   samba_cv_USE_SETREUID=cross
9368 else
9369   cat > conftest.$ac_ext <<EOF
9370 #line 9371 "configure"
9371 #include "confdefs.h"
9372
9373 #define AUTOCONF_TEST 1
9374 #define USE_SETREUID 1
9375 #include "confdefs.h"
9376 #include "${srcdir-.}/lib/util_sec.c"
9377 EOF
9378 if { (eval echo configure:9379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9379 then
9380   samba_cv_USE_SETREUID=yes
9381 else
9382   echo "configure: failed program was:" >&5
9383   cat conftest.$ac_ext >&5
9384   rm -fr conftest*
9385   samba_cv_USE_SETREUID=no
9386 fi
9387 rm -fr conftest*
9388 fi
9389
9390 fi
9391
9392 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
9393 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
9394     seteuid=yes;cat >> confdefs.h <<\EOF
9395 #define USE_SETREUID 1
9396 EOF
9397
9398 fi
9399 fi
9400
9401 if test $seteuid = no; then
9402 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
9403 echo "configure:9404: checking for seteuid" >&5
9404 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
9405   echo $ac_n "(cached) $ac_c" 1>&6
9406 else
9407   
9408 if test "$cross_compiling" = yes; then
9409   samba_cv_USE_SETEUID=cross
9410 else
9411   cat > conftest.$ac_ext <<EOF
9412 #line 9413 "configure"
9413 #include "confdefs.h"
9414
9415 #define AUTOCONF_TEST 1
9416 #define USE_SETEUID 1
9417 #include "confdefs.h"
9418 #include "${srcdir-.}/lib/util_sec.c"
9419 EOF
9420 if { (eval echo configure:9421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9421 then
9422   samba_cv_USE_SETEUID=yes
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426   rm -fr conftest*
9427   samba_cv_USE_SETEUID=no
9428 fi
9429 rm -fr conftest*
9430 fi
9431
9432 fi
9433
9434 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
9435 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
9436     seteuid=yes;cat >> confdefs.h <<\EOF
9437 #define USE_SETEUID 1
9438 EOF
9439
9440 fi
9441 fi
9442
9443 if test $seteuid = no; then
9444 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
9445 echo "configure:9446: checking for setuidx" >&5
9446 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
9447   echo $ac_n "(cached) $ac_c" 1>&6
9448 else
9449   
9450 if test "$cross_compiling" = yes; then
9451   samba_cv_USE_SETUIDX=cross
9452 else
9453   cat > conftest.$ac_ext <<EOF
9454 #line 9455 "configure"
9455 #include "confdefs.h"
9456
9457 #define AUTOCONF_TEST 1
9458 #define USE_SETUIDX 1
9459 #include "confdefs.h"
9460 #include "${srcdir-.}/lib/util_sec.c"
9461 EOF
9462 if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9463 then
9464   samba_cv_USE_SETUIDX=yes
9465 else
9466   echo "configure: failed program was:" >&5
9467   cat conftest.$ac_ext >&5
9468   rm -fr conftest*
9469   samba_cv_USE_SETUIDX=no
9470 fi
9471 rm -fr conftest*
9472 fi
9473
9474 fi
9475
9476 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
9477 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
9478     seteuid=yes;cat >> confdefs.h <<\EOF
9479 #define USE_SETUIDX 1
9480 EOF
9481
9482 fi
9483 fi
9484
9485
9486 echo $ac_n "checking for shared mmap""... $ac_c" 1>&6
9487 echo "configure:9488: checking for shared mmap" >&5
9488 if eval "test \"`echo '$''{'samba_cv_HAVE_SHARED_MMAP'+set}'`\" = set"; then
9489   echo $ac_n "(cached) $ac_c" 1>&6
9490 else
9491   
9492 if test "$cross_compiling" = yes; then
9493   samba_cv_HAVE_SHARED_MMAP=cross
9494 else
9495   cat > conftest.$ac_ext <<EOF
9496 #line 9497 "configure"
9497 #include "confdefs.h"
9498 #include "${srcdir-.}/tests/shared_mmap.c"
9499 EOF
9500 if { (eval echo configure:9501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9501 then
9502   samba_cv_HAVE_SHARED_MMAP=yes
9503 else
9504   echo "configure: failed program was:" >&5
9505   cat conftest.$ac_ext >&5
9506   rm -fr conftest*
9507   samba_cv_HAVE_SHARED_MMAP=no
9508 fi
9509 rm -fr conftest*
9510 fi
9511
9512 fi
9513
9514 echo "$ac_t""$samba_cv_HAVE_SHARED_MMAP" 1>&6
9515 if test x"$samba_cv_HAVE_SHARED_MMAP" = x"yes"; then
9516     cat >> confdefs.h <<\EOF
9517 #define HAVE_SHARED_MMAP 1
9518 EOF
9519
9520     cat >> confdefs.h <<\EOF
9521 #define HAVE_MMAP 1
9522 EOF
9523
9524 fi
9525
9526 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
9527 echo "configure:9528: checking for ftruncate needs root" >&5
9528 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
9529   echo $ac_n "(cached) $ac_c" 1>&6
9530 else
9531   
9532 if test "$cross_compiling" = yes; then
9533   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
9534 else
9535   cat > conftest.$ac_ext <<EOF
9536 #line 9537 "configure"
9537 #include "confdefs.h"
9538 #include "${srcdir-.}/tests/ftruncroot.c"
9539 EOF
9540 if { (eval echo configure:9541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9541 then
9542   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
9543 else
9544   echo "configure: failed program was:" >&5
9545   cat conftest.$ac_ext >&5
9546   rm -fr conftest*
9547   samba_cv_FTRUNCATE_NEEDS_ROOT=no
9548 fi
9549 rm -fr conftest*
9550 fi
9551
9552 fi
9553
9554 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
9555 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
9556     cat >> confdefs.h <<\EOF
9557 #define FTRUNCATE_NEEDS_ROOT 1
9558 EOF
9559
9560 fi
9561
9562 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
9563 echo "configure:9564: checking for fcntl locking" >&5
9564 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
9565   echo $ac_n "(cached) $ac_c" 1>&6
9566 else
9567   
9568 if test "$cross_compiling" = yes; then
9569   samba_cv_HAVE_FCNTL_LOCK=cross
9570 else
9571   cat > conftest.$ac_ext <<EOF
9572 #line 9573 "configure"
9573 #include "confdefs.h"
9574 #include "${srcdir-.}/tests/fcntl_lock.c"
9575 EOF
9576 if { (eval echo configure:9577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9577 then
9578   samba_cv_HAVE_FCNTL_LOCK=yes
9579 else
9580   echo "configure: failed program was:" >&5
9581   cat conftest.$ac_ext >&5
9582   rm -fr conftest*
9583   samba_cv_HAVE_FCNTL_LOCK=no
9584 fi
9585 rm -fr conftest*
9586 fi
9587
9588 fi
9589
9590 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
9591 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
9592     cat >> confdefs.h <<\EOF
9593 #define HAVE_FCNTL_LOCK 1
9594 EOF
9595
9596 fi
9597
9598 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
9599 echo "configure:9600: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
9600 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
9601   echo $ac_n "(cached) $ac_c" 1>&6
9602 else
9603   
9604 if test "$cross_compiling" = yes; then
9605   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
9606 else
9607   cat > conftest.$ac_ext <<EOF
9608 #line 9609 "configure"
9609 #include "confdefs.h"
9610 #include "${srcdir-.}/tests/fcntl_lock64.c"
9611 EOF
9612 if { (eval echo configure:9613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9613 then
9614   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
9615 else
9616   echo "configure: failed program was:" >&5
9617   cat conftest.$ac_ext >&5
9618   rm -fr conftest*
9619   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
9620 fi
9621 rm -fr conftest*
9622 fi
9623
9624 fi
9625
9626 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
9627 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
9628     cat >> confdefs.h <<\EOF
9629 #define HAVE_BROKEN_FCNTL64_LOCKS 1
9630 EOF
9631
9632
9633 else
9634
9635
9636   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
9637 echo "configure:9638: checking for 64 bit fcntl locking" >&5
9638 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
9639   echo $ac_n "(cached) $ac_c" 1>&6
9640 else
9641   
9642   if test "$cross_compiling" = yes; then
9643   samba_cv_HAVE_STRUCT_FLOCK64=cross
9644 else
9645   cat > conftest.$ac_ext <<EOF
9646 #line 9647 "configure"
9647 #include "confdefs.h"
9648
9649 #if defined(HAVE_UNISTD_H)
9650 #include <unistd.h>
9651 #endif
9652 #include <stdio.h>
9653 #include <stdlib.h>
9654
9655 #ifdef HAVE_FCNTL_H
9656 #include <fcntl.h>
9657 #endif
9658
9659 #ifdef HAVE_SYS_FCNTL_H
9660 #include <sys/fcntl.h>
9661 #endif
9662 main() { struct flock64 fl64;
9663 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
9664 exit(0);
9665 #else
9666 exit(1);
9667 #endif
9668 }
9669 EOF
9670 if { (eval echo configure:9671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9671 then
9672   samba_cv_HAVE_STRUCT_FLOCK64=yes
9673 else
9674   echo "configure: failed program was:" >&5
9675   cat conftest.$ac_ext >&5
9676   rm -fr conftest*
9677   samba_cv_HAVE_STRUCT_FLOCK64=no
9678 fi
9679 rm -fr conftest*
9680 fi
9681
9682 fi
9683
9684 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
9685
9686   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
9687       cat >> confdefs.h <<\EOF
9688 #define HAVE_STRUCT_FLOCK64 1
9689 EOF
9690
9691   fi
9692 fi
9693
9694 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
9695 echo "configure:9696: checking for a crypt that needs truncated salt" >&5
9696 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
9697   echo $ac_n "(cached) $ac_c" 1>&6
9698 else
9699   
9700 if test "$cross_compiling" = yes; then
9701   samba_cv_HAVE_TRUNCATED_SALT=cross
9702 else
9703   cat > conftest.$ac_ext <<EOF
9704 #line 9705 "configure"
9705 #include "confdefs.h"
9706 #include "${srcdir-.}/tests/crypttest.c"
9707 EOF
9708 if { (eval echo configure:9709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9709 then
9710   samba_cv_HAVE_TRUNCATED_SALT=no
9711 else
9712   echo "configure: failed program was:" >&5
9713   cat conftest.$ac_ext >&5
9714   rm -fr conftest*
9715   samba_cv_HAVE_TRUNCATED_SALT=yes
9716 fi
9717 rm -fr conftest*
9718 fi
9719
9720 fi
9721
9722 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
9723 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
9724     cat >> confdefs.h <<\EOF
9725 #define HAVE_TRUNCATED_SALT 1
9726 EOF
9727
9728 fi
9729
9730 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
9731 echo "configure:9732: checking for broken nisplus include files" >&5
9732 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
9733   echo $ac_n "(cached) $ac_c" 1>&6
9734 else
9735   
9736 cat > conftest.$ac_ext <<EOF
9737 #line 9738 "configure"
9738 #include "confdefs.h"
9739 #include <sys/acl.h>
9740 #if defined(HAVE_RPCSVC_NIS_H)
9741 #include <rpcsvc/nis.h>
9742 #endif
9743 int main() {
9744 return 0;
9745 ; return 0; }
9746 EOF
9747 if { (eval echo configure:9748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9748   rm -rf conftest*
9749   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
9750 else
9751   echo "configure: failed program was:" >&5
9752   cat conftest.$ac_ext >&5
9753   rm -rf conftest*
9754   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
9755 fi
9756 rm -f conftest*
9757 fi
9758
9759 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
9760 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
9761     cat >> confdefs.h <<\EOF
9762 #define BROKEN_NISPLUS_INCLUDE_FILES 1
9763 EOF
9764
9765 fi
9766
9767
9768 #################################################
9769 # check for smbwrapper support
9770 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
9771 echo "configure:9772: checking whether to use smbwrapper" >&5
9772 # Check whether --with-smbwrapper or --without-smbwrapper was given.
9773 if test "${with_smbwrapper+set}" = set; then
9774   withval="$with_smbwrapper"
9775    case "$withval" in
9776   yes)
9777     echo "$ac_t""yes" 1>&6
9778     cat >> confdefs.h <<\EOF
9779 #define WITH_SMBWRAPPER 1
9780 EOF
9781
9782         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
9783
9784         if test x$ATTEMPT_WRAP32_BUILD = x; then
9785                 WRAP32=""
9786         else
9787                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
9788         fi
9789
9790 # Conditions under which smbwrapper should not be built.
9791
9792         if test x$PICFLAG = x; then
9793            echo No support for PIC code - disabling smbwrapper and smbsh
9794            WRAP=""
9795            WRAP32=""
9796         elif test x$ac_cv_func_syscall = xno; then
9797            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
9798            WRAP=""
9799            WRAP32=""
9800         fi
9801     ;;
9802   *)
9803     echo "$ac_t""no" 1>&6
9804     ;;
9805   esac 
9806 else
9807   echo "$ac_t""no" 1>&6
9808
9809 fi
9810
9811
9812 #################################################
9813 # check for the AFS filesystem
9814 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
9815 echo "configure:9816: checking whether to use AFS" >&5
9816 # Check whether --with-afs or --without-afs was given.
9817 if test "${with_afs+set}" = set; then
9818   withval="$with_afs"
9819    case "$withval" in
9820   yes)
9821     echo "$ac_t""yes" 1>&6
9822     cat >> confdefs.h <<\EOF
9823 #define WITH_AFS 1
9824 EOF
9825
9826     ;;
9827   *)
9828     echo "$ac_t""no" 1>&6
9829     ;;
9830   esac 
9831 else
9832   echo "$ac_t""no" 1>&6
9833
9834 fi
9835
9836
9837
9838 #################################################
9839 # check for the DFS auth system
9840 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
9841 echo "configure:9842: checking whether to use DFS auth" >&5
9842 # Check whether --with-dfs or --without-dfs was given.
9843 if test "${with_dfs+set}" = set; then
9844   withval="$with_dfs"
9845    case "$withval" in
9846   yes)
9847     echo "$ac_t""yes" 1>&6
9848     cat >> confdefs.h <<\EOF
9849 #define WITH_DFS 1
9850 EOF
9851
9852     ;;
9853   *)
9854     echo "$ac_t""no" 1>&6
9855     ;;
9856   esac 
9857 else
9858   echo "$ac_t""no" 1>&6
9859
9860 fi
9861
9862
9863 #################################################
9864 # check for Kerberos IV auth system
9865 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
9866 echo "configure:9867: checking whether to use Kerberos IV" >&5
9867 # Check whether --with-krb4 or --without-krb4 was given.
9868 if test "${with_krb4+set}" = set; then
9869   withval="$with_krb4"
9870      echo "$ac_t""yes" 1>&6
9871     cat >> confdefs.h <<\EOF
9872 #define KRB4_AUTH 1
9873 EOF
9874
9875     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
9876 echo "configure:9877: checking for dn_expand in -lresolv" >&5
9877 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
9878 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9879   echo $ac_n "(cached) $ac_c" 1>&6
9880 else
9881   ac_save_LIBS="$LIBS"
9882 LIBS="-lresolv  $LIBS"
9883 cat > conftest.$ac_ext <<EOF
9884 #line 9885 "configure"
9885 #include "confdefs.h"
9886 /* Override any gcc2 internal prototype to avoid an error.  */
9887 /* We use char because int might match the return type of a gcc2
9888     builtin and then its argument prototype would still apply.  */
9889 char dn_expand();
9890
9891 int main() {
9892 dn_expand()
9893 ; return 0; }
9894 EOF
9895 if { (eval echo configure:9896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9896   rm -rf conftest*
9897   eval "ac_cv_lib_$ac_lib_var=yes"
9898 else
9899   echo "configure: failed program was:" >&5
9900   cat conftest.$ac_ext >&5
9901   rm -rf conftest*
9902   eval "ac_cv_lib_$ac_lib_var=no"
9903 fi
9904 rm -f conftest*
9905 LIBS="$ac_save_LIBS"
9906
9907 fi
9908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9909   echo "$ac_t""yes" 1>&6
9910     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9911     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9912   cat >> confdefs.h <<EOF
9913 #define $ac_tr_lib 1
9914 EOF
9915
9916   LIBS="-lresolv $LIBS"
9917
9918 else
9919   echo "$ac_t""no" 1>&6
9920 fi
9921
9922     LIBS="$LIBS -lkrb -ldes"
9923     CFLAGS="$CFLAGS -I$withval/include"
9924     LDFLAGS="$LDFLAGS -L$withval/lib"
9925 else
9926   echo "$ac_t""no" 1>&6
9927
9928 fi
9929
9930
9931 #################################################
9932 # check for Kerberos 5 auth system
9933 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
9934 echo "configure:9935: checking whether to use Kerberos 5" >&5
9935 # Check whether --with-krb5 or --without-krb5 was given.
9936 if test "${with_krb5+set}" = set; then
9937   withval="$with_krb5"
9938      echo "$ac_t""yes" 1>&6
9939     cat >> confdefs.h <<\EOF
9940 #define KRB5_AUTH 1
9941 EOF
9942
9943     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
9944     CFLAGS="$CFLAGS -I$withval/include"
9945     LDFLAGS="$LDFLAGS -L$withval/lib"
9946 else
9947   echo "$ac_t""no" 1>&6
9948
9949 fi
9950
9951
9952 #################################################
9953 # check for automount support
9954 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
9955 echo "configure:9956: checking whether to use AUTOMOUNT" >&5
9956 # Check whether --with-automount or --without-automount was given.
9957 if test "${with_automount+set}" = set; then
9958   withval="$with_automount"
9959    case "$withval" in
9960   yes)
9961     echo "$ac_t""yes" 1>&6
9962     cat >> confdefs.h <<\EOF
9963 #define WITH_AUTOMOUNT 1
9964 EOF
9965
9966     ;;
9967   *)
9968     echo "$ac_t""no" 1>&6
9969     ;;
9970   esac 
9971 else
9972   echo "$ac_t""no" 1>&6
9973
9974 fi
9975
9976
9977 #################################################
9978 # check for smbmount support
9979 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
9980 echo "configure:9981: checking whether to use SMBMOUNT" >&5
9981 # Check whether --with-smbmount or --without-smbmount was given.
9982 if test "${with_smbmount+set}" = set; then
9983   withval="$with_smbmount"
9984    case "$withval" in
9985   yes)
9986     echo "$ac_t""yes" 1>&6
9987     cat >> confdefs.h <<\EOF
9988 #define WITH_SMBMOUNT 1
9989 EOF
9990
9991     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
9992     ;;
9993   *)
9994     echo "$ac_t""no" 1>&6
9995     MPROGS=
9996     ;;
9997   esac 
9998 else
9999   echo "$ac_t""no" 1>&6
10000   MPROGS=
10001
10002 fi
10003
10004
10005
10006 #################################################
10007 # check for a PAM password database
10008 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
10009 echo "configure:10010: checking whether to use PAM password database" >&5
10010 # Check whether --with-pam or --without-pam was given.
10011 if test "${with_pam+set}" = set; then
10012   withval="$with_pam"
10013    case "$withval" in
10014   yes)
10015     echo "$ac_t""yes" 1>&6
10016     cat >> confdefs.h <<\EOF
10017 #define WITH_PAM 1
10018 EOF
10019
10020     LIBS="$LIBS -lpam"
10021     ;;
10022   *)
10023     echo "$ac_t""no" 1>&6
10024     ;;
10025   esac 
10026 else
10027   echo "$ac_t""no" 1>&6
10028
10029 fi
10030
10031
10032
10033 #################################################
10034 # check for a LDAP password database
10035 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
10036 echo "configure:10037: checking whether to use LDAP password database" >&5
10037 # Check whether --with-ldap or --without-ldap was given.
10038 if test "${with_ldap+set}" = set; then
10039   withval="$with_ldap"
10040    case "$withval" in
10041   yes)
10042     echo "$ac_t""yes" 1>&6
10043     cat >> confdefs.h <<\EOF
10044 #define WITH_LDAP 1
10045 EOF
10046
10047     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
10048     ;;
10049   *)
10050     echo "$ac_t""no" 1>&6
10051     ;;
10052   esac 
10053 else
10054   echo "$ac_t""no" 1>&6
10055
10056 fi
10057
10058
10059 #################################################
10060 # check for a NISPLUS password database
10061 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
10062 echo "configure:10063: checking whether to use NISPLUS password database" >&5
10063 # Check whether --with-nisplus or --without-nisplus was given.
10064 if test "${with_nisplus+set}" = set; then
10065   withval="$with_nisplus"
10066    case "$withval" in
10067   yes)
10068     echo "$ac_t""yes" 1>&6
10069     cat >> confdefs.h <<\EOF
10070 #define WITH_NISPLUS 1
10071 EOF
10072
10073     ;;
10074   *)
10075     echo "$ac_t""no" 1>&6
10076     ;;
10077   esac 
10078 else
10079   echo "$ac_t""no" 1>&6
10080
10081 fi
10082
10083
10084 #################################################
10085 # check for a NISPLUS_HOME support 
10086 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
10087 echo "configure:10088: checking whether to use NISPLUS_HOME" >&5
10088 # Check whether --with-nisplus-home or --without-nisplus-home was given.
10089 if test "${with_nisplus_home+set}" = set; then
10090   withval="$with_nisplus_home"
10091    case "$withval" in
10092   yes)
10093     echo "$ac_t""yes" 1>&6
10094     cat >> confdefs.h <<\EOF
10095 #define WITH_NISPLUS_HOME 1
10096 EOF
10097
10098     ;;
10099   *)
10100     echo "$ac_t""no" 1>&6
10101     ;;
10102   esac 
10103 else
10104   echo "$ac_t""no" 1>&6
10105
10106 fi
10107
10108
10109 #################################################
10110 # check for the secure socket layer
10111 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
10112 echo "configure:10113: checking whether to use SSL" >&5
10113 # Check whether --with-ssl or --without-ssl was given.
10114 if test "${with_ssl+set}" = set; then
10115   withval="$with_ssl"
10116    case "$withval" in
10117   yes)
10118     echo "$ac_t""yes" 1>&6
10119     cat >> confdefs.h <<\EOF
10120 #define WITH_SSL 1
10121 EOF
10122
10123     withval="/usr/local/ssl"     # default
10124
10125     if test "${with_sslinc+set}" = set; then
10126
10127         withval="$with_sslinc"
10128         case "$withval" in
10129         yes|no)
10130           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
10131           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
10132           LIBS="-lssl -lcrypto $LIBS"
10133           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
10134         ;;
10135         * )
10136           CFLAGS="-I${withval}/include $CFLAGS"
10137           LIBS="-lssl -lcrypto $LIBS"
10138           LDFLAGS="-L${withval}/lib $LDFLAGS"
10139         ;;
10140         esac
10141
10142     else
10143
10144         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
10145         LIBS="-lssl -lcrypto $LIBS"
10146         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
10147
10148     fi
10149
10150     if test ! -d ${withval}; then
10151       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
10152       exit 1
10153     fi 
10154
10155     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
10156
10157     ;;
10158   *)
10159     echo "$ac_t""no" 1>&6
10160     ;;
10161   esac 
10162 else
10163   echo "$ac_t""no" 1>&6
10164
10165 fi
10166
10167
10168 #################################################
10169 # check for syslog logging
10170 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
10171 echo "configure:10172: checking whether to use syslog logging" >&5
10172 # Check whether --with-syslog or --without-syslog was given.
10173 if test "${with_syslog+set}" = set; then
10174   withval="$with_syslog"
10175    case "$withval" in
10176   yes)
10177     echo "$ac_t""yes" 1>&6
10178     cat >> confdefs.h <<\EOF
10179 #define WITH_SYSLOG 1
10180 EOF
10181
10182     ;;
10183   *)
10184     echo "$ac_t""no" 1>&6
10185     ;;
10186   esac 
10187 else
10188   echo "$ac_t""no" 1>&6
10189
10190 fi
10191
10192
10193 #################################################
10194 # check for a shared memory profiling support
10195 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
10196 echo "configure:10197: checking whether to use profiling" >&5
10197 # Check whether --with-profile or --without-profile was given.
10198 if test "${with_profile+set}" = set; then
10199   withval="$with_profile"
10200    case "$withval" in
10201   yes)
10202     echo "$ac_t""yes" 1>&6
10203     cat >> confdefs.h <<\EOF
10204 #define WITH_PROFILE 1
10205 EOF
10206
10207     ;;
10208   *)
10209     echo "$ac_t""no" 1>&6
10210     ;;
10211   esac 
10212 else
10213   echo "$ac_t""no" 1>&6
10214
10215 fi
10216
10217
10218
10219 #################################################
10220 # check for experimental netatalk resource fork support
10221 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
10222 echo "configure:10223: checking whether to support netatalk" >&5
10223 # Check whether --with-netatalk or --without-netatalk was given.
10224 if test "${with_netatalk+set}" = set; then
10225   withval="$with_netatalk"
10226    case "$withval" in
10227   yes)
10228     echo "$ac_t""yes" 1>&6
10229     cat >> confdefs.h <<\EOF
10230 #define WITH_NETATALK 1
10231 EOF
10232
10233     ;;
10234   *)
10235     echo "$ac_t""no" 1>&6
10236     ;;
10237   esac 
10238 else
10239   echo "$ac_t""no" 1>&6
10240
10241 fi
10242
10243
10244 #################################################
10245 # check for experimental disk-quotas support
10246 QUOTAOBJS=smbd/noquotas.o
10247
10248 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
10249 echo "configure:10250: checking whether to support disk-quotas" >&5
10250 # Check whether --with-quotas or --without-quotas was given.
10251 if test "${with_quotas+set}" = set; then
10252   withval="$with_quotas"
10253    case "$withval" in
10254   yes)
10255     echo "$ac_t""yes" 1>&6
10256     QUOTAOBJS=smbd/quotas.o
10257     ;;
10258   *)
10259     echo "$ac_t""no" 1>&6
10260     ;;
10261   esac 
10262 else
10263   echo "$ac_t""no" 1>&6
10264
10265 fi
10266
10267
10268
10269 #################################################
10270 # check for experimental utmp accounting
10271
10272 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
10273 echo "configure:10274: checking whether to support utmp accounting" >&5
10274 # Check whether --with-utmp or --without-utmp was given.
10275 if test "${with_utmp+set}" = set; then
10276   withval="$with_utmp"
10277    case "$withval" in
10278   yes)
10279     echo "$ac_t""yes" 1>&6
10280     cat >> confdefs.h <<\EOF
10281 #define WITH_UTMP 1
10282 EOF
10283
10284     ;;
10285   *)
10286     echo "$ac_t""no" 1>&6
10287     ;;
10288   esac 
10289 else
10290   echo "$ac_t""no" 1>&6
10291
10292 fi
10293
10294
10295 #################################################
10296 # check for MS Dfs support
10297
10298 echo $ac_n "checking whether to support MS Dfs""... $ac_c" 1>&6
10299 echo "configure:10300: checking whether to support MS Dfs" >&5
10300 # Check whether --with-msdfs or --without-msdfs was given.
10301 if test "${with_msdfs+set}" = set; then
10302   withval="$with_msdfs"
10303    case "$withval" in
10304   yes)
10305      echo "$ac_t""yes" 1>&6
10306      cat >> confdefs.h <<\EOF
10307 #define MS_DFS 1
10308 EOF
10309
10310      ;;
10311   *)
10312     echo "$ac_t""no" 1>&6
10313     ;;
10314   esac 
10315 else
10316   echo "$ac_t""no" 1>&6
10317
10318 fi
10319
10320
10321 #################################################
10322 # set private directory location
10323 # Check whether --with-privatedir or --without-privatedir was given.
10324 if test "${with_privatedir+set}" = set; then
10325   withval="$with_privatedir"
10326    case "$withval" in
10327   yes|no)
10328   #
10329   # Just in case anybody calls it without argument
10330   #
10331     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
10332     privatedir='${prefix}/private'
10333   ;;
10334   * )
10335     privatedir="$withval"
10336     ;;
10337   esac
10338   
10339 else
10340   privatedir='${prefix}/private'
10341    
10342
10343 fi
10344
10345
10346 #################################################
10347 # set lock directory location
10348 # Check whether --with-lockdir or --without-lockdir was given.
10349 if test "${with_lockdir+set}" = set; then
10350   withval="$with_lockdir"
10351    case "$withval" in
10352   yes|no)
10353   #
10354   # Just in case anybody calls it without argument
10355   #
10356     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
10357     lockdir='$(VARDIR)/locks'
10358   ;;
10359   * )
10360     lockdir="$withval"
10361     ;;
10362   esac
10363   
10364 else
10365   lockdir='$(VARDIR)/locks'
10366    
10367
10368 fi
10369
10370
10371 #################################################
10372 # set SWAT directory location
10373 # Check whether --with-swatdir or --without-swatdir was given.
10374 if test "${with_swatdir+set}" = set; then
10375   withval="$with_swatdir"
10376    case "$withval" in
10377   yes|no)
10378   #
10379   # Just in case anybody does it
10380   #
10381     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
10382     swatdir='${prefix}/swat'
10383   ;;
10384   * )
10385     swatdir="$withval"
10386     ;;
10387   esac
10388   
10389 else
10390   swatdir='${prefix}/swat'
10391    
10392
10393 fi
10394
10395
10396 #################################################
10397 # these tests are taken from the GNU fileutils package
10398 echo "checking how to get filesystem space usage" 1>&6
10399 echo "configure:10400: checking how to get filesystem space usage" >&5
10400 space=no
10401
10402 # Test for statvfs64.
10403 if test $space = no; then
10404   # SVR4
10405   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
10406 echo "configure:10407: checking statvfs64 function (SVR4)" >&5
10407 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
10408   echo $ac_n "(cached) $ac_c" 1>&6
10409 else
10410   if test "$cross_compiling" = yes; then
10411   fu_cv_sys_stat_statvfs64=cross
10412 else
10413   cat > conftest.$ac_ext <<EOF
10414 #line 10415 "configure"
10415 #include "confdefs.h"
10416
10417 #if defined(HAVE_UNISTD_H)
10418 #include <unistd.h>
10419 #endif
10420 #include <sys/types.h>
10421 #include <sys/statvfs.h>
10422   main ()
10423   {
10424     struct statvfs64 fsd;
10425     exit (statvfs64 (".", &fsd));
10426   }
10427 EOF
10428 if { (eval echo configure:10429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10429 then
10430   fu_cv_sys_stat_statvfs64=yes
10431 else
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -fr conftest*
10435   fu_cv_sys_stat_statvfs64=no
10436 fi
10437 rm -fr conftest*
10438 fi
10439
10440 fi
10441
10442 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
10443   if test $fu_cv_sys_stat_statvfs64 = yes; then
10444     space=yes
10445     cat >> confdefs.h <<\EOF
10446 #define STAT_STATVFS64 1
10447 EOF
10448
10449   fi
10450 fi
10451
10452 # Perform only the link test since it seems there are no variants of the
10453 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
10454 # because that got a false positive on SCO OSR5.  Adding the declaration
10455 # of a `struct statvfs' causes this test to fail (as it should) on such
10456 # systems.  That system is reported to work fine with STAT_STATFS4 which
10457 # is what it gets when this test fails.
10458 if test $space = no; then
10459   # SVR4
10460   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
10461 echo "configure:10462: checking statvfs function (SVR4)" >&5
10462 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
10463   echo $ac_n "(cached) $ac_c" 1>&6
10464 else
10465   cat > conftest.$ac_ext <<EOF
10466 #line 10467 "configure"
10467 #include "confdefs.h"
10468 #include <sys/types.h>
10469 #include <sys/statvfs.h>
10470 int main() {
10471 struct statvfs fsd; statvfs (0, &fsd);
10472 ; return 0; }
10473 EOF
10474 if { (eval echo configure:10475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10475   rm -rf conftest*
10476   fu_cv_sys_stat_statvfs=yes
10477 else
10478   echo "configure: failed program was:" >&5
10479   cat conftest.$ac_ext >&5
10480   rm -rf conftest*
10481   fu_cv_sys_stat_statvfs=no
10482 fi
10483 rm -f conftest*
10484 fi
10485
10486 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
10487   if test $fu_cv_sys_stat_statvfs = yes; then
10488     space=yes
10489     cat >> confdefs.h <<\EOF
10490 #define STAT_STATVFS 1
10491 EOF
10492
10493   fi
10494 fi
10495
10496 if test $space = no; then
10497   # DEC Alpha running OSF/1
10498   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
10499 echo "configure:10500: checking for 3-argument statfs function (DEC OSF/1)" >&5
10500   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
10501   echo $ac_n "(cached) $ac_c" 1>&6
10502 else
10503   if test "$cross_compiling" = yes; then
10504   fu_cv_sys_stat_statfs3_osf1=no
10505 else
10506   cat > conftest.$ac_ext <<EOF
10507 #line 10508 "configure"
10508 #include "confdefs.h"
10509
10510 #include <sys/param.h>
10511 #include <sys/types.h>
10512 #include <sys/mount.h>
10513   main ()
10514   {
10515     struct statfs fsd;
10516     fsd.f_fsize = 0;
10517     exit (statfs (".", &fsd, sizeof (struct statfs)));
10518   }
10519 EOF
10520 if { (eval echo configure:10521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10521 then
10522   fu_cv_sys_stat_statfs3_osf1=yes
10523 else
10524   echo "configure: failed program was:" >&5
10525   cat conftest.$ac_ext >&5
10526   rm -fr conftest*
10527   fu_cv_sys_stat_statfs3_osf1=no
10528 fi
10529 rm -fr conftest*
10530 fi
10531
10532 fi
10533
10534   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
10535   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
10536     space=yes
10537     cat >> confdefs.h <<\EOF
10538 #define STAT_STATFS3_OSF1 1
10539 EOF
10540
10541   fi
10542 fi
10543
10544 if test $space = no; then
10545 # AIX
10546   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
10547 echo "configure:10548: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
10548   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
10549   echo $ac_n "(cached) $ac_c" 1>&6
10550 else
10551   if test "$cross_compiling" = yes; then
10552   fu_cv_sys_stat_statfs2_bsize=no
10553 else
10554   cat > conftest.$ac_ext <<EOF
10555 #line 10556 "configure"
10556 #include "confdefs.h"
10557
10558 #ifdef HAVE_SYS_PARAM_H
10559 #include <sys/param.h>
10560 #endif
10561 #ifdef HAVE_SYS_MOUNT_H
10562 #include <sys/mount.h>
10563 #endif
10564 #ifdef HAVE_SYS_VFS_H
10565 #include <sys/vfs.h>
10566 #endif
10567   main ()
10568   {
10569   struct statfs fsd;
10570   fsd.f_bsize = 0;
10571   exit (statfs (".", &fsd));
10572   }
10573 EOF
10574 if { (eval echo configure:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10575 then
10576   fu_cv_sys_stat_statfs2_bsize=yes
10577 else
10578   echo "configure: failed program was:" >&5
10579   cat conftest.$ac_ext >&5
10580   rm -fr conftest*
10581   fu_cv_sys_stat_statfs2_bsize=no
10582 fi
10583 rm -fr conftest*
10584 fi
10585
10586 fi
10587
10588   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
10589   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
10590     space=yes
10591     cat >> confdefs.h <<\EOF
10592 #define STAT_STATFS2_BSIZE 1
10593 EOF
10594
10595   fi
10596 fi
10597
10598 if test $space = no; then
10599 # SVR3
10600   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
10601 echo "configure:10602: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
10602   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
10603   echo $ac_n "(cached) $ac_c" 1>&6
10604 else
10605   if test "$cross_compiling" = yes; then
10606   fu_cv_sys_stat_statfs4=no
10607 else
10608   cat > conftest.$ac_ext <<EOF
10609 #line 10610 "configure"
10610 #include "confdefs.h"
10611 #include <sys/types.h>
10612 #include <sys/statfs.h>
10613   main ()
10614   {
10615   struct statfs fsd;
10616   exit (statfs (".", &fsd, sizeof fsd, 0));
10617   }
10618 EOF
10619 if { (eval echo configure:10620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10620 then
10621   fu_cv_sys_stat_statfs4=yes
10622 else
10623   echo "configure: failed program was:" >&5
10624   cat conftest.$ac_ext >&5
10625   rm -fr conftest*
10626   fu_cv_sys_stat_statfs4=no
10627 fi
10628 rm -fr conftest*
10629 fi
10630
10631 fi
10632
10633   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
10634   if test $fu_cv_sys_stat_statfs4 = yes; then
10635     space=yes
10636     cat >> confdefs.h <<\EOF
10637 #define STAT_STATFS4 1
10638 EOF
10639
10640   fi
10641 fi
10642
10643 if test $space = no; then
10644 # 4.4BSD and NetBSD
10645   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
10646 echo "configure:10647: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
10647   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
10648   echo $ac_n "(cached) $ac_c" 1>&6
10649 else
10650   if test "$cross_compiling" = yes; then
10651   fu_cv_sys_stat_statfs2_fsize=no
10652 else
10653   cat > conftest.$ac_ext <<EOF
10654 #line 10655 "configure"
10655 #include "confdefs.h"
10656 #include <sys/types.h>
10657 #ifdef HAVE_SYS_PARAM_H
10658 #include <sys/param.h>
10659 #endif
10660 #ifdef HAVE_SYS_MOUNT_H
10661 #include <sys/mount.h>
10662 #endif
10663   main ()
10664   {
10665   struct statfs fsd;
10666   fsd.f_fsize = 0;
10667   exit (statfs (".", &fsd));
10668   }
10669 EOF
10670 if { (eval echo configure:10671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10671 then
10672   fu_cv_sys_stat_statfs2_fsize=yes
10673 else
10674   echo "configure: failed program was:" >&5
10675   cat conftest.$ac_ext >&5
10676   rm -fr conftest*
10677   fu_cv_sys_stat_statfs2_fsize=no
10678 fi
10679 rm -fr conftest*
10680 fi
10681
10682 fi
10683
10684   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
10685   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
10686     space=yes
10687     cat >> confdefs.h <<\EOF
10688 #define STAT_STATFS2_FSIZE 1
10689 EOF
10690
10691   fi
10692 fi
10693
10694 if test $space = no; then
10695   # Ultrix
10696   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
10697 echo "configure:10698: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
10698   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
10699   echo $ac_n "(cached) $ac_c" 1>&6
10700 else
10701   if test "$cross_compiling" = yes; then
10702   fu_cv_sys_stat_fs_data=no
10703 else
10704   cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707 #include <sys/types.h>
10708 #ifdef HAVE_SYS_PARAM_H
10709 #include <sys/param.h>
10710 #endif
10711 #ifdef HAVE_SYS_MOUNT_H
10712 #include <sys/mount.h>
10713 #endif
10714 #ifdef HAVE_SYS_FS_TYPES_H
10715 #include <sys/fs_types.h>
10716 #endif
10717   main ()
10718   {
10719   struct fs_data fsd;
10720   /* Ultrix's statfs returns 1 for success,
10721      0 for not mounted, -1 for failure.  */
10722   exit (statfs (".", &fsd) != 1);
10723   }
10724 EOF
10725 if { (eval echo configure:10726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10726 then
10727   fu_cv_sys_stat_fs_data=yes
10728 else
10729   echo "configure: failed program was:" >&5
10730   cat conftest.$ac_ext >&5
10731   rm -fr conftest*
10732   fu_cv_sys_stat_fs_data=no
10733 fi
10734 rm -fr conftest*
10735 fi
10736
10737 fi
10738
10739   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
10740   if test $fu_cv_sys_stat_fs_data = yes; then
10741     space=yes
10742     cat >> confdefs.h <<\EOF
10743 #define STAT_STATFS2_FS_DATA 1
10744 EOF
10745
10746   fi
10747 fi
10748
10749 #
10750 # As a gating factor for large file support, in order to
10751 # use <4GB files we must have the following minimal support
10752 # available.
10753 # long long, and a 64 bit off_t or off64_t.
10754 # If we don't have all of these then disable large
10755 # file support.
10756 #
10757 echo "checking if large file support can be enabled"
10758 cat > conftest.$ac_ext <<EOF
10759 #line 10760 "configure"
10760 #include "confdefs.h"
10761
10762 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
10763 #include <sys/types.h>
10764 #else
10765 __COMPILE_ERROR_
10766 #endif
10767
10768 int main() {
10769 int i
10770 ; return 0; }
10771 EOF
10772 if { (eval echo configure:10773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10773   rm -rf conftest*
10774   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
10775 else
10776   echo "configure: failed program was:" >&5
10777   cat conftest.$ac_ext >&5
10778   rm -rf conftest*
10779   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
10780 fi
10781 rm -f conftest*
10782 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
10783     echo "yes"
10784     cat >> confdefs.h <<\EOF
10785 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
10786 EOF
10787
10788 else
10789     echo "no"
10790 fi
10791
10792 echo "checking configure summary"
10793 if test "$cross_compiling" = yes; then
10794   :
10795 else
10796   cat > conftest.$ac_ext <<EOF
10797 #line 10798 "configure"
10798 #include "confdefs.h"
10799 #include "${srcdir-.}/tests/summary.c"
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10802 then
10803   echo "configure OK";
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -fr conftest*
10808   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
10809 fi
10810 rm -fr conftest*
10811 fi
10812
10813
10814 builddir=`pwd`
10815
10816
10817 trap '' 1 2 15
10818 cat > confcache <<\EOF
10819 # This file is a shell script that caches the results of configure
10820 # tests run on this system so they can be shared between configure
10821 # scripts and configure runs.  It is not useful on other systems.
10822 # If it contains results you don't want to keep, you may remove or edit it.
10823 #
10824 # By default, configure uses ./config.cache as the cache file,
10825 # creating it if it does not exist already.  You can give configure
10826 # the --cache-file=FILE option to use a different cache file; that is
10827 # what configure does when it calls configure scripts in
10828 # subdirectories, so they share the cache.
10829 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10830 # config.status only pays attention to the cache file if you give it the
10831 # --recheck option to rerun configure.
10832 #
10833 EOF
10834 # The following way of writing the cache mishandles newlines in values,
10835 # but we know of no workaround that is simple, portable, and efficient.
10836 # So, don't put newlines in cache variables' values.
10837 # Ultrix sh set writes to stderr and can't be redirected directly,
10838 # and sets the high bit in the cache file unless we assign to the vars.
10839 (set) 2>&1 |
10840   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10841   *ac_space=\ *)
10842     # `set' does not quote correctly, so add quotes (double-quote substitution
10843     # turns \\\\ into \\, and sed turns \\ into \).
10844     sed -n \
10845       -e "s/'/'\\\\''/g" \
10846       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10847     ;;
10848   *)
10849     # `set' quotes correctly as required by POSIX, so do not add quotes.
10850     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10851     ;;
10852   esac >> confcache
10853 if cmp -s $cache_file confcache; then
10854   :
10855 else
10856   if test -w $cache_file; then
10857     echo "updating cache $cache_file"
10858     cat confcache > $cache_file
10859   else
10860     echo "not updating unwritable cache $cache_file"
10861   fi
10862 fi
10863 rm -f confcache
10864
10865 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10866
10867 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10868 # Let make expand exec_prefix.
10869 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10870
10871 # Any assignment to VPATH causes Sun make to only execute
10872 # the first set of double-colon rules, so remove it if not needed.
10873 # If there is a colon in the path, we need to keep it.
10874 if test "x$srcdir" = x.; then
10875   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10876 fi
10877
10878 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10879
10880 DEFS=-DHAVE_CONFIG_H
10881
10882 # Without the "./", some shells look in PATH for config.status.
10883 : ${CONFIG_STATUS=./config.status}
10884
10885 echo creating $CONFIG_STATUS
10886 rm -f $CONFIG_STATUS
10887 cat > $CONFIG_STATUS <<EOF
10888 #! /bin/sh
10889 # Generated automatically by configure.
10890 # Run this file to recreate the current configuration.
10891 # This directory was configured as follows,
10892 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10893 #
10894 # $0 $ac_configure_args
10895 #
10896 # Compiler output produced by configure, useful for debugging
10897 # configure, is in ./config.log if it exists.
10898
10899 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10900 for ac_option
10901 do
10902   case "\$ac_option" in
10903   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10904     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10905     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10906   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10907     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10908     exit 0 ;;
10909   -help | --help | --hel | --he | --h)
10910     echo "\$ac_cs_usage"; exit 0 ;;
10911   *) echo "\$ac_cs_usage"; exit 1 ;;
10912   esac
10913 done
10914
10915 ac_given_srcdir=$srcdir
10916 ac_given_INSTALL="$INSTALL"
10917
10918 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10919 EOF
10920 cat >> $CONFIG_STATUS <<EOF
10921
10922 # Protect against being on the right side of a sed subst in config.status.
10923 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10924  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10925 $ac_vpsub
10926 $extrasub
10927 s%@SHELL@%$SHELL%g
10928 s%@CFLAGS@%$CFLAGS%g
10929 s%@CPPFLAGS@%$CPPFLAGS%g
10930 s%@CXXFLAGS@%$CXXFLAGS%g
10931 s%@FFLAGS@%$FFLAGS%g
10932 s%@DEFS@%$DEFS%g
10933 s%@LDFLAGS@%$LDFLAGS%g
10934 s%@LIBS@%$LIBS%g
10935 s%@exec_prefix@%$exec_prefix%g
10936 s%@prefix@%$prefix%g
10937 s%@program_transform_name@%$program_transform_name%g
10938 s%@bindir@%$bindir%g
10939 s%@sbindir@%$sbindir%g
10940 s%@libexecdir@%$libexecdir%g
10941 s%@datadir@%$datadir%g
10942 s%@sysconfdir@%$sysconfdir%g
10943 s%@sharedstatedir@%$sharedstatedir%g
10944 s%@localstatedir@%$localstatedir%g
10945 s%@libdir@%$libdir%g
10946 s%@includedir@%$includedir%g
10947 s%@oldincludedir@%$oldincludedir%g
10948 s%@infodir@%$infodir%g
10949 s%@mandir@%$mandir%g
10950 s%@RUNPROG@%$RUNPROG%g
10951 s%@MPROGS@%$MPROGS%g
10952 s%@LDSHFLAGS@%$LDSHFLAGS%g
10953 s%@HOST_OS@%$HOST_OS%g
10954 s%@WRAP@%$WRAP%g
10955 s%@WRAP32@%$WRAP32%g
10956 s%@PICFLAG@%$PICFLAG%g
10957 s%@SHLIBEXT@%$SHLIBEXT%g
10958 s%@CC@%$CC%g
10959 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10960 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10961 s%@INSTALL_DATA@%$INSTALL_DATA%g
10962 s%@AWK@%$AWK%g
10963 s%@host@%$host%g
10964 s%@host_alias@%$host_alias%g
10965 s%@host_cpu@%$host_cpu%g
10966 s%@host_vendor@%$host_vendor%g
10967 s%@host_os@%$host_os%g
10968 s%@build@%$build%g
10969 s%@build_alias@%$build_alias%g
10970 s%@build_cpu@%$build_cpu%g
10971 s%@build_vendor@%$build_vendor%g
10972 s%@build_os@%$build_os%g
10973 s%@RANLIB@%$RANLIB%g
10974 s%@LN_S@%$LN_S%g
10975 s%@LIBTOOL@%$LIBTOOL%g
10976 s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%g
10977 s%@BROKEN_CC@%$BROKEN_CC%g
10978 s%@target@%$target%g
10979 s%@target_alias@%$target_alias%g
10980 s%@target_cpu@%$target_cpu%g
10981 s%@target_vendor@%$target_vendor%g
10982 s%@target_os@%$target_os%g
10983 s%@MAINT@%$MAINT%g
10984 s%@AUTOCONF@%$AUTOCONF%g
10985 s%@AUTOHEADER@%$AUTOHEADER%g
10986 s%@CPP@%$CPP%g
10987 s%@LIBOBJS@%$LIBOBJS%g
10988 s%@ROFF@%$ROFF%g
10989 s%@QUOTAOBJS@%$QUOTAOBJS%g
10990 s%@privatedir@%$privatedir%g
10991 s%@lockdir@%$lockdir%g
10992 s%@swatdir@%$swatdir%g
10993 s%@builddir@%$builddir%g
10994
10995 CEOF
10996 EOF
10997
10998 cat >> $CONFIG_STATUS <<\EOF
10999
11000 # Split the substitutions into bite-sized pieces for seds with
11001 # small command number limits, like on Digital OSF/1 and HP-UX.
11002 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11003 ac_file=1 # Number of current file.
11004 ac_beg=1 # First line for current file.
11005 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11006 ac_more_lines=:
11007 ac_sed_cmds=""
11008 while $ac_more_lines; do
11009   if test $ac_beg -gt 1; then
11010     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11011   else
11012     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11013   fi
11014   if test ! -s conftest.s$ac_file; then
11015     ac_more_lines=false
11016     rm -f conftest.s$ac_file
11017   else
11018     if test -z "$ac_sed_cmds"; then
11019       ac_sed_cmds="sed -f conftest.s$ac_file"
11020     else
11021       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11022     fi
11023     ac_file=`expr $ac_file + 1`
11024     ac_beg=$ac_end
11025     ac_end=`expr $ac_end + $ac_max_sed_cmds`
11026   fi
11027 done
11028 if test -z "$ac_sed_cmds"; then
11029   ac_sed_cmds=cat
11030 fi
11031 EOF
11032
11033 cat >> $CONFIG_STATUS <<EOF
11034
11035 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
11036 EOF
11037 cat >> $CONFIG_STATUS <<\EOF
11038 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11039   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11040   case "$ac_file" in
11041   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11042        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11043   *) ac_file_in="${ac_file}.in" ;;
11044   esac
11045
11046   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11047
11048   # Remove last slash and all that follows it.  Not all systems have dirname.
11049   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11050   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11051     # The file is in a subdirectory.
11052     test ! -d "$ac_dir" && mkdir "$ac_dir"
11053     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11054     # A "../" for each directory in $ac_dir_suffix.
11055     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11056   else
11057     ac_dir_suffix= ac_dots=
11058   fi
11059
11060   case "$ac_given_srcdir" in
11061   .)  srcdir=.
11062       if test -z "$ac_dots"; then top_srcdir=.
11063       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11064   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11065   *) # Relative path.
11066     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11067     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11068   esac
11069
11070   case "$ac_given_INSTALL" in
11071   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11072   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11073   esac
11074
11075   echo creating "$ac_file"
11076   rm -f "$ac_file"
11077   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11078   case "$ac_file" in
11079   *Makefile*) ac_comsub="1i\\
11080 # $configure_input" ;;
11081   *) ac_comsub= ;;
11082   esac
11083
11084   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11085   sed -e "$ac_comsub
11086 s%@configure_input@%$configure_input%g
11087 s%@srcdir@%$srcdir%g
11088 s%@top_srcdir@%$top_srcdir%g
11089 s%@INSTALL@%$INSTALL%g
11090 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11091 fi; done
11092 rm -f conftest.s*
11093
11094 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11095 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11096 #
11097 # ac_d sets the value in "#define NAME VALUE" lines.
11098 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11099 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11100 ac_dC='\3'
11101 ac_dD='%g'
11102 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11103 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11104 ac_uB='\([      ]\)%\1#\2define\3'
11105 ac_uC=' '
11106 ac_uD='\4%g'
11107 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11108 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11109 ac_eB='$%\1#\2define\3'
11110 ac_eC=' '
11111 ac_eD='%g'
11112
11113 if test "${CONFIG_HEADERS+set}" != set; then
11114 EOF
11115 cat >> $CONFIG_STATUS <<EOF
11116   CONFIG_HEADERS="include/config.h"
11117 EOF
11118 cat >> $CONFIG_STATUS <<\EOF
11119 fi
11120 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11121   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11122   case "$ac_file" in
11123   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11124        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11125   *) ac_file_in="${ac_file}.in" ;;
11126   esac
11127
11128   echo creating $ac_file
11129
11130   rm -f conftest.frag conftest.in conftest.out
11131   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11132   cat $ac_file_inputs > conftest.in
11133
11134 EOF
11135
11136 # Transform confdefs.h into a sed script conftest.vals that substitutes
11137 # the proper values into config.h.in to produce config.h.  And first:
11138 # Protect against being on the right side of a sed subst in config.status.
11139 # Protect against being in an unquoted here document in config.status.
11140 rm -f conftest.vals
11141 cat > conftest.hdr <<\EOF
11142 s/[\\&%]/\\&/g
11143 s%[\\$`]%\\&%g
11144 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11145 s%ac_d%ac_u%gp
11146 s%ac_u%ac_e%gp
11147 EOF
11148 sed -n -f conftest.hdr confdefs.h > conftest.vals
11149 rm -f conftest.hdr
11150
11151 # This sed command replaces #undef with comments.  This is necessary, for
11152 # example, in the case of _POSIX_SOURCE, which is predefined and required
11153 # on some systems where configure will not decide to define it.
11154 cat >> conftest.vals <<\EOF
11155 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11156 EOF
11157
11158 # Break up conftest.vals because some shells have a limit on
11159 # the size of here documents, and old seds have small limits too.
11160
11161 rm -f conftest.tail
11162 while :
11163 do
11164   ac_lines=`grep -c . conftest.vals`
11165   # grep -c gives empty output for an empty file on some AIX systems.
11166   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11167   # Write a limited-size here document to conftest.frag.
11168   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11169   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11170   echo 'CEOF
11171   sed -f conftest.frag conftest.in > conftest.out
11172   rm -f conftest.in
11173   mv conftest.out conftest.in
11174 ' >> $CONFIG_STATUS
11175   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11176   rm -f conftest.vals
11177   mv conftest.tail conftest.vals
11178 done
11179 rm -f conftest.vals
11180
11181 cat >> $CONFIG_STATUS <<\EOF
11182   rm -f conftest.frag conftest.h
11183   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11184   cat conftest.in >> conftest.h
11185   rm -f conftest.in
11186   if cmp -s $ac_file conftest.h 2>/dev/null; then
11187     echo "$ac_file is unchanged"
11188     rm -f conftest.h
11189   else
11190     # Remove last slash and all that follows it.  Not all systems have dirname.
11191       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11192       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11193       # The file is in a subdirectory.
11194       test ! -d "$ac_dir" && mkdir "$ac_dir"
11195     fi
11196     rm -f $ac_file
11197     mv conftest.h $ac_file
11198   fi
11199 fi; done
11200
11201 EOF
11202 cat >> $CONFIG_STATUS <<EOF
11203
11204 EOF
11205 cat >> $CONFIG_STATUS <<\EOF
11206
11207 exit 0
11208 EOF
11209 chmod +x $CONFIG_STATUS
11210 rm -fr confdefs* $ac_clean_files
11211 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11212